index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
11,400
my_strnxfrm_8bit_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (srclen && dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse(cs, dst, dst + srclen, dst + dstlen, (uint)(nweights - srclen), flags, 0); }
O0
c
my_strnxfrm_8bit_bin: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0x37054 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x37056 jmp 0x37058 movq -0x30(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0x3706b movl -0x1c(%rbp), %eax movq %rax, -0x30(%rbp) jmp 0x3706d cmpq $0x0, -0x30(%rbp) je 0x3708f movq -0x10(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x3708f movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x24230 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x30(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movl -0x1c(%rbp), %eax subq -0x30(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0x42dd0 addq $0x40, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_8bit_bin: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_30] cmp rax, [rbp+var_18] jbe short loc_37054 mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_37054: jmp short $+2 loc_37056: jmp short $+2 loc_37058: mov rax, [rbp+var_30] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_3706B mov eax, [rbp+var_1C] mov [rbp+var_30], rax loc_3706B: jmp short $+2 loc_3706D: cmp [rbp+var_30], 0 jz short loc_3708F mov rax, [rbp+var_10] cmp rax, [rbp+var_28] jz short loc_3708F mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] call _memcpy loc_3708F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_30] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov eax, [rbp+var_1C] sub rax, [rbp+var_30] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+40h+var_40], 0 call my_strxfrm_pad_desc_and_reverse add rsp, 40h pop rbp retn
long long my_strnxfrm_8bit_bin( int a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, int a7) { unsigned long long v8; // [rsp+10h] [rbp-30h] int v10; // [rsp+28h] [rbp-18h] v10 = a3; v8 = a6; if ( a6 > a3 ) v8 = a3; if ( v8 > a4 ) v8 = a4; if ( v8 && a2 != a5 ) memcpy(a2, a5, v8); return my_strxfrm_pad_desc_and_reverse(a1, a2, (int)v8 + (int)a2, v10 + (int)a2, a4 - (unsigned int)v8, a7, 0); }
my_strnxfrm_8bit_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x18] JBE 0x00137054 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_00137054: JMP 0x00137056 LAB_00137056: JMP 0x00137058 LAB_00137058: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x0013706b MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x30],RAX LAB_0013706b: JMP 0x0013706d LAB_0013706d: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0013708f MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x28] JZ 0x0013708f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00124230 LAB_0013708f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] SUB RAX,qword ptr [RBP + -0x30] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x00142dd0 ADD RSP,0x40 POP RBP RET
void my_strnxfrm_8bit_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 local_38; local_38 = param_6; if (param_3 < param_6) { local_38 = param_3; } if (param_4 < local_38) { local_38 = (ulong)param_4; } if ((local_38 != 0) && (param_2 != param_5)) { memcpy(param_2,param_5,local_38); } my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + local_38,(long)param_2 + param_3, param_4 - (int)local_38,param_7,0); return; }
11,401
Stored_routine_creation_ctx::clone(st_mem_root*)
eloqsql/sql/sp.cc
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) { return new (mem_root) Stored_routine_creation_ctx(m_client_cs, m_connection_cl, m_db_cl); }
O0
cpp
Stored_routine_creation_ctx::clone(st_mem_root*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x40(%rbp) movl $0x20, %edi callq 0x886b10 movq %rax, %rcx movq %rcx, -0x38(%rbp) movb $0x0, -0x11(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x30(%rbp) je 0xe227ba movq -0x38(%rbp), %rdi movq -0x48(%rbp), %rax movb $0x1, -0x11(%rbp) movq 0x8(%rax), %rsi movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx callq 0xe21c10 jmp 0xe227b0 movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xe227ba movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) testb $0x1, -0x11(%rbp) jne 0xe227d8 jmp 0xe227e5 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdi callq 0x886b80 jmp 0xe227e7 movq -0x20(%rbp), %rdi callq 0x775a20
_ZN27Stored_routine_creation_ctx5cloneEP11st_mem_root: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_48], rax mov rsi, [rbp+var_10] mov [rbp+var_40], rsi mov edi, 20h ; ' ' call _ZN9Sql_allocnwEmP11st_mem_root; Sql_alloc::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_38], rcx mov [rbp+var_11], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_30], rax jz short loc_E227BA mov rdi, [rbp+var_38]; this mov rax, [rbp+var_48] mov [rbp+var_11], 1 mov rsi, [rax+8]; charset_info_st * mov rdx, [rax+10h]; charset_info_st * mov rcx, [rax+18h]; charset_info_st * call _ZN27Stored_routine_creation_ctxC2EPK15charset_info_stS2_S2_; Stored_routine_creation_ctx::Stored_routine_creation_ctx(charset_info_st const*,charset_info_st const*,charset_info_st const*) jmp short $+2 loc_E227B0: mov rax, [rbp+var_38] mov [rbp+var_30], rax jmp short $+2 loc_E227BA: mov rax, [rbp+var_30] add rsp, 50h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax test [rbp+var_11], 1 jnz short loc_E227D8 jmp short loc_E227E5 loc_E227D8: mov rsi, [rbp+var_40] mov rdi, [rbp+var_38] call _ZN9Sql_allocdlEPvP11st_mem_root; Sql_alloc::operator delete(void *,st_mem_root *) loc_E227E5: jmp short $+2 loc_E227E7: mov rdi, [rbp+var_20] call __Unwind_Resume
Stored_routine_creation_ctx * Stored_routine_creation_ctx::clone(const charset_info_st **a1, long long a2) { Stored_routine_creation_ctx *v3; // [rsp+18h] [rbp-38h] long long v4; // [rsp+20h] [rbp-30h] v3 = (Stored_routine_creation_ctx *)Sql_alloc::operator new(32LL, a2); v4 = 0LL; if ( v3 ) { Stored_routine_creation_ctx::Stored_routine_creation_ctx(v3, a1[1], a1[2], a1[3]); return v3; } return (Stored_routine_creation_ctx *)v4; }
safe_charset_converter: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RDI MOV RSI,qword ptr [RBP + -0x20] CALL 0x00e3c220 TEST AL,0x1 JNZ 0x00e22789 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x8],RAX JMP 0x00e22848 LAB_00e22789: MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x70],RSI MOV EDI,0xd8 CALL 0x0097dea0 MOV RCX,RAX MOV qword ptr [RBP + -0x68],RCX MOV byte ptr [RBP + -0x39],0x0 XOR EAX,EAX CMP RCX,0x0 MOV qword ptr [RBP + -0x60],RAX JZ 0x00e227ed MOV RDX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x30],RDI MOV qword ptr [RBP + -0x38],RAX MOV byte ptr [RBP + -0x39],0x1 MOV RSI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LAB_00e227d6: MOV R8D,0x1 CALL 0x00e3c250 LAB_00e227e1: JMP 0x00e227e3 LAB_00e227e3: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x60],RAX JMP 0x00e227ed LAB_00e227ed: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x00e22813 MOV RAX,qword ptr [RBP + -0x28] TEST byte ptr [RAX + 0xd0],0x1 JZ 0x00e22813 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x78],RAX JMP 0x00e2281b LAB_00e22813: XOR EAX,EAX MOV qword ptr [RBP + -0x78],RAX JMP 0x00e2281b LAB_00e2281b: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x8],RAX JMP 0x00e22848 LAB_00e22848: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x80 POP RBP RET
/* Item::safe_charset_converter(THD*, charset_info_st const*) */ Item_func_conv_charset * __thiscall Item::safe_charset_converter(Item *this,THD *param_1,charset_info_st *param_2) { ulong uVar1; Item_func_conv_charset *this_00; Item_func_conv_charset *local_80; Item_func_conv_charset *local_68; Item_func_conv_charset *local_10; uVar1 = needs_charset_converter(this,param_2); local_10 = (Item_func_conv_charset *)this; if ((uVar1 & 1) != 0) { this_00 = (Item_func_conv_charset *)operator_new(0xd8,*(st_mem_root **)(param_1 + 0x28)); local_68 = (Item_func_conv_charset *)0x0; if (this_00 != (Item_func_conv_charset *)0x0) { /* try { // try from 00e227d6 to 00e227e0 has its CatchHandler @ 00e22825 */ Item_func_conv_charset::Item_func_conv_charset(this_00,param_1,this,param_2,true); local_68 = this_00; } if ((local_68 == (Item_func_conv_charset *)0x0) || (((byte)local_68[0xd0] & 1) == 0)) { local_80 = (Item_func_conv_charset *)0x0; } else { local_80 = local_68; } local_10 = local_80; } return local_10; }
11,402
Stored_routine_creation_ctx::clone(st_mem_root*)
eloqsql/sql/sp.cc
virtual Stored_program_creation_ctx *clone(MEM_ROOT *mem_root) { return new (mem_root) Stored_routine_creation_ctx(m_client_cs, m_connection_cl, m_db_cl); }
O3
cpp
Stored_routine_creation_ctx::clone(st_mem_root*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rax movq %rdi, %r14 movl $0x20, %esi movq %rax, %rdi callq 0xcf03ef movq %rax, %rbx testq %rax, %rax je 0xa3bf9c movq 0x8(%r14), %rsi movq 0x10(%r14), %rdx movq 0x18(%r14), %r14 movq %rbx, %rdi callq 0x885eb4 movq %r14, 0x18(%rbx) leaq 0xa7cab7(%rip), %rax # 0x14b8a50 movq %rax, (%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq movq %rax, %rdi callq 0x6da8ee
_ZN27Stored_routine_creation_ctx5cloneEP11st_mem_root: push rbp mov rbp, rsp push r14 push rbx mov rax, rsi mov r14, rdi mov esi, 20h ; ' ' mov rdi, rax call alloc_root mov rbx, rax test rax, rax jz short loc_A3BF9C mov rsi, [r14+8] mov rdx, [r14+10h] mov r14, [r14+18h] mov rdi, rbx call _ZN27Default_object_creation_ctxC2EPK15charset_info_stS2_; Default_object_creation_ctx::Default_object_creation_ctx(charset_info_st const*,charset_info_st const*) mov [rbx+18h], r14 lea rax, off_14B8A50 mov [rbx], rax loc_A3BF9C: mov rax, rbx pop rbx pop r14 pop rbp retn mov rdi, rax call __clang_call_terminate
_QWORD * Stored_routine_creation_ctx::clone(long long *a1, long long a2) { _QWORD *v2; // rax _QWORD *v3; // rbx long long v4; // r14 v2 = (_QWORD *)alloc_root(a2, 32LL); v3 = v2; if ( v2 ) { v4 = a1[3]; Default_object_creation_ctx::Default_object_creation_ctx(v2, a1[1], a1[2]); v3[3] = v4; *v3 = off_14B8A50; } return v3; }
11,403
subnetNamef(LefDefParser::defrCallbackType_e, char const*, void*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/defrw/defrw.cpp
int subnetNamef(defrCallbackType_e c, const char* subnetName, defiUserData ud) { checkType(c); if (ud != userData) dataError(); if (curVer >= 5.6) fprintf(fout, " + SUBNET CBK %s ", subnetName); return 0; }
O3
cpp
subnetNamef(LefDefParser::defrCallbackType_e, char const*, void*): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx cmpl $0x68, %edi jb 0x83b1 movq 0x5deb5(%rip), %rcx # 0x66250 leaq 0x381d3(%rip), %rdi # 0x40575 movl $0x27, %esi movl $0x1, %edx callq 0x7350 cmpq %r14, 0x5dea0(%rip) # 0x66258 je 0x83d7 movq 0x5de8f(%rip), %rcx # 0x66250 leaq 0x38182(%rip), %rdi # 0x4054a movl $0x2a, %esi movl $0x1, %edx callq 0x7350 movsd 0x5de99(%rip), %xmm0 # 0x66278 ucomisd 0x380d1(%rip), %xmm0 # 0x404b8 jb 0x8401 movq 0x5de60(%rip), %rdi # 0x66250 leaq 0x382cc(%rip), %rsi # 0x406c3 movq %rbx, %rdx xorl %eax, %eax callq 0x7290 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z11subnetNamefN12LefDefParser18defrCallbackType_eEPKcPv: push r14 push rbx push rax mov r14, rdx mov rbx, rsi cmp edi, 68h ; 'h' jb short loc_83B1 mov rcx, cs:fout lea rdi, aErrorCallbackT; "ERROR: callback type is out of bounds!"... mov esi, 27h ; ''' mov edx, 1 call _fwrite loc_83B1: cmp cs:userData, r14 jz short loc_83D7 mov rcx, cs:fout lea rdi, aErrorReturnedU; "ERROR: returned user data is not correc"... mov esi, 2Ah ; '*' mov edx, 1 call _fwrite loc_83D7: movsd xmm0, cs:_ZL6curVer; curVer ucomisd xmm0, cs:qword_404B8 jb short loc_8401 mov rdi, cs:fout lea rsi, aSubnetCbkS; " + SUBNET CBK %s " mov rdx, rbx xor eax, eax call _fprintf loc_8401: xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long subnetNamef(unsigned int a1, const char *a2, long long a3) { if ( a1 >= 0x68 ) fwrite("ERROR: callback type is out of bounds!\n", 39LL, 1LL, fout); if ( userData != a3 ) fwrite("ERROR: returned user data is not correct!\n", 42LL, 1LL, fout); if ( *(double *)&curVer >= 5.6 ) fprintf(fout, " + SUBNET CBK %s ", a2); return 0LL; }
subnetNamef: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI CMP EDI,0x68 JC 0x001083b1 MOV RCX,qword ptr [0x00166250] LEA RDI,[0x140575] MOV ESI,0x27 MOV EDX,0x1 CALL 0x00107350 LAB_001083b1: CMP qword ptr [0x00166258],R14 JZ 0x001083d7 MOV RCX,qword ptr [0x00166250] LEA RDI,[0x14054a] MOV ESI,0x2a MOV EDX,0x1 CALL 0x00107350 LAB_001083d7: MOVSD XMM0,qword ptr [0x00166278] UCOMISD XMM0,qword ptr [0x001404b8] JC 0x00108401 MOV RDI,qword ptr [0x00166250] LEA RSI,[0x1406c3] MOV RDX,RBX XOR EAX,EAX CALL 0x00107290 LAB_00108401: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
/* subnetNamef(LefDefParser::defrCallbackType_e, char const*, void*) */ int8 subnetNamef(uint param_1,int8 param_2,long param_3) { if (0x67 < param_1) { fwrite("ERROR: callback type is out of bounds!\n",0x27,1,fout); } if (userData != param_3) { fwrite("ERROR: returned user data is not correct!\n",0x2a,1,fout); } if (DAT_001404b8 <= curVer) { fprintf(fout," + SUBNET CBK %s ",param_2); } return 0; }
11,404
httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
hkr04[P]cpp-mcp/common/httplib.h
inline void make_multipart_ranges_data(const Request &req, Response &res, const std::string &boundary, const std::string &content_type, size_t content_length, std::string &data) { process_multipart_ranges_data( req, boundary, content_type, content_length, [&](const std::string &token) { data += token; }, [&](const std::string &token) { data += token; }, [&](size_t offset, size_t length) { assert(offset + length <= content_length); data += res.body.substr(offset, length); return true; }); }
O0
c
httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq %r8, 0x40(%rsp) movq %r9, 0x38(%rsp) movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x40(%rsp), %rcx movq 0x38(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x30(%rsp), %r8 movq 0x28(%rsp), %r9 leaq 0x18(%rsp), %rax movq (%rax), %r10 movq %r10, (%rsp) movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) callq 0x29b60 addq $0x68, %rsp retq nopw (%rax,%rax)
_ZN7httplib6detail26make_multipart_ranges_dataERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_mRSB_: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov [rsp+68h+var_28], r8 mov [rsp+68h+var_30], r9 mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_18] mov rdx, [rsp+68h+var_20] mov rcx, [rsp+68h+var_28] mov rax, [rsp+68h+var_30] mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_30] mov [rsp+68h+var_40], rax mov rax, [rsp+68h+var_30] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_10] mov [rsp+68h+var_48], rax mov r8, [rsp+68h+var_38] mov r9, [rsp+68h+var_40] lea rax, [rsp+68h+var_50] mov r10, [rax] mov [rsp+68h+var_68], r10 mov rax, [rax+8] mov [rsp+68h+var_60], rax call _ZN7httplib6detail29process_multipart_ranges_dataIZNS0_26make_multipart_ranges_dataERKNS_7RequestERNS_8ResponseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESE_mRSC_EUlSE_E_ZNS0_26make_multipart_ranges_dataES4_S6_SE_SE_mSF_EUlSE_E0_ZNS0_26make_multipart_ranges_dataES4_S6_SE_SE_mSF_EUlmmE_EEbS4_SE_SE_mT_T0_T1_; httplib::detail::process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(ulong,ulong)#1}>(httplib::Request const&,std::string const&,std::string const&,ulong,httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,ulong,std::string&)::{lambda(ulong,ulong)#1}) add rsp, 68h retn
long long httplib::detail::make_multipart_ranges_data( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { return httplib::detail::process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(std::string const&)#1},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(std::string const&)#2},httplib::detail::make_multipart_ranges_data(httplib::Request const&,httplib::Response &,std::string const&,std::string const&,unsigned long,std::string&)::{lambda(unsigned long,unsigned long)#1}>( a1, a3, a4, a5, a6, a6, a6, a2); }
make_multipart_ranges_data: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x40],R8 MOV qword ptr [RSP + 0x38],R9 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x20],RAX MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x18] MOV R10,qword ptr [RAX] MOV qword ptr [RSP],R10 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX CALL 0x00129b60 ADD RSP,0x68 RET
/* httplib::detail::make_multipart_ranges_data(httplib::Request const&, httplib::Response&, std::__cxx11::string const&, std::__cxx11::string const&, unsigned long, std::__cxx11::string&) */ void httplib::detail::make_multipart_ranges_data (Request *param_1,Response *param_2,string *param_3,string *param_4,ulong param_5, string *param_6) { process_multipart_ranges_data<httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(std::__cxx11::string_const&)_1_,httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(std::__cxx11::string_const&)_2_,httplib::detail::make_multipart_ranges_data(httplib::Request_const&,httplib::Response&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long,std::__cxx11::string&)::_lambda(unsigned_long,unsigned_long)_1_> (param_1,param_3,param_4,param_5,param_6,param_6,param_6,param_2); return; }
11,405
js_is_live_code
bluesky950520[P]quickjs/quickjs.c
static BOOL js_is_live_code(JSParseState *s) { switch (get_prev_opcode(s->cur_func)) { case OP_tail_call: case OP_tail_call_method: case OP_return: case OP_return_undef: case OP_return_async: case OP_throw: case OP_throw_error: case OP_goto: case OP_goto8: case OP_goto16: case OP_ret: return FALSE; default: return TRUE; } }
O0
c
js_is_live_code: subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x90(%rax), %rdi callq 0xb3fa0 movl %eax, %ecx movl %ecx, 0x4(%rsp) subl $0x23, %eax je 0xad694 jmp 0xad647 movl 0x4(%rsp), %eax subl $0x25, %eax je 0xad694 jmp 0xad652 movl 0x4(%rsp), %eax addl $-0x28, %eax subl $0x2, %eax jb 0xad694 jmp 0xad660 movl 0x4(%rsp), %eax addl $-0x2e, %eax subl $0x3, %eax jb 0xad694 jmp 0xad66e movl 0x4(%rsp), %eax subl $0x6b, %eax je 0xad694 jmp 0xad679 movl 0x4(%rsp), %eax subl $0x6e, %eax je 0xad694 jmp 0xad684 movl 0x4(%rsp), %eax addl $0xffffff14, %eax # imm = 0xFFFFFF14 subl $0x1, %eax ja 0xad69e jmp 0xad694 movl $0x0, 0x14(%rsp) jmp 0xad6a6 movl $0x1, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
js_is_live_code: sub rsp, 18h mov [rsp+18h+var_10], rdi mov rax, [rsp+18h+var_10] mov rdi, [rax+90h] call get_prev_opcode mov ecx, eax mov [rsp+18h+var_14], ecx sub eax, 23h ; '#' jz short loc_AD694 jmp short $+2 loc_AD647: mov eax, [rsp+18h+var_14] sub eax, 25h ; '%' jz short loc_AD694 jmp short $+2 loc_AD652: mov eax, [rsp+18h+var_14] add eax, 0FFFFFFD8h sub eax, 2 jb short loc_AD694 jmp short $+2 loc_AD660: mov eax, [rsp+18h+var_14] add eax, 0FFFFFFD2h sub eax, 3 jb short loc_AD694 jmp short $+2 loc_AD66E: mov eax, [rsp+18h+var_14] sub eax, 6Bh ; 'k' jz short loc_AD694 jmp short $+2 loc_AD679: mov eax, [rsp+18h+var_14] sub eax, 6Eh ; 'n' jz short loc_AD694 jmp short $+2 loc_AD684: mov eax, [rsp+18h+var_14] add eax, 0FFFFFF14h sub eax, 1 ja short loc_AD69E jmp short $+2 loc_AD694: mov [rsp+18h+var_4], 0 jmp short loc_AD6A6 loc_AD69E: mov [rsp+18h+var_4], 1 loc_AD6A6: mov eax, [rsp+18h+var_4] add rsp, 18h retn
_BOOL8 js_is_live_code(long long a1) { int prev_opcode; // [rsp+4h] [rbp-14h] prev_opcode = get_prev_opcode(*(_QWORD *)(a1 + 144)); return prev_opcode != 35 && prev_opcode != 37 && (unsigned int)(prev_opcode - 40) >= 2 && (unsigned int)(prev_opcode - 46) >= 3 && prev_opcode != 107 && prev_opcode != 110 && (unsigned int)(prev_opcode - 236) > 1; }
js_is_live_code: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x90] CALL 0x001b3fa0 MOV ECX,EAX MOV dword ptr [RSP + 0x4],ECX SUB EAX,0x23 JZ 0x001ad694 JMP 0x001ad647 LAB_001ad647: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x25 JZ 0x001ad694 JMP 0x001ad652 LAB_001ad652: MOV EAX,dword ptr [RSP + 0x4] ADD EAX,-0x28 SUB EAX,0x2 JC 0x001ad694 JMP 0x001ad660 LAB_001ad660: MOV EAX,dword ptr [RSP + 0x4] ADD EAX,-0x2e SUB EAX,0x3 JC 0x001ad694 JMP 0x001ad66e LAB_001ad66e: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x6b JZ 0x001ad694 JMP 0x001ad679 LAB_001ad679: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x6e JZ 0x001ad694 JMP 0x001ad684 LAB_001ad684: MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0xffffff14 SUB EAX,0x1 JA 0x001ad69e JMP 0x001ad694 LAB_001ad694: MOV dword ptr [RSP + 0x14],0x0 JMP 0x001ad6a6 LAB_001ad69e: MOV dword ptr [RSP + 0x14],0x1 LAB_001ad6a6: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
int4 js_is_live_code(long param_1) { int iVar1; int4 local_4; iVar1 = get_prev_opcode(*(int8 *)(param_1 + 0x90)); if ((((iVar1 == 0x23) || (iVar1 == 0x25)) || (iVar1 - 0x28U < 2)) || (((iVar1 - 0x2eU < 3 || (iVar1 == 0x6b)) || ((iVar1 == 0x6e || (iVar1 == 0xec || iVar1 == 0xed)))))) { local_4 = 0; } else { local_4 = 1; } return local_4; }
11,406
js_is_live_code
bluesky950520[P]quickjs/quickjs.c
static BOOL js_is_live_code(JSParseState *s) { switch (get_prev_opcode(s->cur_func)) { case OP_tail_call: case OP_tail_call_method: case OP_return: case OP_return_undef: case OP_return_async: case OP_throw: case OP_throw_error: case OP_goto: case OP_goto8: case OP_goto16: case OP_ret: return FALSE; default: return TRUE; } }
O2
c
js_is_live_code: movq 0x90(%rdi), %rax movslq 0x168(%rax), %rcx testq %rcx, %rcx js 0x59f15 movq 0x138(%rax), %rax movzbl (%rax,%rcx), %ecx xorl %eax, %eax cmpq $0x30, %rcx ja 0x59eff movabsq $0x1c32800000000, %rdx # imm = 0x1C32800000000 btq %rcx, %rdx jb 0x59f14 leal -0xec(%rcx), %edx cmpl $0x2, %edx jb 0x59f14 cmpl $0x6b, %ecx je 0x59f14 cmpl $0x6e, %ecx jne 0x59f15 retq pushq $0x1 popq %rax retq
js_is_live_code: mov rax, [rdi+90h] movsxd rcx, dword ptr [rax+168h] test rcx, rcx js short loc_59F15 mov rax, [rax+138h] movzx ecx, byte ptr [rax+rcx] xor eax, eax cmp rcx, 30h ; '0' ja short loc_59EFF mov rdx, 1C32800000000h bt rdx, rcx jb short locret_59F14 loc_59EFF: lea edx, [rcx-0ECh] cmp edx, 2 jb short locret_59F14 cmp ecx, 6Bh ; 'k' jz short locret_59F14 cmp ecx, 6Eh ; 'n' jnz short loc_59F15 locret_59F14: retn loc_59F15: push 1 pop rax retn
long long js_is_live_code(long long a1) { long long v1; // rax long long v2; // rcx unsigned long long v3; // rcx long long result; // rax long long v5; // rdx v1 = *(_QWORD *)(a1 + 144); v2 = *(int *)(v1 + 360); if ( v2 < 0 ) return 1LL; v3 = *(unsigned __int8 *)(*(_QWORD *)(v1 + 312) + v2); result = 0LL; if ( v3 > 0x30 || (v5 = 0x1C32800000000LL, !_bittest64(&v5, v3)) ) { if ( (unsigned int)(v3 - 236) >= 2 && (_DWORD)v3 != 107 && (_DWORD)v3 != 110 ) return 1LL; } return result; }
js_is_live_code: MOV RAX,qword ptr [RDI + 0x90] MOVSXD RCX,dword ptr [RAX + 0x168] TEST RCX,RCX JS 0x00159f15 MOV RAX,qword ptr [RAX + 0x138] MOVZX ECX,byte ptr [RAX + RCX*0x1] XOR EAX,EAX CMP RCX,0x30 JA 0x00159eff MOV RDX,0x1c32800000000 BT RDX,RCX JC 0x00159f14 LAB_00159eff: LEA EDX,[RCX + -0xec] CMP EDX,0x2 JC 0x00159f14 CMP ECX,0x6b JZ 0x00159f14 CMP ECX,0x6e JNZ 0x00159f15 LAB_00159f14: RET LAB_00159f15: PUSH 0x1 POP RAX RET
int8 js_is_live_code(long param_1) { byte bVar1; long lVar2; lVar2 = (long)*(int *)(*(long *)(param_1 + 0x90) + 0x168); if (-1 < lVar2) { bVar1 = *(byte *)(*(long *)(*(long *)(param_1 + 0x90) + 0x138) + lVar2); if (((((ulong)bVar1 < 0x31) && ((0x1c32800000000U >> ((ulong)bVar1 & 0x3f) & 1) != 0)) || (bVar1 - 0xec < 2)) || ((bVar1 == 0x6b || (bVar1 == 0x6e)))) { return 0; } } return 1; }
11,407
ma_test_if_changed
eloqsql/storage/maria/ma_locking.c
int _ma_test_if_changed(register MARIA_HA *info) { #ifdef MARIA_EXTERNAL_LOCKING MARIA_SHARE *share= info->s; if (share->state.process != share->last_process || share->state.unique != info->last_unique || share->state.update_count != info->last_loop) { /* Keyfile has changed */ DBUG_PRINT("info",("index file changed")); if (share->state.process != share->this_process) VOID(flush_pagecache_blocks(share->pagecache, &share->kfile, FLUSH_RELEASE)); share->last_process=share->state.process; info->last_unique= share->state.unique; info->last_loop= share->state.update_count; info->update|= HA_STATE_WRITTEN; /* Must use file on next */ info->data_changed= 1; /* For maria_is_changed */ return 1; } #endif return (!(info->update & HA_STATE_AKTIV) || (info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED | HA_STATE_KEY_CHANGED))); }
O0
c
ma_test_if_changed: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x624(%rax), %ecx andl $0x2, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x9(%rbp) je 0x35ba7 movq -0x8(%rbp), %rax movl 0x624(%rax), %eax andl $0x8c, %eax cmpl $0x0, %eax setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_test_if_changed: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov ecx, [rax+624h] and ecx, 2 mov al, 1 cmp ecx, 0 mov [rbp+var_9], al jz short loc_35BA7 mov rax, [rbp+var_8] mov eax, [rax+624h] and eax, 8Ch cmp eax, 0 setnz al mov [rbp+var_9], al loc_35BA7: mov al, [rbp+var_9] and al, 1 movzx eax, al pop rbp retn
_BOOL8 ma_test_if_changed(long long a1) { bool v2; // [rsp+1h] [rbp-9h] v2 = 1; if ( (*(_DWORD *)(a1 + 1572) & 2) != 0 ) return (*(_DWORD *)(a1 + 1572) & 0x8C) != 0; return v2; }
_ma_test_if_changed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0x2 MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x9],AL JZ 0x00135ba7 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x624] AND EAX,0x8c CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00135ba7: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool _ma_test_if_changed(long param_1) { int1 local_11; local_11 = true; if ((*(uint *)(param_1 + 0x624) & 2) != 0) { local_11 = (*(uint *)(param_1 + 0x624) & 0x8c) != 0; } return local_11; }
11,408
bitmap_lock_clear_bit
eloqsql/mysys/my_bitmap.c
void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit) { bitmap_lock(map); DBUG_ASSERT(map->bitmap); DBUG_ASSERT(bitmap_bit < map->n_bits); bitmap_clear_bit(map, bitmap_bit); bitmap_unlock(map); }
O3
c
bitmap_lock_clear_bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movl %esi, %r14d movq %rdi, %rbx movq 0x10(%rdi), %rdi testq %rdi, %rdi je 0x9dd40 cmpq $0x0, 0x40(%rdi) jne 0x9dd81 callq 0x29220 movq (%rbx), %rax movl %r14d, %edx shrl $0x3, %edx andb $0x7, %r14b movl $0x1, %esi movl %r14d, %ecx shll %cl, %esi notb %sil andb %sil, (%rax,%rdx) movq 0x10(%rbx), %rbx testq %rbx, %rbx je 0x9dd7c movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x9dd94 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x291e0 popq %rbx popq %r14 popq %rbp retq leaq 0x3e623(%rip), %rsi # 0xdc3ab movl $0x81, %edx callq 0x2eb8f jmp 0x9dd40 leaq 0x2e8275(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x9dd70 nop
bitmap_lock_clear_bit: push rbp mov rbp, rsp push r14 push rbx mov r14d, esi mov rbx, rdi mov rdi, [rdi+10h] test rdi, rdi jz short loc_9DD40 cmp qword ptr [rdi+40h], 0 jnz short loc_9DD81 call _pthread_mutex_lock loc_9DD40: mov rax, [rbx] mov edx, r14d shr edx, 3 and r14b, 7 mov esi, 1 mov ecx, r14d shl esi, cl not sil and [rax+rdx], sil mov rbx, [rbx+10h] test rbx, rbx jz short loc_9DD7C mov rdi, [rbx+40h] test rdi, rdi jnz short loc_9DD94 loc_9DD70: mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_9DD7C: pop rbx pop r14 pop rbp retn loc_9DD81: lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 81h call psi_mutex_lock jmp short loc_9DD40 loc_9DD94: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_9DD70
long long bitmap_lock_clear_bit(long long *a1, unsigned int a2) { long long v3; // rdi long long result; // rax long long v5; // rbx v3 = a1[2]; if ( v3 ) { if ( *(_QWORD *)(v3 + 64) ) psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u); else pthread_mutex_lock(v3); } result = *a1; *(_BYTE *)(*a1 + (a2 >> 3)) &= ~(unsigned __int8)(1 << (a2 & 7)); v5 = a1[2]; if ( v5 ) { if ( *(_QWORD *)(v5 + 64) ) PSI_server[44](); return pthread_mutex_unlock(v5); } return result; }
bitmap_lock_clear_bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14D,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] TEST RDI,RDI JZ 0x0019dd40 CMP qword ptr [RDI + 0x40],0x0 JNZ 0x0019dd81 CALL 0x00129220 LAB_0019dd40: MOV RAX,qword ptr [RBX] MOV EDX,R14D SHR EDX,0x3 AND R14B,0x7 MOV ESI,0x1 MOV ECX,R14D SHL ESI,CL NOT SIL AND byte ptr [RAX + RDX*0x1],SIL MOV RBX,qword ptr [RBX + 0x10] TEST RBX,RBX JZ 0x0019dd7c MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x0019dd94 LAB_0019dd70: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001291e0 LAB_0019dd7c: POP RBX POP R14 POP RBP RET LAB_0019dd81: LEA RSI,[0x1dc3ab] MOV EDX,0x81 CALL 0x0012eb8f JMP 0x0019dd40 LAB_0019dd94: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0019dd70
void bitmap_lock_clear_bit(long *param_1,uint param_2) { byte *pbVar1; pthread_mutex_t *ppVar2; ppVar2 = (pthread_mutex_t *)param_1[2]; if (ppVar2 != (pthread_mutex_t *)0x0) { if (*(long *)((long)ppVar2 + 0x40) == 0) { pthread_mutex_lock(ppVar2); } else { psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81); } } pbVar1 = (byte *)(*param_1 + (ulong)(param_2 >> 3)); *pbVar1 = *pbVar1 & ~(byte)(1 << ((byte)param_2 & 7)); ppVar2 = (pthread_mutex_t *)param_1[2]; if (ppVar2 != (pthread_mutex_t *)0x0) { if (*(long *)((long)ppVar2 + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar2); return; } return; }
11,409
my_strnxfrm_tis620
eloqsql/strings/ctype-tis620.c
static size_t my_strnxfrm_tis620(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { size_t len, dstlen0= dstlen; len= MY_MIN(dstlen, srclen); memcpy(dst, src, len); len= thai2sortable(dst, len); set_if_smaller(dstlen, nweights); set_if_smaller(len, dstlen); len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen, (uint)(dstlen - len), flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0) { size_t fill_length= dstlen0 - len; my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char); len= dstlen0; } return len; }
O0
c
my_strnxfrm_tis620: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0xaa67e movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xaa686 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x282b0 movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi callq 0xaa770 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx cmpq %rcx, %rax jbe 0xaa6c3 movl -0x1c(%rbp), %eax movq %rax, -0x18(%rbp) jmp 0xaa6c5 jmp 0xaa6c7 movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jbe 0xaa6d9 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0xaa6db movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x38(%rbp), %rdx movq -0x10(%rbp), %rcx addq -0x18(%rbp), %rcx movq -0x18(%rbp), %rax subq -0x38(%rbp), %rax movl %eax, %r8d movl 0x10(%rbp), %r9d xorl %eax, %eax movl $0x0, (%rsp) callq 0xa4d30 movq %rax, -0x38(%rbp) movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xaa75f movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xaa75f movq -0x40(%rbp), %rax subq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx movq -0x8(%rbp), %rax movzbl 0xb0(%rax), %ecx callq 0xaa910 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_tis620: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp rax, [rbp+var_30] jnb short loc_AA67E mov rax, [rbp+var_18] mov [rbp+var_50], rax jmp short loc_AA686 loc_AA67E: mov rax, [rbp+var_30] mov [rbp+var_50], rax loc_AA686: mov rax, [rbp+var_50] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _memcpy mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] call thai2sortable mov [rbp+var_38], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] cmp rax, rcx jbe short loc_AA6C3 mov eax, [rbp+var_1C] mov [rbp+var_18], rax loc_AA6C3: jmp short $+2 loc_AA6C5: jmp short $+2 loc_AA6C7: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jbe short loc_AA6D9 mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_AA6D9: jmp short $+2 loc_AA6DB: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_38] mov rcx, [rbp+var_10] add rcx, [rbp+var_18] mov rax, [rbp+var_18] sub rax, [rbp+var_38] mov r8d, eax mov r9d, [rbp+arg_0] xor eax, eax mov [rsp+60h+var_60], 0 call my_strxfrm_pad_desc_and_reverse mov [rbp+var_38], rax mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_AA75F mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb short loc_AA75F mov rax, [rbp+var_40] sub rax, [rbp+var_38] mov [rbp+var_48], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, [rbp+var_38] mov rdx, [rbp+var_48] mov rax, [rbp+var_8] movzx ecx, byte ptr [rax+0B0h] call my_ci_fill_2 mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_AA75F: mov rax, [rbp+var_38] add rsp, 60h pop rbp retn
unsigned long long my_strnxfrm_tis620( long long a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, unsigned int a7) { unsigned long long v8; // [rsp+10h] [rbp-50h] unsigned long long v10; // [rsp+28h] [rbp-38h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v13; // [rsp+48h] [rbp-18h] v13 = a3; if ( a3 >= a6 ) v8 = a6; else v8 = a3; memcpy(a2, a5, v8); v10 = thai2sortable(a2, v8); if ( v13 > a4 ) v13 = a4; if ( v10 > v13 ) v10 = v13; v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0); if ( (a7 & 0x80) != 0 && v11 < a3 ) { my_ci_fill_2(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176)); return a3; } return v11; }
my_strnxfrm_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x30] JNC 0x001aa67e MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001aa686 LAB_001aa67e: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX LAB_001aa686: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001282b0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] CALL 0x001aa770 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CMP RAX,RCX JBE 0x001aa6c3 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x18],RAX LAB_001aa6c3: JMP 0x001aa6c5 LAB_001aa6c5: JMP 0x001aa6c7 LAB_001aa6c7: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JBE 0x001aa6d9 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_001aa6d9: JMP 0x001aa6db LAB_001aa6db: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RBP + -0x38] MOV R8D,EAX MOV R9D,dword ptr [RBP + 0x10] XOR EAX,EAX MOV dword ptr [RSP],0x0 CALL 0x001a4d30 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x001aa75f MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001aa75f MOV RAX,qword ptr [RBP + -0x40] SUB RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RAX + 0xb0] CALL 0x001aa910 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_001aa75f: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x60 POP RBP RET
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,uint param_7) { size_t local_58; ulong local_40; ulong local_20; local_58 = param_6; if (param_3 < param_6) { local_58 = param_3; } memcpy(param_2,param_5,local_58); local_40 = thai2sortable(param_2,local_58); local_20 = param_3; if (param_4 < param_3) { local_20 = (ulong)param_4; } if (local_20 < local_40) { local_40 = local_20; } local_40 = my_strxfrm_pad_desc_and_reverse (param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20, (int)local_20 - (int)local_40,param_7,0); if (((param_7 & 0x80) != 0) && (local_40 < param_3)) { my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0)); local_40 = param_3; } return local_40; }
11,410
ma_get_prev_key
eloqsql/storage/maria/ma_search.c
static my_bool _ma_get_prev_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_get_prev_key"); page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos - keyinfo->keylength - nod_flag, keyinfo->keylength); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(0); } else { uchar *page; page= ma_page->buff + keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ DBUG_ASSERT(page != keypos); while (page < keypos) { if (! (*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(1); } } } DBUG_RETURN(0); }
O0
c
ma_get_prev_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x28(%rbp) movq -0x30(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x99154 movl -0x24(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x99154 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax movslq %eax, %rcx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x28(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax movl %eax, %edx callq 0x2a140 movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x740(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %ecx movq -0x10(%rbp), %rax subl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x18(%rax) movb $0x0, -0x1(%rbp) jmp 0x991cf movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x0, (%rax) jmp 0x99182 jmp 0x99184 movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x991c7 movq -0x30(%rbp), %rax movq 0xe0(%rax), %rax movq -0x10(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx leaq -0x38(%rbp), %rcx callq *%rax cmpl $0x0, %eax jne 0x991c5 movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x42290 movb $0x1, -0x1(%rbp) jmp 0x991cf jmp 0x99184 jmp 0x991c9 jmp 0x991cb movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_get_prev_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov eax, [rax+2Ch] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_28], eax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0A2h] and eax, 28h cmp eax, 0 jnz loc_99154 mov eax, [rbp+var_24] and eax, 2 cmp eax, 0 jnz short loc_99154 mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] movsxd rcx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_28] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] mov edx, eax call _memmove mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+740h] mov rax, [rbp+var_10] mov [rax+14h], ecx mov rax, [rbp+var_30] movzx ecx, word ptr [rax+0AAh] mov rax, [rbp+var_10] sub ecx, [rax+14h] mov rax, [rbp+var_10] mov [rax+10h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0 mov [rbp+var_1], 0 jmp short loc_991CF loc_99154: mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_30] mov rcx, [rcx] mov ecx, [rcx+744h] add rax, rcx mov ecx, [rbp+var_28] add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov byte ptr [rax], 0 jmp short $+2 loc_99182: jmp short $+2 loc_99184: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] jnb short loc_991C7 mov rax, [rbp+var_30] mov rax, [rax+0E0h] mov rdi, [rbp+var_10] mov esi, [rbp+var_24] mov edx, [rbp+var_28] lea rcx, [rbp+var_38] call rax cmp eax, 0 jnz short loc_991C5 mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov [rbp+var_1], 1 jmp short loc_991CF loc_991C5: jmp short loc_99184 loc_991C7: jmp short $+2 loc_991C9: jmp short $+2 loc_991CB: mov [rbp+var_1], 0 loc_991CF: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_get_prev_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF long long v9; // [rsp+10h] [rbp-30h] unsigned int v10; // [rsp+18h] [rbp-28h] unsigned int v11; // [rsp+1Ch] [rbp-24h] unsigned long long v12; // [rsp+20h] [rbp-20h] long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v9 = *(_QWORD *)(a1 + 8); v11 = *(_DWORD *)(a2 + 44); v10 = *(_DWORD *)(a2 + 40); if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 ) { v8 = v10 + *(unsigned int *)(*(_QWORD *)v9 + 1860LL) + *(_QWORD *)(v13 + 16); **(_BYTE **)v14 = 0; while ( v8 < v12 ) { if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6); return 1; } } return 0; } else { memmove(*(_QWORD *)v14, v12 - *(unsigned __int16 *)(v9 + 170) - v10, *(unsigned __int16 *)(v9 + 170)); *(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL); *(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20); *(_DWORD *)(v14 + 24) = 0; return 0; } }
_ma_get_prev_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x28 CMP EAX,0x0 JNZ 0x00199154 MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00199154 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] MOVSXD RCX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x28] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] MOV EDX,EAX CALL 0x0012a140 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x740] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RAX + 0xaa] MOV RAX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001991cf LAB_00199154: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX],0x0 JMP 0x00199182 LAB_00199182: JMP 0x00199184 LAB_00199184: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001991c7 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xe0] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] LEA RCX,[RBP + -0x38] CALL RAX CMP EAX,0x0 JNZ 0x001991c5 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x00142290 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001991cf LAB_001991c5: JMP 0x00199184 LAB_001991c7: JMP 0x001991c9 LAB_001991c9: JMP 0x001991cb LAB_001991cb: MOV byte ptr [RBP + -0x1],0x0 LAB_001991cf: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 _ma_get_prev_key(int8 *param_1,long param_2,ulong param_3) { int iVar1; ulong local_40; long *local_38; uint local_30; uint local_2c; ulong local_28; long local_20; int8 *local_18; int1 local_9; local_38 = (long *)param_1[1]; local_2c = *(uint *)(param_2 + 0x2c); local_30 = *(uint *)(param_2 + 0x28); local_28 = param_3; local_20 = param_2; local_18 = param_1; if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) { memmove((void *)*param_1, (void *)((param_3 - (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)) - (ulong)local_30),(ulong)*(ushort *)((long)local_38 + 0xaa)); *(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740); *(uint *)(local_18 + 2) = (uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14); *(int4 *)(local_18 + 3) = 0; local_9 = 0; } else { local_40 = *(long *)(param_2 + 0x10) + (ulong)*(uint *)(*local_38 + 0x744) + (ulong)local_30; *(int1 *)*param_1 = 0; do { if (local_28 <= local_40) { return 0; } iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40); } while (iVar1 != 0); _ma_set_fatal_error_with_share(*local_38,0x7e); local_9 = 1; } return local_9; }
11,411
ftxui::(anonymous namespace)::InputBase::HandleCharacter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/input.cpp
bool HandleCharacter(const std::string& character) { content->insert(cursor_position(), character); cursor_position() += character.size(); on_change(); return true; }
O2
cpp
ftxui::(anonymous namespace)::InputBase::HandleCharacter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x28, %rdi callq 0x260d8 movq %rax, %r15 leaq 0xf8(%r14), %r12 movq %r12, %rdi callq 0x2637c movslq (%rax), %rsi movq %r15, %rdi movq %rbx, %rdx callq 0xc750 movl 0x8(%rbx), %ebx movq %r12, %rdi callq 0x2637c addl %ebx, (%rax) addq $0xb8, %r14 movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x13f88
_ZN5ftxui12_GLOBAL__N_19InputBase15HandleCharacterERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi add rdi, 28h ; '(' call _ZN5ftxui3RefINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE7AddressEv; ftxui::Ref<std::string>::Address(void) mov r15, rax lea r12, [r14+0F8h] mov rdi, r12 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) movsxd rsi, dword ptr [rax] mov rdi, r15 mov rdx, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6insertEmRKS4_; std::string::insert(ulong,std::string const&) mov ebx, [rbx+8] mov rdi, r12 call _ZN5ftxui3RefIiE7AddressEv; ftxui::Ref<int>::Address(void) add [rax], ebx add r14, 0B8h mov rdi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZNKSt8functionIFvvEEclEv; std::function<void ()(void)>::operator()(void)
long long ftxui::`anonymous namespace'::InputBase::HandleCharacter(long long a1, long long a2) { long long v2; // r15 int *v3; // rax int v4; // ebx _DWORD *v5; // rax v2 = ftxui::Ref<std::string>::Address(a1 + 40); v3 = (int *)ftxui::Ref<int>::Address(a1 + 248); std::string::insert(v2, *v3, a2); v4 = *(_DWORD *)(a2 + 8); v5 = (_DWORD *)ftxui::Ref<int>::Address(a1 + 248); *v5 += v4; return std::function<void ()(void)>::operator()(a1 + 184); }
HandleCharacter: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD RDI,0x28 CALL 0x001260d8 MOV R15,RAX LEA R12,[R14 + 0xf8] MOV RDI,R12 CALL 0x0012637c MOVSXD RSI,dword ptr [RAX] MOV RDI,R15 MOV RDX,RBX CALL 0x0010c750 MOV EBX,dword ptr [RBX + 0x8] MOV RDI,R12 CALL 0x0012637c ADD dword ptr [RAX],EBX ADD R14,0xb8 MOV RDI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00113f88
/* ftxui::(anonymous namespace)::InputBase::HandleCharacter(std::__cxx11::string const&) */ void __thiscall ftxui::(anonymous_namespace)::InputBase::HandleCharacter(InputBase *this,string *param_1) { int iVar1; ulong uVar2; int *piVar3; uVar2 = Ref<std::__cxx11::string>::Address((Ref<std::__cxx11::string> *)(this + 0x28)); piVar3 = (int *)Ref<int>::Address((Ref<int> *)(this + 0xf8)); std::__cxx11::string::insert(uVar2,(string *)(long)*piVar3); iVar1 = *(int *)(param_1 + 8); piVar3 = (int *)Ref<int>::Address((Ref<int> *)(this + 0xf8)); *piVar3 = *piVar3 + iVar1; std::function<void()>::operator()((function<void()> *)(this + 0xb8)); return; }
11,412
translog_truncate_log
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_truncate_log(TRANSLOG_ADDRESS addr) { uchar *page; TRANSLOG_ADDRESS current_page; uint32 next_page_offset, page_rest; uint32 i; File fd; int rc; TRANSLOG_VALIDATOR_DATA data; char path[FN_REFLEN]; uchar page_buff[TRANSLOG_PAGE_SIZE]; DBUG_ENTER("translog_truncate_log"); /* TODO: write warning to the client */ DBUG_PRINT("warning", ("removing all records from " LSN_FMT " " "till " LSN_FMT, LSN_IN_PARTS(addr), LSN_IN_PARTS(log_descriptor.horizon))); DBUG_ASSERT(cmp_translog_addr(addr, log_descriptor.horizon) < 0); /* remove files between the address and horizon */ for (i= LSN_FILE_NO(addr) + 1; i <= LSN_FILE_NO(log_descriptor.horizon); i++) if (mysql_file_delete(key_file_translog, translog_filename_by_fileno(i, path), MYF(MY_WME))) { translog_unlock(); DBUG_RETURN(1); } /* truncate the last file up to the last page */ next_page_offset= LSN_OFFSET(addr); next_page_offset= (next_page_offset - ((next_page_offset - 1) % TRANSLOG_PAGE_SIZE + 1) + TRANSLOG_PAGE_SIZE); page_rest= next_page_offset - LSN_OFFSET(addr); memset(page_buff, TRANSLOG_FILLER, page_rest); rc= ((fd= open_logfile_by_number_no_cache(LSN_FILE_NO(addr))) < 0 || ((mysql_file_chsize(fd, next_page_offset, TRANSLOG_FILLER, MYF(MY_WME)) || (page_rest && my_pwrite(fd, page_buff, page_rest, LSN_OFFSET(addr), log_write_flags)) || mysql_file_sync(fd, MYF(MY_WME))))); translog_syncs++; rc|= (fd > 0 && mysql_file_close(fd, MYF(MY_WME))); if (sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS) { rc|= sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)); translog_syncs++; } if (rc) DBUG_RETURN(1); /* fix the horizon */ log_descriptor.horizon= addr; /* fix the buffer data */ current_page= MAKE_LSN(LSN_FILE_NO(addr), (next_page_offset - TRANSLOG_PAGE_SIZE)); data.addr= &current_page; if ((page= translog_get_page(&data, log_descriptor.buffers->buffer, NULL)) == NULL) DBUG_RETURN(1); if (page != log_descriptor.buffers->buffer) memcpy(log_descriptor.buffers->buffer, page, TRANSLOG_PAGE_SIZE); log_descriptor.bc.buffer->offset= current_page; log_descriptor.bc.buffer->size= LSN_OFFSET(addr) - LSN_OFFSET(current_page); log_descriptor.bc.ptr= log_descriptor.buffers->buffer + log_descriptor.bc.buffer->size; log_descriptor.bc.current_page_fill= log_descriptor.bc.buffer->size; DBUG_RETURN(0); }
O0
c
translog_truncate_log: pushq %rbp movq %rsp, %rbp subq $0x2260, %rsp # imm = 0x2260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2220(%rbp) jmp 0x54561 jmp 0x54563 jmp 0x54565 movq -0x2220(%rbp), %rax sarq $0x20, %rax addl $0x1, %eax movl %eax, -0x223c(%rbp) movl -0x223c(%rbp), %eax movq 0xc26d22(%rip), %rcx # 0xc7b2a8 sarq $0x20, %rcx cmpl %ecx, %eax ja 0x545f8 leaq 0x424a1f(%rip), %rax # 0x478fb4 movl (%rax), %eax movl %eax, -0x225c(%rbp) movl -0x223c(%rbp), %edi leaq -0x210(%rbp), %rsi callq 0x50ba0 movl -0x225c(%rbp), %edi movq %rax, %rcx leaq 0xfe9fa(%rip), %rsi # 0x152fb9 movl $0xd6f, %edx # imm = 0xD6F movl $0x10, %r8d callq 0x58cf0 cmpl $0x0, %eax je 0x545e5 callq 0x51560 movb $0x1, -0x2211(%rbp) jmp 0x5495c jmp 0x545e7 movl -0x223c(%rbp), %eax addl $0x1, %eax movl %eax, -0x223c(%rbp) jmp 0x54579 movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x2220(%rbp), %rax movl %eax, -0x2234(%rbp) movl -0x2234(%rbp), %eax movl -0x2234(%rbp), %ecx subl $0x1, %ecx andl $0x1fff, %ecx # imm = 0x1FFF addl $0x1, %ecx subl %ecx, %eax addl $0x2000, %eax # imm = 0x2000 movl %eax, -0x2234(%rbp) movl -0x2234(%rbp), %eax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x2220(%rbp), %rcx subq %rcx, %rax movl %eax, -0x2238(%rbp) leaq -0x2210(%rbp), %rdi movl -0x2238(%rbp), %eax movl %eax, %edx movl $0xff, %esi callq 0x2a2c0 movq -0x2220(%rbp), %rax sarq $0x20, %rax movl %eax, %edi callq 0x51170 movl %eax, %ecx movl %ecx, -0x2240(%rbp) movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x225d(%rbp) jl 0x54751 movl -0x2240(%rbp), %edx movl -0x2234(%rbp), %eax movl %eax, %ecx leaq 0xfe90c(%rip), %rdi # 0x152fb9 movl $0xd7d, %esi # imm = 0xD7D movl $0xff, %r8d movl $0x10, %r9d callq 0x5ab90 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x225e(%rbp) jne 0x54745 cmpl $0x0, -0x2238(%rbp) je 0x5471d movl -0x2240(%rbp), %edi leaq -0x2210(%rbp), %rsi movl -0x2238(%rbp), %eax movl %eax, %edx movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x2220(%rbp), %rcx movl $0x34, %r8d callq 0xf5c10 movq %rax, %rcx movb $0x1, %al cmpq $0x0, %rcx movb %al, -0x225e(%rbp) jne 0x54745 movl -0x2240(%rbp), %edx leaq 0xfe88f(%rip), %rdi # 0x152fb9 movl $0xd80, %esi # imm = 0xD80 movl $0x10, %ecx callq 0x5a510 cmpl $0x0, %eax setne %al movb %al, -0x225e(%rbp) movb -0x225e(%rbp), %al movb %al, -0x225d(%rbp) movb -0x225d(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x2244(%rbp) movq 0x424cef(%rip), %rax # 0x479458 addq $0x1, %rax movq %rax, 0x424ce4(%rip) # 0x479458 xorl %eax, %eax cmpl $0x0, -0x2240(%rbp) movb %al, -0x225f(%rbp) jle 0x547ad movl -0x2240(%rbp), %edx leaq 0xfe827(%rip), %rdi # 0x152fb9 movl $0xd82, %esi # imm = 0xD82 movl $0x10, %ecx callq 0x51240 cmpl $0x0, %eax setne %al movb %al, -0x225f(%rbp) movb -0x225f(%rbp), %al andb $0x1, %al movzbl %al, %eax orl -0x2244(%rbp), %eax movl %eax, -0x2244(%rbp) cmpq $0x2, 0x269cac(%rip) # 0x2be478 jb 0x54808 movl 0x42617c(%rip), %edx # 0x47a950 leaq 0xfe7de(%rip), %rdi # 0x152fb9 movl $0xd85, %esi # imm = 0xD85 movl $0x30, %ecx callq 0x5a510 orl -0x2244(%rbp), %eax movl %eax, -0x2244(%rbp) movq 0x424c5b(%rip), %rax # 0x479458 addq $0x1, %rax movq %rax, 0x424c50(%rip) # 0x479458 cmpl $0x0, -0x2244(%rbp) je 0x5481f jmp 0x54813 movb $0x1, -0x2211(%rbp) jmp 0x5495c movq -0x2220(%rbp), %rax movq %rax, 0xc26a7b(%rip) # 0xc7b2a8 movq -0x2220(%rbp), %rax sarq $0x20, %rax movl %eax, %eax shlq $0x20, %rax movl -0x2234(%rbp), %ecx subl $0x2000, %ecx # imm = 0x2000 movl %ecx, %ecx orq %rcx, %rax movq %rax, -0x2230(%rbp) leaq -0x2230(%rbp), %rax movq %rax, -0x2258(%rbp) leaq -0x2258(%rbp), %rdi leaq 0x425dee(%rip), %rsi # 0x47a660 addq $0x2f8, %rsi # imm = 0x2F8 xorl %eax, %eax movl %eax, %edx callq 0x53510 movq %rax, -0x2228(%rbp) cmpq $0x0, %rax jne 0x5489d jmp 0x54891 movb $0x1, -0x2211(%rbp) jmp 0x5495c leaq 0x425dbc(%rip), %rax # 0x47a660 addq $0x2f8, %rax # imm = 0x2F8 cmpq %rax, -0x2228(%rbp) je 0x548d2 movq -0x2228(%rbp), %rsi leaq 0x425d9f(%rip), %rdi # 0x47a660 addq $0x2f8, %rdi # imm = 0x2F8 movl $0x2000, %edx # imm = 0x2000 callq 0x2a090 movq -0x2230(%rbp), %rcx movq 0xc269f8(%rip), %rax # 0xc7b2d8 movq %rcx, 0x100010(%rax) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x2220(%rbp), %rax movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF andq -0x2230(%rbp), %rcx subq %rcx, %rax movl %eax, %ecx movq 0xc269c3(%rip), %rax # 0xc7b2d8 movl %ecx, 0x100030(%rax) movq 0xc269b6(%rip), %rax # 0xc7b2d8 movl 0x100030(%rax), %eax movl %eax, %ecx leaq 0x425d2f(%rip), %rax # 0x47a660 addq $0x2f8, %rax # imm = 0x2F8 addq %rcx, %rax movq %rax, 0xc2698f(%rip) # 0xc7b2d0 movq 0xc26990(%rip), %rax # 0xc7b2d8 movl 0x100030(%rax), %eax movw %ax, 0xc2698b(%rip) # 0xc7b2e0 movb $0x0, -0x2211(%rbp) movb -0x2211(%rbp), %al movb %al, -0x2260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x54989 movb -0x2260(%rbp), %al addq $0x2260, %rsp # imm = 0x2260 popq %rbp retq callq 0x2a270 nop
translog_truncate_log: push rbp mov rbp, rsp sub rsp, 2260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2220], rdi jmp short $+2 loc_54561: jmp short $+2 loc_54563: jmp short $+2 loc_54565: mov rax, [rbp+var_2220] sar rax, 20h add eax, 1 mov [rbp+var_223C], eax loc_54579: mov eax, [rbp+var_223C] mov rcx, cs:qword_C7B2A8 sar rcx, 20h cmp eax, ecx ja short loc_545F8 lea rax, key_file_translog mov eax, [rax] mov [rbp+var_225C], eax mov edi, [rbp+var_223C] lea rsi, [rbp+var_210] call translog_filename_by_fileno mov edi, [rbp+var_225C] mov rcx, rax lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0D6Fh mov r8d, 10h call inline_mysql_file_delete_0 cmp eax, 0 jz short loc_545E5 call translog_unlock mov [rbp+var_2211], 1 jmp loc_5495C loc_545E5: jmp short $+2 loc_545E7: mov eax, [rbp+var_223C] add eax, 1 mov [rbp+var_223C], eax jmp short loc_54579 loc_545F8: mov rax, 0FFFFFFFFh and rax, [rbp+var_2220] mov [rbp+var_2234], eax mov eax, [rbp+var_2234] mov ecx, [rbp+var_2234] sub ecx, 1 and ecx, 1FFFh add ecx, 1 sub eax, ecx add eax, 2000h mov [rbp+var_2234], eax mov eax, [rbp+var_2234] mov rcx, 0FFFFFFFFh and rcx, [rbp+var_2220] sub rax, rcx mov [rbp+var_2238], eax lea rdi, [rbp+var_2210] mov eax, [rbp+var_2238] mov edx, eax mov esi, 0FFh call _memset mov rax, [rbp+var_2220] sar rax, 20h mov edi, eax call open_logfile_by_number_no_cache mov ecx, eax mov [rbp+var_2240], ecx mov al, 1 cmp ecx, 0 mov [rbp+var_225D], al jl loc_54751 mov edx, [rbp+var_2240] mov eax, [rbp+var_2234] mov ecx, eax lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0D7Dh mov r8d, 0FFh mov r9d, 10h call inline_mysql_file_chsize_1 mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_225E], al jnz short loc_54745 cmp [rbp+var_2238], 0 jz short loc_5471D mov edi, [rbp+var_2240] lea rsi, [rbp+var_2210] mov eax, [rbp+var_2238] mov edx, eax mov rcx, 0FFFFFFFFh and rcx, [rbp+var_2220] mov r8d, 34h ; '4' call my_pwrite mov rcx, rax mov al, 1 cmp rcx, 0 mov [rbp+var_225E], al jnz short loc_54745 loc_5471D: mov edx, [rbp+var_2240] lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0D80h mov ecx, 10h call inline_mysql_file_sync_3 cmp eax, 0 setnz al mov [rbp+var_225E], al loc_54745: mov al, [rbp+var_225E] mov [rbp+var_225D], al loc_54751: mov al, [rbp+var_225D] and al, 1 movzx eax, al mov [rbp+var_2244], eax mov rax, cs:translog_syncs add rax, 1 mov cs:translog_syncs, rax xor eax, eax cmp [rbp+var_2240], 0 mov [rbp+var_225F], al jle short loc_547AD mov edx, [rbp+var_2240] lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0D82h mov ecx, 10h call inline_mysql_file_close_2 cmp eax, 0 setnz al mov [rbp+var_225F], al loc_547AD: mov al, [rbp+var_225F] and al, 1 movzx eax, al or eax, [rbp+var_2244] mov [rbp+var_2244], eax cmp cs:sync_log_dir, 2 jb short loc_54808 mov edx, cs:dword_47A950 lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0D85h mov ecx, 30h ; '0' call inline_mysql_file_sync_3 or eax, [rbp+var_2244] mov [rbp+var_2244], eax mov rax, cs:translog_syncs add rax, 1 mov cs:translog_syncs, rax loc_54808: cmp [rbp+var_2244], 0 jz short loc_5481F jmp short $+2 loc_54813: mov [rbp+var_2211], 1 jmp loc_5495C loc_5481F: mov rax, [rbp+var_2220] mov cs:qword_C7B2A8, rax mov rax, [rbp+var_2220] sar rax, 20h mov eax, eax shl rax, 20h mov ecx, [rbp+var_2234] sub ecx, 2000h mov ecx, ecx or rax, rcx mov [rbp+var_2230], rax lea rax, [rbp+var_2230] mov [rbp+var_2258], rax lea rdi, [rbp+var_2258] lea rsi, log_descriptor add rsi, 2F8h xor eax, eax mov edx, eax call translog_get_page mov [rbp+var_2228], rax cmp rax, 0 jnz short loc_5489D jmp short $+2 loc_54891: mov [rbp+var_2211], 1 jmp loc_5495C loc_5489D: lea rax, log_descriptor add rax, 2F8h cmp [rbp+var_2228], rax jz short loc_548D2 mov rsi, [rbp+var_2228] lea rdi, log_descriptor add rdi, 2F8h mov edx, 2000h call _memcpy loc_548D2: mov rcx, [rbp+var_2230] mov rax, cs:qword_C7B2D8 mov [rax+100010h], rcx mov rax, 0FFFFFFFFh and rax, [rbp+var_2220] mov rcx, 0FFFFFFFFh and rcx, [rbp+var_2230] sub rax, rcx mov ecx, eax mov rax, cs:qword_C7B2D8 mov dword ptr ds:safe_hash_change[rax], ecx mov rax, cs:qword_C7B2D8 mov eax, dword ptr ds:safe_hash_change[rax] mov ecx, eax lea rax, log_descriptor add rax, 2F8h add rax, rcx mov cs:qword_C7B2D0, rax mov rax, cs:qword_C7B2D8 mov eax, dword ptr ds:safe_hash_change[rax] mov cs:word_C7B2E0, ax mov [rbp+var_2211], 0 loc_5495C: mov al, [rbp+var_2211] mov [rbp+var_2260], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_54989 mov al, [rbp+var_2260] add rsp, 2260h pop rbp retn loc_54989: call ___stack_chk_fail
char translog_truncate_log(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax long long v7; // rdx long long v8; // rcx int v9; // r8d int v10; // r9d bool v12; // [rsp+1h] [rbp-225Fh] bool v13; // [rsp+2h] [rbp-225Eh] char v14; // [rsp+3h] [rbp-225Dh] unsigned int v15; // [rsp+4h] [rbp-225Ch] unsigned long long *v16; // [rsp+8h] [rbp-2258h] BYREF int v17; // [rsp+1Ch] [rbp-2244h] signed int v18; // [rsp+20h] [rbp-2240h] unsigned int i; // [rsp+24h] [rbp-223Ch] unsigned int v20; // [rsp+28h] [rbp-2238h] unsigned int v21; // [rsp+2Ch] [rbp-2234h] unsigned long long v22; // [rsp+30h] [rbp-2230h] BYREF long long *page; // [rsp+38h] [rbp-2228h] long long v24; // [rsp+40h] [rbp-2220h] _BYTE v26[8192]; // [rsp+50h] [rbp-2210h] BYREF _BYTE v27[520]; // [rsp+2050h] [rbp-210h] BYREF unsigned long long v28; // [rsp+2258h] [rbp-8h] v28 = __readfsqword(0x28u); v24 = a1; for ( i = HIDWORD(a1) + 1; i <= HIDWORD(qword_C7B2A8); ++i ) { v15 = key_file_translog; v6 = translog_filename_by_fileno(i, (long long)v27, a3, qword_C7B2A8 >> 32, a5, a6); if ( (unsigned int)inline_mysql_file_delete_0( v15, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3439LL, v6, 16LL) ) { translog_unlock(); return 1; } } v21 = v24 - ((((_WORD)v24 - 1) & 0x1FFF) + 1) + 0x2000; v20 = 0x2000 - ((((_WORD)v24 - 1) & 0x1FFF) + 1); memset(v26, 255LL, v20); v18 = open_logfile_by_number_no_cache(HIDWORD(v24), 255LL, v7, v8, v9, v10); v14 = 1; if ( v18 >= 0 ) { v13 = 1; if ( !(unsigned int)inline_mysql_file_chsize_1( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3453LL, (unsigned int)v18, v21, 255LL, 16LL) ) { if ( !v20 || (v13 = 1, !my_pwrite((unsigned int)v18, v26, v20, (unsigned int)v24, 52LL)) ) v13 = (unsigned int)inline_mysql_file_sync_3( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3456LL, (unsigned int)v18, 16LL) != 0; } v14 = v13; } v17 = v14 & 1; ++translog_syncs; v12 = 0; if ( v18 > 0 ) v12 = (unsigned int)inline_mysql_file_close_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xD82u, v18, 16LL) != 0; v17 |= v12; if ( (unsigned long long)sync_log_dir >= 2 ) { v17 |= inline_mysql_file_sync_3( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3461LL, (unsigned int)dword_47A950, 48LL); ++translog_syncs; } if ( v17 ) return 1; qword_C7B2A8 = v24; v22 = (v21 - 0x2000) | ((unsigned long long)HIDWORD(v24) << 32); v16 = &v22; page = (long long *)translog_get_page((long long **)&v16, (long long)&log_descriptor[95], 0LL); if ( !page ) return 1; if ( page != &log_descriptor[95] ) memcpy(&log_descriptor[95], page, 0x2000LL); *(_QWORD *)(qword_C7B2D8 + 1048592) = v22; *(_DWORD *)((char *)safe_hash_change + qword_C7B2D8) = v24 - v22; qword_C7B2D0 = (long long)&log_descriptor[95] + *(unsigned int *)((char *)safe_hash_change + qword_C7B2D8); word_C7B2E0 = *(_DWORD *)((char *)safe_hash_change + qword_C7B2D8); return 0; }
translog_truncate_log: PUSH RBP MOV RBP,RSP SUB RSP,0x2260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2220],RDI JMP 0x00154561 LAB_00154561: JMP 0x00154563 LAB_00154563: JMP 0x00154565 LAB_00154565: MOV RAX,qword ptr [RBP + -0x2220] SAR RAX,0x20 ADD EAX,0x1 MOV dword ptr [RBP + -0x223c],EAX LAB_00154579: MOV EAX,dword ptr [RBP + -0x223c] MOV RCX,qword ptr [0x00d7b2a8] SAR RCX,0x20 CMP EAX,ECX JA 0x001545f8 LEA RAX,[0x578fb4] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x225c],EAX MOV EDI,dword ptr [RBP + -0x223c] LEA RSI,[RBP + -0x210] CALL 0x00150ba0 MOV EDI,dword ptr [RBP + -0x225c] MOV RCX,RAX LEA RSI,[0x252fb9] MOV EDX,0xd6f MOV R8D,0x10 CALL 0x00158cf0 CMP EAX,0x0 JZ 0x001545e5 CALL 0x00151560 MOV byte ptr [RBP + -0x2211],0x1 JMP 0x0015495c LAB_001545e5: JMP 0x001545e7 LAB_001545e7: MOV EAX,dword ptr [RBP + -0x223c] ADD EAX,0x1 MOV dword ptr [RBP + -0x223c],EAX JMP 0x00154579 LAB_001545f8: MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x2220] MOV dword ptr [RBP + -0x2234],EAX MOV EAX,dword ptr [RBP + -0x2234] MOV ECX,dword ptr [RBP + -0x2234] SUB ECX,0x1 AND ECX,0x1fff ADD ECX,0x1 SUB EAX,ECX ADD EAX,0x2000 MOV dword ptr [RBP + -0x2234],EAX MOV EAX,dword ptr [RBP + -0x2234] MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x2220] SUB RAX,RCX MOV dword ptr [RBP + -0x2238],EAX LEA RDI,[RBP + -0x2210] MOV EAX,dword ptr [RBP + -0x2238] MOV EDX,EAX MOV ESI,0xff CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x2220] SAR RAX,0x20 MOV EDI,EAX CALL 0x00151170 MOV ECX,EAX MOV dword ptr [RBP + -0x2240],ECX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x225d],AL JL 0x00154751 MOV EDX,dword ptr [RBP + -0x2240] MOV EAX,dword ptr [RBP + -0x2234] MOV ECX,EAX LEA RDI,[0x252fb9] MOV ESI,0xd7d MOV R8D,0xff MOV R9D,0x10 CALL 0x0015ab90 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x225e],AL JNZ 0x00154745 CMP dword ptr [RBP + -0x2238],0x0 JZ 0x0015471d MOV EDI,dword ptr [RBP + -0x2240] LEA RSI,[RBP + -0x2210] MOV EAX,dword ptr [RBP + -0x2238] MOV EDX,EAX MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x2220] MOV R8D,0x34 CALL 0x001f5c10 MOV RCX,RAX MOV AL,0x1 CMP RCX,0x0 MOV byte ptr [RBP + -0x225e],AL JNZ 0x00154745 LAB_0015471d: MOV EDX,dword ptr [RBP + -0x2240] LEA RDI,[0x252fb9] MOV ESI,0xd80 MOV ECX,0x10 CALL 0x0015a510 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x225e],AL LAB_00154745: MOV AL,byte ptr [RBP + -0x225e] MOV byte ptr [RBP + -0x225d],AL LAB_00154751: MOV AL,byte ptr [RBP + -0x225d] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x2244],EAX MOV RAX,qword ptr [0x00579458] ADD RAX,0x1 MOV qword ptr [0x00579458],RAX XOR EAX,EAX CMP dword ptr [RBP + -0x2240],0x0 MOV byte ptr [RBP + -0x225f],AL JLE 0x001547ad MOV EDX,dword ptr [RBP + -0x2240] LEA RDI,[0x252fb9] MOV ESI,0xd82 MOV ECX,0x10 CALL 0x00151240 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x225f],AL LAB_001547ad: MOV AL,byte ptr [RBP + -0x225f] AND AL,0x1 MOVZX EAX,AL OR EAX,dword ptr [RBP + -0x2244] MOV dword ptr [RBP + -0x2244],EAX CMP qword ptr [0x003be478],0x2 JC 0x00154808 MOV EDX,dword ptr [0x0057a950] LEA RDI,[0x252fb9] MOV ESI,0xd85 MOV ECX,0x30 CALL 0x0015a510 OR EAX,dword ptr [RBP + -0x2244] MOV dword ptr [RBP + -0x2244],EAX MOV RAX,qword ptr [0x00579458] ADD RAX,0x1 MOV qword ptr [0x00579458],RAX LAB_00154808: CMP dword ptr [RBP + -0x2244],0x0 JZ 0x0015481f JMP 0x00154813 LAB_00154813: MOV byte ptr [RBP + -0x2211],0x1 JMP 0x0015495c LAB_0015481f: MOV RAX,qword ptr [RBP + -0x2220] MOV qword ptr [0x00d7b2a8],RAX MOV RAX,qword ptr [RBP + -0x2220] SAR RAX,0x20 MOV EAX,EAX SHL RAX,0x20 MOV ECX,dword ptr [RBP + -0x2234] SUB ECX,0x2000 MOV ECX,ECX OR RAX,RCX MOV qword ptr [RBP + -0x2230],RAX LEA RAX,[RBP + -0x2230] MOV qword ptr [RBP + -0x2258],RAX LEA RDI,[RBP + -0x2258] LEA RSI,[0x57a660] ADD RSI,0x2f8 XOR EAX,EAX MOV EDX,EAX CALL 0x00153510 MOV qword ptr [RBP + -0x2228],RAX CMP RAX,0x0 JNZ 0x0015489d JMP 0x00154891 LAB_00154891: MOV byte ptr [RBP + -0x2211],0x1 JMP 0x0015495c LAB_0015489d: LEA RAX,[0x57a660] ADD RAX,0x2f8 CMP qword ptr [RBP + -0x2228],RAX JZ 0x001548d2 MOV RSI,qword ptr [RBP + -0x2228] LEA RDI,[0x57a660] ADD RDI,0x2f8 MOV EDX,0x2000 CALL 0x0012a090 LAB_001548d2: MOV RCX,qword ptr [RBP + -0x2230] MOV RAX,qword ptr [0x00d7b2d8] MOV qword ptr [RAX + 0x100010],RCX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x2220] MOV RCX,0xffffffff AND RCX,qword ptr [RBP + -0x2230] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [0x00d7b2d8] MOV dword ptr [RAX + 0x100030],ECX MOV RAX,qword ptr [0x00d7b2d8] MOV EAX,dword ptr [RAX + 0x100030] MOV ECX,EAX LEA RAX,[0x57a660] ADD RAX,0x2f8 ADD RAX,RCX MOV qword ptr [0x00d7b2d0],RAX MOV RAX,qword ptr [0x00d7b2d8] MOV EAX,dword ptr [RAX + 0x100030] MOV word ptr [0x00d7b2e0],AX MOV byte ptr [RBP + -0x2211],0x0 LAB_0015495c: MOV AL,byte ptr [RBP + -0x2211] MOV byte ptr [RBP + -0x2260],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00154989 MOV AL,byte ptr [RBP + -0x2260] ADD RSP,0x2260 POP RBP RET LAB_00154989: CALL 0x0012a270
int8 translog_truncate_log(ulong param_1) { int4 uVar1; int iVar2; uint uVar3; int8 uVar4; long lVar5; long in_FS_OFFSET; bool local_2267; bool local_2266; bool local_2265; ulong *local_2260 [2]; uint local_224c; int local_2248; uint local_2244; uint local_2240; int local_223c; ulong local_2238; int *local_2230; ulong local_2228; int1 local_2219; int1 local_2218 [8192]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2244 = (uint)(param_1 >> 0x20); local_2228 = param_1; do { uVar1 = key_file_translog; local_2244 = local_2244 + 1; if ((uint)(DAT_00d7b2a8 >> 0x20) < local_2244) { iVar2 = (int)local_2228; local_223c = (iVar2 - ((iVar2 - 1U & 0x1fff) + 1)) + 0x2000; local_2240 = local_223c - iVar2; memset(local_2218,0xff,(ulong)local_2240); local_2248 = open_logfile_by_number_no_cache((long)local_2228 >> 0x20 & 0xffffffff); local_2265 = true; if (-1 < local_2248) { iVar2 = inline_mysql_file_chsize ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xd7d,local_2248,local_223c,0xff,0x10); local_2266 = true; if (iVar2 == 0) { if (local_2240 != 0) { lVar5 = my_pwrite(local_2248,local_2218,local_2240,local_2228 & 0xffffffff,0x34); local_2266 = true; if (lVar5 != 0) goto LAB_00154745; } iVar2 = inline_mysql_file_sync ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c" ,0xd80,local_2248,0x10); local_2266 = iVar2 != 0; } LAB_00154745: local_2265 = local_2266; } local_224c = (uint)local_2265; translog_syncs = translog_syncs + 1; local_2267 = false; if (0 < local_2248) { iVar2 = inline_mysql_file_close ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xd82,local_2248,0x10); local_2267 = iVar2 != 0; } local_224c = local_2267 | local_224c; if (1 < sync_log_dir) { uVar3 = inline_mysql_file_sync ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xd85,DAT_0057a950,0x30); local_224c = uVar3 | local_224c; translog_syncs = translog_syncs + 1; } if (local_224c == 0) { DAT_00d7b2a8 = local_2228; local_2238 = ((long)local_2228 >> 0x20) << 0x20 | (ulong)(local_223c - 0x2000); local_2260[0] = &local_2238; local_2230 = (int *)translog_get_page(local_2260,&DAT_0057a958,0); if (local_2230 == (int *)0x0) { local_2219 = 1; } else { if (local_2230 != &DAT_0057a958) { memcpy(&DAT_0057a958,local_2230,0x2000); } *(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d7b2d8 + 7) = local_2238; *(int *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d7b2d8 + 0x27) = (int)local_2228 - (int)local_2238; DAT_00d7b2d0 = &DAT_0057a958 + *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d7b2d8 + 0x27); DAT_00d7b2e0 = (int2) *(int4 *)(Elf64_Ehdr_00100000.e_ident_pad + DAT_00d7b2d8 + 0x27); local_2219 = 0; } } else { local_2219 = 1; } goto LAB_0015495c; } uVar4 = translog_filename_by_fileno(local_2244,local_218); iVar2 = inline_mysql_file_delete (uVar1, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xd6f,uVar4,0x10); } while (iVar2 == 0); translog_unlock(); local_2219 = 1; LAB_0015495c: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_2219); }
11,413
stbi__skip(stbi__context*, int)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__skip(stbi__context *s, int n) { if (n == 0) return; // already there! if (n < 0) { s->img_buffer = s->img_buffer_end; return; } if (s->io.read) { int blen = (int) (s->img_buffer_end - s->img_buffer); if (blen < n) { s->img_buffer = s->img_buffer_end; (s->io.skip)(s->io_user_data, n - blen); return; } } s->img_buffer += n; }
O0
c
stbi__skip(stbi__context*, int): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movl %esi, 0xc(%rsp) cmpl $0x0, 0xc(%rsp) jne 0x19de9 jmp 0x19e97 cmpl $0x0, 0xc(%rsp) jge 0x19e0d movq 0x10(%rsp), %rax movq 0xc8(%rax), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc0(%rax) jmp 0x19e97 movq 0x10(%rsp), %rax cmpq $0x0, 0x10(%rax) je 0x19e7a movq 0x10(%rsp), %rax movq 0xc8(%rax), %rax movq 0x10(%rsp), %rcx movq 0xc0(%rcx), %rcx subq %rcx, %rax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0xc(%rsp), %eax jge 0x19e78 movq 0x10(%rsp), %rax movq 0xc8(%rax), %rcx movq 0x10(%rsp), %rax movq %rcx, 0xc0(%rax) movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movq 0x10(%rsp), %rcx movq 0x28(%rcx), %rdi movl 0xc(%rsp), %esi subl 0x8(%rsp), %esi callq *%rax jmp 0x19e97 jmp 0x19e7a movl 0xc(%rsp), %edx movq 0x10(%rsp), %rax movq 0xc0(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0xc0(%rax) addq $0x18, %rsp retq nopl (%rax)
_ZL10stbi__skipP13stbi__contexti: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_C], esi cmp [rsp+18h+var_C], 0 jnz short loc_19DE9 jmp loc_19E97 loc_19DE9: cmp [rsp+18h+var_C], 0 jge short loc_19E0D mov rax, [rsp+18h+var_8] mov rcx, [rax+0C8h] mov rax, [rsp+18h+var_8] mov [rax+0C0h], rcx jmp loc_19E97 loc_19E0D: mov rax, [rsp+18h+var_8] cmp qword ptr [rax+10h], 0 jz short loc_19E7A mov rax, [rsp+18h+var_8] mov rax, [rax+0C8h] mov rcx, [rsp+18h+var_8] mov rcx, [rcx+0C0h] sub rax, rcx mov [rsp+18h+var_10], eax mov eax, [rsp+18h+var_10] cmp eax, [rsp+18h+var_C] jge short loc_19E78 mov rax, [rsp+18h+var_8] mov rcx, [rax+0C8h] mov rax, [rsp+18h+var_8] mov [rax+0C0h], rcx mov rax, [rsp+18h+var_8] mov rax, [rax+18h] mov rcx, [rsp+18h+var_8] mov rdi, [rcx+28h] mov esi, [rsp+18h+var_C] sub esi, [rsp+18h+var_10] call rax jmp short loc_19E97 loc_19E78: jmp short $+2 loc_19E7A: mov edx, [rsp+18h+var_C] mov rax, [rsp+18h+var_8] mov rcx, [rax+0C0h] movsxd rdx, edx add rcx, rdx mov [rax+0C0h], rcx loc_19E97: add rsp, 18h retn
long long stbi__skip(long long a1, int a2) { long long result; // rax int v3; // [rsp+8h] [rbp-10h] if ( a2 ) { if ( a2 >= 0 ) { if ( *(_QWORD *)(a1 + 16) && (v3 = *(_QWORD *)(a1 + 200) - *(_QWORD *)(a1 + 192), v3 < a2) ) { *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); return (*(long long ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(a2 - v3)); } else { result = a1; *(_QWORD *)(a1 + 192) += a2; } } else { result = a1; *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); } } return result; }
stbi__skip: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],ESI CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00119de9 JMP 0x00119e97 LAB_00119de9: CMP dword ptr [RSP + 0xc],0x0 JGE 0x00119e0d MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc0],RCX JMP 0x00119e97 LAB_00119e0d: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00119e7a MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0xc8] MOV RCX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RCX + 0xc0] SUB RAX,RCX MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0xc] JGE 0x00119e78 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RCX + 0x28] MOV ESI,dword ptr [RSP + 0xc] SUB ESI,dword ptr [RSP + 0x8] CALL RAX JMP 0x00119e97 LAB_00119e78: JMP 0x00119e7a LAB_00119e7a: MOV EDX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0xc0] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0xc0],RCX LAB_00119e97: ADD RSP,0x18 RET
/* stbi__skip(stbi__context*, int) */ void stbi__skip(stbi__context *param_1,int param_2) { int iVar1; if (param_2 != 0) { if (param_2 < 0) { *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); } else if ((*(long *)(param_1 + 0x10) == 0) || (iVar1 = (int)*(int8 *)(param_1 + 200) - (int)*(int8 *)(param_1 + 0xc0), param_2 <= iVar1)) { *(long *)(param_1 + 0xc0) = *(long *)(param_1 + 0xc0) + (long)param_2; } else { *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28),param_2 - iVar1); } } return; }
11,414
interceptDeviceCommand(char const*)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static PFN_vkVoidFunction interceptDeviceCommand(const char *pName) { static const struct { const char *name; PFN_vkVoidFunction proc; } coreDeviceCommands[] = { { "vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(VK_LAYER_PYROVEIL_vkGetDeviceProcAddr) }, { "vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice) }, { "vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(CreateShaderModule) }, { "vkDestroyShaderModule", reinterpret_cast<PFN_vkVoidFunction>(DestroyShaderModule) }, { "vkCreateShadersEXT", reinterpret_cast<PFN_vkVoidFunction>(CreateShadersEXT) }, { "vkCreateGraphicsPipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateGraphicsPipelines) }, { "vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateComputePipelines) }, { "vkCreateRayTracingPipelinesKHR", reinterpret_cast<PFN_vkVoidFunction>(CreateRayTracingPipelinesKHR) }, }; for (auto &cmd : coreDeviceCommands) if (strcmp(cmd.name, pName) == 0) return cmd.proc; return nullptr; }
O0
cpp
interceptDeviceCommand(char const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) leaq 0xaf0e0d(%rip), %rax # 0xc77a30 movq %rax, -0x18(%rbp) leaq 0xaf0e02(%rip), %rax # 0xc77a30 movq %rax, -0x20(%rbp) leaq 0xaf0df7(%rip), %rax # 0xc77a30 addq $0x80, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x186c88 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi callq 0x176050 cmpl $0x0, %eax jne 0x186c78 movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x186c90 jmp 0x186c7a movq -0x20(%rbp), %rax addq $0x10, %rax movq %rax, -0x20(%rbp) jmp 0x186c43 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ZL22interceptDeviceCommandPKc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi lea rax, _ZZL22interceptDeviceCommandPKcE18coreDeviceCommands; interceptDeviceCommand(char const*)::coreDeviceCommands mov [rbp+var_18], rax lea rax, _ZZL22interceptDeviceCommandPKcE18coreDeviceCommands; interceptDeviceCommand(char const*)::coreDeviceCommands mov [rbp+var_20], rax lea rax, _ZZL22interceptDeviceCommandPKcE18coreDeviceCommands; interceptDeviceCommand(char const*)::coreDeviceCommands add rax, 80h mov [rbp+var_28], rax loc_186C43: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jz short loc_186C88 mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rdi, [rax] mov rsi, [rbp+var_10] call _strcmp cmp eax, 0 jnz short loc_186C78 mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_186C90 loc_186C78: jmp short $+2 loc_186C7A: mov rax, [rbp+var_20] add rax, 10h mov [rbp+var_20], rax jmp short loc_186C43 loc_186C88: mov [rbp+var_8], 0 loc_186C90: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
char * interceptDeviceCommand(const char *a1) { char **i; // [rsp+10h] [rbp-20h] for ( i = &interceptDeviceCommand(char const*)::coreDeviceCommands; i != &interceptDeviceCommand(char const*)::coreDeviceCommands + 16; i += 2 ) { if ( !(unsigned int)strcmp(*i, a1) ) return i[1]; } return 0LL; }
11,415
interceptDeviceCommand(char const*)
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
static PFN_vkVoidFunction interceptDeviceCommand(const char *pName) { static const struct { const char *name; PFN_vkVoidFunction proc; } coreDeviceCommands[] = { { "vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(VK_LAYER_PYROVEIL_vkGetDeviceProcAddr) }, { "vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice) }, { "vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(CreateShaderModule) }, { "vkDestroyShaderModule", reinterpret_cast<PFN_vkVoidFunction>(DestroyShaderModule) }, { "vkCreateShadersEXT", reinterpret_cast<PFN_vkVoidFunction>(CreateShadersEXT) }, { "vkCreateGraphicsPipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateGraphicsPipelines) }, { "vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(CreateComputePipelines) }, { "vkCreateRayTracingPipelinesKHR", reinterpret_cast<PFN_vkVoidFunction>(CreateRayTracingPipelinesKHR) }, }; for (auto &cmd : coreDeviceCommands) if (strcmp(cmd.name, pName) == 0) return cmd.proc; return nullptr; }
O2
cpp
interceptDeviceCommand(char const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %r14 xorl %ebx, %ebx leaq 0x49fb0a(%rip), %r15 # 0x54a880 xorl %r12d, %r12d cmpq $0x80, %r12 je 0xaad9b movq (%r12,%r15), %rdi movq %r14, %rsi callq 0xa4260 addq $0x10, %r12 testl %eax, %eax jne 0xaad79 movq -0x8(%r12,%r15), %rbx movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZL22interceptDeviceCommandPKc: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdi xor ebx, ebx lea r15, _ZZL22interceptDeviceCommandPKcE18coreDeviceCommands; interceptDeviceCommand(char const*)::coreDeviceCommands xor r12d, r12d loc_AAD79: cmp r12, 80h jz short loc_AAD9B mov rdi, [r12+r15] mov rsi, r14 call _strcmp add r12, 10h test eax, eax jnz short loc_AAD79 mov rbx, [r12+r15-8] loc_AAD9B: mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * interceptDeviceCommand(const char *a1) { long long v1; // rbx long long v2; // r12 int v3; // eax v1 = 0LL; v2 = 0LL; while ( v2 != 16 ) { v3 = strcmp((&interceptDeviceCommand(char const*)::coreDeviceCommands)[v2], a1); v2 += 2LL; if ( !v3 ) return (&interceptDeviceCommand(char const*)::coreDeviceCommands)[v2 - 1]; } return (char *)v1; }
interceptDeviceCommand: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDI XOR EBX,EBX LEA R15,[0x64a880] XOR R12D,R12D LAB_001aad79: CMP R12,0x80 JZ 0x001aad9b MOV RDI,qword ptr [R12 + R15*0x1] MOV RSI,R14 CALL 0x001a4260 ADD R12,0x10 TEST EAX,EAX JNZ 0x001aad79 MOV RBX,qword ptr [R12 + R15*0x1 + -0x8] LAB_001aad9b: MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* interceptDeviceCommand(char const*) */ int8 interceptDeviceCommand(char *param_1) { long lVar1; int iVar2; long lVar3; lVar1 = 0; do { lVar3 = lVar1; if (lVar3 == 0x80) { return 0; } iVar2 = strcmp(*(char **)((long)&interceptDeviceCommand(char_const*)::coreDeviceCommands + lVar3 ),param_1); lVar1 = lVar3 + 0x10; } while (iVar2 != 0); return *(int8 *)((long)&PTR_VK_LAYER_PYROVEIL_vkGetDeviceProcAddr_0064a888 + lVar3); }
11,416
check_longlong
eloqsql/strings/my_vsnprintf.c
static const char *check_longlong(const char *fmt, uint *have_longlong) { *have_longlong= 0; if (*fmt == 'l') { fmt++; if (*fmt != 'l') *have_longlong= (sizeof(long) == sizeof(longlong)); else { fmt++; *have_longlong= 1; } } else if (*fmt == 'z') { fmt++; *have_longlong= (sizeof(size_t) == sizeof(longlong)); } else if (*fmt == 'p') *have_longlong= (sizeof(void *) == sizeof(longlong)); return fmt; }
O0
c
check_longlong: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movl $0x0, (%rax) movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x6c, %eax jne 0xc738e movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x6c, %eax je 0xc7376 movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xc738c movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xc73cc movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x7a, %eax jne 0xc73b2 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xc73ca movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x70, %eax jne 0xc73c8 movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xc73ca jmp 0xc73cc movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
check_longlong: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov dword ptr [rax], 0 mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 6Ch ; 'l' jnz short loc_C738E mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 6Ch ; 'l' jz short loc_C7376 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_C738C loc_C7376: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov dword ptr [rax], 1 loc_C738C: jmp short loc_C73CC loc_C738E: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 7Ah ; 'z' jnz short loc_C73B2 mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_C73CA loc_C73B2: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 70h ; 'p' jnz short loc_C73C8 mov rax, [rbp+var_10] mov dword ptr [rax], 1 loc_C73C8: jmp short $+2 loc_C73CA: jmp short $+2 loc_C73CC: mov rax, [rbp+var_8] pop rbp retn
_BYTE * check_longlong(_BYTE *a1, _DWORD *a2) { _BYTE *v3; // [rsp+8h] [rbp-8h] v3 = a1; *a2 = 0; switch ( *a1 ) { case 'l': v3 = a1 + 1; if ( a1[1] == 108 ) v3 = a1 + 2; *a2 = 1; break; case 'z': v3 = a1 + 1; *a2 = 1; break; case 'p': *a2 = 1; break; } return v3; }
check_longlong: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x6c JNZ 0x001c738e MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x6c JZ 0x001c7376 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x001c738c LAB_001c7376: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 LAB_001c738c: JMP 0x001c73cc LAB_001c738e: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7a JNZ 0x001c73b2 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x001c73ca LAB_001c73b2: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x70 JNZ 0x001c73c8 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 LAB_001c73c8: JMP 0x001c73ca LAB_001c73ca: JMP 0x001c73cc LAB_001c73cc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * check_longlong(char *param_1,int4 *param_2) { char *local_10; *param_2 = 0; if (*param_1 == 'l') { local_10 = param_1 + 1; if (*local_10 == 'l') { local_10 = param_1 + 2; *param_2 = 1; } else { *param_2 = 1; } } else if (*param_1 == 'z') { local_10 = param_1 + 1; *param_2 = 1; } else { local_10 = param_1; if (*param_1 == 'p') { *param_2 = 1; } } return local_10; }
11,417
string_from[abi:cxx11](llama_context const*, llama_batch const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const struct llama_context * ctx, const struct llama_batch & batch) { std::stringstream buf; buf << "[ "; bool first = true; for (int i = 0; i < batch.n_tokens; ++i) { if (!first) { buf << ", "; } else { first = false; } auto detokenized = common_token_to_piece(ctx, batch.token[i]); detokenized.erase( std::remove_if( detokenized.begin(), detokenized.end(), [](const unsigned char c) { return !std::isprint(c); }), detokenized.end()); buf << "\n" << std::to_string(i) << ", token '" << detokenized << "'" << ", pos " << std::to_string(batch.pos[i]) << ", n_seq_id " << std::to_string(batch.n_seq_id[i]) << ", seq_id " << std::to_string(batch.seq_id[i][0]) << ", logits " << std::to_string(batch.logits[i]); } buf << " ]"; return buf.str(); }
O0
cpp
string_from[abi:cxx11](llama_context const*, llama_batch const&): subq $0x348, %rsp # imm = 0x348 movq %rdi, 0x80(%rsp) movq %rdi, %rax movq %rax, 0x88(%rsp) movq %rdi, 0x340(%rsp) movq %rsi, 0x338(%rsp) movq %rdx, 0x330(%rsp) leaq 0x1a8(%rsp), %rdi callq 0x50420 leaq 0x1b8(%rsp), %rdi leaq 0x15d1ab(%rip), %rsi # 0x1b69b9 callq 0x50850 jmp 0x59815 movb $0x1, 0x19b(%rsp) movl $0x0, 0x194(%rsp) movl 0x194(%rsp), %eax movq 0x330(%rsp), %rcx cmpl (%rcx), %eax jge 0x59ca4 testb $0x1, 0x19b(%rsp) jne 0x5987a leaq 0x1b8(%rsp), %rdi leaq 0x15db1b(%rip), %rsi # 0x1b7373 callq 0x50850 jmp 0x5985f jmp 0x59882 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59cee movb $0x0, 0x19b(%rsp) movq 0x338(%rsp), %rsi movq 0x330(%rsp), %rax movq 0x8(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %edx leaq 0x170(%rsp), %rdi movl $0x1, %ecx callq 0x59700 jmp 0x598b5 leaq 0x170(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x506e0 movq 0x70(%rsp), %rdi movq %rax, 0x158(%rsp) callq 0x507a0 movq %rax, 0x150(%rsp) movq 0x158(%rsp), %rdi movq 0x150(%rsp), %rsi callq 0x59d10 movq %rax, 0x78(%rsp) jmp 0x598fd movq 0x78(%rsp), %rax movq %rax, 0x160(%rsp) leaq 0x168(%rsp), %rdi leaq 0x160(%rsp), %rsi callq 0x641e0 leaq 0x170(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x507a0 movq %rax, 0x138(%rsp) leaq 0x140(%rsp), %rdi leaq 0x138(%rsp), %rsi callq 0x641e0 movq 0x60(%rsp), %rdi movq 0x168(%rsp), %rsi movq 0x140(%rsp), %rdx callq 0x50630 movq %rax, 0x68(%rsp) jmp 0x5996f movq 0x68(%rsp), %rax movq %rax, 0x130(%rsp) leaq 0x1b8(%rsp), %rdi leaq 0x15cefd(%rip), %rsi # 0x1b6888 callq 0x50850 movq %rax, 0x58(%rsp) jmp 0x59997 movl 0x194(%rsp), %esi leaq 0x110(%rsp), %rdi callq 0x64080 jmp 0x599ad movq 0x58(%rsp), %rdi leaq 0x110(%rsp), %rsi callq 0x50410 movq %rax, 0x50(%rsp) jmp 0x599c6 movq 0x50(%rsp), %rdi leaq 0x15cfed(%rip), %rsi # 0x1b69bf callq 0x50850 movq %rax, 0x48(%rsp) jmp 0x599de movq 0x48(%rsp), %rdi leaq 0x170(%rsp), %rsi callq 0x50410 movq %rax, 0x40(%rsp) jmp 0x599f7 movq 0x40(%rsp), %rdi leaq 0x15fe75(%rip), %rsi # 0x1b9878 callq 0x50850 movq %rax, 0x38(%rsp) jmp 0x59a0f movq 0x38(%rsp), %rdi leaq 0x15cfae(%rip), %rsi # 0x1b69c9 callq 0x50850 movq %rax, 0x30(%rsp) jmp 0x59a27 movq 0x330(%rsp), %rax movq 0x18(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %esi leaq 0xf0(%rsp), %rdi callq 0x64080 jmp 0x59a4d movq 0x30(%rsp), %rdi leaq 0xf0(%rsp), %rsi callq 0x50410 movq %rax, 0x28(%rsp) jmp 0x59a66 movq 0x28(%rsp), %rdi leaq 0x15cf5e(%rip), %rsi # 0x1b69d0 callq 0x50850 movq %rax, 0x20(%rsp) jmp 0x59a7e movq 0x330(%rsp), %rax movq 0x20(%rax), %rax movslq 0x194(%rsp), %rcx movl (%rax,%rcx,4), %esi leaq 0xd0(%rsp), %rdi callq 0x64080 jmp 0x59aa4 movq 0x20(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x50410 movq %rax, 0x18(%rsp) jmp 0x59abd movq 0x18(%rsp), %rdi leaq 0x15cf13(%rip), %rsi # 0x1b69dc callq 0x50850 movq %rax, 0x10(%rsp) jmp 0x59ad5 movq 0x330(%rsp), %rax movq 0x28(%rax), %rax movslq 0x194(%rsp), %rcx movq (%rax,%rcx,8), %rax movl (%rax), %esi leaq 0xb0(%rsp), %rdi callq 0x64080 jmp 0x59afe movq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x50410 movq %rax, 0x8(%rsp) jmp 0x59b17 movq 0x8(%rsp), %rdi leaq 0x15cec3(%rip), %rsi # 0x1b69e6 callq 0x50850 movq %rax, (%rsp) jmp 0x59b2e movq 0x330(%rsp), %rax movq 0x30(%rax), %rax movslq 0x194(%rsp), %rcx movsbl (%rax,%rcx), %esi leaq 0x90(%rsp), %rdi callq 0x64080 jmp 0x59b55 movq (%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x50410 jmp 0x59b68 leaq 0x90(%rsp), %rdi callq 0x510e0 leaq 0xb0(%rsp), %rdi callq 0x510e0 leaq 0xd0(%rsp), %rdi callq 0x510e0 leaq 0xf0(%rsp), %rdi callq 0x510e0 leaq 0x110(%rsp), %rdi callq 0x510e0 leaq 0x170(%rsp), %rdi callq 0x510e0 movl 0x194(%rsp), %eax addl $0x1, %eax movl %eax, 0x194(%rsp) jmp 0x59828 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59c95 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59c88 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59c7b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59c6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) jmp 0x59c61 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1a0(%rsp) movl %eax, 0x19c(%rsp) leaq 0x90(%rsp), %rdi callq 0x510e0 leaq 0xb0(%rsp), %rdi callq 0x510e0 leaq 0xd0(%rsp), %rdi callq 0x510e0 leaq 0xf0(%rsp), %rdi callq 0x510e0 leaq 0x110(%rsp), %rdi callq 0x510e0 leaq 0x170(%rsp), %rdi callq 0x510e0 jmp 0x59cee leaq 0x1b8(%rsp), %rdi leaq 0x15cd09(%rip), %rsi # 0x1b69bc callq 0x50850 jmp 0x59cba movq 0x80(%rsp), %rdi leaq 0x1a8(%rsp), %rsi callq 0x509f0 jmp 0x59cd1 leaq 0x1a8(%rsp), %rdi callq 0x50530 movq 0x88(%rsp), %rax addq $0x348, %rsp # imm = 0x348 retq leaq 0x1a8(%rsp), %rdi callq 0x50530 movq 0x1a0(%rsp), %rdi callq 0x50950 nopl (%rax,%rax)
_Z11string_fromB5cxx11PK13llama_contextRK11llama_batch: sub rsp, 348h mov [rsp+348h+var_2C8], rdi mov rax, rdi mov [rsp+348h+var_2C0], rax mov [rsp+348h+var_8], rdi mov [rsp+348h+var_10], rsi mov [rsp+348h+var_18], rdx lea rdi, [rsp+348h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+348h+var_190] lea rsi, asc_1B69B9; "[ " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_59815: mov [rsp+348h+var_1AD], 1 mov [rsp+348h+var_1B4], 0 loc_59828: mov eax, [rsp+348h+var_1B4] mov rcx, [rsp+348h+var_18] cmp eax, [rcx] jge loc_59CA4 test [rsp+348h+var_1AD], 1 jnz short loc_5987A lea rdi, [rsp+348h+var_190] lea rsi, aZuD+6; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_5985F: jmp short loc_59882 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_59CEE loc_5987A: mov [rsp+348h+var_1AD], 0 loc_59882: mov rsi, [rsp+348h+var_10] mov rax, [rsp+348h+var_18] mov rax, [rax+8] movsxd rcx, [rsp+348h+var_1B4] mov edx, [rax+rcx*4] lea rdi, [rsp+348h+var_1D8] mov ecx, 1 call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool) jmp short $+2 loc_598B5: lea rdi, [rsp+348h+var_1D8] mov [rsp+348h+var_2D8], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov rdi, [rsp+348h+var_2D8] mov [rsp+348h+var_1F0], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+348h+var_1F8], rax mov rdi, [rsp+348h+var_1F0] mov rsi, [rsp+348h+var_1F8] call _ZSt9remove_ifIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEZ11string_fromPK13llama_contextRK11llama_batchE3$_0ET_SH_SH_T0_; std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0) mov [rsp+348h+var_2D0], rax jmp short $+2 loc_598FD: mov rax, [rsp+348h+var_2D0] mov [rsp+348h+var_1E8], rax lea rdi, [rsp+348h+var_1E0] lea rsi, [rsp+348h+var_1E8] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE lea rdi, [rsp+348h+var_1D8] mov [rsp+348h+var_2E8], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+348h+var_210], rax lea rdi, [rsp+348h+var_208] lea rsi, [rsp+348h+var_210] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IPcEERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISC_SB_EE7__valueES8_E6__typeEEE mov rdi, [rsp+348h+var_2E8] mov rsi, [rsp+348h+var_1E0] mov rdx, [rsp+348h+var_208] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5eraseEN9__gnu_cxx17__normal_iteratorIPKcS4_EES9_; std::string::erase(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>) mov [rsp+348h+var_2E0], rax jmp short $+2 loc_5996F: mov rax, [rsp+348h+var_2E0] mov [rsp+348h+var_218], rax lea rdi, [rsp+348h+var_190] lea rsi, aEndIndexOutOfB+18h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_2F0], rax jmp short $+2 loc_59997: mov esi, [rsp+348h+var_1B4]; int lea rdi, [rsp+348h+var_238]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_599AD: mov rdi, [rsp+348h+var_2F0] lea rsi, [rsp+348h+var_238] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_2F8], rax jmp short $+2 loc_599C6: mov rdi, [rsp+348h+var_2F8] lea rsi, aToken; ", token '" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_300], rax jmp short $+2 loc_599DE: mov rdi, [rsp+348h+var_300] lea rsi, [rsp+348h+var_1D8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_308], rax jmp short $+2 loc_599F7: mov rdi, [rsp+348h+var_308] lea rsi, aLastRead+0Dh; "'" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_310], rax jmp short $+2 loc_59A0F: mov rdi, [rsp+348h+var_310] lea rsi, aPos; ", pos " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_318], rax jmp short $+2 loc_59A27: mov rax, [rsp+348h+var_18] mov rax, [rax+18h] movsxd rcx, [rsp+348h+var_1B4] mov esi, [rax+rcx*4]; int lea rdi, [rsp+348h+var_258]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_59A4D: mov rdi, [rsp+348h+var_318] lea rsi, [rsp+348h+var_258] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_320], rax jmp short $+2 loc_59A66: mov rdi, [rsp+348h+var_320] lea rsi, aNSeqId; ", n_seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_328], rax jmp short $+2 loc_59A7E: mov rax, [rsp+348h+var_18] mov rax, [rax+20h] movsxd rcx, [rsp+348h+var_1B4] mov esi, [rax+rcx*4]; int lea rdi, [rsp+348h+var_278]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_59AA4: mov rdi, [rsp+348h+var_328] lea rsi, [rsp+348h+var_278] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_330], rax jmp short $+2 loc_59ABD: mov rdi, [rsp+348h+var_330] lea rsi, aSeqId; ", seq_id " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_338], rax jmp short $+2 loc_59AD5: mov rax, [rsp+348h+var_18] mov rax, [rax+28h] movsxd rcx, [rsp+348h+var_1B4] mov rax, [rax+rcx*8] mov esi, [rax]; int lea rdi, [rsp+348h+var_298]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_59AFE: mov rdi, [rsp+348h+var_338] lea rsi, [rsp+348h+var_298] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+348h+var_340], rax jmp short $+2 loc_59B17: mov rdi, [rsp+348h+var_340] lea rsi, aLogits; ", logits " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+348h+var_348], rax jmp short $+2 loc_59B2E: mov rax, [rsp+348h+var_18] mov rax, [rax+30h] movsxd rcx, [rsp+348h+var_1B4] movsx esi, byte ptr [rax+rcx]; int lea rdi, [rsp+348h+var_2B8]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_59B55: mov rdi, [rsp+348h+var_348] lea rsi, [rsp+348h+var_2B8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_59B68: lea rdi, [rsp+348h+var_2B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_298]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_278]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_258]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+348h+var_1D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+348h+var_1B4] add eax, 1 mov [rsp+348h+var_1B4], eax jmp loc_59828 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_59C95 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp loc_59C88 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_59C7B mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_59C6E mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax jmp short loc_59C61 mov rcx, rax mov eax, edx mov [rsp+arg_198], rcx mov [rsp+arg_194], eax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59C61: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59C6E: lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59C7B: lea rdi, [rsp+arg_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59C88: lea rdi, [rsp+arg_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_59C95: lea rdi, [rsp+arg_168]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_59CEE loc_59CA4: lea rdi, [rsp+348h+var_190] lea rsi, asc_1B69BC; " ]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_59CBA: mov rdi, [rsp+348h+var_2C8] lea rsi, [rsp+348h+var_1A0] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_59CD1: lea rdi, [rsp+348h+var_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+348h+var_2C0] add rsp, 348h retn loc_59CEE: lea rdi, [rsp+arg_1A0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_198] call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-348h] long long v5; // [rsp+8h] [rbp-340h] long long v6; // [rsp+10h] [rbp-338h] long long v7; // [rsp+18h] [rbp-330h] long long v8; // [rsp+20h] [rbp-328h] long long v9; // [rsp+28h] [rbp-320h] long long v10; // [rsp+30h] [rbp-318h] long long v11; // [rsp+38h] [rbp-310h] long long v12; // [rsp+40h] [rbp-308h] long long v13; // [rsp+48h] [rbp-300h] long long v14; // [rsp+50h] [rbp-2F8h] long long v15; // [rsp+58h] [rbp-2F0h] _BYTE v16[32]; // [rsp+90h] [rbp-2B8h] BYREF _BYTE v17[32]; // [rsp+B0h] [rbp-298h] BYREF _BYTE v18[32]; // [rsp+D0h] [rbp-278h] BYREF _BYTE v19[32]; // [rsp+F0h] [rbp-258h] BYREF _BYTE v20[32]; // [rsp+110h] [rbp-238h] BYREF long long v21; // [rsp+130h] [rbp-218h] long long v22; // [rsp+138h] [rbp-210h] BYREF long long v23; // [rsp+140h] [rbp-208h] BYREF long long v24; // [rsp+150h] [rbp-1F8h] long long v25; // [rsp+158h] [rbp-1F0h] long long v26; // [rsp+160h] [rbp-1E8h] BYREF long long v27; // [rsp+168h] [rbp-1E0h] BYREF _BYTE v28[36]; // [rsp+170h] [rbp-1D8h] BYREF int i; // [rsp+194h] [rbp-1B4h] char v30; // [rsp+19Bh] [rbp-1ADh] _BYTE v31[16]; // [rsp+1A8h] [rbp-1A0h] BYREF _BYTE v32[376]; // [rsp+1B8h] [rbp-190h] BYREF long long v33; // [rsp+330h] [rbp-18h] long long v34; // [rsp+338h] [rbp-10h] long long v35; // [rsp+340h] [rbp-8h] v35 = a1; v34 = a2; v33 = a3; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v31); std::operator<<<std::char_traits<char>>(v32, "[ "); v30 = 1; for ( i = 0; i < *(_DWORD *)v33; ++i ) { if ( (v30 & 1) != 0 ) v30 = 0; else std::operator<<<std::char_traits<char>>(v32, ", "); common_token_to_piece[abi:cxx11]((long long)v28, v34, *(_DWORD *)(*(_QWORD *)(v33 + 8) + 4LL * i), 1); v25 = std::string::begin(); v24 = std::string::end(v28); v26 = std::remove_if<__gnu_cxx::__normal_iterator<char *,std::string>,string_from(llama_context const*,llama_batch const&)::$_0>( v25, v24); __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v27, &v26); v22 = std::string::end(v28); __gnu_cxx::__normal_iterator<char const*,std::string>::__normal_iterator<char *>(&v23, &v22); v21 = std::string::erase(v28, v27, v23); v15 = std::operator<<<std::char_traits<char>>(v32, "\n"); std::to_string((std::__cxx11 *)v20, i); v14 = std::operator<<<char>(v15, v20); v13 = std::operator<<<std::char_traits<char>>(v14, ", token '"); v12 = std::operator<<<char>(v13, v28); v11 = std::operator<<<std::char_traits<char>>(v12, "'"); v10 = std::operator<<<std::char_traits<char>>(v11, ", pos "); std::to_string((std::__cxx11 *)v19, *(_DWORD *)(*(_QWORD *)(v33 + 24) + 4LL * i)); v9 = std::operator<<<char>(v10, v19); v8 = std::operator<<<std::char_traits<char>>(v9, ", n_seq_id "); std::to_string((std::__cxx11 *)v18, *(_DWORD *)(*(_QWORD *)(v33 + 32) + 4LL * i)); v7 = std::operator<<<char>(v8, v18); v6 = std::operator<<<std::char_traits<char>>(v7, ", seq_id "); std::to_string((std::__cxx11 *)v17, **(_DWORD **)(*(_QWORD *)(v33 + 40) + 8LL * i)); v5 = std::operator<<<char>(v6, v17); v4 = std::operator<<<std::char_traits<char>>(v5, ", logits "); std::to_string((std::__cxx11 *)v16, *(char *)(*(_QWORD *)(v33 + 48) + i)); std::operator<<<char>(v4, v16); std::string::~string(v16); std::string::~string(v17); std::string::~string(v18); std::string::~string(v19); std::string::~string(v20); std::string::~string(v28); } std::operator<<<std::char_traits<char>>(v32, " ]"); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v31); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v31); return a1; }
string_from[abi:cxx11]: SUB RSP,0x348 MOV qword ptr [RSP + 0x80],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x340],RDI MOV qword ptr [RSP + 0x338],RSI MOV qword ptr [RSP + 0x330],RDX LEA RDI,[RSP + 0x1a8] CALL 0x00150420 LEA RDI,[RSP + 0x1b8] LAB_00159807: LEA RSI,[0x2b69b9] CALL 0x00150850 JMP 0x00159815 LAB_00159815: MOV byte ptr [RSP + 0x19b],0x1 MOV dword ptr [RSP + 0x194],0x0 LAB_00159828: MOV EAX,dword ptr [RSP + 0x194] MOV RCX,qword ptr [RSP + 0x330] CMP EAX,dword ptr [RCX] JGE 0x00159ca4 TEST byte ptr [RSP + 0x19b],0x1 JNZ 0x0015987a LEA RDI,[RSP + 0x1b8] LEA RSI,[0x2b7373] CALL 0x00150850 JMP 0x0015985f LAB_0015985f: JMP 0x00159882 LAB_0015987a: MOV byte ptr [RSP + 0x19b],0x0 LAB_00159882: MOV RSI,qword ptr [RSP + 0x338] MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x194] MOV EDX,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0x170] MOV ECX,0x1 CALL 0x00159700 JMP 0x001598b5 LAB_001598b5: LEA RDI,[RSP + 0x170] MOV qword ptr [RSP + 0x70],RDI CALL 0x001506e0 MOV RDI,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x158],RAX CALL 0x001507a0 MOV qword ptr [RSP + 0x150],RAX MOV RDI,qword ptr [RSP + 0x158] MOV RSI,qword ptr [RSP + 0x150] LAB_001598f1: CALL 0x00159d10 MOV qword ptr [RSP + 0x78],RAX JMP 0x001598fd LAB_001598fd: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x160],RAX LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0x160] CALL 0x001641e0 LEA RDI,[RSP + 0x170] MOV qword ptr [RSP + 0x60],RDI CALL 0x001507a0 MOV qword ptr [RSP + 0x138],RAX LEA RDI,[RSP + 0x140] LEA RSI,[RSP + 0x138] CALL 0x001641e0 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x168] MOV RDX,qword ptr [RSP + 0x140] CALL 0x00150630 MOV qword ptr [RSP + 0x68],RAX JMP 0x0015996f LAB_0015996f: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x130],RAX LEA RDI,[RSP + 0x1b8] LEA RSI,[0x2b6888] CALL 0x00150850 MOV qword ptr [RSP + 0x58],RAX JMP 0x00159997 LAB_00159997: MOV ESI,dword ptr [RSP + 0x194] LEA RDI,[RSP + 0x110] CALL 0x00164080 JMP 0x001599ad LAB_001599ad: MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x110] CALL 0x00150410 MOV qword ptr [RSP + 0x50],RAX JMP 0x001599c6 LAB_001599c6: MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x2b69bf] CALL 0x00150850 MOV qword ptr [RSP + 0x48],RAX JMP 0x001599de LAB_001599de: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x170] CALL 0x00150410 MOV qword ptr [RSP + 0x40],RAX JMP 0x001599f7 LAB_001599f7: MOV RDI,qword ptr [RSP + 0x40] LEA RSI,[0x2b9878] CALL 0x00150850 MOV qword ptr [RSP + 0x38],RAX JMP 0x00159a0f LAB_00159a0f: MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[0x2b69c9] CALL 0x00150850 MOV qword ptr [RSP + 0x30],RAX JMP 0x00159a27 LAB_00159a27: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x18] MOVSXD RCX,dword ptr [RSP + 0x194] MOV ESI,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0xf0] CALL 0x00164080 JMP 0x00159a4d LAB_00159a4d: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xf0] CALL 0x00150410 MOV qword ptr [RSP + 0x28],RAX JMP 0x00159a66 LAB_00159a66: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x2b69d0] CALL 0x00150850 MOV qword ptr [RSP + 0x20],RAX JMP 0x00159a7e LAB_00159a7e: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x20] MOVSXD RCX,dword ptr [RSP + 0x194] MOV ESI,dword ptr [RAX + RCX*0x4] LEA RDI,[RSP + 0xd0] CALL 0x00164080 JMP 0x00159aa4 LAB_00159aa4: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0xd0] CALL 0x00150410 MOV qword ptr [RSP + 0x18],RAX JMP 0x00159abd LAB_00159abd: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x2b69dc] CALL 0x00150850 MOV qword ptr [RSP + 0x10],RAX JMP 0x00159ad5 LAB_00159ad5: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RSP + 0x194] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ESI,dword ptr [RAX] LEA RDI,[RSP + 0xb0] CALL 0x00164080 JMP 0x00159afe LAB_00159afe: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0xb0] CALL 0x00150410 MOV qword ptr [RSP + 0x8],RAX JMP 0x00159b17 LAB_00159b17: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x2b69e6] CALL 0x00150850 MOV qword ptr [RSP],RAX JMP 0x00159b2e LAB_00159b2e: MOV RAX,qword ptr [RSP + 0x330] MOV RAX,qword ptr [RAX + 0x30] MOVSXD RCX,dword ptr [RSP + 0x194] MOVSX ESI,byte ptr [RAX + RCX*0x1] LEA RDI,[RSP + 0x90] CALL 0x00164080 JMP 0x00159b55 LAB_00159b55: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x90] CALL 0x00150410 JMP 0x00159b68 LAB_00159b68: LEA RDI,[RSP + 0x90] CALL 0x001510e0 LEA RDI,[RSP + 0xb0] CALL 0x001510e0 LEA RDI,[RSP + 0xd0] CALL 0x001510e0 LEA RDI,[RSP + 0xf0] CALL 0x001510e0 LEA RDI,[RSP + 0x110] CALL 0x001510e0 LEA RDI,[RSP + 0x170] CALL 0x001510e0 MOV EAX,dword ptr [RSP + 0x194] ADD EAX,0x1 MOV dword ptr [RSP + 0x194],EAX JMP 0x00159828 LAB_00159ca4: LEA RDI,[RSP + 0x1b8] LAB_00159cac: LEA RSI,[0x2b69bc] CALL 0x00150850 JMP 0x00159cba LAB_00159cba: MOV RDI,qword ptr [RSP + 0x80] LEA RSI,[RSP + 0x1a8] CALL 0x001509f0 LAB_00159ccf: JMP 0x00159cd1 LAB_00159cd1: LEA RDI,[RSP + 0x1a8] CALL 0x00150530 MOV RAX,qword ptr [RSP + 0x88] ADD RSP,0x348 RET
/* string_from[abi:cxx11](llama_context const*, llama_batch const&) */ llama_context * string_from_abi_cxx11_(llama_context *param_1,llama_batch *param_2) { ostream *poVar1; int *in_RDX; __cxx11 local_2b8 [32]; __cxx11 local_298 [32]; __cxx11 local_278 [32]; __cxx11 local_258 [32]; __cxx11 local_238 [32]; int8 local_218; int8 local_210; int8 local_208 [2]; int8 local_1f8; int8 local_1f0; int8 local_1e8; int8 local_1e0; llama_context local_1d8 [36]; int local_1b4; byte local_1ad; stringstream local_1a0 [16]; ostream local_190 [376]; int *local_18; llama_batch *local_10; llama_context *local_8; local_18 = in_RDX; local_10 = param_2; local_8 = param_1; std::__cxx11::stringstream::stringstream(local_1a0); /* try { // try from 00159807 to 001598b2 has its CatchHandler @ 00159861 */ std::operator<<(local_190,"[ "); local_1ad = 1; for (local_1b4 = 0; local_1b4 < *local_18; local_1b4 = local_1b4 + 1) { if ((local_1ad & 1) == 0) { std::operator<<(local_190,", "); } else { local_1ad = 0; } common_token_to_piece_abi_cxx11_ (local_1d8,(int)local_10, SUB41(*(int4 *)(*(long *)(local_18 + 2) + (long)local_1b4 * 4),0)); local_1f0 = std::__cxx11::string::begin(); local_1f8 = std::__cxx11::string::end(); /* try { // try from 001598f1 to 001599aa has its CatchHandler @ 00159bcc */ local_1e8 = std:: remove_if<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>,string_from(llama_context_const*,llama_batch_const&)::__0> (local_1f0,local_1f8); __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*> ((__normal_iterator<char_const*,std::__cxx11::string> *)&local_1e0, (__normal_iterator *)&local_1e8); local_210 = std::__cxx11::string::end(); __gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::__normal_iterator<char*> ((__normal_iterator<char_const*,std::__cxx11::string> *)local_208, (__normal_iterator *)&local_210); local_218 = std::__cxx11::string::erase(local_1d8,local_1e0,local_208[0]); poVar1 = std::operator<<(local_190,"\n"); std::__cxx11::to_string(local_238,local_1b4); /* try { // try from 001599ad to 00159a4a has its CatchHandler @ 00159be5 */ poVar1 = std::operator<<(poVar1,(string *)local_238); poVar1 = std::operator<<(poVar1,", token \'"); poVar1 = std::operator<<(poVar1,(string *)local_1d8); poVar1 = std::operator<<(poVar1,"\'"); poVar1 = std::operator<<(poVar1,", pos "); std::__cxx11::to_string(local_258,*(int *)(*(long *)(local_18 + 6) + (long)local_1b4 * 4)); /* try { // try from 00159a4d to 00159aa1 has its CatchHandler @ 00159bfe */ poVar1 = std::operator<<(poVar1,(string *)local_258); poVar1 = std::operator<<(poVar1,", n_seq_id "); std::__cxx11::to_string(local_278,*(int *)(*(long *)(local_18 + 8) + (long)local_1b4 * 4)); /* try { // try from 00159aa4 to 00159afb has its CatchHandler @ 00159c14 */ poVar1 = std::operator<<(poVar1,(string *)local_278); poVar1 = std::operator<<(poVar1,", seq_id "); std::__cxx11::to_string(local_298,**(int **)(*(long *)(local_18 + 10) + (long)local_1b4 * 8)); /* try { // try from 00159afe to 00159b52 has its CatchHandler @ 00159c2a */ poVar1 = std::operator<<(poVar1,(string *)local_298); poVar1 = std::operator<<(poVar1,", logits "); std::__cxx11::to_string(local_2b8,(int)*(char *)(*(long *)(local_18 + 0xc) + (long)local_1b4)); /* try { // try from 00159b55 to 00159b65 has its CatchHandler @ 00159c40 */ std::operator<<(poVar1,(string *)local_2b8); std::__cxx11::string::~string((string *)local_2b8); std::__cxx11::string::~string((string *)local_298); std::__cxx11::string::~string((string *)local_278); std::__cxx11::string::~string((string *)local_258); std::__cxx11::string::~string((string *)local_238); std::__cxx11::string::~string((string *)local_1d8); } /* try { // try from 00159cac to 00159cce has its CatchHandler @ 00159861 */ std::operator<<(local_190," ]"); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_1a0); return param_1; }
11,418
lf_pinbox_put_pins
eloqsql/mysys/lf_alloc-pin.c
void lf_pinbox_put_pins(LF_PINS *pins) { LF_PINBOX *pinbox= pins->pinbox; uint32 top_ver, nr; nr= pins->link; #ifndef DBUG_OFF { /* This thread should not hold any pin. */ int i; for (i= 0; i < LF_PINBOX_PINS; i++) DBUG_ASSERT(pins->pin[i] == 0); } #endif /* DBUG_OFF */ /* XXX this will deadlock if other threads will wait for the caller to do something after lf_pinbox_put_pins(), and they would have pinned addresses that the caller wants to free. Thus: only free pins when all work is done and nobody can wait for you!!! */ while (pins->purgatory_count) { lf_pinbox_real_free(pins); if (pins->purgatory_count) pthread_yield(); } top_ver= pinbox->pinstack_top_ver; do { pins->link= top_ver % LF_PINBOX_MAX_PINS; } while (!my_atomic_cas32((int32 volatile*) &pinbox->pinstack_top_ver, (int32*) &top_ver, top_ver-pins->link+nr+LF_PINBOX_MAX_PINS)); return; }
O0
c
lf_pinbox_put_pins: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movl 0x34(%rax), %eax movl %eax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x30(%rax) je 0xfdde6 movq -0x8(%rbp), %rdi callq 0xfde60 movq -0x8(%rbp), %rax cmpl $0x0, 0x30(%rax) je 0xfdde4 callq 0x29860 jmp 0xfddc2 movq -0x10(%rbp), %rax movl 0x3c(%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx andl $0xffff, %ecx # imm = 0xFFFF movq -0x8(%rbp), %rax movl %ecx, 0x34(%rax) movq -0x10(%rbp), %rcx movl -0x14(%rbp), %esi movq -0x8(%rbp), %rax movl 0x34(%rax), %eax subl %eax, %esi movl -0x18(%rbp), %eax movl %eax, %edx movl %esi, %eax leal 0x10000(%rax,%rdx), %eax movl %eax, -0x1c(%rbp) movl -0x14(%rbp), %eax movl -0x1c(%rbp), %edx lock cmpxchgl %edx, 0x3c(%rcx) movl %eax, %ecx sete %al movb %al, -0x25(%rbp) movl %ecx, -0x24(%rbp) testb $0x1, %al jne 0xfde41 movl -0x24(%rbp), %eax movl %eax, -0x14(%rbp) movb -0x25(%rbp), %al andb $0x1, %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al xorb $-0x1, %al testb $0x1, %al jne 0xfddf0 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
lf_pinbox_put_pins: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+20h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov eax, [rax+34h] mov [rbp+var_18], eax loc_FDDC2: mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 0 jz short loc_FDDE6 mov rdi, [rbp+var_8] call lf_pinbox_real_free mov rax, [rbp+var_8] cmp dword ptr [rax+30h], 0 jz short loc_FDDE4 call _sched_yield loc_FDDE4: jmp short loc_FDDC2 loc_FDDE6: mov rax, [rbp+var_10] mov eax, [rax+3Ch] mov [rbp+var_14], eax loc_FDDF0: mov ecx, [rbp+var_14] and ecx, 0FFFFh mov rax, [rbp+var_8] mov [rax+34h], ecx mov rcx, [rbp+var_10] mov esi, [rbp+var_14] mov rax, [rbp+var_8] mov eax, [rax+34h] sub esi, eax mov eax, [rbp+var_18] mov edx, eax mov eax, esi lea eax, [rax+rdx+10000h] mov [rbp+var_1C], eax mov eax, [rbp+var_14] mov edx, [rbp+var_1C] lock cmpxchg [rcx+3Ch], edx mov ecx, eax setz al mov [rbp+var_25], al mov [rbp+var_24], ecx test al, 1 jnz short loc_FDE41 mov eax, [rbp+var_24] mov [rbp+var_14], eax loc_FDE41: mov al, [rbp+var_25] and al, 1 mov [rbp+var_1D], al mov al, [rbp+var_1D] xor al, 0FFh test al, 1 jnz short loc_FDDF0 add rsp, 30h pop rbp retn
char lf_pinbox_put_pins(long long a1) { signed __int32 v1; // eax signed __int32 v2; // ett char result; // al bool v4; // [rsp+Bh] [rbp-25h] int v5; // [rsp+18h] [rbp-18h] signed __int32 v6; // [rsp+1Ch] [rbp-14h] long long v7; // [rsp+20h] [rbp-10h] v7 = *(_QWORD *)(a1 + 32); v5 = *(_DWORD *)(a1 + 52); while ( *(_DWORD *)(a1 + 48) ) { lf_pinbox_real_free(a1); if ( *(_DWORD *)(a1 + 48) ) sched_yield(); } v6 = *(_DWORD *)(v7 + 60); do { *(_DWORD *)(a1 + 52) = (unsigned __int16)v6; v2 = v6; v1 = _InterlockedCompareExchange((volatile signed __int32 *)(v7 + 60), v6 - *(_DWORD *)(a1 + 52) + v5 + 0x10000, v6); v4 = v2 == v1; if ( v2 != v1 ) v6 = v1; result = ~v4; } while ( !v4 ); return result; }
lf_pinbox_put_pins: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x34] MOV dword ptr [RBP + -0x18],EAX LAB_001fddc2: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x0 JZ 0x001fdde6 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fde60 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x30],0x0 JZ 0x001fdde4 CALL 0x00129860 LAB_001fdde4: JMP 0x001fddc2 LAB_001fdde6: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x3c] MOV dword ptr [RBP + -0x14],EAX LAB_001fddf0: MOV ECX,dword ptr [RBP + -0x14] AND ECX,0xffff MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x34],ECX MOV RCX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x34] SUB ESI,EAX MOV EAX,dword ptr [RBP + -0x18] MOV EDX,EAX MOV EAX,ESI LEA EAX,[RAX + RDX*0x1 + 0x10000] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x1c] CMPXCHG.LOCK dword ptr [RCX + 0x3c],EDX MOV ECX,EAX SETZ AL MOV byte ptr [RBP + -0x25],AL MOV dword ptr [RBP + -0x24],ECX TEST AL,0x1 JNZ 0x001fde41 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x14],EAX LAB_001fde41: MOV AL,byte ptr [RBP + -0x25] AND AL,0x1 MOV byte ptr [RBP + -0x1d],AL MOV AL,byte ptr [RBP + -0x1d] XOR AL,0xff TEST AL,0x1 JNZ 0x001fddf0 ADD RSP,0x30 POP RBP RET
void lf_pinbox_put_pins(long param_1) { uint *puVar1; int iVar2; long lVar3; uint uVar4; bool bVar5; uint local_1c; lVar3 = *(long *)(param_1 + 0x20); iVar2 = *(int *)(param_1 + 0x34); while (*(int *)(param_1 + 0x30) != 0) { lf_pinbox_real_free(param_1); if (*(int *)(param_1 + 0x30) != 0) { sched_yield(); } } local_1c = *(uint *)(lVar3 + 0x3c); do { *(uint *)(param_1 + 0x34) = local_1c & 0xffff; puVar1 = (uint *)(lVar3 + 0x3c); LOCK(); uVar4 = *puVar1; bVar5 = local_1c == uVar4; if (bVar5) { *puVar1 = (local_1c - *(int *)(param_1 + 0x34)) + 0x10000 + iVar2; uVar4 = local_1c; } UNLOCK(); local_1c = uVar4; } while (!bVar5); return; }
11,419
findPeaks::operator&=(std::vector<bool, std::allocator<bool>>&, std::vector<bool, std::allocator<bool>> const&)
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
void operator&=(std::vector<bool> &a, const std::vector<bool> &b) { for (size_t i = 0; i < a.size(); i++) a[i] = a[i] & b[i]; }
O2
cpp
findPeaks::operator&=(std::vector<bool, std::allocator<bool>>&, std::vector<bool, std::allocator<bool>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 xorl %r15d, %r15d movq 0x10(%r14), %rax movl 0x18(%r14), %ecx subq (%r14), %rax leaq (%rcx,%rax,8), %rax cmpq %rax, %r15 jae 0x22d7 movq %r14, %rdi movq %r15, %rsi callq 0x31ba movq %rdx, %r12 andq (%rax), %r12 movq %rbx, %rdi movq %r15, %rsi callq 0x32ba movl %eax, %ebp movq %r14, %rdi movq %r15, %rsi callq 0x31ba testb %bpl, %bpl je 0x22c9 testq %r12, %r12 je 0x22c9 orq (%rax), %rdx jmp 0x22cf notq %rdx andq (%rax), %rdx movq %rdx, (%rax) incq %r15 jmp 0x227d popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN9findPeaksaNERSt6vectorIbSaIbEERKS2_: push rbp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi xor r15d, r15d loc_227D: mov rax, [r14+10h] mov ecx, [r14+18h] sub rax, [r14] lea rax, [rcx+rax*8] cmp r15, rax jnb short loc_22D7 mov rdi, r14 mov rsi, r15 call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong) mov r12, rdx and r12, [rax] mov rdi, rbx mov rsi, r15 call _ZNKSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong) mov ebp, eax mov rdi, r14 mov rsi, r15 call _ZNSt6vectorIbSaIbEEixEm; std::vector<bool>::operator[](ulong) test bpl, bpl jz short loc_22C9 test r12, r12 jz short loc_22C9 or rdx, [rax] jmp short loc_22CF loc_22C9: not rdx and rdx, [rax] loc_22CF: mov [rax], rdx inc r15 jmp short loc_227D loc_22D7: pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned long long findPeaks::operator&=(long long a1, long long a2) { unsigned long long i; // r15 unsigned long long result; // rax _QWORD *v4; // rax long long v5; // rdx long long v6; // r12 char v7; // bp long long *v8; // rax long long v9; // rdx long long v10; // rdx for ( i = 0LL; ; ++i ) { result = *(unsigned int *)(a1 + 24) + 8LL * (*(_QWORD *)(a1 + 16) - *(_QWORD *)a1); if ( i >= result ) break; v4 = (_QWORD *)std::vector<bool>::operator[](a1, i); v6 = *v4 & v5; v7 = std::vector<bool>::operator[](a2, i); v8 = (long long *)std::vector<bool>::operator[](a1, i); if ( v7 && v6 ) v10 = *v8 | v9; else v10 = *v8 & ~v9; *v8 = v10; } return result; }
operator&=: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI XOR R15D,R15D LAB_0010227d: MOV RAX,qword ptr [R14 + 0x10] MOV ECX,dword ptr [R14 + 0x18] SUB RAX,qword ptr [R14] LEA RAX,[RCX + RAX*0x8] CMP R15,RAX JNC 0x001022d7 MOV RDI,R14 MOV RSI,R15 CALL 0x001031ba MOV R12,RDX AND R12,qword ptr [RAX] MOV RDI,RBX MOV RSI,R15 CALL 0x001032ba MOV EBP,EAX MOV RDI,R14 MOV RSI,R15 CALL 0x001031ba TEST BPL,BPL JZ 0x001022c9 TEST R12,R12 JZ 0x001022c9 OR RDX,qword ptr [RAX] JMP 0x001022cf LAB_001022c9: NOT RDX AND RDX,qword ptr [RAX] LAB_001022cf: MOV qword ptr [RAX],RDX INC R15 JMP 0x0010227d LAB_001022d7: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* findPeaks::TEMPNAMEPLACEHOLDERVALUE(std::vector<bool, std::allocator<bool> >&, std::vector<bool, std::allocator<bool> > const&) */ void findPeaks::operator&=(vector *param_1,vector *param_2) { char cVar1; ulong *puVar2; ulong uVar3; ulong uVar4; int1 auVar5 [16]; int1 auVar6 [16]; for (uVar4 = 0; uVar4 < (ulong)*(uint *)(param_1 + 0x18) + (*(long *)(param_1 + 0x10) - *(long *)param_1) * 8; uVar4 = uVar4 + 1) { auVar5 = std::vector<bool,std::allocator<bool>>::operator[] ((vector<bool,std::allocator<bool>> *)param_1,uVar4); uVar3 = *auVar5._0_8_; cVar1 = std::vector<bool,std::allocator<bool>>::operator[] ((vector<bool,std::allocator<bool>> *)param_2,uVar4); auVar6 = std::vector<bool,std::allocator<bool>>::operator[] ((vector<bool,std::allocator<bool>> *)param_1,uVar4); puVar2 = auVar6._0_8_; if ((cVar1 == '\0') || ((auVar5._8_8_ & uVar3) == 0)) { uVar3 = ~auVar6._8_8_ & *puVar2; } else { uVar3 = auVar6._8_8_ | *puVar2; } *puVar2 = uVar3; } return; }
11,420
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1a65f6(%rip), %rax # 0x1cc810 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x24400 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x2cc810] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00124400 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
11,421
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O0
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0xb9ed4d(%rip), %rax # 0xc7a7e0 movq %rax, -0x18(%rbp) leaq 0xb9ed42(%rip), %rax # 0xc7a7e0 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x18(%rbp) jae 0xdbb0f movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0xdbaff movq -0x18(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x20(%rax) je 0xdbaff leaq 0x28a697(%rip), %rax # 0x366160 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x20(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x28a676(%rip), %rdi # 0x366160 callq *%rax cmpl $0x0, %eax jne 0xdbaff movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xdbb16 jmp 0xdbb01 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xdba97 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
get_collation_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, all_charsets mov [rbp+var_18], rax loc_DBA97: lea rax, all_charsets add rax, 4000h cmp [rbp+var_18], rax jnb short loc_DBB0F mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_DBAFF mov rax, [rbp+var_18] mov rax, [rax] cmp qword ptr [rax+20h], 0 jz short loc_DBAFF lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+20h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_DBAFF mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_DBB16 loc_DBAFF: jmp short $+2 loc_DBB01: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_DBA97 loc_DBB0F: mov [rbp+var_4], 0 loc_DBB16: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_collation_number_internal(long long a1) { unsigned int **i; // [rsp+8h] [rbp-18h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 4) && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 4), a1) ) { return **i; } } return 0; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0xd7a7e0] MOV qword ptr [RBP + -0x18],RAX LAB_001dba97: LEA RAX,[0xd7a7e0] ADD RAX,0x4000 CMP qword ptr [RBP + -0x18],RAX JNC 0x001dbb0f MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x001dbaff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001dbaff LEA RAX,[0x466160] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x466160] CALL RAX CMP EAX,0x0 JNZ 0x001dbaff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001dbb16 LAB_001dbaff: JMP 0x001dbb01 LAB_001dbb01: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001dba97 LAB_001dbb0f: MOV dword ptr [RBP + -0x4],0x0 LAB_001dbb16: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { int iVar1; long *local_20; local_20 = &all_charsets; while( true ) { if ((long *)0xd7e7df < local_20) { return 0; } if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00466220 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0 )) break; local_20 = local_20 + 1; } return *(int4 *)*local_20; }
11,422
mp_shr_dec
bluesky950520[P]quickjs/libbf.c
static limb_t mp_shr_dec(limb_t *tab_r, const limb_t *tab, mp_size_t n, limb_t shift, limb_t high) { mp_size_t i; limb_t l, a, q, r; assert(shift >= 1 && shift < LIMB_DIGITS); l = high; for(i = n - 1; i >= 0; i--) { a = tab[i]; fast_shr_rem_dec(q, r, a, shift); tab_r[i] = q + l * mp_pow_dec[LIMB_DIGITS - shift]; l = r; } return l; }
O2
c
mp_shr_dec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r13 movq %rsi, 0x10(%rsp) movq %rdi, 0x8(%rsp) pushq $0x13 popq %r15 subq %rcx, %r15 testq %r13, %r13 jle 0x78107 leaq -0x1(%r13), %r12 movq 0x10(%rsp), %rax movq -0x8(%rax,%r13,8), %rbp movq %rbp, %rdi movl %r14d, %esi callq 0x781dc leaq 0x11b0e(%rip), %rdx # 0x89bf0 movq (%rdx,%r14,8), %rcx imulq %rax, %rcx subq %rcx, %rbp imulq (%rdx,%r15,8), %rbx addq %rax, %rbx movq 0x8(%rsp), %rax movq %rbx, -0x8(%rax,%r13,8) movq %rbp, %rbx movq %r12, %r13 jmp 0x780bd movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mp_shr_dec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov r14, rcx mov r13, rdx mov [rsp+48h+var_38], rsi mov [rsp+48h+var_40], rdi push 13h pop r15 sub r15, rcx loc_780BD: test r13, r13 jle short loc_78107 lea r12, [r13-1] mov rax, [rsp+48h+var_38] mov rbp, [rax+r13*8-8] mov rdi, rbp mov esi, r14d call fast_shr_dec lea rdx, mp_pow_dec mov rcx, [rdx+r14*8] imul rcx, rax sub rbp, rcx imul rbx, [rdx+r15*8] add rbx, rax mov rax, [rsp+48h+var_40] mov [rax+r13*8-8], rbx mov rbx, rbp mov r13, r12 jmp short loc_780BD loc_78107: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mp_shr_dec(long long a1, long long a2, long long a3, long long a4, long long a5) { long long v8; // r15 long long v9; // rbp long long v10; // rax long long v11; // rbp v8 = 19 - a4; while ( a3 > 0 ) { v9 = *(_QWORD *)(a2 + 8 * a3 - 8); v10 = fast_shr_dec(v9, (unsigned int)a4); v11 = v9 - v10 * mp_pow_dec[a4]; *(_QWORD *)(a1 + 8 * a3 - 8) = v10 + mp_pow_dec[v8] * a5; a5 = v11; --a3; } return a5; }
mp_shr_dec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,R8 MOV R14,RCX MOV R13,RDX MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDI PUSH 0x13 POP R15 SUB R15,RCX LAB_001780bd: TEST R13,R13 JLE 0x00178107 LEA R12,[R13 + -0x1] MOV RAX,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RAX + R13*0x8 + -0x8] MOV RDI,RBP MOV ESI,R14D CALL 0x001781dc LEA RDX,[0x189bf0] MOV RCX,qword ptr [RDX + R14*0x8] IMUL RCX,RAX SUB RBP,RCX IMUL RBX,qword ptr [RDX + R15*0x8] ADD RBX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + R13*0x8 + -0x8],RBX MOV RBX,RBP MOV R13,R12 JMP 0x001780bd LAB_00178107: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long mp_shr_dec(long param_1,long param_2,long param_3,ulong param_4,long param_5) { long lVar1; long lVar2; long lVar3; for (; 0 < param_3; param_3 = param_3 + -1) { lVar1 = *(long *)(param_2 + -8 + param_3 * 8); lVar3 = fast_shr_dec(lVar1,param_4 & 0xffffffff); lVar2 = *(long *)(mp_pow_dec + param_4 * 8); *(long *)(param_1 + -8 + param_3 * 8) = param_5 * *(long *)(mp_pow_dec + (0x13 - param_4) * 8) + lVar3; param_5 = lVar1 - lVar2 * lVar3; } return param_5; }
11,423
my_hash_init2
eloqsql/mysys/hash.c
my_bool my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; DBUG_ENTER("my_hash_init2"); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); hash->records=0; hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); }
O3
c
my_hash_init2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %edx, %eax movl 0x30(%rbp), %edx movq 0x28(%rbp), %r10 movq 0x20(%rbp), %r11 movq 0x18(%rbp), %rbx movq 0x10(%rbp), %r14 movq $0x0, 0x18(%rsi) movq %r9, (%rsi) movq %r14, 0x8(%rsi) movq $0x1, 0x10(%rsi) movq %rbx, 0x50(%rsi) testq %r11, %r11 jne 0x4ea38 leaq -0x7c(%rip), %r11 # 0x4e9bc movq %r11, 0x58(%rsi) movq %r10, 0x60(%rsi) movl %edx, 0x20(%rsi) movq %rcx, 0x68(%rsi) addq $0x28, %rsi andl $0x2, %edx shll $0xf, %edx movq %rdx, (%rsp) movl $0x10, %edx xorl %ecx, %ecx movl %eax, %r9d callq 0x50e88 addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
my_hash_init2: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov eax, edx mov edx, [rbp+arg_20] mov r10, [rbp+arg_18] mov r11, [rbp+arg_10] mov rbx, [rbp+arg_8] mov r14, [rbp+arg_0] mov qword ptr [rsi+18h], 0 mov [rsi], r9 mov [rsi+8], r14 mov qword ptr [rsi+10h], 1 mov [rsi+50h], rbx test r11, r11 jnz short loc_4EA38 lea r11, my_hash_sort loc_4EA38: mov [rsi+58h], r11 mov [rsi+60h], r10 mov [rsi+20h], edx mov [rsi+68h], rcx add rsi, 28h ; '(' and edx, 2 shl edx, 0Fh mov [rsp+20h+var_20], rdx mov edx, 10h xor ecx, ecx mov r9d, eax call init_dynamic_array2 add rsp, 10h pop rbx pop r14 pop rbp retn
long long my_hash_init2( int a1, long long a2, int a3, long long a4, int a5, long long a6, long long a7, long long a8, long long ( *a9)(long long a1, long long a2, long long a3), long long a10, int a11) { long long ( *v11)(long long, long long, long long); // r11 v11 = a9; *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)a2 = a6; *(_QWORD *)(a2 + 8) = a7; *(_QWORD *)(a2 + 16) = 1LL; *(_QWORD *)(a2 + 80) = a8; if ( !a9 ) v11 = my_hash_sort; *(_QWORD *)(a2 + 88) = v11; *(_QWORD *)(a2 + 96) = a10; *(_DWORD *)(a2 + 32) = a11; *(_QWORD *)(a2 + 104) = a4; return init_dynamic_array2(a1, (int)a2 + 40, 16, 0, a5, a3, (unsigned __int8)(a11 & 2) << 15); }
my_hash_init2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV EAX,EDX MOV EDX,dword ptr [RBP + 0x30] MOV R10,qword ptr [RBP + 0x28] MOV R11,qword ptr [RBP + 0x20] MOV RBX,qword ptr [RBP + 0x18] MOV R14,qword ptr [RBP + 0x10] MOV qword ptr [RSI + 0x18],0x0 MOV qword ptr [RSI],R9 MOV qword ptr [RSI + 0x8],R14 MOV qword ptr [RSI + 0x10],0x1 MOV qword ptr [RSI + 0x50],RBX TEST R11,R11 JNZ 0x0014ea38 LEA R11,[0x14e9bc] LAB_0014ea38: MOV qword ptr [RSI + 0x58],R11 MOV qword ptr [RSI + 0x60],R10 MOV dword ptr [RSI + 0x20],EDX MOV qword ptr [RSI + 0x68],RCX ADD RSI,0x28 AND EDX,0x2 SHL EDX,0xf MOV qword ptr [RSP],RDX MOV EDX,0x10 XOR ECX,ECX MOV R9D,EAX CALL 0x00150e88 ADD RSP,0x10 POP RBX POP R14 POP RBP RET
void my_hash_init2(int8 param_1,int8 *param_2,int4 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, code *param_9,int8 param_10,uint param_11) { param_2[3] = 0; *param_2 = param_6; param_2[1] = param_7; param_2[2] = 1; param_2[10] = param_8; if (param_9 == (code *)0x0) { param_9 = my_hash_sort; } param_2[0xb] = param_9; param_2[0xc] = param_10; *(uint *)(param_2 + 4) = param_11; param_2[0xd] = param_4; init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,(param_11 & 2) << 0xf); return; }
11,424
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
inline void grisu2(char* buf, int& len, int& decimal_exponent, diyfp m_minus, diyfp v, diyfp m_plus) { JSON_ASSERT(m_plus.e == m_minus.e); JSON_ASSERT(m_plus.e == v.e); // --------(-----------------------+-----------------------)-------- (A) // m- v m+ // // --------------------(-----------+-----------------------)-------- (B) // m- v m+ // // First scale v (and m- and m+) such that the exponent is in the range // [alpha, gamma]. const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] const diyfp w = diyfp::mul(v, c_minus_k); const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); // ----(---+---)---------------(---+---)---------------(---+---)---- // w- w w+ // = c*m- = c*v = c*m+ // // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and // w+ are now off by a small amount. // In fact: // // w - v * 10^k < 1 ulp // // To account for this inaccuracy, add resp. subtract 1 ulp. // // --------+---[---------------(---+---)---------------]---+-------- // w- M- w M+ w+ // // Now any number in [M-, M+] (bounds included) will round to w when input, // regardless of how the input rounding algorithm breaks ties. // // And digit_gen generates the shortest possible such number in [M-, M+]. // Note that this does not mean that Grisu2 always generates the shortest // possible number in the interval (m-, m+). const diyfp M_minus(w_minus.f + 1, w_minus.e); const diyfp M_plus (w_plus.f - 1, w_plus.e ); decimal_exponent = -cached.k; // = -(-k) = k grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rcx, 0x58(%rsp) movl %r8d, 0x60(%rsp) cmpl %r8d, 0xc8(%rsp) jne 0xb7870 movq %rdi, 0x20(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) leaq 0xb0(%rsp), %r13 cmpl %r8d, 0x8(%r13) jne 0xb788c movl %r8d, %edi callq 0xb7947 movq %rdx, %r12 leaq 0x68(%rsp), %r14 movq %rax, (%r14) movl %r12d, 0x8(%r14) movq %r13, %rdi movq %r14, %rsi callq 0xb7a88 movq %rax, %r15 movl %edx, %ebx leaq 0x58(%rsp), %rdi movq %r14, %rsi callq 0xb7a88 movq %rax, %r13 movl %edx, %ebp leaq 0xc0(%rsp), %rdi movq %r14, %rsi callq 0xb7a88 incq %r13 decq %rax shrq $0x20, %r12 negl %r12d movq 0x30(%rsp), %rcx movl %r12d, (%rcx) movq %r15, 0x48(%rsp) movl %ebx, 0x50(%rsp) movq %rax, 0x38(%rsp) movl %edx, 0x40(%rsp) movups 0x38(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq %rcx, %rdx movq %r13, %rcx movl %ebp, %r8d callq 0xb7ae4 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x3365c(%rip), %rdi # 0xeaed3 leaq 0x3369f(%rip), %rdx # 0xeaf1d leaq 0x38e64(%rip), %rcx # 0xf06e9 movl $0x454b, %esi # imm = 0x454B jmp 0xb78a6 leaq 0x33640(%rip), %rdi # 0xeaed3 leaq 0x33683(%rip), %rdx # 0xeaf1d leaq 0x38e5e(%rip), %rcx # 0xf06ff movl $0x454c, %esi # imm = 0x454C xorl %eax, %eax callq 0x1ae70 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rsp+0A8h+var_50], rcx mov [rsp+0A8h+var_48], r8d cmp [rsp+0A8h+arg_18], r8d jnz loc_B7870 mov [rsp+0A8h+var_88], rdi mov [rsp+0A8h+var_80], rsi mov [rsp+0A8h+var_78], rdx lea r13, [rsp+0A8h+arg_0] cmp [r13+8], r8d jnz loc_B788C mov edi, r8d; this call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) mov r12, rdx lea r14, [rsp+0A8h+var_40] mov [r14], rax mov [r14+8], r12d mov rdi, r13 mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r15, rax mov ebx, edx lea rdi, [rsp+0A8h+var_50] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r13, rax mov ebp, edx lea rdi, [rsp+0A8h+arg_10] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) inc r13 dec rax shr r12, 20h neg r12d mov rcx, [rsp+0A8h+var_78] mov [rcx], r12d mov qword ptr [rsp+0A8h+var_60], r15 mov dword ptr [rsp+0A8h+var_60+8], ebx mov qword ptr [rsp+0A8h+var_70], rax mov dword ptr [rsp+0A8h+var_70+8], edx movups xmm0, xmmword ptr [rsp+0A8h+var_70] movups xmmword ptr [rsp+0A8h+var_98], xmm0; char movups xmm0, xmmword ptr [rsp+0A8h+var_60] movups xmmword ptr [rsp+0A8h+var_A8], xmm0; char mov rdi, [rsp+0A8h+var_88]; this mov rsi, [rsp+0A8h+var_80] mov rdx, rcx mov rcx, r13 mov r8d, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B7870: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e" mov esi, 454Bh jmp short loc_B78A6 loc_B788C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEVE; "m_plus.e == v.e" mov esi, 454Ch loc_B78A6: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a1, int a2, _DWORD *a3, long long a4, unsigned int a5, long long a6, char a7, int a8, char a9, int a10) { long long cached_power_for_binary_exponent; // rax int v11; // rdx^4 int v12; // r12^4 int v13; // edx char v14; // r15 int v15; // edx int v16; // ebx char v17; // al int v18; // edx long long v20; // rsi long long v22; // [rsp+58h] [rbp-50h] BYREF unsigned int v23; // [rsp+60h] [rbp-48h] long long v24; // [rsp+68h] [rbp-40h] BYREF int v25; // [rsp+70h] [rbp-38h] v22 = a4; v23 = a5; if ( a10 == a5 ) { if ( a8 == a5 ) { cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)a5, a2); v12 = v11; v24 = cached_power_for_binary_exponent; v25 = v13; v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v24); v16 = v15; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v22, &v24); v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v24); *a3 = -v12; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(a1, v14, v16, v17 - 1, v18); } v20 = 17740LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17740LL, "GGML_ASSERT(%s) failed", "m_plus.e == v.e"); } else { v20 = 17739LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17739LL, "GGML_ASSERT(%s) failed", "m_plus.e == m_minus.e"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v20); }
grisu2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RCX MOV dword ptr [RSP + 0x60],R8D CMP dword ptr [RSP + 0xc8],R8D JNZ 0x001b7870 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX LEA R13,[RSP + 0xb0] CMP dword ptr [R13 + 0x8],R8D JNZ 0x001b788c MOV EDI,R8D CALL 0x001b7947 MOV R12,RDX LEA R14,[RSP + 0x68] MOV qword ptr [R14],RAX MOV dword ptr [R14 + 0x8],R12D MOV RDI,R13 MOV RSI,R14 CALL 0x001b7a88 MOV R15,RAX MOV EBX,EDX LEA RDI,[RSP + 0x58] MOV RSI,R14 CALL 0x001b7a88 MOV R13,RAX MOV EBP,EDX LEA RDI,[RSP + 0xc0] MOV RSI,R14 CALL 0x001b7a88 INC R13 DEC RAX SHR R12,0x20 NEG R12D MOV RCX,qword ptr [RSP + 0x30] MOV dword ptr [RCX],R12D MOV qword ptr [RSP + 0x48],R15 MOV dword ptr [RSP + 0x50],EBX MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x40],EDX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RCX MOV RCX,R13 MOV R8D,EBP CALL 0x001b7ae4 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b7870: LEA RDI,[0x1eaed3] LEA RDX,[0x1eaf1d] LEA RCX,[0x1f06e9] MOV ESI,0x454b JMP 0x001b78a6 LAB_001b788c: LEA RDI,[0x1eaed3] LEA RDX,[0x1eaf1d] LEA RCX,[0x1f06ff] MOV ESI,0x454c LAB_001b78a6: XOR EAX,EAX CALL 0x0011ae70
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2 (int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5, int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10) { int4 uVar1; char *pcVar2; int4 extraout_EDX; int8 uVar3; int1 auVar4 [12]; int1 auVar5 [12]; int1 auVar6 [16]; int4 uStack_64; int8 local_50; int local_48; int8 local_40; int4 local_38; local_50 = param_4; local_48 = param_5; if (param_10 == param_5) { if (param_8 == param_5) { auVar6 = get_cached_power_for_binary_exponent(param_5); local_40 = auVar6._0_8_; local_38 = auVar6._8_4_; uVar1 = diyfp::mul((diyfp *)&param_7,(diyfp *)&local_40); auVar4 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40); auVar5 = diyfp::mul((diyfp *)&param_9,(diyfp *)&local_40); *param_3 = -auVar6._12_4_; grisu2_digit_gen(param_1,param_2,param_3,auVar4._0_8_ + 1,auVar4._8_4_,param_6,uVar1, extraout_EDX,auVar5._0_8_ + -1,CONCAT44(uStack_64,auVar5._8_4_)); return; } pcVar2 = "m_plus.e == v.e"; uVar3 = 0x454c; } else { pcVar2 = "m_plus.e == m_minus.e"; uVar3 = 0x454b; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
11,425
hi0bits
eloqsql/strings/dtoa.c
static int hi0bits(register ULong x) { register int k= 0; if (!(x & 0xffff0000)) { k= 16; x<<= 16; } if (!(x & 0xff000000)) { k+= 8; x<<= 8; } if (!(x & 0xf0000000)) { k+= 4; x<<= 4; } if (!(x & 0xc0000000)) { k+= 2; x<<= 2; } if (!(x & 0x80000000)) { k++; if (!(x & 0x40000000)) return 32; } return k; }
O3
c
hi0bits: pushq %rbp movq %rsp, %rbp movl %edi, %eax shll $0x10, %eax xorl %ecx, %ecx cmpl $0x10000, %edi # imm = 0x10000 setb %cl cmovael %edi, %eax shll $0x4, %ecx movl %eax, %edx shll $0x8, %edx cmpl $0x1000000, %eax # imm = 0x1000000 cmovael %eax, %edx leal 0x8(%rcx), %eax cmovael %ecx, %eax movl %edx, %ecx shll $0x4, %ecx cmpl $0x10000000, %edx # imm = 0x10000000 cmovael %edx, %ecx leal 0x4(%rax), %edx cmovael %eax, %edx leal (,%rcx,4), %esi movl $0x40000000, %eax # imm = 0x40000000 cmpl %eax, %ecx cmovael %ecx, %esi leal 0x2(%rdx), %ecx cmovael %edx, %ecx leal 0x1(%rcx), %edx cmpl %eax, %esi movl $0x20, %eax cmovael %edx, %eax testl %esi, %esi cmovsl %ecx, %eax popq %rbp retq
hi0bits: push rbp mov rbp, rsp mov eax, edi shl eax, 10h xor ecx, ecx cmp edi, 10000h setb cl cmovnb eax, edi shl ecx, 4 mov edx, eax shl edx, 8 cmp eax, 1000000h cmovnb edx, eax lea eax, [rcx+8] cmovnb eax, ecx mov ecx, edx shl ecx, 4 cmp edx, 10000000h cmovnb ecx, edx lea edx, [rax+4] cmovnb edx, eax lea esi, ds:0[rcx*4] mov eax, 40000000h cmp ecx, eax cmovnb esi, ecx lea ecx, [rdx+2] cmovnb ecx, edx lea edx, [rcx+1] cmp esi, eax mov eax, 20h ; ' ' cmovnb eax, edx test esi, esi cmovs eax, ecx pop rbp retn
long long hi0bits(unsigned int a1) { unsigned int v1; // eax unsigned int v2; // edx bool v3; // cf int v4; // eax unsigned int v5; // ecx bool v6; // cf int v7; // edx int v8; // esi bool v9; // cf unsigned int v10; // ecx long long result; // rax v1 = a1 << 16; if ( a1 >= 0x10000 ) v1 = a1; v2 = v1 << 8; v3 = v1 < 0x1000000; if ( v1 >= 0x1000000 ) v2 = v1; v4 = 16 * (a1 < 0x10000) + 8; if ( !v3 ) v4 = 16 * (a1 < 0x10000); v5 = 16 * v2; v6 = v2 < 0x10000000; if ( v2 >= 0x10000000 ) v5 = v2; v7 = v4 + 4; if ( !v6 ) v7 = v4; v8 = 4 * v5; v9 = v5 < 0x40000000; if ( v5 >= 0x40000000 ) v8 = v5; v10 = v7 + 2; if ( !v9 ) v10 = v7; result = 32LL; if ( (unsigned int)v8 >= 0x40000000 ) result = v10 + 1; if ( v8 < 0 ) return v10; return result; }
hi0bits: PUSH RBP MOV RBP,RSP MOV EAX,EDI SHL EAX,0x10 XOR ECX,ECX CMP EDI,0x10000 SETC CL CMOVNC EAX,EDI SHL ECX,0x4 MOV EDX,EAX SHL EDX,0x8 CMP EAX,0x1000000 CMOVNC EDX,EAX LEA EAX,[RCX + 0x8] CMOVNC EAX,ECX MOV ECX,EDX SHL ECX,0x4 CMP EDX,0x10000000 CMOVNC ECX,EDX LEA EDX,[RAX + 0x4] CMOVNC EDX,EAX LEA ESI,[RCX*0x4] MOV EAX,0x40000000 CMP ECX,EAX CMOVNC ESI,ECX LEA ECX,[RDX + 0x2] CMOVNC ECX,EDX LEA EDX,[RCX + 0x1] CMP ESI,EAX MOV EAX,0x20 CMOVNC EAX,EDX TEST ESI,ESI CMOVS EAX,ECX POP RBP RET
int hi0bits(uint param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; uVar2 = param_1 << 0x10; if (param_1 >= 0x10000) { uVar2 = param_1; } iVar4 = (uint)(param_1 < 0x10000) * 0x10; uVar1 = uVar2 << 8; if (0xffffff < uVar2) { uVar1 = uVar2; } iVar3 = iVar4 + 8; if (0xffffff < uVar2) { iVar3 = iVar4; } uVar2 = uVar1 << 4; if (0xfffffff < uVar1) { uVar2 = uVar1; } iVar4 = iVar3 + 4; if (0xfffffff < uVar1) { iVar4 = iVar3; } uVar1 = uVar2 * 4; if (0x3fffffff < uVar2) { uVar1 = uVar2; } iVar3 = iVar4 + 2; if (0x3fffffff < uVar2) { iVar3 = iVar4; } iVar4 = 0x20; if (0x3fffffff < uVar1) { iVar4 = iVar3 + 1; } if ((int)uVar1 < 0) { iVar4 = iVar3; } return iVar4; }
11,426
my_write_core
eloqsql/mysys/stacktrace.c
void my_write_core(int sig) { #ifdef HAVE_gcov extern void __gcov_flush(void); #endif signal(sig, SIG_DFL); #ifdef HAVE_gcov /* For GCOV build, crashing will prevent the writing of code coverage information from this process, causing gcov output to be incomplete. So we force the writing of coverage information here before terminating. */ __gcov_flush(); #endif pthread_kill(pthread_self(), sig); #if defined(P_MYID) && !defined(SCO) /* On Solaris, the above kill is not enough */ sigsend(P_PID,P_MYID,sig); #endif }
O3
c
my_write_core: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx xorl %esi, %esi callq 0x243f0 callq 0x242b0 movq %rax, %rdi movl %ebx, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x24490 nopl (%rax)
my_write_core: push rbp mov rbp, rsp push rbx push rax mov ebx, edi xor esi, esi call _signal call _pthread_self mov rdi, rax mov esi, ebx add rsp, 8 pop rbx pop rbp jmp _pthread_kill
long long my_write_core(long long a1) { long long v1; // rax signal(a1, 0LL); v1 = pthread_self(a1); return pthread_kill(v1, (unsigned int)a1); }
my_write_core: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI XOR ESI,ESI CALL 0x001243f0 CALL 0x001242b0 MOV RDI,RAX MOV ESI,EBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00124490
void my_write_core(int param_1) { pthread_t __threadid; signal(param_1,(__sighandler_t)0x0); __threadid = pthread_self(); pthread_kill(__threadid,param_1); return; }
11,427
test_truncation_option
eloqsql/tests/mysql_client_test.c
static void test_truncation_option() { MYSQL_STMT *stmt; const char *stmt_text; int rc; uint8 buf; my_bool option= 0; my_bool error; MYSQL_BIND my_bind; myheader("test_truncation_option"); /* Prepare the test table */ stmt_text= "select -1"; stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); bzero((char*) &my_bind, sizeof(my_bind)); my_bind.buffer= (void*) &buf; my_bind.buffer_type= MYSQL_TYPE_TINY; my_bind.is_unsigned= TRUE; my_bind.error= &error; rc= mysql_stmt_bind_result(stmt, &my_bind); check_execute(stmt, rc); rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == MYSQL_DATA_TRUNCATED); DIE_UNLESS(error); rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option); myquery(rc); /* need to rebind for the new setting to take effect */ rc= mysql_stmt_bind_result(stmt, &my_bind); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); rc= mysql_stmt_fetch(stmt); check_execute(stmt, rc); /* The only change is rc - error pointers are still filled in */ DIE_UNLESS(error == 1); /* restore back the defaults */ option= 1; mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option); mysql_stmt_close(stmt); }
O0
c
test_truncation_option: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb $0x0, -0x16(%rbp) jmp 0x739f1 movsbl 0x3f6ad9(%rip), %eax # 0x46a4d1 cmpl $0x2, %eax jge 0x73a79 movq 0x23b5d4(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xba916(%rip), %rsi # 0x12e324 movb $0x0, %al callq 0x3a1c0 movq 0x23b5bc(%rip), %rax # 0x2aefd8 movq (%rax), %rdi movl 0x3f6cf7(%rip), %edx # 0x46a71c movl %edx, %eax addl $0x1, %eax movl %eax, 0x3f6cec(%rip) # 0x46a71c movl 0x3f6ce2(%rip), %ecx # 0x46a718 movl 0x3f6abf(%rip), %r8d # 0x46a4fc leaq 0xbbbe8(%rip), %rsi # 0x12f62c leaq 0xbb43a(%rip), %r9 # 0x12ee85 movb $0x0, %al callq 0x3a1c0 movq 0x23b57f(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xba8f9(%rip), %rsi # 0x12e35c movb $0x0, %al callq 0x3a1c0 movq 0x23b567(%rip), %rax # 0x2aefd8 movq (%rax), %rdi callq 0x3a4a0 leaq 0xc96f2(%rip), %rax # 0x13d172 movq %rax, -0x10(%rbp) movq 0x3f6a4d(%rip), %rdi # 0x46a4d8 callq 0xb2790 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x10(%rbp), %rdi callq 0x3a400 movq -0xa0(%rbp), %rdi movq -0x98(%rbp), %rsi movq %rax, %rdx callq 0x3b810 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73adf movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73ae7 jmp 0x73aff leaq 0xba11e(%rip), %rdi # 0x12dc0c movl $0x3327, %esi # imm = 0x3327 leaq 0xc5d12(%rip), %rdx # 0x13980c callq 0x3c010 movq -0x8(%rbp), %rdi callq 0x3b8a0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73b1e movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73b26 jmp 0x73b3e leaq 0xba0df(%rip), %rdi # 0x12dc0c movl $0x3329, %esi # imm = 0x3329 leaq 0xc5cd3(%rip), %rdx # 0x13980c callq 0x3c010 leaq -0x88(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x3a2e0 leaq -0x15(%rbp), %rax movq %rax, -0x78(%rbp) movl $0x1, -0x28(%rbp) movb $0x1, -0x23(%rbp) leaq -0x17(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x8(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0xb1780 movsbl %al, %eax movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73b95 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73b9d jmp 0x73bb5 leaq 0xba068(%rip), %rdi # 0x12dc0c movl $0x3333, %esi # imm = 0x3333 leaq 0xc5c5c(%rip), %rdx # 0x13980c callq 0x3c010 movq -0x8(%rbp), %rdi callq 0x3b910 movl %eax, -0x14(%rbp) cmpl $0x65, -0x14(%rbp) jne 0x73bc9 jmp 0x73be1 leaq 0xba03c(%rip), %rdi # 0x12dc0c movl $0x3335, %esi # imm = 0x3335 leaq 0xc15de(%rip), %rdx # 0x1351ba callq 0x3c010 movsbl -0x17(%rbp), %eax cmpl $0x0, %eax je 0x73bec jmp 0x73c04 leaq 0xba019(%rip), %rdi # 0x12dc0c movl $0x3336, %esi # imm = 0x3336 leaq 0xd31cf(%rip), %rdx # 0x146dce callq 0x3c010 movq 0x3f68cd(%rip), %rdi # 0x46a4d8 movl $0x13, %esi leaq -0x16(%rbp), %rdx callq 0xa9fb0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x8c(%rbp) cmpl $0x0, -0x8c(%rbp) je 0x73c37 xorl %eax, %eax movl %eax, %edi callq 0x3bf10 cmpl $0x0, -0x8c(%rbp) jne 0x73c42 jmp 0x73c5a leaq 0xb9fc3(%rip), %rdi # 0x12dc0c movl $0x3338, %esi # imm = 0x3338 leaq 0xd031a(%rip), %rdx # 0x143f6f callq 0x3c010 movq -0x8(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0xb1780 movsbl %al, %eax movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73c83 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73c8b jmp 0x73ca3 leaq 0xb9f7a(%rip), %rdi # 0x12dc0c movl $0x333b, %esi # imm = 0x333B leaq 0xc5b6e(%rip), %rdx # 0x13980c callq 0x3c010 movq -0x8(%rbp), %rdi callq 0x3b8a0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73cc2 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73cca jmp 0x73ce2 leaq 0xb9f3b(%rip), %rdi # 0x12dc0c movl $0x333d, %esi # imm = 0x333D leaq 0xc5b2f(%rip), %rdx # 0x13980c callq 0x3c010 movq -0x8(%rbp), %rdi callq 0x3b910 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x73d01 movq -0x8(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x3c0b0 cmpl $0x0, -0x14(%rbp) jne 0x73d09 jmp 0x73d21 leaq 0xb9efc(%rip), %rdi # 0x12dc0c movl $0x333f, %esi # imm = 0x333F leaq 0xc5af0(%rip), %rdx # 0x13980c callq 0x3c010 movsbl -0x17(%rbp), %eax cmpl $0x1, %eax jne 0x73d2c jmp 0x73d44 leaq 0xb9ed9(%rip), %rdi # 0x12dc0c movl $0x3341, %esi # imm = 0x3341 leaq 0xc943d(%rip), %rdx # 0x13d17c callq 0x3c010 movb $0x1, -0x16(%rbp) movq 0x3f6789(%rip), %rdi # 0x46a4d8 movl $0x13, %esi leaq -0x16(%rbp), %rdx callq 0xa9fb0 movq -0x8(%rbp), %rdi callq 0x3b9f0 addq $0xa0, %rsp popq %rbp retq nop
test_truncation_option: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_16], 0 jmp short $+2 loc_739F1: movsx eax, cs:opt_silent cmp eax, 2 jge short loc_73A79 mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E324; "\n\n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] mov edx, cs:test_count mov eax, edx add eax, 1 mov cs:test_count, eax mov ecx, cs:iter_count mov r8d, cs:opt_count lea rsi, aUOfUUS; "%u of (%u/%u): %s" lea r9, aTestTruncation_0; "test_truncation_option" mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E35C; " \n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush loc_73A79: lea rax, aSelect1_0; "select -1" mov [rbp+var_10], rax mov rdi, cs:mysql call mysql_stmt_init mov [rbp+var_8], rax mov rax, [rbp+var_8] mov [rbp+var_A0], rax mov rax, [rbp+var_10] mov [rbp+var_98], rax mov rdi, [rbp+var_10] call _strlen mov rdi, [rbp+var_A0] mov rsi, [rbp+var_98] mov rdx, rax call wrap_mysql_stmt_prepare mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73ADF mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73ADF: cmp [rbp+var_14], 0 jnz short loc_73AE7 jmp short loc_73AFF loc_73AE7: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3327h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73AFF: mov rdi, [rbp+var_8] call wrap_mysql_stmt_execute mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73B1E mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73B1E: cmp [rbp+var_14], 0 jnz short loc_73B26 jmp short loc_73B3E loc_73B26: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3329h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73B3E: lea rdi, [rbp+var_88] xor esi, esi mov edx, 70h ; 'p' call _memset lea rax, [rbp+var_15] mov [rbp+var_78], rax mov [rbp+var_28], 1 mov [rbp+var_23], 1 lea rax, [rbp+var_17] mov [rbp+var_70], rax mov rdi, [rbp+var_8] lea rsi, [rbp+var_88] call mysql_stmt_bind_result movsx eax, al mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73B95 mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73B95: cmp [rbp+var_14], 0 jnz short loc_73B9D jmp short loc_73BB5 loc_73B9D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3333h lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73BB5: mov rdi, [rbp+var_8] call wrap_mysql_stmt_fetch mov [rbp+var_14], eax cmp [rbp+var_14], 65h ; 'e' jnz short loc_73BC9 jmp short loc_73BE1 loc_73BC9: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3335h lea rdx, aRc0RcMysqlData+0Bh; "rc == MYSQL_DATA_TRUNCATED" call die loc_73BE1: movsx eax, [rbp+var_17] cmp eax, 0 jz short loc_73BEC jmp short loc_73C04 loc_73BEC: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3336h lea rdx, aUnknownError+8; "error" call die loc_73C04: mov rdi, cs:mysql mov esi, 13h lea rdx, [rbp+var_16] call mysql_options mov [rbp+var_14], eax mov eax, [rbp+var_14] mov [rbp+var_8C], eax cmp [rbp+var_8C], 0 jz short loc_73C37 xor eax, eax mov edi, eax call print_error loc_73C37: cmp [rbp+var_8C], 0 jnz short loc_73C42 jmp short loc_73C5A loc_73C42: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3338h lea rdx, aTmIYear0+9; "r == 0" call die loc_73C5A: mov rdi, [rbp+var_8] lea rsi, [rbp+var_88] call mysql_stmt_bind_result movsx eax, al mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73C83 mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73C83: cmp [rbp+var_14], 0 jnz short loc_73C8B jmp short loc_73CA3 loc_73C8B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 333Bh lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73CA3: mov rdi, [rbp+var_8] call wrap_mysql_stmt_execute mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73CC2 mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73CC2: cmp [rbp+var_14], 0 jnz short loc_73CCA jmp short loc_73CE2 loc_73CCA: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 333Dh lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73CE2: mov rdi, [rbp+var_8] call wrap_mysql_stmt_fetch mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_73D01 mov rdi, [rbp+var_8] xor eax, eax mov esi, eax call print_st_error loc_73D01: cmp [rbp+var_14], 0 jnz short loc_73D09 jmp short loc_73D21 loc_73D09: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 333Fh lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" call die loc_73D21: movsx eax, [rbp+var_17] cmp eax, 1 jnz short loc_73D2C jmp short loc_73D44 loc_73D2C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 3341h lea rdx, aError1; "error == 1" call die loc_73D44: mov [rbp+var_16], 1 mov rdi, cs:mysql mov esi, 13h lea rdx, [rbp+var_16] call mysql_options mov rdi, [rbp+var_8] call wrap_mysql_stmt_close add rsp, 0A0h pop rbp retn
char test_truncation_option() { int v0; // edx long long v1; // rax char v2; // al char v3; // al int v5; // [rsp+14h] [rbp-8Ch] _BYTE v6[16]; // [rsp+18h] [rbp-88h] BYREF char *v7; // [rsp+28h] [rbp-78h] char *v8; // [rsp+30h] [rbp-70h] int v9; // [rsp+78h] [rbp-28h] char v10; // [rsp+7Dh] [rbp-23h] char v11; // [rsp+89h] [rbp-17h] BYREF char v12; // [rsp+8Ah] [rbp-16h] BYREF char v13; // [rsp+8Bh] [rbp-15h] BYREF int v14; // [rsp+8Ch] [rbp-14h] const char *v15; // [rsp+90h] [rbp-10h] long long v16; // [rsp+98h] [rbp-8h] v12 = 0; if ( opt_silent < 2 ) { fprintf(stdout, "\n\n#####################################\n"); v0 = test_count++; fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_truncation_option"); fprintf(stdout, " \n#####################################\n"); fflush(stdout); } v15 = "select -1"; v16 = mysql_stmt_init(mysql); v1 = strlen("select -1"); if ( (unsigned int)wrap_mysql_stmt_prepare(v16, (long long)"select -1", v1) ) { print_st_error(v16, 0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13095, "rc == 0"); } v14 = wrap_mysql_stmt_execute(v16); if ( v14 ) { print_st_error(v16, 0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13097, "rc == 0"); } memset(v6, 0LL, 112LL); v7 = &v13; v9 = 1; v10 = 1; v8 = &v11; v2 = mysql_stmt_bind_result(v16, v6); v14 = v2; if ( v2 ) print_st_error(v16, 0LL); if ( v14 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13107, "rc == 0"); v14 = wrap_mysql_stmt_fetch(v16); if ( v14 != 101 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13109, "rc == MYSQL_DATA_TRUNCATED"); if ( !v11 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13110, "error"); v14 = mysql_options(mysql, 19LL, &v12); v5 = v14; if ( v14 ) print_error(0LL); if ( v5 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13112, "r == 0"); v3 = mysql_stmt_bind_result(v16, v6); v14 = v3; if ( v3 ) print_st_error(v16, 0LL); if ( v14 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13115, "rc == 0"); v14 = wrap_mysql_stmt_execute(v16); if ( v14 ) print_st_error(v16, 0LL); if ( v14 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13117, "rc == 0"); v14 = wrap_mysql_stmt_fetch(v16); if ( v14 ) print_st_error(v16, 0LL); if ( v14 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13119, "rc == 0"); if ( v11 != 1 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13121, "error == 1"); v12 = 1; mysql_options(mysql, 19LL, &v12); return wrap_mysql_stmt_close(v16); }
test_truncation_option: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV byte ptr [RBP + -0x16],0x0 JMP 0x001739f1 LAB_001739f1: MOVSX EAX,byte ptr [0x0056a4d1] CMP EAX,0x2 JGE 0x00173a79 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e324] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [0x0056a71c] MOV EAX,EDX ADD EAX,0x1 MOV dword ptr [0x0056a71c],EAX MOV ECX,dword ptr [0x0056a718] MOV R8D,dword ptr [0x0056a4fc] LEA RSI,[0x22f62c] LEA R9,[0x22ee85] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e35c] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] CALL 0x0013a4a0 LAB_00173a79: LEA RAX,[0x23d172] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [0x0056a4d8] CALL 0x001b2790 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013a400 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x98] MOV RDX,RAX CALL 0x0013b810 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173adf MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173adf: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173ae7 JMP 0x00173aff LAB_00173ae7: LEA RDI,[0x22dc0c] MOV ESI,0x3327 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173aff: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b8a0 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173b1e MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173b1e: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173b26 JMP 0x00173b3e LAB_00173b26: LEA RDI,[0x22dc0c] MOV ESI,0x3329 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173b3e: LEA RDI,[RBP + -0x88] XOR ESI,ESI MOV EDX,0x70 CALL 0x0013a2e0 LEA RAX,[RBP + -0x15] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0x28],0x1 MOV byte ptr [RBP + -0x23],0x1 LEA RAX,[RBP + -0x17] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x88] CALL 0x001b1780 MOVSX EAX,AL MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173b95 MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173b95: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173b9d JMP 0x00173bb5 LAB_00173b9d: LEA RDI,[0x22dc0c] MOV ESI,0x3333 LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173bb5: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b910 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x65 JNZ 0x00173bc9 JMP 0x00173be1 LAB_00173bc9: LEA RDI,[0x22dc0c] MOV ESI,0x3335 LEA RDX,[0x2351ba] CALL 0x0013c010 LAB_00173be1: MOVSX EAX,byte ptr [RBP + -0x17] CMP EAX,0x0 JZ 0x00173bec JMP 0x00173c04 LAB_00173bec: LEA RDI,[0x22dc0c] MOV ESI,0x3336 LEA RDX,[0x246dce] CALL 0x0013c010 LAB_00173c04: MOV RDI,qword ptr [0x0056a4d8] MOV ESI,0x13 LEA RDX,[RBP + -0x16] CALL 0x001a9fb0 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x8c],EAX CMP dword ptr [RBP + -0x8c],0x0 JZ 0x00173c37 XOR EAX,EAX MOV EDI,EAX CALL 0x0013bf10 LAB_00173c37: CMP dword ptr [RBP + -0x8c],0x0 JNZ 0x00173c42 JMP 0x00173c5a LAB_00173c42: LEA RDI,[0x22dc0c] MOV ESI,0x3338 LEA RDX,[0x243f6f] CALL 0x0013c010 LAB_00173c5a: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x88] CALL 0x001b1780 MOVSX EAX,AL MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173c83 MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173c83: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173c8b JMP 0x00173ca3 LAB_00173c8b: LEA RDI,[0x22dc0c] MOV ESI,0x333b LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173ca3: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b8a0 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173cc2 MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173cc2: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173cca JMP 0x00173ce2 LAB_00173cca: LEA RDI,[0x22dc0c] MOV ESI,0x333d LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173ce2: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b910 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00173d01 MOV RDI,qword ptr [RBP + -0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x0013c0b0 LAB_00173d01: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00173d09 JMP 0x00173d21 LAB_00173d09: LEA RDI,[0x22dc0c] MOV ESI,0x333f LEA RDX,[0x23980c] CALL 0x0013c010 LAB_00173d21: MOVSX EAX,byte ptr [RBP + -0x17] CMP EAX,0x1 JNZ 0x00173d2c JMP 0x00173d44 LAB_00173d2c: LEA RDI,[0x22dc0c] MOV ESI,0x3341 LEA RDX,[0x23d17c] CALL 0x0013c010 LAB_00173d44: MOV byte ptr [RBP + -0x16],0x1 MOV RDI,qword ptr [0x0056a4d8] MOV ESI,0x13 LEA RDX,[RBP + -0x16] CALL 0x001a9fb0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013b9f0 ADD RSP,0xa0 POP RBP RET
void test_truncation_option(void) { char *pcVar1; char cVar2; int8 uVar3; size_t sVar4; ulong uVar5; int1 local_90 [16]; char *local_80; char *local_78; int4 local_30; int1 local_2b; char local_1f [3]; int local_1c; char *local_18; int8 local_10; local_1f[1] = 0; if (opt_silent < '\x02') { fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n"); uVar5 = (ulong)test_count; test_count = test_count + 1; fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar5,(ulong)iter_count, (ulong)opt_count,"test_truncation_option"); fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n"); fflush(*(FILE **)PTR_stdout_003aefd8); } local_18 = "select -1"; uVar3 = mysql_stmt_init(mysql); pcVar1 = local_18; local_10 = uVar3; sVar4 = strlen(local_18); local_1c = wrap_mysql_stmt_prepare(uVar3,pcVar1,sVar4); if (local_1c != 0) { print_st_error(local_10); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3327,"rc == 0"); } local_1c = wrap_mysql_stmt_execute(local_10); if (local_1c != 0) { print_st_error(local_10); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3329,"rc == 0"); } memset(local_90,0,0x70); local_80 = local_1f + 2; local_30 = 1; local_2b = 1; local_78 = local_1f; cVar2 = mysql_stmt_bind_result(local_10,local_90); local_1c = (int)cVar2; if (local_1c != 0) { print_st_error(local_10,0); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3333,"rc == 0"); } local_1c = wrap_mysql_stmt_fetch(local_10); if (local_1c != 0x65) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3335, "rc == MYSQL_DATA_TRUNCATED"); } if (local_1f[0] == '\0') { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3336,"error"); } local_1c = mysql_options(mysql,0x13,local_1f + 1); if (local_1c != 0) { print_error(0); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3338,"r == 0"); } cVar2 = mysql_stmt_bind_result(local_10,local_90); local_1c = (int)cVar2; if (local_1c != 0) { print_st_error(local_10,0); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333b,"rc == 0"); } local_1c = wrap_mysql_stmt_execute(local_10); if (local_1c != 0) { print_st_error(local_10,0); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333d,"rc == 0"); } local_1c = wrap_mysql_stmt_fetch(local_10); if (local_1c != 0) { print_st_error(local_10,0); } if (local_1c != 0) { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333f,"rc == 0"); } if (local_1f[0] != '\x01') { die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3341,"error == 1"); } local_1f[1] = 1; mysql_options(mysql,0x13,local_1f + 1); wrap_mysql_stmt_close(local_10); return; }
11,428
test_truncation_option
eloqsql/tests/mysql_client_test.c
static void test_truncation_option() { MYSQL_STMT *stmt; const char *stmt_text; int rc; uint8 buf; my_bool option= 0; my_bool error; MYSQL_BIND my_bind; myheader("test_truncation_option"); /* Prepare the test table */ stmt_text= "select -1"; stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text)); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); bzero((char*) &my_bind, sizeof(my_bind)); my_bind.buffer= (void*) &buf; my_bind.buffer_type= MYSQL_TYPE_TINY; my_bind.is_unsigned= TRUE; my_bind.error= &error; rc= mysql_stmt_bind_result(stmt, &my_bind); check_execute(stmt, rc); rc= mysql_stmt_fetch(stmt); DIE_UNLESS(rc == MYSQL_DATA_TRUNCATED); DIE_UNLESS(error); rc= mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option); myquery(rc); /* need to rebind for the new setting to take effect */ rc= mysql_stmt_bind_result(stmt, &my_bind); check_execute(stmt, rc); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); rc= mysql_stmt_fetch(stmt); check_execute(stmt, rc); /* The only change is rc - error pointers are still filled in */ DIE_UNLESS(error == 1); /* restore back the defaults */ option= 1; mysql_options(mysql, MYSQL_REPORT_DATA_TRUNCATION, (char*) &option); mysql_stmt_close(stmt); }
O3
c
test_truncation_option: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x88, %rsp movb $0x0, -0xa(%rbp) cmpb $0x1, 0x3b4007(%rip) # 0x41a4c1 jg 0x66535 movq 0x339afd(%rip), %rbx # 0x39ffc0 movq (%rbx), %rdi leaq 0x78ff7(%rip), %rdx # 0xdf4c4 movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi movl 0x3b422a(%rip), %ecx # 0x41a70c leal 0x1(%rcx), %eax movl %eax, 0x3b4221(%rip) # 0x41a70c movl 0x3b4216(%rip), %r8d # 0x41a708 movl 0x3b3ff3(%rip), %r9d # 0x41a4ec leaq 0x79b25(%rip), %rax # 0xe0025 movq %rax, (%rsp) leaq 0x7a2c1(%rip), %rdx # 0xe07cc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi leaq 0x78fdb(%rip), %rdx # 0xdf4fc movl $0x1, %esi xorl %eax, %eax callq 0x39240 movq (%rbx), %rdi callq 0x394b0 movq 0x3b3f8c(%rip), %rdi # 0x41a4c8 callq 0x9191c movq %rax, %rbx leaq 0x87d7e(%rip), %rsi # 0xee2c9 movl $0x9, %edx movq %rax, %rdi callq 0x3b4a1 testl %eax, %eax jne 0x6665d movq %rbx, %rdi callq 0x3b510 testl %eax, %eax jne 0x6667d xorps %xmm0, %xmm0 leaq -0x80(%rbp), %rsi movaps %xmm0, 0x10(%rsi) movaps %xmm0, 0x60(%rsi) movaps %xmm0, 0x50(%rsi) movaps %xmm0, 0x40(%rsi) movaps %xmm0, 0x30(%rsi) movaps %xmm0, 0x20(%rsi) movaps %xmm0, (%rsi) leaq -0xb(%rbp), %rax movq %rax, 0x10(%rsi) movl $0x1, 0x60(%rsi) movb $0x1, 0x65(%rsi) leaq -0x9(%rbp), %rax movq %rax, 0x18(%rsi) movq %rbx, %rdi callq 0x91084 testb %al, %al jne 0x6669d movq %rbx, %rdi callq 0x3b573 cmpl $0x65, %eax jne 0x666bd cmpb $0x0, -0x9(%rbp) je 0x666d5 movq 0x3b3ee9(%rip), %rdi # 0x41a4c8 leaq -0xa(%rbp), %rdx movl $0x13, %esi callq 0x8d1e5 testl %eax, %eax jne 0x666ed leaq -0x80(%rbp), %rsi movq %rbx, %rdi callq 0x91084 testb %al, %al jne 0x6670c movq %rbx, %rdi callq 0x3b510 testl %eax, %eax jne 0x6672c movq %rbx, %rdi callq 0x3b573 testl %eax, %eax jne 0x6674c cmpb $0x1, -0x9(%rbp) jne 0x6676c leaq -0xa(%rbp), %rdx movb $0x1, (%rdx) movq 0x3b3e87(%rip), %rdi # 0x41a4c8 movl $0x13, %esi callq 0x8d1e5 movq %rbx, %rdi callq 0x3b639 addq $0x88, %rsp popq %rbx popq %rbp retq movq %rbx, %rdi callq 0x3bbbe leaq 0x78740(%rip), %rdi # 0xdedac leaq 0x842f4(%rip), %rdx # 0xea967 movl $0x3327, %esi # imm = 0x3327 callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x78720(%rip), %rdi # 0xdedac leaq 0x842d4(%rip), %rdx # 0xea967 movl $0x3329, %esi # imm = 0x3329 callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x78700(%rip), %rdi # 0xdedac leaq 0x842b4(%rip), %rdx # 0xea967 movl $0x3333, %esi # imm = 0x3333 callq 0x3bb30 leaq 0x786e8(%rip), %rdi # 0xdedac leaq 0x7fc83(%rip), %rdx # 0xe634e movl $0x3335, %esi # imm = 0x3335 callq 0x3bb30 leaq 0x786d0(%rip), %rdi # 0xdedac leaq 0x91819(%rip), %rdx # 0xf7efc movl $0x3336, %esi # imm = 0x3336 callq 0x3bb30 xorl %edi, %edi callq 0x3ba57 leaq 0x786b1(%rip), %rdi # 0xdedac leaq 0x8e9bd(%rip), %rdx # 0xf50bf movl $0x3338, %esi # imm = 0x3338 callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x78691(%rip), %rdi # 0xdedac leaq 0x84245(%rip), %rdx # 0xea967 movl $0x333b, %esi # imm = 0x333B callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x78671(%rip), %rdi # 0xdedac leaq 0x84225(%rip), %rdx # 0xea967 movl $0x333d, %esi # imm = 0x333D callq 0x3bb30 movq %rbx, %rdi callq 0x3bbbe leaq 0x78651(%rip), %rdi # 0xdedac leaq 0x84205(%rip), %rdx # 0xea967 movl $0x333f, %esi # imm = 0x333F callq 0x3bb30 leaq 0x78639(%rip), %rdi # 0xdedac leaq 0x87b59(%rip), %rdx # 0xee2d3 movl $0x3341, %esi # imm = 0x3341 callq 0x3bb30
test_truncation_option: push rbp mov rbp, rsp push rbx sub rsp, 88h mov [rbp+var_A], 0 cmp cs:opt_silent, 1 jg short loc_66535 mov rbx, cs:stdout_ptr mov rdi, [rbx] lea rdx, asc_DF4C4; "\n\n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] mov ecx, cs:test_count lea eax, [rcx+1] mov cs:test_count, eax mov r8d, cs:iter_count mov r9d, cs:opt_count lea rax, aTestTruncation_0; "test_truncation_option" mov [rsp+90h+var_90], rax lea rdx, aUOfUUS; "%u of (%u/%u): %s" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] lea rdx, asc_DF4FC; " \n###################################"... mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [rbx] call _fflush loc_66535: mov rdi, cs:mysql call mysql_stmt_init mov rbx, rax lea rsi, aSelect1_0; "select -1" mov edx, 9 mov rdi, rax call wrap_mysql_stmt_prepare test eax, eax jnz loc_6665D mov rdi, rbx call wrap_mysql_stmt_execute test eax, eax jnz loc_6667D xorps xmm0, xmm0 lea rsi, [rbp+var_80] movaps xmmword ptr [rsi+10h], xmm0 movaps xmmword ptr [rsi+60h], xmm0 movaps xmmword ptr [rsi+50h], xmm0 movaps xmmword ptr [rsi+40h], xmm0 movaps xmmword ptr [rsi+30h], xmm0 movaps xmmword ptr [rsi+20h], xmm0 movaps xmmword ptr [rsi], xmm0 lea rax, [rbp+var_B] mov [rsi+10h], rax mov dword ptr [rsi+60h], 1 mov byte ptr [rsi+65h], 1 lea rax, [rbp+var_9] mov [rsi+18h], rax mov rdi, rbx call mysql_stmt_bind_result test al, al jnz loc_6669D mov rdi, rbx call wrap_mysql_stmt_fetch cmp eax, 65h ; 'e' jnz loc_666BD cmp [rbp+var_9], 0 jz loc_666D5 mov rdi, cs:mysql lea rdx, [rbp+var_A] mov esi, 13h call mysql_options test eax, eax jnz loc_666ED lea rsi, [rbp+var_80] mov rdi, rbx call mysql_stmt_bind_result test al, al jnz loc_6670C mov rdi, rbx call wrap_mysql_stmt_execute test eax, eax jnz loc_6672C mov rdi, rbx call wrap_mysql_stmt_fetch test eax, eax jnz loc_6674C cmp [rbp+var_9], 1 jnz loc_6676C lea rdx, [rbp+var_A] mov byte ptr [rdx], 1 mov rdi, cs:mysql mov esi, 13h call mysql_options mov rdi, rbx call wrap_mysql_stmt_close add rsp, 88h pop rbx pop rbp retn loc_6665D: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3327h call die loc_6667D: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3329h call die loc_6669D: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 3333h call die loc_666BD: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRc0RcMysqlData+0Bh; "rc == MYSQL_DATA_TRUNCATED" mov esi, 3335h call die loc_666D5: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aUnknownError+8; "error" mov esi, 3336h call die loc_666ED: xor edi, edi call print_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aTmIYear0+9; "r == 0" mov esi, 3338h call die loc_6670C: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 333Bh call die loc_6672C: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 333Dh call die loc_6674C: mov rdi, rbx call print_st_error lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aRcMysqlDataTru+1Eh; "rc == 0" mov esi, 333Fh call die loc_6676C: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, aError1; "error == 1" mov esi, 3341h call die
char test_truncation_option() { int v0; // ecx long long v1; // rbx long long v2; // rdx long long v3; // rcx long long v4; // rdx long long v5; // rcx __int128 v7; // [rsp+10h] [rbp-80h] BYREF char *v8; // [rsp+20h] [rbp-70h] char *v9; // [rsp+28h] [rbp-68h] __int128 v10; // [rsp+30h] [rbp-60h] __int128 v11; // [rsp+40h] [rbp-50h] __int128 v12; // [rsp+50h] [rbp-40h] __int128 v13; // [rsp+60h] [rbp-30h] __int128 v14; // [rsp+70h] [rbp-20h] char v15; // [rsp+85h] [rbp-Bh] BYREF char v16; // [rsp+86h] [rbp-Ah] BYREF char v17; // [rsp+87h] [rbp-9h] BYREF v16 = 0; if ( opt_silent <= 1 ) { __fprintf_chk(stdout, 1LL, "\n\n#####################################\n"); v0 = test_count++; __fprintf_chk(stdout, 1LL, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_truncation_option"); __fprintf_chk(stdout, 1LL, " \n#####################################\n"); fflush(stdout); } v1 = mysql_stmt_init(mysql); if ( (unsigned int)wrap_mysql_stmt_prepare(v1, (long long)"select -1", 9LL) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13095, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_execute(v1) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13097, "rc == 0"); } v14 = 0LL; v13 = 0LL; v12 = 0LL; v11 = 0LL; v10 = 0LL; v7 = 0LL; v8 = &v15; LODWORD(v14) = 1; BYTE5(v14) = 1; v9 = &v17; if ( (unsigned __int8)mysql_stmt_bind_result(v1, &v7, v2, v3) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13107, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_fetch(v1) != 101 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13109, "rc == MYSQL_DATA_TRUNCATED"); if ( !v17 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13110, "error"); if ( (unsigned int)mysql_options(mysql, 19LL, &v16) ) { print_error(0LL); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13112, "r == 0"); } if ( (unsigned __int8)mysql_stmt_bind_result(v1, &v7, v4, v5) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13115, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_execute(v1) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13117, "rc == 0"); } if ( (unsigned int)wrap_mysql_stmt_fetch(v1) ) { print_st_error(v1); die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13119, "rc == 0"); } if ( v17 != 1 ) die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 13121, "error == 1"); v16 = 1; mysql_options(mysql, 19LL, &v16); return wrap_mysql_stmt_close(v1); }
test_truncation_option: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x88 MOV byte ptr [RBP + -0xa],0x0 CMP byte ptr [0x0051a4c1],0x1 JG 0x00166535 MOV RBX,qword ptr [0x0049ffc0] MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4c4] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] MOV ECX,dword ptr [0x0051a70c] LEA EAX,[RCX + 0x1] MOV dword ptr [0x0051a70c],EAX MOV R8D,dword ptr [0x0051a708] MOV R9D,dword ptr [0x0051a4ec] LEA RAX,[0x1e0025] MOV qword ptr [RSP],RAX LEA RDX,[0x1e07cc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] LEA RDX,[0x1df4fc] MOV ESI,0x1 XOR EAX,EAX CALL 0x00139240 MOV RDI,qword ptr [RBX] CALL 0x001394b0 LAB_00166535: MOV RDI,qword ptr [0x0051a4c8] CALL 0x0019191c MOV RBX,RAX LEA RSI,[0x1ee2c9] MOV EDX,0x9 MOV RDI,RAX CALL 0x0013b4a1 TEST EAX,EAX JNZ 0x0016665d MOV RDI,RBX CALL 0x0013b510 TEST EAX,EAX JNZ 0x0016667d XORPS XMM0,XMM0 LEA RSI,[RBP + -0x80] MOVAPS xmmword ptr [RSI + 0x10],XMM0 MOVAPS xmmword ptr [RSI + 0x60],XMM0 MOVAPS xmmword ptr [RSI + 0x50],XMM0 MOVAPS xmmword ptr [RSI + 0x40],XMM0 MOVAPS xmmword ptr [RSI + 0x30],XMM0 MOVAPS xmmword ptr [RSI + 0x20],XMM0 MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[RBP + -0xb] MOV qword ptr [RSI + 0x10],RAX MOV dword ptr [RSI + 0x60],0x1 MOV byte ptr [RSI + 0x65],0x1 LEA RAX,[RBP + -0x9] MOV qword ptr [RSI + 0x18],RAX MOV RDI,RBX CALL 0x00191084 TEST AL,AL JNZ 0x0016669d MOV RDI,RBX CALL 0x0013b573 CMP EAX,0x65 JNZ 0x001666bd CMP byte ptr [RBP + -0x9],0x0 JZ 0x001666d5 MOV RDI,qword ptr [0x0051a4c8] LEA RDX,[RBP + -0xa] MOV ESI,0x13 CALL 0x0018d1e5 TEST EAX,EAX JNZ 0x001666ed LEA RSI,[RBP + -0x80] MOV RDI,RBX CALL 0x00191084 TEST AL,AL JNZ 0x0016670c MOV RDI,RBX CALL 0x0013b510 TEST EAX,EAX JNZ 0x0016672c MOV RDI,RBX CALL 0x0013b573 TEST EAX,EAX JNZ 0x0016674c CMP byte ptr [RBP + -0x9],0x1 JNZ 0x0016676c LEA RDX,[RBP + -0xa] MOV byte ptr [RDX],0x1 MOV RDI,qword ptr [0x0051a4c8] MOV ESI,0x13 CALL 0x0018d1e5 MOV RDI,RBX CALL 0x0013b639 ADD RSP,0x88 POP RBX POP RBP RET LAB_0016665d: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3327 CALL 0x0013bb30 LAB_0016667d: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3329 CALL 0x0013bb30 LAB_0016669d: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x3333 CALL 0x0013bb30 LAB_001666bd: LEA RDI,[0x1dedac] LEA RDX,[0x1e634e] MOV ESI,0x3335 CALL 0x0013bb30 LAB_001666d5: LEA RDI,[0x1dedac] LEA RDX,[0x1f7efc] MOV ESI,0x3336 CALL 0x0013bb30 LAB_001666ed: XOR EDI,EDI CALL 0x0013ba57 LEA RDI,[0x1dedac] LEA RDX,[0x1f50bf] MOV ESI,0x3338 CALL 0x0013bb30 LAB_0016670c: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x333b CALL 0x0013bb30 LAB_0016672c: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x333d CALL 0x0013bb30 LAB_0016674c: MOV RDI,RBX CALL 0x0013bbbe LEA RDI,[0x1dedac] LEA RDX,[0x1ea967] MOV ESI,0x333f CALL 0x0013bb30 LAB_0016676c: LEA RDI,[0x1dedac] LEA RDX,[0x1ee2d3] MOV ESI,0x3341 CALL 0x0013bb30
void test_truncation_option(void) { int *puVar1; char cVar2; int iVar3; int8 uVar4; int8 local_88; int8 uStack_80; int1 *local_78; char *pcStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; int1 local_13; int1 local_12; char local_11; puVar1 = PTR_stdout_0049ffc0; local_12 = 0; if (opt_silent < '\x02') { __fprintf_chk(*(int8 *)PTR_stdout_0049ffc0,1,"\n\n#####################################\n" ); iVar3 = test_count; test_count = test_count + 1; __fprintf_chk(*(int8 *)puVar1,1,"%u of (%u/%u): %s",iVar3,iter_count,opt_count, "test_truncation_option"); __fprintf_chk(*(int8 *)puVar1,1," \n#####################################\n"); fflush(*(FILE **)puVar1); } uVar4 = mysql_stmt_init(mysql); iVar3 = wrap_mysql_stmt_prepare(uVar4,"select -1",9); if (iVar3 != 0) { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3327,"rc == 0"); } iVar3 = wrap_mysql_stmt_execute(uVar4); if (iVar3 != 0) { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3329,"rc == 0"); } uStack_20 = 0; local_38 = 0; uStack_30 = 0; local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_88 = 0; uStack_80 = 0; local_78 = &local_13; local_28 = 0x10000000001; pcStack_70 = &local_11; cVar2 = mysql_stmt_bind_result(uVar4); if (cVar2 != '\0') { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3333,"rc == 0"); } iVar3 = wrap_mysql_stmt_fetch(uVar4); if (iVar3 != 0x65) { /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3335, "rc == MYSQL_DATA_TRUNCATED"); } if (local_11 == '\0') { /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3336,"error"); } iVar3 = mysql_options(mysql,0x13,&local_12); if (iVar3 != 0) { print_error(0); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3338,"r == 0"); } cVar2 = mysql_stmt_bind_result(uVar4,&local_88); if (cVar2 == '\0') { iVar3 = wrap_mysql_stmt_execute(uVar4); if (iVar3 != 0) { print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333d,"rc == 0"); } iVar3 = wrap_mysql_stmt_fetch(uVar4); if (iVar3 == 0) { if (local_11 == '\x01') { local_12 = 1; mysql_options(mysql,0x13); wrap_mysql_stmt_close(uVar4); return; } /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3341,"error == 1"); } print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333f,"rc == 0"); } print_st_error(uVar4); /* WARNING: Subroutine does not return */ die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x333b,"rc == 0"); }
11,429
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp
void unload_backend(ggml_backend_reg_t reg, bool silent) { auto it = std::find_if(backends.begin(), backends.end(), [reg](const ggml_backend_reg_entry & entry) { return entry.reg == reg; }); if (it == backends.end()) { if (!silent) { GGML_LOG_ERROR("%s: backend not found\n", __func__); } return; } if (!silent) { GGML_LOG_DEBUG("%s: unloading %s backend\n", __func__, ggml_backend_reg_name(reg)); } // remove devices devices.erase( std::remove_if(devices.begin(), devices.end(), [reg](ggml_backend_dev_t dev) { return ggml_backend_dev_backend_reg(dev) == reg; }), devices.end()); // remove backend backends.erase(it); }
O1
cpp
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rdi movq 0x8(%rbx), %rsi movq %r15, %rdx callq 0x6770 cmpq 0x8(%rbx), %rax je 0x8d1d movq %rax, %r14 testb %bpl, %bpl jne 0x8cd9 movq %r15, %rdi callq 0x65c0 leaq 0x3a89(%rip), %rsi # 0xc74c leaq 0x3a73(%rip), %rdx # 0xc73d movl $0x1, %edi movq %rax, %rcx xorl %eax, %eax callq 0x6220 movq 0x18(%rbx), %rdi movq 0x20(%rbx), %rsi movq %r15, %rdx callq 0x67b0 movq 0x20(%rbx), %rcx cmpq %rcx, %rax je 0x8d08 movq 0x20(%rbx), %rdx movq %rdx, %rsi subq %rcx, %rsi addq %rsi, %rax cmpq %rax, %rdx je 0x8d08 movq %rax, 0x20(%rbx) movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6840 testb %bpl, %bpl je 0x8d2d addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x39f2(%rip), %rsi # 0xc726 leaq 0x3a02(%rip), %rdx # 0xc73d movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6220 nop
_ZN21ggml_backend_registry14unload_backendEP16ggml_backend_regb: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov r15, rsi mov rbx, rdi mov rdi, [rdi] mov rsi, [rbx+8] mov rdx, r15 call __ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIP22ggml_backend_reg_entrySt6vectorIS2_SaIS2_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlRKS2_E_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+8] jz short loc_8D1D mov r14, rax test bpl, bpl jnz short loc_8CD9 mov rdi, r15 call _ggml_backend_reg_name lea rsi, aSUnloadingSBac; "%s: unloading %s backend\n" lea rdx, aUnloadBackend; "unload_backend" mov edi, 1 mov rcx, rax xor eax, eax call _ggml_log_internal loc_8CD9: mov rdi, [rbx+18h] mov rsi, [rbx+20h] mov rdx, r15 call __ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPP19ggml_backend_deviceSt6vectorIS3_SaIS3_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlS3_E_EEET_SG_SG_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>) mov rcx, [rbx+20h] cmp rax, rcx jz short loc_8D08 mov rdx, [rbx+20h] mov rsi, rdx sub rsi, rcx add rax, rsi cmp rdx, rax jz short loc_8D08 mov [rbx+20h], rax loc_8D08: mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp __ZNSt6vectorI22ggml_backend_reg_entrySaIS0_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS0_S2_EE; std::vector<ggml_backend_reg_entry>::_M_erase(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry*,std::vector<ggml_backend_reg_entry>>) loc_8D1D: test bpl, bpl jz short loc_8D2D add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_8D2D: lea rsi, aSBackendNotFou; "%s: backend not found\n" lea rdx, aUnloadBackend; "unload_backend" mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ggml_log_internal
long long ggml_backend_registry::unload_backend(_QWORD *a1, long long a2, char a3) { long long result; // rax long long v5; // r14 const char *v6; // rax long long v7; // rax result = std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>( *a1, a1[1], a2); if ( result == a1[1] ) { if ( !a3 ) return ggml_log_internal(4LL, "%s: backend not found\n", "unload_backend"); } else { v5 = result; if ( !a3 ) { v6 = (const char *)ggml_backend_reg_name(a2); ggml_log_internal(1LL, "%s: unloading %s backend\n", "unload_backend", v6); } v7 = std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>( a1[3], a1[4], a2); if ( v7 != a1[4] ) a1[4] = v7; return std::vector<ggml_backend_reg_entry>::_M_erase(a1, v5); } return result; }
unload_backend: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI] MOV RSI,qword ptr [RBX + 0x8] MOV RDX,R15 CALL 0x00106770 CMP RAX,qword ptr [RBX + 0x8] JZ 0x00108d1d MOV R14,RAX TEST BPL,BPL JNZ 0x00108cd9 MOV RDI,R15 CALL 0x001065c0 LEA RSI,[0x10c74c] LEA RDX,[0x10c73d] MOV EDI,0x1 MOV RCX,RAX XOR EAX,EAX CALL 0x00106220 LAB_00108cd9: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x20] MOV RDX,R15 CALL 0x001067b0 MOV RCX,qword ptr [RBX + 0x20] CMP RAX,RCX JZ 0x00108d08 MOV RDX,qword ptr [RBX + 0x20] MOV RSI,RDX SUB RSI,RCX ADD RAX,RSI CMP RDX,RAX JZ 0x00108d08 MOV qword ptr [RBX + 0x20],RAX LAB_00108d08: MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00106840 LAB_00108d1d: TEST BPL,BPL JZ 0x00108d2d ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00108d2d: LEA RSI,[0x10c726] LEA RDX,[0x10c73d] MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00106220
/* ggml_backend_registry::unload_backend(ggml_backend_reg*, bool) */ void __thiscall ggml_backend_registry::unload_backend (ggml_backend_registry *this,ggml_backend_reg *param_1,bool param_2) { long lVar1; int8 uVar2; long lVar3; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry*,std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_reg_entry_const&)_1_>> (*(int8 *)this,*(int8 *)(this + 8),param_1); if (lVar1 != *(long *)(this + 8)) { if (!param_2) { uVar2 = ggml_backend_reg_name(param_1); ggml_log_internal(1,"%s: unloading %s backend\n","unload_backend",uVar2); } lVar3 = std:: __remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device**,std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_device*)_1_>> (*(int8 *)(this + 0x18),*(int8 *)(this + 0x20),param_1); if (lVar3 != *(long *)(this + 0x20)) { lVar3 = lVar3 + (*(long *)(this + 0x20) - *(long *)(this + 0x20)); if (*(long *)(this + 0x20) != lVar3) { *(long *)(this + 0x20) = lVar3; } } std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>::_M_erase ((vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>> *)this,lVar1); return; } if (param_2) { return; } ggml_log_internal(4,"%s: backend not found\n","unload_backend"); return; }
11,430
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp
void unload_backend(ggml_backend_reg_t reg, bool silent) { auto it = std::find_if(backends.begin(), backends.end(), [reg](const ggml_backend_reg_entry & entry) { return entry.reg == reg; }); if (it == backends.end()) { if (!silent) { GGML_LOG_ERROR("%s: backend not found\n", __func__); } return; } if (!silent) { GGML_LOG_DEBUG("%s: unloading %s backend\n", __func__, ggml_backend_reg_name(reg)); } // remove devices devices.erase( std::remove_if(devices.begin(), devices.end(), [reg](ggml_backend_dev_t dev) { return ggml_backend_dev_backend_reg(dev) == reg; }), devices.end()); // remove backend backends.erase(it); }
O2
cpp
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rdi movq 0x8(%rbx), %rsi movq %r15, %rdx callq 0xadb0 cmpq 0x8(%rbx), %rax je 0xc678 movq %rax, %r14 testb %bpl, %bpl jne 0xc642 movq %r15, %rdi callq 0xa9b0 leaq 0x4360(%rip), %rsi # 0x1098e leaq 0x434a(%rip), %rdx # 0x1097f pushq $0x1 popq %rdi movq %rax, %rcx xorl %eax, %eax callq 0xa3b0 leaq 0x18(%rbx), %r12 movq 0x18(%rbx), %rdi movq 0x20(%rbx), %rsi movq %r15, %rdx callq 0xae10 movq 0x20(%rbx), %rdx movq %r12, %rdi movq %rax, %rsi callq 0xa680 movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0xa500 testb %bpl, %bpl je 0xc686 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x42db(%rip), %rsi # 0x10968 leaq 0x42eb(%rip), %rdx # 0x1097f pushq $0x4 popq %rdi xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0xa3b0
_ZN21ggml_backend_registry14unload_backendEP16ggml_backend_regb: push rbp push r15 push r14 push r12 push rbx mov ebp, edx mov r15, rsi mov rbx, rdi mov rdi, [rdi] mov rsi, [rbx+8] mov rdx, r15 call __ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIP22ggml_backend_reg_entrySt6vectorIS2_SaIS2_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlRKS2_E_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+8] jz short loc_C678 mov r14, rax test bpl, bpl jnz short loc_C642 mov rdi, r15 call _ggml_backend_reg_name lea rsi, aSUnloadingSBac; "%s: unloading %s backend\n" lea rdx, aUnloadBackend; "unload_backend" push 1 pop rdi mov rcx, rax xor eax, eax call _ggml_log_internal loc_C642: lea r12, [rbx+18h] mov rdi, [rbx+18h] mov rsi, [rbx+20h] mov rdx, r15 call __ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPP19ggml_backend_deviceSt6vectorIS3_SaIS3_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlS3_E_EEET_SG_SG_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>) mov rdx, [rbx+20h] mov rdi, r12 mov rsi, rax call __ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EES8_; std::vector<ggml_backend_device *>::erase(__gnu_cxx::__normal_iterator<ggml_backend_device * const*,std::vector<ggml_backend_device *>>,__gnu_cxx::__normal_iterator<ggml_backend_device * const*,std::vector<ggml_backend_device *>>) mov rdi, rbx mov rsi, r14 pop rbx pop r12 pop r14 pop r15 pop rbp jmp __ZNSt6vectorI22ggml_backend_reg_entrySaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE; std::vector<ggml_backend_reg_entry>::erase(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry const*,std::vector<ggml_backend_reg_entry>>) loc_C678: test bpl, bpl jz short loc_C686 pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_C686: lea rsi, aSBackendNotFou; "%s: backend not found\n" lea rdx, aUnloadBackend; "unload_backend" push 4 pop rdi xor eax, eax pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ggml_log_internal
long long ggml_backend_registry::unload_backend(_QWORD *a1, long long a2, char a3) { long long result; // rax long long v5; // r14 const char *v6; // rax long long v7; // rax result = std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>( *a1, a1[1], a2); if ( result == a1[1] ) { if ( !a3 ) return ggml_log_internal(4LL, "%s: backend not found\n", "unload_backend"); } else { v5 = result; if ( !a3 ) { v6 = (const char *)ggml_backend_reg_name(a2); ggml_log_internal(1LL, "%s: unloading %s backend\n", "unload_backend", v6); } v7 = std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>( a1[3], a1[4], a2); std::vector<ggml_backend_device *>::erase(a1 + 3, v7, a1[4]); return std::vector<ggml_backend_reg_entry>::erase(a1, v5); } return result; }
unload_backend: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI] MOV RSI,qword ptr [RBX + 0x8] MOV RDX,R15 CALL 0x0010adb0 CMP RAX,qword ptr [RBX + 0x8] JZ 0x0010c678 MOV R14,RAX TEST BPL,BPL JNZ 0x0010c642 MOV RDI,R15 CALL 0x0010a9b0 LEA RSI,[0x11098e] LEA RDX,[0x11097f] PUSH 0x1 POP RDI MOV RCX,RAX XOR EAX,EAX CALL 0x0010a3b0 LAB_0010c642: LEA R12,[RBX + 0x18] MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x20] MOV RDX,R15 CALL 0x0010ae10 MOV RDX,qword ptr [RBX + 0x20] MOV RDI,R12 MOV RSI,RAX CALL 0x0010a680 MOV RDI,RBX MOV RSI,R14 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0010a500 LAB_0010c678: TEST BPL,BPL JZ 0x0010c686 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010c686: LEA RSI,[0x110968] LEA RDX,[0x11097f] PUSH 0x4 POP RDI XOR EAX,EAX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0010a3b0
/* ggml_backend_registry::unload_backend(ggml_backend_reg*, bool) */ void __thiscall ggml_backend_registry::unload_backend (ggml_backend_registry *this,ggml_backend_reg *param_1,bool param_2) { long lVar1; int8 uVar2; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry*,std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_reg_entry_const&)_1_>> (*(int8 *)this,*(int8 *)(this + 8),param_1); if (lVar1 != *(long *)(this + 8)) { if (!param_2) { uVar2 = ggml_backend_reg_name(param_1); ggml_log_internal(1,"%s: unloading %s backend\n","unload_backend",uVar2); } uVar2 = std:: __remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device**,std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_device*)_1_>> (*(int8 *)(this + 0x18),*(int8 *)(this + 0x20),param_1); std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::erase ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)(this + 0x18), uVar2,*(int8 *)(this + 0x20)); std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>::erase ((vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>> *)this,lVar1); return; } if (param_2) { return; } ggml_log_internal(4,"%s: backend not found\n","unload_backend"); return; }
11,431
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend-reg.cpp
void unload_backend(ggml_backend_reg_t reg, bool silent) { auto it = std::find_if(backends.begin(), backends.end(), [reg](const ggml_backend_reg_entry & entry) { return entry.reg == reg; }); if (it == backends.end()) { if (!silent) { GGML_LOG_ERROR("%s: backend not found\n", __func__); } return; } if (!silent) { GGML_LOG_DEBUG("%s: unloading %s backend\n", __func__, ggml_backend_reg_name(reg)); } // remove devices devices.erase( std::remove_if(devices.begin(), devices.end(), [reg](ggml_backend_dev_t dev) { return ggml_backend_dev_backend_reg(dev) == reg; }), devices.end()); // remove backend backends.erase(it); }
O3
cpp
ggml_backend_registry::unload_backend(ggml_backend_reg*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx movq (%rdi), %rdi movq 0x8(%rbx), %rsi movq %r15, %rdx callq 0x6770 cmpq 0x8(%rbx), %rax je 0x8d58 movq %rax, %r14 testb %bpl, %bpl jne 0x8d29 movq %r15, %rdi callq 0x65c0 leaq 0x3a39(%rip), %rsi # 0xc74c leaq 0x3a23(%rip), %rdx # 0xc73d movl $0x1, %edi movq %rax, %rcx xorl %eax, %eax callq 0x6220 movq 0x18(%rbx), %rdi movq 0x20(%rbx), %rsi movq %r15, %rdx callq 0x67b0 cmpq 0x20(%rbx), %rax je 0x8d43 movq %rax, 0x20(%rbx) movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6840 testb %bpl, %bpl je 0x8d68 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x39b7(%rip), %rsi # 0xc726 leaq 0x39c7(%rip), %rdx # 0xc73d movl $0x4, %edi xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6220
_ZN21ggml_backend_registry14unload_backendEP16ggml_backend_regb: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov r15, rsi mov rbx, rdi mov rdi, [rdi] mov rsi, [rbx+8] mov rdx, r15 call __ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIP22ggml_backend_reg_entrySt6vectorIS2_SaIS2_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlRKS2_E_EEET_SH_SH_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+8] jz short loc_8D58 mov r14, rax test bpl, bpl jnz short loc_8D29 mov rdi, r15 call _ggml_backend_reg_name lea rsi, aSUnloadingSBac; "%s: unloading %s backend\n" lea rdx, aUnloadBackend; "unload_backend" mov edi, 1 mov rcx, rax xor eax, eax call _ggml_log_internal loc_8D29: mov rdi, [rbx+18h] mov rsi, [rbx+20h] mov rdx, r15 call __ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPP19ggml_backend_deviceSt6vectorIS3_SaIS3_EEEENS0_5__ops10_Iter_predIZN21ggml_backend_registry14unload_backendEP16ggml_backend_regbEUlS3_E_EEET_SG_SG_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>(__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>) cmp rax, [rbx+20h] jz short loc_8D43 mov [rbx+20h], rax loc_8D43: mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp __ZNSt6vectorI22ggml_backend_reg_entrySaIS0_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS0_S2_EE; std::vector<ggml_backend_reg_entry>::_M_erase(__gnu_cxx::__normal_iterator<ggml_backend_reg_entry*,std::vector<ggml_backend_reg_entry>>) loc_8D58: test bpl, bpl jz short loc_8D68 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_8D68: lea rsi, aSBackendNotFou; "%s: backend not found\n" lea rdx, aUnloadBackend; "unload_backend" mov edi, 4 xor eax, eax add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _ggml_log_internal
long long ggml_backend_registry::unload_backend(_QWORD *a1, long long a2, char a3) { long long result; // rax long long v5; // r14 const char *v6; // rax long long v7; // rax result = std::__find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry *,std::vector<ggml_backend_reg_entry>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_reg_entry const&)#1}>>( *a1, a1[1], a2); if ( result == a1[1] ) { if ( !a3 ) return ggml_log_internal(4LL, "%s: backend not found\n", "unload_backend"); } else { v5 = result; if ( !a3 ) { v6 = (const char *)ggml_backend_reg_name(a2); ggml_log_internal(1LL, "%s: unloading %s backend\n", "unload_backend", v6); } v7 = std::__remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg *,bool)::{lambda(ggml_backend_device *)#1}>>( a1[3], a1[4], a2); if ( v7 != a1[4] ) a1[4] = v7; return std::vector<ggml_backend_reg_entry>::_M_erase(a1, v5); } return result; }
unload_backend: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI] MOV RSI,qword ptr [RBX + 0x8] MOV RDX,R15 CALL 0x00106770 CMP RAX,qword ptr [RBX + 0x8] JZ 0x00108d58 MOV R14,RAX TEST BPL,BPL JNZ 0x00108d29 MOV RDI,R15 CALL 0x001065c0 LEA RSI,[0x10c74c] LEA RDX,[0x10c73d] MOV EDI,0x1 MOV RCX,RAX XOR EAX,EAX CALL 0x00106220 LAB_00108d29: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x20] MOV RDX,R15 CALL 0x001067b0 CMP RAX,qword ptr [RBX + 0x20] JZ 0x00108d43 MOV qword ptr [RBX + 0x20],RAX LAB_00108d43: MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00106840 LAB_00108d58: TEST BPL,BPL JZ 0x00108d68 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00108d68: LEA RSI,[0x10c726] LEA RDX,[0x10c73d] MOV EDI,0x4 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00106220
/* ggml_backend_registry::unload_backend(ggml_backend_reg*, bool) */ void __thiscall ggml_backend_registry::unload_backend (ggml_backend_registry *this,ggml_backend_reg *param_1,bool param_2) { long lVar1; int8 uVar2; long lVar3; lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<ggml_backend_reg_entry*,std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_reg_entry_const&)_1_>> (*(int8 *)this,*(int8 *)(this + 8),param_1); if (lVar1 != *(long *)(this + 8)) { if (!param_2) { uVar2 = ggml_backend_reg_name(param_1); ggml_log_internal(1,"%s: unloading %s backend\n","unload_backend",uVar2); } lVar3 = std:: __remove_if<__gnu_cxx::__normal_iterator<ggml_backend_device**,std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>>,__gnu_cxx::__ops::_Iter_pred<ggml_backend_registry::unload_backend(ggml_backend_reg*,bool)::_lambda(ggml_backend_device*)_1_>> (*(int8 *)(this + 0x18),*(int8 *)(this + 0x20),param_1); if (lVar3 != *(long *)(this + 0x20)) { *(long *)(this + 0x20) = lVar3; } std::vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>>::_M_erase ((vector<ggml_backend_reg_entry,std::allocator<ggml_backend_reg_entry>> *)this,lVar1); return; } if (param_2) { return; } ggml_log_internal(4,"%s: backend not found\n","unload_backend"); return; }
11,432
copy_to_read_buffer
eloqsql/mysys/mf_iocache.c
static void copy_to_read_buffer(IO_CACHE *write_cache, const uchar *write_buffer, my_off_t pos_in_file) { size_t write_length= (size_t) (write_cache->pos_in_file - pos_in_file); IO_CACHE_SHARE *cshare= write_cache->share; DBUG_ASSERT(cshare->source_cache == write_cache); /* write_length is usually less or equal to buffer_length. It can be bigger if _my_b_cache_write_r() is called with a big length. */ while (write_length) { size_t copy_length= MY_MIN(write_length, write_cache->buffer_length); int __attribute__((unused)) rc; rc= lock_io_cache(write_cache, pos_in_file); /* The writing thread does always have the lock when it awakes. */ DBUG_ASSERT(rc); memcpy(cshare->buffer, write_buffer, copy_length); cshare->error= 0; cshare->read_end= cshare->buffer + copy_length; cshare->pos_in_file= pos_in_file; /* Mark all threads as running and wake them. */ unlock_io_cache(write_cache); write_buffer+= copy_length; write_length-= copy_length; } }
O0
c
copy_to_read_buffer: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax subq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x28(%rbp) jmp 0xe8144 jmp 0xe8146 cmpq $0x0, -0x20(%rbp) je 0xe820d movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0xe8(%rcx), %rax jae 0xe816c movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xe817b movq -0x8(%rbp), %rax movq 0xe8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xe7df0 movl %eax, -0x34(%rbp) jmp 0xe8195 movq -0x28(%rbp), %rax movq 0xc8(%rax), %rdi movq -0x10(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x2a0b0 movq -0x28(%rbp), %rax movl $0x0, 0xe0(%rax) movq -0x28(%rbp), %rax movq 0xc8(%rax), %rcx addq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0xd0(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x8(%rbp), %rdi callq 0xe8050 movq -0x30(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0xe8146 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
copy_to_read_buffer: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] sub rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rbp+var_28], rax jmp short $+2 loc_E8144: jmp short $+2 loc_E8146: cmp [rbp+var_20], 0 jz loc_E820D mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+0E8h] jnb short loc_E816C mov rax, [rbp+var_20] mov [rbp+var_40], rax jmp short loc_E817B loc_E816C: mov rax, [rbp+var_8] mov rax, [rax+0E8h] mov [rbp+var_40], rax loc_E817B: mov rax, [rbp+var_40] mov [rbp+var_30], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call lock_io_cache mov [rbp+var_34], eax jmp short $+2 loc_E8195: mov rax, [rbp+var_28] mov rdi, [rax+0C8h] mov rsi, [rbp+var_10] mov rdx, [rbp+var_30] call _memcpy mov rax, [rbp+var_28] mov dword ptr [rax+0E0h], 0 mov rax, [rbp+var_28] mov rcx, [rax+0C8h] add rcx, [rbp+var_30] mov rax, [rbp+var_28] mov [rax+0D0h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+0B8h], rcx mov rdi, [rbp+var_8] call unlock_io_cache mov rax, [rbp+var_30] add rax, [rbp+var_10] mov [rbp+var_10], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax jmp loc_E8146 loc_E820D: add rsp, 40h pop rbp retn
unsigned long long copy_to_read_buffer(_QWORD *a1, long long a2, unsigned long long a3) { unsigned long long result; // rax unsigned long long v4; // [rsp+0h] [rbp-40h] unsigned long long v5; // [rsp+18h] [rbp-28h] unsigned long long v6; // [rsp+20h] [rbp-20h] v6 = *a1 - a3; result = a1[19]; v5 = result; while ( v6 ) { if ( v6 >= a1[29] ) v4 = a1[29]; else v4 = v6; lock_io_cache((long long)a1, a3); memcpy(*(_QWORD *)(v5 + 200), a2, v4); *(_DWORD *)(v5 + 224) = 0; *(_QWORD *)(v5 + 208) = v4 + *(_QWORD *)(v5 + 200); *(_QWORD *)(v5 + 184) = a3; unlock_io_cache((long long)a1); a2 += v4; result = v6 - v4; v6 -= v4; } return result; }
copy_to_read_buffer: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x28],RAX JMP 0x001e8144 LAB_001e8144: JMP 0x001e8146 LAB_001e8146: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001e820d MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0xe8] JNC 0x001e816c MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x001e817b LAB_001e816c: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xe8] MOV qword ptr [RBP + -0x40],RAX LAB_001e817b: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001e7df0 MOV dword ptr [RBP + -0x34],EAX JMP 0x001e8195 LAB_001e8195: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0xc8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x30] CALL 0x0012a0b0 MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0xe0],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0xc8] ADD RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xd0],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xb8],RCX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e8050 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x001e8146 LAB_001e820d: ADD RSP,0x40 POP RBP RET
void copy_to_read_buffer(long *param_1,void *param_2,long param_3) { long lVar1; size_t local_48; ulong local_28; void *local_18; lVar1 = param_1[0x13]; local_18 = param_2; for (local_28 = *param_1 - param_3; local_28 != 0; local_28 = local_28 - local_48) { if (local_28 < (ulong)param_1[0x1d]) { local_48 = local_28; } else { local_48 = param_1[0x1d]; } lock_io_cache(param_1,param_3); memcpy(*(void **)(lVar1 + 200),local_18,local_48); *(int4 *)(lVar1 + 0xe0) = 0; *(size_t *)(lVar1 + 0xd0) = *(long *)(lVar1 + 200) + local_48; *(long *)(lVar1 + 0xb8) = param_3; unlock_io_cache(param_1); local_18 = (void *)(local_48 + (long)local_18); } return; }
11,433
JS_ToNumberHintFree
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ToNumberHintFree(JSContext *ctx, JSValue val, JSToNumberHintEnum flag) { uint32_t tag; JSValue ret; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_BIG_INT: if (flag != TON_FLAG_NUMERIC) { JS_FreeValue(ctx, val); return JS_ThrowTypeError(ctx, "cannot convert BigInt to number"); } ret = val; break; case JS_TAG_FLOAT64: case JS_TAG_INT: case JS_TAG_EXCEPTION: ret = val; break; case JS_TAG_BOOL: case JS_TAG_NULL: ret = js_int32(JS_VALUE_GET_INT(val)); break; case JS_TAG_UNDEFINED: ret = JS_NAN; break; case JS_TAG_OBJECT: val = JS_ToPrimitiveFree(ctx, val, HINT_NUMBER); if (JS_IsException(val)) return JS_EXCEPTION; goto redo; case JS_TAG_STRING: { const char *str; size_t len; int flags; str = JS_ToCStringLen(ctx, &len, val); JS_FreeValue(ctx, val); if (!str) return JS_EXCEPTION; flags = ATOD_TRIM_SPACES | ATOD_ACCEPT_EMPTY | ATOD_ACCEPT_FLOAT | ATOD_ACCEPT_INFINITY | ATOD_ACCEPT_HEX_PREFIX | ATOD_ACCEPT_BIN_OCT | ATOD_DECIMAL_AFTER_SIGN | ATOD_NO_TRAILING_CHARS; ret = js_atof(ctx, str, len, NULL, 10, flags); JS_FreeCString(ctx, str); } break; case JS_TAG_SYMBOL: JS_FreeValue(ctx, val); return JS_ThrowTypeError(ctx, "cannot convert symbol to number"); default: JS_FreeValue(ctx, val); ret = JS_NAN; break; } return ret; }
O1
c
JS_ToNumberHintFree: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 cmpl $-0x1, %r14d jne 0x41f4d movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx movl $0x1, %ecx callq 0x3d3c3 movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d jne 0x41f23 jmp 0x41ff7 leal 0x9(%r14), %eax cmpl $0x10, %eax ja 0x4205a leaq 0x5960b(%rip), %rcx # 0x9b56c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl %ebx, %ebx xorl %r14d, %r14d jmp 0x4207c leaq 0x8(%rsp), %rsi movq %r15, %rdi movq %rbx, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x1ffe3 movq %rax, %r12 movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1ccb2 testq %r12, %r12 je 0x41ff7 movq 0x8(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi xorl %ecx, %ecx movl $0xa, %r8d movl $0x63f, %r9d # imm = 0x63F callq 0x3d9fa movq %rax, %rbx movq %rdx, %r14 movq 0x18(%r15), %rdi movl -0x18(%r12), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r12) cmpl $0x1, %eax jg 0x4207c addq $-0x18, %r12 movq %r12, %rsi movq $-0x7, %rdx callq 0x20652 jmp 0x4207c movl $0x6, %r14d xorl %ebx, %ebx jmp 0x4207c movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1ccb2 leaq 0x5bef8(%rip), %rsi # 0x9df0f jmp 0x42046 movl $0x7, %r14d movabsq $0x7ff8000000000000, %rbx # imm = 0x7FF8000000000000 jmp 0x4207c cmpl $0x1, %ebp je 0x4207c movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1ccb2 leaq 0x5bea9(%rip), %rsi # 0x9deef xorl %ebx, %ebx movq %r15, %rdi xorl %eax, %eax callq 0x21953 movl $0x6, %r14d jmp 0x4207c movabsq $0x7ff8000000000000, %r12 # imm = 0x7FF8000000000000 movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1ccb2 movl $0x7, %r14d movq %r12, %rbx movq %rbx, %rax movq %r14, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
JS_ToNumberHintFree: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov ebp, ecx mov r14, rdx mov rbx, rsi mov r15, rdi loc_41F23: cmp r14d, 0FFFFFFFFh jnz short loc_41F4D mov rdi, r15 mov rsi, rbx mov rdx, r14 mov ecx, 1 call JS_ToPrimitiveFree mov rbx, rax mov r14, rdx cmp r14d, 6 jnz short loc_41F23 jmp loc_41FF7 loc_41F4D: lea eax, [r14+9]; switch 17 cases cmp eax, 10h ja def_41F68; jumptable 0000000000041F68 default case, cases -6--1,4,5 lea rcx, jpt_41F68 movsxd rax, ds:(jpt_41F68 - 9B56Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_41F6A: mov ebx, ebx; jumptable 0000000000041F68 cases 1,2 xor r14d, r14d jmp loc_4207C; jumptable 0000000000041F68 cases 0,6,7 loc_41F74: lea rsi, [rsp+38h+var_30]; jumptable 0000000000041F68 case -7 mov rdi, r15 mov rdx, rbx mov rcx, r14 xor r8d, r8d call JS_ToCStringLen2 mov r12, rax mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT test r12, r12 jz short loc_41FF7 mov rdx, [rsp+38h+var_30] mov rdi, r15 mov rsi, r12 xor ecx, ecx mov r8d, 0Ah mov r9d, 63Fh call js_atof mov rbx, rax mov r14, rdx mov rdi, [r15+18h] mov eax, [r12-18h] lea ecx, [rax-1] mov [r12-18h], ecx cmp eax, 1 jg loc_4207C; jumptable 0000000000041F68 cases 0,6,7 add r12, 0FFFFFFFFFFFFFFE8h mov rsi, r12 mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt jmp loc_4207C; jumptable 0000000000041F68 cases 0,6,7 loc_41FF7: mov r14d, 6 xor ebx, ebx jmp short loc_4207C; jumptable 0000000000041F68 cases 0,6,7 loc_42001: mov rdi, [r15+18h]; jumptable 0000000000041F68 case -8 mov rsi, rbx mov rdx, r14 call JS_FreeValueRT lea rsi, aCannotConvertS_0; "cannot convert symbol to number" jmp short loc_42046 loc_42019: mov r14d, 7; jumptable 0000000000041F68 case 3 mov rbx, 7FF8000000000000h jmp short loc_4207C; jumptable 0000000000041F68 cases 0,6,7 loc_4202B: cmp ebp, 1; jumptable 0000000000041F68 case -9 jz short loc_4207C; jumptable 0000000000041F68 cases 0,6,7 mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT lea rsi, aCannotConvertB; "cannot convert BigInt to number" loc_42046: xor ebx, ebx mov rdi, r15 xor eax, eax call JS_ThrowTypeError mov r14d, 6 jmp short loc_4207C; jumptable 0000000000041F68 cases 0,6,7 def_41F68: mov r12, 7FF8000000000000h; jumptable 0000000000041F68 default case, cases -6--1,4,5 mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT mov r14d, 7 mov rbx, r12 loc_4207C: mov rax, rbx; jumptable 0000000000041F68 cases 0,6,7 mov rdx, r14 add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
unsigned long long JS_ToNumberHintFree( long long a1, unsigned long long a2, long long a3, int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v15; // rdx unsigned __int8 *v16; // r12 long long v17; // r8 long long v18; // r9 long long v19; // rdi int v20; // eax long long v21; // rcx long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v25; // r9 __m128 v26; // xmm4 __m128 v27; // xmm5 const char *v28; // rsi char v30; // [rsp+0h] [rbp-38h] long long v31[6]; // [rsp+8h] [rbp-30h] BYREF while ( (_DWORD)a3 == -1 ) { a2 = JS_ToPrimitiveFree(a1, a2, a3, 1, a5, a6, a7, a8, a9, a10, a11, a12); a3 = v15; if ( (_DWORD)v15 == 6 ) return 0LL; } switch ( (int)a3 ) { case -9: if ( a4 != 1 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); v28 = "cannot convert BigInt to number"; goto LABEL_14; } break; case -8: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); v28 = "cannot convert symbol to number"; LABEL_14: a2 = 0LL; JS_ThrowTypeError(a1, (long long)v28, v22, v23, v24, v25, a5, a6, a7, a8, v26, v27, a11, a12, v30); break; case -7: v16 = (unsigned __int8 *)JS_ToCStringLen2(a1, v31, a2, a3, 0); JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); if ( !v16 ) return 0LL; a2 = js_atof(a1, v16, v31[0], 0LL, 10, 1599, *(double *)a5.m128_u64, (__m128d)a6); v19 = *(_QWORD *)(a1 + 24); v20 = *((_DWORD *)v16 - 6); v21 = (unsigned int)(v20 - 1); *((_DWORD *)v16 - 6) = v21; if ( v20 <= 1 ) js_free_value_rt(v19, (_QWORD *)v16 - 3, -7LL, v21, v17, v18); break; case 0: case 6: case 7: return a2; case 1: case 2: a2 = (unsigned int)a2; break; case 3: a2 = 0x7FF8000000000000LL; break; default: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); a2 = 0x7FF8000000000000LL; break; } return a2; }
JS_ToNumberHintFree: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBP,ECX MOV R14,RDX MOV RBX,RSI MOV R15,RDI LAB_00141f23: CMP R14D,-0x1 JNZ 0x00141f4d MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 MOV ECX,0x1 CALL 0x0013d3c3 MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00141f23 JMP 0x00141ff7 LAB_00141f4d: LEA EAX,[R14 + 0x9] CMP EAX,0x10 JA 0x0014205a LEA RCX,[0x19b56c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EBX,EBX XOR R14D,R14D JMP 0x0014207c caseD_fffffff9: LEA RSI,[RSP + 0x8] MOV RDI,R15 MOV RDX,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x0011ffe3 MOV R12,RAX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R14 CALL 0x0011ccb2 TEST R12,R12 JZ 0x00141ff7 MOV RDX,qword ptr [RSP + 0x8] MOV RDI,R15 MOV RSI,R12 XOR ECX,ECX MOV R8D,0xa MOV R9D,0x63f CALL 0x0013d9fa MOV RBX,RAX MOV R14,RDX MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R12 + -0x18] LEA ECX,[RAX + -0x1] MOV dword ptr [R12 + -0x18],ECX CMP EAX,0x1 JG 0x0014207c ADD R12,-0x18 MOV RSI,R12 MOV RDX,-0x7 CALL 0x00120652 JMP 0x0014207c LAB_00141ff7: MOV R14D,0x6 XOR EBX,EBX JMP 0x0014207c caseD_fffffff8: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R14 CALL 0x0011ccb2 LEA RSI,[0x19df0f] JMP 0x00142046 caseD_3: MOV R14D,0x7 MOV RBX,0x7ff8000000000000 JMP 0x0014207c caseD_fffffff7: CMP EBP,0x1 JZ 0x0014207c MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R14 CALL 0x0011ccb2 LEA RSI,[0x19deef] LAB_00142046: XOR EBX,EBX MOV RDI,R15 XOR EAX,EAX CALL 0x00121953 MOV R14D,0x6 JMP 0x0014207c caseD_fffffffa: MOV R12,0x7ff8000000000000 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R14 CALL 0x0011ccb2 MOV R14D,0x7 MOV RBX,R12 caseD_0: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int1 [16] JS_ToNumberHintFree(long param_1,int8 param_2,int8 param_3,int param_4) { int iVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; char *pcVar6; int8 uVar7; int1 auVar8 [16]; int8 local_30; auVar8._8_8_ = param_3; auVar8._0_8_ = param_2; do { uVar7 = auVar8._8_8_; uVar5 = auVar8._0_8_; if (auVar8._8_4_ != -1) { switch(auVar8._8_4_) { case 0: case 6: case 7: goto switchD_00141f68_caseD_0; case 1: case 2: auVar3._8_8_ = 0; auVar3._0_8_ = uVar5 & 0xffffffff; return auVar3; case 3: auVar8._8_8_ = 7; auVar8._0_8_ = 0x7ff8000000000000; goto switchD_00141f68_caseD_0; case -9: if (param_4 == 1) { return auVar8; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7); pcVar6 = "cannot convert BigInt to number"; break; case -8: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7); pcVar6 = "cannot convert symbol to number"; break; case -7: lVar4 = JS_ToCStringLen2(param_1,&local_30,uVar5,uVar7,0); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7); if (lVar4 != 0) { auVar8 = js_atof(param_1,lVar4,local_30,0,10,0x63f); uVar7 = *(int8 *)(param_1 + 0x18); iVar1 = *(int *)(lVar4 + -0x18); *(int *)(lVar4 + -0x18) = iVar1 + -1; if (1 < iVar1) { return auVar8; } js_free_value_rt(uVar7,lVar4 + -0x18,0xfffffffffffffff9); return auVar8; } goto LAB_00141ff7; default: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7); auVar2._8_8_ = 7; auVar2._0_8_ = 0x7ff8000000000000; return auVar2; } JS_ThrowTypeError(param_1,pcVar6); return ZEXT816(6) << 0x40; } auVar8 = JS_ToPrimitiveFree(param_1,uVar5,uVar7,1); } while (auVar8._8_4_ != 6); LAB_00141ff7: auVar8 = ZEXT816(6) << 0x40; switchD_00141f68_caseD_0: return auVar8; }
11,434
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int)
monkey531[P]llama/common/sampling.cpp
std::string common_sampler_prev_str(common_sampler * gsmpl, llama_context * ctx_main, int n) { n = std::min(n, (int) gsmpl->prev.size()); if (n <= 0) { return ""; } std::string result; result.reserve(8*n); // 8 is the average length of a token [citation needed], TODO: compute this from the vocab for (int i = n - 1; i >= 0; i--) { const llama_token id = gsmpl->prev.rat(i); GGML_ASSERT(id != LLAMA_TOKEN_NULL && "null token in the sampling history - should not happen"); result += common_token_to_piece(ctx_main, id); } return result; }
O3
cpp
common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %ecx, %r12d movl 0x150(%rsi), %eax cmpl %ecx, %eax cmovll %eax, %r12d movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) testl %r12d, %r12d jle 0xcd9a5 movq %rdx, %r14 movq %rsi, %r15 movq %rax, (%rsp) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) leal (,%r12,8), %esi movq %rbx, %rdi callq 0x1ad60 addq $0x148, %r15 # imm = 0x148 leaq 0x18(%rsp), %rbp movl %r12d, %r13d incq %r13 leaq 0x8(%rsp), %r12 leaq -0x2(%r13), %rsi movq %r15, %rdi callq 0xce4d0 movl (%rax), %edx cmpl $-0x1, %edx je 0xcd9c9 movq %r12, %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x72725 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1a250 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xcd99a movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8c0 decq %r13 cmpq $0x1, %r13 ja 0xcd94e jmp 0xcd9b7 leaq 0x1d19a(%rip), %rdx # 0xeab46 movq %rbx, %rdi movq %rdx, %rsi callq 0x21b26 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x268f9(%rip), %rdi # 0xf42c9 leaq 0x178e4(%rip), %rdx # 0xe52bb leaq 0x26ac6(%rip), %rcx # 0xf44a4 movl $0x1a1, %esi # imm = 0x1A1 xorl %eax, %eax callq 0x1ae80 jmp 0xcda0c jmp 0xcda0c jmp 0xcda0c movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xcda0f movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8c0 jmp 0xcda0f movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0xcda27 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x1a8c0 movq %r14, %rdi callq 0x1af80
_Z23common_sampler_prev_strB5cxx11P14common_samplerP13llama_contexti: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12d, ecx mov eax, [rsi+150h] cmp eax, ecx cmovl r12d, eax mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax test r12d, r12d jle loc_CD9A5 mov r14, rdx mov r15, rsi mov [rsp+58h+var_58], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 lea esi, ds:0[r12*8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) add r15, 148h lea rbp, [rsp+58h+var_40] mov r13d, r12d inc r13 lea r12, [rsp+58h+var_50] loc_CD94E: lea rsi, [r13-2] mov rdi, r15 call _ZNK11ring_bufferIiE3ratEm; ring_buffer<int>::rat(ulong) mov edx, [rax] cmp edx, 0FFFFFFFFh jz short loc_CD9C9 mov rdi, r12 mov rsi, r14 mov ecx, 1 call _Z21common_token_to_pieceB5cxx11PK13llama_contextib; common_token_to_piece(llama_context const*,int,bool) mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+58h+var_50]; void * cmp rdi, rbp jz short loc_CD99A mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CD99A: dec r13 cmp r13, 1 ja short loc_CD94E jmp short loc_CD9B7 loc_CD9A5: lea rdx, aErrorWhileHand_0+34h; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_CD9B7: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CD9C9: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdLlamaTokenNu; "id != LLAMA_TOKEN_NULL && \"null token "... mov esi, 1A1h xor eax, eax call _ggml_abort jmp short loc_CDA0C jmp short loc_CDA0C jmp short loc_CDA0C mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, rbp jz short loc_CDA0F mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_CDA0F loc_CDA0C: mov r14, rax loc_CDA0F: mov rdi, [rbx]; void * cmp rdi, [rsp+58h+var_58] jz short loc_CDA27 mov rax, [rsp+58h+var_58] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CDA27: mov rdi, r14 call __Unwind_Resume
long long common_sampler_prev_str[abi:cxx11](long long a1, long long a2, long long a3, int a4, double a5, double a6) { int v6; // r12d long long v8; // r13 unsigned int v9; // edx bool v10; // cf double v12; // xmm0_8 long long v13; // rax long long v14; // r14 _QWORD *v15; // [rsp+0h] [rbp-58h] void *v16[2]; // [rsp+8h] [rbp-50h] BYREF long long v17; // [rsp+18h] [rbp-40h] BYREF v6 = a4; if ( *(_DWORD *)(a2 + 336) < a4 ) v6 = *(_DWORD *)(a2 + 336); *(_QWORD *)a1 = a1 + 16; if ( v6 <= 0 ) { std::string::_M_construct<char const*>(a1, "", (long long)""); } else { v15 = (_QWORD *)(a1 + 16); *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, (unsigned int)(8 * v6)); v8 = (unsigned int)v6 + 1LL; do { v9 = *(_DWORD *)ring_buffer<int>::rat(a2 + 328, v8 - 2); if ( v9 == -1 ) { v12 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 417LL, "GGML_ASSERT(%s) failed", "id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\""); v14 = v13; if ( *(_QWORD **)a1 != v15 ) operator delete(*(void **)a1, *v15 + 1LL); _Unwind_Resume(v14, v12, a6); } common_token_to_piece[abi:cxx11]((long long)v16, a3, v9, 1u); std::string::_M_append(a1, v16[0], v16[1]); if ( v16[0] != &v17 ) operator delete(v16[0], v17 + 1); v10 = v8-- == 1; } while ( !v10 && v8 != 1 ); } return a1; }
common_sampler_prev_str[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12D,ECX MOV EAX,dword ptr [RSI + 0x150] CMP EAX,ECX CMOVL R12D,EAX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX TEST R12D,R12D JLE 0x001cd9a5 MOV R14,RDX MOV R15,RSI MOV qword ptr [RSP],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LEA ESI,[R12*0x8] LAB_001cd92f: MOV RDI,RBX CALL 0x0011ad60 ADD R15,0x148 LEA RBP,[RSP + 0x18] MOV R13D,R12D INC R13 LEA R12,[RSP + 0x8] LAB_001cd94e: LEA RSI,[R13 + -0x2] LAB_001cd952: MOV RDI,R15 CALL 0x001ce4d0 MOV EDX,dword ptr [RAX] CMP EDX,-0x1 JZ 0x001cd9c9 LAB_001cd961: MOV RDI,R12 MOV RSI,R14 MOV ECX,0x1 CALL 0x00172725 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001cd97b: MOV RDI,RBX CALL 0x0011a250 LAB_001cd983: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001cd99a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8c0 LAB_001cd99a: DEC R13 CMP R13,0x1 JA 0x001cd94e JMP 0x001cd9b7 LAB_001cd9a5: LEA RDX,[0x1eab46] MOV RDI,RBX MOV RSI,RDX CALL 0x00121b26 LAB_001cd9b7: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cd9c9: LEA RDI,[0x1f42c9] LEA RDX,[0x1e52bb] LEA RCX,[0x1f44a4] MOV ESI,0x1a1 XOR EAX,EAX CALL 0x0011ae80
/* common_sampler_prev_str[abi:cxx11](common_sampler*, llama_context*, int) */ common_sampler * common_sampler_prev_str_abi_cxx11_(common_sampler *param_1,llama_context *param_2,int param_3) { int *piVar1; uint in_ECX; int8 in_R8; int8 in_R9; ulong uVar2; common_sampler *pcVar3; long *local_50 [2]; long local_40 [2]; if ((int)*(uint *)(param_2 + 0x150) < (int)in_ECX) { in_ECX = *(uint *)(param_2 + 0x150); } pcVar3 = param_1 + 0x10; *(common_sampler **)param_1 = pcVar3; if ((int)in_ECX < 1) { std::__cxx11::string::_M_construct<char_const*>(param_1,""); } else { *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (common_sampler)0x0; /* try { // try from 001cd92f to 001cd936 has its CatchHandler @ 001cd9ea */ std::__cxx11::string::reserve((ulong)param_1); uVar2 = (ulong)in_ECX + 1; do { /* try { // try from 001cd952 to 001cd959 has its CatchHandler @ 001cd9ec */ piVar1 = (int *)ring_buffer<int>::rat((ring_buffer<int> *)(param_2 + 0x148),uVar2 - 2); if (*piVar1 == -1) { /* try { // try from 001cd9c9 to 001cd9e9 has its CatchHandler @ 001cda0c */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 0x1a1,"GGML_ASSERT(%s) failed", "id != LLAMA_TOKEN_NULL && \"null token in the sampling history - should not happen\"" ,in_R8,in_R9,pcVar3); } /* try { // try from 001cd961 to 001cd970 has its CatchHandler @ 001cd9ee */ common_token_to_piece_abi_cxx11_((llama_context *)local_50,param_3,SUB41(*piVar1,0)); /* try { // try from 001cd97b to 001cd982 has its CatchHandler @ 001cd9f0 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_50[0]); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } uVar2 = uVar2 - 1; } while (1 < uVar2); } return param_1; }
11,435
my_mutex_init
eloqsql/mysys/thr_mutex.c
void my_mutex_init() { /* Initialize mutex attributes */ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP /* Set mutex type to "fast" a.k.a "adaptive" In this case the thread may steal the mutex from some other thread that is waiting for the same mutex. This will save us some context switches but may cause a thread to 'starve forever' while waiting for the mutex (not likely if the code within the mutex is short). */ pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP /* Set mutex type to "errorcheck" */ pthread_mutexattr_init(&my_errorcheck_mutexattr); pthread_mutexattr_settype(&my_errorcheck_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #endif #if defined(SAFE_MUTEX_DEFINED) safe_mutex_global_init(); #endif }
O0
c
my_mutex_init: pushq %rbp movq %rsp, %rbp leaq 0x3b5545(%rip), %rdi # 0x410620 callq 0x26070 leaq 0x3b5539(%rip), %rdi # 0x410620 movl $0x3, %esi callq 0x264d0 leaq 0x3b552c(%rip), %rdi # 0x410624 callq 0x26070 leaq 0x3b5520(%rip), %rdi # 0x410624 movl $0x2, %esi callq 0x264d0 popq %rbp retq
my_mutex_init: push rbp mov rbp, rsp lea rdi, my_fast_mutexattr call _pthread_mutexattr_init lea rdi, my_fast_mutexattr mov esi, 3 call _pthread_mutexattr_settype lea rdi, my_errorcheck_mutexattr call _pthread_mutexattr_init lea rdi, my_errorcheck_mutexattr mov esi, 2 call _pthread_mutexattr_settype pop rbp retn
long long my_mutex_init() { pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, 3LL); pthread_mutexattr_init(&my_errorcheck_mutexattr); return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL); }
my_mutex_init: PUSH RBP MOV RBP,RSP LEA RDI,[0x510620] CALL 0x00126070 LEA RDI,[0x510620] MOV ESI,0x3 CALL 0x001264d0 LEA RDI,[0x510624] CALL 0x00126070 LEA RDI,[0x510624] MOV ESI,0x2 CALL 0x001264d0 POP RBP RET
void my_mutex_init(void) { pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3); pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2); return; }
11,436
Bfree
eloqsql/strings/dtoa.c
static void Bfree(Bigint *v, Stack_alloc *alloc) { char *gptr= (char*) v; /* generic pointer */ if (gptr < alloc->begin || gptr >= alloc->end) free(gptr); else if (v->k <= Kmax) { /* Maintain free lists only for stack objects: this way we don't have to bother with freeing lists in the end of dtoa; heap should not be used normally anyway. */ v->p.next= alloc->freelist[v->k]; alloc->freelist[v->k]= v; } }
O0
c
Bfree: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jb 0x7bc83 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jb 0x7bc8e movq -0x18(%rbp), %rdi callq 0x25400 jmp 0x7bcc7 movq -0x8(%rbp), %rax cmpl $0xf, 0x8(%rax) jg 0x7bcc5 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x8(%rcx), %rcx movq 0x18(%rax,%rcx,8), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rdx movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x8(%rcx), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0x7bcc7 addq $0x20, %rsp popq %rbp retq nopl (%rax)
Bfree: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx] jb short loc_7BC83 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jb short loc_7BC8E loc_7BC83: mov rdi, [rbp+var_18] call _free jmp short loc_7BCC7 loc_7BC8E: mov rax, [rbp+var_8] cmp dword ptr [rax+8], 0Fh jg short loc_7BCC5 mov rax, [rbp+var_10] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+8] mov rcx, [rax+rcx*8+18h] mov rax, [rbp+var_8] mov [rax], rcx mov rdx, [rbp+var_8] mov rax, [rbp+var_10] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+8] mov [rax+rcx*8+18h], rdx loc_7BCC5: jmp short $+2 loc_7BCC7: add rsp, 20h pop rbp retn
long long Bfree(unsigned long long a1, unsigned long long *a2) { long long result; // rax if ( a1 < *a2 || a1 >= a2[2] ) return free(a1); result = a1; if ( *(int *)(a1 + 8) <= 15 ) { *(_QWORD *)a1 = a2[*(int *)(a1 + 8) + 3]; result = (long long)a2; a2[*(int *)(a1 + 8) + 3] = a1; } return result; }
Bfree: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JC 0x0017bc83 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JC 0x0017bc8e LAB_0017bc83: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00125400 JMP 0x0017bcc7 LAB_0017bc8e: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8],0xf JG 0x0017bcc5 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x8] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX LAB_0017bcc5: JMP 0x0017bcc7 LAB_0017bcc7: ADD RSP,0x20 POP RBP RET
void Bfree(ulong *param_1,ulong *param_2) { if ((param_1 < (ulong *)*param_2) || ((ulong *)param_2[2] <= param_1)) { free(param_1); } else if ((int)param_1[1] < 0x10) { *param_1 = param_2[(long)(int)param_1[1] + 3]; param_2[(long)(int)param_1[1] + 3] = (ulong)param_1; } return; }
11,437
Bfree
eloqsql/strings/dtoa.c
static void Bfree(Bigint *v, Stack_alloc *alloc) { char *gptr= (char*) v; /* generic pointer */ if (gptr < alloc->begin || gptr >= alloc->end) free(gptr); else if (v->k <= Kmax) { /* Maintain free lists only for stack objects: this way we don't have to bother with freeing lists in the end of dtoa; heap should not be used normally anyway. */ v->p.next= alloc->freelist[v->k]; alloc->freelist[v->k]= v; } }
O3
c
Bfree: pushq %rbp movq %rsp, %rbp cmpq %rdi, (%rsi) ja 0x5d621 cmpq %rdi, 0x10(%rsi) jbe 0x5d621 movslq 0x8(%rdi), %rax cmpq $0xf, %rax jg 0x5d61f movq 0x18(%rsi,%rax,8), %rcx movq %rcx, (%rdi) movq %rdi, 0x18(%rsi,%rax,8) popq %rbp retq popq %rbp jmp 0x24470
Bfree: push rbp mov rbp, rsp cmp [rsi], rdi ja short loc_5D621 cmp [rsi+10h], rdi jbe short loc_5D621 movsxd rax, dword ptr [rdi+8] cmp rax, 0Fh jg short loc_5D61F mov rcx, [rsi+rax*8+18h] mov [rdi], rcx mov [rsi+rax*8+18h], rdi loc_5D61F: pop rbp retn loc_5D621: pop rbp jmp _free
long long Bfree(unsigned long long a1, unsigned long long *a2) { long long result; // rax if ( *a2 > a1 || a2[2] <= a1 ) return free(a1, a2); result = *(int *)(a1 + 8); if ( result <= 15 ) { *(_QWORD *)a1 = a2[result + 3]; a2[result + 3] = a1; } return result; }
Bfree: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI],RDI JA 0x0015d621 CMP qword ptr [RSI + 0x10],RDI JBE 0x0015d621 MOVSXD RAX,dword ptr [RDI + 0x8] CMP RAX,0xf JG 0x0015d61f MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18] MOV qword ptr [RDI],RCX MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI LAB_0015d61f: POP RBP RET LAB_0015d621: POP RBP JMP 0x00124470
void Bfree(ulong *param_1,ulong *param_2) { long lVar1; if (((ulong *)*param_2 <= param_1) && (param_1 < (ulong *)param_2[2])) { lVar1 = (long)(int)param_1[1]; if (lVar1 < 0x10) { *param_1 = param_2[lVar1 + 3]; param_2[lVar1 + 3] = (ulong)param_1; } return; } free(param_1); return; }
11,438
mysql_init_ps_subsystem
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
void mysql_init_ps_subsystem(void) { memset(mysql_ps_fetch_functions, 0, sizeof(mysql_ps_fetch_functions)); mysql_ps_fetch_functions[MYSQL_TYPE_NULL].func= ps_fetch_null; mysql_ps_fetch_functions[MYSQL_TYPE_NULL].pack_len = 0; mysql_ps_fetch_functions[MYSQL_TYPE_NULL].max_len = 0; mysql_ps_fetch_functions[MYSQL_TYPE_TINY].func = ps_fetch_int8; mysql_ps_fetch_functions[MYSQL_TYPE_TINY].pack_len = 1; mysql_ps_fetch_functions[MYSQL_TYPE_TINY].max_len = 4; mysql_ps_fetch_functions[MYSQL_TYPE_SHORT].func = ps_fetch_int16; mysql_ps_fetch_functions[MYSQL_TYPE_SHORT].pack_len = 2; mysql_ps_fetch_functions[MYSQL_TYPE_SHORT].max_len = 6; mysql_ps_fetch_functions[MYSQL_TYPE_YEAR].func = ps_fetch_int16; mysql_ps_fetch_functions[MYSQL_TYPE_YEAR].pack_len = 2; mysql_ps_fetch_functions[MYSQL_TYPE_YEAR].max_len = 4; mysql_ps_fetch_functions[MYSQL_TYPE_INT24].func = ps_fetch_int32; mysql_ps_fetch_functions[MYSQL_TYPE_INT24].pack_len = 4; mysql_ps_fetch_functions[MYSQL_TYPE_INT24].max_len = 8; mysql_ps_fetch_functions[MYSQL_TYPE_LONG].func = ps_fetch_int32; mysql_ps_fetch_functions[MYSQL_TYPE_LONG].pack_len = 4; mysql_ps_fetch_functions[MYSQL_TYPE_LONG].max_len = 11; mysql_ps_fetch_functions[MYSQL_TYPE_LONGLONG].func = ps_fetch_int64; mysql_ps_fetch_functions[MYSQL_TYPE_LONGLONG].pack_len= 8; mysql_ps_fetch_functions[MYSQL_TYPE_LONGLONG].max_len = 20; mysql_ps_fetch_functions[MYSQL_TYPE_FLOAT].func = ps_fetch_float; mysql_ps_fetch_functions[MYSQL_TYPE_FLOAT].pack_len = 4; mysql_ps_fetch_functions[MYSQL_TYPE_FLOAT].max_len = MAX_DOUBLE_STRING_REP_LENGTH; mysql_ps_fetch_functions[MYSQL_TYPE_DOUBLE].func = ps_fetch_double; mysql_ps_fetch_functions[MYSQL_TYPE_DOUBLE].pack_len = 8; mysql_ps_fetch_functions[MYSQL_TYPE_DOUBLE].max_len = MAX_DOUBLE_STRING_REP_LENGTH; mysql_ps_fetch_functions[MYSQL_TYPE_TIME].func = ps_fetch_datetime; mysql_ps_fetch_functions[MYSQL_TYPE_TIME].pack_len = MYSQL_PS_SKIP_RESULT_W_LEN; mysql_ps_fetch_functions[MYSQL_TYPE_TIME].max_len = 17; mysql_ps_fetch_functions[MYSQL_TYPE_DATE].func = ps_fetch_datetime; mysql_ps_fetch_functions[MYSQL_TYPE_DATE].pack_len = MYSQL_PS_SKIP_RESULT_W_LEN; mysql_ps_fetch_functions[MYSQL_TYPE_DATE].max_len = 10; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = MYSQL_PS_SKIP_RESULT_W_LEN; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDATE].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_DATETIME].func = ps_fetch_datetime; mysql_ps_fetch_functions[MYSQL_TYPE_DATETIME].pack_len= MYSQL_PS_SKIP_RESULT_W_LEN; mysql_ps_fetch_functions[MYSQL_TYPE_DATETIME].max_len = 30; mysql_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].func = ps_fetch_datetime; mysql_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].pack_len= MYSQL_PS_SKIP_RESULT_W_LEN; mysql_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].max_len = 30; mysql_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].func = ps_fetch_bin; mysql_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].pack_len= MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_BLOB].func = ps_fetch_bin; mysql_ps_fetch_functions[MYSQL_TYPE_BLOB].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_BLOB].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].func = ps_fetch_bin; mysql_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].pack_len= MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].func = ps_fetch_bin; mysql_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_BIT].func = ps_fetch_bin; mysql_ps_fetch_functions[MYSQL_TYPE_BIT].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_BIT].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_VAR_STRING].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_VAR_STRING].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_VAR_STRING].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_VARCHAR].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_VARCHAR].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_VARCHAR].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_STRING].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_STRING].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_STRING].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_JSON].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_JSON].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_JSON].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_DECIMAL].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_ENUM].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_ENUM].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_ENUM].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_SET].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_SET].pack_len = MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_SET].max_len = -1; mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY].func = ps_fetch_string; mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY].pack_len= MYSQL_PS_SKIP_RESULT_STR; mysql_ps_fetch_functions[MYSQL_TYPE_GEOMETRY].max_len = -1; mysql_ps_subsystem_initialized= 1; }
O3
c
mysql_init_ps_subsystem: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x3dda09(%rip), %rbx # 0x45e680 movl $0x1800, %edx # imm = 0x1800 movq %rbx, %rdi xorl %esi, %esi callq 0x5f370 leaq 0x298(%rip), %rax # 0x80f25 movq %rax, 0x90(%rbx) movq $0x0, 0xa0(%rbx) leaq 0x285(%rip), %rax # 0x80f2b movq %rax, 0x18(%rbx) movl $0x1, 0x20(%rbx) movl $0x4, %eax movq %rax, 0x28(%rbx) leaq 0x2d1(%rip), %rcx # 0x80f92 movq %rcx, 0x30(%rbx) movl $0x2, %edx movl %edx, 0x38(%rbx) movq $0x6, 0x40(%rbx) movq %rcx, 0x138(%rbx) movl %edx, 0x140(%rbx) movq %rax, 0x148(%rbx) leaq 0x2ef(%rip), %rax # 0x80fdf movq %rax, 0xd8(%rbx) movl $0x4, %ecx movl %ecx, 0xe0(%rbx) movq $0x8, 0xe8(%rbx) movq %rax, 0x48(%rbx) movl %ecx, 0x50(%rbx) movq $0xb, 0x58(%rbx) leaq 0x307(%rip), %rax # 0x8102a movq %rax, 0xc0(%rbx) movl $0x8, %eax movl %eax, 0xc8(%rbx) movq $0x14, 0xd0(%rbx) leaq 0x321(%rip), %rdx # 0x81068 movq %rdx, 0x60(%rbx) movl %ecx, 0x68(%rbx) movl $0x12c, %ecx # imm = 0x12C movq %rcx, 0x70(%rbx) leaq 0x631(%rip), %rdx # 0x8138f movq %rdx, 0x78(%rbx) movl %eax, 0x80(%rbx) movq %rcx, 0x88(%rbx) leaq 0x93d(%rip), %rdx # 0x816b3 movq %rdx, 0x108(%rbx) movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %esi, 0x110(%rbx) movq $0x11, 0x118(%rbx) movq %rdx, 0xf0(%rbx) movl %esi, 0xf8(%rbx) movq $0xa, 0x100(%rbx) leaq 0xb99(%rip), %rax # 0x8194b movq %rax, 0x150(%rbx) movl %esi, 0x158(%rbx) movq $-0x1, %rcx movq %rcx, 0x160(%rbx) movq %rdx, 0x120(%rbx) movl %esi, 0x128(%rbx) movl $0x1e, %edi movq %rdi, 0x130(%rbx) movq %rdx, 0xa8(%rbx) movl %esi, 0xb0(%rbx) movq %rdi, 0xb8(%rbx) leaq 0xb81(%rip), %rsi # 0x81982 movq %rsi, 0x1758(%rbx) movl $0xfffffffe, %edx # imm = 0xFFFFFFFE movl %edx, 0x1760(%rbx) movq %rcx, 0x1768(%rbx) movq %rsi, 0x17a0(%rbx) movl %edx, 0x17a8(%rbx) movq %rcx, 0x17b0(%rbx) movq %rsi, 0x1770(%rbx) movl %edx, 0x1778(%rbx) movq %rcx, 0x1780(%rbx) movq %rsi, 0x1788(%rbx) movl %edx, 0x1790(%rbx) movq %rcx, 0x1798(%rbx) movq %rsi, 0x180(%rbx) movl %edx, 0x188(%rbx) movq %rcx, 0x190(%rbx) movq %rax, 0x17b8(%rbx) movl %edx, 0x17c0(%rbx) movq %rcx, 0x17c8(%rbx) movq %rax, 0x168(%rbx) movl %edx, 0x170(%rbx) movq %rcx, 0x178(%rbx) movq %rax, 0x17d0(%rbx) movl %edx, 0x17d8(%rbx) movq %rcx, 0x17e0(%rbx) movq %rax, 0x16f8(%rbx) movl %edx, 0x1700(%rbx) movq %rcx, 0x1708(%rbx) movq %rax, (%rbx) movl %edx, 0x8(%rbx) movq %rcx, 0x10(%rbx) movq %rax, 0x1710(%rbx) movl %edx, 0x1718(%rbx) movq %rcx, 0x1720(%rbx) movq %rax, 0x1728(%rbx) movl %edx, 0x1730(%rbx) movq %rcx, 0x1738(%rbx) movq %rax, 0x1740(%rbx) movl %edx, 0x1748(%rbx) movq %rcx, 0x1750(%rbx) movq %rax, 0x17e8(%rbx) movl %edx, 0x17f0(%rbx) movq %rcx, 0x17f8(%rbx) leaq 0x3dd755(%rip), %rax # 0x45e670 movb $0x1, (%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_init_ps_subsystem: push rbp mov rbp, rsp push rbx push rax lea rbx, mysql_ps_fetch_functions mov edx, 1800h mov rdi, rbx xor esi, esi call _memset lea rax, ps_fetch_null mov [rbx+90h], rax mov qword ptr [rbx+0A0h], 0 lea rax, ps_fetch_int8 mov [rbx+18h], rax mov dword ptr [rbx+20h], 1 mov eax, 4 mov [rbx+28h], rax lea rcx, ps_fetch_int16 mov [rbx+30h], rcx mov edx, 2 mov [rbx+38h], edx mov qword ptr [rbx+40h], 6 mov [rbx+138h], rcx mov [rbx+140h], edx mov [rbx+148h], rax lea rax, ps_fetch_int32 mov [rbx+0D8h], rax mov ecx, 4 mov [rbx+0E0h], ecx mov qword ptr [rbx+0E8h], 8 mov [rbx+48h], rax mov [rbx+50h], ecx mov qword ptr [rbx+58h], 0Bh lea rax, ps_fetch_int64 mov [rbx+0C0h], rax mov eax, 8 mov [rbx+0C8h], eax mov qword ptr [rbx+0D0h], 14h lea rdx, ps_fetch_float mov [rbx+60h], rdx mov [rbx+68h], ecx mov ecx, 12Ch mov [rbx+70h], rcx lea rdx, ps_fetch_double mov [rbx+78h], rdx mov [rbx+80h], eax mov [rbx+88h], rcx lea rdx, ps_fetch_datetime mov [rbx+108h], rdx mov esi, 0FFFFFFFFh mov [rbx+110h], esi mov qword ptr [rbx+118h], 11h mov [rbx+0F0h], rdx mov [rbx+0F8h], esi mov qword ptr [rbx+100h], 0Ah lea rax, ps_fetch_string mov [rbx+150h], rax mov [rbx+158h], esi mov rcx, 0FFFFFFFFFFFFFFFFh mov [rbx+160h], rcx mov [rbx+120h], rdx mov [rbx+128h], esi mov edi, 1Eh mov [rbx+130h], rdi mov [rbx+0A8h], rdx mov [rbx+0B0h], esi mov [rbx+0B8h], rdi lea rsi, ps_fetch_bin mov [rbx+1758h], rsi mov edx, 0FFFFFFFEh mov [rbx+1760h], edx mov [rbx+1768h], rcx mov [rbx+17A0h], rsi mov [rbx+17A8h], edx mov [rbx+17B0h], rcx mov [rbx+1770h], rsi mov [rbx+1778h], edx mov [rbx+1780h], rcx mov [rbx+1788h], rsi mov [rbx+1790h], edx mov [rbx+1798h], rcx mov [rbx+180h], rsi mov [rbx+188h], edx mov [rbx+190h], rcx mov [rbx+17B8h], rax mov [rbx+17C0h], edx mov [rbx+17C8h], rcx mov [rbx+168h], rax mov [rbx+170h], edx mov [rbx+178h], rcx mov [rbx+17D0h], rax mov [rbx+17D8h], edx mov [rbx+17E0h], rcx mov [rbx+16F8h], rax mov [rbx+1700h], edx mov [rbx+1708h], rcx mov [rbx], rax mov [rbx+8], edx mov [rbx+10h], rcx mov [rbx+1710h], rax mov [rbx+1718h], edx mov [rbx+1720h], rcx mov [rbx+1728h], rax mov [rbx+1730h], edx mov [rbx+1738h], rcx mov [rbx+1740h], rax mov [rbx+1748h], edx mov [rbx+1750h], rcx mov [rbx+17E8h], rax mov [rbx+17F0h], edx mov [rbx+17F8h], rcx lea rax, mysql_ps_subsystem_initialized mov byte ptr [rax], 1 add rsp, 8 pop rbx pop rbp retn
_BYTE *mysql_init_ps_subsystem() { _BYTE *result; // rax memset(mysql_ps_fetch_functions, 0LL, sizeof(mysql_ps_fetch_functions)); *(_QWORD *)&mysql_ps_fetch_functions[36] = ps_fetch_null; *(_QWORD *)&mysql_ps_fetch_functions[40] = 0LL; *(_QWORD *)&mysql_ps_fetch_functions[6] = ps_fetch_int8; mysql_ps_fetch_functions[8] = 1; *(_QWORD *)&mysql_ps_fetch_functions[10] = 4LL; *(_QWORD *)&mysql_ps_fetch_functions[12] = ps_fetch_int16; mysql_ps_fetch_functions[14] = 2; *(_QWORD *)&mysql_ps_fetch_functions[16] = 6LL; *(_QWORD *)&mysql_ps_fetch_functions[78] = ps_fetch_int16; mysql_ps_fetch_functions[80] = 2; *(_QWORD *)&mysql_ps_fetch_functions[82] = 4LL; *(_QWORD *)&mysql_ps_fetch_functions[54] = ps_fetch_int32; mysql_ps_fetch_functions[56] = 4; *(_QWORD *)&mysql_ps_fetch_functions[58] = 8LL; *(_QWORD *)&mysql_ps_fetch_functions[18] = ps_fetch_int32; mysql_ps_fetch_functions[20] = 4; *(_QWORD *)&mysql_ps_fetch_functions[22] = 11LL; *(_QWORD *)&mysql_ps_fetch_functions[48] = ps_fetch_int64; mysql_ps_fetch_functions[50] = 8; *(_QWORD *)&mysql_ps_fetch_functions[52] = 20LL; *(_QWORD *)&mysql_ps_fetch_functions[24] = ps_fetch_float; mysql_ps_fetch_functions[26] = 4; *(_QWORD *)&mysql_ps_fetch_functions[28] = 300LL; *(_QWORD *)&mysql_ps_fetch_functions[30] = ps_fetch_double; mysql_ps_fetch_functions[32] = 8; *(_QWORD *)&mysql_ps_fetch_functions[34] = 300LL; *(_QWORD *)&mysql_ps_fetch_functions[66] = ps_fetch_datetime; mysql_ps_fetch_functions[68] = -1; *(_QWORD *)&mysql_ps_fetch_functions[70] = 17LL; *(_QWORD *)&mysql_ps_fetch_functions[60] = ps_fetch_datetime; mysql_ps_fetch_functions[62] = -1; *(_QWORD *)&mysql_ps_fetch_functions[64] = 10LL; *(_QWORD *)&mysql_ps_fetch_functions[84] = ps_fetch_string; mysql_ps_fetch_functions[86] = -1; *(_QWORD *)&mysql_ps_fetch_functions[88] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[72] = ps_fetch_datetime; mysql_ps_fetch_functions[74] = -1; *(_QWORD *)&mysql_ps_fetch_functions[76] = 30LL; *(_QWORD *)&mysql_ps_fetch_functions[42] = ps_fetch_datetime; mysql_ps_fetch_functions[44] = -1; *(_QWORD *)&mysql_ps_fetch_functions[46] = 30LL; *(_QWORD *)&mysql_ps_fetch_functions[1494] = ps_fetch_bin; mysql_ps_fetch_functions[1496] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1498] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1512] = ps_fetch_bin; mysql_ps_fetch_functions[1514] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1516] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1500] = ps_fetch_bin; mysql_ps_fetch_functions[1502] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1504] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1506] = ps_fetch_bin; mysql_ps_fetch_functions[1508] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1510] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[96] = ps_fetch_bin; mysql_ps_fetch_functions[98] = -2; *(_QWORD *)&mysql_ps_fetch_functions[100] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1518] = ps_fetch_string; mysql_ps_fetch_functions[1520] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1522] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[90] = ps_fetch_string; mysql_ps_fetch_functions[92] = -2; *(_QWORD *)&mysql_ps_fetch_functions[94] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1524] = ps_fetch_string; mysql_ps_fetch_functions[1526] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1528] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1470] = ps_fetch_string; mysql_ps_fetch_functions[1472] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1474] = -1LL; *(_QWORD *)mysql_ps_fetch_functions = ps_fetch_string; mysql_ps_fetch_functions[2] = -2; *(_QWORD *)&mysql_ps_fetch_functions[4] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1476] = ps_fetch_string; mysql_ps_fetch_functions[1478] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1480] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1482] = ps_fetch_string; mysql_ps_fetch_functions[1484] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1486] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1488] = ps_fetch_string; mysql_ps_fetch_functions[1490] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1492] = -1LL; *(_QWORD *)&mysql_ps_fetch_functions[1530] = ps_fetch_string; mysql_ps_fetch_functions[1532] = -2; *(_QWORD *)&mysql_ps_fetch_functions[1534] = -1LL; result = mysql_ps_subsystem_initialized; mysql_ps_subsystem_initialized[0] = 1; return result; }
mysql_init_ps_subsystem: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x55e680] MOV EDX,0x1800 MOV RDI,RBX XOR ESI,ESI CALL 0x0015f370 LEA RAX,[0x180f25] MOV qword ptr [RBX + 0x90],RAX MOV qword ptr [RBX + 0xa0],0x0 LEA RAX,[0x180f2b] MOV qword ptr [RBX + 0x18],RAX MOV dword ptr [RBX + 0x20],0x1 MOV EAX,0x4 MOV qword ptr [RBX + 0x28],RAX LEA RCX,[0x180f92] MOV qword ptr [RBX + 0x30],RCX MOV EDX,0x2 MOV dword ptr [RBX + 0x38],EDX MOV qword ptr [RBX + 0x40],0x6 MOV qword ptr [RBX + 0x138],RCX MOV dword ptr [RBX + 0x140],EDX MOV qword ptr [RBX + 0x148],RAX LEA RAX,[0x180fdf] MOV qword ptr [RBX + 0xd8],RAX MOV ECX,0x4 MOV dword ptr [RBX + 0xe0],ECX MOV qword ptr [RBX + 0xe8],0x8 MOV qword ptr [RBX + 0x48],RAX MOV dword ptr [RBX + 0x50],ECX MOV qword ptr [RBX + 0x58],0xb LEA RAX,[0x18102a] MOV qword ptr [RBX + 0xc0],RAX MOV EAX,0x8 MOV dword ptr [RBX + 0xc8],EAX MOV qword ptr [RBX + 0xd0],0x14 LEA RDX,[0x181068] MOV qword ptr [RBX + 0x60],RDX MOV dword ptr [RBX + 0x68],ECX MOV ECX,0x12c MOV qword ptr [RBX + 0x70],RCX LEA RDX,[0x18138f] MOV qword ptr [RBX + 0x78],RDX MOV dword ptr [RBX + 0x80],EAX MOV qword ptr [RBX + 0x88],RCX LEA RDX,[0x1816b3] MOV qword ptr [RBX + 0x108],RDX MOV ESI,0xffffffff MOV dword ptr [RBX + 0x110],ESI MOV qword ptr [RBX + 0x118],0x11 MOV qword ptr [RBX + 0xf0],RDX MOV dword ptr [RBX + 0xf8],ESI MOV qword ptr [RBX + 0x100],0xa LEA RAX,[0x18194b] MOV qword ptr [RBX + 0x150],RAX MOV dword ptr [RBX + 0x158],ESI MOV RCX,-0x1 MOV qword ptr [RBX + 0x160],RCX MOV qword ptr [RBX + 0x120],RDX MOV dword ptr [RBX + 0x128],ESI MOV EDI,0x1e MOV qword ptr [RBX + 0x130],RDI MOV qword ptr [RBX + 0xa8],RDX MOV dword ptr [RBX + 0xb0],ESI MOV qword ptr [RBX + 0xb8],RDI LEA RSI,[0x181982] MOV qword ptr [RBX + 0x1758],RSI MOV EDX,0xfffffffe MOV dword ptr [RBX + 0x1760],EDX MOV qword ptr [RBX + 0x1768],RCX MOV qword ptr [RBX + 0x17a0],RSI MOV dword ptr [RBX + 0x17a8],EDX MOV qword ptr [RBX + 0x17b0],RCX MOV qword ptr [RBX + 0x1770],RSI MOV dword ptr [RBX + 0x1778],EDX MOV qword ptr [RBX + 0x1780],RCX MOV qword ptr [RBX + 0x1788],RSI MOV dword ptr [RBX + 0x1790],EDX MOV qword ptr [RBX + 0x1798],RCX MOV qword ptr [RBX + 0x180],RSI MOV dword ptr [RBX + 0x188],EDX MOV qword ptr [RBX + 0x190],RCX MOV qword ptr [RBX + 0x17b8],RAX MOV dword ptr [RBX + 0x17c0],EDX MOV qword ptr [RBX + 0x17c8],RCX MOV qword ptr [RBX + 0x168],RAX MOV dword ptr [RBX + 0x170],EDX MOV qword ptr [RBX + 0x178],RCX MOV qword ptr [RBX + 0x17d0],RAX MOV dword ptr [RBX + 0x17d8],EDX MOV qword ptr [RBX + 0x17e0],RCX MOV qword ptr [RBX + 0x16f8],RAX MOV dword ptr [RBX + 0x1700],EDX MOV qword ptr [RBX + 0x1708],RCX MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EDX MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RBX + 0x1710],RAX MOV dword ptr [RBX + 0x1718],EDX MOV qword ptr [RBX + 0x1720],RCX MOV qword ptr [RBX + 0x1728],RAX MOV dword ptr [RBX + 0x1730],EDX MOV qword ptr [RBX + 0x1738],RCX MOV qword ptr [RBX + 0x1740],RAX MOV dword ptr [RBX + 0x1748],EDX MOV qword ptr [RBX + 0x1750],RCX MOV qword ptr [RBX + 0x17e8],RAX MOV dword ptr [RBX + 0x17f0],EDX MOV qword ptr [RBX + 0x17f8],RCX LEA RAX,[0x55e670] MOV byte ptr [RAX],0x1 ADD RSP,0x8 POP RBX POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void mysql_init_ps_subsystem(void) { memset(&mysql_ps_fetch_functions,0,0x1800); _DAT_0055e710 = ps_fetch_null; _DAT_0055e720 = 0; _DAT_0055e698 = ps_fetch_int8; _DAT_0055e6a0 = 1; _DAT_0055e6a8 = 4; _DAT_0055e6b0 = ps_fetch_int16; _DAT_0055e6b8 = 2; _DAT_0055e6c0 = 6; _DAT_0055e7b8 = ps_fetch_int16; _DAT_0055e7c0 = 2; _DAT_0055e7c8 = 4; _DAT_0055e758 = ps_fetch_int32; _DAT_0055e760 = 4; _DAT_0055e768 = 8; _DAT_0055e6c8 = ps_fetch_int32; _DAT_0055e6d0 = 4; _DAT_0055e6d8 = 0xb; _DAT_0055e740 = ps_fetch_int64; _DAT_0055e748 = 8; _DAT_0055e750 = 0x14; _DAT_0055e6e0 = ps_fetch_float; _DAT_0055e6e8 = 4; _DAT_0055e6f0 = 300; _DAT_0055e6f8 = ps_fetch_double; _DAT_0055e700 = 8; _DAT_0055e708 = 300; _DAT_0055e788 = ps_fetch_datetime; DAT_0055e790 = 0xffffffff; _DAT_0055e798 = 0x11; _DAT_0055e770 = ps_fetch_datetime; _DAT_0055e778 = 0xffffffff; _DAT_0055e780 = 10; _DAT_0055e7d0 = ps_fetch_string; _DAT_0055e7d8 = 0xffffffff; _DAT_0055e7e0 = 0xffffffffffffffff; _DAT_0055e7a0 = ps_fetch_datetime; _DAT_0055e7a8 = 0xffffffff; _DAT_0055e7b0 = 0x1e; _DAT_0055e728 = ps_fetch_datetime; _DAT_0055e730 = 0xffffffff; _DAT_0055e738 = 0x1e; _DAT_0055fdd8 = ps_fetch_bin; _DAT_0055fde0 = 0xfffffffe; _DAT_0055fde8 = 0xffffffffffffffff; _DAT_0055fe20 = ps_fetch_bin; _DAT_0055fe28 = 0xfffffffe; _DAT_0055fe30 = 0xffffffffffffffff; _DAT_0055fdf0 = ps_fetch_bin; _DAT_0055fdf8 = 0xfffffffe; _DAT_0055fe00 = 0xffffffffffffffff; _DAT_0055fe08 = ps_fetch_bin; _DAT_0055fe10 = 0xfffffffe; _DAT_0055fe18 = 0xffffffffffffffff; _DAT_0055e800 = ps_fetch_bin; _DAT_0055e808 = 0xfffffffe; _DAT_0055e810 = 0xffffffffffffffff; _DAT_0055fe38 = ps_fetch_string; _DAT_0055fe40 = 0xfffffffe; _DAT_0055fe48 = 0xffffffffffffffff; _DAT_0055e7e8 = ps_fetch_string; _DAT_0055e7f0 = 0xfffffffe; _DAT_0055e7f8 = 0xffffffffffffffff; _DAT_0055fe50 = ps_fetch_string; _DAT_0055fe58 = 0xfffffffe; _DAT_0055fe60 = 0xffffffffffffffff; _DAT_0055fd78 = ps_fetch_string; _DAT_0055fd80 = 0xfffffffe; _DAT_0055fd88 = 0xffffffffffffffff; mysql_ps_fetch_functions = ps_fetch_string; DAT_0055e688 = 0xfffffffe; DAT_0055e690 = 0xffffffffffffffff; DAT_0055fd90 = ps_fetch_string; DAT_0055fd98 = 0xfffffffe; DAT_0055fda0 = 0xffffffffffffffff; DAT_0055fda8 = ps_fetch_string; DAT_0055fdb0 = 0xfffffffe; DAT_0055fdb8 = 0xffffffffffffffff; DAT_0055fdc0 = ps_fetch_string; DAT_0055fdc8 = 0xfffffffe; DAT_0055fdd0 = 0xffffffffffffffff; DAT_0055fe68 = ps_fetch_string; DAT_0055fe70 = 0xfffffffe; DAT_0055fe78 = 0xffffffffffffffff; mysql_ps_subsystem_initialized = 1; return; }
11,439
my_casedn_str_mb
eloqsql/strings/ctype-mb.c
size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_lower; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_casedn_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x48dd0 movq %rdi, %r14 movq 0x48(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x48dc0 movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x48dc2 movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x48d8c subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_48DD0 mov r14, rdi mov r12, [rdi+48h] mov r15, rbx loc_48D8C: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_48DC0 movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_48DC2 loc_48DC0: mov ecx, eax loc_48DC2: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_48D8C loc_48DD0: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_casedn_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 72); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_casedn_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x00148dd0 MOV R14,RDI MOV R12,qword ptr [RDI + 0x48] MOV R15,RBX LAB_00148d8c: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00148dc0 MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x00148dc2 LAB_00148dc0: MOV ECX,EAX LAB_00148dc2: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x00148d8c LAB_00148dd0: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_casedn_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x48); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
11,440
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O3
c
my_is_symlink: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x98, %rsp leaq -0x98(%rbp), %rbx movq %rbx, %rsi callq 0x24570 movl 0x18(%rbx), %edx andl $0xf000, %edx # imm = 0xF000 xorl $0xa000, %edx # imm = 0xA000 xorl %ecx, %ecx orl %eax, %edx sete %cl movl %ecx, %eax addq $0x98, %rsp popq %rbx popq %rbp retq
my_is_symlink: push rbp mov rbp, rsp push rbx sub rsp, 98h lea rbx, [rbp+var_98] mov rsi, rbx call _lstat64 mov edx, [rbx+18h] and edx, 0F000h xor edx, 0A000h xor ecx, ecx or edx, eax setz cl mov eax, ecx add rsp, 98h pop rbx pop rbp retn
_BOOL8 my_is_symlink(long long a1) { int v1; // eax _BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF __int16 v4; // [rsp+20h] [rbp-80h] v1 = lstat64(a1, v3); return (v1 | v4 & 0xF000 ^ 0xA000) == 0; }
my_is_symlink: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 LEA RBX,[RBP + -0x98] MOV RSI,RBX CALL 0x00124570 MOV EDX,dword ptr [RBX + 0x18] AND EDX,0xf000 XOR EDX,0xa000 XOR ECX,ECX OR EDX,EAX SETZ CL MOV EAX,ECX ADD RSP,0x98 POP RBX POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a0; iVar1 = lstat64(param_1,&local_a0); return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0; }
11,441
thr_merge_locks
eloqsql/mysys/thr_lock.c
void thr_merge_locks(THR_LOCK_DATA **data, uint old_count, uint new_count) { THR_LOCK_DATA **pos, **end, **first_lock= 0; DBUG_ENTER("thr_merge_lock"); /* Remove marks on old locks to make them sort before new ones */ for (pos=data, end= pos + old_count; pos < end ; pos++) (*pos)->priority&= ~THR_LOCK_LATE_PRIV; /* Mark new locks with LATE_PRIV to make them sort after org ones */ for (pos=data + old_count, end= pos + new_count; pos < end ; pos++) (*pos)->priority|= THR_LOCK_LATE_PRIV; sort_locks(data, old_count + new_count); for (pos=data ; pos < end ; pos++) { /* Check if lock was unlocked before */ if (pos[0]->type == TL_UNLOCK || ! pos[0]->lock->fix_status) { DBUG_PRINT("info", ("lock skipped. unlocked: %d fix_status: %d", pos[0]->type == TL_UNLOCK, pos[0]->lock->fix_status == 0)); continue; } /* If same table as previous table use pointer to previous status information to ensure that all read/write tables shares same state. */ if (first_lock && pos[0]->lock == first_lock[0]->lock) (pos[0]->lock->fix_status)((*first_lock)->status_param, (*pos)->status_param); else { /* Different lock, use this as base for next lock */ first_lock= pos; (pos[0]->lock->fix_status)((*first_lock)->status_param, 0); } } DBUG_VOID_RETURN; }
O0
c
thr_merge_locks: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xf8b5c movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %ecx andl $-0x2, %ecx movl %ecx, 0x48(%rax) movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xf8b34 movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl -0x10(%rbp), %ecx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xf8ba8 movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x48(%rax) movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xf8b80 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi addl -0x10(%rbp), %esi callq 0xf82f0 movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xf8c7e movq -0x18(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x40(%rax) je 0xf8bef movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax cmpq $0x0, 0xe0(%rax) jne 0xf8bf5 jmp 0xf8bf1 jmp 0xf8bf3 jmp 0xf8c6d cmpq $0x0, -0x28(%rbp) je 0xf8c40 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx cmpq 0x18(%rcx), %rax jne 0xf8c40 movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq 0xe0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rdi movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rsi callq *%rax jmp 0xf8c6b movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x18(%rax), %rax movq 0xe0(%rax), %rax movq -0x28(%rbp), %rcx movq (%rcx), %rcx movq 0x28(%rcx), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax jmp 0xf8c6d movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0xf8bbf jmp 0xf8c80 jmp 0xf8c82 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
thr_merge_locks: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_C] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_F8B34: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_F8B5C mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+48h] and ecx, 0FFFFFFFEh mov [rax+48h], ecx mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_F8B34 loc_F8B5C: mov rax, [rbp+var_8] mov ecx, [rbp+var_C] shl rcx, 3 add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_18] mov ecx, [rbp+var_10] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax loc_F8B80: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_F8BA8 mov rax, [rbp+var_18] mov rax, [rax] mov ecx, [rax+48h] or ecx, 1 mov [rax+48h], ecx mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_F8B80 loc_F8BA8: mov rdi, [rbp+var_8] mov esi, [rbp+var_C] add esi, [rbp+var_10] call sort_locks mov rax, [rbp+var_8] mov [rbp+var_18], rax loc_F8BBF: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb loc_F8C7E mov rax, [rbp+var_18] mov rax, [rax] cmp dword ptr [rax+40h], 0 jz short loc_F8BEF mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] cmp qword ptr [rax+0E0h], 0 jnz short loc_F8BF5 loc_F8BEF: jmp short $+2 loc_F8BF1: jmp short $+2 loc_F8BF3: jmp short loc_F8C6D loc_F8BF5: cmp [rbp+var_28], 0 jz short loc_F8C40 mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rcx, [rbp+var_28] mov rcx, [rcx] cmp rax, [rcx+18h] jnz short loc_F8C40 mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rax, [rax+0E0h] mov rcx, [rbp+var_28] mov rcx, [rcx] mov rdi, [rcx+28h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+28h] call rax jmp short loc_F8C6B loc_F8C40: mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+18h] mov rax, [rax+0E0h] mov rcx, [rbp+var_28] mov rcx, [rcx] mov rdi, [rcx+28h] xor ecx, ecx mov esi, ecx call rax loc_F8C6B: jmp short $+2 loc_F8C6D: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp loc_F8BBF loc_F8C7E: jmp short $+2 loc_F8C80: jmp short $+2 loc_F8C82: add rsp, 30h pop rbp retn
_QWORD * thr_merge_locks(_QWORD *a1, int a2, int a3) { _QWORD *result; // rax _QWORD *v4; // [rsp+8h] [rbp-28h] _QWORD *v5; // [rsp+10h] [rbp-20h] _QWORD *i; // [rsp+18h] [rbp-18h] _QWORD *v7; // [rsp+18h] [rbp-18h] _QWORD *j; // [rsp+18h] [rbp-18h] v4 = 0LL; for ( i = a1; i < &a1[a2]; ++i ) *(_DWORD *)(*i + 72LL) &= ~1u; v7 = &a1[a2]; v5 = &v7[a3]; while ( v7 < v5 ) *(_DWORD *)(*v7++ + 72LL) |= 1u; sort_locks(a1, a3 + a2); for ( j = a1; ; ++j ) { result = j; if ( j >= v5 ) break; if ( *(_DWORD *)(*j + 64LL) && *(_QWORD *)(*(_QWORD *)(*j + 24LL) + 224LL) ) { if ( v4 && *(_QWORD *)(*j + 24LL) == *(_QWORD *)(*v4 + 24LL) ) { (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*j + 24LL) + 224LL))( *(_QWORD *)(*v4 + 40LL), *(_QWORD *)(*j + 40LL)); } else { v4 = j; (*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(*j + 24LL) + 224LL))(*(_QWORD *)(*j + 40LL), 0LL); } } } return result; }
thr_merge_locks: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001f8b34: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001f8b5c MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x48] AND ECX,0xfffffffe MOV dword ptr [RAX + 0x48],ECX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001f8b34 LAB_001f8b5c: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x10] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001f8b80: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001f8ba8 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x48] OR ECX,0x1 MOV dword ptr [RAX + 0x48],ECX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001f8b80 LAB_001f8ba8: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] ADD ESI,dword ptr [RBP + -0x10] CALL 0x001f82f0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX LAB_001f8bbf: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001f8c7e MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x40],0x0 JZ 0x001f8bef MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] CMP qword ptr [RAX + 0xe0],0x0 JNZ 0x001f8bf5 LAB_001f8bef: JMP 0x001f8bf1 LAB_001f8bf1: JMP 0x001f8bf3 LAB_001f8bf3: JMP 0x001f8c6d LAB_001f8bf5: CMP qword ptr [RBP + -0x28],0x0 JZ 0x001f8c40 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x18] JNZ 0x001f8c40 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x28] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x28] CALL RAX JMP 0x001f8c6b LAB_001f8c40: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0xe0] MOV RCX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x28] XOR ECX,ECX MOV ESI,ECX CALL RAX LAB_001f8c6b: JMP 0x001f8c6d LAB_001f8c6d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x001f8bbf LAB_001f8c7e: JMP 0x001f8c80 LAB_001f8c80: JMP 0x001f8c82 LAB_001f8c82: ADD RSP,0x30 POP RBP RET
void thr_merge_locks(long *param_1,uint param_2,uint param_3) { long *plVar1; long *local_30; long *local_20; local_30 = (long *)0x0; for (local_20 = param_1; local_20 < param_1 + param_2; local_20 = local_20 + 1) { *(uint *)(*local_20 + 0x48) = *(uint *)(*local_20 + 0x48) & 0xfffffffe; } local_20 = param_1 + param_2; plVar1 = local_20 + param_3; for (; local_20 < plVar1; local_20 = local_20 + 1) { *(uint *)(*local_20 + 0x48) = *(uint *)(*local_20 + 0x48) | 1; } sort_locks(param_1,param_2 + param_3); for (local_20 = param_1; local_20 < plVar1; local_20 = local_20 + 1) { if ((*(int *)(*local_20 + 0x40) != 0) && (*(long *)(*(long *)(*local_20 + 0x18) + 0xe0) != 0)) { if ((local_30 == (long *)0x0) || (*(long *)(*local_20 + 0x18) != *(long *)(*local_30 + 0x18))) { local_30 = local_20; (**(code **)(*(long *)(*local_20 + 0x18) + 0xe0))(*(int8 *)(*local_20 + 0x28),0); } else { (**(code **)(*(long *)(*local_20 + 0x18) + 0xe0)) (*(int8 *)(*local_30 + 0x28),*(int8 *)(*local_20 + 0x28)); } } } return; }
11,442
gather_available_ancestors
bluesky950520[P]quickjs/quickjs.c
static int gather_available_ancestors(JSContext *ctx, JSModuleDef *module, ExecModuleList *exec_list) { int i; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return -1; } for(i = 0; i < module->async_parent_modules_count; i++) { JSModuleDef *m = module->async_parent_modules[i]; if (!find_in_exec_module_list(exec_list, m) && !m->cycle_root->eval_has_exception) { assert(m->status == JS_MODULE_STATUS_EVALUATING_ASYNC); assert(!m->eval_has_exception); assert(m->async_evaluation); assert(m->pending_async_dependencies > 0); m->pending_async_dependencies--; if (m->pending_async_dependencies == 0) { if (js_resize_array(ctx, (void **)&exec_list->tab, sizeof(exec_list->tab[0]), &exec_list->size, exec_list->count + 1)) { return -1; } exec_list->tab[exec_list->count++] = m; if (!m->has_tla) { if (gather_available_ancestors(ctx, m, exec_list)) return -1; } } } } return 0; }
O0
c
gather_available_ancestors: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq 0x18(%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x53fd0 cmpl $0x0, %eax je 0x7db6b movq 0x38(%rsp), %rdi callq 0x664d0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x7dcb2 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0xa0(%rcx), %eax jge 0x7dcaa movq 0x30(%rsp), %rax movq 0x98(%rax), %rax movslq 0x24(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x7dd30 cmpl $0x0, %eax jne 0x7dc98 movq 0x8(%rsp), %rax movq 0xb8(%rax), %rax movsbl 0xf0(%rax), %eax cmpl $0x0, %eax jne 0x7dc98 movq 0x8(%rsp), %rax movl 0xa8(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0xa8(%rax) movq 0x8(%rsp), %rax cmpl $0x0, 0xa8(%rax) jne 0x7dc96 movq 0x38(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x28(%rsp), %rcx addq $0xc, %rcx movq 0x28(%rsp), %rax movl 0x8(%rax), %r8d addl $0x1, %r8d movl $0x8, %edx callq 0x79430 cmpl $0x0, %eax je 0x7dc35 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x7dcb2 movq 0x8(%rsp), %rdx movq 0x28(%rsp), %rax movq (%rax), %rax movq 0x28(%rsp), %rsi movl 0x8(%rsi), %ecx movl %ecx, %edi addl $0x1, %edi movl %edi, 0x8(%rsi) movslq %ecx, %rcx movq %rdx, (%rax,%rcx,8) movq 0x8(%rsp), %rax movl 0x80(%rax), %eax shll $0x18, %eax sarl $0x18, %eax cmpl $0x0, %eax jne 0x7dc94 movq 0x38(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x7db20 cmpl $0x0, %eax je 0x7dc92 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x7dcb2 jmp 0x7dc94 jmp 0x7dc96 jmp 0x7dc98 jmp 0x7dc9a movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x7db73 movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax,%rax)
gather_available_ancestors: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov rax, [rsp+48h+var_10] mov rdi, [rax+18h] xor eax, eax mov esi, eax call js_check_stack_overflow cmp eax, 0 jz short loc_7DB6B mov rdi, [rsp+48h+var_10] call JS_ThrowStackOverflow mov [rsp+48h+var_38], rax mov [rsp+48h+var_30], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp loc_7DCB2 loc_7DB6B: mov [rsp+48h+var_24], 0 loc_7DB73: mov eax, [rsp+48h+var_24] mov rcx, [rsp+48h+var_18] cmp eax, [rcx+0A0h] jge loc_7DCAA mov rax, [rsp+48h+var_18] mov rax, [rax+98h] movsxd rcx, [rsp+48h+var_24] mov rax, [rax+rcx*8] mov [rsp+48h+var_40], rax mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_40] call find_in_exec_module_list cmp eax, 0 jnz loc_7DC98 mov rax, [rsp+48h+var_40] mov rax, [rax+0B8h] movsx eax, byte ptr [rax+0F0h] cmp eax, 0 jnz loc_7DC98 mov rax, [rsp+48h+var_40] mov ecx, [rax+0A8h] add ecx, 0FFFFFFFFh mov [rax+0A8h], ecx mov rax, [rsp+48h+var_40] cmp dword ptr [rax+0A8h], 0 jnz loc_7DC96 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_20] mov rcx, [rsp+48h+var_20] add rcx, 0Ch mov rax, [rsp+48h+var_20] mov r8d, [rax+8] add r8d, 1 mov edx, 8 call js_resize_array cmp eax, 0 jz short loc_7DC35 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_7DCB2 loc_7DC35: mov rdx, [rsp+48h+var_40] mov rax, [rsp+48h+var_20] mov rax, [rax] mov rsi, [rsp+48h+var_20] mov ecx, [rsi+8] mov edi, ecx add edi, 1 mov [rsi+8], edi movsxd rcx, ecx mov [rax+rcx*8], rdx mov rax, [rsp+48h+var_40] mov eax, [rax+80h] shl eax, 18h sar eax, 18h cmp eax, 0 jnz short loc_7DC94 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_20] call gather_available_ancestors cmp eax, 0 jz short loc_7DC92 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_7DCB2 loc_7DC92: jmp short $+2 loc_7DC94: jmp short $+2 loc_7DC96: jmp short $+2 loc_7DC98: jmp short $+2 loc_7DC9A: mov eax, [rsp+48h+var_24] add eax, 1 mov [rsp+48h+var_24], eax jmp loc_7DB73 loc_7DCAA: mov [rsp+48h+var_4], 0 loc_7DCB2: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long gather_available_ancestors( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 long long v17; // rax int v18; // ecx long long v20; // [rsp+8h] [rbp-40h] int i; // [rsp+24h] [rbp-24h] if ( js_check_stack_overflow(*(_QWORD *)(a1 + 24), 0LL) ) { JS_ThrowStackOverflow(a1, a4, a5, a6, a7, v15, v16, a10, a11, 0LL, v11, v12, v13, v14); return (unsigned int)-1; } else { for ( i = 0; i < *(_DWORD *)(a2 + 160); ++i ) { v20 = *(_QWORD *)(*(_QWORD *)(a2 + 152) + 8LL * i); if ( !(unsigned int)find_in_exec_module_list(a3, v20) && !*(_BYTE *)(*(_QWORD *)(v20 + 184) + 240LL) && !--*(_DWORD *)(v20 + 168) ) { if ( (unsigned int)js_resize_array(a1, a3, 8u, (_DWORD *)(a3 + 12), *(_DWORD *)(a3 + 8) + 1) ) return (unsigned int)-1; v17 = *(_QWORD *)a3; v18 = *(_DWORD *)(a3 + 8); *(_DWORD *)(a3 + 8) = v18 + 1; *(_QWORD *)(v17 + 8LL * v18) = v20; if ( !(unsigned __int8)*(_DWORD *)(v20 + 128) ) { if ( (unsigned int)gather_available_ancestors(a1, v20, a3) ) return (unsigned int)-1; } } } return 0; } }
gather_available_ancestors: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX + 0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x00153fd0 CMP EAX,0x0 JZ 0x0017db6b MOV RDI,qword ptr [RSP + 0x38] CALL 0x001664d0 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0017dcb2 LAB_0017db6b: MOV dword ptr [RSP + 0x24],0x0 LAB_0017db73: MOV EAX,dword ptr [RSP + 0x24] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0xa0] JGE 0x0017dcaa MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x98] MOVSXD RCX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0017dd30 CMP EAX,0x0 JNZ 0x0017dc98 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0xb8] MOVSX EAX,byte ptr [RAX + 0xf0] CMP EAX,0x0 JNZ 0x0017dc98 MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX + 0xa8] ADD ECX,-0x1 MOV dword ptr [RAX + 0xa8],ECX MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0xa8],0x0 JNZ 0x0017dc96 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x28] ADD RCX,0xc MOV RAX,qword ptr [RSP + 0x28] MOV R8D,dword ptr [RAX + 0x8] ADD R8D,0x1 MOV EDX,0x8 CALL 0x00179430 CMP EAX,0x0 JZ 0x0017dc35 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0017dcb2 LAB_0017dc35: MOV RDX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSI + 0x8] MOV EDI,ECX ADD EDI,0x1 MOV dword ptr [RSI + 0x8],EDI MOVSXD RCX,ECX MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x80] SHL EAX,0x18 SAR EAX,0x18 CMP EAX,0x0 JNZ 0x0017dc94 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x28] CALL 0x0017db20 CMP EAX,0x0 JZ 0x0017dc92 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0017dcb2 LAB_0017dc92: JMP 0x0017dc94 LAB_0017dc94: JMP 0x0017dc96 LAB_0017dc96: JMP 0x0017dc98 LAB_0017dc98: JMP 0x0017dc9a LAB_0017dc9a: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x0017db73 LAB_0017dcaa: MOV dword ptr [RSP + 0x44],0x0 LAB_0017dcb2: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 gather_available_ancestors(long param_1,long param_2,long *param_3) { long lVar1; long lVar2; int iVar3; int local_24; int4 local_4; iVar3 = js_check_stack_overflow(*(int8 *)(param_1 + 0x18),0); if (iVar3 == 0) { for (local_24 = 0; local_24 < *(int *)(param_2 + 0xa0); local_24 = local_24 + 1) { lVar1 = *(long *)(*(long *)(param_2 + 0x98) + (long)local_24 * 8); iVar3 = find_in_exec_module_list(param_3,lVar1); if (((iVar3 == 0) && (*(char *)(*(long *)(lVar1 + 0xb8) + 0xf0) == '\0')) && (*(int *)(lVar1 + 0xa8) = *(int *)(lVar1 + 0xa8) + -1, *(int *)(lVar1 + 0xa8) == 0)) { iVar3 = js_resize_array(param_1,param_3,8,(long)param_3 + 0xc,(int)param_3[1] + 1); if (iVar3 != 0) { return 0xffffffff; } lVar2 = param_3[1]; *(int *)(param_3 + 1) = (int)lVar2 + 1; *(long *)(*param_3 + (long)(int)lVar2 * 8) = lVar1; if (((char)*(int4 *)(lVar1 + 0x80) == '\0') && (iVar3 = gather_available_ancestors(param_1,lVar1,param_3), iVar3 != 0)) { return 0xffffffff; } } } local_4 = 0; } else { JS_ThrowStackOverflow(param_1); local_4 = 0xffffffff; } return local_4; }
11,443
gather_available_ancestors
bluesky950520[P]quickjs/quickjs.c
static int gather_available_ancestors(JSContext *ctx, JSModuleDef *module, ExecModuleList *exec_list) { int i; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); return -1; } for(i = 0; i < module->async_parent_modules_count; i++) { JSModuleDef *m = module->async_parent_modules[i]; if (!find_in_exec_module_list(exec_list, m) && !m->cycle_root->eval_has_exception) { assert(m->status == JS_MODULE_STATUS_EVALUATING_ASYNC); assert(!m->eval_has_exception); assert(m->async_evaluation); assert(m->pending_async_dependencies > 0); m->pending_async_dependencies--; if (m->pending_async_dependencies == 0) { if (js_resize_array(ctx, (void **)&exec_list->tab, sizeof(exec_list->tab[0]), &exec_list->size, exec_list->count + 1)) { return -1; } exec_list->tab[exec_list->count++] = m; if (!m->has_tla) { if (gather_available_ancestors(ctx, m, exec_list)) return -1; } } } } return 0; }
O2
c
gather_available_ancestors: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x40977 movq %r14, %rdi callq 0x39941 pushq $-0x1 popq %rax jmp 0x40a37 movq %rdx, %r15 movq %rsi, %r12 leaq 0xc(%rdx), %rax movq %rax, -0x30(%rbp) xorl %ebx, %ebx movslq 0xa0(%r12), %rax cmpq %rax, %rbx jge 0x40a35 movq 0x98(%r12), %rax movq (%rax,%rbx,8), %r13 movl 0x8(%r15), %r8d testl %r8d, %r8d movl $0x0, %eax cmovgl %r8d, %eax xorl %ecx, %ecx cmpq %rcx, %rax je 0x409cd movq (%r15), %rdx leaq 0x1(%rcx), %rsi cmpq %r13, (%rdx,%rcx,8) movq %rsi, %rcx jne 0x409b6 jmp 0x40a2d movq 0xb8(%r13), %rax cmpb $0x0, 0xf0(%rax) jne 0x40a2d decl 0xa8(%r13) jne 0x40a2d incl %r8d movq %r14, %rdi movq %r15, %rsi pushq $0x8 popq %rdx movq -0x30(%rbp), %rcx callq 0x3ec9f testl %eax, %eax jne 0x40a46 movq (%r15), %rax movslq 0x8(%r15), %rcx leal 0x1(%rcx), %edx movl %edx, 0x8(%r15) movq %r13, (%rax,%rcx,8) cmpb $0x0, 0x80(%r13) jne 0x40a2d movq %r14, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x40949 testl %eax, %eax jne 0x40a46 incq %rbx jmp 0x40987 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x1 popq %rax jmp 0x40a37
gather_available_ancestors: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_40977 mov rdi, r14 call JS_ThrowStackOverflow push 0FFFFFFFFFFFFFFFFh pop rax jmp loc_40A37 loc_40977: mov r15, rdx mov r12, rsi lea rax, [rdx+0Ch] mov [rbp+var_30], rax xor ebx, ebx loc_40987: movsxd rax, dword ptr [r12+0A0h] cmp rbx, rax jge loc_40A35 mov rax, [r12+98h] mov r13, [rax+rbx*8] mov r8d, [r15+8] test r8d, r8d mov eax, 0 cmovg eax, r8d xor ecx, ecx loc_409B6: cmp rax, rcx jz short loc_409CD mov rdx, [r15] lea rsi, [rcx+1] cmp [rdx+rcx*8], r13 mov rcx, rsi jnz short loc_409B6 jmp short loc_40A2D loc_409CD: mov rax, [r13+0B8h] cmp byte ptr [rax+0F0h], 0 jnz short loc_40A2D dec dword ptr [r13+0A8h] jnz short loc_40A2D inc r8d mov rdi, r14 mov rsi, r15 push 8 pop rdx mov rcx, [rbp+var_30] call js_resize_array test eax, eax jnz short loc_40A46 mov rax, [r15] movsxd rcx, dword ptr [r15+8] lea edx, [rcx+1] mov [r15+8], edx mov [rax+rcx*8], r13 cmp byte ptr [r13+80h], 0 jnz short loc_40A2D mov rdi, r14 mov rsi, r13 mov rdx, r15 call gather_available_ancestors test eax, eax jnz short loc_40A46 loc_40A2D: inc rbx jmp loc_40987 loc_40A35: xor eax, eax loc_40A37: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_40A46: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_40A37
long long gather_available_ancestors( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al long long v17; // rbx long long v18; // r13 int v19; // r8d long long v20; // rax long long v21; // rcx bool v22; // zf long long v23; // rax long long v24; // rcx _DWORD *v25; // [rsp+0h] [rbp-30h] long long savedregs; // [rsp+30h] [rbp+0h] BYREF if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs ) { v25 = (_DWORD *)(a3 + 12); v17 = 0LL; while ( 2 ) { if ( v17 >= *(int *)(a2 + 160) ) { return 0LL; } else { v18 = *(_QWORD *)(*(_QWORD *)(a2 + 152) + 8 * v17); v19 = *(_DWORD *)(a3 + 8); v20 = 0LL; if ( v19 > 0 ) v20 = (unsigned int)v19; v21 = 0LL; while ( v20 != v21 ) { v22 = *(_QWORD *)(*(_QWORD *)a3 + 8 * v21++) == v18; if ( v22 ) goto LABEL_16; } if ( *(_BYTE *)(*(_QWORD *)(v18 + 184) + 240LL) || (v22 = *(_DWORD *)(v18 + 168) == 1, --*(_DWORD *)(v18 + 168), !v22) || !(unsigned int)js_resize_array(a1, a3, 8LL, v25, v19 + 1) && ((v23 = *(_QWORD *)a3, v24 = *(int *)(a3 + 8), *(_DWORD *)(a3 + 8) = v24 + 1, *(_QWORD *)(v23 + 8 * v24) = v18, *(_BYTE *)(v18 + 128)) || !(unsigned int)gather_available_ancestors(a1, v18, a3)) ) { LABEL_16: ++v17; continue; } return -1LL; } } } else { JS_ThrowStackOverflow(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6, v14); return -1LL; } }
gather_available_ancestors: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x18] CMP qword ptr [RAX + 0xe8],RBP JBE 0x00140977 MOV RDI,R14 CALL 0x00139941 PUSH -0x1 POP RAX JMP 0x00140a37 LAB_00140977: MOV R15,RDX MOV R12,RSI LEA RAX,[RDX + 0xc] MOV qword ptr [RBP + -0x30],RAX XOR EBX,EBX LAB_00140987: MOVSXD RAX,dword ptr [R12 + 0xa0] CMP RBX,RAX JGE 0x00140a35 MOV RAX,qword ptr [R12 + 0x98] MOV R13,qword ptr [RAX + RBX*0x8] MOV R8D,dword ptr [R15 + 0x8] TEST R8D,R8D MOV EAX,0x0 CMOVG EAX,R8D XOR ECX,ECX LAB_001409b6: CMP RAX,RCX JZ 0x001409cd MOV RDX,qword ptr [R15] LEA RSI,[RCX + 0x1] CMP qword ptr [RDX + RCX*0x8],R13 MOV RCX,RSI JNZ 0x001409b6 JMP 0x00140a2d LAB_001409cd: MOV RAX,qword ptr [R13 + 0xb8] CMP byte ptr [RAX + 0xf0],0x0 JNZ 0x00140a2d DEC dword ptr [R13 + 0xa8] JNZ 0x00140a2d INC R8D MOV RDI,R14 MOV RSI,R15 PUSH 0x8 POP RDX MOV RCX,qword ptr [RBP + -0x30] CALL 0x0013ec9f TEST EAX,EAX JNZ 0x00140a46 MOV RAX,qword ptr [R15] MOVSXD RCX,dword ptr [R15 + 0x8] LEA EDX,[RCX + 0x1] MOV dword ptr [R15 + 0x8],EDX MOV qword ptr [RAX + RCX*0x8],R13 CMP byte ptr [R13 + 0x80],0x0 JNZ 0x00140a2d MOV RDI,R14 MOV RSI,R13 MOV RDX,R15 CALL 0x00140949 TEST EAX,EAX JNZ 0x00140a46 LAB_00140a2d: INC RBX JMP 0x00140987 LAB_00140a35: XOR EAX,EAX LAB_00140a37: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00140a46: PUSH -0x1 POP RAX JMP 0x00140a37
int8 gather_available_ancestors(long param_1,long param_2,long *param_3) { int *piVar1; long lVar2; uint uVar3; long lVar4; int iVar5; ulong uVar6; int8 uVar7; ulong uVar8; long lVar9; if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) { JS_ThrowStackOverflow(param_1); uVar7 = 0xffffffffffffffff; } else { for (lVar9 = 0; lVar9 < *(int *)(param_2 + 0xa0); lVar9 = lVar9 + 1) { lVar4 = *(long *)(*(long *)(param_2 + 0x98) + lVar9 * 8); uVar3 = *(uint *)(param_3 + 1); uVar6 = 0; if (0 < (int)uVar3) { uVar6 = (ulong)uVar3; } uVar8 = 0; do { if (uVar6 == uVar8) { if (*(char *)(*(long *)(lVar4 + 0xb8) + 0xf0) != '\0') break; piVar1 = (int *)(lVar4 + 0xa8); *piVar1 = *piVar1 + -1; if (*piVar1 != 0) break; iVar5 = js_resize_array(param_1,param_3,8,(long)param_3 + 0xc,uVar3 + 1); if (iVar5 == 0) { lVar2 = param_3[1]; *(int *)(param_3 + 1) = (int)lVar2 + 1; *(long *)(*param_3 + (long)(int)lVar2 * 8) = lVar4; if ((*(char *)(lVar4 + 0x80) != '\0') || (iVar5 = gather_available_ancestors(param_1,lVar4,param_3), iVar5 == 0)) break; } return 0xffffffffffffffff; } lVar2 = uVar8 * 8; uVar8 = uVar8 + 1; } while (*(long *)(*param_3 + lVar2) != lVar4); } uVar7 = 0; } return uVar7; }
11,444
ma_fcvt
eloqsql/libmariadb/libmariadb/ma_dtoa.c
size_t ma_fcvt(double x, int precision, char *to, my_bool *error) { int decpt, sign, len, i; char *res, *src, *end, *dst= to; char buf[DTOA_BUFF_SIZE]; DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL); res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); if (decpt == DTOA_OVERFLOW) { dtoa_free(res, buf, sizeof(buf)); *to++= '0'; *to= '\0'; if (error != NULL) *error= TRUE; return 1; } src= res; len= (int)(end - src); if (sign) *dst++= '-'; if (decpt <= 0) { *dst++= '0'; *dst++= '.'; for (i= decpt; i < 0; i++) *dst++= '0'; } for (i= 1; i <= len; i++) { *dst++= *src++; if (i == decpt && i < len) *dst++= '.'; } while (i++ <= decpt) *dst++= '0'; if (precision > 0) { if (len <= decpt) *dst++= '.'; for (i= precision - MAX(0, (len - decpt)); i > 0; i--) *dst++= '0'; } *dst= '\0'; if (error != NULL) *error= FALSE; dtoa_free(res, buf, sizeof(buf)); return dst - to; }
O0
c
ma_fcvt: pushq %rbp movq %rsp, %rbp subq $0xee0, %rsp # imm = 0xEE0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movsd %xmm0, -0xe80(%rbp) movl %edi, -0xe84(%rbp) movq %rsi, -0xe90(%rbp) movq %rdx, -0xe98(%rbp) movq -0xe90(%rbp), %rax movq %rax, -0xec8(%rbp) movsd -0xe80(%rbp), %xmm0 movl -0xe84(%rbp), %esi leaq -0xe70(%rbp), %r9 movl $0x5, %edi leaq -0xe9c(%rbp), %rdx leaq -0xea0(%rbp), %rcx leaq -0xec0(%rbp), %r8 movq $0xe60, (%rsp) # imm = 0xE60 callq 0x63e70 movq %rax, -0xeb0(%rbp) cmpl $0x270f, -0xe9c(%rbp) # imm = 0x270F jne 0x63baf movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x654d0 movq -0xe90(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xe90(%rbp) movb $0x30, (%rax) movq -0xe90(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x63b9f movq -0xe98(%rbp), %rax movb $0x1, (%rax) movq $0x1, -0xe78(%rbp) jmp 0x63e36 movq -0xeb0(%rbp), %rax movq %rax, -0xeb8(%rbp) movq -0xec0(%rbp), %rax movq -0xeb8(%rbp), %rcx subq %rcx, %rax movl %eax, -0xea4(%rbp) cmpl $0x0, -0xea0(%rbp) je 0x63bf5 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2d, (%rax) cmpl $0x0, -0xe9c(%rbp) jg 0x63c6e movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe9c(%rbp), %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jge 0x63c6c movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x63c3a jmp 0x63c6e movl $0x1, -0xea8(%rbp) movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jg 0x63cfe movq -0xeb8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xeb8(%rbp) movb (%rax), %cl movq -0xec8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xec8(%rbp) movb %cl, (%rax) movl -0xea8(%rbp), %eax cmpl -0xe9c(%rbp), %eax jne 0x63ce8 movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jge 0x63ce8 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) jmp 0x63cea movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x63c78 jmp 0x63d00 movl -0xea8(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0xea8(%rbp) cmpl -0xe9c(%rbp), %eax jg 0x63d33 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) jmp 0x63d00 cmpl $0x0, -0xe84(%rbp) jle 0x63de8 movl -0xea4(%rbp), %eax cmpl -0xe9c(%rbp), %eax jg 0x63d66 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe84(%rbp), %eax movl %eax, -0xecc(%rbp) movl -0xea4(%rbp), %ecx subl -0xe9c(%rbp), %ecx xorl %eax, %eax cmpl %ecx, %eax jle 0x63d8e xorl %eax, %eax movl %eax, -0xed0(%rbp) jmp 0x63da0 movl -0xea4(%rbp), %eax subl -0xe9c(%rbp), %eax movl %eax, -0xed0(%rbp) movl -0xecc(%rbp), %eax movl -0xed0(%rbp), %ecx subl %ecx, %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jle 0x63de6 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $-0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x63db4 jmp 0x63de8 movq -0xec8(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x63e06 movq -0xe98(%rbp), %rax movb $0x0, (%rax) movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x654d0 movq -0xec8(%rbp), %rax movq -0xe90(%rbp), %rcx subq %rcx, %rax movq %rax, -0xe78(%rbp) movq -0xe78(%rbp), %rax movq %rax, -0xed8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x63e66 movq -0xed8(%rbp), %rax addq $0xee0, %rsp # imm = 0xEE0 popq %rbp retq callq 0x382c0 nopl (%rax,%rax)
ma_fcvt: push rbp mov rbp, rsp sub rsp, 0EE0h mov rax, fs:28h mov [rbp+var_8], rax movsd [rbp+var_E80], xmm0 mov [rbp+var_E84], edi mov [rbp+var_E90], rsi mov [rbp+var_E98], rdx mov rax, [rbp+var_E90] mov [rbp+var_EC8], rax movsd xmm0, [rbp+var_E80] mov esi, [rbp+var_E84] lea r9, [rbp+var_E70] mov edi, 5 lea rdx, [rbp+var_E9C] lea rcx, [rbp+var_EA0] lea r8, [rbp+var_EC0] mov [rsp+0EE0h+var_EE0], 0E60h call dtoa mov [rbp+var_EB0], rax cmp [rbp+var_E9C], 270Fh jnz short loc_63BAF mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_E90] mov rcx, rax add rcx, 1 mov [rbp+var_E90], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_E90] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_63B9F mov rax, [rbp+var_E98] mov byte ptr [rax], 1 loc_63B9F: mov [rbp+var_E78], 1 jmp loc_63E36 loc_63BAF: mov rax, [rbp+var_EB0] mov [rbp+var_EB8], rax mov rax, [rbp+var_EC0] mov rcx, [rbp+var_EB8] sub rax, rcx mov [rbp+var_EA4], eax cmp [rbp+var_EA0], 0 jz short loc_63BF5 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Dh ; '-' loc_63BF5: cmp [rbp+var_E9C], 0 jg short loc_63C6E mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' mov eax, [rbp+var_E9C] mov [rbp+var_EA8], eax loc_63C3A: cmp [rbp+var_EA8], 0 jge short loc_63C6C mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp short loc_63C3A loc_63C6C: jmp short $+2 loc_63C6E: mov [rbp+var_EA8], 1 loc_63C78: mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jg short loc_63CFE mov rax, [rbp+var_EB8] mov rcx, rax add rcx, 1 mov [rbp+var_EB8], rcx mov cl, [rax] mov rax, [rbp+var_EC8] mov rdx, rax add rdx, 1 mov [rbp+var_EC8], rdx mov [rax], cl mov eax, [rbp+var_EA8] cmp eax, [rbp+var_E9C] jnz short loc_63CE8 mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jge short loc_63CE8 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_63CE8: jmp short $+2 loc_63CEA: mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp loc_63C78 loc_63CFE: jmp short $+2 loc_63D00: mov eax, [rbp+var_EA8] mov ecx, eax add ecx, 1 mov [rbp+var_EA8], ecx cmp eax, [rbp+var_E9C] jg short loc_63D33 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' jmp short loc_63D00 loc_63D33: cmp [rbp+var_E84], 0 jle loc_63DE8 mov eax, [rbp+var_EA4] cmp eax, [rbp+var_E9C] jg short loc_63D66 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_63D66: mov eax, [rbp+var_E84] mov [rbp+var_ECC], eax mov ecx, [rbp+var_EA4] sub ecx, [rbp+var_E9C] xor eax, eax cmp eax, ecx jle short loc_63D8E xor eax, eax mov [rbp+var_ED0], eax jmp short loc_63DA0 loc_63D8E: mov eax, [rbp+var_EA4] sub eax, [rbp+var_E9C] mov [rbp+var_ED0], eax loc_63DA0: mov eax, [rbp+var_ECC] mov ecx, [rbp+var_ED0] sub eax, ecx mov [rbp+var_EA8], eax loc_63DB4: cmp [rbp+var_EA8], 0 jle short loc_63DE6 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 0FFFFFFFFh mov [rbp+var_EA8], eax jmp short loc_63DB4 loc_63DE6: jmp short $+2 loc_63DE8: mov rax, [rbp+var_EC8] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_63E06 mov rax, [rbp+var_E98] mov byte ptr [rax], 0 loc_63E06: mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_EC8] mov rcx, [rbp+var_E90] sub rax, rcx mov [rbp+var_E78], rax loc_63E36: mov rax, [rbp+var_E78] mov [rbp+var_ED8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_63E66 mov rax, [rbp+var_ED8] add rsp, 0EE0h pop rbp retn loc_63E66: call ___stack_chk_fail
long long ma_fcvt(int a1, _BYTE *a2, _BYTE *a3, double a4) { _BYTE *v4; // rax _BYTE *v5; // rax _BYTE *v6; // rax char *v7; // rax char v8; // cl _BYTE *v9; // rax _BYTE *v10; // rax int v11; // eax _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax int v16; // [rsp+10h] [rbp-ED0h] _BYTE *v17; // [rsp+18h] [rbp-EC8h] long long v18; // [rsp+20h] [rbp-EC0h] BYREF char *v19; // [rsp+28h] [rbp-EB8h] long long v20; // [rsp+30h] [rbp-EB0h] int i; // [rsp+38h] [rbp-EA8h] int v22; // [rsp+3Ch] [rbp-EA4h] int v23; // [rsp+40h] [rbp-EA0h] BYREF int v24; // [rsp+44h] [rbp-E9Ch] BYREF _BYTE *v25; // [rsp+48h] [rbp-E98h] _BYTE *v26; // [rsp+50h] [rbp-E90h] int v27; // [rsp+5Ch] [rbp-E84h] double v28; // [rsp+60h] [rbp-E80h] _BYTE v30[3688]; // [rsp+70h] [rbp-E70h] BYREF unsigned long long v31; // [rsp+ED8h] [rbp-8h] v31 = __readfsqword(0x28u); v28 = a4; v27 = a1; v26 = a2; v25 = a3; v17 = a2; v20 = dtoa(5, a1, (unsigned int)&v24, (unsigned int)&v23, (unsigned int)&v18, (unsigned int)v30, 3680LL); if ( v24 == 9999 ) { dtoa_free(v20, v30, 3680LL); v4 = v26++; *v4 = 48; *v26 = 0; if ( v25 ) *v25 = 1; return 1LL; } else { v19 = (char *)v20; v22 = v18 - v20; if ( v23 ) { v17 = a2 + 1; *a2 = 45; } if ( v24 <= 0 ) { *v17 = 48; v5 = v17 + 1; v17 += 2; *v5 = 46; for ( i = v24; i < 0; ++i ) { v6 = v17++; *v6 = 48; } } for ( i = 1; i <= v22; ++i ) { v7 = v19++; v8 = *v7; v9 = v17++; *v9 = v8; if ( i == v24 && i < v22 ) { v10 = v17++; *v10 = 46; } } while ( 1 ) { v11 = i++; if ( v11 > v24 ) break; v12 = v17++; *v12 = 48; } if ( v27 > 0 ) { if ( v22 <= v24 ) { v13 = v17++; *v13 = 46; } if ( v22 - v24 >= 0 ) v16 = v22 - v24; else v16 = 0; for ( i = v27 - v16; i > 0; --i ) { v14 = v17++; *v14 = 48; } } *v17 = 0; if ( v25 ) *v25 = 0; dtoa_free(v20, v30, 3680LL); return v17 - v26; } }
ma_fcvt: PUSH RBP MOV RBP,RSP SUB RSP,0xee0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOVSD qword ptr [RBP + -0xe80],XMM0 MOV dword ptr [RBP + -0xe84],EDI MOV qword ptr [RBP + -0xe90],RSI MOV qword ptr [RBP + -0xe98],RDX MOV RAX,qword ptr [RBP + -0xe90] MOV qword ptr [RBP + -0xec8],RAX MOVSD XMM0,qword ptr [RBP + -0xe80] MOV ESI,dword ptr [RBP + -0xe84] LEA R9,[RBP + -0xe70] MOV EDI,0x5 LEA RDX,[RBP + -0xe9c] LEA RCX,[RBP + -0xea0] LEA R8,[RBP + -0xec0] MOV qword ptr [RSP],0xe60 CALL 0x00163e70 MOV qword ptr [RBP + -0xeb0],RAX CMP dword ptr [RBP + -0xe9c],0x270f JNZ 0x00163baf MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x001654d0 MOV RAX,qword ptr [RBP + -0xe90] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xe90],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xe90] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00163b9f MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x1 LAB_00163b9f: MOV qword ptr [RBP + -0xe78],0x1 JMP 0x00163e36 LAB_00163baf: MOV RAX,qword ptr [RBP + -0xeb0] MOV qword ptr [RBP + -0xeb8],RAX MOV RAX,qword ptr [RBP + -0xec0] MOV RCX,qword ptr [RBP + -0xeb8] SUB RAX,RCX MOV dword ptr [RBP + -0xea4],EAX CMP dword ptr [RBP + -0xea0],0x0 JZ 0x00163bf5 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2d LAB_00163bf5: CMP dword ptr [RBP + -0xe9c],0x0 JG 0x00163c6e MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e MOV EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xea8],EAX LAB_00163c3a: CMP dword ptr [RBP + -0xea8],0x0 JGE 0x00163c6c MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00163c3a LAB_00163c6c: JMP 0x00163c6e LAB_00163c6e: MOV dword ptr [RBP + -0xea8],0x1 LAB_00163c78: MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JG 0x00163cfe MOV RAX,qword ptr [RBP + -0xeb8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xeb8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0xec8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xec8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xe9c] JNZ 0x00163ce8 MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JGE 0x00163ce8 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_00163ce8: JMP 0x00163cea LAB_00163cea: MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00163c78 LAB_00163cfe: JMP 0x00163d00 LAB_00163d00: MOV EAX,dword ptr [RBP + -0xea8] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0xea8],ECX CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00163d33 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 JMP 0x00163d00 LAB_00163d33: CMP dword ptr [RBP + -0xe84],0x0 JLE 0x00163de8 MOV EAX,dword ptr [RBP + -0xea4] CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00163d66 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_00163d66: MOV EAX,dword ptr [RBP + -0xe84] MOV dword ptr [RBP + -0xecc],EAX MOV ECX,dword ptr [RBP + -0xea4] SUB ECX,dword ptr [RBP + -0xe9c] XOR EAX,EAX CMP EAX,ECX JLE 0x00163d8e XOR EAX,EAX MOV dword ptr [RBP + -0xed0],EAX JMP 0x00163da0 LAB_00163d8e: MOV EAX,dword ptr [RBP + -0xea4] SUB EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xed0],EAX LAB_00163da0: MOV EAX,dword ptr [RBP + -0xecc] MOV ECX,dword ptr [RBP + -0xed0] SUB EAX,ECX MOV dword ptr [RBP + -0xea8],EAX LAB_00163db4: CMP dword ptr [RBP + -0xea8],0x0 JLE 0x00163de6 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00163db4 LAB_00163de6: JMP 0x00163de8 LAB_00163de8: MOV RAX,qword ptr [RBP + -0xec8] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00163e06 MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x0 LAB_00163e06: MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x001654d0 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,qword ptr [RBP + -0xe90] SUB RAX,RCX MOV qword ptr [RBP + -0xe78],RAX LAB_00163e36: MOV RAX,qword ptr [RBP + -0xe78] MOV qword ptr [RBP + -0xed8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00163e66 MOV RAX,qword ptr [RBP + -0xed8] ADD RSP,0xee0 POP RBP RET LAB_00163e66: CALL 0x001382c0
long ma_fcvt(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int1 *puVar1; long in_FS_OFFSET; int local_ed8; int1 *local_ed0; int local_ec8 [2]; int1 *local_ec0; int1 *local_eb8; int local_eb0; int local_eac; int local_ea8; int local_ea4; int1 *local_ea0; int1 *local_e98; int local_e8c; int8 local_e88; long local_e80; int1 local_e78 [3688]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_ea0 = param_4; local_e98 = param_3; local_e8c = param_2; local_e88 = param_1; local_eb8 = (int1 *)dtoa(param_1,5,param_2,&local_ea4,&local_ea8,local_ec8,local_e78,0xe60); if (local_ea4 == 9999) { dtoa_free(local_eb8,local_e78,0xe60); *local_e98 = 0x30; local_e98[1] = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 1; } local_e80 = 1; local_e98 = local_e98 + 1; } else { local_eac = local_ec8[0] - (int)local_eb8; local_ed0 = param_3; if (local_ea8 != 0) { local_ed0 = param_3 + 1; *param_3 = 0x2d; } if (local_ea4 < 1) { *local_ed0 = 0x30; local_ed0[1] = 0x2e; local_ed0 = local_ed0 + 2; for (local_eb0 = local_ea4; local_eb0 < 0; local_eb0 = local_eb0 + 1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } local_ec0 = local_eb8; for (local_eb0 = 1; local_eb0 <= local_eac; local_eb0 = local_eb0 + 1) { puVar1 = local_ed0 + 1; *local_ed0 = *local_ec0; if ((local_eb0 == local_ea4) && (local_eb0 < local_eac)) { *puVar1 = 0x2e; puVar1 = local_ed0 + 2; } local_ed0 = puVar1; local_ec0 = local_ec0 + 1; } while (local_eb0 <= local_ea4) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; local_eb0 = local_eb0 + 1; } local_eb0 = local_eb0 + 1; if (0 < local_e8c) { if (local_eac <= local_ea4) { *local_ed0 = 0x2e; local_ed0 = local_ed0 + 1; } if (local_eac - local_ea4 < 0) { local_ed8 = 0; } else { local_ed8 = local_eac - local_ea4; } for (local_eb0 = local_e8c - local_ed8; 0 < local_eb0; local_eb0 = local_eb0 + -1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } *local_ed0 = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 0; } dtoa_free(local_eb8,local_e78,0xe60); local_e80 = (long)local_ed0 - (long)local_e98; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_e80; }
11,445
js_c_function_data_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_c_function_data_finalizer(JSRuntime *rt, JSValue val) { JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA); int i; if (s) { for(i = 0; i < s->data_len; i++) { JS_FreeValueRT(rt, s->data[i]); } js_free_rt(rt, s); } }
O1
c
js_c_function_data_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq %rsi, (%rsp) cmpl $-0x1, %edx jne 0x39ed8 movq (%rsp), %rax cmpw $0xf, 0x6(%rax) jne 0x39ed8 movq 0x30(%rax), %r14 jmp 0x39edb xorl %r14d, %r14d testq %r14, %r14 je 0x39f3f cmpb $0x0, 0x9(%r14) je 0x39f0e leaq 0x18(%r14), %r15 xorl %r12d, %r12d movq -0x8(%r15), %rsi movq (%r15), %rdx movq %rbx, %rdi callq 0x1ccb2 incq %r12 movzbl 0x9(%r14), %eax addq $0x10, %r15 cmpq %rax, %r12 jb 0x39eee decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_c_function_data_finalizer: push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov [rsp+28h+var_28], rsi cmp edx, 0FFFFFFFFh jnz short loc_39ED8 mov rax, [rsp+28h+var_28] cmp word ptr [rax+6], 0Fh jnz short loc_39ED8 mov r14, [rax+30h] jmp short loc_39EDB loc_39ED8: xor r14d, r14d loc_39EDB: test r14, r14 jz short loc_39F3F cmp byte ptr [r14+9], 0 jz short loc_39F0E lea r15, [r14+18h] xor r12d, r12d loc_39EEE: mov rsi, [r15-8] mov rdx, [r15] mov rdi, rbx call JS_FreeValueRT inc r12 movzx eax, byte ptr [r14+9] add r15, 10h cmp r12, rax jb short loc_39EEE loc_39F0E: dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_39F3F: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
void js_c_function_data_finalizer(long long a1, long long a2, int a3) { long long v3; // r14 long long *v4; // r15 unsigned long long v5; // r12 long long v6; // rax void ( *v7)(_QWORD, long long); // rcx if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 ) v3 = *(_QWORD *)(a2 + 48); else v3 = 0LL; if ( v3 ) { if ( *(_BYTE *)(v3 + 9) ) { v4 = (long long *)(v3 + 24); v5 = 0LL; do { JS_FreeValueRT(a1, (_DWORD *)*(v4 - 1), *v4); ++v5; v4 += 2; } while ( v5 < *(unsigned __int8 *)(v3 + 9) ); } --*(_QWORD *)(a1 + 40); v6 = (*(long long ( **)(long long))(a1 + 32))(v3); v7 = *(void ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v6 - 8; v7(*(_QWORD *)(a1 + 64), v3); } }
js_c_function_data_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV qword ptr [RSP],RSI CMP EDX,-0x1 JNZ 0x00139ed8 MOV RAX,qword ptr [RSP] CMP word ptr [RAX + 0x6],0xf JNZ 0x00139ed8 MOV R14,qword ptr [RAX + 0x30] JMP 0x00139edb LAB_00139ed8: XOR R14D,R14D LAB_00139edb: TEST R14,R14 JZ 0x00139f3f CMP byte ptr [R14 + 0x9],0x0 JZ 0x00139f0e LEA R15,[R14 + 0x18] XOR R12D,R12D LAB_00139eee: MOV RSI,qword ptr [R15 + -0x8] MOV RDX,qword ptr [R15] MOV RDI,RBX CALL 0x0011ccb2 INC R12 MOVZX EAX,byte ptr [R14 + 0x9] ADD R15,0x10 CMP R12,RAX JC 0x00139eee LAB_00139f0e: DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_00139f3f: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_c_function_data_finalizer(long param_1,long param_2,int param_3) { long lVar1; ulong uVar2; long lVar3; int8 *puVar4; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) { lVar3 = *(long *)(param_2 + 0x30); } else { lVar3 = 0; } if (lVar3 != 0) { if (*(char *)(lVar3 + 9) != '\0') { puVar4 = (int8 *)(lVar3 + 0x18); uVar2 = 0; do { JS_FreeValueRT(param_1,puVar4[-1],*puVar4); uVar2 = uVar2 + 1; puVar4 = puVar4 + 2; } while (uVar2 < *(byte *)(lVar3 + 9)); } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar1 = (**(code **)(param_1 + 0x20))(lVar3); lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8; *(long *)(param_1 + 0x30) = lVar1; /* WARNING: Could not recover jumptable at 0x00139f3d. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),lVar3,lVar1,*(code **)(param_1 + 0x10)); return; } return; }
11,446
js_c_function_data_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_c_function_data_finalizer(JSRuntime *rt, JSValue val) { JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA); int i; if (s) { for(i = 0; i < s->data_len; i++) { JS_FreeValueRT(rt, s->data[i]); } js_free_rt(rt, s); } }
O3
c
js_c_function_data_finalizer: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpl $-0x1, %edx jne 0x3b4b8 cmpw $0xf, 0x6(%rsi) jne 0x3b4b8 movq 0x30(%rsi), %r14 testq %r14, %r14 je 0x3b4b8 movq %rdi, %rbx cmpb $0x0, 0x9(%r14) je 0x3b487 leaq 0x18(%r14), %r15 xorl %r12d, %r12d movq (%r15), %rdx cmpl $-0x9, %edx jb 0x3b476 movq -0x8(%r15), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x3b476 movq %rbx, %rdi callq 0x20d90 incq %r12 movzbl 0x9(%r14), %eax addq $0x10, %r15 cmpq %rax, %r12 jb 0x3b456 decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_c_function_data_finalizer: push r15 push r14 push r12 push rbx push rax cmp edx, 0FFFFFFFFh jnz loc_3B4B8 cmp word ptr [rsi+6], 0Fh jnz short loc_3B4B8 mov r14, [rsi+30h] test r14, r14 jz short loc_3B4B8 mov rbx, rdi cmp byte ptr [r14+9], 0 jz short loc_3B487 lea r15, [r14+18h] xor r12d, r12d loc_3B456: mov rdx, [r15] cmp edx, 0FFFFFFF7h jb short loc_3B476 mov rsi, [r15-8] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_3B476 mov rdi, rbx call js_free_value_rt loc_3B476: inc r12 movzx eax, byte ptr [r14+9] add r15, 10h cmp r12, rax jb short loc_3B456 loc_3B487: dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp rcx loc_3B4B8: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_c_function_data_finalizer(long long a1, long long a2, int a3, long long a4, long long a5, long long a6) { long long v6; // r14 long long *v7; // r15 unsigned long long v8; // r12 long long v9; // rdx _QWORD *v10; // rsi int v11; // eax long long v12; // rcx long long v13; // rax long long ( *v14)(_QWORD, long long); // rcx long long result; // rax if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 ) { v6 = *(_QWORD *)(a2 + 48); if ( v6 ) { if ( *(_BYTE *)(v6 + 9) ) { v7 = (long long *)(v6 + 24); v8 = 0LL; do { v9 = *v7; if ( (unsigned int)*v7 >= 0xFFFFFFF7 ) { v10 = (_QWORD *)*(v7 - 1); v11 = *(_DWORD *)v10; v12 = (unsigned int)(*(_DWORD *)v10 - 1); *(_DWORD *)v10 = v12; if ( v11 <= 1 ) js_free_value_rt(a1, v10, v9, v12, a5, a6); } ++v8; v7 += 2; } while ( v8 < *(unsigned __int8 *)(v6 + 9) ); } --*(_QWORD *)(a1 + 40); v13 = (*(long long ( **)(long long))(a1 + 32))(v6); v14 = *(long long ( **)(_QWORD, long long))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v13 - 8; return v14(*(_QWORD *)(a1 + 64), v6); } } return result; }
js_c_function_data_finalizer: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP EDX,-0x1 JNZ 0x0013b4b8 CMP word ptr [RSI + 0x6],0xf JNZ 0x0013b4b8 MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 JZ 0x0013b4b8 MOV RBX,RDI CMP byte ptr [R14 + 0x9],0x0 JZ 0x0013b487 LEA R15,[R14 + 0x18] XOR R12D,R12D LAB_0013b456: MOV RDX,qword ptr [R15] CMP EDX,-0x9 JC 0x0013b476 MOV RSI,qword ptr [R15 + -0x8] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0013b476 MOV RDI,RBX CALL 0x00120d90 LAB_0013b476: INC R12 MOVZX EAX,byte ptr [R14 + 0x9] ADD R15,0x10 CMP R12,RAX JC 0x0013b456 LAB_0013b487: DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP RCX LAB_0013b4b8: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void js_c_function_data_finalizer(long param_1,long param_2,int param_3) { int iVar1; long lVar2; long lVar3; ulong uVar4; int8 *puVar5; if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) && (lVar2 = *(long *)(param_2 + 0x30), lVar2 != 0)) { if (*(char *)(lVar2 + 9) != '\0') { puVar5 = (int8 *)(lVar2 + 0x18); uVar4 = 0; do { if (0xfffffff6 < (uint)*puVar5) { iVar1 = *(int *)puVar5[-1]; *(int *)puVar5[-1] = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(param_1); } } uVar4 = uVar4 + 1; puVar5 = puVar5 + 2; } while (uVar4 < *(byte *)(lVar2 + 9)); } *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar3 = (**(code **)(param_1 + 0x20))(lVar2); lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8; *(long *)(param_1 + 0x30) = lVar3; /* WARNING: Could not recover jumptable at 0x0013b4b6. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),lVar2,lVar3,*(code **)(param_1 + 0x10)); return; } return; }
11,447
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::begin() const
monkey531[P]llama/common/json.hpp
iteration_proxy_value<IteratorType> begin() const noexcept { return iteration_proxy_value<IteratorType>(container->begin()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::begin() const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %rax leaq 0x8(%rsp), %r14 movq %rax, (%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r14) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x18(%r14) movq %r14, %rdi callq 0x8cb66 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0xb567a movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq nop
_ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv: push r14 push rbx sub rsp, 28h mov rbx, rdi mov rax, [rsi] lea r14, [rsp+38h+var_30] mov [r14], rax xorps xmm0, xmm0 movups xmmword ptr [r14+8], xmm0 mov rax, 8000000000000000h mov [r14+18h], rax mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void) mov rdi, rbx mov rsi, r14 xor edx, edx call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>>::iteration_proxy_value(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong) mov rax, rbx add rsp, 28h pop rbx pop r14 retn
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::begin( long long a1, unsigned __int8 **a2) { unsigned __int8 *v3; // [rsp+8h] [rbp-30h] BYREF __int128 v4; // [rsp+10h] [rbp-28h] unsigned long long v5; // [rsp+20h] [rbp-18h] v3 = *a2; v4 = 0LL; v5 = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v3); nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::iteration_proxy_value( a1, (__int128 *)&v3, 0LL); return a1; }
begin: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RAX,qword ptr [RSI] LEA R14,[RSP + 0x8] MOV qword ptr [R14],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x8],XMM0 MOV RAX,-0x8000000000000000 MOV qword ptr [R14 + 0x18],RAX MOV RDI,R14 CALL 0x0018cb66 MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x001b567a MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const> >::begin() const */ void nlohmann::json_abi_v3_11_3::detail:: iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::begin(void) { int8 *in_RSI; int8 local_30; int8 local_28; int8 uStack_20; int8 local_18; local_30 = *in_RSI; local_28 = 0; uStack_20 = 0; local_18 = 0x8000000000000000; iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_30); iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>> ::iteration_proxy_value(); return; }
11,448
my_hash_update
eloqsql/mysys/hash.c
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key, size_t old_key_length) { uint new_index, new_pos_index, org_index, records, idx; size_t length, empty, blength; my_hash_value_type hash_nr; HASH_LINK org_link,*data,*previous,*pos; uchar *new_key; DBUG_ENTER("my_hash_update"); new_key= (uchar*) my_hash_key(hash, record, &length, 1); hash_nr= hash->hash_function(hash->charset, new_key, length); if (HASH_UNIQUE & hash->flags) { HASH_SEARCH_STATE state; uchar *found; if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length, &state))) { do { if (found != record) DBUG_RETURN(1); /* Duplicate entry */ } while ((found= my_hash_next(hash, new_key, length, &state))); } } data=dynamic_element(&hash->array,0,HASH_LINK*); blength=hash->blength; records=hash->records; /* Search after record with key */ idx= my_hash_mask(hash->hash_function(hash->charset, old_key, (old_key_length ? old_key_length : hash->key_length)), blength, records); org_index= idx; new_index= my_hash_mask(hash_nr, blength, records); previous=0; for (;;) { if ((pos= data+idx)->data == record) break; previous=pos; if ((idx=pos->next) == NO_RECORD) DBUG_RETURN(1); /* Not found in links */ } if (org_index == new_index) { data[idx].hash_nr= hash_nr; /* Hash number may have changed */ DBUG_RETURN(0); /* Record is in right position */ } org_link= *pos; empty=idx; /* Relink record from current chain */ if (!previous) { if (pos->next != NO_RECORD) { empty=pos->next; *pos= data[pos->next]; } } else previous->next=pos->next; /* unlink pos */ /* Move data to correct position */ if (new_index == empty) { /* At this point record is unlinked from the old chain, thus it holds random position. By the chance this position is equal to position for the first element in the new chain. That means updated record is the only record in the new chain. */ if (empty != idx) { /* Record was moved while unlinking it from the old chain. Copy data to a new position. */ data[empty]= org_link; } data[empty].next= NO_RECORD; data[empty].hash_nr= hash_nr; DBUG_RETURN(0); } pos=data+new_index; new_pos_index= my_hash_rec_mask(pos, blength, records); if (new_index != new_pos_index) { /* Other record in wrong position */ data[empty]= *pos; movelink(data,new_index,new_pos_index, (uint) empty); org_link.next=NO_RECORD; data[new_index]= org_link; data[new_index].hash_nr= hash_nr; } else { /* Link in chain at right position */ org_link.next=data[new_index].next; data[empty]=org_link; data[empty].hash_nr= hash_nr; data[new_index].next= (uint) empty; } DBUG_RETURN(0); }
O0
c
my_hash_update: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi leaq -0x48(%rbp), %rdx movl $0x1, %ecx callq 0x67360 movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x10(%rbp), %rcx movq 0x68(%rcx), %rdi movq -0x90(%rbp), %rsi movq -0x48(%rbp), %rdx callq *%rax movl %eax, -0x5c(%rbp) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x678ea movq -0x10(%rbp), %rdi movl -0x5c(%rbp), %esi movq -0x90(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x94(%rbp), %r8 callq 0x66b40 movq %rax, -0xa0(%rbp) cmpq $0x0, %rax je 0x678e8 jmp 0x678a4 movq -0xa0(%rbp), %rax cmpq -0x18(%rbp), %rax je 0x678bc jmp 0x678b3 movb $0x1, -0x1(%rbp) jmp 0x67c02 jmp 0x678be movq -0x10(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0x94(%rbp), %rcx callq 0x66d60 movq %rax, -0xa0(%rbp) cmpq $0x0, %rax jne 0x678a4 jmp 0x678e8 jmp 0x678ea movq -0x10(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0xb8(%rbp) movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0xb0(%rbp) movq -0x20(%rbp), %rax movq %rax, -0xa8(%rbp) cmpq $0x0, -0x28(%rbp) je 0x6794a movq -0x28(%rbp), %rax movq %rax, -0xc0(%rbp) jmp 0x67959 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0xc0(%rbp) movq -0xb8(%rbp), %rax movq -0xa8(%rbp), %rsi movq -0xb0(%rbp), %rdi movq -0xc0(%rbp), %rdx callq *%rax movl %eax, %edi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x66c40 movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x5c(%rbp), %edi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x66c40 movl %eax, -0x2c(%rbp) movq $0x0, -0x80(%rbp) movq -0x78(%rbp), %rax movl -0x3c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x88(%rbp) movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jne 0x679cd jmp 0x679f6 movq -0x88(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x88(%rbp), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) cmpl $-0x1, %eax jne 0x679f4 jmp 0x679eb movb $0x1, -0x1(%rbp) jmp 0x67c02 jmp 0x679ac movl -0x34(%rbp), %eax cmpl -0x2c(%rbp), %eax jne 0x67a1b movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movl -0x3c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movb $0x0, -0x1(%rbp) jmp 0x67c02 movq -0x88(%rbp), %rax movq (%rax), %rcx movq %rcx, -0x70(%rbp) movq 0x8(%rax), %rax movq %rax, -0x68(%rbp) movl -0x3c(%rbp), %eax movq %rax, -0x50(%rbp) cmpq $0x0, -0x80(%rbp) jne 0x67a83 movq -0x88(%rbp), %rax cmpl $-0x1, (%rax) je 0x67a81 movq -0x88(%rbp), %rax movl (%rax), %eax movq %rax, -0x50(%rbp) movq -0x88(%rbp), %rax movq -0x78(%rbp), %rcx movq -0x88(%rbp), %rdx movl (%rdx), %edx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x67a92 movq -0x88(%rbp), %rax movl (%rax), %ecx movq -0x80(%rbp), %rax movl %ecx, (%rax) movl -0x2c(%rbp), %eax cmpq -0x50(%rbp), %rax jne 0x67af8 movq -0x50(%rbp), %rax movl -0x3c(%rbp), %ecx cmpq %rcx, %rax je 0x67ac5 movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movq -0x50(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movb $0x0, -0x1(%rbp) jmp 0x67c02 movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rdi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x66d30 movl %eax, -0x30(%rbp) movl -0x2c(%rbp), %eax cmpl -0x30(%rbp), %eax je 0x67ba0 movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x88(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x78(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x30(%rbp), %edx movq -0x50(%rbp), %rax movl %eax, %ecx callq 0x673d0 movl $0xffffffff, -0x70(%rbp) # imm = 0xFFFFFFFF movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movl -0x2c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) jmp 0x67bfc movq -0x78(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, -0x70(%rbp) movq -0x78(%rbp), %rax movq -0x50(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq -0x70(%rbp), %rcx movq %rcx, (%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x8(%rax) movl -0x5c(%rbp), %ecx movq -0x78(%rbp), %rax movq -0x50(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movq -0x50(%rbp), %rax movl %eax, %ecx movq -0x78(%rbp), %rax movl -0x2c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, (%rax) jmp 0x67bfe movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nop
my_hash_update: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] lea rdx, [rbp+var_48] mov ecx, 1 call my_hash_key mov [rbp+var_90], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_10] mov rdi, [rcx+68h] mov rsi, [rbp+var_90] mov rdx, [rbp+var_48] call rax mov [rbp+var_5C], eax mov rax, [rbp+var_10] mov eax, [rax+20h] and eax, 1 cmp eax, 0 jz short loc_678EA mov rdi, [rbp+var_10] mov esi, [rbp+var_5C] mov rdx, [rbp+var_90] mov rcx, [rbp+var_48] lea r8, [rbp+var_94] call my_hash_first_from_hash_value mov [rbp+var_A0], rax cmp rax, 0 jz short loc_678E8 jmp short $+2 loc_678A4: mov rax, [rbp+var_A0] cmp rax, [rbp+var_18] jz short loc_678BC jmp short $+2 loc_678B3: mov [rbp+var_1], 1 jmp loc_67C02 loc_678BC: jmp short $+2 loc_678BE: mov rdi, [rbp+var_10] mov rsi, [rbp+var_90] mov rdx, [rbp+var_48] lea rcx, [rbp+var_94] call my_hash_next mov [rbp+var_A0], rax cmp rax, 0 jnz short loc_678A4 jmp short $+2 loc_678E8: jmp short $+2 loc_678EA: mov rax, [rbp+var_10] mov rax, [rax+28h] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rax, [rax+58h] mov [rbp+var_B8], rax mov rax, [rbp+var_10] mov rax, [rax+68h] mov [rbp+var_B0], rax mov rax, [rbp+var_20] mov [rbp+var_A8], rax cmp [rbp+var_28], 0 jz short loc_6794A mov rax, [rbp+var_28] mov [rbp+var_C0], rax jmp short loc_67959 loc_6794A: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_C0], rax loc_67959: mov rax, [rbp+var_B8] mov rsi, [rbp+var_A8] mov rdi, [rbp+var_B0] mov rdx, [rbp+var_C0] call rax mov edi, eax mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_mask mov [rbp+var_3C], eax mov eax, [rbp+var_3C] mov [rbp+var_34], eax mov edi, [rbp+var_5C] mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_mask mov [rbp+var_2C], eax mov [rbp+var_80], 0 loc_679AC: mov rax, [rbp+var_78] mov ecx, [rbp+var_3C] shl rcx, 4 add rax, rcx mov [rbp+var_88], rax mov rax, [rax+8] cmp rax, [rbp+var_18] jnz short loc_679CD jmp short loc_679F6 loc_679CD: mov rax, [rbp+var_88] mov [rbp+var_80], rax mov rax, [rbp+var_88] mov eax, [rax] mov [rbp+var_3C], eax cmp eax, 0FFFFFFFFh jnz short loc_679F4 jmp short $+2 loc_679EB: mov [rbp+var_1], 1 jmp loc_67C02 loc_679F4: jmp short loc_679AC loc_679F6: mov eax, [rbp+var_34] cmp eax, [rbp+var_2C] jnz short loc_67A1B mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov edx, [rbp+var_3C] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov [rbp+var_1], 0 jmp loc_67C02 loc_67A1B: mov rax, [rbp+var_88] mov rcx, [rax] mov [rbp+var_70], rcx mov rax, [rax+8] mov [rbp+var_68], rax mov eax, [rbp+var_3C] mov [rbp+var_50], rax cmp [rbp+var_80], 0 jnz short loc_67A83 mov rax, [rbp+var_88] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_67A81 mov rax, [rbp+var_88] mov eax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_88] mov rcx, [rbp+var_78] mov rdx, [rbp+var_88] mov edx, [rdx] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_67A81: jmp short loc_67A92 loc_67A83: mov rax, [rbp+var_88] mov ecx, [rax] mov rax, [rbp+var_80] mov [rax], ecx loc_67A92: mov eax, [rbp+var_2C] cmp rax, [rbp+var_50] jnz short loc_67AF8 mov rax, [rbp+var_50] mov ecx, [rbp+var_3C] cmp rax, rcx jz short loc_67AC5 mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx loc_67AC5: mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov dword ptr [rax], 0FFFFFFFFh mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov rdx, [rbp+var_50] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov [rbp+var_1], 0 jmp loc_67C02 loc_67AF8: mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_88], rax mov rdi, [rbp+var_88] mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call my_hash_rec_mask mov [rbp+var_30], eax mov eax, [rbp+var_2C] cmp eax, [rbp+var_30] jz short loc_67BA0 mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_88] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_78] mov esi, [rbp+var_2C] mov edx, [rbp+var_30] mov rax, [rbp+var_50] mov ecx, eax call movelink mov dword ptr [rbp+var_70], 0FFFFFFFFh mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov edx, [rbp+var_2C] shl rdx, 4 add rax, rdx mov [rax+4], ecx jmp short loc_67BFC loc_67BA0: mov rax, [rbp+var_78] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov eax, [rax] mov dword ptr [rbp+var_70], eax mov rax, [rbp+var_78] mov rcx, [rbp+var_50] shl rcx, 4 add rax, rcx mov rcx, [rbp+var_70] mov [rax], rcx mov rcx, [rbp+var_68] mov [rax+8], rcx mov ecx, [rbp+var_5C] mov rax, [rbp+var_78] mov rdx, [rbp+var_50] shl rdx, 4 add rax, rdx mov [rax+4], ecx mov rax, [rbp+var_50] mov ecx, eax mov rax, [rbp+var_78] mov edx, [rbp+var_2C] shl rdx, 4 add rax, rdx mov [rax], ecx loc_67BFC: jmp short $+2 loc_67BFE: mov [rbp+var_1], 0 loc_67C02: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char my_hash_update(_QWORD *a1, long long a2, long long a3, long long a4) { unsigned int v4; // eax unsigned int *v5; // rax _QWORD *v6; // rcx _QWORD *v7; // rax _QWORD *v8; // rax unsigned int *v9; // rcx _QWORD *v10; // rax _QWORD *v11; // rax long long ( *v13)(long long, long long, long long); // [rsp+8h] [rbp-B8h] long long v14; // [rsp+10h] [rbp-B0h] long long v15; // [rsp+20h] [rbp-A0h] unsigned int v16; // [rsp+2Ch] [rbp-94h] BYREF long long v17; // [rsp+30h] [rbp-90h] unsigned int *v18; // [rsp+38h] [rbp-88h] _DWORD *v19; // [rsp+40h] [rbp-80h] long long v20; // [rsp+48h] [rbp-78h] long long v21; // [rsp+50h] [rbp-70h] long long v22; // [rsp+58h] [rbp-68h] unsigned int v23; // [rsp+64h] [rbp-5Ch] unsigned long long v24; // [rsp+68h] [rbp-58h] long long v25; // [rsp+70h] [rbp-50h] long long v26; // [rsp+78h] [rbp-48h] BYREF unsigned int v27; // [rsp+84h] [rbp-3Ch] unsigned int v28; // [rsp+88h] [rbp-38h] unsigned int v29; // [rsp+8Ch] [rbp-34h] unsigned int v30; // [rsp+90h] [rbp-30h] unsigned int v31; // [rsp+94h] [rbp-2Ch] long long v32; // [rsp+98h] [rbp-28h] long long v33; // [rsp+A0h] [rbp-20h] long long v34; // [rsp+A8h] [rbp-18h] _QWORD *v35; // [rsp+B0h] [rbp-10h] v35 = a1; v34 = a2; v33 = a3; v32 = a4; v17 = my_hash_key((long long)a1, a2, &v26, 1); v23 = ((long long ( *)(_QWORD, long long, long long))v35[11])(v35[13], v17, v26); if ( (v35[4] & 1) != 0 && (v15 = my_hash_first_from_hash_value(v35, v23, v17, v26, &v16)) != 0 ) { while ( v15 == v34 ) { v15 = my_hash_next((long long)v35, v17, v26, &v16); if ( !v15 ) goto LABEL_6; } return 1; } else { LABEL_6: v20 = v35[5]; v24 = v35[2]; v28 = v35[3]; v13 = (long long ( *)(long long, long long, long long))v35[11]; v14 = v35[13]; if ( v32 ) v4 = v13(v14, v33, v32); else v4 = v13(v14, v33, v35[1]); v27 = my_hash_mask(v4, v24, v28); v29 = v27; v31 = my_hash_mask(v23, v24, v28); v19 = 0LL; while ( 1 ) { v18 = (unsigned int *)(16LL * v27 + v20); if ( *((_QWORD *)v18 + 1) == v34 ) break; v19 = v18; v27 = *v18; if ( v27 == -1 ) return 1; } if ( v29 == v31 ) { *(_DWORD *)(16LL * v27 + v20 + 4) = v23; return 0; } else { v21 = *(_QWORD *)v18; v22 = *((_QWORD *)v18 + 1); v25 = v27; if ( v19 ) { *v19 = *v18; } else if ( *v18 != -1 ) { v25 = *v18; v5 = v18; v6 = (_QWORD *)(16LL * *v18 + v20); *(_QWORD *)v18 = *v6; *((_QWORD *)v5 + 1) = v6[1]; } if ( v31 == v25 ) { if ( v25 != v27 ) { v7 = (_QWORD *)(16 * v25 + v20); *v7 = v21; v7[1] = v22; } *(_DWORD *)(16 * v25 + v20) = -1; *(_DWORD *)(16 * v25 + v20 + 4) = v23; return 0; } else { v18 = (unsigned int *)(16LL * v31 + v20); v30 = my_hash_rec_mask((long long)v18, v24, v28); if ( v31 == v30 ) { LODWORD(v21) = *(_DWORD *)(16LL * v31 + v20); v11 = (_QWORD *)(16 * v25 + v20); *v11 = v21; v11[1] = v22; *(_DWORD *)(16 * v25 + v20 + 4) = v23; *(_DWORD *)(16LL * v31 + v20) = v25; } else { v8 = (_QWORD *)(16 * v25 + v20); v9 = v18; *v8 = *(_QWORD *)v18; v8[1] = *((_QWORD *)v9 + 1); movelink(v20, v31, v30, v25); LODWORD(v21) = -1; v10 = (_QWORD *)(16LL * v31 + v20); *v10 = v21; v10[1] = v22; *(_DWORD *)(16LL * v31 + v20 + 4) = v23; } return 0; } } } }
my_hash_update: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x48] MOV ECX,0x1 CALL 0x00167360 MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x68] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x48] CALL RAX MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] AND EAX,0x1 CMP EAX,0x0 JZ 0x001678ea MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x5c] MOV RDX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0x48] LEA R8,[RBP + -0x94] CALL 0x00166b40 MOV qword ptr [RBP + -0xa0],RAX CMP RAX,0x0 JZ 0x001678e8 JMP 0x001678a4 LAB_001678a4: MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,qword ptr [RBP + -0x18] JZ 0x001678bc JMP 0x001678b3 LAB_001678b3: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00167c02 LAB_001678bc: JMP 0x001678be LAB_001678be: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0x48] LEA RCX,[RBP + -0x94] CALL 0x00166d60 MOV qword ptr [RBP + -0xa0],RAX CMP RAX,0x0 JNZ 0x001678a4 JMP 0x001678e8 LAB_001678e8: JMP 0x001678ea LAB_001678ea: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xa8],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x0016794a MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xc0],RAX JMP 0x00167959 LAB_0016794a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xc0],RAX LAB_00167959: MOV RAX,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0xa8] MOV RDI,qword ptr [RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xc0] CALL RAX MOV EDI,EAX MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x00166c40 MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x34],EAX MOV EDI,dword ptr [RBP + -0x5c] MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x00166c40 MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x80],0x0 LAB_001679ac: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x3c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001679cd JMP 0x001679f6 LAB_001679cd: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX CMP EAX,-0x1 JNZ 0x001679f4 JMP 0x001679eb LAB_001679eb: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00167c02 LAB_001679f4: JMP 0x001679ac LAB_001679f6: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x2c] JNZ 0x00167a1b MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x3c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00167c02 LAB_00167a1b: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x68],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x80],0x0 JNZ 0x00167a83 MOV RAX,qword ptr [RBP + -0x88] CMP dword ptr [RAX],-0x1 JZ 0x00167a81 MOV RAX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RDX] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_00167a81: JMP 0x00167a92 LAB_00167a83: MOV RAX,qword ptr [RBP + -0x88] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX],ECX LAB_00167a92: MOV EAX,dword ptr [RBP + -0x2c] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x00167af8 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x3c] CMP RAX,RCX JZ 0x00167ac5 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX LAB_00167ac5: MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX],0xffffffff MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x50] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00167c02 LAB_00167af8: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x88] MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x00166d30 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x30] JZ 0x00167ba0 MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x78] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,EAX CALL 0x001673d0 MOV dword ptr [RBP + -0x70],0xffffffff MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x2c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX JMP 0x00167bfc LAB_00167ba0: MOV RAX,qword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x50] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x50] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RBP + -0x2c] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX],ECX LAB_00167bfc: JMP 0x00167bfe LAB_00167bfe: MOV byte ptr [RBP + -0x1],0x0 LAB_00167c02: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 my_hash_update(long param_1,long param_2,int8 param_3,long param_4) { int4 uVar1; long lVar2; uint *puVar3; int8 *puVar4; long local_c8; int1 local_9c [4]; int8 local_98; int8 *local_90; uint *local_88; long local_80; int8 local_78; int8 local_70; int4 local_64; int8 local_60; ulong local_58; int8 local_50; uint local_44; int4 local_40; uint local_3c; uint local_38; uint local_34; long local_30; int8 local_28; long local_20; long local_18; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_98 = my_hash_key(param_1,param_2,&local_50,1); local_64 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_98,local_50); if ((*(uint *)(local_18 + 0x20) & 1) != 0) { lVar2 = my_hash_first_from_hash_value(local_18,local_64,local_98,local_50,local_9c); while (lVar2 != 0) { if (lVar2 != local_20) { return 1; } lVar2 = my_hash_next(local_18,local_98,local_50,local_9c); } } local_80 = *(long *)(local_18 + 0x28); local_60 = *(int8 *)(local_18 + 0x10); local_40 = (int4)*(int8 *)(local_18 + 0x18); if (local_30 == 0) { local_c8 = *(long *)(local_18 + 8); } else { local_c8 = local_30; } uVar1 = (**(code **)(local_18 + 0x58))(*(int8 *)(local_18 + 0x68),local_28,local_c8); local_44 = my_hash_mask(uVar1,local_60,local_40); local_3c = local_44; local_34 = my_hash_mask(local_64,local_60,local_40); local_88 = (uint *)0x0; while (puVar3 = (uint *)(local_80 + (ulong)local_44 * 0x10), *(long *)(puVar3 + 2) != local_20) { local_44 = *puVar3; local_88 = puVar3; if (local_44 == 0xffffffff) { return 1; } } if (local_3c == local_34) { *(int4 *)(local_80 + (ulong)local_44 * 0x10 + 4) = local_64; return 0; } local_78 = *(int8 *)puVar3; local_70 = *(int8 *)(puVar3 + 2); local_58 = (ulong)local_44; if (local_88 == (uint *)0x0) { if (*puVar3 != 0xffffffff) { local_58 = (ulong)*puVar3; puVar4 = (int8 *)(local_80 + (ulong)*puVar3 * 0x10); *(int8 *)puVar3 = *puVar4; *(int8 *)(puVar3 + 2) = puVar4[1]; } } else { *local_88 = *puVar3; } if (local_34 == local_58) { if (local_58 != local_44) { puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; } *(int4 *)(local_80 + local_58 * 0x10) = 0xffffffff; *(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64; return 0; } local_90 = (int8 *)(local_80 + (ulong)local_34 * 0x10); local_38 = my_hash_rec_mask(local_90,local_60,local_40); if (local_34 == local_38) { local_78 = CONCAT44(local_78._4_4_,*(int4 *)(local_80 + (ulong)local_34 * 0x10)); puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; *(int4 *)(local_80 + local_58 * 0x10 + 4) = local_64; *(int *)(local_80 + (ulong)local_34 * 0x10) = (int)local_58; } else { puVar4 = (int8 *)(local_80 + local_58 * 0x10); *puVar4 = *local_90; puVar4[1] = local_90[1]; movelink(local_80,local_34,local_38,local_58 & 0xffffffff); local_78 = CONCAT44(local_78._4_4_,0xffffffff); puVar4 = (int8 *)(local_80 + (ulong)local_34 * 0x10); *puVar4 = local_78; puVar4[1] = local_70; *(int4 *)(local_80 + (ulong)local_34 * 0x10 + 4) = local_64; } return 0; }
11,449
js_async_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSValue promise; JSAsyncFunctionData *s; s = js_mallocz(ctx, sizeof(*s)); if (!s) return JS_EXCEPTION; s->header.ref_count = 1; add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION); s->is_active = FALSE; s->resolving_funcs[0] = JS_UNDEFINED; s->resolving_funcs[1] = JS_UNDEFINED; promise = JS_NewPromiseCapability(ctx, s->resolving_funcs); if (JS_IsException(promise)) goto fail; if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) { fail: JS_FreeValue(ctx, promise); js_async_function_free(ctx->rt, s); return JS_EXCEPTION; } s->is_active = TRUE; js_async_function_resume(ctx, s); js_async_function_free(ctx->rt, s); return promise; }
O0
c
js_async_function_call: subq $0x98, %rsp movl 0xa8(%rsp), %eax movq 0xa0(%rsp), %rax movq %rsi, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rcx, 0x68(%rsp) movq %r8, 0x70(%rsp) movq %rdi, 0x60(%rsp) movl %r9d, 0x5c(%rsp) movq 0x60(%rsp), %rdi movl $0xa8, %esi callq 0x21d30 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) jne 0x53e5f movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x53ff4 movq 0x40(%rsp), %rax movl $0x1, (%rax) movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x40(%rsp), %rsi movl $0x4, %edx callq 0x240d0 movq 0x40(%rsp), %rax movl $0x0, 0x38(%rax) movq 0x40(%rsp), %rax movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movq 0x30(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x40(%rsp), %rax movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x28(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x30(%rax) movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x18, %rsi callq 0x4a490 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x53f25 jmp 0x53f6c movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x40, %rsi movl 0x5c(%rsp), %r10d movq 0xa0(%rsp), %rax movq 0x78(%rsp), %rdx movq 0x80(%rsp), %rcx movq 0x68(%rsp), %r8 movq 0x70(%rsp), %r9 movl %r10d, (%rsp) movq %rax, 0x8(%rsp) callq 0x71fb0 cmpl $0x0, %eax je 0x53fac jmp 0x53f6c movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x23c90 movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x40(%rsp), %rsi callq 0x91bf0 movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x53ff4 movq 0x40(%rsp), %rax movl $0x1, 0x38(%rax) movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x92620 movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x40(%rsp), %rsi callq 0x91bf0 movq 0x48(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0x98, %rsp retq nopl (%rax)
js_async_function_call: sub rsp, 98h mov eax, [rsp+98h+arg_8] mov rax, [rsp+98h+arg_0] mov [rsp+98h+var_20], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_30], rcx mov [rsp+98h+var_28], r8 mov [rsp+98h+var_38], rdi mov [rsp+98h+var_3C], r9d mov rdi, [rsp+98h+var_38] mov esi, 0A8h call js_mallocz mov [rsp+98h+var_58], rax cmp [rsp+98h+var_58], 0 jnz short loc_53E5F mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp loc_53FF4 loc_53E5F: mov rax, [rsp+98h+var_58] mov dword ptr [rax], 1 mov rax, [rsp+98h+var_38] mov rdi, [rax+18h] mov rsi, [rsp+98h+var_58] mov edx, 4 call add_gc_object mov rax, [rsp+98h+var_58] mov dword ptr [rax+38h], 0 mov rax, [rsp+98h+var_58] mov dword ptr [rsp+98h+var_68], 0 mov [rsp+98h+var_60], 3 mov rcx, [rsp+98h+var_68] mov [rax+18h], rcx mov rcx, [rsp+98h+var_60] mov [rax+20h], rcx mov rax, [rsp+98h+var_58] mov dword ptr [rsp+98h+var_78], 0 mov [rsp+98h+var_70], 3 mov rcx, [rsp+98h+var_78] mov [rax+28h], rcx mov rcx, [rsp+98h+var_70] mov [rax+30h], rcx mov rdi, [rsp+98h+var_38] mov rsi, [rsp+98h+var_58] add rsi, 18h call JS_NewPromiseCapability mov [rsp+98h+var_88], rax mov [rsp+98h+var_80], rdx mov rax, [rsp+98h+var_88] mov [rsp+98h+var_50], rax mov rax, [rsp+98h+var_80] mov [rsp+98h+var_48], rax mov rdi, [rsp+98h+var_50] mov rsi, [rsp+98h+var_48] call JS_IsException_1 cmp eax, 0 jz short loc_53F25 jmp short loc_53F6C loc_53F25: mov rdi, [rsp+98h+var_38] mov rsi, [rsp+98h+var_58] add rsi, 40h ; '@' mov r10d, [rsp+98h+var_3C] mov rax, [rsp+98h+arg_0] mov rdx, [rsp+98h+var_20] mov rcx, [rsp+98h+var_18] mov r8, [rsp+98h+var_30] mov r9, [rsp+98h+var_28] mov [rsp+98h+var_98], r10d mov [rsp+98h+var_90], rax call async_func_init cmp eax, 0 jz short loc_53FAC jmp short $+2 loc_53F6C: mov rdi, [rsp+98h+var_38] mov rsi, [rsp+98h+var_50] mov rdx, [rsp+98h+var_48] call JS_FreeValue mov rax, [rsp+98h+var_38] mov rdi, [rax+18h] mov rsi, [rsp+98h+var_58] call js_async_function_free mov dword ptr [rsp+98h+var_10], 0 mov [rsp+98h+var_8], 6 jmp short loc_53FF4 loc_53FAC: mov rax, [rsp+98h+var_58] mov dword ptr [rax+38h], 1 mov rdi, [rsp+98h+var_38] mov rsi, [rsp+98h+var_58] call js_async_function_resume mov rax, [rsp+98h+var_38] mov rdi, [rax+18h] mov rsi, [rsp+98h+var_58] call js_async_function_free mov rax, [rsp+98h+var_50] mov [rsp+98h+var_10], rax mov rax, [rsp+98h+var_48] mov [rsp+98h+var_8], rax loc_53FF4: mov rax, [rsp+98h+var_10] mov rdx, [rsp+98h+var_8] add rsp, 98h retn
long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7) { long long v7; // rdx long long v9; // [rsp+10h] [rbp-88h] long long v10; // [rsp+20h] [rbp-78h] long long v11; // [rsp+30h] [rbp-68h] long long v12; // [rsp+40h] [rbp-58h] long long v13; // [rsp+50h] [rbp-48h] long long v18; // [rsp+88h] [rbp-10h] v12 = js_mallocz(a1, 0xA8uLL); if ( v12 ) { *(_DWORD *)v12 = 1; add_gc_object(*(_QWORD *)(a1 + 24), v12, 4); *(_DWORD *)(v12 + 56) = 0; LODWORD(v11) = 0; *(_QWORD *)(v12 + 24) = v11; *(_QWORD *)(v12 + 32) = 3LL; LODWORD(v10) = 0; *(_QWORD *)(v12 + 40) = v10; *(_QWORD *)(v12 + 48) = 3LL; v9 = JS_NewPromiseCapability(a1, v12 + 24); v13 = v7; if ( JS_IsException_1(v9, v7) || (unsigned int)async_func_init(a1, (int)v12 + 64, a2, a3, a4, a5, a6, a7) ) { JS_FreeValue(a1, v9, v13); js_async_function_free(*(_QWORD *)(a1 + 24), v12); LODWORD(v18) = 0; } else { *(_DWORD *)(v12 + 56) = 1; js_async_function_resume(a1, v12); js_async_function_free(*(_QWORD *)(a1 + 24), v12); return v9; } } else { LODWORD(v18) = 0; } return v18; }
js_async_function_call: SUB RSP,0x98 MOV EAX,dword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x68],RCX MOV qword ptr [RSP + 0x70],R8 MOV qword ptr [RSP + 0x60],RDI MOV dword ptr [RSP + 0x5c],R9D MOV RDI,qword ptr [RSP + 0x60] MOV ESI,0xa8 CALL 0x00121d30 MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x00153e5f MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x00153ff4 LAB_00153e5f: MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,0x4 CALL 0x001240d0 MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x28],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x18 CALL 0x0014a490 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x00153f25 JMP 0x00153f6c LAB_00153f25: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x40 MOV R10D,dword ptr [RSP + 0x5c] MOV RAX,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x68] MOV R9,qword ptr [RSP + 0x70] MOV dword ptr [RSP],R10D MOV qword ptr [RSP + 0x8],RAX CALL 0x00171fb0 CMP EAX,0x0 JZ 0x00153fac JMP 0x00153f6c LAB_00153f6c: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x00123c90 MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00191bf0 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x00153ff4 LAB_00153fac: MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX + 0x38],0x1 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00192620 MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00191bf0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x90],RAX LAB_00153ff4: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0x98 RET
int1 [16] js_async_function_call (long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5, int4 param_6,int8 param_7) { int iVar1; int4 *puVar2; int1 auVar3 [16]; uint uStack_74; uint uStack_64; int4 local_10; int4 uStack_c; int8 local_8; puVar2 = (int4 *)js_mallocz(param_1,0xa8); if (puVar2 == (int4 *)0x0) { local_10 = 0; local_8 = 6; } else { *puVar2 = 1; add_gc_object(*(int8 *)(param_1 + 0x18),puVar2,4); puVar2[0xe] = 0; *(ulong *)(puVar2 + 6) = (ulong)uStack_64 << 0x20; *(int8 *)(puVar2 + 8) = 3; *(ulong *)(puVar2 + 10) = (ulong)uStack_74 << 0x20; *(int8 *)(puVar2 + 0xc) = 3; auVar3 = JS_NewPromiseCapability(param_1,puVar2 + 6); local_8 = auVar3._8_8_; iVar1 = JS_IsException(auVar3._0_8_,local_8); if ((iVar1 == 0) && (iVar1 = async_func_init(param_1,puVar2 + 0x10,param_2,param_3,param_4,param_5,param_6, param_7), iVar1 == 0)) { puVar2[0xe] = 1; js_async_function_resume(param_1,puVar2); js_async_function_free(*(int8 *)(param_1 + 0x18),puVar2); local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } else { JS_FreeValue(param_1,auVar3._0_8_,local_8); js_async_function_free(*(int8 *)(param_1 + 0x18),puVar2); local_10 = 0; local_8 = 6; } } auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
11,450
js_async_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSValue promise; JSAsyncFunctionData *s; s = js_mallocz(ctx, sizeof(*s)); if (!s) return JS_EXCEPTION; s->header.ref_count = 1; add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION); s->is_active = FALSE; s->resolving_funcs[0] = JS_UNDEFINED; s->resolving_funcs[1] = JS_UNDEFINED; promise = JS_NewPromiseCapability(ctx, s->resolving_funcs); if (JS_IsException(promise)) goto fail; if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) { fail: JS_FreeValue(ctx, promise); js_async_function_free(ctx->rt, s); return JS_EXCEPTION; } s->is_active = TRUE; js_async_function_resume(ctx, s); js_async_function_free(ctx->rt, s); return promise; }
O1
c
js_async_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %ebx movq %r8, %r12 movq %rcx, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %rsi, %r13 movq %rdi, %r14 movl $0xa8, %esi callq 0xee06 pushq $0x6 popq %rbp testq %rax, %rax je 0x1078b movq %rax, %r15 movq %r12, 0x8(%rsp) movq %rbx, 0x10(%rsp) movl $0x1, (%rax) movq 0x18(%r14), %rax movb $0x4, 0x4(%r15) leaq 0x8(%r15), %rcx leaq 0x98(%rax), %rdx movq 0x98(%rax), %rsi movq %rcx, 0x8(%rsi) movq %rsi, 0x8(%r15) movq %rdx, 0x10(%r15) movq %rcx, 0x98(%rax) andl $0x0, 0x38(%r15) andl $0x0, 0x18(%r15) leaq 0x18(%r15), %rsi pushq $0x3 popq %rcx movq %rcx, 0x20(%r15) andl $0x0, 0x28(%r15) movq %rcx, 0x30(%r15) movq %r14, %rdi xorl %edx, %edx callq 0x362b6 movq %rax, %r12 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x107a4 movq 0x18(%r14), %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x1d8c6 movq 0x18(%r14), %rdi movq %r15, %rsi callq 0x52b8b xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %rbp, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rsi addq $0x40, %rsi movq %r14, %rdi movq %r13, %rdx movq 0x18(%rsp), %rcx movq 0x20(%rsp), %r8 movq 0x8(%rsp), %r9 pushq 0x60(%rsp) pushq 0x18(%rsp) callq 0x10be0 popq %rcx popq %rdx testl %eax, %eax jne 0x10770 movl $0x1, 0x38(%r15) movq %r14, %rdi movq %r15, %rsi callq 0x53037 movq 0x18(%r14), %rdi movq %r15, %rsi callq 0x52b8b movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r12, %rcx andq %rax, %rcx movl %r12d, %eax movq %rbx, %rbp jmp 0x1078f
js_async_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r9d mov r12, r8 mov [rsp+58h+var_38], rcx mov [rsp+58h+var_40], rdx mov r13, rsi mov r14, rdi mov esi, 0A8h call js_mallocz push 6 pop rbp test rax, rax jz loc_1078B mov r15, rax mov [rsp+58h+var_50], r12 mov [rsp+58h+var_48], rbx mov dword ptr [rax], 1 mov rax, [r14+18h] mov byte ptr [r15+4], 4 lea rcx, [r15+8] lea rdx, [rax+98h] mov rsi, [rax+98h] mov [rsi+8], rcx mov [r15+8], rsi mov [r15+10h], rdx mov [rax+98h], rcx and dword ptr [r15+38h], 0 and dword ptr [r15+18h], 0 lea rsi, [r15+18h] push 3 pop rcx mov [r15+20h], rcx and dword ptr [r15+28h], 0 mov [r15+30h], rcx mov rdi, r14 xor edx, edx call js_new_promise_capability mov r12, rax mov rbx, rdx cmp ebx, 6 jnz short loc_107A4 loc_10770: mov rdi, [r14+18h] mov rsi, r12 mov rdx, rbx call JS_FreeValueRT mov rdi, [r14+18h] mov rsi, r15 call js_async_function_free loc_1078B: xor eax, eax xor ecx, ecx loc_1078F: or rax, rcx mov rdx, rbp add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_107A4: mov rsi, r15 add rsi, 40h ; '@' mov rdi, r14 mov rdx, r13 mov rcx, [rsp+58h+var_40] mov r8, [rsp+58h+var_38] mov r9, [rsp+58h+var_50] push [rsp+58h+arg_0] push [rsp+60h+var_48] call async_func_init pop rcx pop rdx test eax, eax jnz short loc_10770 mov dword ptr [r15+38h], 1 mov rdi, r14 mov rsi, r15 call js_async_function_resume mov rdi, [r14+18h] mov rsi, r15 call js_async_function_free mov rax, 0FFFFFFFF00000000h mov rcx, r12 and rcx, rax mov eax, r12d mov rbp, rbx jmp short loc_1078F
unsigned long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7) { _DWORD *v10; // rax _DWORD *v11; // r15 long long v12; // rax long long v13; // rsi long long v14; // r12 int v15; // edx long long v16; // rax unsigned long long v17; // rcx long long v19; // [rsp-8h] [rbp-60h] int v20; // [rsp+8h] [rbp-50h] v10 = (_DWORD *)js_mallocz(a1, 0xA8uLL); if ( v10 ) { v11 = v10; v20 = a5; *v10 = 1; v12 = *(_QWORD *)(a1 + 24); *((_BYTE *)v11 + 4) = 4; v13 = *(_QWORD *)(v12 + 152); *(_QWORD *)(v13 + 8) = v11 + 2; *((_QWORD *)v11 + 1) = v13; *((_QWORD *)v11 + 2) = v12 + 152; *(_QWORD *)(v12 + 152) = v11 + 2; v11[14] = 0; v11[6] = 0; *((_QWORD *)v11 + 4) = 3LL; v11[10] = 0; *((_QWORD *)v11 + 6) = 3LL; v14 = js_new_promise_capability(a1, v11 + 6, 0LL); if ( v15 != 6 && !(unsigned int)async_func_init(a1, (int)v11 + 64, a2, a3, a4, v20, a6, a7) ) { v11[14] = 1; js_async_function_resume(a1, v11, v19); js_async_function_free(*(_QWORD *)(a1 + 24), v11); v17 = v14 & 0xFFFFFFFF00000000LL; v16 = (unsigned int)v14; return v17 | v16; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v14); js_async_function_free(*(_QWORD *)(a1 + 24), v11); } v16 = 0LL; v17 = 0LL; return v17 | v16; }
11,451
js_async_function_call
bluesky950520[P]quickjs/quickjs.c
static JSValue js_async_function_call(JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags) { JSValue promise; JSAsyncFunctionData *s; s = js_mallocz(ctx, sizeof(*s)); if (!s) return JS_EXCEPTION; s->header.ref_count = 1; add_gc_object(ctx->rt, &s->header, JS_GC_OBJ_TYPE_ASYNC_FUNCTION); s->is_active = FALSE; s->resolving_funcs[0] = JS_UNDEFINED; s->resolving_funcs[1] = JS_UNDEFINED; promise = JS_NewPromiseCapability(ctx, s->resolving_funcs); if (JS_IsException(promise)) goto fail; if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) { fail: JS_FreeValue(ctx, promise); js_async_function_free(ctx->rt, s); return JS_EXCEPTION; } s->is_active = TRUE; js_async_function_resume(ctx, s); js_async_function_free(ctx->rt, s); return promise; }
O2
c
js_async_function_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r9d, %ebx movq %r8, %r13 movq %rcx, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %rsi, %rbp movq %rdi, %r14 movl $0xa8, %esi callq 0x17241 pushq $0x6 popq %r12 testq %rax, %rax je 0x2fd92 movq %rax, %r15 movq %r13, 0x8(%rsp) movq %rbx, 0x10(%rsp) movl $0x1, (%rax) movq 0x18(%r14), %rax movb $0x4, 0x4(%r15) leaq 0x8(%r15), %rcx leaq 0x98(%rax), %rdx movq 0x98(%rax), %rsi movq %rcx, 0x8(%rsi) movq %rsi, 0x8(%r15) movq %rdx, 0x10(%r15) movq %rcx, 0x98(%rax) andl $0x0, 0x38(%r15) andl $0x0, 0x18(%r15) leaq 0x18(%r15), %rsi pushq $0x3 popq %rax movq %rax, 0x20(%r15) andl $0x0, 0x28(%r15) movq %rax, 0x30(%r15) movq %r14, %rdi callq 0x2956d movq %rax, %r13 movq %rdx, %rbx cmpl $0x6, %ebx je 0x2fd78 movq %r15, %rsi addq $0x40, %rsi movq %r14, %rdi movq %rbp, %rdx movq 0x18(%rsp), %rcx movq 0x20(%rsp), %r8 movq 0x8(%rsp), %r9 pushq 0x60(%rsp) pushq 0x18(%rsp) callq 0x3ac67 popq %rcx popq %rdx testl %eax, %eax je 0x2fdab movq %r14, %rdi movq %r13, %rsi movq %rbx, %rdx callq 0x1801e movq 0x18(%r14), %rdi movq %r15, %rsi callq 0x46f5f xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax movq %r12, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, 0x38(%r15) movq %r14, %rdi movq %r15, %rsi callq 0x4746e movq 0x18(%r14), %rdi movq %r15, %rsi callq 0x46f5f movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r13, %rcx andq %rax, %rcx movl %r13d, %eax movq %rbx, %r12 jmp 0x2fd96
js_async_function_call: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r9d mov r13, r8 mov [rsp+58h+var_38], rcx mov [rsp+58h+var_40], rdx mov rbp, rsi mov r14, rdi mov esi, 0A8h call js_mallocz push 6 pop r12 test rax, rax jz loc_2FD92 mov r15, rax mov [rsp+58h+var_50], r13 mov [rsp+58h+var_48], rbx mov dword ptr [rax], 1 mov rax, [r14+18h] mov byte ptr [r15+4], 4 lea rcx, [r15+8] lea rdx, [rax+98h] mov rsi, [rax+98h] mov [rsi+8], rcx mov [r15+8], rsi mov [r15+10h], rdx mov [rax+98h], rcx and dword ptr [r15+38h], 0 and dword ptr [r15+18h], 0 lea rsi, [r15+18h] push 3 pop rax mov [r15+20h], rax and dword ptr [r15+28h], 0 mov [r15+30h], rax mov rdi, r14 call JS_NewPromiseCapability mov r13, rax mov rbx, rdx cmp ebx, 6 jz short loc_2FD78 mov rsi, r15 add rsi, 40h ; '@' mov rdi, r14 mov rdx, rbp mov rcx, [rsp+58h+var_40] mov r8, [rsp+58h+var_38] mov r9, [rsp+58h+var_50] push [rsp+58h+arg_0] push [rsp+60h+var_48] call async_func_init pop rcx pop rdx test eax, eax jz short loc_2FDAB loc_2FD78: mov rdi, r14 mov rsi, r13 mov rdx, rbx call JS_FreeValue mov rdi, [r14+18h] mov rsi, r15 call js_async_function_free loc_2FD92: xor eax, eax xor ecx, ecx loc_2FD96: or rax, rcx mov rdx, r12 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FDAB: mov dword ptr [r15+38h], 1 mov rdi, r14 mov rsi, r15 call js_async_function_resume mov rdi, [r14+18h] mov rsi, r15 call js_async_function_free mov rax, 0FFFFFFFF00000000h mov rcx, r13 and rcx, rax mov eax, r13d mov r12, rbx jmp short loc_2FD96
unsigned long long js_async_function_call(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7) { _DWORD *v10; // rax _DWORD *v11; // r15 long long v12; // rax long long v13; // rsi long long v14; // r13 long long v15; // rdx long long v16; // rbx long long v17; // rax unsigned long long v18; // rcx long long v20; // [rsp-8h] [rbp-60h] int v21; // [rsp+8h] [rbp-50h] int v22; // [rsp+10h] [rbp-48h] v10 = (_DWORD *)js_mallocz(a1, 0xA8uLL); if ( v10 ) { v11 = v10; v21 = a5; v22 = a6; *v10 = 1; v12 = *(_QWORD *)(a1 + 24); *((_BYTE *)v11 + 4) = 4; v13 = *(_QWORD *)(v12 + 152); *(_QWORD *)(v13 + 8) = v11 + 2; *((_QWORD *)v11 + 1) = v13; *((_QWORD *)v11 + 2) = v12 + 152; *(_QWORD *)(v12 + 152) = v11 + 2; v11[14] = 0; v11[6] = 0; *((_QWORD *)v11 + 4) = 3LL; v11[10] = 0; *((_QWORD *)v11 + 6) = 3LL; v14 = JS_NewPromiseCapability(a1, (long long)(v11 + 6)); v16 = v15; if ( (_DWORD)v15 != 6 && !(unsigned int)async_func_init(a1, (int)v11 + 64, a2, a3, a4, v21, v22, a7) ) { v11[14] = 1; js_async_function_resume(a1, v11, v20); js_async_function_free(*(_QWORD *)(a1 + 24), v11); v18 = v14 & 0xFFFFFFFF00000000LL; v17 = (unsigned int)v14; return v18 | v17; } JS_FreeValue(a1, v14, v16); js_async_function_free(*(_QWORD *)(a1 + 24), v11); } v17 = 0LL; v18 = 0LL; return v18 | v17; }
js_async_function_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,R9D MOV R13,R8 MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x18],RDX MOV RBP,RSI MOV R14,RDI MOV ESI,0xa8 CALL 0x00117241 PUSH 0x6 POP R12 TEST RAX,RAX JZ 0x0012fd92 MOV R15,RAX MOV qword ptr [RSP + 0x8],R13 MOV qword ptr [RSP + 0x10],RBX MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [R14 + 0x18] MOV byte ptr [R15 + 0x4],0x4 LEA RCX,[R15 + 0x8] LEA RDX,[RAX + 0x98] MOV RSI,qword ptr [RAX + 0x98] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [R15 + 0x8],RSI MOV qword ptr [R15 + 0x10],RDX MOV qword ptr [RAX + 0x98],RCX AND dword ptr [R15 + 0x38],0x0 AND dword ptr [R15 + 0x18],0x0 LEA RSI,[R15 + 0x18] PUSH 0x3 POP RAX MOV qword ptr [R15 + 0x20],RAX AND dword ptr [R15 + 0x28],0x0 MOV qword ptr [R15 + 0x30],RAX MOV RDI,R14 CALL 0x0012956d MOV R13,RAX MOV RBX,RDX CMP EBX,0x6 JZ 0x0012fd78 MOV RSI,R15 ADD RSI,0x40 MOV RDI,R14 MOV RDX,RBP MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x8] PUSH qword ptr [RSP + 0x60] PUSH qword ptr [RSP + 0x18] CALL 0x0013ac67 POP RCX POP RDX TEST EAX,EAX JZ 0x0012fdab LAB_0012fd78: MOV RDI,R14 MOV RSI,R13 MOV RDX,RBX CALL 0x0011801e MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 CALL 0x00146f5f LAB_0012fd92: XOR EAX,EAX XOR ECX,ECX LAB_0012fd96: OR RAX,RCX MOV RDX,R12 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012fdab: MOV dword ptr [R15 + 0x38],0x1 MOV RDI,R14 MOV RSI,R15 CALL 0x0014746e MOV RDI,qword ptr [R14 + 0x18] MOV RSI,R15 CALL 0x00146f5f MOV RAX,-0x100000000 MOV RCX,R13 AND RCX,RAX MOV EAX,R13D MOV R12,RBX JMP 0x0012fd96
int1 [16] js_async_function_call (long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5, int4 param_6,int8 param_7) { long lVar1; long lVar2; int iVar3; int4 *puVar4; ulong uVar5; ulong uVar6; int8 uVar7; int1 auVar8 [16]; puVar4 = (int4 *)js_mallocz(param_1,0xa8); if (puVar4 != (int4 *)0x0) { *puVar4 = 1; lVar1 = *(long *)(param_1 + 0x18); *(int1 *)(puVar4 + 1) = 4; lVar2 = *(long *)(lVar1 + 0x98); *(int4 **)(lVar2 + 8) = puVar4 + 2; *(long *)(puVar4 + 2) = lVar2; *(long *)(puVar4 + 4) = lVar1 + 0x98; *(int4 **)(lVar1 + 0x98) = puVar4 + 2; puVar4[0xe] = 0; puVar4[6] = 0; *(int8 *)(puVar4 + 8) = 3; puVar4[10] = 0; *(int8 *)(puVar4 + 0xc) = 3; auVar8 = JS_NewPromiseCapability(param_1,puVar4 + 6); uVar7 = auVar8._8_8_; uVar5 = auVar8._0_8_; if (auVar8._8_4_ != 6) { iVar3 = async_func_init(param_1,puVar4 + 0x10,param_2,param_3,param_4,param_5); if (iVar3 == 0) { puVar4[0xe] = 1; js_async_function_resume(param_1,puVar4,param_7,param_6); js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4); uVar6 = uVar5 & 0xffffffff00000000; uVar5 = uVar5 & 0xffffffff; goto LAB_0012fd96; } } JS_FreeValue(param_1,uVar5,uVar7); js_async_function_free(*(int8 *)(param_1 + 0x18),puVar4); } uVar5 = 0; uVar6 = 0; uVar7 = 6; LAB_0012fd96: auVar8._0_8_ = uVar5 | uVar6; auVar8._8_8_ = uVar7; return auVar8; }
11,452
mysql_free_result_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_free_result_cont(MYSQL_RES *result, int ready_status) { MK_ASYNC_CONT_BODY_VOID_RETURN(result->handle) }
O3
c
mysql_free_result_cont: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq 0x78(%rdi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r14 cmpb $0x0, 0x15(%r14) je 0x2c84f movb $0x1, 0x14(%r14) movl %esi, 0x4(%r14) leaq 0x38(%r14), %rdi callq 0x305fb movb $0x0, 0x14(%r14) testl %eax, %eax jle 0x2c8af movl (%r14), %r14d jmp 0x2c8bb movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x21517(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x214fc(%rip), %rax # 0x4dd90 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x78(%rbx), %rax movb %r14b, 0x296(%rax) jmp 0x2c8bb movb $0x0, 0x15(%r14) xorl %r14d, %r14d testl %eax, %eax js 0x2c8c3 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movq 0x78(%rbx), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x78(%rbx), %rdi leaq 0x2149f(%rip), %rax # 0x4dd80 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x78(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x78(%rbx), %rdi leaq 0x21484(%rip), %rax # 0x4dd90 movq 0x40(%rax), %rsi jmp 0x2c898
mysql_free_result_cont: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov rax, [rdi+78h] mov rcx, [rax+480h] mov r14, [rcx+28h] cmp byte ptr [r14+15h], 0 jz short loc_2C84F mov byte ptr [r14+14h], 1 mov [r14+4], esi lea rdi, [r14+38h] call my_context_continue mov byte ptr [r14+14h], 0 test eax, eax jle short loc_2C8AF mov r14d, [r14] jmp short loc_2C8BB loc_2C84F: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+70h] loc_2C898: mov edx, 1FFh call _strncpy mov rax, [rbx+78h] mov [rax+296h], r14b jmp short loc_2C8BB loc_2C8AF: mov byte ptr [r14+15h], 0 xor r14d, r14d test eax, eax js short loc_2C8C3 loc_2C8BB: mov eax, r14d pop rbx pop r14 pop rbp retn loc_2C8C3: mov rax, [rbx+78h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [rbx+78h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbx+78h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+78h] lea rax, client_errors mov rsi, [rax+40h] jmp short loc_2C898
long long mysql_free_result_cont(long long a1, unsigned int a2) { long long v3; // rax unsigned int *v4; // r14 int v5; // eax unsigned int v6; // r14d long long v7; // rdi char *v8; // rsi v3 = *(_QWORD *)(a1 + 120); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( !*((_BYTE *)v4 + 21) ) { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[14]; LABEL_5: strncpy(v7, v8, 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 120) + 662LL) = 0; return v6; } *((_BYTE *)v4 + 20) = 1; v4[1] = a2; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; v6 = 0; if ( v5 >= 0 ) return v6; *(_DWORD *)(*(_QWORD *)(a1 + 120) + 144LL) = 2008; strncpy(*(_QWORD *)(a1 + 120) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a1 + 120) + 668LL) = 0; v7 = *(_QWORD *)(a1 + 120) + 151LL; v8 = client_errors[8]; goto LABEL_5; } return *v4; }
mysql_free_result_cont: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x78] MOV RCX,qword ptr [RAX + 0x480] MOV R14,qword ptr [RCX + 0x28] CMP byte ptr [R14 + 0x15],0x0 JZ 0x0012c84f MOV byte ptr [R14 + 0x14],0x1 MOV dword ptr [R14 + 0x4],ESI LEA RDI,[R14 + 0x38] CALL 0x001305fb MOV byte ptr [R14 + 0x14],0x0 TEST EAX,EAX JLE 0x0012c8af MOV R14D,dword ptr [R14] JMP 0x0012c8bb LAB_0012c84f: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x70] LAB_0012c898: MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] MOV byte ptr [RAX + 0x296],R14B JMP 0x0012c8bb LAB_0012c8af: MOV byte ptr [R14 + 0x15],0x0 XOR R14D,R14D TEST EAX,EAX JS 0x0012c8c3 LAB_0012c8bb: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_0012c8c3: MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x14dd80] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBX + 0x78] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x78] LEA RAX,[0x14dd90] MOV RSI,qword ptr [RAX + 0x40] JMP 0x0012c898
int4 mysql_free_result_cont(long param_1,int4 param_2) { int4 *puVar1; long lVar2; int iVar3; char *__src; puVar1 = *(int4 **)(*(long *)(*(long *)(param_1 + 0x78) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Commands_out_of_sync__you_can_t_r_0014de00; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_2; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (0 < iVar3) { return *puVar1; } *(int1 *)((long)puVar1 + 0x15) = 0; if (-1 < iVar3) { return 0; } *(int4 *)(*(long *)(param_1 + 0x78) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_1 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x78) + 0x29c) = 0; lVar2 = *(long *)(param_1 + 0x78); __src = PTR_s_Client_run_out_of_memory_0014ddd0; } strncpy((char *)(lVar2 + 0x97),__src,0x1ff); *(int1 *)(*(long *)(param_1 + 0x78) + 0x296) = 0; return 0; }
11,453
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O0
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: subq $0x28, %rsp movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) xorl %eax, %eax movl %eax, %esi callq 0x9f490 movq 0x8(%rsp), %rax addq $0x28, %rsp retq nop
_ZZ13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsENK3$_0clERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 28h mov rax, rdi mov [rsp+28h+var_20], rax mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr)) mov rax, [rsp+28h+var_20] add rsp, 28h retn
long long build_grammar[abi:cxx11](std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0::operator()( long long a1) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(a1); return a1; }
11,454
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O3
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x160, %rsp # imm = 0x160 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x2f4(%rip), %rax # 0xbab66 movq %rax, 0x18(%rsi) leaq 0x315(%rip), %rax # 0xbab92 movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x68(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0xbde34 movq 0x10(%rsp), %rax testq %rax, %rax je 0xba8ae movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax xorl %eax, %eax movq %rax, 0x8(%rsp) movq %r15, (%rsp) leaq 0x2ea(%rip), %rcx # 0xbabaa movq %rcx, 0x18(%rsp) leaq 0x2f0(%rip), %rcx # 0xbabbc movq %rcx, 0x10(%rsp) movq %rax, 0x28(%rsp) movq %r15, 0x20(%rsp) leaq 0x300(%rip), %rcx # 0xbabe2 movq %rcx, 0x38(%rsp) leaq 0x3a6(%rip), %rcx # 0xbac94 movq %rcx, 0x30(%rsp) movq %rax, 0x48(%rsp) movq %r15, 0x40(%rsp) leaq 0x2e86(%rip), %rcx # 0xbd78a movq %rcx, 0x58(%rsp) leaq 0x2ee4(%rip), %rcx # 0xbd7f4 movq %rcx, 0x50(%rsp) cmpq %rax, 0x10(%r14) je 0xba9f5 movq %rsp, %rsi movq %r14, %rdi callq *0x18(%r14) leaq 0x68(%rsp), %rdi callq 0xbe036 leaq 0x68(%rsp), %rsi movq %rbx, %rdi callq 0xbe1fe movq 0x50(%rsp), %rax testq %rax, %rax je 0xba959 leaq 0x40(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0xba972 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xba989 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x148(%rsp), %rdi callq 0x20f1c leaq 0x130(%rsp), %rdi callq 0x20f1c leaq 0xf8(%rsp), %rdi callq 0x7e154 leaq 0xc0(%rsp), %rdi callq 0xbea12 leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0xbeaf4 movq -0x18(%r14), %rax testq %rax, %rax je 0xba9e5 leaq 0x68(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0x160, %rsp # imm = 0x160 popq %rbx popq %r14 popq %r15 retq callq 0x1a310 jmp 0xbaa20 jmp 0xbaa20 jmp 0xbaa20 jmp 0xbaa20 jmp 0xbaa20 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0xbaa3d movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xbaa3d movq %rax, %rdi callq 0x212e3 movq %rax, %rbx movq %rsp, %rdi callq 0xbe30a leaq 0x68(%rsp), %rdi callq 0xbe360 movq %rbx, %rdi callq 0x1afa0 nop
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push rbx sub rsp, 160h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp; int movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx eax, byte ptr [rdx] movzx ecx, byte ptr [rdx+1]; int lea r15, [rsp+178h+var_110] mov rdi, r15; int mov edx, eax; int call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool) mov rax, [rsp+178h+var_168] test rax, rax jz short loc_BA8AE mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BA8AE: xor eax, eax mov [rsp+178h+var_170], rax mov [rsp+178h+var_178], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov [rsp+178h+var_160], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_168], rcx mov [rsp+178h+var_150], rax mov [rsp+178h+var_158], r15 lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [rsp+178h+var_140], rcx lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_148], rcx mov [rsp+178h+var_130], rax mov [rsp+178h+var_138], r15 lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) mov [rsp+178h+var_120], rcx lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+178h+var_128], rcx cmp [r14+10h], rax jz loc_BA9F5 mov rsi, rsp mov rdi, r14 call qword ptr [r14+18h] lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_110] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rax, [rsp+178h+var_128] test rax, rax jz short loc_BA959 lea rdi, [rsp+178h+var_138] mov rsi, rdi mov edx, 3 call rax loc_BA959: mov rax, [rsp+178h+var_148] test rax, rax jz short loc_BA972 lea rdi, [rsp+178h+var_158] mov rsi, rdi mov edx, 3 call rax loc_BA972: mov rax, [rsp+178h+var_168] test rax, rax jz short loc_BA989 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_BA989: lea rdi, [rsp+178h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+178h+var_80] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() lea rdi, [rsp+178h+var_B8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea r14, [rsp+178h+var_E8] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [r14-18h] test rax, rax jz short loc_BA9E5 lea rdi, [rsp+178h+var_110] mov rsi, rdi mov edx, 3 call rax loc_BA9E5: mov rax, rbx add rsp, 160h pop rbx pop r14 pop r15 retn loc_BA9F5: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short loc_BAA20 jmp short loc_BAA20 jmp short loc_BAA20 jmp short loc_BAA20 jmp short loc_BAA20 mov rbx, rax mov rax, [rsp+178h+var_168] test rax, rax jz short loc_BAA3D mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_BAA3D loc_BAA20: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_110]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_BAA3D: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d int *v11; // [rsp+0h] [rbp-178h] BYREF long long v12; // [rsp+8h] [rbp-170h] long long ( *v13)(); // [rsp+10h] [rbp-168h] void *v14; // [rsp+18h] [rbp-160h] int *v15; // [rsp+20h] [rbp-158h] BYREF long long v16; // [rsp+28h] [rbp-150h] long long ( *v17)(); // [rsp+30h] [rbp-148h] long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h] int *v19; // [rsp+40h] [rbp-138h] BYREF long long v20; // [rsp+48h] [rbp-130h] long long ( *v21)(); // [rsp+50h] [rbp-128h] long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h] int v23; // [rsp+60h] [rbp-118h] int v24[4]; // [rsp+68h] [rbp-110h] BYREF void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h] _BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF _BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF _BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF _BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF _BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF SchemaConverter::SchemaConverter( (int)v24, (int)&v11, *a3, a3[1], a5, a6, 0LL, 0, (long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager, (int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke, v15, v16, (long long)v17); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); v12 = 0LL; v11 = v24; v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v16 = 0LL; v15 = v24; v18 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v17 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v20 = 0LL; v19 = v24; v22 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v21 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; if ( !*(_QWORD *)(a2 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, int **))(a2 + 24))(a2, &v11); SchemaConverter::check_errors((SchemaConverter *)v24); SchemaConverter::format_grammar[abi:cxx11]( a1, (unsigned int)v24, v6, v7, v8, v9, (_DWORD)v11, v12, (_DWORD)v13, (_DWORD)v14, (_DWORD)v15, v16, (_DWORD)v17, (_DWORD)v18, (_DWORD)v19, v20, (_DWORD)v21, (_DWORD)v22, v23, v24[0], v24[2], (char)v25); if ( v21 ) ((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL); if ( v17 ) ((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL); if ( v13 ) ((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL); std::vector<std::string>::~vector((long long)v30); std::vector<std::string>::~vector((long long)v29); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28); std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26); if ( v25 ) v25(v24, v24, 3LL); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x160 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x1bab66] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1bab92] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_001ba888: LEA R15,[RSP + 0x68] MOV RDI,R15 MOV EDX,EAX CALL 0x001bde34 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001ba8ae LAB_001ba8a1: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ba8ae: XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP],R15 LEA RCX,[0x1babaa] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[0x1babbc] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x20],R15 LEA RCX,[0x1babe2] MOV qword ptr [RSP + 0x38],RCX LEA RCX,[0x1bac94] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],R15 LEA RCX,[0x1bd78a] MOV qword ptr [RSP + 0x58],RCX LEA RCX,[0x1bd7f4] MOV qword ptr [RSP + 0x50],RCX CMP qword ptr [R14 + 0x10],RAX JZ 0x001ba9f5 LAB_001ba91f: MOV RSI,RSP MOV RDI,R14 CALL qword ptr [R14 + 0x18] LEA RDI,[RSP + 0x68] CALL 0x001be036 LEA RSI,[RSP + 0x68] MOV RDI,RBX CALL 0x001be1fe MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x001ba959 LEA RDI,[RSP + 0x40] LAB_001ba94f: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ba959: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x001ba972 LEA RDI,[RSP + 0x20] LAB_001ba968: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ba972: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001ba989 LAB_001ba97c: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ba989: LEA RDI,[RSP + 0x148] CALL 0x00120f1c LEA RDI,[RSP + 0x130] CALL 0x00120f1c LEA RDI,[RSP + 0xf8] CALL 0x0017e154 LEA RDI,[RSP + 0xc0] CALL 0x001bea12 LEA R14,[RSP + 0x90] MOV RDI,R14 CALL 0x001beaf4 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001ba9e5 LAB_001ba9d6: LEA RDI,[RSP + 0x68] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ba9e5: MOV RAX,RBX ADD RSP,0x160 POP RBX POP R14 POP R15 RET LAB_001ba9f5: CALL 0x0011a310
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { long in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *local_160; SchemaConverter *local_158; int8 local_150; code *local_148; code *local_140; SchemaConverter *local_138; int8 local_130; code *local_128; code *local_120; SchemaConverter local_110 [16]; code *local_100; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_e8 [48]; _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> local_b8 [56]; _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> local_80 [56]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; local_160 = std:: _Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 001ba888 to 001ba896 has its CatchHandler @ 001baa04 */ SchemaConverter::SchemaConverter (local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); if (local_168 != (code *)0x0) { /* try { // try from 001ba8a1 to 001ba8ad has its CatchHandler @ 001baa02 */ (*local_168)(&local_178,&local_178,3); } uStack_170 = 0; local_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; local_150 = 0; local_140 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; local_130 = 0; local_120 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_110; local_158 = local_110; local_138 = local_110; if (*(long *)(param_2 + 0x10) != 0) { /* try { // try from 001ba91f to 001ba93f has its CatchHandler @ 001baa28 */ (**(code **)(param_2 + 0x18))(param_2,&local_178); SchemaConverter::check_errors(local_110); SchemaConverter::format_grammar_abi_cxx11_(); if (local_128 != (code *)0x0) { /* try { // try from 001ba94f to 001ba958 has its CatchHandler @ 001baa00 */ (*local_128)(&local_138,&local_138,3); } if (local_148 != (code *)0x0) { /* try { // try from 001ba968 to 001ba971 has its CatchHandler @ 001ba9fe */ (*local_148)(&local_158,&local_158,3); } if (local_168 != (code *)0x0) { /* try { // try from 001ba97c to 001ba988 has its CatchHandler @ 001ba9fc */ (*local_168)(&local_178,&local_178,3); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48); std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable(local_80); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable(local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_e8); if (local_100 != (code *)0x0) { /* try { // try from 001ba9d6 to 001ba9e4 has its CatchHandler @ 001ba9fa */ (*local_100)(local_110,local_110,3); } return param_1; } /* WARNING: Subroutine does not return */ /* try { // try from 001ba9f5 to 001ba9f9 has its CatchHandler @ 001baa28 */ std::__throw_bad_function_call(); }
11,455
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser()
monkey531[P]llama/common/json.hpp
~json_sax_dom_callback_parser() = default;
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::~json_sax_dom_callback_parser(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xa8(%rdi), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x3ecbc movq %r14, %rdi callq 0x4b8aa movq 0x90(%rbx), %rax testq %rax, %rax je 0x4821f leaq 0x80(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x48(%rbx), %rdi callq 0x4928a leaq 0x20(%rbx), %rdi callq 0x4928a movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x4824d movq 0x18(%rbx), %rsi subq %rdi, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x186a0 addq $0x8, %rsp popq %rbx popq %r14 retq jmp 0x48259 jmp 0x48259 movq %rax, %rdi callq 0x1d81b nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev: push r14 push rbx push rax mov rbx, rdi lea r14, [rdi+0A8h] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rbx+90h] test rax, rax jz short loc_4821F lea rdi, [rbx+80h] mov rsi, rdi mov edx, 3 call rax loc_4821F: lea rdi, [rbx+48h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) lea rdi, [rbx+20h] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, [rbx+8]; void * test rdi, rdi jz short loc_4824D mov rsi, [rbx+18h] sub rsi, rdi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) loc_4824D: add rsp, 8 pop rbx pop r14 retn jmp short loc_48259 jmp short $+2 loc_48259: mov rdi, rax call __clang_call_terminate
void nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~json_sax_dom_callback_parser( long long a1) { long long v2; // rsi void ( *v3)(long long, long long, long long); // rax void *v4; // rdi v2 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 168)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a1 + 168); v3 = *(void ( **)(long long, long long, long long))(a1 + 144); if ( v3 ) { v2 = a1 + 128; v3(a1 + 128, a1 + 128, 3LL); } std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 72, v2); std::_Bvector_base<std::allocator<bool>>::_M_deallocate(a1 + 32, v2); v4 = *(void **)(a1 + 8); if ( v4 ) operator delete(v4, *(_QWORD *)(a1 + 24) - (_QWORD)v4); }
~json_sax_dom_callback_parser: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0xa8] MOV RDI,R14 XOR ESI,ESI CALL 0x0013ecbc MOV RDI,R14 CALL 0x0014b8aa MOV RAX,qword ptr [RBX + 0x90] TEST RAX,RAX JZ 0x0014821f LEA RDI,[RBX + 0x80] LAB_00148215: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0014821f: LEA RDI,[RBX + 0x48] LAB_00148223: CALL 0x0014928a LEA RDI,[RBX + 0x20] LAB_0014822c: CALL 0x0014928a MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0014824d MOV RSI,qword ptr [RBX + 0x18] SUB RSI,RDI ADD RSP,0x8 POP RBX POP R14 JMP 0x001186a0 LAB_0014824d: ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::~json_sax_dom_callback_parser() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::~json_sax_dom_callback_parser (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { void *pvVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)(this + 0xa8),0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)(this + 0xa8)); if (*(code **)(this + 0x90) != (code *)0x0) { /* try { // try from 00148215 to 0014821e has its CatchHandler @ 00148255 */ (**(code **)(this + 0x90))(this + 0x80,this + 0x80,3); } /* try { // try from 00148223 to 00148227 has its CatchHandler @ 00148259 */ std::_Bvector_base<std::allocator<bool>>::_M_deallocate ((_Bvector_base<std::allocator<bool>> *)(this + 0x48)); /* try { // try from 0014822c to 00148230 has its CatchHandler @ 00148257 */ std::_Bvector_base<std::allocator<bool>>::_M_deallocate ((_Bvector_base<std::allocator<bool>> *)(this + 0x20)); pvVar1 = *(void **)(this + 8); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x18) - (long)pvVar1); return; } return; }
11,456
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O3
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %rdi, %rbx leaq 0x82908(%rip), %r15 # 0xdf1c8 addq $0x10, %r15 movq %r15, (%rdi) movl $0x6, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0x5c8f7 movq 0x846af(%rip), %rdi # 0xe0f98 cmpb $0x0, (%rdi) je 0x5c8f3 incl 0x8(%rax) jmp 0x5c8f7 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rbx) movl %edx, 0x28(%rbx) movl %ecx, 0x2c(%rbx) leaq 0x83324(%rip), %rax # 0xdfc30 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r8, %rsi callq 0x39c8e movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx xorl %edx, %edx movq %rdx, 0x50(%rbx) movups (%r14), %xmm0 movq %rdx, 0x8(%r14) movups %xmm0, 0x48(%rbx) movq %rdx, (%r14) movq %rdx, 0x60(%rbx) movups (%rcx), %xmm0 movq %rdx, 0x8(%rcx) movups %xmm0, 0x58(%rbx) movq %rdx, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x5c96c callq 0x32e06 movq %r14, %rdi callq 0x18c10
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov rbx, rdi lea r15, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add r15, 10h mov [rdi], r15 mov dword ptr [rdi+8], 6 mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_5C8F7 mov rdi, cs:__libc_single_threaded_ptr cmp byte ptr [rdi], 0 jz short loc_5C8F3 inc dword ptr [rax+8] jmp short loc_5C8F7 loc_5C8F3: lock inc dword ptr [rax+8] loc_5C8F7: mov rax, [rsi+10h] mov [rbx+20h], rax mov [rbx+28h], edx mov [rbx+2Ch], ecx lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r8 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] xor edx, edx mov [rbx+50h], rdx movups xmm0, xmmword ptr [r14] mov [r14+8], rdx movups xmmword ptr [rbx+48h], xmm0 mov [r14], rdx mov [rbx+60h], rdx movups xmm0, xmmword ptr [rcx] mov [rcx+8], rdx movups xmmword ptr [rbx+58h], xmm0 mov [rcx], rdx mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+18h] test rdi, rdi jz short loc_5C96C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5C96C: mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, _QWORD *a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { long long v9; // rax char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 6; *(_QWORD *)(a1 + 16) = *a2; v9 = a2[1]; *(_QWORD *)(a1 + 24) = v9; if ( v9 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v9 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v9 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector(a1 + 48, a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV RBX,RDI LEA R15,[0x1df1c8] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV dword ptr [RDI + 0x8],0x6 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x0015c8f7 MOV RDI,qword ptr [0x001e0f98] CMP byte ptr [RDI],0x0 JZ 0x0015c8f3 INC dword ptr [RAX + 0x8] JMP 0x0015c8f7 LAB_0015c8f3: INC.LOCK dword ptr [RAX + 0x8] LAB_0015c8f7: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EDX MOV dword ptr [RBX + 0x2c],ECX LEA RAX,[0x1dfc30] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_0015c917: MOV RSI,R8 CALL 0x00139c8e LAB_0015c91f: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] XOR EDX,EDX MOV qword ptr [RBX + 0x50],RDX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV qword ptr [R14],RDX MOV qword ptr [RBX + 0x60],RDX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [RCX],RDX MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_001df1d8; *(int4 *)(this + 8) = 6; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001e0f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__ForTemplateToken_001dfc40; /* try { // try from 0015c917 to 0015c91e has its CatchHandler @ 0015c958 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar2 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar2; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar2 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar2; *param_7 = 0; this[0x68] = param_8; return; }
11,457
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE FileDescriptor OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc, uint64_t& start_address, uint64_t& base_address, char* out_file_name, size_t out_file_name_size) { FileDescriptor maps_fd{ FailureRetry([] { return open("/proc/self/maps", O_RDONLY); })}; if (!maps_fd) { return nullptr; } FileDescriptor mem_fd{ FailureRetry([] { return open("/proc/self/mem", O_RDONLY); })}; if (!mem_fd) { return nullptr; } // Iterate over maps and look for the map containing the pc. Then // look into the symbol tables inside. char buf[1024]; // Big enough for line of sane /proc/self/maps LineReader reader(maps_fd.get(), buf, sizeof(buf), 0); while (true) { const char* cursor; const char* eol; if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. return nullptr; } // Start parsing line in /proc/self/maps. Here is an example: // // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat // // We want start address (08048000), end address (0804c000), flags // (r-xp) and file name (/bin/cat). // Read start address. cursor = GetHex(cursor, eol, &start_address); if (cursor == eol || *cursor != '-') { return nullptr; // Malformed line. } ++cursor; // Skip '-'. // Read end address. uint64_t end_address; cursor = GetHex(cursor, eol, &end_address); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Read flags. Skip flags until we encounter a space or eol. const char* const flags_start = cursor; while (cursor < eol && *cursor != ' ') { ++cursor; } // We expect at least four letters for flags (ex. "r-xp"). if (cursor == eol || cursor < flags_start + 4) { return nullptr; // Malformed line. } // Determine the base address by reading ELF headers in process memory. ElfW(Ehdr) ehdr; // Skip non-readable maps. if (flags_start[0] == 'r' && ReadFromOffsetExact(mem_fd.get(), &ehdr, sizeof(ElfW(Ehdr)), start_address) && memcmp(ehdr.e_ident, ELFMAG, SELFMAG) == 0) { switch (ehdr.e_type) { case ET_EXEC: base_address = 0; break; case ET_DYN: // Find the segment containing file offset 0. This will correspond // to the ELF header that we just read. Normally this will have // virtual address 0, but this is not guaranteed. We must subtract // the virtual address from the address where the ELF header was // mapped to get the base address. // // If we fail to find a segment for file offset 0, use the address // of the ELF header as the base address. base_address = start_address; for (unsigned i = 0; i != ehdr.e_phnum; ++i) { ElfW(Phdr) phdr; if (ReadFromOffsetExact( mem_fd.get(), &phdr, sizeof(phdr), start_address + ehdr.e_phoff + i * sizeof(phdr)) && phdr.p_type == PT_LOAD && phdr.p_offset == 0) { base_address = start_address - phdr.p_vaddr; break; } } break; default: // ET_REL or ET_CORE. These aren't directly executable, so they don't // affect the base address. break; } } // Check start and end addresses. if (start_address > pc || pc >= end_address) { continue; // We skip this map. PC isn't in this map. } // Check flags. We are only interested in "r*x" maps. if (flags_start[0] != 'r' || flags_start[2] != 'x') { continue; // We skip this map. } ++cursor; // Skip ' '. // Read file offset. uint64_t file_offset; cursor = GetHex(cursor, eol, &file_offset); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Skip to file name. "cursor" now points to dev. We need to // skip at least two spaces for dev and inode. int num_spaces = 0; while (cursor < eol) { if (*cursor == ' ') { ++num_spaces; } else if (num_spaces >= 2) { // The first non-space character after skipping two spaces // is the beginning of the file name. break; } ++cursor; } if (cursor == eol) { return nullptr; // Malformed line. } strncpy(out_file_name, cursor, out_file_name_size); // Making sure |out_file_name| is always null-terminated. out_file_name[out_file_name_size - 1] = '\0'; // Finally, "cursor" now points to file name of our interest. return FileDescriptor{ FailureRetry([cursor] { return open(cursor, O_RDONLY); })}; } }
O2
cpp
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x518, %rsp # imm = 0x518 movq %r9, %r15 movq %r8, %r12 movq %rcx, %r13 movq %rdx, 0x18(%rsp) movq %rsi, 0x30(%rsp) movq %rdi, %r14 leaq 0x3e48(%rip), %rbx # 0x1fe47 movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x7420 cmpl $-0x1, %eax jne 0x1c028 callq 0x7050 cmpl $0x4, (%rax) je 0x1bfff orl $-0x1, 0xc(%rsp) orl $-0x1, (%r14) jmp 0x1c33e movl %eax, 0xc(%rsp) leaq 0x3e24(%rip), %rbx # 0x1fe57 movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x7420 cmpl $-0x1, %eax jne 0x1c058 callq 0x7050 cmpl $0x4, (%rax) je 0x1c033 orl $-0x1, 0x8(%rsp) jmp 0x1c330 movq %r13, 0x28(%rsp) movq %r12, 0x38(%rsp) movq %r15, 0x40(%rsp) movq %r14, 0x10(%rsp) movl 0xc(%rsp), %ecx leaq 0x60(%rsp), %rbx movl %ecx, 0x24(%rsp) movl %ecx, (%rbx) leaq 0x110(%rsp), %rbp movq %rbp, 0x8(%rbx) movq $0x400, 0x10(%rbx) # imm = 0x400 andq $0x0, 0x18(%rbx) movl %eax, 0x8(%rsp) movq %rbp, 0x28(%rbx) movq %rbp, 0x30(%rbx) xorl %r13d, %r13d movq %rbp, %r12 movq %rbp, %r14 cmpq %r14, %rbp je 0x1c0d7 incq %r12 movq %r12, 0x80(%rsp) cmpq %r14, %r12 ja 0x1c3ff movq %rbx, %rdi callq 0x1c56e testq %rax, %rax je 0x1c109 movq %r12, %rbp jmp 0x1c163 movl $0x400, %edx # imm = 0x400 movl 0x24(%rsp), %edi movq %rbp, %rsi movq %r13, %rcx callq 0x1bc03 testq %rax, %rax jle 0x1c32b addq %rax, %r13 movq %r13, 0x78(%rsp) leaq (%rsp,%rax), %r14 addq $0x110, %r14 # imm = 0x110 jmp 0x1c153 subq %r12, %r14 movq %rbp, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x7960 leaq (%rsp,%r14), %r12 addq $0x110, %r12 # imm = 0x110 movl $0x400, %edx # imm = 0x400 subq %r14, %rdx movl 0x24(%rsp), %edi movq %r12, %rsi movq %r13, %rcx callq 0x1bc03 testq %rax, %rax jle 0x1c32b addq %rax, %r13 movq %r13, 0x78(%rsp) addq %rax, %r12 movq %r12, %r14 movq %r14, 0x90(%rsp) movq %rbp, 0x80(%rsp) movq %rbx, %rdi callq 0x1c56e movq %rax, 0x88(%rsp) testq %rax, %rax je 0x1c32b movq %rax, %r12 movb $0x0, (%rax) movq %rbp, %rdi movq %rax, %rsi movq 0x18(%rsp), %rdx callq 0x1c4fd cmpq %r12, %rax je 0x1c32b cmpb $0x2d, (%rax) jne 0x1c32b incq %rax movq %rax, %rdi movq %r12, %rsi leaq 0x58(%rsp), %rdx callq 0x1c4fd cmpq %r12, %rax je 0x1c32b movq %rax, %rbp cmpb $0x20, (%rax) jne 0x1c32b leaq 0x1(%rbp), %rdx movq %rdx, %rax xorl %r15d, %r15d cmpq %r12, %rax jae 0x1c1e8 cmpb $0x20, (%rax) je 0x1c1e8 decq %r15 incq %rax jmp 0x1c1d6 pushq $0x1 popq %rcx subq %r15, %rcx cmpq $0x5, %rcx jb 0x1c32b cmpq %r12, %rax je 0x1c32b movq %r13, 0x50(%rsp) movq %rdx, 0x48(%rsp) cmpb $0x72, (%rdx) jne 0x1c2e9 movl 0x8(%rsp), %edi movq 0x18(%rsp), %rax movq (%rax), %rcx leaq 0xd0(%rsp), %rsi pushq $0x40 popq %rdx callq 0x1bbf2 cmpl $0x464c457f, 0xd0(%rsp) # imm = 0x464C457F sete %cl andb %cl, %al cmpb $0x1, %al jne 0x1c2e9 movzwl 0xe0(%rsp), %eax cmpl $0x2, %eax je 0x1c2c6 cmpl $0x3, %eax jne 0x1c2e9 movq 0x18(%rsp), %rax movq (%rax), %rax movq 0x28(%rsp), %rcx movq %rax, (%rcx) movzwl 0x108(%rsp), %r13d movq 0xf0(%rsp), %rbx subq $0x1, %r13 jb 0x1c2e9 movl 0x8(%rsp), %edi movq 0x18(%rsp), %rax movq (%rax), %rcx addq %rbx, %rcx leaq 0x98(%rsp), %rsi pushq $0x38 popq %rdx callq 0x1bbf2 cmpl $0x1, 0x98(%rsp) sete %cl andb %cl, %al cmpb $0x1, %al jne 0x1c2c0 cmpq $0x0, 0xa0(%rsp) je 0x1c2d1 addq $0x38, %rbx jmp 0x1c27f movq 0x28(%rsp), %rax andq $0x0, (%rax) jmp 0x1c2e9 movq 0x18(%rsp), %rax movq (%rax), %rax subq 0xa8(%rsp), %rax movq 0x28(%rsp), %rcx movq %rax, (%rcx) movq 0x18(%rsp), %rax movq 0x30(%rsp), %rcx cmpq %rcx, (%rax) ja 0x1c314 movq 0x30(%rsp), %rax cmpq %rax, 0x58(%rsp) jbe 0x1c314 movq 0x48(%rsp), %rax cmpb $0x72, (%rax) jne 0x1c314 cmpb $0x78, 0x3(%rbp) je 0x1c35d leaq 0x60(%rsp), %rbx leaq 0x110(%rsp), %rbp movq 0x50(%rsp), %r13 jmp 0x1c0a9 movq 0x10(%rsp), %r14 orl $-0x1, (%r14) leaq 0x8(%rsp), %rdi callq 0x1aa9c leaq 0xc(%rsp), %rdi callq 0x1aa9c movq %r14, %rax addq $0x518, %rsp # imm = 0x518 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq subq %r15, %rbp addq $0x2, %rbp leaq 0x98(%rsp), %rdx movq %rbp, %rdi movq %r12, %rsi callq 0x1c4fd pushq $-0x1 popq %rbp cmpq %r12, %rax je 0x1c3ab movq %rax, %rbx cmpb $0x20, (%rax) jne 0x1c3ab xorl %eax, %eax incq %rbx movq %rbx, %rcx movq %rcx, %rbx cmpq %r12, %rcx jae 0x1c3b8 cmpb $0x20, (%rbx) je 0x1c3a7 leaq 0x1(%rbx), %rcx cmpl $0x2, %eax jb 0x1c38f jmp 0x1c3b8 incl %eax jmp 0x1c389 movq 0x10(%rsp), %r14 movl %ebp, (%r14) jmp 0x1c334 cmpq %r12, %rbx movq 0x10(%rsp), %r14 je 0x1c3b0 movq 0x38(%rsp), %r12 movq %r12, %rdi movq %rbx, %rsi movq 0x40(%rsp), %r15 movq %r15, %rdx callq 0x72c0 movb $0x0, -0x1(%r12,%r15) movq %rbx, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x7420 movl %eax, %ebp cmpl $-0x1, %eax jne 0x1c3b0 callq 0x7050 cmpl $0x4, (%rax) je 0x1c3e0 jmp 0x1c3b0 callq 0x7320 jmp 0x1c40a jmp 0x1c40a jmp 0x1c40a movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1aa9c jmp 0x1c41c movq %rax, %rbx leaq 0xc(%rsp), %rdi callq 0x1aa9c movq %rbx, %rdi callq 0x7a00
_ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 518h mov r15, r9 mov r12, r8 mov r13, rcx mov [rsp+548h+var_530], rdx mov [rsp+548h+var_518], rsi mov r14, rdi lea rbx, aProcSelfMaps; "/proc/self/maps" loc_1BFFF: mov rdi, rbx xor esi, esi xor eax, eax call _open cmp eax, 0FFFFFFFFh jnz short loc_1C028 call ___errno_location cmp dword ptr [rax], 4 jz short loc_1BFFF or dword ptr [rsp+548h+var_540+4], 0FFFFFFFFh or dword ptr [r14], 0FFFFFFFFh jmp loc_1C33E loc_1C028: mov dword ptr [rsp+548h+var_540+4], eax lea rbx, aProcSelfMem; "/proc/self/mem" loc_1C033: mov rdi, rbx xor esi, esi xor eax, eax call _open cmp eax, 0FFFFFFFFh jnz short loc_1C058 call ___errno_location cmp dword ptr [rax], 4 jz short loc_1C033 or dword ptr [rsp+548h+var_540], 0FFFFFFFFh jmp loc_1C330 loc_1C058: mov [rsp+548h+var_524+4], r13 mov [rsp+548h+var_510], r12 mov [rsp+548h+var_508], r15 mov [rsp+548h+var_538], r14 mov ecx, dword ptr [rsp+548h+var_540+4] lea rbx, [rsp+548h+var_4E8] mov dword ptr [rsp+548h+var_524], ecx mov [rbx], ecx lea rbp, [rsp+548h+var_438] mov [rbx+8], rbp mov qword ptr [rbx+10h], 400h and qword ptr [rbx+18h], 0 mov dword ptr [rsp+548h+var_540], eax mov [rbx+28h], rbp mov [rbx+30h], rbp xor r13d, r13d mov r12, rbp mov r14, rbp loc_1C0A9: cmp rbp, r14 jz short loc_1C0D7 inc r12 mov [rsp+548h+var_4C8], r12 cmp r12, r14 ja loc_1C3FF mov rdi, rbx; this call _ZN5nglog5tools12_GLOBAL__N_110LineReader12FindLineFeedEv; nglog::tools::`anonymous namespace'::LineReader::FindLineFeed(void) test rax, rax jz short loc_1C109 mov rbp, r12 jmp loc_1C163 loc_1C0D7: mov edx, offset stru_400; void * mov edi, dword ptr [rsp+548h+var_524]; this mov rsi, rbp; int mov rcx, r13; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_1C32B add r13, rax mov [rsp+548h+var_4D0], r13 lea r14, [rsp+rax+548h+var_548] add r14, 110h jmp short loc_1C153 loc_1C109: sub r14, r12 mov rdi, rbp mov rsi, r12 mov rdx, r14 call _memmove lea r12, [rsp+r14+548h+var_548] add r12, 110h mov edx, 400h sub rdx, r14; void * mov edi, dword ptr [rsp+548h+var_524]; this mov rsi, r12; int mov rcx, r13; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_1C32B add r13, rax mov [rsp+548h+var_4D0], r13 add r12, rax mov r14, r12 loc_1C153: mov [rsp+548h+var_4B8], r14 mov [rsp+548h+var_4C8], rbp loc_1C163: mov rdi, rbx; this call _ZN5nglog5tools12_GLOBAL__N_110LineReader12FindLineFeedEv; nglog::tools::`anonymous namespace'::LineReader::FindLineFeed(void) mov [rsp+548h+var_4C0], rax test rax, rax jz loc_1C32B mov r12, rax mov byte ptr [rax], 0 mov rdi, rbp; this mov rsi, rax; char * mov rdx, [rsp+548h+var_530]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r12 jz loc_1C32B cmp byte ptr [rax], 2Dh ; '-' jnz loc_1C32B inc rax mov rdi, rax; this mov rsi, r12; char * lea rdx, [rsp+548h+var_4F0]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r12 jz loc_1C32B mov rbp, rax cmp byte ptr [rax], 20h ; ' ' jnz loc_1C32B lea rdx, [rbp+1] mov rax, rdx xor r15d, r15d loc_1C1D6: cmp rax, r12 jnb short loc_1C1E8 cmp byte ptr [rax], 20h ; ' ' jz short loc_1C1E8 dec r15 inc rax jmp short loc_1C1D6 loc_1C1E8: push 1 pop rcx sub rcx, r15 cmp rcx, 5 jb loc_1C32B cmp rax, r12 jz loc_1C32B mov [rsp+548h+var_4F8], r13 mov [rsp+548h+var_500], rdx cmp byte ptr [rdx], 72h ; 'r' jnz loc_1C2E9 mov edi, dword ptr [rsp+548h+var_540]; this mov rax, [rsp+548h+var_530] mov rcx, [rax]; unsigned __int64 lea rsi, [rsp+548h+var_478]; int push 40h ; '@' pop rdx; void * call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) cmp [rsp+548h+var_478], 464C457Fh setz cl and al, cl cmp al, 1 jnz loc_1C2E9 movzx eax, [rsp+548h+var_468] cmp eax, 2 jz short loc_1C2C6 cmp eax, 3 jnz loc_1C2E9 mov rax, [rsp+548h+var_530] mov rax, [rax] mov rcx, [rsp+548h+var_524+4] mov [rcx], rax movzx r13d, [rsp+548h+var_440] mov rbx, [rsp+548h+var_458] loc_1C27F: sub r13, 1 jb short loc_1C2E9 mov edi, dword ptr [rsp+548h+var_540]; this mov rax, [rsp+548h+var_530] mov rcx, [rax] add rcx, rbx; unsigned __int64 lea rsi, [rsp+548h+var_4B0]; int push 38h ; '8' pop rdx; void * call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) cmp dword ptr [rsp+548h+var_4B0], 1 setz cl and al, cl cmp al, 1 jnz short loc_1C2C0 cmp [rsp+548h+var_4A8], 0 jz short loc_1C2D1 loc_1C2C0: add rbx, 38h ; '8' jmp short loc_1C27F loc_1C2C6: mov rax, [rsp+548h+var_524+4] and qword ptr [rax], 0 jmp short loc_1C2E9 loc_1C2D1: mov rax, [rsp+548h+var_530] mov rax, [rax] sub rax, [rsp+548h+var_4A0] mov rcx, [rsp+548h+var_524+4] mov [rcx], rax loc_1C2E9: mov rax, [rsp+548h+var_530] mov rcx, [rsp+548h+var_518]; unsigned __int64 * cmp [rax], rcx ja short loc_1C314 mov rax, [rsp+548h+var_518] cmp qword ptr [rsp+548h+var_4F0], rax jbe short loc_1C314 mov rax, [rsp+548h+var_500] cmp byte ptr [rax], 72h ; 'r' jnz short loc_1C314 cmp byte ptr [rbp+3], 78h ; 'x' jz short loc_1C35D loc_1C314: lea rbx, [rsp+548h+var_4E8] lea rbp, [rsp+548h+var_438] mov r13, [rsp+548h+var_4F8] jmp loc_1C0A9 loc_1C32B: mov r14, [rsp+548h+var_538] loc_1C330: or dword ptr [r14], 0FFFFFFFFh loc_1C334: lea rdi, [rsp+548h+var_540]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) loc_1C33E: lea rdi, [rsp+548h+var_540+4]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov rax, r14 add rsp, 518h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1C35D: sub rbp, r15 add rbp, 2 lea rdx, [rsp+548h+var_4B0]; char * mov rdi, rbp; this mov rsi, r12; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) push 0FFFFFFFFFFFFFFFFh pop rbp cmp rax, r12 jz short loc_1C3AB mov rbx, rax cmp byte ptr [rax], 20h ; ' ' jnz short loc_1C3AB xor eax, eax loc_1C389: inc rbx mov rcx, rbx loc_1C38F: mov rbx, rcx cmp rcx, r12 jnb short loc_1C3B8 cmp byte ptr [rbx], 20h ; ' ' jz short loc_1C3A7 lea rcx, [rbx+1] cmp eax, 2 jb short loc_1C38F jmp short loc_1C3B8 loc_1C3A7: inc eax jmp short loc_1C389 loc_1C3AB: mov r14, [rsp+548h+var_538] loc_1C3B0: mov [r14], ebp jmp loc_1C334 loc_1C3B8: cmp rbx, r12 mov r14, [rsp+548h+var_538] jz short loc_1C3B0 mov r12, [rsp+548h+var_510] mov rdi, r12 mov rsi, rbx mov r15, [rsp+548h+var_508] mov rdx, r15 call _strncpy mov byte ptr [r12+r15-1], 0 loc_1C3E0: mov rdi, rbx xor esi, esi xor eax, eax call _open mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_1C3B0 call ___errno_location cmp dword ptr [rax], 4 jz short loc_1C3E0 jmp short loc_1C3B0 loc_1C3FF: call _abort jmp short loc_1C40A jmp short loc_1C40A jmp short $+2 loc_1C40A: mov rbx, rax lea rdi, [rsp+548h+var_540]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) jmp short loc_1C41C mov rbx, rax loc_1C41C: lea rdi, [rsp+548h+var_540+4]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov rdi, rbx call __Unwind_Resume
nglog::tools * nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( nglog::tools *this, unsigned long long *a2, char *a3, unsigned long long *a4, char *a5, long long a6) { nglog::tools *v9; // r14 int v10; // eax const char *v11; // rdi unsigned int v12; // eax int *v13; // rbp long long v14; // r13 int *v15; // r12 int *v16; // r14 int *v17; // r12 signed long long v18; // rax char *v19; // r14 signed long long v20; // rax const char *LineFeed; // rax unsigned long long *v22; // rcx int *Hex; // rax unsigned long long *v24; // rcx int *v25; // rax unsigned long long v26; // r8 int *v27; // rbp _BYTE *v28; // rdx int *v29; // rax long long v30; // r15 bool v31; // al unsigned long long v32; // r8 long long v33; // r13 long long i; // rbx bool v36; // al int *v38; // rax int v39; // ebp int *v40; // rbx unsigned int v41; // eax int *v42; // rcx unsigned int v43; // [rsp+8h] [rbp-540h] BYREF int v44; // [rsp+Ch] [rbp-53Ch] BYREF nglog::tools *v45; // [rsp+10h] [rbp-538h] char *v46; // [rsp+18h] [rbp-530h] _DWORD v47[3]; // [rsp+24h] [rbp-524h] unsigned long long *v48; // [rsp+30h] [rbp-518h] char *v49; // [rsp+38h] [rbp-510h] long long v50; // [rsp+40h] [rbp-508h] _BYTE *v51; // [rsp+48h] [rbp-500h] long long v52; // [rsp+50h] [rbp-4F8h] char v53[8]; // [rsp+58h] [rbp-4F0h] BYREF int v54; // [rsp+60h] [rbp-4E8h] BYREF int *v55; // [rsp+68h] [rbp-4E0h] long long v56; // [rsp+70h] [rbp-4D8h] long long v57; // [rsp+78h] [rbp-4D0h] int *v58; // [rsp+80h] [rbp-4C8h] int *v59; // [rsp+88h] [rbp-4C0h] int *v60; // [rsp+90h] [rbp-4B8h] char v61[8]; // [rsp+98h] [rbp-4B0h] BYREF long long v62; // [rsp+A0h] [rbp-4A8h] long long v63; // [rsp+A8h] [rbp-4A0h] int v64; // [rsp+D0h] [rbp-478h] BYREF __int16 v65; // [rsp+E0h] [rbp-468h] long long v66; // [rsp+F0h] [rbp-458h] unsigned __int16 v67; // [rsp+108h] [rbp-440h] int v68[270]; // [rsp+110h] [rbp-438h] BYREF v46 = a3; v48 = a2; v9 = this; while ( 1 ) { v10 = open("/proc/self/maps", 0LL); if ( v10 != -1 ) break; if ( *(_DWORD *)__errno_location("/proc/self/maps") != 4 ) { v44 = -1; *(_DWORD *)this = -1; goto LABEL_49; } } v44 = v10; do { v11 = "/proc/self/mem"; v12 = open("/proc/self/mem", 0LL); if ( v12 != -1 ) { *(_QWORD *)&v47[1] = a4; v49 = a5; v50 = a6; v45 = v9; v47[0] = v44; v54 = v44; v13 = v68; v55 = v68; v56 = 1024LL; v57 = 0LL; v43 = v12; v59 = v68; v60 = v68; v14 = 0LL; v15 = v68; v16 = v68; while ( 1 ) { if ( v68 == v16 ) { v18 = nglog::tools::ReadFromOffset(v47[0], (long long)v68, (char *)&stru_400, v14); if ( v18 <= 0 ) goto LABEL_46; v14 += v18; v57 = v14; v16 = (int *)((char *)v68 + v18); } else { v17 = (int *)((char *)v15 + 1); v58 = v17; if ( v17 > v16 ) abort(v11); if ( nglog::tools::`anonymous namespace'::LineReader::FindLineFeed((nglog::tools::_anonymous_namespace_::LineReader *)&v54) ) { v13 = v17; goto LABEL_19; } v19 = (char *)((char *)v16 - (char *)v17); memmove(v68, v17, v19); v20 = nglog::tools::ReadFromOffset(v47[0], (long long)v68 + (_QWORD)v19, (char *)(1024LL - (_QWORD)v19), v14); if ( v20 <= 0 ) goto LABEL_46; v14 += v20; v57 = v14; v16 = (int *)((char *)v68 + (_QWORD)v19 + v20); } v60 = v16; v58 = v68; LABEL_19: LineFeed = (const char *)nglog::tools::`anonymous namespace'::LineReader::FindLineFeed((nglog::tools::_anonymous_namespace_::LineReader *)&v54); v59 = (int *)LineFeed; if ( !LineFeed ) goto LABEL_46; v15 = (int *)LineFeed; *LineFeed = 0; Hex = (int *)nglog::tools::GetHex((nglog::tools *)v13, LineFeed, v46, v22); if ( Hex == v15 ) goto LABEL_46; if ( *(_BYTE *)Hex != 45 ) goto LABEL_46; v11 = (char *)Hex + 1; v25 = (int *)nglog::tools::GetHex((nglog::tools *)((char *)Hex + 1), (const char *)v15, v53, v24); if ( v25 == v15 ) goto LABEL_46; v27 = v25; if ( *(_BYTE *)v25 != 32 ) goto LABEL_46; v28 = (char *)v25 + 1; v29 = (int *)((char *)v25 + 1); v30 = 0LL; while ( v29 < v15 && *(_BYTE *)v29 != 32 ) { --v30; v29 = (int *)((char *)v29 + 1); } if ( (unsigned long long)(1 - v30) < 5 || v29 == v15 ) { LABEL_46: v9 = v45; goto LABEL_47; } v52 = v14; v51 = (char *)v27 + 1; if ( *v28 == 114 ) { v11 = (const char *)v43; v31 = nglog::tools::ReadFromOffsetExact((nglog::tools *)v43, (int)&v64, &dword_40, *(_QWORD *)v46, v26); if ( v64 == 1179403647 && v31 ) { if ( v65 == 2 ) { **(_QWORD **)&v47[1] = 0LL; } else if ( v65 == 3 ) { **(_QWORD **)&v47[1] = *(_QWORD *)v46; v33 = v67; for ( i = v66; v33-- != 0; i += 56LL ) { v11 = (const char *)v43; v36 = nglog::tools::ReadFromOffsetExact( (nglog::tools *)v43, (int)v61, &word_38, i + *(_QWORD *)v46, v32); if ( *(_DWORD *)v61 == 1 && v36 && !v62 ) { **(_QWORD **)&v47[1] = *(_QWORD *)v46 - v63; break; } } } } } if ( *(_QWORD *)v46 <= (unsigned long long)v48 && *(_QWORD *)v53 > (unsigned long long)v48 && *v51 == 114 && *((_BYTE *)v27 + 3) == 120 ) { v38 = (int *)nglog::tools::GetHex((nglog::tools *)((char *)v27 - v30 + 2), (const char *)v15, v61, v48); v39 = -1; if ( v38 == v15 || (v40 = v38, *(_BYTE *)v38 != 32) ) { v9 = v45; } else { v41 = 0; LABEL_53: v42 = (int *)((char *)v40 + 1); do { v40 = v42; if ( v42 >= v15 ) break; if ( *(_BYTE *)v42 == 32 ) { ++v41; goto LABEL_53; } v42 = (int *)((char *)v42 + 1); } while ( v41 < 2 ); v9 = v45; if ( v40 != v15 ) { strncpy(v49, v40, v50); v49[v50 - 1] = 0; do v39 = open(v40, 0LL); while ( v39 == -1 && *(_DWORD *)__errno_location(v40) == 4 ); } } *(_DWORD *)v9 = v39; goto LABEL_48; } v13 = v68; v14 = v52; } } } while ( *(_DWORD *)__errno_location("/proc/self/mem") == 4 ); v43 = -1; LABEL_47: *(_DWORD *)v9 = -1; LABEL_48: nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)&v43); LABEL_49: nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)&v44); return v9; }
OpenObjectFileContainingPcAndGetStartAddress: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x518 MOV R15,R9 MOV R12,R8 MOV R13,RCX MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x30],RSI MOV R14,RDI LEA RBX,[0x11fe47] LAB_0011bfff: MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x00107420 CMP EAX,-0x1 JNZ 0x0011c028 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x0011bfff OR dword ptr [RSP + 0xc],0xffffffff OR dword ptr [R14],0xffffffff JMP 0x0011c33e LAB_0011c028: MOV dword ptr [RSP + 0xc],EAX LEA RBX,[0x11fe57] LAB_0011c033: MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x00107420 CMP EAX,-0x1 JNZ 0x0011c058 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x0011c033 OR dword ptr [RSP + 0x8],0xffffffff JMP 0x0011c330 LAB_0011c058: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x38],R12 MOV qword ptr [RSP + 0x40],R15 MOV qword ptr [RSP + 0x10],R14 MOV ECX,dword ptr [RSP + 0xc] LEA RBX,[RSP + 0x60] MOV dword ptr [RSP + 0x24],ECX MOV dword ptr [RBX],ECX LEA RBP,[RSP + 0x110] MOV qword ptr [RBX + 0x8],RBP MOV qword ptr [RBX + 0x10],0x400 AND qword ptr [RBX + 0x18],0x0 MOV dword ptr [RSP + 0x8],EAX MOV qword ptr [RBX + 0x28],RBP MOV qword ptr [RBX + 0x30],RBP XOR R13D,R13D MOV R12,RBP MOV R14,RBP LAB_0011c0a9: CMP RBP,R14 JZ 0x0011c0d7 INC R12 MOV qword ptr [RSP + 0x80],R12 CMP R12,R14 JA 0x0011c3ff MOV RDI,RBX CALL 0x0011c56e TEST RAX,RAX JZ 0x0011c109 MOV RBP,R12 JMP 0x0011c163 LAB_0011c0d7: MOV EDX,0x400 MOV EDI,dword ptr [RSP + 0x24] MOV RSI,RBP MOV RCX,R13 CALL 0x0011bc03 LAB_0011c0eb: TEST RAX,RAX JLE 0x0011c32b ADD R13,RAX MOV qword ptr [RSP + 0x78],R13 LEA R14,[RSP + RAX*0x1] ADD R14,0x110 JMP 0x0011c153 LAB_0011c109: SUB R14,R12 MOV RDI,RBP MOV RSI,R12 MOV RDX,R14 CALL 0x00107960 LEA R12,[RSP + R14*0x1] ADD R12,0x110 MOV EDX,0x400 SUB RDX,R14 LAB_0011c12d: MOV EDI,dword ptr [RSP + 0x24] MOV RSI,R12 MOV RCX,R13 CALL 0x0011bc03 TEST RAX,RAX JLE 0x0011c32b ADD R13,RAX MOV qword ptr [RSP + 0x78],R13 ADD R12,RAX MOV R14,R12 LAB_0011c153: MOV qword ptr [RSP + 0x90],R14 MOV qword ptr [RSP + 0x80],RBP LAB_0011c163: MOV RDI,RBX CALL 0x0011c56e MOV qword ptr [RSP + 0x88],RAX TEST RAX,RAX JZ 0x0011c32b MOV R12,RAX MOV byte ptr [RAX],0x0 MOV RDI,RBP MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x18] CALL 0x0011c4fd CMP RAX,R12 JZ 0x0011c32b CMP byte ptr [RAX],0x2d JNZ 0x0011c32b INC RAX MOV RDI,RAX MOV RSI,R12 LEA RDX,[RSP + 0x58] CALL 0x0011c4fd CMP RAX,R12 JZ 0x0011c32b MOV RBP,RAX CMP byte ptr [RAX],0x20 JNZ 0x0011c32b LEA RDX,[RBP + 0x1] MOV RAX,RDX XOR R15D,R15D LAB_0011c1d6: CMP RAX,R12 JNC 0x0011c1e8 CMP byte ptr [RAX],0x20 JZ 0x0011c1e8 DEC R15 INC RAX JMP 0x0011c1d6 LAB_0011c1e8: PUSH 0x1 POP RCX SUB RCX,R15 CMP RCX,0x5 JC 0x0011c32b CMP RAX,R12 JZ 0x0011c32b MOV qword ptr [RSP + 0x50],R13 MOV qword ptr [RSP + 0x48],RDX CMP byte ptr [RDX],0x72 JNZ 0x0011c2e9 MOV EDI,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX] LAB_0011c220: LEA RSI,[RSP + 0xd0] PUSH 0x40 POP RDX CALL 0x0011bbf2 CMP dword ptr [RSP + 0xd0],0x464c457f SETZ CL AND AL,CL CMP AL,0x1 JNZ 0x0011c2e9 MOVZX EAX,word ptr [RSP + 0xe0] CMP EAX,0x2 JZ 0x0011c2c6 CMP EAX,0x3 JNZ 0x0011c2e9 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RCX],RAX MOVZX R13D,word ptr [RSP + 0x108] MOV RBX,qword ptr [RSP + 0xf0] LAB_0011c27f: SUB R13,0x1 JC 0x0011c2e9 MOV EDI,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX] ADD RCX,RBX LAB_0011c294: LEA RSI,[RSP + 0x98] PUSH 0x38 POP RDX CALL 0x0011bbf2 CMP dword ptr [RSP + 0x98],0x1 SETZ CL AND AL,CL CMP AL,0x1 JNZ 0x0011c2c0 CMP qword ptr [RSP + 0xa0],0x0 JZ 0x0011c2d1 LAB_0011c2c0: ADD RBX,0x38 JMP 0x0011c27f LAB_0011c2c6: MOV RAX,qword ptr [RSP + 0x28] AND qword ptr [RAX],0x0 JMP 0x0011c2e9 LAB_0011c2d1: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RCX],RAX LAB_0011c2e9: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x30] CMP qword ptr [RAX],RCX JA 0x0011c314 MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RSP + 0x58],RAX JBE 0x0011c314 MOV RAX,qword ptr [RSP + 0x48] CMP byte ptr [RAX],0x72 JNZ 0x0011c314 CMP byte ptr [RBP + 0x3],0x78 JZ 0x0011c35d LAB_0011c314: LEA RBX,[RSP + 0x60] LEA RBP,[RSP + 0x110] MOV R13,qword ptr [RSP + 0x50] JMP 0x0011c0a9 LAB_0011c32b: MOV R14,qword ptr [RSP + 0x10] LAB_0011c330: OR dword ptr [R14],0xffffffff LAB_0011c334: LEA RDI,[RSP + 0x8] CALL 0x0011aa9c LAB_0011c33e: LEA RDI,[RSP + 0xc] CALL 0x0011aa9c MOV RAX,R14 ADD RSP,0x518 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011c35d: SUB RBP,R15 ADD RBP,0x2 LEA RDX,[RSP + 0x98] MOV RDI,RBP MOV RSI,R12 CALL 0x0011c4fd PUSH -0x1 POP RBP CMP RAX,R12 JZ 0x0011c3ab MOV RBX,RAX CMP byte ptr [RAX],0x20 JNZ 0x0011c3ab XOR EAX,EAX LAB_0011c389: INC RBX MOV RCX,RBX LAB_0011c38f: MOV RBX,RCX CMP RCX,R12 JNC 0x0011c3b8 CMP byte ptr [RBX],0x20 JZ 0x0011c3a7 LEA RCX,[RBX + 0x1] CMP EAX,0x2 JC 0x0011c38f JMP 0x0011c3b8 LAB_0011c3a7: INC EAX JMP 0x0011c389 LAB_0011c3ab: MOV R14,qword ptr [RSP + 0x10] LAB_0011c3b0: MOV dword ptr [R14],EBP JMP 0x0011c334 LAB_0011c3b8: CMP RBX,R12 MOV R14,qword ptr [RSP + 0x10] JZ 0x0011c3b0 MOV R12,qword ptr [RSP + 0x38] MOV RDI,R12 MOV RSI,RBX MOV R15,qword ptr [RSP + 0x40] MOV RDX,R15 CALL 0x001072c0 MOV byte ptr [R12 + R15*0x1 + -0x1],0x0 LAB_0011c3e0: MOV RDI,RBX XOR ESI,ESI XOR EAX,EAX CALL 0x00107420 LAB_0011c3ec: MOV EBP,EAX CMP EAX,-0x1 JNZ 0x0011c3b0 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x0011c3e0 JMP 0x0011c3b0 LAB_0011c3ff: CALL 0x00107320
/* nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long) */ tools * __thiscall nglog::tools::OpenObjectFileContainingPcAndGetStartAddress (tools *this,ulong param_1,ulong *param_2,ulong *param_3,char *param_4,ulong param_5) { char *pcVar1; byte bVar2; uint uVar3; int iVar4; int *piVar5; long lVar6; char *pcVar7; char *pcVar8; char *pcVar9; long lVar10; char *pcVar11; ulong uVar12; size_t __n; bool bVar13; int local_540; int local_53c; tools *local_538; ulong *local_530; int local_524; ulong *local_520; ulong local_518; char *local_510; ulong local_508; char *local_500; ulong local_4f8; ulong local_4f0; int local_4e8 [2]; char *local_4e0; int8 local_4d8; ulong local_4d0; char *local_4c8; char *local_4c0; char *local_4b8; ulong local_4b0; long local_4a8; long local_4a0; int local_478 [4]; short local_468; long local_458; ushort local_440; char local_438 [1032]; local_530 = param_2; local_518 = param_1; do { local_53c = open("/proc/self/maps",0); if (local_53c != -1) goto LAB_0011c033; piVar5 = __errno_location(); } while (*piVar5 == 4); local_53c = -1; *(int4 *)this = 0xffffffff; goto LAB_0011c33e; while (piVar5 = __errno_location(), *piVar5 == 4) { LAB_0011c033: /* try { // try from 0011c033 to 0011c03e has its CatchHandler @ 0011c419 */ local_540 = open("/proc/self/mem",0); if (local_540 != -1) { local_524 = local_53c; local_4e8[0] = local_53c; pcVar7 = local_438; local_4d8 = 0x400; local_4d0 = 0; uVar12 = 0; pcVar9 = pcVar7; local_538 = this; local_520 = param_3; local_510 = param_4; local_508 = param_5; local_4e0 = pcVar7; local_4c0 = pcVar7; local_4b8 = pcVar7; goto LAB_0011c0a9; } } local_540 = -1; LAB_0011c330: *(int *)this = -1; goto LAB_0011c334; LAB_0011c0a9: do { if (local_438 == pcVar9) { /* try { // try from 0011c0d7 to 0011c0ea has its CatchHandler @ 0011c408 */ lVar6 = ReadFromOffset(local_524,local_438,0x400,uVar12); this = local_538; if (lVar6 < 1) goto LAB_0011c330; pcVar9 = local_438 + lVar6; LAB_0011c153: uVar12 = uVar12 + lVar6; pcVar11 = local_438; local_4d0 = uVar12; local_4c8 = local_438; local_4b8 = pcVar9; } else { pcVar11 = pcVar7 + 1; local_4c8 = pcVar11; if (pcVar9 < pcVar11) { /* WARNING: Subroutine does not return */ abort(); } lVar6 = (anonymous_namespace)::LineReader::FindLineFeed((LineReader *)local_4e8); if (lVar6 == 0) { __n = (long)pcVar9 - (long)pcVar11; memmove(local_438,pcVar11,__n); /* try { // try from 0011c12d to 0011c13b has its CatchHandler @ 0011c408 */ lVar6 = ReadFromOffset(local_524,local_438 + __n,0x400 - __n,uVar12); this = local_538; if (0 < lVar6) { pcVar9 = local_438 + __n + lVar6; goto LAB_0011c153; } goto LAB_0011c330; } } pcVar7 = (char *)(anonymous_namespace)::LineReader::FindLineFeed((LineReader *)local_4e8); this = local_538; local_4c0 = pcVar7; if (pcVar7 == (char *)0x0) goto LAB_0011c330; *pcVar7 = '\0'; pcVar11 = (char *)GetHex(pcVar11,pcVar7,local_530); this = local_538; if ((((pcVar11 == pcVar7) || (*pcVar11 != '-')) || (pcVar11 = (char *)GetHex(pcVar11 + 1,pcVar7,&local_4f0), this = local_538, pcVar11 == pcVar7)) || (*pcVar11 != ' ')) goto LAB_0011c330; lVar6 = 0; pcVar1 = pcVar11 + 1; for (pcVar8 = pcVar1; (pcVar8 < pcVar7 && (*pcVar8 != ' ')); pcVar8 = pcVar8 + 1) { lVar6 = lVar6 + -1; } if ((1U - lVar6 < 5) || (pcVar8 == pcVar7)) goto LAB_0011c330; local_500 = pcVar1; local_4f8 = uVar12; /* try { // try from 0011c220 to 0011c22f has its CatchHandler @ 0011c406 */ if ((*pcVar1 == 'r') && (bVar2 = ReadFromOffsetExact(local_540,local_478,0x40,*local_530), (bVar2 & local_478[0] == 0x464c457f) == 1)) { if (local_468 == 2) { *local_520 = 0; } else if (local_468 == 3) { *local_520 = *local_530; uVar12 = (ulong)local_440; lVar10 = local_458; while (bVar13 = uVar12 != 0, uVar12 = uVar12 - 1, bVar13) { /* try { // try from 0011c294 to 0011c2a3 has its CatchHandler @ 0011c40a */ bVar2 = ReadFromOffsetExact(local_540,&local_4b0,0x38,*local_530 + lVar10); if (((bVar2 & (int)local_4b0 == 1) == 1) && (local_4a8 == 0)) { *local_520 = *local_530 - local_4a0; break; } lVar10 = lVar10 + 0x38; } } } uVar12 = local_4f8; } while ((((local_518 < *local_530) || (local_4f0 <= local_518)) || (*local_500 != 'r')) || (pcVar11[3] != 'x')); pcVar9 = (char *)GetHex(pcVar11 + (2 - lVar6),pcVar7,&local_4b0); uVar12 = local_508; pcVar11 = local_510; this = local_538; iVar4 = -1; if ((pcVar9 != pcVar7) && (*pcVar9 == ' ')) { uVar3 = 0; do { while( true ) { pcVar9 = pcVar9 + 1; if (pcVar7 <= pcVar9) goto LAB_0011c3b8; if (*pcVar9 != ' ') break; uVar3 = uVar3 + 1; } } while (uVar3 < 2); LAB_0011c3b8: if (pcVar9 != pcVar7) { strncpy(local_510,pcVar9,local_508); pcVar11[uVar12 - 1] = '\0'; do { /* try { // try from 0011c3e0 to 0011c3eb has its CatchHandler @ 0011c404 */ iVar4 = open(pcVar9,0); if (iVar4 != -1) break; piVar5 = __errno_location(); } while (*piVar5 == 4); } } *(int *)this = iVar4; LAB_0011c334: FileDescriptor::safe_close((FileDescriptor *)&local_540); LAB_0011c33e: FileDescriptor::safe_close((FileDescriptor *)&local_53c); return this; }
11,458
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE FileDescriptor OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc, uint64_t& start_address, uint64_t& base_address, char* out_file_name, size_t out_file_name_size) { FileDescriptor maps_fd{ FailureRetry([] { return open("/proc/self/maps", O_RDONLY); })}; if (!maps_fd) { return nullptr; } FileDescriptor mem_fd{ FailureRetry([] { return open("/proc/self/mem", O_RDONLY); })}; if (!mem_fd) { return nullptr; } // Iterate over maps and look for the map containing the pc. Then // look into the symbol tables inside. char buf[1024]; // Big enough for line of sane /proc/self/maps LineReader reader(maps_fd.get(), buf, sizeof(buf), 0); while (true) { const char* cursor; const char* eol; if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. return nullptr; } // Start parsing line in /proc/self/maps. Here is an example: // // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat // // We want start address (08048000), end address (0804c000), flags // (r-xp) and file name (/bin/cat). // Read start address. cursor = GetHex(cursor, eol, &start_address); if (cursor == eol || *cursor != '-') { return nullptr; // Malformed line. } ++cursor; // Skip '-'. // Read end address. uint64_t end_address; cursor = GetHex(cursor, eol, &end_address); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Read flags. Skip flags until we encounter a space or eol. const char* const flags_start = cursor; while (cursor < eol && *cursor != ' ') { ++cursor; } // We expect at least four letters for flags (ex. "r-xp"). if (cursor == eol || cursor < flags_start + 4) { return nullptr; // Malformed line. } // Determine the base address by reading ELF headers in process memory. ElfW(Ehdr) ehdr; // Skip non-readable maps. if (flags_start[0] == 'r' && ReadFromOffsetExact(mem_fd.get(), &ehdr, sizeof(ElfW(Ehdr)), start_address) && memcmp(ehdr.e_ident, ELFMAG, SELFMAG) == 0) { switch (ehdr.e_type) { case ET_EXEC: base_address = 0; break; case ET_DYN: // Find the segment containing file offset 0. This will correspond // to the ELF header that we just read. Normally this will have // virtual address 0, but this is not guaranteed. We must subtract // the virtual address from the address where the ELF header was // mapped to get the base address. // // If we fail to find a segment for file offset 0, use the address // of the ELF header as the base address. base_address = start_address; for (unsigned i = 0; i != ehdr.e_phnum; ++i) { ElfW(Phdr) phdr; if (ReadFromOffsetExact( mem_fd.get(), &phdr, sizeof(phdr), start_address + ehdr.e_phoff + i * sizeof(phdr)) && phdr.p_type == PT_LOAD && phdr.p_offset == 0) { base_address = start_address - phdr.p_vaddr; break; } } break; default: // ET_REL or ET_CORE. These aren't directly executable, so they don't // affect the base address. break; } } // Check start and end addresses. if (start_address > pc || pc >= end_address) { continue; // We skip this map. PC isn't in this map. } // Check flags. We are only interested in "r*x" maps. if (flags_start[0] != 'r' || flags_start[2] != 'x') { continue; // We skip this map. } ++cursor; // Skip ' '. // Read file offset. uint64_t file_offset; cursor = GetHex(cursor, eol, &file_offset); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Skip to file name. "cursor" now points to dev. We need to // skip at least two spaces for dev and inode. int num_spaces = 0; while (cursor < eol) { if (*cursor == ' ') { ++num_spaces; } else if (num_spaces >= 2) { // The first non-space character after skipping two spaces // is the beginning of the file name. break; } ++cursor; } if (cursor == eol) { return nullptr; // Malformed line. } strncpy(out_file_name, cursor, out_file_name_size); // Making sure |out_file_name| is always null-terminated. out_file_name[out_file_name_size - 1] = '\0'; // Finally, "cursor" now points to file name of our interest. return FileDescriptor{ FailureRetry([cursor] { return open(cursor, O_RDONLY); })}; } }
O3
cpp
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4d8, %rsp # imm = 0x4D8 movq %r9, %r12 movq %r8, %r13 movq %rcx, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, %r15 leaq 0x37b4(%rip), %r14 # 0x23e41 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x73b0 cmpl $-0x1, %eax jne 0x206b4 callq 0x7050 cmpl $0x4, (%rax) je 0x2068d movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x209a3 movl %eax, %ebx leaq 0x3794(%rip), %r14 # 0x23e51 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x73b0 movl %eax, %ebp cmpl $-0x1, %eax jne 0x206e6 callq 0x7050 cmpl $0x4, (%rax) je 0x206bd movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x2099c movq %r13, 0x28(%rsp) movq %r12, 0x30(%rsp) movq %r15, (%rsp) leaq 0xd0(%rsp), %r15 xorl %r12d, %r12d movq %r15, %r13 movq %r15, %r14 cmpq %r14, %r15 je 0x2073d incq %r13 cmpq %r14, %r13 ja 0x20a44 movq %r14, 0x18(%rsp) subq %r13, %r14 movq %r13, %rdi movl $0xa, %esi movq %r14, %rdx callq 0x75e0 testq %rax, %rax je 0x20768 movq %r13, %r15 movq 0x18(%rsp), %rdx jmp 0x207a8 movl $0x400, %edx # imm = 0x400 movl %ebx, %edi movq %r15, %rsi movq %r12, %rcx callq 0x20269 testq %rax, %rax jle 0x2098b addq %rax, %r12 leaq (%rsp,%rax), %rdx addq $0xd0, %rdx jmp 0x207a8 movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x78d0 leaq (%rsp,%r14), %rsi addq $0xd0, %rsi movl $0x400, %edx # imm = 0x400 subq %r14, %rdx movl %ebx, %edi movq %rsi, %r14 movq %r12, %rcx callq 0x20269 testq %rax, %rax jle 0x2098b addq %rax, %r12 addq %rax, %r14 movq %r14, %rdx movq %rdx, 0x18(%rsp) subq %r15, %rdx movq %r15, %rdi movl $0xa, %esi callq 0x75e0 testq %rax, %rax je 0x2098b movq %rax, %r13 movb $0x0, (%rax) movq %r15, %rdi movq %rax, %rsi movq 0x8(%rsp), %rdx callq 0x20b57 cmpq %r13, %rax je 0x2098b cmpb $0x2d, (%rax) jne 0x2098b incq %rax movq %rax, %rdi movq %r13, %rsi leaq 0x50(%rsp), %rdx callq 0x20b57 cmpq %r13, %rax je 0x2098b movq %rax, %r14 cmpb $0x20, (%rax) jne 0x2098b leaq 0x1(%r14), %rdx cmpq %r13, %rdx jae 0x2098b movq %r13, %rcx subq %r14, %rcx movl $0x1, %eax cmpb $0x20, (%r14,%rax) je 0x20845 incq %rax cmpq %rax, %rcx jne 0x2082e movq %rcx, %rax movq %r13, %rcx jmp 0x2084b movq %r14, %rcx addq %rax, %rcx cmpq $0x5, %rax jb 0x2098b cmpq %r13, %rcx je 0x2098b movq %rcx, 0x38(%rsp) movq %r12, 0x48(%rsp) movq %rdx, 0x40(%rsp) cmpb $0x72, (%rdx) jne 0x20948 movq 0x8(%rsp), %rax movq (%rax), %rcx movl $0x40, %edx movl %ebp, %edi leaq 0x90(%rsp), %rsi callq 0x20269 cmpq $0x40, %rax jne 0x20948 cmpl $0x464c457f, 0x90(%rsp) # imm = 0x464C457F jne 0x20948 movzwl 0xa0(%rsp), %eax cmpl $0x2, %eax je 0x20925 cmpl $0x3, %eax jne 0x20948 movq 0x8(%rsp), %rax movq (%rax), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movzwl 0xc8(%rsp), %r12d testq %r12, %r12 je 0x20948 movq 0xb0(%rsp), %r15 movq 0x8(%rsp), %rax movq (%rax), %rcx addq %r15, %rcx movl $0x38, %edx movl %ebp, %edi leaq 0x58(%rsp), %rsi callq 0x20269 cmpq $0x38, %rax jne 0x2091a cmpl $0x1, 0x58(%rsp) jne 0x2091a cmpq $0x0, 0x60(%rsp) je 0x20933 addq $0x38, %r15 decq %r12 jne 0x208e9 jmp 0x20948 movq 0x10(%rsp), %rax movq $0x0, (%rax) jmp 0x20948 movq 0x8(%rsp), %rax movq (%rax), %rax subq 0x68(%rsp), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movq 0x8(%rsp), %rax movq 0x20(%rsp), %rcx cmpq %rcx, (%rax) ja 0x20974 movq 0x20(%rsp), %rax cmpq %rax, 0x50(%rsp) jbe 0x20974 movq 0x40(%rsp), %rax cmpb $0x72, (%rax) jne 0x20974 cmpb $0x78, 0x3(%r14) je 0x209b5 leaq 0xd0(%rsp), %r15 movq 0x48(%rsp), %r12 movq 0x18(%rsp), %r14 jmp 0x20705 movq (%rsp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl %ebp, %edi callq 0x7a30 movl %ebx, %edi callq 0x7a30 addq $0x4d8, %rsp # imm = 0x4D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rdi incq %rdi leaq 0x58(%rsp), %rdx movq %r13, %rsi callq 0x20b57 movq %rax, %rcx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %r13, %rcx je 0x20a38 cmpb $0x20, (%rcx) jne 0x20a38 leaq 0x1(%rcx), %r14 cmpq %r13, %r14 jae 0x20a07 notq %rcx addq %r13, %rcx xorl %edx, %edx cmpb $0x20, (%r14) jne 0x209f7 incl %edx jmp 0x209fc cmpl $0x1, %edx jg 0x20a07 incq %r14 decq %rcx jne 0x209ed movq %r13, %r14 cmpq %r13, %r14 movq (%rsp), %r15 je 0x20a3c movq 0x28(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi movq 0x30(%rsp), %r12 movq %r12, %rdx callq 0x7250 movb $0x0, -0x1(%r13,%r12) movq %r14, %rdi callq 0x20bd0 jmp 0x20a3c movq (%rsp), %r15 movl %eax, (%r15) jmp 0x20995 callq 0x72c0 jmp 0x20a53 jmp 0x20a73 jmp 0x20a53 jmp 0x20a73 jmp 0x20a53 movq %rax, %r14 movl %ebp, %edi callq 0x7a30 jmp 0x20a64 jmp 0x20a73 movq %rax, %r14 movl %ebx, %edi callq 0x7a30 movq %r14, %rdi callq 0x7980 movq %rax, %rdi callq 0x911d
_ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4D8h mov r12, r9 mov r13, r8 mov [rsp+508h+var_4F8], rcx mov [rsp+508h+var_500], rdx mov [rsp+508h+var_4E8], rsi mov r15, rdi lea r14, aProcSelfMaps; "/proc/self/maps" loc_2068D: mov rdi, r14 xor esi, esi xor eax, eax call _open cmp eax, 0FFFFFFFFh jnz short loc_206B4 call ___errno_location cmp dword ptr [rax], 4 jz short loc_2068D mov dword ptr [r15], 0FFFFFFFFh jmp loc_209A3 loc_206B4: mov ebx, eax lea r14, aProcSelfMem; "/proc/self/mem" loc_206BD: mov rdi, r14 xor esi, esi xor eax, eax call _open mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_206E6 call ___errno_location cmp dword ptr [rax], 4 jz short loc_206BD mov dword ptr [r15], 0FFFFFFFFh jmp loc_2099C loc_206E6: mov [rsp+508h+var_4E0], r13 mov [rsp+508h+var_4D8], r12 mov [rsp+508h+var_508], r15 lea r15, [rsp+508h+var_438] xor r12d, r12d mov r13, r15 mov r14, r15 loc_20705: cmp r15, r14 jz short loc_2073D inc r13 cmp r13, r14 ja loc_20A44 mov [rsp+508h+var_4F0], r14 sub r14, r13 mov rdi, r13 mov esi, 0Ah mov rdx, r14 call _memchr test rax, rax jz short loc_20768 mov r15, r13 mov rdx, [rsp+508h+var_4F0] jmp short loc_207A8 loc_2073D: mov edx, offset stru_400; void * mov edi, ebx; this mov rsi, r15; int mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_2098B add r12, rax lea rdx, [rsp+rax+508h+var_508] add rdx, 0D0h jmp short loc_207A8 loc_20768: mov rdi, r15 mov rsi, r13 mov rdx, r14 call _memmove lea rsi, [rsp+r14+508h+var_508] add rsi, 0D0h; int mov edx, 400h sub rdx, r14; void * mov edi, ebx; this mov r14, rsi mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_2098B add r12, rax add r14, rax mov rdx, r14 loc_207A8: mov [rsp+508h+var_4F0], rdx sub rdx, r15 mov rdi, r15 mov esi, 0Ah call _memchr test rax, rax jz loc_2098B mov r13, rax mov byte ptr [rax], 0 mov rdi, r15; this mov rsi, rax; char * mov rdx, [rsp+508h+var_500]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_2098B cmp byte ptr [rax], 2Dh ; '-' jnz loc_2098B inc rax mov rdi, rax; this mov rsi, r13; char * lea rdx, [rsp+508h+var_4B8]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_2098B mov r14, rax cmp byte ptr [rax], 20h ; ' ' jnz loc_2098B lea rdx, [r14+1] cmp rdx, r13 jnb loc_2098B mov rcx, r13 sub rcx, r14 mov eax, 1 loc_2082E: cmp byte ptr [r14+rax], 20h ; ' ' jz short loc_20845 inc rax cmp rcx, rax jnz short loc_2082E mov rax, rcx mov rcx, r13 jmp short loc_2084B loc_20845: mov rcx, r14 add rcx, rax loc_2084B: cmp rax, 5 jb loc_2098B cmp rcx, r13 jz loc_2098B mov [rsp+508h+var_4D0], rcx mov [rsp+508h+var_4C0], r12 mov [rsp+508h+var_4C8], rdx cmp byte ptr [rdx], 72h ; 'r' jnz loc_20948 mov rax, [rsp+508h+var_500] mov rcx, [rax]; unsigned __int64 mov edx, offset dword_40; void * mov edi, ebp; this lea rsi, [rsp+508h+var_478]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_20948 cmp [rsp+508h+var_478], 464C457Fh jnz loc_20948 movzx eax, [rsp+508h+var_468] cmp eax, 2 jz short loc_20925 cmp eax, 3 jnz loc_20948 mov rax, [rsp+508h+var_500] mov rax, [rax] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax movzx r12d, [rsp+508h+var_440] test r12, r12 jz short loc_20948 mov r15, [rsp+508h+var_458] loc_208E9: mov rax, [rsp+508h+var_500] mov rcx, [rax] add rcx, r15; unsigned __int64 mov edx, offset word_38; void * mov edi, ebp; this lea rsi, [rsp+508h+var_4B0]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 38h ; '8' jnz short loc_2091A cmp dword ptr [rsp+508h+var_4B0], 1 jnz short loc_2091A cmp [rsp+508h+var_4A8], 0 jz short loc_20933 loc_2091A: add r15, 38h ; '8' dec r12 jnz short loc_208E9 jmp short loc_20948 loc_20925: mov rax, [rsp+508h+var_4F8] mov qword ptr [rax], 0 jmp short loc_20948 loc_20933: mov rax, [rsp+508h+var_500] mov rax, [rax] sub rax, [rsp+508h+var_4A0] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax loc_20948: mov rax, [rsp+508h+var_500] mov rcx, [rsp+508h+var_4E8]; unsigned __int64 * cmp [rax], rcx ja short loc_20974 mov rax, [rsp+508h+var_4E8] cmp qword ptr [rsp+508h+var_4B8], rax jbe short loc_20974 mov rax, [rsp+508h+var_4C8] cmp byte ptr [rax], 72h ; 'r' jnz short loc_20974 cmp byte ptr [r14+3], 78h ; 'x' jz short loc_209B5 loc_20974: lea r15, [rsp+508h+var_438] mov r12, [rsp+508h+var_4C0] mov r14, [rsp+508h+var_4F0] jmp loc_20705 loc_2098B: mov rax, [rsp+508h+var_508] mov dword ptr [rax], 0FFFFFFFFh loc_20995: mov edi, ebp call _close loc_2099C: mov edi, ebx call _close loc_209A3: add rsp, 4D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_209B5: mov rdi, [rsp+508h+var_4D0] inc rdi; this lea rdx, [rsp+508h+var_4B0]; char * mov rsi, r13; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) mov rcx, rax mov eax, 0FFFFFFFFh cmp rcx, r13 jz short loc_20A38 cmp byte ptr [rcx], 20h ; ' ' jnz short loc_20A38 lea r14, [rcx+1] cmp r14, r13 jnb short loc_20A07 not rcx add rcx, r13 xor edx, edx loc_209ED: cmp byte ptr [r14], 20h ; ' ' jnz short loc_209F7 inc edx jmp short loc_209FC loc_209F7: cmp edx, 1 jg short loc_20A07 loc_209FC: inc r14 dec rcx jnz short loc_209ED mov r14, r13 loc_20A07: cmp r14, r13 mov r15, [rsp+508h+var_508] jz short loc_20A3C mov r13, [rsp+508h+var_4E0] mov rdi, r13 mov rsi, r14 mov r12, [rsp+508h+var_4D8] mov rdx, r12 call _strncpy mov byte ptr [r13+r12-1], 0 mov rdi, r14 call _ZN5nglog5tools12_GLOBAL__N_112FailureRetryIZNS0_L44OpenObjectFileContainingPcAndGetStartAddressEmRmS3_PcmE3$_2EEDaT_i jmp short loc_20A3C loc_20A38: mov r15, [rsp+508h+var_508] loc_20A3C: mov [r15], eax jmp loc_20995 loc_20A44: call _abort jmp short loc_20A53 jmp short loc_20A73 jmp short loc_20A53 jmp short loc_20A73 jmp short $+2 loc_20A53: mov r14, rax mov edi, ebp call _close jmp short loc_20A64 jmp short loc_20A73 mov r14, rax loc_20A64: mov edi, ebx call _close mov rdi, r14 call __Unwind_Resume loc_20A73: mov rdi, rax call __clang_call_terminate
_DWORD * nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( nglog::tools *this, unsigned long long *a2, const char *a3, unsigned long long *a4, char *a5, long long a6) { unsigned int v9; // eax _DWORD *result; // rax unsigned int v11; // ebx unsigned long long v12; // rdi unsigned int v13; // ebp int *v14; // r15 long long v15; // r12 int *v16; // r13 int *i; // r14 int *v18; // r13 char *v19; // r14 char *v20; // rdx signed long long v21; // rax char *v22; // rdx char *v23; // r14 signed long long v24; // rax const char *v25; // rax unsigned long long *v26; // rcx int *Hex; // rax unsigned long long *v28; // rcx int *v29; // rax int *v30; // r14 _BYTE *v31; // rdx signed long long v32; // rcx unsigned long long v33; // rax int *v34; // rcx long long v35; // r12 long long v36; // r15 long long v37; // rcx int v38; // eax int *v39; // r14 char *v40; // rcx int v41; // edx _DWORD *v42; // r15 nglog::tools *v43; // [rsp+0h] [rbp-508h] int *v46; // [rsp+18h] [rbp-4F0h] int *v47; // [rsp+18h] [rbp-4F0h] char *v48; // [rsp+28h] [rbp-4E0h] long long v49; // [rsp+30h] [rbp-4D8h] int *v50; // [rsp+38h] [rbp-4D0h] long long v51; // [rsp+48h] [rbp-4C0h] char v52[8]; // [rsp+50h] [rbp-4B8h] BYREF char v53[8]; // [rsp+58h] [rbp-4B0h] BYREF long long v54; // [rsp+60h] [rbp-4A8h] long long v55; // [rsp+68h] [rbp-4A0h] int v56[4]; // [rsp+90h] [rbp-478h] BYREF __int16 v57; // [rsp+A0h] [rbp-468h] long long v58; // [rsp+B0h] [rbp-458h] unsigned __int16 v59; // [rsp+C8h] [rbp-440h] int v60[270]; // [rsp+D0h] [rbp-438h] BYREF while ( 1 ) { v9 = open("/proc/self/maps", 0LL); if ( v9 != -1 ) break; result = (_DWORD *)__errno_location("/proc/self/maps"); if ( *result != 4 ) { *(_DWORD *)this = -1; return result; } } v11 = v9; while ( 1 ) { v12 = (unsigned long long)"/proc/self/mem"; v13 = open("/proc/self/mem", 0LL); if ( v13 != -1 ) break; if ( *(_DWORD *)__errno_location("/proc/self/mem") != 4 ) { *(_DWORD *)this = -1; return (_DWORD *)close(v11); } } v48 = a5; v49 = a6; v43 = this; v14 = v60; v15 = 0LL; v16 = v60; for ( i = v60; ; i = v47 ) { if ( v60 == i ) { v21 = nglog::tools::ReadFromOffset(v11, (long long)v60, (char *)&stru_400, v15); if ( v21 <= 0 ) goto LABEL_49; v15 += v21; v20 = (char *)v60 + v21; } else { v18 = (int *)((char *)v16 + 1); if ( v18 > i ) abort(v12); v46 = i; v19 = (char *)((char *)i - (char *)v18); if ( memchr(v18, 10LL, v19) ) { v14 = v18; v20 = (char *)v46; } else { memmove(v60, v18, v19); v22 = (char *)(1024LL - (_QWORD)v19); v23 = (char *)v60 + (_QWORD)v19; v24 = nglog::tools::ReadFromOffset(v11, (long long)v23, v22, v15); if ( v24 <= 0 ) goto LABEL_49; v15 += v24; v20 = &v23[v24]; } } v47 = (int *)v20; v25 = (const char *)memchr(v14, 10LL, v20 - (char *)v14); if ( !v25 ) goto LABEL_49; v16 = (int *)v25; *v25 = 0; Hex = (int *)nglog::tools::GetHex((nglog::tools *)v14, v25, a3, v26); if ( Hex == v16 ) goto LABEL_49; if ( *(_BYTE *)Hex != 45 ) goto LABEL_49; v12 = (unsigned long long)Hex + 1; v29 = (int *)nglog::tools::GetHex((nglog::tools *)((char *)Hex + 1), (const char *)v16, v52, v28); if ( v29 == v16 ) goto LABEL_49; v30 = v29; if ( *(_BYTE *)v29 != 32 ) goto LABEL_49; v31 = (char *)v29 + 1; if ( (int *)((char *)v29 + 1) >= v16 ) goto LABEL_49; v32 = (char *)v16 - (char *)v29; v33 = 1LL; while ( *((_BYTE *)v30 + v33) != 32 ) { if ( v32 == ++v33 ) { v33 = (char *)v16 - (char *)v30; v34 = v16; goto LABEL_28; } } v34 = (int *)((char *)v30 + v33); LABEL_28: if ( v33 < 5 || v34 == v16 ) { LABEL_49: *(_DWORD *)v43 = -1; goto LABEL_50; } v50 = v34; v51 = v15; if ( *v31 == 114 ) { v12 = v13; if ( nglog::tools::ReadFromOffset(v13, (long long)v56, (char *)&dword_40, *(_QWORD *)a3) == 64 && v56[0] == 1179403647 ) { if ( v57 == 2 ) { *a4 = 0LL; } else if ( v57 == 3 ) { *a4 = *(_QWORD *)a3; v35 = v59; if ( v59 ) { v36 = v58; while ( 1 ) { v12 = v13; if ( nglog::tools::ReadFromOffset(v13, (long long)v53, (char *)&word_38, v36 + *(_QWORD *)a3) == 56 && *(_DWORD *)v53 == 1 && !v54 ) { break; } v36 += 56LL; if ( !--v35 ) goto LABEL_44; } *a4 = *(_QWORD *)a3 - v55; } } } } LABEL_44: if ( *(_QWORD *)a3 <= (unsigned long long)a2 && *(_QWORD *)v52 > (unsigned long long)a2 && *((_BYTE *)v30 + 1) == 114 && *((_BYTE *)v30 + 3) == 120 ) { break; } v14 = v60; v15 = v51; } v37 = nglog::tools::GetHex((nglog::tools *)((char *)v50 + 1), (const char *)v16, v53, a2); v38 = -1; if ( (int *)v37 == v16 || *(_BYTE *)v37 != 32 ) { v42 = v43; } else { v39 = (int *)(v37 + 1); if ( v37 + 1 < (unsigned long long)v16 ) { v40 = (char *)v16 + ~v37; v41 = 0; do { if ( *(_BYTE *)v39 == 32 ) { ++v41; } else if ( v41 > 1 ) { goto LABEL_61; } v39 = (int *)((char *)v39 + 1); --v40; } while ( v40 ); v39 = v16; } LABEL_61: v42 = v43; if ( v39 != v16 ) { strncpy(v48, v39, v49); v48[v49 - 1] = 0; v38 = nglog::tools::`anonymous namespace'::FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long,unsigned long &,unsigned long &,char *,unsigned long)::$_2>(v39); } } *v42 = v38; LABEL_50: close(v13); return (_DWORD *)close(v11); }
OpenObjectFileContainingPcAndGetStartAddress: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x4d8 MOV R12,R9 MOV R13,R8 MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x20],RSI MOV R15,RDI LEA R14,[0x123e41] LAB_0012068d: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x001073b0 CMP EAX,-0x1 JNZ 0x001206b4 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x0012068d MOV dword ptr [R15],0xffffffff JMP 0x001209a3 LAB_001206b4: MOV EBX,EAX LEA R14,[0x123e51] LAB_001206bd: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x001073b0 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x001206e6 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x001206bd MOV dword ptr [R15],0xffffffff JMP 0x0012099c LAB_001206e6: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x30],R12 MOV qword ptr [RSP],R15 LEA R15,[RSP + 0xd0] XOR R12D,R12D MOV R13,R15 MOV R14,R15 LAB_00120705: CMP R15,R14 JZ 0x0012073d INC R13 CMP R13,R14 JA 0x00120a44 MOV qword ptr [RSP + 0x18],R14 SUB R14,R13 MOV RDI,R13 MOV ESI,0xa MOV RDX,R14 CALL 0x001075e0 TEST RAX,RAX JZ 0x00120768 MOV R15,R13 MOV RDX,qword ptr [RSP + 0x18] JMP 0x001207a8 LAB_0012073d: MOV EDX,0x400 MOV EDI,EBX MOV RSI,R15 MOV RCX,R12 CALL 0x00120269 LAB_0012074f: TEST RAX,RAX JLE 0x0012098b ADD R12,RAX LEA RDX,[RSP + RAX*0x1] ADD RDX,0xd0 JMP 0x001207a8 LAB_00120768: MOV RDI,R15 MOV RSI,R13 MOV RDX,R14 CALL 0x001078d0 LEA RSI,[RSP + R14*0x1] ADD RSI,0xd0 MOV EDX,0x400 SUB RDX,R14 LAB_00120789: MOV EDI,EBX MOV R14,RSI MOV RCX,R12 CALL 0x00120269 TEST RAX,RAX JLE 0x0012098b ADD R12,RAX ADD R14,RAX MOV RDX,R14 LAB_001207a8: MOV qword ptr [RSP + 0x18],RDX SUB RDX,R15 MOV RDI,R15 MOV ESI,0xa CALL 0x001075e0 TEST RAX,RAX JZ 0x0012098b MOV R13,RAX MOV byte ptr [RAX],0x0 MOV RDI,R15 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x8] CALL 0x00120b57 CMP RAX,R13 JZ 0x0012098b CMP byte ptr [RAX],0x2d JNZ 0x0012098b INC RAX MOV RDI,RAX MOV RSI,R13 LEA RDX,[RSP + 0x50] CALL 0x00120b57 CMP RAX,R13 JZ 0x0012098b MOV R14,RAX CMP byte ptr [RAX],0x20 JNZ 0x0012098b LEA RDX,[R14 + 0x1] CMP RDX,R13 JNC 0x0012098b MOV RCX,R13 SUB RCX,R14 MOV EAX,0x1 LAB_0012082e: CMP byte ptr [R14 + RAX*0x1],0x20 JZ 0x00120845 INC RAX CMP RCX,RAX JNZ 0x0012082e MOV RAX,RCX MOV RCX,R13 JMP 0x0012084b LAB_00120845: MOV RCX,R14 ADD RCX,RAX LAB_0012084b: CMP RAX,0x5 JC 0x0012098b CMP RCX,R13 JZ 0x0012098b MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x48],R12 MOV qword ptr [RSP + 0x40],RDX CMP byte ptr [RDX],0x72 JNZ 0x00120948 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_0012087e: MOV EDX,0x40 MOV EDI,EBP LEA RSI,[RSP + 0x90] CALL 0x00120269 CMP RAX,0x40 JNZ 0x00120948 CMP dword ptr [RSP + 0x90],0x464c457f JNZ 0x00120948 MOVZX EAX,word ptr [RSP + 0xa0] CMP EAX,0x2 JZ 0x00120925 CMP EAX,0x3 JNZ 0x00120948 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX MOVZX R12D,word ptr [RSP + 0xc8] TEST R12,R12 JZ 0x00120948 MOV R15,qword ptr [RSP + 0xb0] LAB_001208e9: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] ADD RCX,R15 LAB_001208f4: MOV EDX,0x38 MOV EDI,EBP LEA RSI,[RSP + 0x58] CALL 0x00120269 CMP RAX,0x38 JNZ 0x0012091a CMP dword ptr [RSP + 0x58],0x1 JNZ 0x0012091a CMP qword ptr [RSP + 0x60],0x0 JZ 0x00120933 LAB_0012091a: ADD R15,0x38 DEC R12 JNZ 0x001208e9 JMP 0x00120948 LAB_00120925: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],0x0 JMP 0x00120948 LAB_00120933: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX LAB_00120948: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],RCX JA 0x00120974 MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RSP + 0x50],RAX JBE 0x00120974 MOV RAX,qword ptr [RSP + 0x40] CMP byte ptr [RAX],0x72 JNZ 0x00120974 CMP byte ptr [R14 + 0x3],0x78 JZ 0x001209b5 LAB_00120974: LEA R15,[RSP + 0xd0] MOV R12,qword ptr [RSP + 0x48] MOV R14,qword ptr [RSP + 0x18] JMP 0x00120705 LAB_0012098b: MOV RAX,qword ptr [RSP] MOV dword ptr [RAX],0xffffffff LAB_00120995: MOV EDI,EBP CALL 0x00107a30 LAB_0012099c: MOV EDI,EBX CALL 0x00107a30 LAB_001209a3: ADD RSP,0x4d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001209b5: MOV RDI,qword ptr [RSP + 0x38] INC RDI LEA RDX,[RSP + 0x58] MOV RSI,R13 CALL 0x00120b57 MOV RCX,RAX MOV EAX,0xffffffff CMP RCX,R13 JZ 0x00120a38 CMP byte ptr [RCX],0x20 JNZ 0x00120a38 LEA R14,[RCX + 0x1] CMP R14,R13 JNC 0x00120a07 NOT RCX ADD RCX,R13 XOR EDX,EDX LAB_001209ed: CMP byte ptr [R14],0x20 JNZ 0x001209f7 INC EDX JMP 0x001209fc LAB_001209f7: CMP EDX,0x1 JG 0x00120a07 LAB_001209fc: INC R14 DEC RCX JNZ 0x001209ed MOV R14,R13 LAB_00120a07: CMP R14,R13 MOV R15,qword ptr [RSP] JZ 0x00120a3c MOV R13,qword ptr [RSP + 0x28] MOV RDI,R13 MOV RSI,R14 MOV R12,qword ptr [RSP + 0x30] MOV RDX,R12 CALL 0x00107250 MOV byte ptr [R13 + R12*0x1 + -0x1],0x0 LAB_00120a2e: MOV RDI,R14 CALL 0x00120bd0 JMP 0x00120a3c LAB_00120a38: MOV R15,qword ptr [RSP] LAB_00120a3c: MOV dword ptr [R15],EAX JMP 0x00120995 LAB_00120a44: CALL 0x001072c0
/* nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long) */ void __thiscall nglog::tools::OpenObjectFileContainingPcAndGetStartAddress (tools *this,ulong param_1,ulong *param_2,ulong *param_3,char *param_4,ulong param_5) { int __fd; int __fd_00; int4 uVar1; int *piVar2; void *pvVar3; char *pcVar4; ulong uVar5; long lVar6; long lVar7; char *pcVar8; ulong uVar9; char *pcVar10; int iVar11; ulong uVar12; char *pcVar13; size_t __n; char *pcVar14; ulong local_4b8; int local_4b0 [2]; long local_4a8; long local_4a0; int local_478 [4]; short local_468; long local_458; ushort local_440; char local_438 [1032]; while (__fd = open("/proc/self/maps",0), __fd == -1) { piVar2 = __errno_location(); if (*piVar2 != 4) { *(int4 *)this = 0xffffffff; return; } } do { /* try { // try from 001206bd to 001206c8 has its CatchHandler @ 00120a61 */ __fd_00 = open("/proc/self/mem",0); if (__fd_00 != -1) { pcVar4 = local_438; uVar12 = 0; pcVar8 = pcVar4; goto LAB_00120705; } piVar2 = __errno_location(); } while (*piVar2 == 4); *(int4 *)this = 0xffffffff; goto LAB_0012099c; LAB_00120705: do { if (local_438 == pcVar8) { /* try { // try from 0012073d to 0012074e has its CatchHandler @ 00120a51 */ lVar6 = ReadFromOffset(__fd,local_438,0x400,uVar12); if (0 < lVar6) { uVar12 = uVar12 + lVar6; pcVar8 = local_438 + lVar6; pcVar13 = local_438; goto LAB_001207a8; } LAB_0012098b: *(int4 *)this = 0xffffffff; goto LAB_00120995; } pcVar13 = pcVar4 + 1; if (pcVar8 < pcVar13) { /* WARNING: Subroutine does not return */ abort(); } __n = (long)pcVar8 - (long)pcVar13; pvVar3 = memchr(pcVar13,10,__n); if (pvVar3 == (void *)0x0) { memmove(local_438,pcVar13,__n); /* try { // try from 00120789 to 00120795 has its CatchHandler @ 00120a51 */ lVar6 = ReadFromOffset(__fd,local_438 + __n,0x400 - __n,uVar12); if (lVar6 < 1) goto LAB_0012098b; uVar12 = uVar12 + lVar6; pcVar8 = local_438 + __n + lVar6; pcVar13 = local_438; } LAB_001207a8: pcVar4 = (char *)memchr(pcVar13,10,(long)pcVar8 - (long)pcVar13); if (pcVar4 == (char *)0x0) goto LAB_0012098b; *pcVar4 = '\0'; pcVar13 = (char *)GetHex(pcVar13,pcVar4,param_2); if ((((pcVar13 == pcVar4) || (*pcVar13 != '-')) || (pcVar13 = (char *)GetHex(pcVar13 + 1,pcVar4,&local_4b8), pcVar13 == pcVar4)) || ((*pcVar13 != ' ' || (pcVar14 = pcVar13 + 1, pcVar4 <= pcVar14)))) goto LAB_0012098b; uVar9 = (long)pcVar4 - (long)pcVar13; uVar5 = 1; do { if (pcVar13[uVar5] == ' ') { uVar9 = uVar5; pcVar10 = pcVar13 + uVar5; break; } uVar5 = uVar5 + 1; pcVar10 = pcVar4; } while (uVar9 != uVar5); if ((uVar9 < 5) || (pcVar10 == pcVar4)) goto LAB_0012098b; /* try { // try from 0012087e to 00120891 has its CatchHandler @ 00120a4d */ if (((*pcVar14 == 'r') && (lVar6 = ReadFromOffset(__fd_00,local_478,0x40,*param_2), lVar6 == 0x40)) && (local_478[0] == 0x464c457f)) { if (local_468 == 2) { *param_3 = 0; } else if (local_468 == 3) { *param_3 = *param_2; lVar6 = local_458; for (uVar9 = (ulong)local_440; uVar9 != 0; uVar9 = uVar9 - 1) { /* try { // try from 001208f4 to 00120904 has its CatchHandler @ 00120a53 */ lVar7 = ReadFromOffset(__fd_00,local_4b0,0x38,*param_2 + lVar6); if (((lVar7 == 0x38) && (local_4b0[0] == 1)) && (local_4a8 == 0)) { *param_3 = *param_2 - local_4a0; break; } lVar6 = lVar6 + 0x38; } } } } while (((param_1 < *param_2) || (local_4b8 <= param_1)) || ((*pcVar14 != 'r' || (pcVar13[3] != 'x')))); pcVar8 = (char *)GetHex(pcVar10 + 1,pcVar4,(ulong *)local_4b0); uVar1 = 0xffffffff; if ((pcVar8 != pcVar4) && (*pcVar8 == ' ')) { pcVar13 = pcVar8 + 1; pcVar14 = pcVar13; if (pcVar13 < pcVar4) { pcVar8 = pcVar4 + ~(ulong)pcVar8; iVar11 = 0; do { if (*pcVar13 == ' ') { iVar11 = iVar11 + 1; } else { pcVar14 = pcVar13; if (1 < iVar11) break; } pcVar13 = pcVar13 + 1; pcVar8 = pcVar8 + -1; pcVar14 = pcVar4; } while (pcVar8 != (char *)0x0); } if (pcVar14 != pcVar4) { strncpy(param_4,pcVar14,param_5); param_4[param_5 - 1] = '\0'; /* try { // try from 00120a2e to 00120a35 has its CatchHandler @ 00120a49 */ uVar1 = (anonymous_namespace):: FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned_long,unsigned_long&,unsigned_long&,char*,unsigned_long)::__2> (pcVar14); } } *(int4 *)this = uVar1; LAB_00120995: /* try { // try from 00120995 to 0012099b has its CatchHandler @ 00120a4b */ close(__fd_00); LAB_0012099c: /* try { // try from 0012099c to 001209a2 has its CatchHandler @ 00120a4f */ close(__fd); return; }
11,459
ma_check_index_cond
eloqsql/storage/maria/ma_key.c
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record) { check_result_t res= CHECK_POS; if (info->index_cond_func) { if (_ma_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ _ma_print_error(info, HA_ERR_CRASHED, 0); info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; res= CHECK_ERROR; } else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } return res; }
O3
c
ma_check_index_cond: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpq $0x0, 0x6f8(%rdi) je 0x37869 movq %rdx, %rcx movq %rdi, %rbx xorl %edx, %edx callq 0x37429 testl %eax, %eax je 0x37871 movl $0x7e, %r15d movq %rbx, %rdi movl $0x7e, %esi xorl %edx, %edx callq 0x369c6 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x37892 movl $0x1, %r14d jmp 0x378a5 movq 0x700(%rbx), %rdi callq *0x6f8(%rbx) movl %eax, %r14d cmpl $0x2, %eax jne 0x378a5 movl $0x2, %r14d movl $0x89, %r15d movq $-0x1, 0x98(%rbx) callq 0xa1afa movl %r15d, (%rax) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
ma_check_index_cond: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp qword ptr [rdi+6F8h], 0 jz short loc_37869 mov rcx, rdx mov rbx, rdi xor edx, edx call _ma_put_key_in_record test eax, eax jz short loc_37871 mov r15d, 7Eh ; '~' mov rdi, rbx mov esi, 7Eh ; '~' xor edx, edx call _ma_print_error mov r14d, 0FFFFFFFFh jmp short loc_37892 loc_37869: mov r14d, 1 jmp short loc_378A5 loc_37871: mov rdi, [rbx+700h] call qword ptr [rbx+6F8h] mov r14d, eax cmp eax, 2 jnz short loc_378A5 mov r14d, 2 mov r15d, 89h loc_37892: mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov [rax], r15d loc_378A5: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_check_index_cond(long long a1, long long a2, long long a3) { long long v3; // rbx long long v4; // rcx long long v5; // r8 int v6; // r9d int v7; // r15d long long v8; // rdx long long v9; // rcx long long v10; // r8 unsigned int v11; // r14d if ( *(_QWORD *)(a1 + 1784) ) { v3 = a1; if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) ) { v7 = 126; a2 = 126LL; ma_print_error((_DWORD *)a1, 126, 0, v4, v5, v6); v11 = -1; LABEL_7: *(_QWORD *)(v3 + 152) = -1LL; *(_DWORD *)my_thread_var(a1, a2, v8, v9, v10) = v7; return v11; } a1 = *(_QWORD *)(a1 + 1792); v11 = (*(long long ( **)(long long))(v3 + 1784))(a1); if ( v11 == 2 ) { v11 = 2; v7 = 137; goto LABEL_7; } } else { return 1; } return v11; }
ma_check_index_cond: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP qword ptr [RDI + 0x6f8],0x0 JZ 0x00137869 MOV RCX,RDX MOV RBX,RDI XOR EDX,EDX CALL 0x00137429 TEST EAX,EAX JZ 0x00137871 MOV R15D,0x7e MOV RDI,RBX MOV ESI,0x7e XOR EDX,EDX CALL 0x001369c6 MOV R14D,0xffffffff JMP 0x00137892 LAB_00137869: MOV R14D,0x1 JMP 0x001378a5 LAB_00137871: MOV RDI,qword ptr [RBX + 0x700] CALL qword ptr [RBX + 0x6f8] MOV R14D,EAX CMP EAX,0x2 JNZ 0x001378a5 MOV R14D,0x2 MOV R15D,0x89 LAB_00137892: MOV qword ptr [RBX + 0x98],-0x1 CALL 0x001a1afa MOV dword ptr [RAX],R15D LAB_001378a5: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int ma_check_index_cond(long param_1,int8 param_2,int8 param_3) { int iVar1; int4 *puVar2; int4 uVar3; if (*(long *)(param_1 + 0x6f8) == 0) { iVar1 = 1; } else { iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3); if (iVar1 == 0) { iVar1 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700)); if (iVar1 != 2) { return iVar1; } iVar1 = 2; uVar3 = 0x89; } else { uVar3 = 0x7e; _ma_print_error(param_1,0x7e,0); iVar1 = -1; } *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = uVar3; } return iVar1; }
11,460
my_make_scrambled_password
eloqsql/sql/password.c
void my_make_scrambled_password(char *to, const char *password, size_t pass_len) { uint8 hash_stage2[MY_SHA1_HASH_SIZE]; /* Two stage SHA1 hash of the password. */ compute_two_stage_sha1_hash(password, pass_len, (uint8 *) to, hash_stage2); /* convert hash_stage2 to hex string */ *to++= PVERSION41_CHAR; octet2hex(to, (const char*) hash_stage2, MY_SHA1_HASH_SIZE); }
O3
c
my_make_scrambled_password: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) callq 0x8a21c leaq -0x30(%rbp), %rdi movl $0x14, %edx movq %rbx, %rsi callq 0x8a21c movb $0x2a, (%rbx) xorl %eax, %eax leaq 0x2f770e(%rip), %rcx # 0x33e8a0 movzbl -0x30(%rbp,%rax), %edx movl %edx, %esi shrl $0x4, %esi movb (%rcx,%rsi), %sil movb %sil, 0x1(%rbx,%rax,2) andl $0xf, %edx movb (%rcx,%rdx), %dl movb %dl, 0x2(%rbx,%rax,2) incq %rax cmpq $0x14, %rax jne 0x47192 movb $0x0, 0x1(%rbx,%rax,2) movq %fs:0x28, %rax cmpq -0x10(%rbp), %rax jne 0x471d3 addq $0x28, %rsp popq %rbx popq %rbp retq callq 0x3a340
my_make_scrambled_password: push rbp mov rbp, rsp push rbx sub rsp, 28h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax call my_sha1 lea rdi, [rbp+var_30] mov edx, 14h mov rsi, rbx call my_sha1 mov byte ptr [rbx], 2Ah ; '*' xor eax, eax lea rcx, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" loc_47192: movzx edx, [rbp+rax+var_30] mov esi, edx shr esi, 4 mov sil, [rcx+rsi] mov [rbx+rax*2+1], sil and edx, 0Fh mov dl, [rcx+rdx] mov [rbx+rax*2+2], dl inc rax cmp rax, 14h jnz short loc_47192 mov byte ptr [rbx+rax*2+1], 0 mov rax, fs:28h cmp rax, [rbp+var_10] jnz short loc_471D3 add rsp, 28h pop rbx pop rbp retn loc_471D3: call ___stack_chk_fail
unsigned long long my_make_scrambled_password(_BYTE *a1) { long long i; // rax unsigned __int8 v2; // dl _BYTE v4[32]; // [rsp+0h] [rbp-30h] BYREF unsigned long long v5; // [rsp+20h] [rbp-10h] v5 = __readfsqword(0x28u); ((void (*)(void))my_sha1)(); my_sha1(v4, a1, 20LL); *a1 = 42; for ( i = 0LL; i != 20; ++i ) { v2 = v4[i]; a1[2 * i + 1] = dig_vec_upper[v2 >> 4]; a1[2 * i + 2] = dig_vec_upper[v2 & 0xF]; } a1[41] = 0; return __readfsqword(0x28u); }
my_make_scrambled_password: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX CALL 0x0018a21c LEA RDI,[RBP + -0x30] MOV EDX,0x14 MOV RSI,RBX CALL 0x0018a21c MOV byte ptr [RBX],0x2a XOR EAX,EAX LEA RCX,[0x43e8a0] LAB_00147192: MOVZX EDX,byte ptr [RBP + RAX*0x1 + -0x30] MOV ESI,EDX SHR ESI,0x4 MOV SIL,byte ptr [RCX + RSI*0x1] MOV byte ptr [RBX + RAX*0x2 + 0x1],SIL AND EDX,0xf MOV DL,byte ptr [RCX + RDX*0x1] MOV byte ptr [RBX + RAX*0x2 + 0x2],DL INC RAX CMP RAX,0x14 JNZ 0x00147192 MOV byte ptr [RBX + RAX*0x2 + 0x1],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001471d3 ADD RSP,0x28 POP RBX POP RBP RET LAB_001471d3: CALL 0x0013a340
void my_make_scrambled_password(int1 *param_1) { byte bVar1; long lVar2; long in_FS_OFFSET; byte local_38 [32]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); my_sha1(); my_sha1(local_38,param_1,0x14); *param_1 = 0x2a; lVar2 = 0; do { bVar1 = local_38[lVar2]; param_1[lVar2 * 2 + 1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[bVar1 >> 4]; param_1[lVar2 * 2 + 2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[bVar1 & 0xf]; lVar2 = lVar2 + 1; } while (lVar2 != 0x14); param_1[0x29] = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,461
skip_trailing_space
eloqsql/strings/strings_def.h
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) { const uchar *end= ptr + len; if (len > 20) { const uchar *end_words= (const uchar *)(intptr) (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); const uchar *start_words= (const uchar *)(intptr) ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT); DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT); if (end_words > ptr) { while (end > end_words && end[-1] == 0x20) end--; if (end[-1] == 0x20 && start_words < end_words) while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) end -= SIZEOF_INT; } } while (end > ptr && end[-1] == 0x20) end--; return (end); }
O0
c
skip_trailing_space: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x14, -0x10(%rbp) jbe 0x3cf9a movq -0x18(%rbp), %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x4, %rax subq $0x1, %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x3cefd movq -0x20(%rbp), %rax cmpq -0x8(%rbp), %rax jbe 0x3cf98 jmp 0x3cf0d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x29(%rbp) jbe 0x3cf2d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x3cf36 jmp 0x3cf44 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x3cf0d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax jne 0x3cf96 movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x3cf96 jmp 0x3cf5d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x2a(%rbp) jbe 0x3cf7d movq -0x18(%rbp), %rax cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 sete %al movb %al, -0x2a(%rbp) movb -0x2a(%rbp), %al testb $0x1, %al jne 0x3cf86 jmp 0x3cf94 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) jmp 0x3cf5d jmp 0x3cf96 jmp 0x3cf98 jmp 0x3cf9a jmp 0x3cf9c movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x8(%rbp), %rcx movb %al, -0x2b(%rbp) jbe 0x3cfbc movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x2b(%rbp) movb -0x2b(%rbp), %al testb $0x1, %al jne 0x3cfc5 jmp 0x3cfd3 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x3cf9c movq -0x18(%rbp), %rax popq %rbp retq nopl (%rax)
skip_trailing_space: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_18], rax cmp [rbp+var_10], 14h jbe loc_3CF9A mov rax, [rbp+var_18] shr rax, 2 shl rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_8] add rax, 4 sub rax, 1 shr rax, 2 shl rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_3CEFD: mov rax, [rbp+var_20] cmp rax, [rbp+var_8] jbe loc_3CF98 jmp short $+2 loc_3CF0D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_29], al jbe short loc_3CF2D mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_29], al loc_3CF2D: mov al, [rbp+var_29] test al, 1 jnz short loc_3CF36 jmp short loc_3CF44 loc_3CF36: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_3CF0D loc_3CF44: mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' jnz short loc_3CF96 mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_3CF96 jmp short $+2 loc_3CF5D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_2A], al jbe short loc_3CF7D mov rax, [rbp+var_18] cmp dword ptr [rax-4], 20202020h setz al mov [rbp+var_2A], al loc_3CF7D: mov al, [rbp+var_2A] test al, 1 jnz short loc_3CF86 jmp short loc_3CF94 loc_3CF86: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax jmp short loc_3CF5D loc_3CF94: jmp short $+2 loc_3CF96: jmp short $+2 loc_3CF98: jmp short $+2 loc_3CF9A: jmp short $+2 loc_3CF9C: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_8] mov [rbp+var_2B], al jbe short loc_3CFBC mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_2B], al loc_3CFBC: mov al, [rbp+var_2B] test al, 1 jnz short loc_3CFC5 jmp short loc_3CFD3 loc_3CFC5: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_3CF9C loc_3CFD3: mov rax, [rbp+var_18] pop rbp retn
unsigned long long skip_trailing_space(unsigned long long a1, unsigned long long a2) { bool v3; // [rsp+1h] [rbp-2Bh] bool v4; // [rsp+2h] [rbp-2Ah] bool v5; // [rsp+3h] [rbp-29h] unsigned long long v6; // [rsp+4h] [rbp-28h] unsigned long long v7; // [rsp+Ch] [rbp-20h] unsigned long long v8; // [rsp+14h] [rbp-18h] v8 = a2 + a1; if ( a2 > 0x14 ) { v7 = 4 * (v8 >> 2); v6 = 4 * ((a1 + 3) >> 2); if ( v7 > a1 ) { while ( 1 ) { v5 = 0; if ( v8 > v7 ) v5 = *(_BYTE *)(v8 - 1) == 32; if ( !v5 ) break; --v8; } if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 ) { while ( 1 ) { v4 = 0; if ( v8 > v6 ) v4 = *(_DWORD *)(v8 - 4) == 538976288; if ( !v4 ) break; v8 -= 4LL; } } } } while ( 1 ) { v3 = 0; if ( v8 > a1 ) v3 = *(_BYTE *)(v8 - 1) == 32; if ( !v3 ) break; --v8; } return v8; }
skip_trailing_space: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x14 JBE 0x0013cf9a MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 SUB RAX,0x1 SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0013cefd LAB_0013cefd: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x8] JBE 0x0013cf98 JMP 0x0013cf0d LAB_0013cf0d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x29],AL JBE 0x0013cf2d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_0013cf2d: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x0013cf36 JMP 0x0013cf44 LAB_0013cf36: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013cf0d LAB_0013cf44: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 JNZ 0x0013cf96 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0013cf96 JMP 0x0013cf5d LAB_0013cf5d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x2a],AL JBE 0x0013cf7d MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + -0x4],0x20202020 SETZ AL MOV byte ptr [RBP + -0x2a],AL LAB_0013cf7d: MOV AL,byte ptr [RBP + -0x2a] TEST AL,0x1 JNZ 0x0013cf86 JMP 0x0013cf94 LAB_0013cf86: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013cf5d LAB_0013cf94: JMP 0x0013cf96 LAB_0013cf96: JMP 0x0013cf98 LAB_0013cf98: JMP 0x0013cf9a LAB_0013cf9a: JMP 0x0013cf9c LAB_0013cf9c: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x2b],AL JBE 0x0013cfbc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b],AL LAB_0013cfbc: MOV AL,byte ptr [RBP + -0x2b] TEST AL,0x1 JNZ 0x0013cfc5 JMP 0x0013cfd3 LAB_0013cfc5: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013cf9c LAB_0013cfd3: MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
ulong skip_trailing_space(ulong param_1,ulong param_2) { ulong uVar1; ulong uVar2; bool bVar3; ulong local_20; local_20 = param_1 + param_2; if (0x14 < param_2) { uVar1 = local_20 & 0xfffffffffffffffc; uVar2 = param_1 + 3 & 0xfffffffffffffffc; if (param_1 < uVar1) { while( true ) { bVar3 = false; if (uVar1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) { while( true ) { bVar3 = false; if (uVar2 < local_20) { bVar3 = *(int *)(local_20 - 4) == 0x20202020; } if (!bVar3) break; local_20 = local_20 - 4; } } } } while( true ) { bVar3 = false; if (param_1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } return local_20; }
11,462
translog_scanner_init
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_scanner_init(LSN lsn, my_bool fixed_horizon, TRANSLOG_SCANNER_DATA *scanner, my_bool use_direct) { DBUG_ENTER("translog_scanner_init"); DBUG_PRINT("enter", ("Scanner: %p LSN: " LSN_FMT, scanner, LSN_IN_PARTS(lsn))); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); scanner->page_offset= LSN_OFFSET(lsn) % TRANSLOG_PAGE_SIZE; scanner->fixed_horizon= fixed_horizon; scanner->use_direct_link= use_direct; scanner->direct_link= NULL; scanner->horizon= translog_get_horizon(); DBUG_PRINT("info", ("horizon: " LSN_FMT, LSN_IN_PARTS(scanner->horizon))); /* lsn < horizon */ DBUG_ASSERT(lsn <= scanner->horizon); scanner->page_addr= lsn; scanner->page_addr-= scanner->page_offset; /*decrease offset */ if (translog_scanner_set_last_page(scanner)) DBUG_RETURN(1); if (translog_scanner_get_page(scanner)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
translog_scanner_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %cl, %al movb %sil, %cl movq %rdi, -0x10(%rbp) movb %cl, -0x11(%rbp) movq %rdx, -0x20(%rbp) movb %al, -0x21(%rbp) jmp 0x52cfd jmp 0x52cff jmp 0x52d01 movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax andq $0x1fff, %rax # imm = 0x1FFF movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x2028(%rax) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x202c(%rax) movb -0x21(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x202d(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x2020(%rax) callq 0x54b90 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x2008(%rax) jmp 0x52d5f jmp 0x52d61 jmp 0x52d63 movq -0x10(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x2000(%rax) movq -0x20(%rbp), %rax movl 0x2028(%rax), %eax movl %eax, %edx movq -0x20(%rbp), %rax movq 0x2000(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x2000(%rax) movq -0x20(%rbp), %rdi callq 0x54be0 cmpb $0x0, %al je 0x52da8 jmp 0x52da2 movb $0x1, -0x1(%rbp) jmp 0x52dc3 movq -0x20(%rbp), %rdi callq 0x54cb0 cmpb $0x0, %al je 0x52dbd jmp 0x52db7 movb $0x1, -0x1(%rbp) jmp 0x52dc3 jmp 0x52dbf movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_scanner_init: push rbp mov rbp, rsp sub rsp, 30h mov al, cl mov cl, sil mov [rbp+var_10], rdi mov [rbp+var_11], cl mov [rbp+var_20], rdx mov [rbp+var_21], al jmp short $+2 loc_52CFD: jmp short $+2 loc_52CFF: jmp short $+2 loc_52D01: mov rax, 0FFFFFFFFh and rax, [rbp+var_10] and rax, 1FFFh mov ecx, eax mov rax, [rbp+var_20] mov [rax+2028h], ecx mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+202Ch], cl mov cl, [rbp+var_21] mov rax, [rbp+var_20] mov [rax+202Dh], cl mov rax, [rbp+var_20] mov qword ptr [rax+2020h], 0 call translog_get_horizon mov rcx, rax mov rax, [rbp+var_20] mov [rax+2008h], rcx jmp short $+2 loc_52D5F: jmp short $+2 loc_52D61: jmp short $+2 loc_52D63: mov rcx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax+2000h], rcx mov rax, [rbp+var_20] mov eax, [rax+2028h] mov edx, eax mov rax, [rbp+var_20] mov rcx, [rax+2000h] sub rcx, rdx mov [rax+2000h], rcx mov rdi, [rbp+var_20] call translog_scanner_set_last_page cmp al, 0 jz short loc_52DA8 jmp short $+2 loc_52DA2: mov [rbp+var_1], 1 jmp short loc_52DC3 loc_52DA8: mov rdi, [rbp+var_20] call translog_scanner_get_page cmp al, 0 jz short loc_52DBD jmp short $+2 loc_52DB7: mov [rbp+var_1], 1 jmp short loc_52DC3 loc_52DBD: jmp short $+2 loc_52DBF: mov [rbp+var_1], 0 loc_52DC3: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool translog_scanner_init(long long a1, char a2, long long a3, char a4) { *(_DWORD *)(a3 + 8232) = a1 & 0x1FFF; *(_BYTE *)(a3 + 8236) = a2; *(_BYTE *)(a3 + 8237) = a4; *(_QWORD *)(a3 + 8224) = 0LL; *(_QWORD *)(a3 + 8200) = translog_get_horizon(); *(_QWORD *)(a3 + 0x2000) = a1; *(_QWORD *)(a3 + 0x2000) -= *(unsigned int *)(a3 + 8232); return (unsigned __int8)translog_scanner_set_last_page(a3) || (unsigned __int8)translog_scanner_get_page(a3) != 0; }
translog_scanner_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,CL MOV CL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],CL MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],AL JMP 0x00152cfd LAB_00152cfd: JMP 0x00152cff LAB_00152cff: JMP 0x00152d01 LAB_00152d01: MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] AND RAX,0x1fff MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x2028],ECX MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x202c],CL MOV CL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x202d],CL MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x2020],0x0 CALL 0x00154b90 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x2008],RCX JMP 0x00152d5f LAB_00152d5f: JMP 0x00152d61 LAB_00152d61: JMP 0x00152d63 LAB_00152d63: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x2000],RCX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x2028] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x2000] SUB RCX,RDX MOV qword ptr [RAX + 0x2000],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00154be0 CMP AL,0x0 JZ 0x00152da8 JMP 0x00152da2 LAB_00152da2: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00152dc3 LAB_00152da8: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00154cb0 CMP AL,0x0 JZ 0x00152dbd JMP 0x00152db7 LAB_00152db7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00152dc3 LAB_00152dbd: JMP 0x00152dbf LAB_00152dbf: MOV byte ptr [RBP + -0x1],0x0 LAB_00152dc3: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 translog_scanner_init(int8 param_1,int1 param_2,long param_3,int1 param_4) { char cVar1; int8 uVar2; int1 local_9; *(uint *)(param_3 + 0x2028) = (uint)param_1 & 0x1fff; *(int1 *)(param_3 + 0x202c) = param_2; *(int1 *)(param_3 + 0x202d) = param_4; *(int8 *)(param_3 + 0x2020) = 0; uVar2 = translog_get_horizon(); *(int8 *)(param_3 + 0x2008) = uVar2; *(int8 *)(param_3 + 0x2000) = param_1; *(ulong *)(param_3 + 0x2000) = *(long *)(param_3 + 0x2000) - (ulong)*(uint *)(param_3 + 0x2028); cVar1 = translog_scanner_set_last_page(param_3); if (cVar1 == '\0') { cVar1 = translog_scanner_get_page(param_3); if (cVar1 == '\0') { local_9 = 0; } else { local_9 = 1; } } else { local_9 = 1; } return local_9; }
11,463
ggml_mul_mat_id
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_mul_mat_id( struct ggml_context * ctx, struct ggml_tensor * as, struct ggml_tensor * b, struct ggml_tensor * ids) { GGML_ASSERT(!ggml_is_transposed(as)); GGML_ASSERT(ids->type == GGML_TYPE_I32); GGML_ASSERT(as->ne[3] == 1); // as is 3d (one matrix per expert) GGML_ASSERT(b->ne[3] == 1); // b is 3d GGML_ASSERT(ids->ne[2] == 1 && ids->ne[3] == 1); // ids is 2d GGML_ASSERT(ids->ne[1] == b->ne[2]); // must have an expert list per b row GGML_ASSERT(as->ne[0] == b->ne[0]); // can_mul_mat GGML_ASSERT(ids->ne[0] % b->ne[1] == 0); // can broadcast const int64_t ne[4] = { as->ne[1], ids->ne[0], b->ne[2], 1 }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); result->op = GGML_OP_MUL_MAT_ID; result->src[0] = as; result->src[1] = b; result->src[2] = ids; return result; }
O0
c
ggml_mul_mat_id: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x48c10 testb $0x1, %al jne 0x4ec17 jmp 0x4ec38 leaq 0x62999(%rip), %rdi # 0xb15b7 movl $0xab0, %esi # imm = 0xAB0 leaq 0x629df(%rip), %rdx # 0xb1609 leaq 0x62c89(%rip), %rcx # 0xb18ba movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rax cmpl $0x1a, (%rax) je 0x4ec62 leaq 0x6296f(%rip), %rdi # 0xb15b7 movl $0xab1, %esi # imm = 0xAB1 leaq 0x629b5(%rip), %rdx # 0xb1609 leaq 0x62c77(%rip), %rcx # 0xb18d2 movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rax cmpq $0x1, 0x28(%rax) je 0x4ec8e leaq 0x62943(%rip), %rdi # 0xb15b7 movl $0xab3, %esi # imm = 0xAB3 leaq 0x62989(%rip), %rdx # 0xb1609 leaq 0x62c66(%rip), %rcx # 0xb18ed movb $0x0, %al callq 0x48a00 movq -0x18(%rbp), %rax cmpq $0x1, 0x28(%rax) je 0x4ecba leaq 0x62917(%rip), %rdi # 0xb15b7 movl $0xab4, %esi # imm = 0xAB4 leaq 0x6295d(%rip), %rdx # 0xb1609 leaq 0x62c49(%rip), %rcx # 0xb18fc movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rax cmpq $0x1, 0x20(%rax) jne 0x4ecd0 movq -0x20(%rbp), %rax cmpq $0x1, 0x28(%rax) je 0x4ecf1 leaq 0x628e0(%rip), %rdi # 0xb15b7 movl $0xab5, %esi # imm = 0xAB5 leaq 0x62926(%rip), %rdx # 0xb1609 leaq 0x62c20(%rip), %rcx # 0xb190a movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq -0x18(%rbp), %rcx cmpq 0x20(%rcx), %rax je 0x4ed24 leaq 0x628ad(%rip), %rdi # 0xb15b7 movl $0xab6, %esi # imm = 0xAB6 leaq 0x628f3(%rip), %rdx # 0xb1609 leaq 0x62c10(%rip), %rcx # 0xb192d movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x4ed57 leaq 0x6287a(%rip), %rdi # 0xb15b7 movl $0xab7, %esi # imm = 0xAB7 leaq 0x628c0(%rip), %rdx # 0xb1609 leaq 0x62bf4(%rip), %rcx # 0xb1944 movb $0x0, %al callq 0x48a00 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx cqto idivq 0x18(%rcx) cmpq $0x0, %rdx je 0x4ed90 leaq 0x62841(%rip), %rdi # 0xb15b7 movl $0xab8, %esi # imm = 0xAB8 leaq 0x62887(%rip), %rdx # 0xb1609 leaq 0x62bd1(%rip), %rcx # 0xb195a movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq $0x1, -0x28(%rbp) movq -0x8(%rbp), %rdi leaq -0x40(%rbp), %rcx xorl %esi, %esi movl $0x4, %edx callq 0x42510 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movl $0x1b, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x18(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x20(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0xa8(%rax) movq -0x48(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ggml_mul_mat_id: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rdi, [rbp+var_10] call _ggml_is_transposed test al, 1 jnz short loc_4EC17 jmp short loc_4EC38 loc_4EC17: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB0h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsTranspos_1; "!ggml_is_transposed(as)" mov al, 0 call _ggml_abort loc_4EC38: mov rax, [rbp+var_20] cmp dword ptr [rax], 1Ah jz short loc_4EC62 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB1h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsTypeGgmlTyp; "ids->type == GGML_TYPE_I32" mov al, 0 call _ggml_abort loc_4EC62: mov rax, [rbp+var_10] cmp qword ptr [rax+28h], 1 jz short loc_4EC8E lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB3h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe31; "as->ne[3] == 1" mov al, 0 call _ggml_abort loc_4EC8E: mov rax, [rbp+var_18] cmp qword ptr [rax+28h], 1 jz short loc_4ECBA lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB4h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBNe31; "b->ne[3] == 1" mov al, 0 call _ggml_abort loc_4ECBA: mov rax, [rbp+var_20] cmp qword ptr [rax+20h], 1 jnz short loc_4ECD0 mov rax, [rbp+var_20] cmp qword ptr [rax+28h], 1 jz short loc_4ECF1 loc_4ECD0: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe21IdsNe31; "ids->ne[2] == 1 && ids->ne[3] == 1" mov al, 0 call _ggml_abort loc_4ECF1: mov rax, [rbp+var_20] mov rax, [rax+18h] mov rcx, [rbp+var_18] cmp rax, [rcx+20h] jz short loc_4ED24 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe1BNe2; "ids->ne[1] == b->ne[2]" mov al, 0 call _ggml_abort loc_4ED24: mov rax, [rbp+var_10] mov rax, [rax+10h] mov rcx, [rbp+var_18] cmp rax, [rcx+10h] jz short loc_4ED57 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB7h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe0BNe0; "as->ne[0] == b->ne[0]" mov al, 0 call _ggml_abort loc_4ED57: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_18] cqo idiv qword ptr [rcx+18h] cmp rdx, 0 jz short loc_4ED90 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0AB8h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe0BNe10; "ids->ne[0] % b->ne[1] == 0" mov al, 0 call _ggml_abort loc_4ED90: mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_30], rax mov [rbp+var_28], 1 mov rdi, [rbp+var_8] lea rcx, [rbp+var_40] xor esi, esi mov edx, 4 call _ggml_new_tensor mov [rbp+var_48], rax mov rax, [rbp+var_48] mov dword ptr [rax+50h], 1Bh mov rcx, [rbp+var_10] mov rax, [rbp+var_48] mov [rax+98h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_48] mov [rax+0A0h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_48] mov [rax+0A8h], rcx mov rax, [rbp+var_48] add rsp, 50h pop rbp retn
long long ggml_mul_mat_id(long long a1, long long a2, _QWORD *a3, long long a4) { long long result; // rax _QWORD v5[4]; // [rsp+10h] [rbp-40h] BYREF long long v6; // [rsp+30h] [rbp-20h] _QWORD *v7; // [rsp+38h] [rbp-18h] _QWORD *v8; // [rsp+40h] [rbp-10h] long long v9; // [rsp+48h] [rbp-8h] v9 = a1; v8 = (_QWORD *)a2; v7 = a3; v6 = a4; if ( ggml_is_transposed(a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2736, (long long)"GGML_ASSERT(%s) failed", "!ggml_is_transposed(as)"); if ( *(_DWORD *)v6 != 26 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2737, (long long)"GGML_ASSERT(%s) failed", "ids->type == GGML_TYPE_I32"); if ( v8[5] != 1LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2739, (long long)"GGML_ASSERT(%s) failed", "as->ne[3] == 1"); if ( v7[5] != 1LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2740, (long long)"GGML_ASSERT(%s) failed", "b->ne[3] == 1"); if ( *(_QWORD *)(v6 + 32) != 1LL || *(_QWORD *)(v6 + 40) != 1LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2741, (long long)"GGML_ASSERT(%s) failed", "ids->ne[2] == 1 && ids->ne[3] == 1"); if ( *(_QWORD *)(v6 + 24) != v7[4] ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2742, (long long)"GGML_ASSERT(%s) failed", "ids->ne[1] == b->ne[2]"); if ( v8[2] != v7[2] ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2743, (long long)"GGML_ASSERT(%s) failed", "as->ne[0] == b->ne[0]"); if ( *(long long *)(v6 + 16) % v7[3] ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 2744, (long long)"GGML_ASSERT(%s) failed", "ids->ne[0] % b->ne[1] == 0"); v5[0] = v8[3]; v5[1] = *(_QWORD *)(v6 + 16); v5[2] = v7[4]; v5[3] = 1LL; result = ggml_new_tensor(v9, 0, 4u, (long long)v5); *(_DWORD *)(result + 80) = 27; *(_QWORD *)(result + 152) = v8; *(_QWORD *)(result + 160) = v7; *(_QWORD *)(result + 168) = v6; return result; }
ggml_mul_mat_id: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00148c10 TEST AL,0x1 JNZ 0x0014ec17 JMP 0x0014ec38 LAB_0014ec17: LEA RDI,[0x1b15b7] MOV ESI,0xab0 LEA RDX,[0x1b1609] LEA RCX,[0x1b18ba] MOV AL,0x0 CALL 0x00148a00 LAB_0014ec38: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x1a JZ 0x0014ec62 LEA RDI,[0x1b15b7] MOV ESI,0xab1 LEA RDX,[0x1b1609] LEA RCX,[0x1b18d2] MOV AL,0x0 CALL 0x00148a00 LAB_0014ec62: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x28],0x1 JZ 0x0014ec8e LEA RDI,[0x1b15b7] MOV ESI,0xab3 LEA RDX,[0x1b1609] LEA RCX,[0x1b18ed] MOV AL,0x0 CALL 0x00148a00 LAB_0014ec8e: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x28],0x1 JZ 0x0014ecba LEA RDI,[0x1b15b7] MOV ESI,0xab4 LEA RDX,[0x1b1609] LEA RCX,[0x1b18fc] MOV AL,0x0 CALL 0x00148a00 LAB_0014ecba: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x20],0x1 JNZ 0x0014ecd0 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x28],0x1 JZ 0x0014ecf1 LAB_0014ecd0: LEA RDI,[0x1b15b7] MOV ESI,0xab5 LEA RDX,[0x1b1609] LEA RCX,[0x1b190a] MOV AL,0x0 CALL 0x00148a00 LAB_0014ecf1: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x20] JZ 0x0014ed24 LEA RDI,[0x1b15b7] MOV ESI,0xab6 LEA RDX,[0x1b1609] LEA RCX,[0x1b192d] MOV AL,0x0 CALL 0x00148a00 LAB_0014ed24: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x10] JZ 0x0014ed57 LEA RDI,[0x1b15b7] MOV ESI,0xab7 LEA RDX,[0x1b1609] LEA RCX,[0x1b1944] MOV AL,0x0 CALL 0x00148a00 LAB_0014ed57: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] CQO IDIV qword ptr [RCX + 0x18] CMP RDX,0x0 JZ 0x0014ed90 LEA RDI,[0x1b15b7] MOV ESI,0xab8 LEA RDX,[0x1b1609] LEA RCX,[0x1b195a] MOV AL,0x0 CALL 0x00148a00 LAB_0014ed90: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x28],0x1 MOV RDI,qword ptr [RBP + -0x8] LEA RCX,[RBP + -0x40] XOR ESI,ESI MOV EDX,0x4 CALL 0x00142510 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0x50],0x1b MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0xa0],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x50 POP RBP RET
long ggml_mul_mat_id(int8 param_1,long param_2,long param_3,int *param_4) { ulong uVar1; long lVar2; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int *local_28; long local_20; long local_18; int8 local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar1 = ggml_is_transposed(param_2); if ((uVar1 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab0,"GGML_ASSERT(%s) failed","!ggml_is_transposed(as)"); } if (*local_28 != 0x1a) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab1,"GGML_ASSERT(%s) failed","ids->type == GGML_TYPE_I32"); } if (*(long *)(local_18 + 0x28) != 1) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab3,"GGML_ASSERT(%s) failed","as->ne[3] == 1"); } if (*(long *)(local_20 + 0x28) != 1) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab4,"GGML_ASSERT(%s) failed","b->ne[3] == 1"); } if ((*(long *)(local_28 + 8) != 1) || (*(long *)(local_28 + 10) != 1)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab5,"GGML_ASSERT(%s) failed","ids->ne[2] == 1 && ids->ne[3] == 1"); } if (*(long *)(local_28 + 6) != *(long *)(local_20 + 0x20)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab6,"GGML_ASSERT(%s) failed","ids->ne[1] == b->ne[2]"); } if (*(long *)(local_18 + 0x10) != *(long *)(local_20 + 0x10)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab7,"GGML_ASSERT(%s) failed","as->ne[0] == b->ne[0]"); } if (*(long *)(local_28 + 4) % *(long *)(local_20 + 0x18) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0xab8,"GGML_ASSERT(%s) failed","ids->ne[0] % b->ne[1] == 0"); } local_48 = *(int8 *)(local_18 + 0x18); local_40 = *(int8 *)(local_28 + 4); local_38 = *(int8 *)(local_20 + 0x20); local_30 = 1; lVar2 = ggml_new_tensor(local_10,0,4,&local_48); *(int4 *)(lVar2 + 0x50) = 0x1b; *(long *)(lVar2 + 0x98) = local_18; *(long *)(lVar2 + 0xa0) = local_20; *(int **)(lVar2 + 0xa8) = local_28; return lVar2; }
11,464
ggml_mul_mat_id
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_mul_mat_id( struct ggml_context * ctx, struct ggml_tensor * as, struct ggml_tensor * b, struct ggml_tensor * ids) { GGML_ASSERT(!ggml_is_transposed(as)); GGML_ASSERT(ids->type == GGML_TYPE_I32); GGML_ASSERT(as->ne[3] == 1); // as is 3d (one matrix per expert) GGML_ASSERT(b->ne[3] == 1); // b is 3d GGML_ASSERT(ids->ne[2] == 1 && ids->ne[3] == 1); // ids is 2d GGML_ASSERT(ids->ne[1] == b->ne[2]); // must have an expert list per b row GGML_ASSERT(as->ne[0] == b->ne[0]); // can_mul_mat GGML_ASSERT(ids->ne[0] % b->ne[1] == 0); // can broadcast const int64_t ne[4] = { as->ne[1], ids->ne[0], b->ne[2], 1 }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); result->op = GGML_OP_MUL_MAT_ID; result->src[0] = as; result->src[1] = b; result->src[2] = ids; return result; }
O1
c
ggml_mul_mat_id: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq 0x30(%rsi), %rax cmpq 0x38(%rsi), %rax ja 0x1cfd9 movq %rcx, %rbx cmpl $0x1a, (%rcx) jne 0x1cff8 movq %rsi, %r15 cmpq $0x1, 0x28(%rsi) jne 0x1d017 movq %rdx, %r14 cmpq $0x1, 0x28(%rdx) jne 0x1d033 cmpq $0x1, 0x20(%rbx) jne 0x1cfba cmpq $0x1, 0x28(%rbx) jne 0x1cfba movq 0x20(%r14), %r8 cmpq %r8, 0x18(%rbx) jne 0x1d04f movq 0x10(%r15), %rax cmpq 0x10(%r14), %rax jne 0x1d06b movq 0x10(%rbx), %rsi movq %rsi, %rax cqto idivq 0x18(%r14) testq %rdx, %rdx jne 0x1d087 movq 0x18(%r15), %rax movq %rsp, %rcx movq %rax, (%rcx) movq %rsi, 0x8(%rcx) movq %r8, 0x10(%rcx) movq $0x1, 0x18(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1b871 movl $0x1b, 0x50(%rax) movq %r15, 0x98(%rax) movq %r14, 0xa0(%rax) movq %rbx, 0xa8(%rax) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x2f5ae(%rip), %rdi # 0x4c56f leaq 0x2f5f9(%rip), %rdx # 0x4c5c1 leaq 0x2f8f3(%rip), %rcx # 0x4c8c2 movl $0xab5, %esi # imm = 0xAB5 jmp 0x1d0a1 leaq 0x2f58f(%rip), %rdi # 0x4c56f leaq 0x2f5da(%rip), %rdx # 0x4c5c1 leaq 0x2f884(%rip), %rcx # 0x4c872 movl $0xab0, %esi # imm = 0xAB0 jmp 0x1d0a1 leaq 0x2f570(%rip), %rdi # 0x4c56f leaq 0x2f5bb(%rip), %rdx # 0x4c5c1 leaq 0x2f87d(%rip), %rcx # 0x4c88a movl $0xab1, %esi # imm = 0xAB1 jmp 0x1d0a1 leaq 0x2f551(%rip), %rdi # 0x4c56f leaq 0x2f59c(%rip), %rdx # 0x4c5c1 leaq 0x2f879(%rip), %rcx # 0x4c8a5 movl $0xab3, %esi # imm = 0xAB3 jmp 0x1d0a1 leaq 0x2f535(%rip), %rdi # 0x4c56f leaq 0x2f580(%rip), %rdx # 0x4c5c1 leaq 0x2f86c(%rip), %rcx # 0x4c8b4 movl $0xab4, %esi # imm = 0xAB4 jmp 0x1d0a1 leaq 0x2f519(%rip), %rdi # 0x4c56f leaq 0x2f564(%rip), %rdx # 0x4c5c1 leaq 0x2f881(%rip), %rcx # 0x4c8e5 movl $0xab6, %esi # imm = 0xAB6 jmp 0x1d0a1 leaq 0x2f4fd(%rip), %rdi # 0x4c56f leaq 0x2f548(%rip), %rdx # 0x4c5c1 leaq 0x2f87c(%rip), %rcx # 0x4c8fc movl $0xab7, %esi # imm = 0xAB7 jmp 0x1d0a1 leaq 0x2f4e1(%rip), %rdi # 0x4c56f leaq 0x2f52c(%rip), %rdx # 0x4c5c1 leaq 0x2f876(%rip), %rcx # 0x4c912 movl $0xab8, %esi # imm = 0xAB8 xorl %eax, %eax callq 0x18ce0
ggml_mul_mat_id: push r15 push r14 push rbx sub rsp, 20h mov rax, [rsi+30h] cmp rax, [rsi+38h] ja loc_1CFD9 mov rbx, rcx cmp dword ptr [rcx], 1Ah jnz loc_1CFF8 mov r15, rsi cmp qword ptr [rsi+28h], 1 jnz loc_1D017 mov r14, rdx cmp qword ptr [rdx+28h], 1 jnz loc_1D033 cmp qword ptr [rbx+20h], 1 jnz loc_1CFBA cmp qword ptr [rbx+28h], 1 jnz loc_1CFBA mov r8, [r14+20h] cmp [rbx+18h], r8 jnz loc_1D04F mov rax, [r15+10h] cmp rax, [r14+10h] jnz loc_1D06B mov rsi, [rbx+10h] mov rax, rsi cqo idiv qword ptr [r14+18h] test rdx, rdx jnz loc_1D087 mov rax, [r15+18h] mov rcx, rsp mov [rcx], rax mov [rcx+8], rsi mov [rcx+10h], r8 mov qword ptr [rcx+18h], 1 xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 1Bh mov [rax+98h], r15 mov [rax+0A0h], r14 mov [rax+0A8h], rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_1CFBA: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe21IdsNe31; "ids->ne[2] == 1 && ids->ne[3] == 1" mov esi, 0AB5h jmp loc_1D0A1 loc_1CFD9: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsTranspos_1; "!ggml_is_transposed(as)" mov esi, 0AB0h jmp loc_1D0A1 loc_1CFF8: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsTypeGgmlTyp; "ids->type == GGML_TYPE_I32" mov esi, 0AB1h jmp loc_1D0A1 loc_1D017: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe31; "as->ne[3] == 1" mov esi, 0AB3h jmp short loc_1D0A1 loc_1D033: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBNe31; "b->ne[3] == 1" mov esi, 0AB4h jmp short loc_1D0A1 loc_1D04F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe1BNe2; "ids->ne[1] == b->ne[2]" mov esi, 0AB6h jmp short loc_1D0A1 loc_1D06B: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe0BNe0; "as->ne[0] == b->ne[0]" mov esi, 0AB7h jmp short loc_1D0A1 loc_1D087: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe0BNe10; "ids->ne[0] % b->ne[1] == 0" mov esi, 0AB8h loc_1D0A1: xor eax, eax call _ggml_abort
long long ggml_mul_mat_id(long long a1, _QWORD *a2, _QWORD *a3, long long a4, long long a5, int a6, double a7) { long long v10; // rsi long long result; // rax const char *v12; // rcx int v13; // esi long long v14[7]; // [rsp+0h] [rbp-38h] BYREF if ( a2[6] > a2[7] ) { v12 = "!ggml_is_transposed(as)"; v13 = 2736; goto LABEL_19; } if ( *(_DWORD *)a4 != 26 ) { v12 = "ids->type == GGML_TYPE_I32"; v13 = 2737; goto LABEL_19; } if ( a2[5] != 1LL ) { v12 = "as->ne[3] == 1"; v13 = 2739; goto LABEL_19; } if ( a3[5] != 1LL ) { v12 = "b->ne[3] == 1"; v13 = 2740; goto LABEL_19; } if ( *(_QWORD *)(a4 + 32) != 1LL || *(_QWORD *)(a4 + 40) != 1LL ) { v12 = "ids->ne[2] == 1 && ids->ne[3] == 1"; v13 = 2741; goto LABEL_19; } a5 = a3[4]; if ( *(_QWORD *)(a4 + 24) != a5 ) { v12 = "ids->ne[1] == b->ne[2]"; v13 = 2742; goto LABEL_19; } if ( a2[2] != a3[2] ) { v12 = "as->ne[0] == b->ne[0]"; v13 = 2743; goto LABEL_19; } v10 = *(_QWORD *)(a4 + 16); if ( v10 % a3[3] ) { v12 = "ids->ne[0] % b->ne[1] == 0"; v13 = 2744; LABEL_19: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a5, a6); } v14[0] = a2[3]; v14[1] = v10; v14[2] = a5; v14[3] = 1LL; result = ggml_new_tensor_impl(a1, 0, 4, v14, 0LL, 0LL, a7); *(_DWORD *)(result + 80) = 27; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; *(_QWORD *)(result + 168) = a4; return result; }
ggml_mul_mat_id: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr [RSI + 0x30] CMP RAX,qword ptr [RSI + 0x38] JA 0x0011cfd9 MOV RBX,RCX CMP dword ptr [RCX],0x1a JNZ 0x0011cff8 MOV R15,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0011d017 MOV R14,RDX CMP qword ptr [RDX + 0x28],0x1 JNZ 0x0011d033 CMP qword ptr [RBX + 0x20],0x1 JNZ 0x0011cfba CMP qword ptr [RBX + 0x28],0x1 JNZ 0x0011cfba MOV R8,qword ptr [R14 + 0x20] CMP qword ptr [RBX + 0x18],R8 JNZ 0x0011d04f MOV RAX,qword ptr [R15 + 0x10] CMP RAX,qword ptr [R14 + 0x10] JNZ 0x0011d06b MOV RSI,qword ptr [RBX + 0x10] MOV RAX,RSI CQO IDIV qword ptr [R14 + 0x18] TEST RDX,RDX JNZ 0x0011d087 MOV RAX,qword ptr [R15 + 0x18] MOV RCX,RSP MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],RSI MOV qword ptr [RCX + 0x10],R8 MOV qword ptr [RCX + 0x18],0x1 XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011b871 MOV dword ptr [RAX + 0x50],0x1b MOV qword ptr [RAX + 0x98],R15 MOV qword ptr [RAX + 0xa0],R14 MOV qword ptr [RAX + 0xa8],RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0011cfba: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c8c2] MOV ESI,0xab5 JMP 0x0011d0a1 LAB_0011cfd9: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c872] MOV ESI,0xab0 JMP 0x0011d0a1 LAB_0011cff8: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c88a] MOV ESI,0xab1 JMP 0x0011d0a1 LAB_0011d017: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c8a5] MOV ESI,0xab3 JMP 0x0011d0a1 LAB_0011d033: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c8b4] MOV ESI,0xab4 JMP 0x0011d0a1 LAB_0011d04f: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c8e5] MOV ESI,0xab6 JMP 0x0011d0a1 LAB_0011d06b: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c8fc] MOV ESI,0xab7 JMP 0x0011d0a1 LAB_0011d087: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14c912] MOV ESI,0xab8 LAB_0011d0a1: XOR EAX,EAX CALL 0x00118ce0
void ggml_mul_mat_id(int8 param_1,long param_2,long param_3,int *param_4) { long lVar1; char *pcVar2; int8 uVar3; int8 local_38; long local_30; long local_28; int8 local_20; if (*(ulong *)(param_2 + 0x38) < *(ulong *)(param_2 + 0x30)) { pcVar2 = "!ggml_is_transposed(as)"; uVar3 = 0xab0; } else if (*param_4 == 0x1a) { if (*(long *)(param_2 + 0x28) == 1) { if (*(long *)(param_3 + 0x28) == 1) { if ((*(long *)(param_4 + 8) == 1) && (*(long *)(param_4 + 10) == 1)) { local_28 = *(long *)(param_3 + 0x20); if (*(long *)(param_4 + 6) == local_28) { if (*(long *)(param_2 + 0x10) == *(long *)(param_3 + 0x10)) { local_30 = *(long *)(param_4 + 4); if (local_30 % *(long *)(param_3 + 0x18) == 0) { local_38 = *(int8 *)(param_2 + 0x18); local_20 = 1; lVar1 = ggml_new_tensor_impl(param_1,0,4,&local_38,0,0); *(int4 *)(lVar1 + 0x50) = 0x1b; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; *(int **)(lVar1 + 0xa8) = param_4; return; } pcVar2 = "ids->ne[0] % b->ne[1] == 0"; uVar3 = 0xab8; } else { pcVar2 = "as->ne[0] == b->ne[0]"; uVar3 = 0xab7; } } else { pcVar2 = "ids->ne[1] == b->ne[2]"; uVar3 = 0xab6; } } else { pcVar2 = "ids->ne[2] == 1 && ids->ne[3] == 1"; uVar3 = 0xab5; } } else { pcVar2 = "b->ne[3] == 1"; uVar3 = 0xab4; } } else { pcVar2 = "as->ne[3] == 1"; uVar3 = 0xab3; } } else { pcVar2 = "ids->type == GGML_TYPE_I32"; uVar3 = 0xab1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
11,465
ggml_mul_mat_id
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_mul_mat_id( struct ggml_context * ctx, struct ggml_tensor * as, struct ggml_tensor * b, struct ggml_tensor * ids) { GGML_ASSERT(!ggml_is_transposed(as)); GGML_ASSERT(ids->type == GGML_TYPE_I32); GGML_ASSERT(as->ne[3] == 1); // as is 3d (one matrix per expert) GGML_ASSERT(b->ne[3] == 1); // b is 3d GGML_ASSERT(ids->ne[2] == 1 && ids->ne[3] == 1); // ids is 2d GGML_ASSERT(ids->ne[1] == b->ne[2]); // must have an expert list per b row GGML_ASSERT(as->ne[0] == b->ne[0]); // can_mul_mat GGML_ASSERT(ids->ne[0] % b->ne[1] == 0); // can broadcast const int64_t ne[4] = { as->ne[1], ids->ne[0], b->ne[2], 1 }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne); result->op = GGML_OP_MUL_MAT_ID; result->src[0] = as; result->src[1] = b; result->src[2] = ids; return result; }
O3
c
ggml_mul_mat_id: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq 0x30(%rsi), %rax cmpq 0x38(%rsi), %rax ja 0x1bcf0 movq %rcx, %rbx cmpl $0x1a, (%rcx) jne 0x1bd0f movq %rsi, %r15 cmpq $0x1, 0x28(%rsi) jne 0x1bd2e movq %rdx, %r14 cmpq $0x1, 0x28(%rdx) jne 0x1bd4a cmpq $0x1, 0x20(%rbx) jne 0x1bcd1 cmpq $0x1, 0x28(%rbx) jne 0x1bcd1 movq 0x18(%rbx), %r8 cmpq 0x20(%r14), %r8 jne 0x1bd66 movq 0x10(%r15), %rax cmpq 0x10(%r14), %rax jne 0x1bd82 movq 0x10(%rbx), %rsi movq %rsi, %rax cqto idivq 0x18(%r14) testq %rdx, %rdx jne 0x1bd9e movq 0x18(%r15), %rax movq %rsp, %rcx movq %rax, (%rcx) movq %rsi, 0x8(%rcx) movq %r8, 0x10(%rcx) movq $0x1, 0x18(%rcx) xorl %esi, %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f movl $0x1b, 0x50(%rax) movq %r15, 0x98(%rax) movq %r14, 0xa0(%rax) movq %rbx, 0xa8(%rax) addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x3093b(%rip), %rdi # 0x4c613 leaq 0x30986(%rip), %rdx # 0x4c665 leaq 0x30c80(%rip), %rcx # 0x4c966 movl $0xab5, %esi # imm = 0xAB5 jmp 0x1bdb8 leaq 0x3091c(%rip), %rdi # 0x4c613 leaq 0x30967(%rip), %rdx # 0x4c665 leaq 0x30c11(%rip), %rcx # 0x4c916 movl $0xab0, %esi # imm = 0xAB0 jmp 0x1bdb8 leaq 0x308fd(%rip), %rdi # 0x4c613 leaq 0x30948(%rip), %rdx # 0x4c665 leaq 0x30c0a(%rip), %rcx # 0x4c92e movl $0xab1, %esi # imm = 0xAB1 jmp 0x1bdb8 leaq 0x308de(%rip), %rdi # 0x4c613 leaq 0x30929(%rip), %rdx # 0x4c665 leaq 0x30c06(%rip), %rcx # 0x4c949 movl $0xab3, %esi # imm = 0xAB3 jmp 0x1bdb8 leaq 0x308c2(%rip), %rdi # 0x4c613 leaq 0x3090d(%rip), %rdx # 0x4c665 leaq 0x30bf9(%rip), %rcx # 0x4c958 movl $0xab4, %esi # imm = 0xAB4 jmp 0x1bdb8 leaq 0x308a6(%rip), %rdi # 0x4c613 leaq 0x308f1(%rip), %rdx # 0x4c665 leaq 0x30c0e(%rip), %rcx # 0x4c989 movl $0xab6, %esi # imm = 0xAB6 jmp 0x1bdb8 leaq 0x3088a(%rip), %rdi # 0x4c613 leaq 0x308d5(%rip), %rdx # 0x4c665 leaq 0x30c09(%rip), %rcx # 0x4c9a0 movl $0xab7, %esi # imm = 0xAB7 jmp 0x1bdb8 leaq 0x3086e(%rip), %rdi # 0x4c613 leaq 0x308b9(%rip), %rdx # 0x4c665 leaq 0x30c03(%rip), %rcx # 0x4c9b6 movl $0xab8, %esi # imm = 0xAB8 xorl %eax, %eax callq 0x17cd0
ggml_mul_mat_id: push r15 push r14 push rbx sub rsp, 20h mov rax, [rsi+30h] cmp rax, [rsi+38h] ja loc_1BCF0 mov rbx, rcx cmp dword ptr [rcx], 1Ah jnz loc_1BD0F mov r15, rsi cmp qword ptr [rsi+28h], 1 jnz loc_1BD2E mov r14, rdx cmp qword ptr [rdx+28h], 1 jnz loc_1BD4A cmp qword ptr [rbx+20h], 1 jnz loc_1BCD1 cmp qword ptr [rbx+28h], 1 jnz loc_1BCD1 mov r8, [rbx+18h] cmp r8, [r14+20h] jnz loc_1BD66 mov rax, [r15+10h] cmp rax, [r14+10h] jnz loc_1BD82 mov rsi, [rbx+10h] mov rax, rsi cqo idiv qword ptr [r14+18h] test rdx, rdx jnz loc_1BD9E mov rax, [r15+18h] mov rcx, rsp mov [rcx], rax mov [rcx+8], rsi mov [rcx+10h], r8 mov qword ptr [rcx+18h], 1 xor esi, esi mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 1Bh mov [rax+98h], r15 mov [rax+0A0h], r14 mov [rax+0A8h], rbx add rsp, 20h pop rbx pop r14 pop r15 retn loc_1BCD1: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe21IdsNe31; "ids->ne[2] == 1 && ids->ne[3] == 1" mov esi, 0AB5h jmp loc_1BDB8 loc_1BCF0: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsTranspos_1; "!ggml_is_transposed(as)" mov esi, 0AB0h jmp loc_1BDB8 loc_1BD0F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsTypeGgmlTyp; "ids->type == GGML_TYPE_I32" mov esi, 0AB1h jmp loc_1BDB8 loc_1BD2E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe31; "as->ne[3] == 1" mov esi, 0AB3h jmp short loc_1BDB8 loc_1BD4A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBNe31; "b->ne[3] == 1" mov esi, 0AB4h jmp short loc_1BDB8 loc_1BD66: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe1BNe2; "ids->ne[1] == b->ne[2]" mov esi, 0AB6h jmp short loc_1BDB8 loc_1BD82: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAsNe0BNe0; "as->ne[0] == b->ne[0]" mov esi, 0AB7h jmp short loc_1BDB8 loc_1BD9E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdsNe0BNe10; "ids->ne[0] % b->ne[1] == 0" mov esi, 0AB8h loc_1BDB8: xor eax, eax call _ggml_abort
long long ggml_mul_mat_id(long long a1, _QWORD *a2, _QWORD *a3, long long a4, long long a5, int a6, double a7) { long long v10; // rsi long long result; // rax const char *v12; // rcx int v13; // esi long long v14[7]; // [rsp+0h] [rbp-38h] BYREF if ( a2[6] > a2[7] ) { v12 = "!ggml_is_transposed(as)"; v13 = 2736; goto LABEL_19; } if ( *(_DWORD *)a4 != 26 ) { v12 = "ids->type == GGML_TYPE_I32"; v13 = 2737; goto LABEL_19; } if ( a2[5] != 1LL ) { v12 = "as->ne[3] == 1"; v13 = 2739; goto LABEL_19; } if ( a3[5] != 1LL ) { v12 = "b->ne[3] == 1"; v13 = 2740; goto LABEL_19; } if ( *(_QWORD *)(a4 + 32) != 1LL || *(_QWORD *)(a4 + 40) != 1LL ) { v12 = "ids->ne[2] == 1 && ids->ne[3] == 1"; v13 = 2741; goto LABEL_19; } a5 = *(_QWORD *)(a4 + 24); if ( a5 != a3[4] ) { v12 = "ids->ne[1] == b->ne[2]"; v13 = 2742; goto LABEL_19; } if ( a2[2] != a3[2] ) { v12 = "as->ne[0] == b->ne[0]"; v13 = 2743; goto LABEL_19; } v10 = *(_QWORD *)(a4 + 16); if ( v10 % a3[3] ) { v12 = "ids->ne[0] % b->ne[1] == 0"; v13 = 2744; LABEL_19: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a5, a6); } v14[0] = a2[3]; v14[1] = v10; v14[2] = a5; v14[3] = 1LL; result = ggml_new_tensor_impl(a1, 0, 4u, v14, 0LL, 0LL, a7); *(_DWORD *)(result + 80) = 27; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; *(_QWORD *)(result + 168) = a4; return result; }
ggml_mul_mat_id: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr [RSI + 0x30] CMP RAX,qword ptr [RSI + 0x38] JA 0x0011bcf0 MOV RBX,RCX CMP dword ptr [RCX],0x1a JNZ 0x0011bd0f MOV R15,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0011bd2e MOV R14,RDX CMP qword ptr [RDX + 0x28],0x1 JNZ 0x0011bd4a CMP qword ptr [RBX + 0x20],0x1 JNZ 0x0011bcd1 CMP qword ptr [RBX + 0x28],0x1 JNZ 0x0011bcd1 MOV R8,qword ptr [RBX + 0x18] CMP R8,qword ptr [R14 + 0x20] JNZ 0x0011bd66 MOV RAX,qword ptr [R15 + 0x10] CMP RAX,qword ptr [R14 + 0x10] JNZ 0x0011bd82 MOV RSI,qword ptr [RBX + 0x10] MOV RAX,RSI CQO IDIV qword ptr [R14 + 0x18] TEST RDX,RDX JNZ 0x0011bd9e MOV RAX,qword ptr [R15 + 0x18] MOV RCX,RSP MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],RSI MOV qword ptr [RCX + 0x10],R8 MOV qword ptr [RCX + 0x18],0x1 XOR ESI,ESI MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f MOV dword ptr [RAX + 0x50],0x1b MOV qword ptr [RAX + 0x98],R15 MOV qword ptr [RAX + 0xa0],R14 MOV qword ptr [RAX + 0xa8],RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0011bcd1: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c966] MOV ESI,0xab5 JMP 0x0011bdb8 LAB_0011bcf0: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c916] MOV ESI,0xab0 JMP 0x0011bdb8 LAB_0011bd0f: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c92e] MOV ESI,0xab1 JMP 0x0011bdb8 LAB_0011bd2e: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c949] MOV ESI,0xab3 JMP 0x0011bdb8 LAB_0011bd4a: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c958] MOV ESI,0xab4 JMP 0x0011bdb8 LAB_0011bd66: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c989] MOV ESI,0xab6 JMP 0x0011bdb8 LAB_0011bd82: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c9a0] MOV ESI,0xab7 JMP 0x0011bdb8 LAB_0011bd9e: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14c9b6] MOV ESI,0xab8 LAB_0011bdb8: XOR EAX,EAX CALL 0x00117cd0
void ggml_mul_mat_id(int8 param_1,long param_2,long param_3,int *param_4) { long lVar1; char *pcVar2; int8 uVar3; int8 local_38; long local_30; long local_28; int8 local_20; if (*(ulong *)(param_2 + 0x38) < *(ulong *)(param_2 + 0x30)) { pcVar2 = "!ggml_is_transposed(as)"; uVar3 = 0xab0; } else if (*param_4 == 0x1a) { if (*(long *)(param_2 + 0x28) == 1) { if (*(long *)(param_3 + 0x28) == 1) { if ((*(long *)(param_4 + 8) == 1) && (*(long *)(param_4 + 10) == 1)) { local_28 = *(long *)(param_4 + 6); if (local_28 == *(long *)(param_3 + 0x20)) { if (*(long *)(param_2 + 0x10) == *(long *)(param_3 + 0x10)) { local_30 = *(long *)(param_4 + 4); if (local_30 % *(long *)(param_3 + 0x18) == 0) { local_38 = *(int8 *)(param_2 + 0x18); local_20 = 1; lVar1 = ggml_new_tensor_impl(param_1,0,4,&local_38,0,0); *(int4 *)(lVar1 + 0x50) = 0x1b; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; *(int **)(lVar1 + 0xa8) = param_4; return; } pcVar2 = "ids->ne[0] % b->ne[1] == 0"; uVar3 = 0xab8; } else { pcVar2 = "as->ne[0] == b->ne[0]"; uVar3 = 0xab7; } } else { pcVar2 = "ids->ne[1] == b->ne[2]"; uVar3 = 0xab6; } } else { pcVar2 = "ids->ne[2] == 1 && ids->ne[3] == 1"; uVar3 = 0xab5; } } else { pcVar2 = "b->ne[3] == 1"; uVar3 = 0xab4; } } else { pcVar2 = "as->ne[3] == 1"; uVar3 = 0xab3; } } else { pcVar2 = "ids->type == GGML_TYPE_I32"; uVar3 = 0xab1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
11,466
nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type)
llama.cpp/common/./json.hpp
static const char* token_type_name(const token_type t) noexcept { switch (t) { case token_type::uninitialized: return "<uninitialized>"; case token_type::literal_true: return "true literal"; case token_type::literal_false: return "false literal"; case token_type::literal_null: return "null literal"; case token_type::value_string: return "string literal"; case token_type::value_unsigned: case token_type::value_integer: case token_type::value_float: return "number literal"; case token_type::begin_array: return "'['"; case token_type::begin_object: return "'{'"; case token_type::end_array: return "']'"; case token_type::end_object: return "'}'"; case token_type::name_separator: return "':'"; case token_type::value_separator: return "','"; case token_type::parse_error: return "<parse error>"; case token_type::end_of_input: return "end of input"; case token_type::literal_or_value: return "'[', '{', or a literal"; // LCOV_EXCL_START default: // catch non-enum values return "unknown token"; // LCOV_EXCL_STOP } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type): cmpl $0x10, %edi ja 0x32af8 movl %edi, %eax leaq 0x96b88(%rip), %rcx # 0xc9678 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x9456a(%rip), %rax # 0xc7069 retq
_ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE: cmp edi, 10h ja short loc_32AF8 mov eax, edi lea rcx, unk_C9678 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_32AF8: lea rax, aUnknownToken; "unknown token" retn
const char * nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name( unsigned int a1) { if ( a1 > 0x10 ) return "unknown token"; else return (char *)dword_C9678 + dword_C9678[a1]; }
token_type_name: CMP EDI,0x10 JA 0x00132af8 MOV EAX,EDI LEA RCX,[0x1c9678] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_00132af8: LEA RAX,[0x1c7069] RET
/* nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type) */ char * nlohmann::json_abi_v3_11_3::detail:: lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(uint param_1) { if (param_1 < 0x11) { return &DAT_001c9678 + *(int *)(&DAT_001c9678 + (ulong)param_1 * 4); } return "unknown token"; }
11,467
HttpClient::generate_progress_bar(int, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/examples/run/run.cpp
static std::string generate_progress_bar(int progress_bar_width, curl_off_t percentage, std::string & progress_bar) { const curl_off_t pos = (percentage * progress_bar_width) / 100; for (int i = 0; i < progress_bar_width; ++i) { progress_bar.append((i < pos) ? "█" : " "); } return progress_bar; }
O3
cpp
HttpClient::generate_progress_bar(int, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rcx movq %rdi, (%rsp) movslq %esi, %rdi imulq %rdi, %rcx movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B movq %rcx, %rax imulq %rdx testl %edi, %edi jle 0x3045c movq %rdx, %r15 addq %rcx, %r15 movq %r15, %rax shrq $0x3f, %rax sarq $0x6, %r15 addq %rax, %r15 movl %esi, %r12d xorl %r13d, %r13d leaq 0x9ab3f(%rip), %rbp # 0xcaf7a leaq 0xa3b16(%rip), %rbx # 0xd3f58 cmpq %r13, %r15 movq %rbx, %rsi cmovgq %rbp, %rsi movq %r14, %rdi callq 0x1d920 incq %r13 cmpq %r13, %r12 jne 0x30442 movq (%rsp), %rbx leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x2398e movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10HttpClient21generate_progress_barEilRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rcx, rdx mov [rsp+38h+var_38], rdi movsxd rdi, esi imul rcx, rdi mov rdx, 0A3D70A3D70A3D70Bh mov rax, rcx imul rdx test edi, edi jle short loc_3045C mov r15, rdx add r15, rcx mov rax, r15 shr rax, 3Fh sar r15, 6 add r15, rax mov r12d, esi xor r13d, r13d lea rbp, unk_CAF7A lea rbx, asc_D3F53+5; " " loc_30442: cmp r15, r13 mov rsi, rbx cmovg rsi, rbp mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) inc r13 cmp r12, r13 jnz short loc_30442 loc_3045C: mov rbx, [rsp+38h+var_38] lea rax, [rbx+10h] mov [rbx], rax mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * HttpClient::generate_progress_bar(_QWORD *a1, int a2, long long a3, long long a4) { long long v5; // r15 long long v6; // r12 long long i; // r13 char *v8; // rsi if ( a2 > 0 ) { v5 = a2 * a3 / 100; v6 = (unsigned int)a2; for ( i = 0LL; i != v6; ++i ) { v8 = " "; if ( v5 > i ) v8 = (char *)&unk_CAF7A; std::string::append(a4, v8); } } *a1 = a1 + 2; std::string::_M_construct<char *>((long long)a1, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); return a1; }
generate_progress_bar: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RCX,RDX MOV qword ptr [RSP],RDI MOVSXD RDI,ESI IMUL RCX,RDI MOV RDX,-0x5c28f5c28f5c28f5 MOV RAX,RCX IMUL RDX TEST EDI,EDI JLE 0x0013045c MOV R15,RDX ADD R15,RCX MOV RAX,R15 SHR RAX,0x3f SAR R15,0x6 ADD R15,RAX MOV R12D,ESI XOR R13D,R13D LEA RBP,[0x1caf7a] LEA RBX,[0x1d3f58] LAB_00130442: CMP R15,R13 MOV RSI,RBX CMOVG RSI,RBP MOV RDI,R14 CALL 0x0011d920 INC R13 CMP R12,R13 JNZ 0x00130442 LAB_0013045c: MOV RBX,qword ptr [RSP] LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI MOV RDI,RBX CALL 0x0012398e MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* HttpClient::generate_progress_bar(int, long, std::__cxx11::string&) */ HttpClient * __thiscall HttpClient::generate_progress_bar(HttpClient *this,int param_1,long param_2,string *param_3) { ulong uVar1; if (0 < param_1) { uVar1 = 0; do { std::__cxx11::string::append((char *)param_3); uVar1 = uVar1 + 1; } while ((uint)param_1 != uVar1); } *(HttpClient **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); return this; }
11,468
map_decref_record
bluesky950520[P]quickjs/quickjs.c
static void map_decref_record(JSRuntime *rt, JSMapRecord *mr) { if (--mr->ref_count == 0) { /* the record can be safely removed */ assert(mr->empty); list_del(&mr->link); js_free_rt(rt, mr); } }
O2
c
map_decref_record: decl (%rsi) je 0x37dec retq movq 0x10(%rsi), %rax movq 0x18(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rsi) jmp 0x1ac7b
map_decref_record: dec dword ptr [rsi] jz short loc_37DEC retn loc_37DEC: mov rax, [rsi+10h] mov rcx, [rsi+18h] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi+10h], xmm0 jmp js_free_rt
long long map_decref_record(long long a1, long long a2) { long long v3; // rax _QWORD *v4; // rcx long long result; // rax if ( (*(_DWORD *)a2)-- == 1 ) { v3 = *(_QWORD *)(a2 + 16); v4 = *(_QWORD **)(a2 + 24); *(_QWORD *)(v3 + 8) = v4; *v4 = v3; *(_OWORD *)(a2 + 16) = 0LL; return js_free_rt(a1, a2); } return result; }
map_decref_record: DEC dword ptr [RSI] JZ 0x00137dec RET LAB_00137dec: MOV RAX,qword ptr [RSI + 0x10] MOV RCX,qword ptr [RSI + 0x18] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 JMP 0x0011ac7b
void map_decref_record(int8 param_1,int *param_2) { long lVar1; long *plVar2; *param_2 = *param_2 + -1; if (*param_2 != 0) { return; } lVar1 = *(long *)(param_2 + 4); plVar2 = *(long **)(param_2 + 6); *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; param_2[4] = 0; param_2[5] = 0; param_2[6] = 0; param_2[7] = 0; js_free_rt(); return; }
11,469
google::protobuf::FieldOptions::InternalSwap(google::protobuf::FieldOptions*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void FieldOptions::InternalSwap(FieldOptions* other) { using std::swap; _impl_._extensions_.InternalSwap(&other->_impl_._extensions_); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.uninterpreted_option_.InternalSwap(&other->_impl_.uninterpreted_option_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.weak_) + sizeof(FieldOptions::_impl_.weak_) - PROTOBUF_FIELD_OFFSET(FieldOptions, _impl_.ctype_)>( reinterpret_cast<char*>(&_impl_.ctype_), reinterpret_cast<char*>(&other->_impl_.ctype_)); }
O0
cpp
google::protobuf::FieldOptions::InternalSwap(google::protobuf::FieldOptions*): subq $0x48, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rdi movq %rdi, (%rsp) addq $0x10, %rdi movq 0x8(%rsp), %rsi addq $0x10, %rsi callq 0x19c030 movq (%rsp), %rcx addq $0x8, %rcx movq 0x8(%rsp), %rax addq $0x8, %rax movq %rcx, 0x20(%rsp) movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xde020 movq (%rsp), %rax addq $0x10, %rax addq $0x18, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rdi movslq 0x3c(%rsp), %rax shlq $0x2, %rax addq %rax, %rdi movq 0x8(%rsp), %rax addq $0x10, %rax addq $0x18, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x30(%rsp), %rsi movslq 0x2c(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi callq 0xd5790 movq (%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi movq 0x8(%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi callq 0xd6ef0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x38, %rdi movq 0x8(%rsp), %rsi addq $0x10, %rsi addq $0x38, %rsi callq 0xda9c0 addq $0x48, %rsp retq nop
_ZN6google8protobuf12FieldOptions12InternalSwapEPS1_: sub rsp, 48h mov [rsp+48h+var_38], rdi mov [rsp+48h+var_40], rsi mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_48], rdi add rdi, 10h; this mov rsi, [rsp+48h+var_40] add rsi, 10h; google::protobuf::internal::ExtensionSet * call _ZN6google8protobuf8internal12ExtensionSet12InternalSwapEPS2_; google::protobuf::internal::ExtensionSet::InternalSwap(google::protobuf::internal::ExtensionSet*) mov rcx, [rsp+48h+var_48] add rcx, 8 mov rax, [rsp+48h+var_40] add rax, 8 mov [rsp+48h+var_28], rcx mov [rsp+48h+var_30], rax mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_30] call _ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rax, [rsp+48h+var_48] add rax, 10h add rax, 18h mov [rsp+48h+var_8], rax mov [rsp+48h+var_C], 0 mov rdi, [rsp+48h+var_8] movsxd rax, [rsp+48h+var_C] shl rax, 2 add rdi, rax mov rax, [rsp+48h+var_40] add rax, 10h add rax, 18h mov [rsp+48h+var_18], rax mov [rsp+48h+var_1C], 0 mov rsi, [rsp+48h+var_18] movsxd rax, [rsp+48h+var_1C] shl rax, 2 add rsi, rax call _ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rdi, [rsp+48h+var_48] add rdi, 10h add rdi, 20h ; ' ' mov rsi, [rsp+48h+var_40] add rsi, 10h add rsi, 20h ; ' ' call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE12InternalSwapEPS3_; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::InternalSwap(google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>*) mov rdi, [rsp+48h+var_48] add rdi, 10h add rdi, 38h ; '8' mov rsi, [rsp+48h+var_40] add rsi, 10h add rsi, 38h ; '8' call _ZN6google8protobuf8internal7memswapILi13EEENSt9enable_ifIXaageT_Lm8EltT_Li16EEvE4typeEPcS6_; google::protobuf::internal::memswap<13>(char *,char *) add rsp, 48h retn
long long google::protobuf::FieldOptions::InternalSwap( google::protobuf::FieldOptions *this, google::protobuf::FieldOptions *a2) { google::protobuf::internal::ExtensionSet::InternalSwap( (google::protobuf::FieldOptions *)((char *)this + 16), (google::protobuf::FieldOptions *)((char *)a2 + 16)); std::swap<long>((char *)this + 8, (char *)a2 + 8); std::swap<unsigned int>((char *)this + 40, (char *)a2 + 40); google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::InternalSwap( (char *)this + 48, (char *)a2 + 48); return google::protobuf::internal::memswap<13>((char *)this + 72, (char *)a2 + 72); }
InternalSwap: SUB RSP,0x48 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RDI ADD RDI,0x10 MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x10 CALL 0x0029c030 MOV RCX,qword ptr [RSP] ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001de020 MOV RAX,qword ptr [RSP] ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x3c],0x0 MOV RDI,qword ptr [RSP + 0x40] MOVSXD RAX,dword ptr [RSP + 0x3c] SHL RAX,0x2 ADD RDI,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x10 ADD RAX,0x18 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 MOV RSI,qword ptr [RSP + 0x30] MOVSXD RAX,dword ptr [RSP + 0x2c] SHL RAX,0x2 ADD RSI,RAX CALL 0x001d5790 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x10 ADD RSI,0x20 CALL 0x001d6ef0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x38 MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x10 ADD RSI,0x38 CALL 0x001da9c0 ADD RSP,0x48 RET
/* google::protobuf::FieldOptions::InternalSwap(google::protobuf::FieldOptions*) */ void __thiscall google::protobuf::FieldOptions::InternalSwap(FieldOptions *this,FieldOptions *param_1) { internal::ExtensionSet::InternalSwap ((ExtensionSet *)(this + 0x10),(ExtensionSet *)(param_1 + 0x10)); std::swap<long>((long *)(this + 8),(long *)(param_1 + 8)); std::swap<unsigned_int>((uint *)(this + 0x28),(uint *)(param_1 + 0x28)); RepeatedPtrField<google::protobuf::UninterpretedOption>::InternalSwap ((RepeatedPtrField<google::protobuf::UninterpretedOption> *)(this + 0x30), (RepeatedPtrField *)(param_1 + 0x30)); internal::memswap<13>((char *)(this + 0x48),(char *)(param_1 + 0x48)); return; }
11,470
bool nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_bson_string<int>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/./json.hpp
bool get_bson_string(const NumberType len, string_t& result) { if (JSON_HEDLEY_UNLIKELY(len < 1)) { auto last_token = get_token_string(); return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, concat("string length must be at least 1, is ", std::to_string(len)), "string"), nullptr)); } return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) && get() != char_traits<char_type>::eof(); }
O0
cpp
bool nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, parse_json(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)::json_error_locator>::get_bson_string<int>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x128(%rsp) movl %esi, 0x124(%rsp) movq %rdx, 0x118(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x30(%rsp) cmpl $0x1, 0x124(%rsp) setl %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x1c0b73 jmp 0x1c0d84 movq 0x30(%rsp), %rsi leaq 0xf8(%rsp), %rdi callq 0x1bfa00 movq 0x30(%rsp), %rcx movq 0x18(%rcx), %rax movq %rax, 0x18(%rsp) movq 0x28(%rcx), %rcx movq %rcx, 0x20(%rsp) movq %rax, 0x28(%rsp) movl 0x124(%rsp), %esi leaq 0x70(%rsp), %rdi callq 0x780a0 jmp 0x1c0bb4 leaq 0x2352c(%rip), %rsi # 0x1e40e7 leaq 0x90(%rsp), %rdi leaq 0x70(%rsp), %rdx callq 0x1ceb60 jmp 0x1c0bcf leaq 0x3f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x55db0 movq 0x10(%rsp), %rdx leaq 0x18f91(%rip), %rsi # 0x1d9b7b leaq 0x40(%rsp), %rdi callq 0x72000 jmp 0x1c0bf6 movq 0x30(%rsp), %rsi leaq 0xb0(%rsp), %rdi movl $0x4, %edx leaq 0x90(%rsp), %rcx leaq 0x40(%rsp), %r8 callq 0x1bfae0 jmp 0x1c0c1c movq 0x18(%rsp), %rdx xorl %eax, %eax movl %eax, %r8d leaq 0xd0(%rsp), %rdi movl $0x70, %esi leaq 0xb0(%rsp), %rcx callq 0x1ce5b0 jmp 0x1c0c42 movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdi movq (%rdi), %rax movq 0x60(%rax), %rax leaq 0xf8(%rsp), %rdx leaq 0xd0(%rsp), %rcx callq *%rax movb %al, 0xf(%rsp) jmp 0x1c0c6b movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0x137(%rsp) leaq 0xd0(%rsp), %rdi callq 0x7e3e0 leaq 0xb0(%rsp), %rdi callq 0x56110 leaq 0x40(%rsp), %rdi callq 0x56110 leaq 0x3f(%rsp), %rdi callq 0x560f0 leaq 0x90(%rsp), %rdi callq 0x56110 leaq 0x70(%rsp), %rdi callq 0x56110 leaq 0xf8(%rsp), %rdi callq 0x56110 jmp 0x1c0de3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1c0d75 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1c0d6b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1c0d54 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1c0d4a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1c0d3d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0xd0(%rsp), %rdi callq 0x7e3e0 leaq 0xb0(%rsp), %rdi callq 0x56110 leaq 0x40(%rsp), %rdi callq 0x56110 leaq 0x3f(%rsp), %rdi callq 0x560f0 leaq 0x90(%rsp), %rdi callq 0x56110 leaq 0x70(%rsp), %rdi callq 0x56110 leaq 0xf8(%rsp), %rdi callq 0x56110 jmp 0x1c0df4 movq 0x30(%rsp), %rdi movl 0x124(%rsp), %edx subl $0x1, %edx movq 0x118(%rsp), %rcx movl $0x4, %esi callq 0x1c1290 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xe(%rsp) jne 0x1c0db4 jmp 0x1c0dd6 movq 0x30(%rsp), %rdi callq 0x1bf9c0 movl %eax, 0x8(%rsp) callq 0x78b20 movl %eax, %ecx movl 0x8(%rsp), %eax cmpl %ecx, %eax setne %al movb %al, 0xe(%rsp) movb 0xe(%rsp), %al andb $0x1, %al movb %al, 0x137(%rsp) movb 0x137(%rsp), %al andb $0x1, %al addq $0x138, %rsp # imm = 0x138 retq movq 0x68(%rsp), %rdi callq 0x559a0 nop
_ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE15get_bson_stringIiEEbT_RSB_: sub rsp, 138h mov qword ptr [rsp+138h+var_10], rdi mov [rsp+138h+var_14], esi mov [rsp+138h+var_20], rdx mov rax, qword ptr [rsp+138h+var_10] mov qword ptr [rsp+138h+var_108], rax; int cmp [rsp+138h+var_14], 1 setl al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_1C0B73 jmp loc_1C0D84 loc_1C0B73: mov rsi, qword ptr [rsp+138h+var_108] lea rdi, [rsp+138h+var_40] call _ZNK8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get_token_string(void) mov rcx, qword ptr [rsp+138h+var_108] mov rax, [rcx+18h] mov qword ptr [rsp+138h+var_120], rax; int mov rcx, [rcx+28h] mov qword ptr [rsp+138h+var_118], rcx; int mov [rsp+138h+var_110], rax; int mov esi, [rsp+138h+var_14]; int lea rdi, [rsp+138h+var_C8]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_1C0BB4: lea rsi, aStringLengthMu; "string length must be at least 1, is " lea rdi, [rsp+138h+var_A8] lea rdx, [rsp+138h+var_C8] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA38_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[38],std::string>(char const(&)[38],std::string &&) jmp short $+2 loc_1C0BCF: lea rdi, [rsp+138h+var_F9] mov qword ptr [rsp+138h+var_128], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+138h+var_128] lea rsi, aDateTimeString+0Ah; "string" lea rdi, [rsp+138h+var_F9+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1C0BF6: mov rsi, qword ptr [rsp+138h+var_108] lea rdi, [rsp+138h+var_88]; int mov edx, 4 lea rcx, [rsp+138h+var_A8] lea r8, [rsp+138h+var_F9+1] call _ZNK8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE17exception_messageENS1_14input_format_tERKSB_SV_; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::exception_message(nlohmann::json_abi_v3_11_3::detail::input_format_t,std::string const&,std::string const&) jmp short $+2 loc_1C0C1C: mov rdx, qword ptr [rsp+138h+var_120] xor eax, eax mov r8d, eax lea rdi, [rsp+138h+var_68]; char mov esi, 70h ; 'p' lea rcx, [rsp+138h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_imRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ jmp short $+2 loc_1C0C42: mov rsi, [rsp+138h+var_110] mov rdi, qword ptr [rsp+138h+var_118] mov rax, [rdi] mov rax, [rax+60h] lea rdx, [rsp+138h+var_40] lea rcx, [rsp+138h+var_68] call rax mov [rsp+138h+var_129], al jmp short $+2 loc_1C0C6B: mov al, [rsp+138h+var_129] and al, 1 mov [rsp+138h+var_1], al lea rdi, [rsp+138h+var_68]; void * call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorD2Ev; nlohmann::json_abi_v3_11_3::detail::parse_error::~parse_error() lea rdi, [rsp+138h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_F9+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_F9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+138h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1C0DE3 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp loc_1C0D75 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_1C0D6B mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_1C0D54 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_1C0D4A mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_1C0D3D mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_C8]; void * call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorD2Ev; nlohmann::json_abi_v3_11_3::detail::parse_error::~parse_error() loc_1C0D3D: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1C0D4A: lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1C0D54: lea rdi, [rsp+arg_37] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1C0D6B: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1C0D75: lea rdi, [rsp+arg_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1C0DF4 loc_1C0D84: mov rdi, qword ptr [rsp+138h+var_108] mov edx, [rsp+138h+var_14] sub edx, 1 mov rcx, [rsp+138h+var_20] mov esi, 4 call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE10get_stringIiEEbNS1_14input_format_tET_RSB_; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get_string<int>(nlohmann::json_abi_v3_11_3::detail::input_format_t,int,std::string&) mov cl, al xor eax, eax test cl, 1 mov [rsp+138h+var_12A], al jnz short loc_1C0DB4 jmp short loc_1C0DD6 loc_1C0DB4: mov rdi, qword ptr [rsp+138h+var_108] call _ZN8nlohmann16json_abi_v3_11_36detail13binary_readerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEZL10parse_jsonRSL_RKSL_RSF_E18json_error_locatorE3getEv; nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)::json_error_locator>::get(void) mov [rsp+138h+var_130], eax call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void) mov ecx, eax mov eax, [rsp+138h+var_130] cmp eax, ecx setnz al mov [rsp+138h+var_12A], al loc_1C0DD6: mov al, [rsp+138h+var_12A] and al, 1 mov [rsp+138h+var_1], al loc_1C0DE3: mov al, [rsp+138h+var_1] and al, 1 add rsp, 138h retn loc_1C0DF4: mov rdi, [rsp+arg_60] call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get_bson_string<int>( long long a1, int a2, long long a3) { int v3; // ecx int v4; // r8d int v5; // r9d int v7; // [rsp+0h] [rbp-138h] int v8; // [rsp+8h] [rbp-130h] int v9; // [rsp+8h] [rbp-130h] bool v10; // [rsp+Eh] [rbp-12Ah] int v11[2]; // [rsp+18h] [rbp-120h] int v12[2]; // [rsp+20h] [rbp-118h] int v13[2]; // [rsp+20h] [rbp-118h] long long v14; // [rsp+28h] [rbp-110h] char v15; // [rsp+38h] [rbp-100h] char v16; // [rsp+3Fh] [rbp-F9h] BYREF int v17[8]; // [rsp+40h] [rbp-F8h] BYREF char v18; // [rsp+60h] [rbp-D8h] int v19; // [rsp+68h] [rbp-D0h] int v20[4]; // [rsp+70h] [rbp-C8h] BYREF char v21; // [rsp+80h] [rbp-B8h] int v22; // [rsp+88h] [rbp-B0h] int v23[6]; // [rsp+90h] [rbp-A8h] BYREF long long v24; // [rsp+A8h] [rbp-90h] int v25; // [rsp+B0h] [rbp-88h] BYREF char v26; // [rsp+B8h] [rbp-80h] int v27; // [rsp+C0h] [rbp-78h] int v28; // [rsp+C8h] [rbp-70h] char v29[16]; // [rsp+D0h] [rbp-68h] BYREF int v30; // [rsp+E0h] [rbp-58h] int v31; // [rsp+E8h] [rbp-50h] int v32; // [rsp+F0h] [rbp-48h] char v33[32]; // [rsp+F8h] [rbp-40h] BYREF long long v34; // [rsp+118h] [rbp-20h] int v35; // [rsp+124h] [rbp-14h] int v36[2]; // [rsp+128h] [rbp-10h] char v37; // [rsp+137h] [rbp-1h] *(_QWORD *)v36 = a1; v35 = a2; v34 = a3; if ( a2 >= 1 ) { v10 = 0; if ( (nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get_string<int>( a1, 4LL, (unsigned int)(v35 - 1), v34) & 1) != 0 ) { v9 = nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get(a1); v10 = v9 != (unsigned int)std::char_traits<char>::eof(); } v37 = v10; } else { nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::get_token_string( (long long)v33, a1); *(_QWORD *)v11 = *(_QWORD *)(a1 + 24); *(_QWORD *)v12 = *(_QWORD *)(a1 + 40); std::to_string((std::__cxx11 *)v20, v35); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[38],std::string>( (unsigned int)v23, (unsigned int)"string length must be at least 1, is ", (unsigned int)v20, v3, v4, v5); std::allocator<char>::allocator(&v16, "string length must be at least 1, is "); std::string::basic_string<std::allocator<char>>((long long)v17, (long long)"string", (long long)&v16); nlohmann::json_abi_v3_11_3::detail::binary_reader<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,parse_json(__gnu_cxx::__normal_iterator<char const*,std::string>&,__gnu_cxx::__normal_iterator<char const*,std::string> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>&)::json_error_locator>::exception_message( (long long)&v25, a1, 4, (long long)v23, (long long)v17); ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_imRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( (char)v29, v7, v8, (int)&v16, v11[0], v12[0], v11[0], a1, v15, v17[0], v17[2], v17[4], v17[6], v18, v19, v20[0], v20[2], v21, v22, v23[0], v23[2], v23[4], v24, v25, v26, v27, v28, *(int *)v29, v29[8], v30, v31, v32, v33[0]); v37 = (*(long long ( **)(int *, long long, char *, char *))(**(_QWORD **)v13 + 96LL))( *(int **)v13, v14, v33, v29) & 1; nlohmann::json_abi_v3_11_3::detail::parse_error::~parse_error((nlohmann::json_abi_v3_11_3::detail::exception *)v29); std::string::~string(&v25); std::string::~string(v17); std::allocator<char>::~allocator(&v16); std::string::~string(v23); std::string::~string(v20); std::string::~string(v33); } return v37 & 1; }
_M_store_code: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX RET
/* std::__detail::_Hash_code_base<char, char, std::__detail::_Identity, std::hash<char>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_store_code(std::__detail::_Hash_node_code_cache<false>&, unsigned long) const */ void std::__detail:: _Hash_code_base<char,char,std::__detail::_Identity,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,false> ::_M_store_code(_Hash_node_code_cache *param_1,ulong param_2) { return; }
11,471
testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson(testing::TestResult const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
std::string JsonUnitTestResultPrinter::TestPropertiesAsJson( const TestResult& result, const std::string& indent) { Message attributes; for (int i = 0; i < result.test_property_count(); ++i) { const TestProperty& property = result.GetTestProperty(i); attributes << ",\n" << indent << "\"" << property.key() << "\": " << "\"" << EscapeJson(property.value()) << "\""; } return attributes.GetString(); }
O3
cpp
testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson(testing::TestResult const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r15 movq %rsi, %r12 movq %rdi, 0x38(%rsp) leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0x1c968 movq 0x58(%r12), %rax subq 0x50(%r12), %rax shrq $0x6, %rax movq (%rbx), %rcx movq %rcx, 0x10(%rsp) testl %eax, %eax jle 0x2af4c movq 0x10(%rsp), %rax leaq 0x10(%rax), %r13 xorl %ebp, %ebp movq %r12, %rdi movl %ebp, %esi callq 0x1f850 movq %rax, %r14 movl $0x2, %edx movq %r13, %rdi leaq 0x1892e(%rip), %rsi # 0x43765 callq 0x85b0 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %r13, %rdi callq 0x85b0 movl $0x1, %edx movq %r13, %rdi leaq 0x18931(%rip), %rsi # 0x4378b callq 0x85b0 movq (%r14), %rbx testq %rbx, %rbx je 0x2ae74 movq %rbx, %rdi callq 0x8200 movq %rax, %rdx jmp 0x2ae80 movl $0x6, %edx leaq 0x157d9(%rip), %rbx # 0x40659 movq %r13, %rdi movq %rbx, %rsi callq 0x85b0 movl $0x3, %edx movq %r13, %rdi leaq 0x18879(%rip), %rsi # 0x43713 callq 0x85b0 movl $0x1, %edx movq %r13, %rdi leaq 0x188dd(%rip), %rsi # 0x4378b callq 0x85b0 movq 0x20(%r14), %rsi leaq 0x40(%rsp), %rbx movq %rbx, %rdi leaq 0xf(%rsp), %rdx callq 0x81e0 leaq 0x18(%rsp), %rdi movq %rbx, %rsi callq 0x28c22 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq %r13, %rdi callq 0x85b0 movl $0x1, %edx movq %r13, %rdi leaq 0x18894(%rip), %rsi # 0x4378b callq 0x85b0 movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x2af18 movq 0x28(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x2af34 movq 0x50(%rsp), %rsi incq %rsi callq 0x84e0 incl %ebp movq 0x58(%r12), %rax subq 0x50(%r12), %rax shrq $0x6, %rax cmpl %eax, %ebp jl 0x2ae1b movq 0x38(%rsp), %rbx movq %rbx, %rdi movq 0x10(%rsp), %r14 movq %r14, %rsi callq 0x1cbbf testq %r14, %r14 je 0x2af6f movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x2afd4 jmp 0x2afcc movq %rax, %rbx jmp 0x2afac movq %rax, %rbx movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rax cmpq %rax, %rdi je 0x2afac movq 0x28(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x2afcf movq 0x50(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x2afcf jmp 0x2afcc movq %rax, %rbx movq 0x10(%rsp), %r14 testq %r14, %r14 je 0x2afe2 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) movq %rbx, %rdi callq 0x8990
_ZN7testing8internal25JsonUnitTestResultPrinter20TestPropertiesAsJsonERKNS_10TestResultERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r15, rdx mov r12, rsi mov [rsp+98h+var_60], rdi lea rbx, [rsp+98h+var_38] mov rdi, rbx; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rax, [r12+58h] sub rax, [r12+50h] shr rax, 6 mov rcx, [rbx] mov [rsp+98h+var_88], rcx; __int64 test eax, eax jle loc_2AF4C mov rax, [rsp+98h+var_88] lea r13, [rax+10h] xor ebp, ebp loc_2AE1B: mov rdi, r12; this mov esi, ebp; int call _ZNK7testing10TestResult15GetTestPropertyEi; testing::TestResult::GetTestProperty(int) mov r14, rax mov edx, 2 mov rdi, r13 lea rsi, asc_43764+1; ",\n" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15] mov rdx, [r15+8] mov rdi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r13 lea rsi, aMessage+0Fh; "\"" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [r14] test rbx, rbx jz short loc_2AE74 mov rdi, rbx call _strlen mov rdx, rax jmp short loc_2AE80 loc_2AE74: mov edx, 6 lea rbx, aNull; "(null)" loc_2AE80: mov rdi, r13 mov rsi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 3 mov rdi, r13 lea rsi, asc_43713; "\": " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r13 lea rsi, aMessage+0Fh; "\"" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r14+20h] lea rbx, [rsp+98h+var_58] mov rdi, rbx lea rdx, [rsp+98h+var_89] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rdi, [rsp+98h+var_80]; int mov rsi, rbx; int call _ZN7testing8internal25JsonUnitTestResultPrinter10EscapeJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::JsonUnitTestResultPrinter::EscapeJson(std::string const&) mov rsi, [rsp+98h+var_80] mov rdx, [rsp+98h+var_78] mov rdi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r13 lea rsi, aMessage+0Fh; "\"" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+98h+var_80]; void * lea rax, [rsp+98h+var_70] cmp rdi, rax jz short loc_2AF18 mov rsi, [rsp+98h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AF18: mov rdi, [rsp+98h+var_58]; void * lea rax, [rsp+98h+var_48] cmp rdi, rax jz short loc_2AF34 mov rsi, [rsp+98h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AF34: inc ebp mov rax, [r12+58h] sub rax, [r12+50h] shr rax, 6 cmp ebp, eax jl loc_2AE1B loc_2AF4C: mov rbx, [rsp+98h+var_60] mov rdi, rbx mov r14, [rsp+98h+var_88] mov rsi, r14 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) test r14, r14 jz short loc_2AF6F mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_2AF6F: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_2AFD4 jmp short loc_2AFCC mov rbx, rax jmp short loc_2AFAC mov rbx, rax mov rdi, [rsp+arg_10]; void * lea rax, [rsp+arg_20] cmp rdi, rax jz short loc_2AFAC mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2AFAC: mov rdi, [rsp+arg_38]; void * lea rax, [rsp+arg_48] cmp rdi, rax jz short loc_2AFCF mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2AFCF jmp short $+2 loc_2AFCC: mov rbx, rax loc_2AFCF: mov r14, [rsp+arg_8] loc_2AFD4: test r14, r14 jz short loc_2AFE2 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_2AFE2: mov rdi, rbx call __Unwind_Resume
long long testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson( long long a1, testing::TestResult *a2, _QWORD *a3) { long long v4; // rax long long v5; // r13 int v6; // ebp const char **TestProperty; // r14 const char *v8; // rbx long long v9; // rdx long long v10; // rbx long long v11; // r14 char v13; // [rsp+Fh] [rbp-89h] BYREF long long v14; // [rsp+10h] [rbp-88h] void *v15[2]; // [rsp+18h] [rbp-80h] BYREF long long v16; // [rsp+28h] [rbp-70h] BYREF long long v17; // [rsp+38h] [rbp-60h] void *v18[2]; // [rsp+40h] [rbp-58h] BYREF long long v19; // [rsp+50h] [rbp-48h] BYREF long long v20[7]; // [rsp+60h] [rbp-38h] BYREF v17 = a1; testing::Message::Message((testing::Message *)v20); v4 = (*((_QWORD *)a2 + 11) - *((_QWORD *)a2 + 10)) >> 6; v14 = v20[0]; if ( (int)v4 > 0 ) { v5 = v14 + 16; v6 = 0; do { TestProperty = (const char **)testing::TestResult::GetTestProperty(a2, v6); std::__ostream_insert<char,std::char_traits<char>>(v5, ",\n", 2LL); std::__ostream_insert<char,std::char_traits<char>>(v5, *a3, a3[1]); std::__ostream_insert<char,std::char_traits<char>>(v5, "\"", 1LL); v8 = *TestProperty; if ( *TestProperty ) { v9 = strlen(*TestProperty); } else { v9 = 6LL; v8 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v5, v8, v9); std::__ostream_insert<char,std::char_traits<char>>(v5, "\": ", 3LL); std::__ostream_insert<char,std::char_traits<char>>(v5, "\"", 1LL); std::string::basic_string(v18, TestProperty[4], &v13); testing::internal::JsonUnitTestResultPrinter::EscapeJson((long long)v15, v18); std::__ostream_insert<char,std::char_traits<char>>(v5, v15[0], v15[1]); std::__ostream_insert<char,std::char_traits<char>>(v5, "\"", 1LL); if ( v15[0] != &v16 ) operator delete(v15[0], v16 + 1); if ( v18[0] != &v19 ) operator delete(v18[0], v19 + 1); ++v6; } while ( v6 < (int)((*((_QWORD *)a2 + 11) - *((_QWORD *)a2 + 10)) >> 6) ); } v10 = v17; v11 = v14; testing::internal::StringStreamToString(v17, v14); if ( v11 ) (*(void ( **)(long long))(*(_QWORD *)v11 + 8LL))(v11); return v10; }
TestPropertiesAsJson: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R15,RDX MOV R12,RSI MOV qword ptr [RSP + 0x38],RDI LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x0011c968 MOV RAX,qword ptr [R12 + 0x58] SUB RAX,qword ptr [R12 + 0x50] SHR RAX,0x6 MOV RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x10],RCX TEST EAX,EAX JLE 0x0012af4c MOV RAX,qword ptr [RSP + 0x10] LEA R13,[RAX + 0x10] XOR EBP,EBP LAB_0012ae1b: MOV RDI,R12 MOV ESI,EBP CALL 0x0011f850 MOV R14,RAX MOV EDX,0x2 MOV RDI,R13 LEA RSI,[0x143765] CALL 0x001085b0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,R13 CALL 0x001085b0 MOV EDX,0x1 MOV RDI,R13 LEA RSI,[0x14378b] CALL 0x001085b0 MOV RBX,qword ptr [R14] TEST RBX,RBX JZ 0x0012ae74 MOV RDI,RBX CALL 0x00108200 MOV RDX,RAX JMP 0x0012ae80 LAB_0012ae74: MOV EDX,0x6 LEA RBX,[0x140659] LAB_0012ae80: MOV RDI,R13 MOV RSI,RBX CALL 0x001085b0 MOV EDX,0x3 MOV RDI,R13 LEA RSI,[0x143713] CALL 0x001085b0 MOV EDX,0x1 MOV RDI,R13 LEA RSI,[0x14378b] CALL 0x001085b0 MOV RSI,qword ptr [R14 + 0x20] LAB_0012aeb7: LEA RBX,[RSP + 0x40] MOV RDI,RBX LEA RDX,[RSP + 0xf] CALL 0x001081e0 LAB_0012aec9: LEA RDI,[RSP + 0x18] MOV RSI,RBX CALL 0x00128c22 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_0012aee0: MOV RDI,R13 CALL 0x001085b0 MOV EDX,0x1 MOV RDI,R13 LEA RSI,[0x14378b] CALL 0x001085b0 MOV RDI,qword ptr [RSP + 0x18] LEA RAX,[RSP + 0x28] CMP RDI,RAX JZ 0x0012af18 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001084e0 LAB_0012af18: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x0012af34 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001084e0 LAB_0012af34: INC EBP MOV RAX,qword ptr [R12 + 0x58] SUB RAX,qword ptr [R12 + 0x50] SHR RAX,0x6 CMP EBP,EAX JL 0x0012ae1b LAB_0012af4c: MOV RBX,qword ptr [RSP + 0x38] MOV RDI,RBX MOV R14,qword ptr [RSP + 0x10] MOV RSI,R14 CALL 0x0011cbbf LAB_0012af61: TEST R14,R14 JZ 0x0012af6f MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_0012af6f: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson(testing::TestResult const&, std::__cxx11::string const&) */ stringstream * __thiscall testing::internal::JsonUnitTestResultPrinter::TestPropertiesAsJson (JsonUnitTestResultPrinter *this,TestResult *param_1,string *param_2) { ostream *poVar1; long *plVar2; JsonUnitTestResultPrinter *pJVar3; int8 *puVar4; size_t sVar5; char *__s; int iVar6; allocator local_89; long *local_88; long *local_80; long local_78; long local_70 [2]; JsonUnitTestResultPrinter *local_60; long *local_58 [2]; long local_48 [2]; long *local_38; local_60 = this; Message::Message((Message *)&local_38); local_88 = local_38; if (0 < (int)((ulong)(*(long *)(param_1 + 0x58) - *(long *)(param_1 + 0x50)) >> 6)) { poVar1 = (ostream *)(local_38 + 2); iVar6 = 0; do { /* try { // try from 0012ae1b to 0012ae5e has its CatchHandler @ 0012afcc */ puVar4 = (int8 *)TestResult::GetTestProperty(param_1,iVar6); std::__ostream_insert<char,std::char_traits<char>>(poVar1,",\n",2); std::__ostream_insert<char,std::char_traits<char>> (poVar1,*(char **)param_2,*(long *)(param_2 + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\"",1); __s = (char *)*puVar4; if (__s == (char *)0x0) { sVar5 = 6; __s = "(null)"; } else { sVar5 = strlen(__s); } /* try { // try from 0012ae80 to 0012aeb2 has its CatchHandler @ 0012afca */ std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar5); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\": ",3); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\"",1); /* try { // try from 0012aeb7 to 0012aec8 has its CatchHandler @ 0012af86 */ std::__cxx11::string::string((string *)local_58,(char *)puVar4[4],&local_89); /* try { // try from 0012aec9 to 0012aed5 has its CatchHandler @ 0012af88 */ EscapeJson((JsonUnitTestResultPrinter *)&local_80,(string *)local_58); /* try { // try from 0012aee0 to 0012aefb has its CatchHandler @ 0012af8d */ std::__ostream_insert<char,std::char_traits<char>>(poVar1,(char *)local_80,local_78); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\"",1); if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } iVar6 = iVar6 + 1; } while (iVar6 < (int)((ulong)(*(long *)(param_1 + 0x58) - *(long *)(param_1 + 0x50)) >> 6)); } /* try { // try from 0012af4c to 0012af60 has its CatchHandler @ 0012af81 */ pJVar3 = local_60; plVar2 = local_88; StringStreamToString((stringstream *)local_60); if (plVar2 != (long *)0x0) { (**(code **)(*plVar2 + 8))(plVar2); } return (stringstream *)pJVar3; }
11,472
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/json.hpp
bool key(string_t& val) { BasicJsonType k = BasicJsonType(val); // check callback for key const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); key_keep_stack.push_back(keep); // add discarded value at given key and store the reference for later if (keep && ref_stack.back()) { object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x68(%rsp), %rsi leaq 0x58(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xb4010 movq 0x10(%rsp), %rdi movq %rdi, %rax subq $-0x80, %rax movq %rax, 0x18(%rsp) addq $0x8, %rdi callq 0xab3d0 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rcx movl %eax, %esi movl $0x4, %edx callq 0xab370 movb %al, 0x2f(%rsp) jmp 0xaa882 movq 0x10(%rsp), %rdi movb 0x2f(%rsp), %al andb $0x1, %al movb %al, 0x57(%rsp) addq $0x48, %rdi movzbl 0x57(%rsp), %esi andl $0x1, %esi callq 0xa8020 jmp 0xaa8a4 testb $0x1, 0x57(%rsp) je 0xaa956 movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xab9c0 cmpq $0x0, (%rax) je 0xaa956 movq 0x10(%rsp), %rsi addq $0xa8, %rsi leaq 0x30(%rsp), %rdi callq 0xad570 jmp 0xaa8df movq 0x10(%rsp), %rdi addq $0x8, %rdi callq 0xab9c0 movq (%rax), %rax movq 0x8(%rax), %rdi movq 0x68(%rsp), %rsi callq 0xb4090 movq %rax, 0x8(%rsp) jmp 0xaa905 movq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xa5df0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x70(%rax) leaq 0x30(%rsp), %rdi callq 0x9cbb0 jmp 0xaa956 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xaa969 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x30(%rsp), %rdi callq 0x9cbb0 jmp 0xaa969 leaq 0x58(%rsp), %rdi callq 0x9cbb0 movb $0x1, %al andb $0x1, %al addq $0x78, %rsp retq leaq 0x58(%rsp), %rdi callq 0x9cbb0 movq 0x48(%rsp), %rdi callq 0x59b80 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_: sub rsp, 78h mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov rax, [rsp+78h+var_8] mov [rsp+78h+var_68], rax mov rsi, [rsp+78h+var_10] lea rdi, [rsp+78h+var_20] mov [rsp+78h+var_58], rdi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ mov rdi, [rsp+78h+var_68] mov rax, rdi sub rax, 0FFFFFFFFFFFFFF80h mov [rsp+78h+var_60], rax add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::size(void) mov rdi, [rsp+78h+var_60] mov rcx, [rsp+78h+var_58] mov esi, eax mov edx, 4 call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) mov [rsp+78h+var_49], al jmp short $+2 loc_AA882: mov rdi, [rsp+78h+var_68] mov al, [rsp+78h+var_49] and al, 1 mov [rsp+78h+var_21], al add rdi, 48h ; 'H' movzx esi, [rsp+78h+var_21] and esi, 1 call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) jmp short $+2 loc_AA8A4: test [rsp+78h+var_21], 1 jz loc_AA956 mov rdi, [rsp+78h+var_68] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) cmp qword ptr [rax], 0 jz loc_AA956 mov rsi, [rsp+78h+var_68] add rsi, 0A8h lea rdi, [rsp+78h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short $+2 loc_AA8DF: mov rdi, [rsp+78h+var_68] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) mov rax, [rax] mov rdi, [rax+8] mov rsi, [rsp+78h+var_10] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&) mov [rsp+78h+var_70], rax jmp short $+2 loc_AA905: mov rdi, [rsp+78h+var_70] lea rsi, [rsp+78h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov rcx, rax mov rax, [rsp+78h+var_68] mov [rax+70h], rcx lea rdi, [rsp+78h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_AA956 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_AA969 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_AA969 loc_AA956: lea rdi, [rsp+78h+var_20] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov al, 1 and al, 1 add rsp, 78h retn loc_AA969: lea rdi, [rsp+arg_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() mov rdi, [rsp+arg_40] call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key( long long a1, long long a2, int a3, int a4, int a5, int a6) { unsigned int v6; // eax int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rax int v12; // edx int v13; // ecx int v14; // r8d int v15; // r9d long long v17; // [rsp+0h] [rbp-78h] int v18; // [rsp+0h] [rbp-78h] int v19; // [rsp+8h] [rbp-70h] int v20; // [rsp+8h] [rbp-70h] long long v21; // [rsp+8h] [rbp-70h] long long v22; // [rsp+10h] [rbp-68h] long long v23; // [rsp+10h] [rbp-68h] int v24; // [rsp+18h] [rbp-60h] int v25; // [rsp+20h] [rbp-58h] _BYTE v26[39]; // [rsp+30h] [rbp-48h] BYREF char v27; // [rsp+57h] [rbp-21h] _BYTE v28[16]; // [rsp+58h] [rbp-20h] BYREF long long v29; // [rsp+68h] [rbp-10h] long long v30; // [rsp+70h] [rbp-8h] v30 = a1; v29 = a2; ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_( (unsigned int)v28, a2, a3, a4, a5, a6); v6 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::size(a1 + 8); v27 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()( a1 + 128, v6, 4LL, v28) & 1; std::vector<bool>::push_back(a1 + 72, v27); if ( (v27 & 1) != 0 && *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8) ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( (unsigned int)v26, a1 + 168, v7, v8, v9, v10, v17, v19, a1, a1 + 128, (unsigned int)v28); v11 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(v22 + 8); v21 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( *(_QWORD *)(*(_QWORD *)v11 + 8LL), v29, v12, v13, v14, v15, v18, v20, v22, v24, v25); *(_QWORD *)(v23 + 112) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v21, (long long)v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v26); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v28); return 1; }
key: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x20],RDI CALL 0x001b4010 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,RDI SUB RAX,-0x80 MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x8 CALL 0x001ab3d0 MOV RDI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] MOV ESI,EAX LAB_001aa872: MOV EDX,0x4 CALL 0x001ab370 MOV byte ptr [RSP + 0x2f],AL JMP 0x001aa882 LAB_001aa882: MOV RDI,qword ptr [RSP + 0x10] MOV AL,byte ptr [RSP + 0x2f] AND AL,0x1 MOV byte ptr [RSP + 0x57],AL ADD RDI,0x48 MOVZX ESI,byte ptr [RSP + 0x57] AND ESI,0x1 CALL 0x001a8020 JMP 0x001aa8a4 LAB_001aa8a4: TEST byte ptr [RSP + 0x57],0x1 JZ 0x001aa956 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001ab9c0 CMP qword ptr [RAX],0x0 JZ 0x001aa956 MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0xa8 LEA RDI,[RSP + 0x30] CALL 0x001ad570 JMP 0x001aa8df LAB_001aa8df: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 CALL 0x001ab9c0 MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RSP + 0x68] LAB_001aa8f9: CALL 0x001b4090 LAB_001aa8fe: MOV qword ptr [RSP + 0x8],RAX JMP 0x001aa905 LAB_001aa905: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x30] CALL 0x001a5df0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x70],RCX LEA RDI,[RSP + 0x30] CALL 0x0019cbb0 JMP 0x001aa956 LAB_001aa956: LEA RDI,[RSP + 0x58] CALL 0x0019cbb0 MOV AL,0x1 AND AL,0x1 ADD RSP,0x78 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::key(std::__cxx11::string&) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,string *param_1) { int4 uVar1; long *plVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar3; int8 uVar4; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_48 [39]; byte local_21; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_20 [16]; string *local_10; json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_10 = param_1; local_8 = this; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_20,param_1); uVar1 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); /* try { // try from 001aa872 to 001aa8dc has its CatchHandler @ 001aa92c */ local_21 = std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),uVar1,4,local_20); local_21 = local_21 & 1; std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x48),(bool)local_21); if ((local_21 & 1) != 0) { plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if (*plVar2 != 0) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_48,this + 0xa8); plVar2 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); /* try { // try from 001aa8f9 to 001aa8fd has its CatchHandler @ 001aa93c */ pbVar3 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(*plVar2 + 8),local_10); uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(pbVar3,local_48); *(int8 *)(this + 0x70) = uVar4; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_48); } } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_20); return 1; }
11,473
ma_SHA1Decode
eloqsql/libmariadb/libmariadb/ma_sha1.c
static void ma_SHA1Decode(uint32 *output, const unsigned char * input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) output[i] = ((uint32) input[j + 3]) | (((uint32) input[j + 2]) << 8) | (((uint32) input[j + 1]) << 16) | (((uint32) input[j]) << 24); }
O0
c
ma_SHA1Decode: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl $0x0, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x4da5d movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x3, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %edx movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x2, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %eax shll $0x8, %eax orl %eax, %edx movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movzbl (%rax,%rcx), %eax shll $0x10, %eax orl %eax, %edx movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx movzbl (%rax,%rcx), %eax shll $0x18, %eax orl %eax, %edx movq -0x8(%rbp), %rax movl -0x18(%rbp), %ecx movl %edx, (%rax,%rcx,4) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) movl -0x1c(%rbp), %eax addl $0x4, %eax movl %eax, -0x1c(%rbp) jmp 0x4d9ed popq %rbp retq
ma_SHA1Decode: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], 0 mov [rbp+var_1C], 0 loc_4D9ED: mov eax, [rbp+var_1C] cmp eax, [rbp+var_14] jnb short loc_4DA5D mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] add ecx, 3 mov ecx, ecx movzx edx, byte ptr [rax+rcx] mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] add ecx, 2 mov ecx, ecx movzx eax, byte ptr [rax+rcx] shl eax, 8 or edx, eax mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] add ecx, 1 mov ecx, ecx movzx eax, byte ptr [rax+rcx] shl eax, 10h or edx, eax mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] movzx eax, byte ptr [rax+rcx] shl eax, 18h or edx, eax mov rax, [rbp+var_8] mov ecx, [rbp+var_18] mov [rax+rcx*4], edx mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax mov eax, [rbp+var_1C] add eax, 4 mov [rbp+var_1C], eax jmp short loc_4D9ED loc_4DA5D: pop rbp retn
long long ma_SHA1Decode(long long a1, long long a2, unsigned int a3) { long long result; // rax unsigned int i; // [rsp+0h] [rbp-1Ch] unsigned int v5; // [rsp+4h] [rbp-18h] v5 = 0; for ( i = 0; ; i += 4 ) { result = i; if ( i >= a3 ) break; *(_DWORD *)(a1 + 4LL * v5++) = (*(unsigned __int8 *)(a2 + i) << 24) | (*(unsigned __int8 *)(a2 + i + 1) << 16) | (*(unsigned __int8 *)(a2 + i + 2) << 8) | *(unsigned __int8 *)(a2 + i + 3); } return result; }
ma_SHA1Decode: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x1c],0x0 LAB_0014d9ed: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x14] JNC 0x0014da5d MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x3 MOV ECX,ECX MOVZX EDX,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x2 MOV ECX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 OR EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV ECX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x10 OR EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x18 OR EDX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x18] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0014d9ed LAB_0014da5d: POP RBP RET
void ma_SHA1Decode(long param_1,long param_2,uint param_3) { int4 local_24; int4 local_20; local_20 = 0; for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) { *(uint *)(param_1 + (ulong)local_20 * 4) = CONCAT13(*(int1 *)(param_2 + (ulong)local_24), CONCAT12(*(int1 *)(param_2 + (ulong)(local_24 + 1)), CONCAT11(*(int1 *)(param_2 + (ulong)(local_24 + 2)), *(int1 *)(param_2 + (ulong)(local_24 + 3))))); local_20 = local_20 + 1; } return; }
11,474
pvio_socket_connect_sync_or_async
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
static int pvio_socket_connect_sync_or_async(MARIADB_PVIO *pvio, const struct sockaddr *name, uint namelen) { MYSQL *mysql= pvio->mysql; if (mysql->options.extension && mysql->options.extension->async_context && mysql->options.extension->async_context->active) { /* even if we are not connected yet, application needs to check socket * via mysql_get_socket api call, so we need to assign pvio */ return pvio_socket_connect_async(pvio, name, namelen); } return pvio_socket_internal_connect(pvio, name, namelen); }
O0
c
pvio_socket_connect_sync_or_async: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x5cf4c movq -0x28(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x5cf4c movq -0x28(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movsbl 0x14(%rax), %eax cmpl $0x0, %eax je 0x5cf4c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx callq 0x5cf70 movl %eax, -0x4(%rbp) jmp 0x5cf61 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %eax movl %eax, %edx callq 0x5cfe0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
pvio_socket_connect_sync_or_async: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov rax, [rax+40h] mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp qword ptr [rax+480h], 0 jz short loc_5CF4C mov rax, [rbp+var_28] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_5CF4C mov rax, [rbp+var_28] mov rax, [rax+480h] mov rax, [rax+28h] movsx eax, byte ptr [rax+14h] cmp eax, 0 jz short loc_5CF4C mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] call pvio_socket_connect_async mov [rbp+var_4], eax jmp short loc_5CF61 loc_5CF4C: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov eax, [rbp+var_1C] mov edx, eax call pvio_socket_internal_connect mov [rbp+var_4], eax loc_5CF61: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long pvio_socket_connect_sync_or_async(long long a1, long long a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-28h] v4 = *(_QWORD *)(a1 + 64); if ( *(_QWORD *)(v4 + 1152) && *(_QWORD *)(*(_QWORD *)(v4 + 1152) + 40LL) && *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v4 + 1152) + 40LL) + 20LL) ) { return (unsigned int)pvio_socket_connect_async(a1, a2, a3); } else { return (unsigned int)pvio_socket_internal_connect(a1, a2, a3); } }
pvio_socket_connect_sync_or_async: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0015cf4c MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0015cf4c MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOVSX EAX,byte ptr [RAX + 0x14] CMP EAX,0x0 JZ 0x0015cf4c MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x0015cf70 MOV dword ptr [RBP + -0x4],EAX JMP 0x0015cf61 LAB_0015cf4c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] MOV EDX,EAX CALL 0x0015cfe0 MOV dword ptr [RBP + -0x4],EAX LAB_0015cf61: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 pvio_socket_connect_sync_or_async(long param_1,int8 param_2,int4 param_3) { long lVar1; int4 local_c; lVar1 = *(long *)(param_1 + 0x40); if (((*(long *)(lVar1 + 0x480) == 0) || (*(long *)(*(long *)(lVar1 + 0x480) + 0x28) == 0)) || (*(char *)(*(long *)(*(long *)(lVar1 + 0x480) + 0x28) + 0x14) == '\0')) { local_c = pvio_socket_internal_connect(param_1,param_2,param_3); } else { local_c = pvio_socket_connect_async(param_1,param_2,param_3); } return local_c; }
11,475
init_default_directories
eloqsql/mysys/my_default.c
static const char **init_default_directories(MEM_ROOT *alloc) { const char **dirs; char *env; int errors= 0; DBUG_ENTER("init_default_directories"); dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *)); if (dirs == NULL) DBUG_RETURN(NULL); bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *)); #ifdef _WIN32 { char fname_buffer[FN_REFLEN]; if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); errors += add_directory(alloc, "C:/", dirs); if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) { errors += add_directory(alloc, fname_buffer, dirs); strcat_s(fname_buffer, sizeof(fname_buffer), "/data"); errors += add_directory(alloc, fname_buffer, dirs); } } #else #if defined(DEFAULT_SYSCONFDIR) if (DEFAULT_SYSCONFDIR[0]) errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); #else errors += add_directory(alloc, "/etc/", dirs); errors += add_directory(alloc, "/etc/mysql/", dirs); #endif /* DEFAULT_SYSCONFDIR */ #endif /* If value of $MARIADB_HOME environment variable name is NULL, check for $MYSQL_HOME */ if ((env= getenv("MARIADB_HOME"))) errors += add_directory(alloc, env, dirs); else { if ((env= getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs); } /* Placeholder for --defaults-extra-file=<path> */ errors += add_directory(alloc, "", dirs); #if !defined(_WIN32) errors += add_directory(alloc, "~/", dirs); #endif DBUG_RETURN(errors > 0 ? NULL : dirs); }
O3
c
init_default_directories: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %r14 movl $0x40, %esi callq 0xa1b77 testq %rax, %rax je 0xb0ba4 movq %rax, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x10(%rax) movups %xmm0, (%rax) leaq 0x34e27(%rip), %rsi # 0xe593b movq %r14, %rdi movq %rax, %rdx callq 0xb0fda movl %eax, %r12d leaq 0x34e18(%rip), %rsi # 0xe5941 movq %r14, %rdi movq %rbx, %rdx callq 0xb0fda movl %eax, %r15d addl %r12d, %r15d leaq 0x34e0c(%rip), %rdi # 0xe594d callq 0x2a610 testq %rax, %rax jne 0xb0b5c leaq 0x34e08(%rip), %rdi # 0xe595a callq 0x2a610 testq %rax, %rax je 0xb0b6d movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0xb0fda addl %eax, %r15d leaq 0x30a01(%rip), %rsi # 0xe1575 movq %r14, %rdi movq %rbx, %rdx callq 0xb0fda movl %eax, %r12d addl %r15d, %r12d leaq 0x34dd9(%rip), %rsi # 0xe5965 movq %r14, %rdi movq %rbx, %rdx callq 0xb0fda movl %eax, %ecx xorl %eax, %eax orl %r12d, %ecx cmoveq %rbx, %rax jmp 0xb0ba6 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
init_default_directories: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdi mov esi, 40h ; '@' call alloc_root test rax, rax jz loc_B0BA4 mov rbx, rax xorps xmm0, xmm0 movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax], xmm0 lea rsi, aEtc; "/etc/" mov rdi, r14 mov rdx, rax call add_directory mov r12d, eax lea rsi, aEtcMysql; "/etc/mysql/" mov rdi, r14 mov rdx, rbx call add_directory mov r15d, eax add r15d, r12d lea rdi, aMariadbHome; "MARIADB_HOME" call _getenv test rax, rax jnz short loc_B0B5C lea rdi, aMysqlHome; "MYSQL_HOME" call _getenv test rax, rax jz short loc_B0B6D loc_B0B5C: mov rdi, r14 mov rsi, rax mov rdx, rbx call add_directory add r15d, eax loc_B0B6D: lea rsi, aUsageSOptions+15h; "" mov rdi, r14 mov rdx, rbx call add_directory mov r12d, eax add r12d, r15d lea rsi, asc_E5965; "~/" mov rdi, r14 mov rdx, rbx call add_directory mov ecx, eax xor eax, eax or ecx, r12d cmovz rax, rbx jmp short loc_B0BA6 loc_B0BA4: xor eax, eax loc_B0BA6: pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * init_default_directories(long long a1) { char *v1; // rax char *v2; // rbx int v3; // r12d int v4; // r15d long long v5; // rax int v6; // r12d int v7; // ecx char *result; // rax v1 = alloc_root(a1, 64LL); if ( !v1 ) return 0LL; v2 = v1; *((_OWORD *)v1 + 3) = 0LL; *((_OWORD *)v1 + 2) = 0LL; *((_OWORD *)v1 + 1) = 0LL; *(_OWORD *)v1 = 0LL; v3 = add_directory(a1, "/etc/", v1); v4 = v3 + add_directory(a1, "/etc/mysql/", v2); v5 = getenv("MARIADB_HOME"); if ( v5 || (v5 = getenv("MYSQL_HOME")) != 0 ) v4 += add_directory(a1, v5, v2); v6 = v4 + add_directory(a1, "", v2); v7 = add_directory(a1, "~/", v2); result = 0LL; if ( !(v6 | v7) ) return v2; return result; }
init_default_directories: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDI MOV ESI,0x40 CALL 0x001a1b77 TEST RAX,RAX JZ 0x001b0ba4 MOV RBX,RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX],XMM0 LEA RSI,[0x1e593b] MOV RDI,R14 MOV RDX,RAX CALL 0x001b0fda MOV R12D,EAX LEA RSI,[0x1e5941] MOV RDI,R14 MOV RDX,RBX CALL 0x001b0fda MOV R15D,EAX ADD R15D,R12D LEA RDI,[0x1e594d] CALL 0x0012a610 TEST RAX,RAX JNZ 0x001b0b5c LEA RDI,[0x1e595a] CALL 0x0012a610 TEST RAX,RAX JZ 0x001b0b6d LAB_001b0b5c: MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX CALL 0x001b0fda ADD R15D,EAX LAB_001b0b6d: LEA RSI,[0x1e1575] MOV RDI,R14 MOV RDX,RBX CALL 0x001b0fda MOV R12D,EAX ADD R12D,R15D LEA RSI,[0x1e5965] MOV RDI,R14 MOV RDX,RBX CALL 0x001b0fda MOV ECX,EAX XOR EAX,EAX OR ECX,R12D CMOVZ RAX,RBX JMP 0x001b0ba6 LAB_001b0ba4: XOR EAX,EAX LAB_001b0ba6: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 * init_default_directories(int8 param_1) { int iVar1; int iVar2; int iVar3; int8 *puVar4; char *pcVar5; int8 *puVar6; puVar4 = (int8 *)alloc_root(param_1,0x40); if (puVar4 == (int8 *)0x0) { puVar6 = (int8 *)0x0; } else { puVar4[6] = 0; puVar4[7] = 0; puVar4[4] = 0; puVar4[5] = 0; puVar4[2] = 0; puVar4[3] = 0; *puVar4 = 0; puVar4[1] = 0; iVar1 = add_directory(param_1,"/etc/",puVar4); iVar2 = add_directory(param_1,"/etc/mysql/",puVar4); iVar2 = iVar2 + iVar1; pcVar5 = getenv("MARIADB_HOME"); if ((pcVar5 != (char *)0x0) || (pcVar5 = getenv("MYSQL_HOME"), pcVar5 != (char *)0x0)) { iVar1 = add_directory(param_1,pcVar5,puVar4); iVar2 = iVar2 + iVar1; } iVar1 = add_directory(param_1,"",puVar4); iVar3 = add_directory(param_1,&DAT_001e5965,puVar4); puVar6 = (int8 *)0x0; if (iVar3 == 0 && iVar1 + iVar2 == 0) { puVar6 = puVar4; } } return puVar6; }
11,476
bf_rem
bluesky950520[P]quickjs/libbf.c
int bf_rem(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode) { bf_t q_s, *q = &q_s; int ret; bf_init(r->ctx, q); ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode); bf_delete(q); return ret; }
O1
c
bf_rem: pushq %r14 pushq %rbx subq $0x38, %rsp movl %r8d, %eax movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rsi movq (%rdi), %rdi leaq 0x10(%rsp), %r14 movq %rdi, (%r14) movl $0x0, 0x8(%r14) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq %rdi, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movl %r9d, (%rsp) movq %r14, %rdi movl %eax, %r9d callq 0x85ebb movl %eax, %ebx movq (%r14), %rax testq %rax, %rax je 0x8645c movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x8645c movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r14 retq
bf_rem: push r14 push rbx sub rsp, 38h mov eax, r8d mov r8, rcx mov rcx, rdx mov rdx, rsi mov rsi, rdi mov rdi, [rdi] lea r14, [rsp+48h+var_38] mov [r14], rdi mov dword ptr [r14+8], 0 mov rdi, 8000000000000000h mov [r14+10h], rdi xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov [rsp+48h+var_48], r9d mov rdi, r14 mov r9d, eax call bf_divrem mov ebx, eax mov rax, [r14] test rax, rax jz short loc_8645C mov rsi, [rsp+48h+var_18] test rsi, rsi jz short loc_8645C mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8645C: mov eax, ebx add rsp, 38h pop rbx pop r14 retn
long long bf_rem(__int128 *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6) { unsigned int v6; // ebx _QWORD *v8; // [rsp+10h] [rbp-38h] BYREF int v9; // [rsp+18h] [rbp-30h] unsigned long long v10; // [rsp+20h] [rbp-28h] __int128 v11; // [rsp+28h] [rbp-20h] v8 = *(_QWORD **)a1; v9 = 0; v10 = 0x8000000000000000LL; v11 = 0LL; v6 = bf_divrem(&v8, a1, a2, a3, a4, a5, a6); if ( v8 && *((_QWORD *)&v11 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v8[1])(*v8, *((_QWORD *)&v11 + 1), 0LL); return v6; }
bf_rem: PUSH R14 PUSH RBX SUB RSP,0x38 MOV EAX,R8D MOV R8,RCX MOV RCX,RDX MOV RDX,RSI MOV RSI,RDI MOV RDI,qword ptr [RDI] LEA R14,[RSP + 0x10] MOV qword ptr [R14],RDI MOV dword ptr [R14 + 0x8],0x0 MOV RDI,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV dword ptr [RSP],R9D MOV RDI,R14 MOV R9D,EAX CALL 0x00185ebb MOV EBX,EAX MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0018645c MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x0018645c MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018645c: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R14 RET
int4 bf_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5,int4 param_6) { int4 uVar1; int8 *local_38; int4 local_30; int8 local_28; int8 local_20; long lStack_18; local_38 = (int8 *)*param_1; local_30 = 0; local_28 = 0x8000000000000000; local_20 = 0; lStack_18 = 0; uVar1 = bf_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6); if ((local_38 != (int8 *)0x0) && (lStack_18 != 0)) { (*(code *)local_38[1])(*local_38,lStack_18,0); } return uVar1; }
11,477
bf_rem
bluesky950520[P]quickjs/libbf.c
int bf_rem(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode) { bf_t q_s, *q = &q_s; int ret; bf_init(r->ctx, q); ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode); bf_delete(q); return ret; }
O3
c
bf_rem: pushq %r14 pushq %rbx subq $0x38, %rsp movl %r8d, %eax movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rsi movq (%rdi), %rdi leaq 0x10(%rsp), %r14 movq %rdi, (%r14) movl $0x0, 0x8(%r14) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq %rdi, 0x10(%r14) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r14) movl %r9d, (%rsp) movq %r14, %rdi movl %eax, %r9d callq 0x888f2 movl %eax, %ebx movq (%r14), %rax testq %rax, %rax je 0x88eab movq 0x30(%rsp), %rsi testq %rsi, %rsi je 0x88eab movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl %ebx, %eax addq $0x38, %rsp popq %rbx popq %r14 retq
bf_rem: push r14 push rbx sub rsp, 38h mov eax, r8d mov r8, rcx mov rcx, rdx mov rdx, rsi mov rsi, rdi mov rdi, [rdi] lea r14, [rsp+48h+var_38] mov [r14], rdi mov dword ptr [r14+8], 0 mov rdi, 8000000000000000h mov [r14+10h], rdi xorps xmm0, xmm0 movups xmmword ptr [r14+18h], xmm0 mov [rsp+48h+var_48], r9d mov rdi, r14 mov r9d, eax call bf_divrem mov ebx, eax mov rax, [r14] test rax, rax jz short loc_88EAB mov rsi, [rsp+48h+var_18] test rsi, rsi jz short loc_88EAB mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_88EAB: mov eax, ebx add rsp, 38h pop rbx pop r14 retn
long long bf_rem(__int128 *a1, long long a2, long long a3, long long a4, unsigned int a5, int a6) { unsigned int v6; // ebx _QWORD *v8; // [rsp+10h] [rbp-38h] BYREF int v9; // [rsp+18h] [rbp-30h] unsigned long long v10; // [rsp+20h] [rbp-28h] __int128 v11; // [rsp+28h] [rbp-20h] v8 = *(_QWORD **)a1; v9 = 0; v10 = 0x8000000000000000LL; v11 = 0LL; v6 = bf_divrem(&v8, a1, a2, a3, a4, a5, a6); if ( v8 && *((_QWORD *)&v11 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v8[1])(*v8, *((_QWORD *)&v11 + 1), 0LL); return v6; }
bf_rem: PUSH R14 PUSH RBX SUB RSP,0x38 MOV EAX,R8D MOV R8,RCX MOV RCX,RDX MOV RDX,RSI MOV RSI,RDI MOV RDI,qword ptr [RDI] LEA R14,[RSP + 0x10] MOV qword ptr [R14],RDI MOV dword ptr [R14 + 0x8],0x0 MOV RDI,-0x8000000000000000 MOV qword ptr [R14 + 0x10],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x18],XMM0 MOV dword ptr [RSP],R9D MOV RDI,R14 MOV R9D,EAX CALL 0x001888f2 MOV EBX,EAX MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x00188eab MOV RSI,qword ptr [RSP + 0x30] TEST RSI,RSI JZ 0x00188eab MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00188eab: MOV EAX,EBX ADD RSP,0x38 POP RBX POP R14 RET
int4 bf_rem(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5,int4 param_6) { int4 uVar1; int8 *local_38; int4 local_30; int8 local_28; int8 local_20; long lStack_18; local_38 = (int8 *)*param_1; local_30 = 0; local_28 = 0x8000000000000000; local_20 = 0; lStack_18 = 0; uVar1 = bf_divrem(&local_38,param_1,param_2,param_3,param_4,param_5,param_6); if ((local_38 != (int8 *)0x0) && (lStack_18 != 0)) { (*(code *)local_38[1])(*local_38,lStack_18,0); } return uVar1; }
11,478
js_object_assign
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_assign(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // Object.assign(obj, source1) JSValue obj, s; int i; s = JS_UNDEFINED; obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) goto exception; for (i = 1; i < argc; i++) { if (!JS_IsNull(argv[i]) && !JS_IsUndefined(argv[i])) { s = JS_ToObject(ctx, argv[i]); if (JS_IsException(s)) goto exception; if (JS_CopyDataProperties(ctx, obj, s, JS_UNDEFINED, TRUE)) goto exception; JS_FreeValue(ctx, s); } } return obj; exception: JS_FreeValue(ctx, obj); JS_FreeValue(ctx, s); return JS_EXCEPTION; }
O0
c
js_object_assign: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movl $0x0, 0x48(%rsp) movq $0x3, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x37770 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xbfd56 jmp 0xbfeb9 movl $0x1, 0x5c(%rsp) movl 0x5c(%rsp), %eax cmpl 0x8c(%rsp), %eax jge 0xbfe9d movq 0x80(%rsp), %rax movslq 0x5c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x2e240 cmpl $0x0, %eax jne 0xbfe8b movq 0x80(%rsp), %rax movslq 0x5c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0xbfe8b movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movslq 0x5c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x37770 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xbfe20 jmp 0xbfeb9 movq 0x90(%rsp), %rdi movl $0x0, 0x18(%rsp) movq $0x3, 0x20(%rsp) movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx movq 0x60(%rsp), %rcx movq 0x68(%rsp), %r8 leaq 0x18(%rsp), %rax movl $0x1, %r9d movq (%rax), %r10 movq %r10, (%rsp) movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) callq 0x6a140 cmpl $0x0, %eax je 0xbfe74 jmp 0xbfeb9 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 jmp 0xbfe8d movl 0x5c(%rsp), %eax addl $0x1, %eax movl %eax, 0x5c(%rsp) jmp 0xbfd5e movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0xbfefe movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_object_assign: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov dword ptr [rsp+0B8h+var_70], 0 mov [rsp+0B8h+var_68], 3 mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_50], rax mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToObject mov [rsp+0B8h+var_80], rax mov [rsp+0B8h+var_78], rdx mov rax, [rsp+0B8h+var_80] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_78] mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_48] mov rsi, [rsp+0B8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_BFD56 jmp loc_BFEB9 loc_BFD56: mov [rsp+0B8h+var_5C], 1 loc_BFD5E: mov eax, [rsp+0B8h+var_5C] cmp eax, [rsp+0B8h+var_2C] jge loc_BFE9D mov rax, [rsp+0B8h+var_38] movsxd rcx, [rsp+0B8h+var_5C] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call JS_IsNull_0 cmp eax, 0 jnz loc_BFE8B mov rax, [rsp+0B8h+var_38] movsxd rcx, [rsp+0B8h+var_5C] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call JS_IsUndefined_0 cmp eax, 0 jnz loc_BFE8B mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] movsxd rcx, [rsp+0B8h+var_5C] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_ToObject mov [rsp+0B8h+var_90], rax mov [rsp+0B8h+var_88], rdx mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_50], rax mov rdi, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_BFE20 jmp loc_BFEB9 loc_BFE20: mov rdi, [rsp+0B8h+var_28] mov [rsp+0B8h+var_A0], 0 mov [rsp+0B8h+var_98], 3 mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_40] mov rcx, [rsp+0B8h+var_58] mov r8, [rsp+0B8h+var_50] lea rax, [rsp+0B8h+var_A0] mov r9d, 1 mov r10, [rax] mov [rsp+0B8h+var_B8], r10 mov rax, [rax+8] mov [rsp+0B8h+var_B0], rax call JS_CopyDataProperties cmp eax, 0 jz short loc_BFE74 jmp short loc_BFEB9 loc_BFE74: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue loc_BFE8B: jmp short $+2 loc_BFE8D: mov eax, [rsp+0B8h+var_5C] add eax, 1 mov [rsp+0B8h+var_5C], eax jmp loc_BFD5E loc_BFE9D: mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], rax jmp short loc_BFEFE loc_BFEB9: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_40] call JS_FreeValue mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 loc_BFEFE: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
_DWORD * js_object_assign( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rdx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx double v20; // xmm4_8 double v21; // xmm5_8 long long v23; // [rsp+18h] [rbp-A0h] _DWORD *v24; // [rsp+28h] [rbp-90h] _DWORD *v25; // [rsp+38h] [rbp-80h] long long v26; // [rsp+48h] [rbp-70h] int i; // [rsp+5Ch] [rbp-5Ch] long long v28; // [rsp+60h] [rbp-58h] long long v29; // [rsp+68h] [rbp-50h] long long v30; // [rsp+78h] [rbp-40h] int v32; // [rsp+8Ch] [rbp-2Ch] long long v33; // [rsp+A8h] [rbp-10h] v32 = a12; LODWORD(v26) = 0; v28 = v26; v29 = 3LL; v25 = JS_ToObject(a1, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), a2, a3, a4, a5, a6, a7, a8, a9, a12, a13, a14); v30 = v14; if ( JS_IsException_1((long long)v25, v14) ) { LABEL_11: JS_FreeValue(a1, (long long)v25, v30); JS_FreeValue(a1, v28, v29); LODWORD(v33) = 0; } else { for ( i = 1; i < v32; ++i ) { if ( !JS_IsNull_0(*(_QWORD *)(16LL * i + a13), *(_QWORD *)(16LL * i + a13 + 8)) && !JS_IsUndefined_0(*(_QWORD *)(16LL * i + a13), *(_QWORD *)(16LL * i + a13 + 8)) ) { v24 = JS_ToObject( a1, *(_DWORD **)(16LL * i + a13), *(_QWORD *)(16LL * i + a13 + 8), a2, a3, a4, a5, v17, v18, a8, a9, 16LL * i, v15, v16); v28 = (long long)v24; v29 = v19; if ( JS_IsException_1((long long)v24, v19) ) goto LABEL_11; LODWORD(v23) = 0; if ( (unsigned int)JS_CopyDataProperties( a1, (long long)v25, v30, (long long)v24, v29, 1, a2, a3, a4, a5, v20, v21, a8, a9, v23, 3) ) goto LABEL_11; JS_FreeValue(a1, (long long)v24, v29); } } return v25; } return (_DWORD *)v33; }
js_object_assign: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x3 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00137770 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x78] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001bfd56 JMP 0x001bfeb9 LAB_001bfd56: MOV dword ptr [RSP + 0x5c],0x1 LAB_001bfd5e: MOV EAX,dword ptr [RSP + 0x5c] CMP EAX,dword ptr [RSP + 0x8c] JGE 0x001bfe9d MOV RAX,qword ptr [RSP + 0x80] MOVSXD RCX,dword ptr [RSP + 0x5c] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012e240 CMP EAX,0x0 JNZ 0x001bfe8b MOV RAX,qword ptr [RSP + 0x80] MOVSXD RCX,dword ptr [RSP + 0x5c] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x001bfe8b MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOVSXD RCX,dword ptr [RSP + 0x5c] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00137770 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001bfe20 JMP 0x001bfeb9 LAB_001bfe20: MOV RDI,qword ptr [RSP + 0x90] MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x3 MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x60] MOV R8,qword ptr [RSP + 0x68] LEA RAX,[RSP + 0x18] MOV R9D,0x1 MOV R10,qword ptr [RAX] MOV qword ptr [RSP],R10 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX CALL 0x0016a140 CMP EAX,0x0 JZ 0x001bfe74 JMP 0x001bfeb9 LAB_001bfe74: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 LAB_001bfe8b: JMP 0x001bfe8d LAB_001bfe8d: MOV EAX,dword ptr [RSP + 0x5c] ADD EAX,0x1 MOV dword ptr [RSP + 0x5c],EAX JMP 0x001bfd5e LAB_001bfe9d: MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xb0],RAX JMP 0x001bfefe LAB_001bfeb9: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 LAB_001bfefe: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_object_assign(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; int1 auVar5 [16]; int1 auVar6 [16]; uint uStack_9c; uint uStack_6c; int local_5c; int8 local_58; int8 local_50; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar2; int8 uVar3; int8 uVar4; auVar6._8_8_ = 3; auVar6._0_8_ = (ulong)uStack_6c << 0x20; auVar5 = JS_ToObject(param_1,*param_5,param_5[1]); local_8 = auVar5._8_8_; uVar2 = auVar5._0_8_; iVar1 = JS_IsException(uVar2,local_8); if (iVar1 == 0) { for (local_5c = 1; local_5c < param_4; local_5c = local_5c + 1) { iVar1 = JS_IsNull(param_5[(long)local_5c * 2],(param_5 + (long)local_5c * 2)[1]); if ((iVar1 == 0) && (iVar1 = JS_IsUndefined(param_5[(long)local_5c * 2],(param_5 + (long)local_5c * 2)[1]), iVar1 == 0)) { auVar6 = JS_ToObject(param_1,param_5[(long)local_5c * 2],(param_5 + (long)local_5c * 2)[1]); uVar4 = auVar6._8_8_; uVar3 = auVar6._0_8_; iVar1 = JS_IsException(uVar3,uVar4); if ((iVar1 != 0) || (iVar1 = JS_CopyDataProperties (param_1,uVar2,local_8,uVar3,uVar4,1,(ulong)uStack_9c << 0x20,3), iVar1 != 0)) goto LAB_001bfeb9; JS_FreeValue(param_1,uVar3,uVar4); } } local_10 = auVar5._0_4_; uStack_c = auVar5._4_4_; } else { LAB_001bfeb9: local_50 = auVar6._8_8_; local_58 = auVar6._0_8_; JS_FreeValue(param_1,uVar2,local_8); JS_FreeValue(param_1,local_58,local_50); local_10 = 0; local_8 = 6; } auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
11,479
js_object_assign
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_assign(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // Object.assign(obj, source1) JSValue obj, s; int i; s = JS_UNDEFINED; obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) goto exception; for (i = 1; i < argc; i++) { if (!JS_IsNull(argv[i]) && !JS_IsUndefined(argv[i])) { s = JS_ToObject(ctx, argv[i]); if (JS_IsException(s)) goto exception; if (JS_CopyDataProperties(ctx, obj, s, JS_UNDEFINED, TRUE)) goto exception; JS_FreeValue(ctx, s); } } return obj; exception: JS_FreeValue(ctx, obj); JS_FreeValue(ctx, s); return JS_EXCEPTION; }
O1
c
js_object_assign: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r12 movl %ecx, %ebp movq %rdi, %r15 movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x26ddd cmpl $0x6, %edx jne 0x70b25 movl $0x3, %r13d xorl %ebp, %ebp jmp 0x70bd7 cmpl $0x2, %ebp jl 0x70bf9 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movl %ebp, %r14d shlq $0x4, %r14 addq $-0x10, %r14 xorl %ebx, %ebx movq 0x18(%r12,%rbx), %rdx movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x70bb8 movq 0x10(%r12,%rbx), %rsi movq %r15, %rdi callq 0x26ddd movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x70bcd movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq %rbp, %rcx movq %r13, %r8 movl $0x1, %r9d callq 0x3ff54 testl %eax, %eax jne 0x70bcd movq 0x18(%r15), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 addq $0x10, %rbx cmpq %rbx, %r14 jne 0x70b45 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rax jmp 0x70bf9 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rax movq 0x18(%r15), %rdi movq %rax, %rsi callq 0x1d8c6 movq 0x18(%r15), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 movl $0x6, %edx xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object_assign: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, r8 mov ebp, ecx mov r15, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToObject cmp edx, 6 jnz short loc_70B25 mov r13d, 3 xor ebp, ebp jmp loc_70BD7 loc_70B25: cmp ebp, 2 jl loc_70BF9 mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], rdx mov r14d, ebp shl r14, 4 add r14, 0FFFFFFFFFFFFFFF0h xor ebx, ebx loc_70B45: mov rdx, [r12+rbx+18h] mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jz short loc_70BB8 mov rsi, [r12+rbx+10h] mov rdi, r15 call JS_ToObject mov rbp, rax mov r13, rdx cmp r13d, 6 jz short loc_70BCD mov dword ptr [rsp+68h+var_40], 0 mov qword ptr [rsp+68h+var_40+8], 3 movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov rdi, r15 mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_48] mov rcx, rbp mov r8, r13 mov r9d, 1 call JS_CopyDataProperties test eax, eax jnz short loc_70BCD mov rdi, [r15+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT loc_70BB8: add rbx, 10h cmp r14, rbx jnz short loc_70B45 mov rdx, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] jmp short loc_70BF9 loc_70BCD: mov rdx, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] loc_70BD7: mov rdi, [r15+18h] mov rsi, rax call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov edx, 6 xor eax, eax loc_70BF9: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * js_object_assign( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { int v15; // ebp _DWORD *result; // rax long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v23; // r13 _DWORD *v24; // rbp long long v25; // r14 unsigned long long v26; // rbx _DWORD *v27; // rax long long v28; // rdx double v29; // xmm4_8 double v30; // xmm5_8 unsigned long long v31; // [rsp+18h] [rbp-50h] unsigned long long v32; // [rsp+20h] [rbp-48h] __m128 v33; // [rsp+28h] [rbp-40h] v15 = a12; result = JS_ToObject(a1, *a13, a13[1], a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); if ( (_DWORD)v17 == 6 ) { v23 = 3LL; v24 = 0LL; goto LABEL_12; } if ( v15 >= 2 ) { v31 = (unsigned long long)result; v32 = v17; v25 = 16LL * (unsigned int)v15 - 16; v26 = 0LL; while ( 1 ) { if ( (a13[v26 / 8 + 3] & 0xFFFFFFFE) != 2 ) { v27 = JS_ToObject(a1, a13[v26 / 8 + 2], a13[v26 / 8 + 3], v18, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9); v24 = v27; v23 = v28; if ( (_DWORD)v28 == 6 || (v33.m128_i32[0] = 0, v33.m128_u64[1] = 3LL, a2 = v33, (unsigned int)JS_CopyDataProperties( a1, v31, v32, (long long)v27, v28, 1, *(double *)v33.m128_u64, a3, a4, a5, v29, v30, a8, a9, v33.m128_i64[0], 3)) ) { v17 = v32; result = (_DWORD *)v31; LABEL_12: JS_FreeValueRT(*(_QWORD *)(a1 + 24), result, v17); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v23); return 0LL; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v23); } v26 += 16LL; if ( v25 == v26 ) return (_DWORD *)v31; } } return result; }
11,480
js_object_assign
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_assign(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // Object.assign(obj, source1) JSValue obj, s; int i; s = JS_UNDEFINED; obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) goto exception; for (i = 1; i < argc; i++) { if (!JS_IsNull(argv[i]) && !JS_IsUndefined(argv[i])) { s = JS_ToObject(ctx, argv[i]); if (JS_IsException(s)) goto exception; if (JS_CopyDataProperties(ctx, obj, s, JS_UNDEFINED, TRUE)) goto exception; JS_FreeValue(ctx, s); } } return obj; exception: JS_FreeValue(ctx, obj); JS_FreeValue(ctx, s); return JS_EXCEPTION; }
O2
c
js_object_assign: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r12 movl %ecx, %ebp movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x20b92 cmpl $0x6, %edx jne 0x5ed21 pushq $0x3 popq %r13 xorl %ebp, %ebp jmp 0x5edc6 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movslq %ebp, %r15 addq $0x18, %r12 pushq $0x1 popq %r14 cmpq %r15, %r14 jge 0x5edb0 movq (%r12), %rdx movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax je 0x5eda7 movq -0x8(%r12), %rsi movq %rbx, %rdi callq 0x20b92 movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x5edbc andl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx movq %rbp, %rcx movq %r13, %r8 pushq $0x1 popq %r9 callq 0x38169 testl %eax, %eax jne 0x5edbc movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1801e incq %r14 addq $0x10, %r12 jmp 0x5ed36 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rax jmp 0x5ede4 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rax movq %rbx, %rdi movq %rax, %rsi callq 0x1801e movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1801e pushq $0x6 popq %rdx xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_object_assign: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, r8 mov ebp, ecx mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToObject cmp edx, 6 jnz short loc_5ED21 push 3 pop r13 xor ebp, ebp jmp loc_5EDC6 loc_5ED21: mov [rsp+68h+var_50], rax mov [rsp+68h+var_48], rdx movsxd r15, ebp add r12, 18h push 1 pop r14 loc_5ED36: cmp r14, r15 jge short loc_5EDB0 mov rdx, [r12] mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jz short loc_5EDA7 mov rsi, [r12-8] mov rdi, rbx call JS_ToObject mov rbp, rax mov r13, rdx cmp r13d, 6 jz short loc_5EDBC and dword ptr [rsp+68h+var_40], 0 mov qword ptr [rsp+68h+var_40+8], 3 movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov rdi, rbx mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_48] mov rcx, rbp mov r8, r13 push 1 pop r9 call JS_CopyDataProperties test eax, eax jnz short loc_5EDBC mov rdi, rbx mov rsi, rbp mov rdx, r13 call JS_FreeValue loc_5EDA7: inc r14 add r12, 10h jmp short loc_5ED36 loc_5EDB0: mov rdx, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] jmp short loc_5EDE4 loc_5EDBC: mov rdx, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] loc_5EDC6: mov rdi, rbx mov rsi, rax call JS_FreeValue mov rdi, rbx mov rsi, rbp mov rdx, r13 call JS_FreeValue push 6 pop rdx xor eax, eax loc_5EDE4: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_object_assign( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long *a13, long long a14) { int v15; // ebp long long v16; // rax long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 long long v23; // r13 long long v24; // rbp long long v25; // r15 long long *v26; // r12 long long i; // r14 long long v28; // rax long long v29; // rdx double v30; // xmm4_8 double v31; // xmm5_8 long long v33; // [rsp+18h] [rbp-50h] long long v34; // [rsp+20h] [rbp-48h] __m128 v35; // [rsp+28h] [rbp-40h] v15 = a12; v16 = JS_ToObject(a1, *a13, a13[1], a12, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9); if ( (_DWORD)v17 != 6 ) { v33 = v16; v34 = v17; v25 = v15; v26 = a13 + 3; for ( i = 1LL; ; ++i ) { if ( i >= v25 ) return v33; if ( (*(_DWORD *)v26 & 0xFFFFFFFE) != 2 ) { v28 = JS_ToObject(a1, *(v26 - 1), *v26, v18, v19, v20, a2, a3, a4, a5, v21, v22, a8, a9); v24 = v28; v23 = v29; if ( (_DWORD)v29 == 6 || (v35.m128_i32[0] = 0, v35.m128_u64[1] = 3LL, a2 = v35, (unsigned int)JS_CopyDataProperties( a1, v33, v34, v28, v29, 1, *(double *)v35.m128_u64, a3, a4, a5, v30, v31, a8, a9, v35.m128_i64[0], 3)) ) { v17 = v34; v16 = v33; goto LABEL_12; } JS_FreeValue(a1, v24, v23); } v26 += 2; } } v23 = 3LL; v24 = 0LL; LABEL_12: JS_FreeValue(a1, v16, v17); JS_FreeValue(a1, v24, v23); return 0LL; }
js_object_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,R8 MOV EBP,ECX MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00120b92 CMP EDX,0x6 JNZ 0x0015ed21 PUSH 0x3 POP R13 XOR EBP,EBP JMP 0x0015edc6 LAB_0015ed21: MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOVSXD R15,EBP ADD R12,0x18 PUSH 0x1 POP R14 LAB_0015ed36: CMP R14,R15 JGE 0x0015edb0 MOV RDX,qword ptr [R12] MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JZ 0x0015eda7 MOV RSI,qword ptr [R12 + -0x8] MOV RDI,RBX CALL 0x00120b92 MOV RBP,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x0015edbc AND dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,RBP MOV R8,R13 PUSH 0x1 POP R9 CALL 0x00138169 TEST EAX,EAX JNZ 0x0015edbc MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 CALL 0x0011801e LAB_0015eda7: INC R14 ADD R12,0x10 JMP 0x0015ed36 LAB_0015edb0: MOV RDX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] JMP 0x0015ede4 LAB_0015edbc: MOV RDX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] LAB_0015edc6: MOV RDI,RBX MOV RSI,RAX CALL 0x0011801e MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 CALL 0x0011801e PUSH 0x6 POP RDX XOR EAX,EAX LAB_0015ede4: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_object_assign(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; long lVar2; int1 auVar3 [16]; int1 auVar4 [16]; auVar3 = JS_ToObject(param_1,*param_5,param_5[1]); if (auVar3._8_4_ == 6) { auVar4 = ZEXT816(3) << 0x40; LAB_0015edc6: JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_); JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); auVar3 = ZEXT816(6) << 0x40; } else { param_5 = param_5 + 3; for (lVar2 = 1; lVar2 < param_4; lVar2 = lVar2 + 1) { if (((uint)*param_5 & 0xfffffffe) != 2) { auVar4 = JS_ToObject(param_1,param_5[-1]); if ((auVar4._8_4_ == 6) || (iVar1 = JS_CopyDataProperties (param_1,auVar3._0_8_,auVar3._8_8_,auVar4._0_8_,auVar4._8_8_,1,0,3), iVar1 != 0)) goto LAB_0015edc6; JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); } param_5 = param_5 + 2; } } return auVar3; }
11,481
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_ucs2_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x115a7a movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x110350 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x115a86 jmp 0x115b20 movq -0x48(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x115b40 jmp 0x115a95 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x115ad1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x115b0a movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x115a4a movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_hash_sort_ucs2_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_115A4A: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_115A7A mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_ucs2_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_115A7A: mov al, [rbp+var_59] test al, 1 jnz short loc_115A86 jmp loc_115B20 loc_115A86: mov rdi, [rbp+var_48] lea rsi, [rbp+var_30] call my_tosort_ucs2 jmp short $+2 loc_115A95: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFh imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_115AD1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 8 imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_115B0A: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_115A4A loc_115B20: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_ucs2_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] long long v12; // [rsp+18h] [rbp-48h] unsigned long long v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+2Ch] [rbp-34h] unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF _QWORD *v16; // [rsp+38h] [rbp-28h] unsigned long long *v17; // [rsp+40h] [rbp-20h] long long v18; // [rsp+48h] [rbp-18h] unsigned long long v19; // [rsp+50h] [rbp-10h] long long v20; // [rsp+58h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v13 = a3 + a2; v12 = *(_QWORD *)(a1 + 120); v10 = *a4; v8 = *a5; while ( 1 ) { v7 = 0; if ( v19 < v13 ) { v14 = my_ucs2_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6); v7 = v14 > 0; } if ( !v7 ) break; my_tosort_ucs2(v12, &v15); v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F))); v9 = v8 + 3; v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F))); v8 = v9 + 3; v19 += v14; } *v17 = v10; result = v16; *v16 = v8; return result; }
11,482
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0xcede9 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0xced85 leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0xced8c shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0xcede7 addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0xced68 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_CEDE9 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_CED68: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_CED85 lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_CED8C loc_CED85: shl r10d, 8 or r10, r11 loc_CED8C: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_CEDE7 add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_CED68 loc_CEDE7: pop rbx pop rbp loc_CEDE9: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x001cede9 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_001ced68: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001ced85 LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001ced8c LAB_001ced85: SHL R10D,0x8 OR R10,R11 LAB_001ced8c: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x001cede7 ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x001ced68 LAB_001cede7: POP RBX POP RBP LAB_001cede9: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
11,483
os_event_signal
qoraal-tictactoe/build_O0/_deps/qoraal-src/src/os_posix.c
void os_event_signal (p_event_t* event, uint32_t mask) { if (event && *event) { os_event_t* pevent = (os_event_t*)(*event); pthread_mutex_lock(&pevent->mutex); pevent->flags |= mask; pthread_cond_broadcast(&pevent->cond); // Signal all waiting threads pthread_mutex_unlock(&pevent->mutex); } }
O0
c
os_event_signal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) je 0x1d46b movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x1d46b movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi addq $0x30, %rdi callq 0x65c0 movl -0xc(%rbp), %ecx movq -0x18(%rbp), %rax orl 0x58(%rax), %ecx movl %ecx, 0x58(%rax) movq -0x18(%rbp), %rdi callq 0x60d0 movq -0x18(%rbp), %rdi addq $0x30, %rdi callq 0x63c0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
os_event_signal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jz short loc_1D46B mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_1D46B mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rdi, [rbp+var_18] add rdi, 30h ; '0' call _pthread_mutex_lock mov ecx, [rbp+var_C] mov rax, [rbp+var_18] or ecx, [rax+58h] mov [rax+58h], ecx mov rdi, [rbp+var_18] call _pthread_cond_broadcast mov rdi, [rbp+var_18] add rdi, 30h ; '0' call _pthread_mutex_unlock loc_1D46B: add rsp, 20h pop rbp retn
long long os_event_signal(long long *a1, int a2) { long long result; // rax long long v3; // [rsp+8h] [rbp-18h] if ( a1 ) { result = (long long)a1; if ( *a1 ) { v3 = *a1; pthread_mutex_lock(*a1 + 48); *(_DWORD *)(v3 + 88) |= a2; pthread_cond_broadcast(v3); return pthread_mutex_unlock(v3 + 48); } } return result; }
os_event_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RBP + -0x8],0x0 JZ 0x0011d46b MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0011d46b MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30 CALL 0x001065c0 MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] OR ECX,dword ptr [RAX + 0x58] MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001060d0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30 CALL 0x001063c0 LAB_0011d46b: ADD RSP,0x20 POP RBP RET
void os_event_signal(long *param_1,uint param_2) { pthread_cond_t *__cond; if ((param_1 != (long *)0x0) && (*param_1 != 0)) { __cond = (pthread_cond_t *)*param_1; pthread_mutex_lock((pthread_mutex_t *)(__cond + 1)); *(uint *)((long)__cond + 0x58) = param_2 | *(uint *)((long)__cond + 0x58); pthread_cond_broadcast(__cond); pthread_mutex_unlock((pthread_mutex_t *)(__cond + 1)); } return; }
11,484
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t)
llama.cpp/common/json.hpp
serializer(output_adapter_t<char> s, const char ichar, error_handler_t error_handler_ = error_handler_t::strict) : o(std::move(s)) , loc(std::localeconv()) , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep))) , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point))) , indent_char(ichar) , indent_string(512, indent_char) , error_handler(error_handler_) {}
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebx movl %edx, %ebp movq %rdi, %r14 xorl %r15d, %r15d movq %r15, 0x8(%rdi) movups (%rsi), %xmm0 movq %r15, 0x8(%rsi) movups %xmm0, (%rdi) movq %r15, (%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x30(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) callq 0x20100 movq %rax, 0x50(%r14) movq 0x8(%rax), %rcx testq %rcx, %rcx je 0x7c78a movb (%rcx), %r15b movb %r15b, 0x58(%r14) movq (%rax), %rax testq %rax, %rax je 0x7c79a movb (%rax), %al jmp 0x7c79c xorl %eax, %eax leaq 0x8(%r14), %r15 movb %al, 0x59(%r14) leaq 0x5a(%r14), %rdi movl $0x200, %edx # imm = 0x200 xorl %esi, %esi callq 0x20500 movb %bpl, 0x25a(%r14) leaq 0x260(%r14), %rdi leaq 0x270(%r14), %rax movq %rax, 0x260(%r14) movsbl %bpl, %edx movl $0x200, %esi # imm = 0x200 callq 0x209e0 movl %ebx, 0x280(%r14) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq %r15, %rdi callq 0x6f712 movq %rbx, %rdi callq 0x20b00 nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE: push rbp push r15 push r14 push rbx push rax mov ebx, ecx mov ebp, edx mov r14, rdi xor r15d, r15d mov [rdi+8], r15 movups xmm0, xmmword ptr [rsi] mov [rsi+8], r15 movups xmmword ptr [rdi], xmm0 mov [rsi], r15 xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 call _localeconv mov [r14+50h], rax mov rcx, [rax+8] test rcx, rcx jz short loc_7C78A mov r15b, [rcx] loc_7C78A: mov [r14+58h], r15b mov rax, [rax] test rax, rax jz short loc_7C79A mov al, [rax] jmp short loc_7C79C loc_7C79A: xor eax, eax loc_7C79C: lea r15, [r14+8] mov [r14+59h], al lea rdi, [r14+5Ah] mov edx, 200h xor esi, esi call _memset mov [r14+25Ah], bpl lea rdi, [r14+260h] lea rax, [r14+270h] mov [r14+260h], rax movsx edx, bpl mov esi, 200h call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov [r14+280h], ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer( long long a1, __int128 *a2, char a3, int a4) { char v6; // r15 __int128 v7; // xmm0 long long v8; // rax char *v9; // rcx char *v10; // rax char v11; // al long long result; // rax v6 = 0; *(_QWORD *)(a1 + 8) = 0LL; v7 = *a2; *((_QWORD *)a2 + 1) = 0LL; *(_OWORD *)a1 = v7; *(_QWORD *)a2 = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 16) = 0LL; v8 = localeconv(a1); *(_QWORD *)(a1 + 80) = v8; v9 = *(char **)(v8 + 8); if ( v9 ) v6 = *v9; *(_BYTE *)(a1 + 88) = v6; v10 = *(char **)v8; if ( v10 ) v11 = *v10; else v11 = 0; *(_BYTE *)(a1 + 89) = v11; memset(a1 + 90, 0LL, 512LL); *(_BYTE *)(a1 + 602) = a3; *(_QWORD *)(a1 + 608) = a1 + 624; result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3); *(_DWORD *)(a1 + 640) = a4; return result; }
serializer: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,ECX MOV EBP,EDX MOV R14,RDI XOR R15D,R15D MOV qword ptr [RDI + 0x8],R15 MOVUPS XMM0,xmmword ptr [RSI] MOV qword ptr [RSI + 0x8],R15 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSI],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 CALL 0x00120100 MOV qword ptr [R14 + 0x50],RAX MOV RCX,qword ptr [RAX + 0x8] TEST RCX,RCX JZ 0x0017c78a MOV R15B,byte ptr [RCX] LAB_0017c78a: MOV byte ptr [R14 + 0x58],R15B MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0017c79a MOV AL,byte ptr [RAX] JMP 0x0017c79c LAB_0017c79a: XOR EAX,EAX LAB_0017c79c: LEA R15,[R14 + 0x8] MOV byte ptr [R14 + 0x59],AL LEA RDI,[R14 + 0x5a] MOV EDX,0x200 XOR ESI,ESI CALL 0x00120500 MOV byte ptr [R14 + 0x25a],BPL LEA RDI,[R14 + 0x260] LEA RAX,[R14 + 0x270] MOV qword ptr [R14 + 0x260],RAX LAB_0017c7d0: MOVSX EDX,BPL MOV ESI,0x200 CALL 0x001209e0 LAB_0017c7de: MOV dword ptr [R14 + 0x280],EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char> >, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::serializer(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,int8 *param_2, serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> param_3,int4 param_4) { int8 uVar1; serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> sVar2; lconv *plVar3; sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; *(int8 *)(this + 8) = 0; uVar1 = param_2[1]; param_2[1] = 0; *(int8 *)this = *param_2; *(int8 *)(this + 8) = uVar1; *param_2 = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; plVar3 = localeconv(); *(lconv **)(this + 0x50) = plVar3; if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->thousands_sep != (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)0x0) { sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->thousands_sep; } this[0x58] = sVar2; if ((serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->decimal_point == (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)0x0) { sVar2 = (serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> )0x0; } else { sVar2 = *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *)plVar3->decimal_point; } this[0x59] = sVar2; memset(this + 0x5a,0,0x200); this[0x25a] = param_3; *(serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> **)(this + 0x260) = this + 0x270; /* try { // try from 0017c7d0 to 0017c7dd has its CatchHandler @ 0017c7f0 */ std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0'); *(int4 *)(this + 0x280) = param_4; return; }
11,485
std::pair<coro::net::send_status, std::span<char const, 18446744073709551615ul>> coro::net::tcp::client::send<std::basic_string_view<char, std::char_traits<char>>>(std::basic_string_view<char, std::char_traits<char>> const&)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/net/tcp/client.hpp
auto send(const buffer_type& buffer) -> std::pair<send_status, std::span<const char>> { // If the user requested zero bytes, just return. if (buffer.empty()) { return {send_status::ok, std::span<const char>{buffer.data(), buffer.size()}}; } auto bytes_sent = ::send(m_socket.native_handle(), buffer.data(), buffer.size(), 0); if (bytes_sent >= 0) { // Some or all of the bytes were written. return {send_status::ok, std::span<const char>{buffer.data() + bytes_sent, buffer.size() - bytes_sent}}; } else { // Due to the error none of the bytes were written. return {static_cast<send_status>(errno), std::span<const char>{buffer.data(), buffer.size()}}; } }
O3
cpp
std::pair<coro::net::send_status, std::span<char const, 18446744073709551615ul>> coro::net::tcp::client::send<std::basic_string_view<char, std::char_traits<char>>>(std::basic_string_view<char, std::char_traits<char>> const&): pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx movq (%rdx), %rdx testq %rdx, %rdx je 0x575e movl 0x28(%rsi), %edi movq 0x8(%r14), %rsi xorl %ecx, %ecx callq 0x3170 testq %rax, %rax js 0x5768 movq 0x8(%r14), %rcx addq %rax, %rcx movq (%r14), %rdx subq %rax, %rdx xorl %eax, %eax jmp 0x5777 movq 0x8(%r14), %rcx xorl %eax, %eax xorl %edx, %edx jmp 0x5777 callq 0x3030 movslq (%rax), %rax movq (%r14), %rdx movq 0x8(%r14), %rcx movq %rax, (%rbx) movq %rcx, 0x8(%rbx) movq %rdx, 0x10(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferESt17basic_string_viewIcSt11char_traitsIcEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_: push r14 push rbx push rax mov r14, rdx mov rbx, rdi mov rdx, [rdx] test rdx, rdx jz short loc_575E mov edi, [rsi+28h] mov rsi, [r14+8] xor ecx, ecx call _send test rax, rax js short loc_5768 mov rcx, [r14+8] add rcx, rax mov rdx, [r14] sub rdx, rax xor eax, eax jmp short loc_5777 loc_575E: mov rcx, [r14+8] xor eax, eax xor edx, edx jmp short loc_5777 loc_5768: call ___errno_location movsxd rax, dword ptr [rax] mov rdx, [r14] mov rcx, [r14+8] loc_5777: mov [rbx], rax mov [rbx+8], rcx mov [rbx+10h], rdx mov rax, rbx add rsp, 8 pop rbx pop r14 retn
_QWORD * ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferESt17basic_string_viewIcSt11char_traitsIcEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_( _QWORD *a1, long long a2, long long *a3) { long long v5; // rdx long long v6; // rdi long long v7; // rax long long v8; // rcx long long v9; // rdx long long v10; // rax v5 = *a3; if ( v5 ) { v6 = *(unsigned int *)(a2 + 40); v7 = send(v6, a3[1], v5, 0LL); if ( v7 < 0 ) { v10 = *(int *)__errno_location(v6); v9 = *a3; v8 = a3[1]; } else { v8 = v7 + a3[1]; v9 = *a3 - v7; v10 = 0LL; } } else { v8 = a3[1]; v10 = 0LL; v9 = 0LL; } *a1 = v10; a1[1] = v8; a1[2] = v9; return a1; }
_ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferESt17basic_string_viewIcSt11char_traitsIcEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI MOV RDX,qword ptr [RDX] TEST RDX,RDX JZ 0x0010575e MOV EDI,dword ptr [RSI + 0x28] MOV RSI,qword ptr [R14 + 0x8] XOR ECX,ECX CALL 0x00103170 TEST RAX,RAX JS 0x00105768 MOV RCX,qword ptr [R14 + 0x8] ADD RCX,RAX MOV RDX,qword ptr [R14] SUB RDX,RAX XOR EAX,EAX JMP 0x00105777 LAB_0010575e: MOV RCX,qword ptr [R14 + 0x8] XOR EAX,EAX XOR EDX,EDX JMP 0x00105777 LAB_00105768: CALL 0x00103030 MOVSXD RAX,dword ptr [RAX] MOV RDX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] LAB_00105777: MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],RDX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
long * _ZN4coro3net3tcp6client4sendITkNS_8concepts12const_bufferESt17basic_string_viewIcSt11char_traitsIcEEEESt4pairINS0_11send_statusESt4spanIKcLm18446744073709551615EEERKT_ (long *param_1,long param_2,size_t *param_3) { ssize_t sVar1; int *piVar2; long lVar3; size_t sVar4; size_t sVar5; if (*param_3 == 0) { sVar4 = param_3[1]; lVar3 = 0; sVar5 = 0; } else { sVar1 = send(*(int *)(param_2 + 0x28),(void *)param_3[1],*param_3,0); if (sVar1 < 0) { piVar2 = __errno_location(); lVar3 = (long)*piVar2; sVar5 = *param_3; sVar4 = param_3[1]; } else { sVar4 = param_3[1] + sVar1; sVar5 = *param_3 - sVar1; lVar3 = 0; } } *param_1 = lVar3; param_1[1] = sVar4; param_1[2] = sVar5; return param_1; }
11,486
ma_pvio_start_ssl
eloqsql/libmariadb/libmariadb/ma_pvio.c
my_bool ma_pvio_start_ssl(MARIADB_PVIO *pvio) { if (!pvio || !pvio->mysql) return 1; CLEAR_CLIENT_ERROR(pvio->mysql); if (!(pvio->ctls= ma_pvio_tls_init(pvio->mysql))) { return 1; } if (ma_pvio_tls_connect(pvio->ctls)) { free(pvio->ctls); pvio->ctls= NULL; return 1; } /* default behaviour: 1. peer certificate verification 2. verify CN (requires option ssl_verify_check) 3. verrify finger print */ if ((pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && ma_pvio_tls_verify_server_cert(pvio->ctls)) return 1; if (pvio->mysql->options.extension && ((pvio->mysql->options.extension->tls_fp && pvio->mysql->options.extension->tls_fp[0]) || (pvio->mysql->options.extension->tls_fp_list && pvio->mysql->options.extension->tls_fp_list[0]))) { if (ma_pvio_tls_check_fp(pvio->ctls, pvio->mysql->options.extension->tls_fp, pvio->mysql->options.extension->tls_fp_list)) return 1; } return 0; }
O3
c
ma_pvio_start_ssl: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movb $0x1, %bl testq %rdi, %rdi je 0x221d8 movq %rdi, %r14 movq 0x40(%rdi), %rax testq %rax, %rax je 0x221d8 movl $0x0, 0x90(%rax) movq 0x40(%r14), %rax movw $0x30, 0x29b(%rax) movl $0x30303030, 0x297(%rax) # imm = 0x30303030 movq 0x40(%r14), %rax movb $0x0, 0x97(%rax) movq 0x40(%r14), %rdi movq 0x2a0(%rdi), %rax testq %rax, %rax je 0x22143 movl $0x0, 0x4(%rax) movq 0x40(%r14), %rdi callq 0x22254 movq %rax, 0x38(%r14) testq %rax, %rax je 0x221d8 movq %rax, %rdi callq 0x222bc testb %al, %al je 0x22174 movq 0x38(%r14), %rdi callq 0x13580 movq $0x0, 0x38(%r14) jmp 0x221d8 movq 0x40(%r14), %rax testb $0x40, 0x36b(%rax) je 0x22192 movq 0x38(%r14), %rdi callq 0x22300 testl %eax, %eax jne 0x221d8 movq 0x40(%r14), %rax movq 0x480(%rax), %rax testq %rax, %rax je 0x221d6 movq 0x90(%rax), %rsi testq %rsi, %rsi je 0x221b8 cmpb $0x0, (%rsi) je 0x221b8 movq 0x98(%rax), %rdx jmp 0x221c9 movq 0x98(%rax), %rdx testq %rdx, %rdx je 0x221d6 cmpb $0x0, (%rdx) je 0x221d6 movq 0x38(%r14), %rdi callq 0x22350 testb %al, %al jne 0x221d8 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq
ma_pvio_start_ssl: push rbp mov rbp, rsp push r14 push rbx mov bl, 1 test rdi, rdi jz loc_221D8 mov r14, rdi mov rax, [rdi+40h] test rax, rax jz loc_221D8 mov dword ptr [rax+90h], 0 mov rax, [r14+40h] mov word ptr [rax+29Bh], 30h ; '0' mov dword ptr [rax+297h], 30303030h mov rax, [r14+40h] mov byte ptr [rax+97h], 0 mov rdi, [r14+40h] mov rax, [rdi+2A0h] test rax, rax jz short loc_22143 mov dword ptr [rax+4], 0 mov rdi, [r14+40h] loc_22143: call ma_pvio_tls_init mov [r14+38h], rax test rax, rax jz loc_221D8 mov rdi, rax call ma_pvio_tls_connect test al, al jz short loc_22174 mov rdi, [r14+38h] call _free mov qword ptr [r14+38h], 0 jmp short loc_221D8 loc_22174: mov rax, [r14+40h] test byte ptr [rax+36Bh], 40h jz short loc_22192 mov rdi, [r14+38h] call ma_pvio_tls_verify_server_cert test eax, eax jnz short loc_221D8 mov rax, [r14+40h] loc_22192: mov rax, [rax+480h] test rax, rax jz short loc_221D6 mov rsi, [rax+90h] test rsi, rsi jz short loc_221B8 cmp byte ptr [rsi], 0 jz short loc_221B8 mov rdx, [rax+98h] jmp short loc_221C9 loc_221B8: mov rdx, [rax+98h] test rdx, rdx jz short loc_221D6 cmp byte ptr [rdx], 0 jz short loc_221D6 loc_221C9: mov rdi, [r14+38h] call ma_pvio_tls_check_fp test al, al jnz short loc_221D8 loc_221D6: xor ebx, ebx loc_221D8: mov eax, ebx pop rbx pop r14 pop rbp retn
long long ma_pvio_start_ssl(long long a1) { unsigned int v1; // ebx long long v3; // rax long long v4; // rdi long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax _BYTE *v9; // rsi _BYTE *v10; // rdx LOBYTE(v1) = 1; if ( a1 ) { v3 = *(_QWORD *)(a1 + 64); if ( v3 ) { *(_DWORD *)(v3 + 144) = 0; strcpy((char *)(*(_QWORD *)(a1 + 64) + 663LL), "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 64) + 151LL) = 0; v4 = *(_QWORD *)(a1 + 64); v5 = *(_QWORD *)(v4 + 672); if ( v5 ) { *(_DWORD *)(v5 + 4) = 0; v4 = *(_QWORD *)(a1 + 64); } v6 = ma_pvio_tls_init(v4); *(_QWORD *)(a1 + 56) = v6; if ( v6 ) { if ( (unsigned __int8)ma_pvio_tls_connect(v6) ) { free(*(_QWORD *)(a1 + 56)); *(_QWORD *)(a1 + 56) = 0LL; return v1; } v7 = *(_QWORD *)(a1 + 64); if ( (*(_BYTE *)(v7 + 875) & 0x40) != 0 ) { if ( (unsigned int)ma_pvio_tls_verify_server_cert(*(_QWORD *)(a1 + 56)) ) return v1; v7 = *(_QWORD *)(a1 + 64); } v8 = *(_QWORD *)(v7 + 1152); if ( v8 ) { v9 = *(_BYTE **)(v8 + 144); if ( v9 && *v9 ) { v10 = *(_BYTE **)(v8 + 152); } else { v10 = *(_BYTE **)(v8 + 152); if ( !v10 || !*v10 ) return 0; } if ( (unsigned __int8)ma_pvio_tls_check_fp(*(_QWORD *)(a1 + 56), v9, v10) ) return v1; } return 0; } } } return v1; }
ma_pvio_start_ssl: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV BL,0x1 TEST RDI,RDI JZ 0x001221d8 MOV R14,RDI MOV RAX,qword ptr [RDI + 0x40] TEST RAX,RAX JZ 0x001221d8 MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [R14 + 0x40] MOV word ptr [RAX + 0x29b],0x30 MOV dword ptr [RAX + 0x297],0x30303030 MOV RAX,qword ptr [R14 + 0x40] MOV byte ptr [RAX + 0x97],0x0 MOV RDI,qword ptr [R14 + 0x40] MOV RAX,qword ptr [RDI + 0x2a0] TEST RAX,RAX JZ 0x00122143 MOV dword ptr [RAX + 0x4],0x0 MOV RDI,qword ptr [R14 + 0x40] LAB_00122143: CALL 0x00122254 MOV qword ptr [R14 + 0x38],RAX TEST RAX,RAX JZ 0x001221d8 MOV RDI,RAX CALL 0x001222bc TEST AL,AL JZ 0x00122174 MOV RDI,qword ptr [R14 + 0x38] CALL 0x00113580 MOV qword ptr [R14 + 0x38],0x0 JMP 0x001221d8 LAB_00122174: MOV RAX,qword ptr [R14 + 0x40] TEST byte ptr [RAX + 0x36b],0x40 JZ 0x00122192 MOV RDI,qword ptr [R14 + 0x38] CALL 0x00122300 TEST EAX,EAX JNZ 0x001221d8 MOV RAX,qword ptr [R14 + 0x40] LAB_00122192: MOV RAX,qword ptr [RAX + 0x480] TEST RAX,RAX JZ 0x001221d6 MOV RSI,qword ptr [RAX + 0x90] TEST RSI,RSI JZ 0x001221b8 CMP byte ptr [RSI],0x0 JZ 0x001221b8 MOV RDX,qword ptr [RAX + 0x98] JMP 0x001221c9 LAB_001221b8: MOV RDX,qword ptr [RAX + 0x98] TEST RDX,RDX JZ 0x001221d6 CMP byte ptr [RDX],0x0 JZ 0x001221d6 LAB_001221c9: MOV RDI,qword ptr [R14 + 0x38] CALL 0x00122350 TEST AL,AL JNZ 0x001221d8 LAB_001221d6: XOR EBX,EBX LAB_001221d8: MOV EAX,EBX POP RBX POP R14 POP RBP RET
ulong ma_pvio_start_ssl(long param_1) { char *pcVar1; char cVar2; int iVar3; long lVar4; char *pcVar5; int8 unaff_RBX; ulong uVar6; uVar6 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if ((param_1 == 0) || (*(long *)(param_1 + 0x40) == 0)) goto LAB_001221d8; *(int4 *)(*(long *)(param_1 + 0x40) + 0x90) = 0; lVar4 = *(long *)(param_1 + 0x40); *(int2 *)(lVar4 + 0x29b) = 0x30; *(int4 *)(lVar4 + 0x297) = 0x30303030; *(int1 *)(*(long *)(param_1 + 0x40) + 0x97) = 0; lVar4 = *(long *)(param_1 + 0x40); if (*(long *)(lVar4 + 0x2a0) != 0) { *(int4 *)(*(long *)(lVar4 + 0x2a0) + 4) = 0; lVar4 = *(long *)(param_1 + 0x40); } lVar4 = ma_pvio_tls_init(lVar4); *(long *)(param_1 + 0x38) = lVar4; if (lVar4 == 0) goto LAB_001221d8; cVar2 = ma_pvio_tls_connect(lVar4); if (cVar2 != '\0') { free(*(void **)(param_1 + 0x38)); *(int8 *)(param_1 + 0x38) = 0; goto LAB_001221d8; } lVar4 = *(long *)(param_1 + 0x40); if ((*(byte *)(lVar4 + 0x36b) & 0x40) != 0) { iVar3 = ma_pvio_tls_verify_server_cert(*(int8 *)(param_1 + 0x38)); if (iVar3 != 0) goto LAB_001221d8; lVar4 = *(long *)(param_1 + 0x40); } lVar4 = *(long *)(lVar4 + 0x480); if (lVar4 != 0) { pcVar1 = *(char **)(lVar4 + 0x90); if ((pcVar1 == (char *)0x0) || (*pcVar1 == '\0')) { pcVar5 = *(char **)(lVar4 + 0x98); if ((pcVar5 == (char *)0x0) || (*pcVar5 == '\0')) goto LAB_001221d6; } else { pcVar5 = *(char **)(lVar4 + 0x98); } cVar2 = ma_pvio_tls_check_fp(*(int8 *)(param_1 + 0x38),pcVar1,pcVar5); if (cVar2 != '\0') goto LAB_001221d8; } LAB_001221d6: uVar6 = 0; LAB_001221d8: return uVar6 & 0xffffffff; }
11,487
ImPlot::EndItem()
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
void EndItem() { ImPlotContext& gp = *GImPlot; // pop rendering clip rect PopPlotClipRect(); // reset next item data gp.NextItemData.Reset(); // set current item gp.PreviousItem = gp.CurrentItem; gp.CurrentItem = nullptr; }
O1
cpp
ImPlot::EndItem(): pushq %rbx leaq 0x26c9aa(%rip), %rax # 0x336ca0 movq (%rax), %rbx callq 0xbd912 leaq 0x538(%rbx), %rdi callq 0xc7cc2 movq 0x68(%rbx), %rax movq %rax, 0x70(%rbx) movq $0x0, 0x68(%rbx) popq %rbx retq
_ZN6ImPlot7EndItemEv: push rbx lea rax, GImPlot mov rbx, [rax] call _ZN6ImPlot15PopPlotClipRectEv; ImPlot::PopPlotClipRect(void) lea rdi, [rbx+538h]; this call _ZN18ImPlotNextItemData5ResetEv; ImPlotNextItemData::Reset(void) mov rax, [rbx+68h] mov [rbx+70h], rax mov qword ptr [rbx+68h], 0 pop rbx retn
long long ImPlot::EndItem(ImPlot *this, const char *a2) { ImGui *v2; // rbx long long result; // rax v2 = GImPlot; ImPlot::PopPlotClipRect(this, a2); ImPlotNextItemData::Reset((ImGui *)((char *)v2 + 1336)); result = *((_QWORD *)v2 + 13); *((_QWORD *)v2 + 14) = result; *((_QWORD *)v2 + 13) = 0LL; return result; }
EndItem: PUSH RBX LEA RAX,[0x436ca0] MOV RBX,qword ptr [RAX] CALL 0x001bd912 LEA RDI,[RBX + 0x538] CALL 0x001c7cc2 MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x70],RAX MOV qword ptr [RBX + 0x68],0x0 POP RBX RET
/* ImPlot::EndItem() */ void ImPlot::EndItem(void) { long lVar1; lVar1 = GImPlot; PopPlotClipRect(); ImPlotNextItemData::Reset((ImPlotNextItemData *)(lVar1 + 0x538)); *(int8 *)(lVar1 + 0x70) = *(int8 *)(lVar1 + 0x68); *(int8 *)(lVar1 + 0x68) = 0; return; }
11,488
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget()
llama.cpp/common/json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget(): movb $0x1, 0x18(%rdi) decq 0x20(%rdi) movq 0x28(%rdi), %rax testq %rax, %rax je 0x848cd leaq 0x28(%rdi), %rcx jmp 0x848da movq 0x30(%rdi), %rax testq %rax, %rax je 0x848e0 leaq 0x30(%rdi), %rcx decq %rax movq %rax, (%rcx) cmpl $-0x1, 0x14(%rdi) je 0x848f7 movq 0x40(%rdi), %rax cmpq %rax, 0x38(%rdi) je 0x848f8 decq %rax movq %rax, 0x40(%rdi) retq pushq %rax leaq 0x93c08(%rip), %rdi # 0x118508 leaq 0x93c3c(%rip), %rdx # 0x118543 leaq 0x93dbb(%rip), %rcx # 0x1186c9 movl $0x2240, %esi # imm = 0x2240 xorl %eax, %eax callq 0x20e00
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv: mov byte ptr [rdi+18h], 1 dec qword ptr [rdi+20h] mov rax, [rdi+28h] test rax, rax jz short loc_848CD lea rcx, [rdi+28h] jmp short loc_848DA loc_848CD: mov rax, [rdi+30h] test rax, rax jz short loc_848E0 lea rcx, [rdi+30h] loc_848DA: dec rax mov [rcx], rax loc_848E0: cmp dword ptr [rdi+14h], 0FFFFFFFFh jz short locret_848F7 mov rax, [rdi+40h] cmp [rdi+38h], rax jz short loc_848F8 dec rax mov [rdi+40h], rax locret_848F7: retn loc_848F8: push rax lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenStringEmp; "!token_string.empty()" mov esi, 2240h xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget( long long a1) { long long result; // rax _QWORD *v2; // rcx long long v3; // rax *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); result = *(_QWORD *)(a1 + 40); if ( result ) { v2 = (_QWORD *)(a1 + 40); } else { result = *(_QWORD *)(a1 + 48); if ( !result ) goto LABEL_6; v2 = (_QWORD *)(a1 + 48); } *v2 = --result; LABEL_6: if ( *(_DWORD *)(a1 + 20) != -1 ) { v3 = *(_QWORD *)(a1 + 64); if ( *(_QWORD *)(a1 + 56) == v3 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 8768LL, "GGML_ASSERT(%s) failed", "!token_string.empty()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp"); } else { result = v3 - 1; *(_QWORD *)(a1 + 64) = result; } } return result; }
unget: MOV byte ptr [RDI + 0x18],0x1 DEC qword ptr [RDI + 0x20] MOV RAX,qword ptr [RDI + 0x28] TEST RAX,RAX JZ 0x001848cd LEA RCX,[RDI + 0x28] JMP 0x001848da LAB_001848cd: MOV RAX,qword ptr [RDI + 0x30] TEST RAX,RAX JZ 0x001848e0 LEA RCX,[RDI + 0x30] LAB_001848da: DEC RAX MOV qword ptr [RCX],RAX LAB_001848e0: CMP dword ptr [RDI + 0x14],-0x1 JZ 0x001848f7 MOV RAX,qword ptr [RDI + 0x40] CMP qword ptr [RDI + 0x38],RAX JZ 0x001848f8 DEC RAX MOV qword ptr [RDI + 0x40],RAX LAB_001848f7: RET LAB_001848f8: PUSH RAX LEA RDI,[0x218508] LEA RDX,[0x218543] LEA RCX,[0x2186c9] MOV ESI,0x2240 XOR EAX,EAX CALL 0x00120e00
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::unget() */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { long lVar1; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *plVar2; int8 in_R8; int8 in_R9; this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1; *(long *)(this + 0x20) = *(long *)(this + 0x20) + -1; lVar1 = *(long *)(this + 0x28); if (lVar1 == 0) { lVar1 = *(long *)(this + 0x30); if (lVar1 == 0) goto LAB_001848e0; plVar2 = this + 0x30; } else { plVar2 = this + 0x28; } *(long *)plVar2 = lVar1 + -1; LAB_001848e0: if (*(int *)(this + 0x14) != -1) { lVar1 = *(long *)(this + 0x40); if (*(long *)(this + 0x38) == lVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x2240, "GGML_ASSERT(%s) failed","!token_string.empty()",in_R8,in_R9,lVar1); } *(long *)(this + 0x40) = lVar1 + -1; } return; }
11,489
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
llama.cpp/common/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O3
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x9f44d testq %rax, %rax je 0x9f4ab movzbl (%rax), %eax cmpl $0x2, %eax je 0x9f42d cmpl $0x1, %eax jne 0x9f437 movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x9f43f movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x9f43f movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x23850 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xa2dbc(%rip), %rsi # 0x142226 leaq 0xa2de5(%rip), %rdx # 0x142256 leaq 0x8(%rsp), %rdi callq 0x2cd14 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x9f500 xorl %ebp, %ebp leaq 0xedb64(%rip), %rsi # 0x18d000 leaq -0x3923(%rip), %rdx # 0x9bb80 movq %rbx, %rdi callq 0x23e00 leaq 0xa1d75(%rip), %rdi # 0x141227 leaq 0x9931c(%rip), %rdx # 0x1387d5 leaq 0xa7b07(%rip), %rcx # 0x146fc7 movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x24340 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x9f4e6 movq 0x18(%rsp), %rsi incq %rsi callq 0x231f0 testb %bpl, %bpl jne 0x9f4f0 jmp 0x9f4f8 movq %rax, %r14 movq %rbx, %rdi callq 0x24440 movq %r14, %rdi callq 0x23ee0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: push rbp; void * push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_9F44D test rax, rax jz loc_9F4AB movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_9F42D cmp eax, 1 jnz short loc_9F437 mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_9F43F loc_9F42D: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_9F43F loc_9F437: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_9F43F: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_9F44D: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_9F4AB: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_9F4E6 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9F4E6: test bpl, bpl jnz short loc_9F4F0 jmp short loc_9F4F8 mov r14, rax loc_9F4F0: mov rdi, rbx; void * call ___cxa_free_exception loc_9F4F8: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0019f44d TEST RAX,RAX JZ 0x0019f4ab MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0019f42d CMP EAX,0x1 JNZ 0x0019f437 MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0019f43f LAB_0019f42d: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0019f43f LAB_0019f437: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0019f43f: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0019f44d: MOV EDI,0x20 CALL 0x00123850 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0019f463: LEA RSI,[0x242226] LEA RDX,[0x242256] LEA RDI,[RSP + 0x8] CALL 0x0012cd14 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0019f481: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0019f500 XOR EBP,EBP LEA RSI,[0x28d000] LEA RDX,[0x19bb80] MOV RDI,RBX CALL 0x00123e00 LAB_0019f4ab: LEA RDI,[0x241227] LEA RDX,[0x2387d5] LEA RCX,[0x246fc7] MOV ESI,0x3422 XOR EAX,EAX CALL 0x00124340
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0019f463 to 0019f47a has its CatchHandler @ 0019f4ed */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0019f481 to 0019f4aa has its CatchHandler @ 0019f4cc */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
11,490
mysql_stmt_fetch_column@libmariadbclient_18
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, unsigned int column, unsigned long offset) { if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count || stmt->state == MYSQL_STMT_FETCH_DONE) { SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->bind[column].u.row_ptr) { /* we set row_ptr only for columns which contain data, so this must be a NULL column */ if (bind[0].is_null) *bind[0].is_null= 1; } else { unsigned char *save_ptr; if (bind[0].length) *bind[0].length= *stmt->bind[column].length; else bind[0].length= &stmt->bind[column].length_value; if (bind[0].is_null) *bind[0].is_null= 0; else bind[0].is_null= &bind[0].is_null_value; if (!bind[0].error) bind[0].error= &bind[0].error_value; *bind[0].error= 0; bind[0].offset= offset; save_ptr= stmt->bind[column].u.row_ptr; mysql_ps_fetch_functions[stmt->fields[column].type].func(&bind[0], &stmt->fields[column], &stmt->bind[column].u.row_ptr); stmt->bind[column].u.row_ptr= save_ptr; } return(0); }
O0
c
mysql_stmt_fetch_column@libmariadbclient_18: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax cmpl $0x5, 0x50(%rax) jb 0x36e67 movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x60(%rcx), %eax jae 0x36e67 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jne 0x36edb jmp 0x36e69 movq -0x10(%rbp), %rax movl $0x803, 0x108(%rax) # imm = 0x803 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x2c217(%rip), %rax # 0x630a0 movq (%rax), %rsi movl $0x5, %edx callq 0x172e0 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x2c1fd(%rip), %rax # 0x630b0 movq 0x198(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x172e0 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x37045 movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x20(%rax) jne 0x36f0f movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x36f0a movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movb $0x1, (%rax) jmp 0x3703e movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x36f3d movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq (%rax), %rcx movq -0x18(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) jmp 0x36f5a movq -0x10(%rbp), %rax movq 0x78(%rax), %rcx movl -0x1c(%rbp), %eax imulq $0x70, %rax, %rax addq %rax, %rcx addq $0x50, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x36f72 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movb $0x0, (%rax) jmp 0x36f82 movq -0x18(%rbp), %rcx addq $0x67, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x36f9d movq -0x18(%rbp), %rcx addq $0x64, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x20(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rax movl 0x70(%rax), %eax movl %eax, %ecx movq 0x2afdc(%rip), %rax # 0x61fc8 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rsi movl -0x1c(%rbp), %ecx shlq $0x7, %rcx addq %rcx, %rsi movq -0x10(%rbp), %rcx movq 0x78(%rcx), %rdx movl -0x1c(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rdx addq $0x20, %rdx callq *%rax movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl -0x1c(%rbp), %edx imulq $0x70, %rdx, %rdx addq %rdx, %rax movq %rcx, 0x20(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
mysql_stmt_fetch_column@libmariadbclient_18: push rbp; Alternative name is 'mysql_stmt_fetch_column' mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 5 jb short loc_36E67 mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+60h] jnb short loc_36E67 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnz short loc_36EDB loc_36E67: jmp short $+2 loc_36E69: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 803h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+198h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_37045 loc_36EDB: mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx cmp qword ptr [rax+20h], 0 jnz short loc_36F0F mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz short loc_36F0A mov rax, [rbp+var_18] mov rax, [rax+8] mov byte ptr [rax], 1 loc_36F0A: jmp loc_3703E loc_36F0F: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_36F3D mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax] mov rcx, [rax] mov rax, [rbp+var_18] mov rax, [rax] mov [rax], rcx jmp short loc_36F5A loc_36F3D: mov rax, [rbp+var_10] mov rcx, [rax+78h] mov eax, [rbp+var_1C] imul rax, 70h ; 'p' add rcx, rax add rcx, 50h ; 'P' mov rax, [rbp+var_18] mov [rax], rcx loc_36F5A: mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jz short loc_36F72 mov rax, [rbp+var_18] mov rax, [rax+8] mov byte ptr [rax], 0 jmp short loc_36F82 loc_36F72: mov rcx, [rbp+var_18] add rcx, 67h ; 'g' mov rax, [rbp+var_18] mov [rax+8], rcx loc_36F82: mov rax, [rbp+var_18] cmp qword ptr [rax+18h], 0 jnz short loc_36F9D mov rcx, [rbp+var_18] add rcx, 64h ; 'd' mov rax, [rbp+var_18] mov [rax+18h], rcx loc_36F9D: mov rax, [rbp+var_18] mov rax, [rax+18h] mov byte ptr [rax], 0 mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax+48h], rcx mov rax, [rbp+var_10] mov rax, [rax+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+20h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+58h] mov ecx, [rbp+var_1C] shl rcx, 7 add rax, rcx mov eax, [rax+70h] mov ecx, eax mov rax, cs:mysql_ps_fetch_functions_ptr imul rcx, 18h add rax, rcx mov rax, [rax] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov rsi, [rcx+58h] mov ecx, [rbp+var_1C] shl rcx, 7 add rsi, rcx mov rcx, [rbp+var_10] mov rdx, [rcx+78h] mov ecx, [rbp+var_1C] imul rcx, 70h ; 'p' add rdx, rcx add rdx, 20h ; ' ' call rax mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov rax, [rax+78h] mov edx, [rbp+var_1C] imul rdx, 70h ; 'p' add rax, rdx mov [rax+20h], rcx loc_3703E: mov [rbp+var_4], 0 loc_37045: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_fetch_column_libmariadbclient_18(long long a1, long long a2, unsigned int a3, long long a4) { long long v5; // [rsp+0h] [rbp-30h] if ( *(_DWORD *)(a1 + 80) < 5u || a3 >= *(_DWORD *)(a1 + 96) || *(_DWORD *)(a1 + 80) == 6 ) { *(_DWORD *)(a1 + 264) = 2051; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[51], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { if ( *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) ) { if ( *(_QWORD *)a2 ) **(_QWORD **)a2 = **(_QWORD **)(112LL * a3 + *(_QWORD *)(a1 + 120)); else *(_QWORD *)a2 = 112LL * a3 + *(_QWORD *)(a1 + 120) + 80; if ( *(_QWORD *)(a2 + 8) ) **(_BYTE **)(a2 + 8) = 0; else *(_QWORD *)(a2 + 8) = a2 + 103; if ( !*(_QWORD *)(a2 + 24) ) *(_QWORD *)(a2 + 24) = a2 + 100; **(_BYTE **)(a2 + 24) = 0; *(_QWORD *)(a2 + 72) = a4; v5 = *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32); (*(void ( **)(long long, unsigned long long, long long))&mysql_ps_fetch_functions[6 * *(unsigned int *)(((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88) + 112)])( a2, ((unsigned long long)a3 << 7) + *(_QWORD *)(a1 + 88), 112LL * a3 + *(_QWORD *)(a1 + 120) + 32); *(_QWORD *)(112LL * a3 + *(_QWORD *)(a1 + 120) + 32) = v5; } else if ( *(_QWORD *)(a2 + 8) ) { **(_BYTE **)(a2 + 8) = 1; } return 0; } }
mysql_stmt_fetch_column: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x5 JC 0x00136e67 MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x60] JNC 0x00136e67 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNZ 0x00136edb LAB_00136e67: JMP 0x00136e69 LAB_00136e69: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x803 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x1630a0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x001172e0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x1630b0] MOV RSI,qword ptr [RAX + 0x198] MOV EDX,0x200 CALL 0x001172e0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00137045 LAB_00136edb: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00136f0f MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00136f0a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV byte ptr [RAX],0x1 LAB_00136f0a: JMP 0x0013703e LAB_00136f0f: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x00136f3d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX JMP 0x00136f5a LAB_00136f3d: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x78] MOV EAX,dword ptr [RBP + -0x1c] IMUL RAX,RAX,0x70 ADD RCX,RAX ADD RCX,0x50 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX LAB_00136f5a: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00136f72 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV byte ptr [RAX],0x0 JMP 0x00136f82 LAB_00136f72: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x67 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX LAB_00136f82: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x00136f9d MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x64 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX LAB_00136f9d: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x7 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x70] MOV ECX,EAX MOV RAX,qword ptr [0x00161fc8] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x58] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x7 ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x78] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x70 ADD RDX,RCX ADD RDX,0x20 CALL RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV EDX,dword ptr [RBP + -0x1c] IMUL RDX,RDX,0x70 ADD RAX,RDX MOV qword ptr [RAX + 0x20],RCX LAB_0013703e: MOV dword ptr [RBP + -0x4],0x0 LAB_00137045: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_fetch_column(long param_1,long *param_2,uint param_3,long param_4) { int8 uVar1; int4 local_c; if (((*(uint *)(param_1 + 0x50) < 5) || (*(uint *)(param_1 + 0x60) <= param_3)) || (*(int *)(param_1 + 0x50) == 6)) { *(int4 *)(param_1 + 0x108) = 0x803; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_DAT_00163248,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else { if (*(long *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) == 0) { if (param_2[1] != 0) { *(int1 *)param_2[1] = 1; } } else { if (*param_2 == 0) { *param_2 = *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x50; } else { *(int8 *)*param_2 = **(int8 **)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70); } if (param_2[1] == 0) { param_2[1] = (long)param_2 + 0x67; } else { *(int1 *)param_2[1] = 0; } if (param_2[3] == 0) { param_2[3] = (long)param_2 + 100; } *(int1 *)param_2[3] = 0; param_2[9] = param_4; uVar1 = *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20); (**(code **)(PTR_mysql_ps_fetch_functions_00161fc8 + (ulong)*(uint *)(*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80 + 0x70) * 0x18) )(param_2,*(long *)(param_1 + 0x58) + (ulong)param_3 * 0x80, *(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20); *(int8 *)(*(long *)(param_1 + 0x78) + (ulong)param_3 * 0x70 + 0x20) = uVar1; } local_c = 0; } return local_c; }
11,491
my_numcells_cp932
eloqsql/strings/ctype-cp932.c
static size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen= 0; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq $0x0, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x6bfa5 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x6bf60 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x6bf60 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x6bfa0 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x6bf86 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x6bf9e movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x6bfa0 jmp 0x6bf20 movq -0x20(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
my_numcells_cp932: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], 0 mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_6BF20: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_6BFA5 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_6BF60 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_6BF60 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_6BFA0 loc_6BF60: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_6BF86 mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_6BF9E loc_6BF86: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_6BF9E: jmp short $+2 loc_6BFA0: jmp loc_6BF20 loc_6BFA5: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_cp932(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
my_numcells_cp932: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x20],0x0 LAB_0016bf20: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0016bfa5 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa1 JL 0x0016bf60 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xdf JG 0x0016bf60 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0016bfa0 LAB_0016bf60: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x0016bf86 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0016bf9e LAB_0016bf86: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_0016bf9e: JMP 0x0016bfa0 LAB_0016bfa0: JMP 0x0016bf20 LAB_0016bfa5: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3) { byte *local_30; long local_28; local_28 = 0; local_30 = param_2; while (local_30 < param_3) { if ((*local_30 < 0xa1) || (0xdf < *local_30)) { if (*local_30 < 0x80) { local_28 = local_28 + 1; local_30 = local_30 + 1; } else { local_28 = local_28 + 2; local_30 = local_30 + 2; } } else { local_28 = local_28 + 1; local_30 = local_30 + 1; } } return local_28; }
11,492
JS_TryGetPropertyInt64
bluesky950520[P]quickjs/quickjs.c
static int JS_TryGetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx, JSValue *pval) { JSValue val; JSAtom prop; int present; if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT && (uint64_t)idx <= INT32_MAX)) { /* fast path for array and typed array access */ JSObject *p = JS_VALUE_GET_OBJ(obj); if (js_get_fast_array_element(ctx, p, idx, pval)) return TRUE; } val = JS_EXCEPTION; present = -1; prop = JS_NewAtomInt64(ctx, idx); if (likely(prop != JS_ATOM_NULL)) { present = JS_HasProperty(ctx, obj, prop); if (present > 0) { val = JS_GetProperty(ctx, obj, prop); if (unlikely(JS_IsException(val))) present = -1; } else if (present == FALSE) { val = JS_UNDEFINED; } JS_FreeAtom(ctx, prop); } *pval = val; return present; }
O1
c
JS_TryGetPropertyInt64: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r14 movq %rsi, 0x10(%rsp) cmpl $-0x1, %r12d jne 0x4d722 cmpq $0x7fffffff, %r15 # imm = 0x7FFFFFFF ja 0x4d722 movq 0x10(%rsp), %rsi movq %r14, %rdi movl %r15d, %edx movq %rbx, %rcx callq 0xf861 movl $0x1, %ebp testl %eax, %eax jne 0x4d7c2 movq %r14, %rdi movq %r15, %rsi callq 0x2428a testl %eax, %eax je 0x4d7d3 movl %eax, %r15d movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %eax, %ecx callq 0xf753 movl %eax, %ebp testl %eax, %eax jle 0x4d788 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %r15d, %ecx movq %r13, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %r12 movq %rax, %r13 shrq $0x20, %r13 cmpl $0x6, %edx movq %rdx, 0x8(%rsp) jne 0x4d7a1 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x4d7a1 setne %al movzbl %al, %eax leaq (%rax,%rax,2), %rax addq $0x3, %rax movq %rax, 0x8(%rsp) xorl %r12d, %r12d xorl %r13d, %r13d movq %r14, %rdi movl %r15d, %esi callq 0x207d8 shlq $0x20, %r13 movl %r12d, %eax orq %r13, %rax movq 0x8(%rsp), %rcx movq %rax, (%rbx) movq %rcx, 0x8(%rbx) movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x6, %ecx movl $0xffffffff, %ebp # imm = 0xFFFFFFFF xorl %eax, %eax jmp 0x4d7bb
JS_TryGetPropertyInt64: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov r14, rdi mov [rsp+48h+var_38], rsi cmp r12d, 0FFFFFFFFh jnz short loc_4D722 cmp r15, 7FFFFFFFh ja short loc_4D722 mov rsi, [rsp+48h+var_38] mov rdi, r14 mov edx, r15d mov rcx, rbx call js_get_fast_array_element mov ebp, 1 test eax, eax jnz loc_4D7C2 loc_4D722: mov rdi, r14 mov rsi, r15 call JS_NewAtomInt64 test eax, eax jz loc_4D7D3 mov r15d, eax mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, eax call JS_HasProperty mov ebp, eax test eax, eax jle short loc_4D788 mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, r15d mov r8, r13 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov r12, rax mov r13, rax shr r13, 20h cmp edx, 6 mov [rsp+48h+var_40], rdx jnz short loc_4D7A1 mov ebp, 0FFFFFFFFh jmp short loc_4D7A1 loc_4D788: setnz al movzx eax, al lea rax, [rax+rax*2] add rax, 3 mov [rsp+48h+var_40], rax xor r12d, r12d xor r13d, r13d loc_4D7A1: mov rdi, r14 mov esi, r15d call JS_FreeAtom shl r13, 20h mov eax, r12d or rax, r13 mov rcx, [rsp+48h+var_40] loc_4D7BB: mov [rbx], rax mov [rbx+8], rcx loc_4D7C2: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4D7D3: mov ecx, 6 mov ebp, 0FFFFFFFFh xor eax, eax jmp short loc_4D7BB
long long JS_TryGetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4, long long a5) { int HasProperty; // ebp unsigned int v9; // eax unsigned int v10; // r15d unsigned long long PropertyInternal2; // rax unsigned int v12; // r12d unsigned long long v13; // r13 long long v14; // rdx unsigned long long v15; // rax long long v16; // rcx long long v18; // [rsp+8h] [rbp-40h] if ( (_DWORD)a3 != -1 || a4 > 0x7FFFFFFF || (HasProperty = 1, !(unsigned int)js_get_fast_array_element(a1, a2, a4, (double *)a5)) ) { v9 = JS_NewAtomInt64(a1, a4); if ( v9 ) { v10 = v9; HasProperty = JS_HasProperty(a1, a2, a3, v9); if ( HasProperty <= 0 ) { v18 = 3LL * (HasProperty != 0) + 3; v12 = 0; v13 = 0LL; } else { PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, v10, a2, a3, 0LL, 0); v12 = PropertyInternal2; v13 = HIDWORD(PropertyInternal2); v18 = v14; if ( (_DWORD)v14 == 6 ) HasProperty = -1; } JS_FreeAtom(a1, v10); v15 = (v13 << 32) | v12; v16 = v18; } else { v16 = 6LL; HasProperty = -1; v15 = 0LL; } *(_QWORD *)a5 = v15; *(_QWORD *)(a5 + 8) = v16; } return (unsigned int)HasProperty; }
11,493
JS_TryGetPropertyInt64
bluesky950520[P]quickjs/quickjs.c
static int JS_TryGetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx, JSValue *pval) { JSValue val; JSAtom prop; int present; if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT && (uint64_t)idx <= INT32_MAX)) { /* fast path for array and typed array access */ JSObject *p = JS_VALUE_GET_OBJ(obj); if (js_get_fast_array_element(ctx, p, idx, pval)) return TRUE; } val = JS_EXCEPTION; present = -1; prop = JS_NewAtomInt64(ctx, idx); if (likely(prop != JS_ATOM_NULL)) { present = JS_HasProperty(ctx, obj, prop); if (present > 0) { val = JS_GetProperty(ctx, obj, prop); if (unlikely(JS_IsException(val))) present = -1; } else if (present == FALSE) { val = JS_UNDEFINED; } JS_FreeAtom(ctx, prop); } *pval = val; return present; }
O2
c
JS_TryGetPropertyInt64: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r14 cmpl $-0x1, %r12d jne 0x426ce cmpq $0x7fffffff, %r15 # imm = 0x7FFFFFFF ja 0x426ce movq %r14, %rdi movq %r13, %rsi movl %r15d, %edx movq %rbx, %rcx callq 0x1e226 testl %eax, %eax je 0x426ce pushq $0x1 popq %rbp jmp 0x4275b movq %r14, %rdi movq %r15, %rsi callq 0x1e3a6 testl %eax, %eax je 0x4276c movl %eax, %r15d movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %eax, %ecx callq 0x1dfb8 movl %eax, %ebp testl %eax, %eax jle 0x42723 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %r15d, %ecx callq 0x1b043 movq %rax, %r12 movq %rax, %r13 shrq $0x20, %r13 cmpl $0x6, %edx movq %rdx, (%rsp) jne 0x4273b pushq $-0x1 popq %rbp jmp 0x4273b setne %al movzbl %al, %eax leaq (%rax,%rax,2), %rax addq $0x3, %rax movq %rax, (%rsp) xorl %r12d, %r12d xorl %r13d, %r13d movq %r14, %rdi movl %r15d, %esi callq 0x1a995 shlq $0x20, %r13 movl %r12d, %eax orq %r13, %rax movq (%rsp), %rcx movq %rax, (%rbx) movq %rcx, 0x8(%rbx) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x6 popq %rcx pushq $-0x1 popq %rbp xorl %eax, %eax jmp 0x42754
JS_TryGetPropertyInt64: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov r14, rdi cmp r12d, 0FFFFFFFFh jnz short loc_426CE cmp r15, 7FFFFFFFh ja short loc_426CE mov rdi, r14 mov rsi, r13 mov edx, r15d mov rcx, rbx call js_get_fast_array_element test eax, eax jz short loc_426CE push 1 pop rbp jmp loc_4275B loc_426CE: mov rdi, r14 mov rsi, r15 call JS_NewAtomInt64 test eax, eax jz loc_4276C mov r15d, eax mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, eax call JS_HasProperty mov ebp, eax test eax, eax jle short loc_42723 mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, r15d call JS_GetProperty mov r12, rax mov r13, rax shr r13, 20h cmp edx, 6 mov [rsp+38h+var_38], rdx jnz short loc_4273B push 0FFFFFFFFFFFFFFFFh pop rbp jmp short loc_4273B loc_42723: setnz al movzx eax, al lea rax, [rax+rax*2] add rax, 3 mov [rsp+38h+var_38], rax xor r12d, r12d xor r13d, r13d loc_4273B: mov rdi, r14 mov esi, r15d call JS_FreeAtom shl r13, 20h mov eax, r12d or rax, r13 mov rcx, [rsp+38h+var_38] loc_42754: mov [rbx], rax mov [rbx+8], rcx loc_4275B: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4276C: push 6 pop rcx push 0FFFFFFFFFFFFFFFFh pop rbp xor eax, eax jmp short loc_42754
long long JS_TryGetPropertyInt64(long long a1, long long a2, int a3, unsigned long long a4, long long a5) { int HasProperty; // ebp unsigned int v9; // eax unsigned int *v10; // r8 int v11; // r15d unsigned long long Property; // rax unsigned int v13; // r12d unsigned long long v14; // r13 long long v15; // rdx unsigned long long v16; // rax long long v17; // rcx long long v19; // [rsp+0h] [rbp-38h] if ( a3 == -1 && a4 <= 0x7FFFFFFF && (unsigned int)js_get_fast_array_element(a1, a2, a4, (double *)a5) ) { return 1; } else { v9 = JS_NewAtomInt64(a1, a4); if ( v9 ) { v11 = v9; HasProperty = JS_HasProperty(a1, a2, a3, v9, v10); if ( HasProperty <= 0 ) { v19 = 3LL * (HasProperty != 0) + 3; v13 = 0; v14 = 0LL; } else { Property = JS_GetProperty(a1, a2, a3, v11); v13 = Property; v14 = HIDWORD(Property); v19 = v15; if ( (_DWORD)v15 == 6 ) HasProperty = -1; } JS_FreeAtom(a1, v11); v16 = (v14 << 32) | v13; v17 = v19; } else { v17 = 6LL; HasProperty = -1; v16 = 0LL; } *(_QWORD *)a5 = v16; *(_QWORD *)(a5 + 8) = v17; } return (unsigned int)HasProperty; }
JS_TryGetPropertyInt64: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV R14,RDI CMP R12D,-0x1 JNZ 0x001426ce CMP R15,0x7fffffff JA 0x001426ce MOV RDI,R14 MOV RSI,R13 MOV EDX,R15D MOV RCX,RBX CALL 0x0011e226 TEST EAX,EAX JZ 0x001426ce PUSH 0x1 POP RBP JMP 0x0014275b LAB_001426ce: MOV RDI,R14 MOV RSI,R15 CALL 0x0011e3a6 TEST EAX,EAX JZ 0x0014276c MOV R15D,EAX MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV ECX,EAX CALL 0x0011dfb8 MOV EBP,EAX TEST EAX,EAX JLE 0x00142723 MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV ECX,R15D CALL 0x0011b043 MOV R12,RAX MOV R13,RAX SHR R13,0x20 CMP EDX,0x6 MOV qword ptr [RSP],RDX JNZ 0x0014273b PUSH -0x1 POP RBP JMP 0x0014273b LAB_00142723: SETNZ AL MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] ADD RAX,0x3 MOV qword ptr [RSP],RAX XOR R12D,R12D XOR R13D,R13D LAB_0014273b: MOV RDI,R14 MOV ESI,R15D CALL 0x0011a995 SHL R13,0x20 MOV EAX,R12D OR RAX,R13 MOV RCX,qword ptr [RSP] LAB_00142754: MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RCX LAB_0014275b: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014276c: PUSH 0x6 POP RCX PUSH -0x1 POP RBP XOR EAX,EAX JMP 0x00142754
int JS_TryGetPropertyInt64 (int8 param_1,int8 param_2,int8 param_3,ulong param_4,ulong *param_5 ) { int iVar1; int iVar2; ulong uVar3; int1 auVar4 [16]; ulong local_38; if ((((int)param_3 == -1) && (param_4 < 0x80000000)) && (iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,param_5), iVar1 != 0)) { return 1; } iVar1 = JS_NewAtomInt64(param_1,param_4); if (iVar1 == 0) { local_38 = 6; iVar2 = -1; uVar3 = 0; } else { iVar2 = JS_HasProperty(param_1,param_2,param_3,iVar1); if (iVar2 < 1) { auVar4._8_8_ = 0; auVar4._0_8_ = (ulong)(iVar2 != 0) * 3 + 3; auVar4 = auVar4 << 0x40; uVar3 = 0; } else { auVar4 = JS_GetProperty(param_1,param_2,param_3,iVar1); uVar3 = auVar4._0_8_ >> 0x20; if (auVar4._8_4_ == 6) { iVar2 = -1; } } local_38 = auVar4._8_8_; JS_FreeAtom(param_1,iVar1); uVar3 = auVar4._0_8_ & 0xffffffff | uVar3 << 0x20; } *param_5 = uVar3; param_5[1] = local_38; return iVar2; }
11,494
google::protobuf::UninterpretedOption* google::protobuf::internal::down_cast<google::protobuf::UninterpretedOption*, google::protobuf::Message>(google::protobuf::Message*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/casts.h
inline To down_cast(From* f) { // so we only accept pointers // Ensures that To is a sub-type of From *. This test is here only // for compile-time type checking, and has no overhead in an // optimized build at run-time, as it will be optimized away // completely. if (false) { implicit_cast<From*, To>(0); } #if !defined(NDEBUG) && PROTOBUF_RTTI assert(f == nullptr || dynamic_cast<To>(f) != nullptr); // RTTI: debug mode only! #endif return static_cast<To>(f); }
O0
c
google::protobuf::UninterpretedOption* google::protobuf::internal::down_cast<google::protobuf::UninterpretedOption*, google::protobuf::Message>(google::protobuf::Message*): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopl (%rax,%rax)
_ZN6google8protobuf8internal9down_castIPNS1_15DynamicMapFieldENS1_12MapFieldBaseEEET_PT0_: mov [rsp+var_8], rdi mov rax, [rsp+var_8] retn
long long google::protobuf::internal::down_cast<google::protobuf::internal::DynamicMapField *,google::protobuf::internal::MapFieldBase>( long long a1) { return a1; }
ParseOption: SUB RSP,0x4a8 MOV qword ptr [RSP + 0x458],RDI MOV qword ptr [RSP + 0x450],RSI MOV qword ptr [RSP + 0x448],RDX MOV qword ptr [RSP + 0x440],RCX MOV dword ptr [RSP + 0x43c],R8D MOV RAX,qword ptr [RSP + 0x458] MOV qword ptr [RSP + 0x150],RAX MOV RDI,qword ptr [RSP + 0x450] CALL 0x0033f4a0 MOV qword ptr [RSP + 0x158],RAX LEA RDI,[RSP + 0x40f] MOV qword ptr [RSP + 0x160],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x160] LAB_00334d51: LEA RSI,[0x4fff4f] LEA RDI,[RSP + 0x410] CALL 0x00121890 JMP 0x00334d67 LAB_00334d67: MOV RDI,qword ptr [RSP + 0x158] LEA RSI,[RSP + 0x410] CALL 0x0034d4b0 LAB_00334d7c: MOV qword ptr [RSP + 0x148],RAX JMP 0x00334d86 LAB_00334d86: LEA RDI,[RSP + 0x410] CALL 0x00121cc8 LEA RDI,[RSP + 0x40f] CALL 0x00121cb0 MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x430],RAX MOV RAX,qword ptr [RSP + 0x430] MOV byte ptr [RSP + 0x3bf],0x0 CMP RAX,0x0 JZ 0x00334dcb JMP 0x00334e4e LAB_00334dcb: LEA RDX,[0x4ff71c] LEA RDI,[RSP + 0x3c0] MOV qword ptr [RSP + 0x138],RDI MOV ESI,0x3 MOV ECX,0x5b7 CALL 0x00319560 MOV RDI,qword ptr [RSP + 0x138] MOV byte ptr [RSP + 0x3bf],0x1 LAB_00334e01: LEA RSI,[0x4fff64] CALL 0x00318e20 MOV qword ptr [RSP + 0x140],RAX JMP 0x00334e17 LAB_00334e17: MOV RDI,qword ptr [RSP + 0x140] LEA RSI,[0x4fff9a] CALL 0x00318e20 MOV qword ptr [RSP + 0x130],RAX JMP 0x00334e35 LAB_00334e35: MOV RSI,qword ptr [RSP + 0x130] LEA RDI,[RSP + 0x3be] CALL 0x00318fd0 LAB_00334e4a: JMP 0x00334e4c LAB_00334e4c: JMP 0x00334e4e LAB_00334e4e: TEST byte ptr [RSP + 0x3bf],0x1 JNZ 0x00334e5a JMP 0x00334e67 LAB_00334e5a: LEA RDI,[RSP + 0x3c0] CALL 0x003195a0 LAB_00334e67: MOV RDI,qword ptr [RSP + 0x450] CALL 0x0015d1f0 MOV qword ptr [RSP + 0x3b0],RAX MOV RAX,qword ptr [RSP + 0x448] MOV qword ptr [RSP + 0x120],RAX MOV RDI,qword ptr [RSP + 0x430] CALL 0x0013d8e0 MOV dword ptr [RSP + 0x12c],EAX MOV RDI,qword ptr [RSP + 0x3b0] MOV RSI,qword ptr [RSP + 0x450] MOV RDX,qword ptr [RSP + 0x430] CALL 0x0040ae80 MOV RSI,qword ptr [RSP + 0x120] MOV EDX,dword ptr [RSP + 0x12c] MOV ECX,EAX LEA RDI,[RSP + 0x398] CALL 0x00331660 CMP dword ptr [RSP + 0x43c],0x1 JNZ 0x00334fc9 LAB_00334ee9: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x4b2313] CALL 0x003301b0 MOV byte ptr [RSP + 0x11f],AL JMP 0x00334f06 LAB_00334f06: MOV AL,byte ptr [RSP + 0x11f] TEST AL,0x1 JNZ 0x00334f16 JMP 0x00334faf LAB_00334f16: JMP 0x00334fc7 LAB_00334faf: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335efd LAB_00334fc7: JMP 0x00334fc9 LAB_00334fc9: MOV RDI,qword ptr [RSP + 0x450] CALL 0x0015d1f0 MOV qword ptr [RSP + 0x110],RAX JMP 0x00334fe0 LAB_00334fe0: MOV RDI,qword ptr [RSP + 0x110] MOV RSI,qword ptr [RSP + 0x450] MOV RDX,qword ptr [RSP + 0x430] XOR EAX,EAX MOV ECX,EAX CALL 0x004119b0 MOV qword ptr [RSP + 0x108],RAX JMP 0x0033500b LAB_0033500b: MOV RDI,qword ptr [RSP + 0x108] CALL 0x0033f4d0 MOV qword ptr [RSP + 0x100],RAX JMP 0x00335022 LAB_00335022: MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x388],RAX LEA RDI,[RSP + 0x370] LEA RSI,[RSP + 0x398] MOV EDX,0x2 CALL 0x00331610 JMP 0x0033504e LAB_0033504e: MOV RSI,qword ptr [RSP + 0x388] LAB_00335056: LEA RDI,[RSP + 0x370] MOV EDX,0x7 CALL 0x00331870 JMP 0x0033506a LAB_0033506a: MOV RDI,qword ptr [RSP + 0x388] CALL 0x0033e650 MOV dword ptr [RSP + 0xfc],EAX JMP 0x00335080 LAB_00335080: MOV EDX,dword ptr [RSP + 0xfc] LEA RDI,[RSP + 0x358] LEA RSI,[RSP + 0x370] CALL 0x00331610 JMP 0x0033509e LAB_0033509e: MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x388] MOV RCX,qword ptr [RSP + 0x440] LAB_003350b6: LEA RDX,[RSP + 0x358] CALL 0x0033aa90 LAB_003350c3: MOV byte ptr [RSP + 0xfb],AL JMP 0x003350cc LAB_003350cc: MOV AL,byte ptr [RSP + 0xfb] TEST AL,0x1 JNZ 0x003350d9 JMP 0x0033511a LAB_003350d9: JMP 0x0033512f LAB_0033511a: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x0033513a LAB_0033512f: MOV dword ptr [RSP + 0x394],0x0 LAB_0033513a: LEA RDI,[RSP + 0x358] CALL 0x003316c0 MOV EAX,dword ptr [RSP + 0x394] TEST EAX,EAX JNZ 0x003352ac JMP 0x00335158 LAB_00335158: JMP 0x0033515a LAB_0033515a: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x500e06] CALL 0x0033e240 MOV byte ptr [RSP + 0xfa],AL JMP 0x00335177 LAB_00335177: MOV AL,byte ptr [RSP + 0xfa] TEST AL,0x1 JNZ 0x00335187 JMP 0x003352a1 LAB_00335187: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x500e06] CALL 0x003301b0 MOV byte ptr [RSP + 0xf9],AL JMP 0x003351a4 LAB_003351a4: MOV AL,byte ptr [RSP + 0xf9] TEST AL,0x1 JNZ 0x003351b1 JMP 0x003351b3 LAB_003351b1: JMP 0x003351cb LAB_003351b3: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x003352ac LAB_003351cb: MOV RDI,qword ptr [RSP + 0x388] CALL 0x0033e650 MOV dword ptr [RSP + 0xf4],EAX JMP 0x003351e1 LAB_003351e1: MOV EDX,dword ptr [RSP + 0xf4] LEA RDI,[RSP + 0x340] LEA RSI,[RSP + 0x370] CALL 0x00331610 JMP 0x003351ff LAB_003351ff: MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x388] MOV RCX,qword ptr [RSP + 0x440] LAB_00335217: LEA RDX,[RSP + 0x340] CALL 0x0033aa90 LAB_00335224: MOV byte ptr [RSP + 0xf3],AL JMP 0x0033522d LAB_0033522d: MOV AL,byte ptr [RSP + 0xf3] TEST AL,0x1 JNZ 0x0033523a JMP 0x00335262 LAB_0033523a: JMP 0x00335277 LAB_00335262: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335282 LAB_00335277: MOV dword ptr [RSP + 0x394],0x0 LAB_00335282: LEA RDI,[RSP + 0x340] CALL 0x003316c0 MOV EAX,dword ptr [RSP + 0x394] TEST EAX,EAX JNZ 0x003352ac JMP 0x0033529c LAB_0033529c: JMP 0x0033515a LAB_003352a1: MOV dword ptr [RSP + 0x394],0x0 LAB_003352ac: LEA RDI,[RSP + 0x370] CALL 0x003316c0 MOV EAX,dword ptr [RSP + 0x394] TEST EAX,EAX JNZ 0x00335efd JMP 0x003352ca LAB_003352ca: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x4d5ce1] CALL 0x003301b0 LAB_003352de: MOV byte ptr [RSP + 0xf2],AL JMP 0x003352e7 LAB_003352e7: MOV AL,byte ptr [RSP + 0xf2] TEST AL,0x1 JNZ 0x003352f4 JMP 0x00335308 LAB_003352f4: JMP 0x00335320 LAB_00335308: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335efd LAB_00335320: LEA RDI,[RSP + 0x328] LEA RSI,[RSP + 0x398] CALL 0x003314a0 JMP 0x00335337 LAB_00335337: MOV RSI,qword ptr [RSP + 0x388] LAB_0033533f: LEA RDI,[RSP + 0x328] MOV EDX,0x8 CALL 0x00331870 JMP 0x00335353 LAB_00335353: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x4a8a6c] CALL 0x00330020 MOV byte ptr [RSP + 0xf1],AL JMP 0x00335370 LAB_00335370: MOV RAX,qword ptr [RSP + 0x150] MOV CL,byte ptr [RSP + 0xf1] AND CL,0x1 MOV byte ptr [RSP + 0x327],CL MOV RDI,qword ptr [RAX] CALL 0x0033e2b0 MOV qword ptr [RSP + 0xe8],RAX JMP 0x0033539b LAB_0033539b: MOV RAX,qword ptr [RSP + 0xe8] MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0xe0],RAX SUB RAX,0x8 JA 0x00335e67 MOV RAX,qword ptr [RSP + 0xe0] LEA RCX,[0x4ff688] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDX,[0x4ff71c] LEA RDI,[RSP + 0x2e8] MOV ESI,0x3 MOV ECX,0x5ec CALL 0x00319560 JMP 0x00335408 LAB_00335408: LEA RSI,[0x4fffd6] LEA RDI,[RSP + 0x2e8] CALL 0x00318e20 MOV qword ptr [RSP + 0xd8],RAX JMP 0x00335426 LAB_00335426: MOV RSI,qword ptr [RSP + 0xd8] LEA RDI,[RSP + 0x2e7] CALL 0x00318fd0 JMP 0x0033543d LAB_0033543d: LEA RDI,[RSP + 0x2e8] CALL 0x003195a0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 caseD_1: LEA RDI,[RSP + 0x2bf] MOV qword ptr [RSP + 0xd0],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0xd0] LAB_003354a5: LEA RSI,[0x50000d] LEA RDI,[RSP + 0x2c0] CALL 0x00121890 JMP 0x003354bb LAB_003354bb: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[RSP + 0x2c0] CALL 0x00330150 JMP 0x003354d2 LAB_003354d2: LEA RDI,[RSP + 0x2c0] CALL 0x00121cc8 LEA RDI,[RSP + 0x2bf] CALL 0x00121cb0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 caseD_7: MOV RAX,qword ptr [RSP + 0x150] MOV RDI,qword ptr [RAX] MOV byte ptr [RSP + 0x27f],0x0 LAB_00335560: CALL 0x00428120 MOV byte ptr [RSP + 0xcf],AL JMP 0x0033556e LAB_0033556e: MOV AL,byte ptr [RSP + 0xcf] TEST AL,0x1 JNZ 0x003355a3 JMP 0x0033557b LAB_0033557b: MOV RAX,qword ptr [RSP + 0x150] MOV RDI,qword ptr [RAX] CALL 0x00428190 MOV byte ptr [RSP + 0xce],AL JMP 0x00335594 LAB_00335594: MOV AL,byte ptr [RSP + 0xce] TEST AL,0x1 JNZ 0x003355a3 JMP 0x003355a1 LAB_003355a1: JMP 0x00335620 LAB_003355a3: LEA RDX,[0x4ff71c] LEA RDI,[RSP + 0x280] MOV ESI,0x3 MOV ECX,0x5f5 CALL 0x00319560 JMP 0x003355c3 LAB_003355c3: MOV byte ptr [RSP + 0x27f],0x1 LAB_003355cb: LEA RSI,[0x500042] LEA RDI,[RSP + 0x280] CALL 0x00318e20 MOV qword ptr [RSP + 0xc0],RAX JMP 0x003355e9 LAB_003355e9: MOV RDI,qword ptr [RSP + 0xc0] LEA RSI,[0x50008d] CALL 0x00318e20 MOV qword ptr [RSP + 0xb8],RAX JMP 0x00335607 LAB_00335607: MOV RSI,qword ptr [RSP + 0xb8] LEA RDI,[RSP + 0x27e] CALL 0x00318fd0 JMP 0x0033561e LAB_0033561e: JMP 0x00335620 LAB_00335620: TEST byte ptr [RSP + 0x27f],0x1 JNZ 0x0033562c JMP 0x00335639 LAB_0033562c: LEA RDI,[RSP + 0x280] CALL 0x003195a0 LAB_00335639: LEA RDX,[0x4ff71c] LEA RDI,[RSP + 0x240] MOV ESI,0x3 MOV ECX,0x5f7 CALL 0x00319560 JMP 0x00335659 LAB_00335659: LEA RSI,[0x5000b3] LEA RDI,[RSP + 0x240] CALL 0x00318e20 MOV qword ptr [RSP + 0xb0],RAX JMP 0x00335677 LAB_00335677: MOV RSI,qword ptr [RSP + 0xb0] LEA RDI,[RSP + 0x23f] CALL 0x00318fd0 JMP 0x0033568e LAB_0033568e: LEA RDI,[RSP + 0x240] CALL 0x003195a0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 caseD_2: LEA RDI,[RSP + 0x328] MOV ESI,0x3 CALL 0x003315e0 JMP 0x0033571f LAB_0033571f: TEST byte ptr [RSP + 0x327],0x1 JZ 0x003357f2 LEA RDI,[RSP + 0x217] MOV qword ptr [RSP + 0xa8],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0xa8] LAB_0033574a: LEA RSI,[0x5000d2] LEA RDI,[RSP + 0x218] CALL 0x00121890 JMP 0x00335760 LAB_00335760: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[RSP + 0x218] CALL 0x00330150 JMP 0x00335777 LAB_00335777: LEA RDI,[RSP + 0x218] CALL 0x00121cc8 LEA RDI,[RSP + 0x217] CALL 0x00121cb0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_003357f2: LEA RDI,[RSP + 0x1f0] MOV qword ptr [RSP + 0x98],RDI CALL 0x00121390 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x98] LAB_00335817: LEA RDX,[0x4fff02] CALL 0x00330320 MOV byte ptr [RSP + 0xa7],AL JMP 0x0033582c LAB_0033582c: MOV AL,byte ptr [RSP + 0xa7] TEST AL,0x1 JNZ 0x00335839 JMP 0x00335861 LAB_00335839: JMP 0x00335879 LAB_00335861: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x0033592e LAB_00335879: MOV RAX,qword ptr [RSP + 0x388] MOV qword ptr [RSP + 0x470],RAX LEA RAX,[RSP + 0x1f0] MOV qword ptr [RSP + 0x468],RAX MOV RDI,qword ptr [RSP + 0x470] MOV RAX,RDI ADD RAX,0x10 MOV qword ptr [RSP + 0x4a0],RAX MOV dword ptr [RSP + 0x49c],0x0 MOV RAX,qword ptr [RSP + 0x4a0] MOVSXD RCX,dword ptr [RSP + 0x49c] MOV EDX,dword ptr [RAX + RCX*0x4] OR EDX,0x1 MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,RDI ADD RAX,0x30 MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x468] MOV qword ptr [RSP + 0x88],RAX CALL 0x001292e0 MOV qword ptr [RSP + 0x90],RAX JMP 0x00335902 LAB_00335902: MOV RDX,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x88] MOV RDI,qword ptr [RSP + 0x80] CALL 0x002e7090 JMP 0x00335921 LAB_00335921: JMP 0x00335923 LAB_00335923: MOV dword ptr [RSP + 0x394],0x4 LAB_0033592e: LEA RDI,[RSP + 0x1f0] CALL 0x00121cc8 MOV EAX,dword ptr [RSP + 0x394] SUB EAX,0x4 JZ 0x00335e67 JMP 0x00335e72 caseD_3: MOV AL,byte ptr [RSP + 0x327] MOV byte ptr [RSP + 0x6f],AL CALL 0x0033f360 INC RAX MOV qword ptr [RSP + 0x70],RAX CALL 0x002e6a50 MOV DL,byte ptr [RSP + 0x6f] MOV RCX,qword ptr [RSP + 0x70] MOV RDI,qword ptr [RSP + 0x150] TEST DL,0x1 CMOVNZ RAX,RCX MOV qword ptr [RSP + 0x1e0],RAX MOV RSI,qword ptr [RSP + 0x1e0] LAB_00335995: LEA RCX,[0x5000f8] LEA RDX,[RSP + 0x1e8] CALL 0x003306e0 MOV byte ptr [RSP + 0x7f],AL JMP 0x003359af LAB_003359af: MOV AL,byte ptr [RSP + 0x7f] TEST AL,0x1 JNZ 0x003359b9 JMP 0x003359bb LAB_003359b9: JMP 0x003359d3 LAB_003359bb: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_003359d3: TEST byte ptr [RSP + 0x327],0x1 JZ 0x00335a0d LEA RDI,[RSP + 0x328] MOV ESI,0x5 CALL 0x003315e0 JMP 0x003359f1 LAB_003359f1: MOV RDI,qword ptr [RSP + 0x388] MOV RSI,qword ptr [RSP + 0x1e8] NEG RSI CALL 0x0033f4e0 JMP 0x00335a0b LAB_00335a0b: JMP 0x00335a3a LAB_00335a0d: LEA RDI,[RSP + 0x328] MOV ESI,0x4 CALL 0x003315e0 JMP 0x00335a21 LAB_00335a21: MOV RDI,qword ptr [RSP + 0x388] MOV RSI,qword ptr [RSP + 0x1e8] CALL 0x0033f510 JMP 0x00335a38 LAB_00335a38: JMP 0x00335a3a LAB_00335a3a: JMP 0x00335e67 caseD_4: LEA RDI,[RSP + 0x328] MOV ESI,0x6 CALL 0x003315e0 JMP 0x00335a53 LAB_00335a53: MOV RDI,qword ptr [RSP + 0x150] LEA RDX,[0x4ffe06] LEA RSI,[RSP + 0x1d8] CALL 0x003308c0 MOV byte ptr [RSP + 0x6e],AL JMP 0x00335a75 LAB_00335a75: MOV AL,byte ptr [RSP + 0x6e] TEST AL,0x1 JNZ 0x00335a7f JMP 0x00335a81 LAB_00335a7f: JMP 0x00335a99 LAB_00335a81: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_00335a99: MOV RAX,qword ptr [RSP + 0x388] MOV qword ptr [RSP + 0x60],RAX TEST byte ptr [RSP + 0x327],0x1 JZ 0x00335ad8 MOVSD XMM0,qword ptr [RSP + 0x1d8] MOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX MOVQ XMM0,RAX MOVSD qword ptr [RSP + 0x58],XMM0 JMP 0x00335ae7 LAB_00335ad8: MOVSD XMM0,qword ptr [RSP + 0x1d8] MOVSD qword ptr [RSP + 0x58],XMM0 LAB_00335ae7: MOV RDI,qword ptr [RSP + 0x60] MOVSD XMM0,qword ptr [RSP + 0x58] CALL 0x0033f540 JMP 0x00335af9 LAB_00335af9: JMP 0x00335e67 caseD_5: LEA RDI,[RSP + 0x328] MOV ESI,0x7 CALL 0x003315e0 JMP 0x00335b12 LAB_00335b12: TEST byte ptr [RSP + 0x327],0x1 JZ 0x00335bdf LEA RDI,[RSP + 0x1b7] MOV qword ptr [RSP + 0x50],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x50] LAB_00335b37: LEA RSI,[0x50010a] LEA RDI,[RSP + 0x1b8] CALL 0x00121890 JMP 0x00335b4d LAB_00335b4d: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[RSP + 0x1b8] CALL 0x00330150 JMP 0x00335b64 LAB_00335b64: LEA RDI,[RSP + 0x1b8] CALL 0x00121cc8 LEA RDI,[RSP + 0x1b7] CALL 0x00121cb0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_00335bdf: LEA RDI,[RSP + 0x190] MOV qword ptr [RSP + 0x40],RDI CALL 0x00121390 MOV RDI,qword ptr [RSP + 0x150] MOV RSI,qword ptr [RSP + 0x40] LAB_00335bfe: LEA RDX,[0x4ffe5c] CALL 0x00330bb0 MOV byte ptr [RSP + 0x4f],AL JMP 0x00335c10 LAB_00335c10: MOV AL,byte ptr [RSP + 0x4f] TEST AL,0x1 JNZ 0x00335c1a JMP 0x00335c42 LAB_00335c1a: JMP 0x00335c5a LAB_00335c42: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335cfd LAB_00335c5a: MOV RAX,qword ptr [RSP + 0x388] MOV qword ptr [RSP + 0x480],RAX LEA RAX,[RSP + 0x190] MOV qword ptr [RSP + 0x478],RAX MOV RDI,qword ptr [RSP + 0x480] MOV RAX,RDI ADD RAX,0x10 MOV qword ptr [RSP + 0x490],RAX MOV dword ptr [RSP + 0x48c],0x0 MOV RAX,qword ptr [RSP + 0x490] MOVSXD RCX,dword ptr [RSP + 0x48c] MOV EDX,dword ptr [RAX + RCX*0x4] OR EDX,0x2 MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,RDI ADD RAX,0x38 MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x478] MOV qword ptr [RSP + 0x30],RAX CALL 0x001292e0 MOV qword ptr [RSP + 0x38],RAX JMP 0x00335cda LAB_00335cda: MOV RDX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x28] CALL 0x00346940 JMP 0x00335cf0 LAB_00335cf0: JMP 0x00335cf2 LAB_00335cf2: MOV dword ptr [RSP + 0x394],0x4 LAB_00335cfd: LEA RDI,[RSP + 0x190] CALL 0x00121cc8 MOV EAX,dword ptr [RSP + 0x394] SUB EAX,0x4 JZ 0x00335e67 JMP 0x00335e72 caseD_6: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x500b60] CALL 0x0033e240 MOV byte ptr [RSP + 0x27],AL JMP 0x00335d39 LAB_00335d39: MOV AL,byte ptr [RSP + 0x27] TEST AL,0x1 JNZ 0x00335d43 JMP 0x00335dac LAB_00335d43: LEA RDI,[RSP + 0x328] MOV ESI,0x8 CALL 0x003315e0 JMP 0x00335d57 LAB_00335d57: MOV RDI,qword ptr [RSP + 0x388] CALL 0x0033f570 MOV qword ptr [RSP + 0x18],RAX JMP 0x00335d6b LAB_00335d6b: MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x150] CALL 0x0033aec0 MOV byte ptr [RSP + 0x17],AL JMP 0x00335d83 LAB_00335d83: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x00335d8d JMP 0x00335d8f LAB_00335d8d: JMP 0x00335da7 LAB_00335d8f: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_00335da7: JMP 0x00335e65 LAB_00335dac: LEA RDI,[RSP + 0x16f] MOV qword ptr [RSP + 0x8],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x8] LAB_00335dc3: LEA RSI,[0x50012c] LEA RDI,[RSP + 0x170] CALL 0x00121890 JMP 0x00335dd9 LAB_00335dd9: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[RSP + 0x170] CALL 0x00330150 LAB_00335dee: JMP 0x00335df0 LAB_00335df0: LEA RDI,[RSP + 0x170] CALL 0x00121cc8 LEA RDI,[RSP + 0x16f] CALL 0x00121cb0 MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335e72 LAB_00335e65: JMP 0x00335e67 default: MOV dword ptr [RSP + 0x394],0x0 LAB_00335e72: LEA RDI,[RSP + 0x328] CALL 0x003316c0 MOV EAX,dword ptr [RSP + 0x394] TEST EAX,EAX JNZ 0x00335efd JMP 0x00335e8c LAB_00335e8c: CMP dword ptr [RSP + 0x43c],0x1 JNZ 0x00335eea LAB_00335e96: MOV RDI,qword ptr [RSP + 0x150] LEA RSI,[0x4b2417] LEA RDX,[RSP + 0x398] CALL 0x003311c0 LAB_00335eb2: MOV byte ptr [RSP + 0x7],AL JMP 0x00335eb8 LAB_00335eb8: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x00335ec2 JMP 0x00335ed3 LAB_00335ec2: JMP 0x00335ee8 LAB_00335ed3: MOV byte ptr [RSP + 0x467],0x0 MOV dword ptr [RSP + 0x394],0x1 JMP 0x00335efd LAB_00335ee8: JMP 0x00335eea LAB_00335eea: MOV byte ptr [RSP + 0x467],0x1 MOV dword ptr [RSP + 0x394],0x1 LAB_00335efd: LEA RDI,[RSP + 0x398] CALL 0x003316c0 MOV AL,byte ptr [RSP + 0x467] AND AL,0x1 ADD RSP,0x4a8 RET
/* google::protobuf::compiler::Parser::ParseOption(google::protobuf::Message*, google::protobuf::compiler::Parser::LocationRecorder const&, google::protobuf::FileDescriptorProto const*, google::protobuf::compiler::Parser::OptionStyle) */ ulong __thiscall google::protobuf::compiler::Parser::ParseOption (Parser *this,Message *param_1,LocationRecorder *param_2,FileDescriptorProto *param_3, int param_5) { LocationRecorder *pLVar1; byte bVar2; int iVar3; int iVar4; Descriptor *this_00; FieldDescriptor *pFVar5; LogMessage *pLVar6; Reflection *this_01; Message *pMVar7; int4 *puVar8; long lVar9; ArenaStringPtr *pAVar10; Arena *pAVar11; string *psVar12; int8 uVar13; bool bVar14; double local_450; allocator local_339; string local_338 [32]; string local_318 [39]; allocator local_2f1; string local_2f0 [32]; double local_2d0; ulong local_2c8; ulong local_2c0; string local_2b8 [39]; allocator local_291; string local_290 [39]; LogFinisher local_269; LogMessage local_268 [62]; LogFinisher local_22a; byte local_229; LogMessage local_228 [63]; allocator local_1e9; string local_1e8 [39]; LogFinisher local_1c1; LogMessage local_1c0 [63]; byte local_181; LocationRecorder local_180 [24]; LocationRecorder local_168 [24]; LocationRecorder local_150 [24]; LocationRecorder local_138 [24]; UninterpretedOption *local_120; uint local_114; LocationRecorder local_110 [24]; Reflection *local_f8; LogFinisher local_ea; byte local_e9; LogMessage local_e8 [79]; allocator local_99; string local_98 [32]; FieldDescriptor *local_78; int local_6c; FileDescriptorProto *local_68; LocationRecorder *local_60; Message *local_58; Parser *local_50; int1 local_41; string *local_40; MessageLite *local_38; string *local_30; MessageLite *local_28; int4 local_1c; MessageLite *local_18; int4 local_c; MessageLite *local_8; local_6c = param_5; local_68 = param_3; local_60 = param_2; local_58 = param_1; local_50 = this; this_00 = (Descriptor *)Message::GetDescriptor(param_1); std::allocator<char>::allocator(); /* try { // try from 00334d51 to 00334d64 has its CatchHandler @ 00334f1b */ std::__cxx11::string::string(local_98,"uninterpreted_option",&local_99); /* try { // try from 00334d67 to 00334d7b has its CatchHandler @ 00334f31 */ pFVar5 = (FieldDescriptor *)Descriptor::FindFieldByName(this_00,local_98); std::__cxx11::string::~string(local_98); std::allocator<char>::~allocator((allocator<char> *)&local_99); local_e9 = 0; local_78 = pFVar5; if (pFVar5 == (FieldDescriptor *)0x0) { internal::LogMessage::LogMessage (local_e8,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc" ,0x5b7); local_e9 = 1; /* try { // try from 00334e01 to 00334e49 has its CatchHandler @ 00334f64 */ pLVar6 = (LogMessage *) internal::LogMessage::operator<< (local_e8,"CHECK failed: uninterpreted_option_field != nullptr: "); pLVar6 = (LogMessage *) internal::LogMessage::operator<< (pLVar6,"No field named \"uninterpreted_option\" in the Options proto."); internal::LogFinisher::operator=(&local_ea,pLVar6); } if ((local_e9 & 1) != 0) { internal::LogMessage::~LogMessage(local_e8); } local_f8 = (Reflection *)Message::GetReflection(local_58); pLVar1 = local_60; iVar3 = FieldDescriptor::number(local_78); iVar4 = Reflection::FieldSize(local_f8,local_58,local_78); LocationRecorder::LocationRecorder(local_110,pLVar1,iVar3,iVar4); /* try { // try from 00334ee9 to 0033504b has its CatchHandler @ 00334f96 */ if ((local_6c == 1) && (bVar2 = Consume(this,"option"), (bVar2 & 1) == 0)) { local_41 = 0; local_114 = 1; goto LAB_00335efd; } this_01 = (Reflection *)Message::GetReflection(local_58); pMVar7 = (Message *)Reflection::AddMessage(this_01,local_58,local_78,(MessageFactory *)0x0); local_120 = internal::down_cast<google::protobuf::UninterpretedOption*,google::protobuf::Message> (pMVar7); LocationRecorder::LocationRecorder(local_138,local_110,2); /* try { // try from 00335056 to 0033509b has its CatchHandler @ 003350db */ LocationRecorder::RecordLegacyLocation(local_138,local_120,7); iVar3 = UninterpretedOption::name_size(local_120); LocationRecorder::LocationRecorder(local_150,local_138,iVar3); /* try { // try from 003350b6 to 003350c2 has its CatchHandler @ 003350f4 */ bVar2 = ParseOptionNamePart(this,local_120,local_150,local_68); bVar14 = (bVar2 & 1) == 0; if (bVar14) { local_41 = 0; } local_114 = (uint)bVar14; LocationRecorder::~LocationRecorder(local_150); while (local_114 == 0) { /* try { // try from 0033515a to 003351fc has its CatchHandler @ 003350db */ bVar2 = LookingAt(this,"."); if ((bVar2 & 1) == 0) { local_114 = 0; break; } bVar2 = Consume(this,"."); if ((bVar2 & 1) == 0) { local_41 = 0; local_114 = 1; break; } iVar3 = UninterpretedOption::name_size(local_120); LocationRecorder::LocationRecorder(local_168,local_138,iVar3); /* try { // try from 00335217 to 00335223 has its CatchHandler @ 0033523c */ bVar2 = ParseOptionNamePart(this,local_120,local_168,local_68); bVar14 = (bVar2 & 1) == 0; if (bVar14) { local_41 = 0; } local_114 = (uint)bVar14; LocationRecorder::~LocationRecorder(local_168); } LocationRecorder::~LocationRecorder(local_138); if (local_114 != 0) goto LAB_00335efd; /* try { // try from 003352ca to 003352dd has its CatchHandler @ 00334f96 */ bVar2 = Consume(this,"="); if ((bVar2 & 1) == 0) { local_41 = 0; local_114 = 1; goto LAB_00335efd; } /* try { // try from 00335320 to 00335334 has its CatchHandler @ 00334f96 */ LocationRecorder::LocationRecorder(local_180,local_110); /* try { // try from 0033533f to 00335405 has its CatchHandler @ 003353cf */ LocationRecorder::RecordLegacyLocation(local_180,local_120,8); local_181 = TryConsume(this,"-"); local_181 = local_181 & 1; puVar8 = (int4 *)io::Tokenizer::current(*(Tokenizer **)this); bVar2 = local_181; switch(*puVar8) { case 0: internal::LogMessage::LogMessage (local_1c0,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc" ,0x5ec); /* try { // try from 00335408 to 0033543a has its CatchHandler @ 00335462 */ pLVar6 = (LogMessage *) internal::LogMessage::operator<< (local_1c0,"Trying to read value before any tokens have been read."); internal::LogFinisher::operator=(&local_1c1,pLVar6); internal::LogMessage::~LogMessage(local_1c0); local_41 = 0; local_114 = 1; break; case 1: std::allocator<char>::allocator(); /* try { // try from 003354a5 to 003354b8 has its CatchHandler @ 00335504 */ std::__cxx11::string::string (local_1e8,"Unexpected end of stream while parsing option value.",&local_1e9); /* try { // try from 003354bb to 003354cf has its CatchHandler @ 0033551a */ AddError(this,local_1e8); std::__cxx11::string::~string(local_1e8); std::allocator<char>::~allocator((allocator<char> *)&local_1e9); local_41 = 0; local_114 = 1; break; case 2: /* try { // try from 0033570b to 0033571c has its CatchHandler @ 003353cf */ LocationRecorder::AddPath(local_180,3); if ((local_181 & 1) == 0) { std::__cxx11::string::string(local_2b8); /* try { // try from 00335817 to 0033591e has its CatchHandler @ 0033583b */ bVar2 = ConsumeIdentifier(this,local_2b8,"Expected identifier."); if ((bVar2 & 1) == 0) { local_41 = 0; local_114 = 1; } else { local_38 = (MessageLite *)local_120; local_8 = (MessageLite *)(local_120 + 0x10); local_c = 0; *(uint *)local_8 = *(uint *)local_8 | 1; pAVar10 = (ArenaStringPtr *)(local_120 + 0x30); local_40 = local_2b8; pAVar11 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)local_120); internal::ArenaStringPtr::Set(pAVar10,local_2b8,pAVar11); local_114 = 4; } std::__cxx11::string::~string(local_2b8); joined_r0x00335d14: if (local_114 == 4) goto switchD_003353cd_default; } else { std::allocator<char>::allocator(); /* try { // try from 0033574a to 0033575d has its CatchHandler @ 003357a9 */ std::__cxx11::string::string(local_290,"Invalid \'-\' symbol before identifier.",&local_291); /* try { // try from 00335760 to 00335774 has its CatchHandler @ 003357bf */ AddError(this,local_290); std::__cxx11::string::~string(local_290); std::allocator<char>::~allocator((allocator<char> *)&local_291); local_41 = 0; local_114 = 1; } break; case 3: lVar9 = std::numeric_limits<long>::max(); local_2c8 = std::numeric_limits<unsigned_long>::max(); if ((bVar2 & 1) != 0) { local_2c8 = lVar9 + 1; } /* try { // try from 00335995 to 00335b0f has its CatchHandler @ 003353cf */ bVar2 = ConsumeInteger64(this,local_2c8,&local_2c0,"Expected integer."); if ((bVar2 & 1) != 0) { if ((local_181 & 1) == 0) { LocationRecorder::AddPath(local_180,4); UninterpretedOption::set_positive_int_value(local_120,local_2c0); } else { LocationRecorder::AddPath(local_180,5); UninterpretedOption::set_negative_int_value(local_120,-local_2c0); } goto switchD_003353cd_default; } local_41 = 0; local_114 = 1; break; case 4: LocationRecorder::AddPath(local_180,6); bVar2 = ConsumeNumber(this,&local_2d0,"Expected number."); if ((bVar2 & 1) != 0) { if ((local_181 & 1) == 0) { local_450 = local_2d0; } else { local_450 = -local_2d0; } UninterpretedOption::set_double_value(local_120,local_450); goto switchD_003353cd_default; } local_41 = 0; local_114 = 1; break; case 5: LocationRecorder::AddPath(local_180,7); if ((local_181 & 1) == 0) { std::__cxx11::string::string(local_318); /* try { // try from 00335bfe to 00335ced has its CatchHandler @ 00335c1c */ bVar2 = ConsumeString(this,local_318,"Expected string."); if ((bVar2 & 1) == 0) { local_41 = 0; local_114 = 1; } else { local_28 = (MessageLite *)local_120; local_18 = (MessageLite *)(local_120 + 0x10); local_1c = 0; *(uint *)local_18 = *(uint *)local_18 | 2; pAVar10 = (ArenaStringPtr *)(local_120 + 0x38); local_30 = local_318; pAVar11 = (Arena *)MessageLite::GetArenaForAllocation((MessageLite *)local_120); internal::ArenaStringPtr::SetBytes(pAVar10,local_318,pAVar11); local_114 = 4; } std::__cxx11::string::~string(local_318); goto joined_r0x00335d14; } std::allocator<char>::allocator(); /* try { // try from 00335b37 to 00335b4a has its CatchHandler @ 00335b96 */ std::__cxx11::string::string(local_2f0,"Invalid \'-\' symbol before string.",&local_2f1); /* try { // try from 00335b4d to 00335b61 has its CatchHandler @ 00335bac */ AddError(this,local_2f0); std::__cxx11::string::~string(local_2f0); std::allocator<char>::~allocator((allocator<char> *)&local_2f1); local_41 = 0; local_114 = 1; break; case 6: /* try { // try from 00335d1f to 00335d7c has its CatchHandler @ 003353cf */ bVar2 = LookingAt(this,"{"); if ((bVar2 & 1) == 0) { std::allocator<char>::allocator(); /* try { // try from 00335dc3 to 00335dd6 has its CatchHandler @ 00335e1f */ std::__cxx11::string::string(local_338,"Expected option value.",&local_339); /* try { // try from 00335dd9 to 00335ded has its CatchHandler @ 00335e35 */ AddError(this,local_338); std::__cxx11::string::~string(local_338); std::allocator<char>::~allocator((allocator<char> *)&local_339); local_41 = 0; local_114 = 1; } else { LocationRecorder::AddPath(local_180,8); psVar12 = (string *)UninterpretedOption::mutable_aggregate_value_abi_cxx11_(local_120); bVar2 = ParseUninterpretedBlock(this,psVar12); if ((bVar2 & 1) != 0) goto switchD_003353cd_default; local_41 = 0; local_114 = 1; } break; case 7: case 8: local_229 = 0; /* try { // try from 00335560 to 003355c0 has its CatchHandler @ 003353cf */ bVar2 = io::Tokenizer::report_whitespace(*(Tokenizer **)this); if (((bVar2 & 1) != 0) || (bVar2 = io::Tokenizer::report_newlines(*(Tokenizer **)this), (bVar2 & 1) != 0)) { internal::LogMessage::LogMessage (local_228,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc" ,0x5f5); local_229 = 1; /* try { // try from 003355cb to 0033561b has its CatchHandler @ 003356b3 */ pLVar6 = (LogMessage *) internal::LogMessage::operator<< (local_228, "CHECK failed: !input_->report_whitespace() && !input_->report_newlines(): " ); pLVar6 = (LogMessage *) internal::LogMessage::operator<<(pLVar6,"Whitespace tokens were not requested."); internal::LogFinisher::operator=(&local_22a,pLVar6); } if ((local_229 & 1) != 0) { internal::LogMessage::~LogMessage(local_228); } /* try { // try from 00335639 to 00335656 has its CatchHandler @ 003353cf */ internal::LogMessage::LogMessage (local_268,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc" ,0x5f7); /* try { // try from 00335659 to 0033568b has its CatchHandler @ 003356e5 */ pLVar6 = (LogMessage *) internal::LogMessage::operator<<(local_268,"Tokenizer reported whitespace."); internal::LogFinisher::operator=(&local_269,pLVar6); internal::LogMessage::~LogMessage(local_268); local_41 = 0; local_114 = 1; break; default: switchD_003353cd_default: local_114 = 0; } LocationRecorder::~LocationRecorder(local_180); if (local_114 == 0) { /* try { // try from 00335e96 to 00335eb1 has its CatchHandler @ 00334f96 */ if ((local_6c == 1) && (bVar2 = ConsumeEndOfDeclaration(this,";",local_110), (bVar2 & 1) == 0)) { local_41 = 0; local_114 = 1; } else { local_41 = 1; local_114 = 1; } } LAB_00335efd: uVar13 = LocationRecorder::~LocationRecorder(local_110); return CONCAT71((int7)((ulong)uVar13 >> 8),local_41) & 0xffffffffffffff01; }
11,495
ps_fetch_datetime
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_datetime(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row) { MYSQL_TIME *t= (MYSQL_TIME *)r_param->buffer; unsigned int len= net_field_length(row); switch (r_param->buffer_type) { case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: convert_to_datetime(t, row, len, field->type); break; case MYSQL_TYPE_DATE: convert_to_datetime(t, row, len, field->type); break; case MYSQL_TYPE_TIME: convert_to_datetime(t, row, len, field->type); t->year= t->day= t->month= 0; break; case MYSQL_TYPE_YEAR: { MYSQL_TIME tm; convert_to_datetime(&tm, row, len, field->type); shortstore(r_param->buffer, tm.year); break; } default: { char dtbuffer[60]; MYSQL_TIME tm; size_t length; convert_to_datetime(&tm, row, len, field->type); switch(field->type) { case MYSQL_TYPE_DATE: length= sprintf(dtbuffer, "%04u-%02u-%02u", tm.year, tm.month, tm.day); break; case MYSQL_TYPE_TIME: length= sprintf(dtbuffer, "%s%02u:%02u:%02u", (tm.neg ? "-" : ""), tm.hour, tm.minute, tm.second); if (field->decimals && field->decimals <= 6) { char ms[8]; sprintf(ms, ".%06lu", tm.second_part); if (field->decimals < 6) ms[field->decimals + 1]= 0; length+= strlen(ms); strcat(dtbuffer, ms); } break; case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_TIMESTAMP: length= sprintf(dtbuffer, "%04u-%02u-%02u %02u:%02u:%02u", tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); if (field->decimals && field->decimals <= 6) { char ms[8]; sprintf(ms, ".%06lu", tm.second_part); if (field->decimals < 6) ms[field->decimals + 1]= 0; length+= strlen(ms); strcat(dtbuffer, ms); } break; default: dtbuffer[0]= 0; length= 0; break; } convert_froma_string(r_param, dtbuffer, length); break; } } (*row) += len; }
O3
c
ps_fetch_datetime: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x10(%rdi), %r13 movq %rdx, %rdi callq 0x18911 movq %rax, %r14 movl 0x60(%r15), %eax addl $-0x7, %eax cmpl $0x6, %eax ja 0x2711c leaq 0x158fd(%rip), %rcx # 0x3c9f8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x70(%r12), %ecx movq %r13, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x27cf1 jmp 0x2731b movl 0x70(%r12), %r13d leaq -0xa0(%rbp), %rdi movq %rbx, %rsi movl %r14d, %edx movl %r13d, %ecx callq 0x27cf1 addl $-0x7, %r13d cmpl $0x5, %r13d ja 0x27305 leaq 0x158c9(%rip), %rax # 0x3ca14 movslq (%rax,%r13,4), %rcx addq %rax, %rcx jmpq *%rcx movl -0xa0(%rbp), %r8d movl -0x9c(%rbp), %r9d movl -0x98(%rbp), %eax movq %rax, -0xa8(%rbp) movl -0x94(%rbp), %r11d movl -0x90(%rbp), %r13d movl -0x8c(%rbp), %r10d leaq 0x124f7(%rip), %rcx # 0x39682 leaq -0x70(%rbp), %rdi movl $0x3c, %edx movl $0x1, %esi xorl %eax, %eax pushq %r10 pushq %r13 pushq %r11 pushq -0xa8(%rbp) callq 0x132a0 addq $0x20, %rsp jmp 0x27259 movl 0x70(%r12), %ecx movq %r13, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x27cf1 movl $0x0, 0x8(%r13) movq $0x0, (%r13) jmp 0x2731b movl 0x70(%r12), %ecx leaq -0x70(%rbp), %r12 movq %r12, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x27cf1 movl (%r12), %eax movq 0x10(%r15), %rcx movb %al, (%rcx) movq 0x10(%r15), %rcx movb %ah, 0x1(%rcx) jmp 0x2731b cmpb $0x0, -0x80(%rbp) leaq 0x1057f(%rip), %rax # 0x37794 leaq 0x103d0(%rip), %r8 # 0x375ec cmoveq %rax, %r8 movl -0x94(%rbp), %r9d movl -0x90(%rbp), %r10d movl -0x8c(%rbp), %r11d leaq 0x1242e(%rip), %rcx # 0x3966a leaq -0x70(%rbp), %rdi movl $0x3c, %edx movl $0x1, %esi xorl %eax, %eax pushq %r11 pushq %r10 callq 0x132a0 addq $0x10, %rsp movslq %eax, %r13 movl 0x68(%r12), %eax decl %eax cmpl $0x5, %eax ja 0x2730c movq -0x88(%rbp), %r8 leaq 0x12401(%rip), %rcx # 0x3967b leaq -0x78(%rbp), %rdi movl $0x8, %edx movl $0x1, %esi xorl %eax, %eax callq 0x132a0 movl 0x68(%r12), %eax cmpq $0x5, %rax ja 0x272a3 leaq -0x78(%rbp), %rcx movb $0x0, 0x1(%rax,%rcx) leaq -0x78(%rbp), %r12 movq %r12, %rdi callq 0x131c0 addq %rax, %r13 leaq -0x70(%rbp), %rdi movl $0x3c, %edx movq %r12, %rsi callq 0x13450 jmp 0x2730c movl -0xa0(%rbp), %r8d movl -0x9c(%rbp), %r9d movl -0x98(%rbp), %r10d subq $0x8, %rsp leaq 0x12376(%rip), %rcx # 0x3965b leaq -0x70(%rbp), %rdi movl $0x3c, %edx movl $0x1, %esi xorl %eax, %eax pushq %r10 callq 0x132a0 addq $0x10, %rsp movslq %eax, %r13 jmp 0x2730c movb $0x0, -0x70(%rbp) xorl %r13d, %r13d leaq -0x70(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx callq 0x27821 movl %r14d, %eax addq %rax, (%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x27342 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x13500
ps_fetch_datetime: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r12, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov r13, [rdi+10h] mov rdi, rdx call net_field_length mov r14, rax mov eax, [r15+60h] add eax, 0FFFFFFF9h; switch 7 cases cmp eax, 6 ja short def_27102; jumptable 0000000000027102 default case, cases 8,9 lea rcx, jpt_27102 movsxd rax, ds:(jpt_27102 - 3C9F8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_27104: mov ecx, [r12+70h]; jumptable 0000000000027102 cases 7,10,12 mov rdi, r13 mov rsi, rbx mov edx, r14d call convert_to_datetime jmp loc_2731B def_27102: mov r13d, [r12+70h]; jumptable 0000000000027102 default case, cases 8,9 lea rdi, [rbp+var_A0] mov rsi, rbx mov edx, r14d mov ecx, r13d call convert_to_datetime add r13d, 0FFFFFFF9h; switch 6 cases cmp r13d, 5 ja def_27152; jumptable 0000000000027152 default case, cases 8,9 lea rax, jpt_27152 movsxd rcx, ds:(jpt_27152 - 3CA14h)[rax+r13*4] add rcx, rax jmp rcx; switch jump loc_27154: mov r8d, [rbp+var_A0]; jumptable 0000000000027152 cases 7,12 mov r9d, [rbp+var_9C] mov eax, [rbp+var_98] mov [rbp+var_A8], rax mov r11d, [rbp+var_94] mov r13d, [rbp+var_90] mov r10d, [rbp+var_8C] lea rcx, a04u02u02u02u02; "%04u-%02u-%02u %02u:%02u:%02u" lea rdi, [rbp+var_70] mov edx, 3Ch ; '<' mov esi, 1 xor eax, eax push r10 push r13 push r11 push [rbp+var_A8] call ___sprintf_chk add rsp, 20h jmp loc_27259 loc_271B5: mov ecx, [r12+70h]; jumptable 0000000000027102 case 11 mov rdi, r13 mov rsi, rbx mov edx, r14d call convert_to_datetime mov dword ptr [r13+8], 0 mov qword ptr [r13+0], 0 jmp loc_2731B loc_271DD: mov ecx, [r12+70h]; jumptable 0000000000027102 case 13 lea r12, [rbp+var_70] mov rdi, r12 mov rsi, rbx mov edx, r14d call convert_to_datetime mov eax, [r12] mov rcx, [r15+10h] mov [rcx], al mov rcx, [r15+10h] mov [rcx+1], ah jmp loc_2731B loc_2720A: cmp [rbp+var_80], 0; jumptable 0000000000027152 case 11 lea rax, aExecuteTestWit+29h; "" lea r8, asc_375D9+13h; "-" cmovz r8, rax mov r9d, [rbp+var_94] mov r10d, [rbp+var_90] mov r11d, [rbp+var_8C] lea rcx, aS02u02u02u; "%s%02u:%02u:%02u" lea rdi, [rbp+var_70] mov edx, 3Ch ; '<' mov esi, 1 xor eax, eax push r11 push r10 call ___sprintf_chk add rsp, 10h loc_27259: movsxd r13, eax mov eax, [r12+68h] dec eax cmp eax, 5 ja loc_2730C mov r8, [rbp+var_88] lea rcx, a06lu; ".%06lu" lea rdi, [rbp+var_78] mov edx, 8 mov esi, 1 xor eax, eax call ___sprintf_chk mov eax, [r12+68h] cmp rax, 5 ja short loc_272A3 lea rcx, [rbp+var_78] mov byte ptr [rax+rcx+1], 0 loc_272A3: lea r12, [rbp+var_78] mov rdi, r12 call _strlen add r13, rax lea rdi, [rbp+var_70] mov edx, 3Ch ; '<' mov rsi, r12 call ___strcat_chk jmp short loc_2730C loc_272C5: mov r8d, [rbp+var_A0]; jumptable 0000000000027152 case 10 mov r9d, [rbp+var_9C] mov r10d, [rbp+var_98] sub rsp, 8 lea rcx, a04u02u02u; "%04u-%02u-%02u" lea rdi, [rbp+var_70] mov edx, 3Ch ; '<' mov esi, 1 xor eax, eax push r10 call ___sprintf_chk add rsp, 10h movsxd r13, eax jmp short loc_2730C def_27152: mov [rbp+var_70], 0; jumptable 0000000000027152 default case, cases 8,9 xor r13d, r13d loc_2730C: lea rsi, [rbp+var_70] mov rdi, r15 mov rdx, r13 call convert_froma_string loc_2731B: mov eax, r14d add [rbx], rax mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_27342 add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_27342: call ___stack_chk_fail
unsigned long long ps_fetch_datetime(long long a1, long long a2, unsigned __int8 **a3) { long long v4; // r13 unsigned int v5; // r14d unsigned int v6; // r13d int v7; // eax char v8; // ah const char *v9; // r8 long long v10; // r13 unsigned long long v11; // rax int v13; // [rsp+10h] [rbp-A0h] BYREF int v14; // [rsp+14h] [rbp-9Ch] int v15; // [rsp+18h] [rbp-98h] int v16; // [rsp+1Ch] [rbp-94h] int v17; // [rsp+20h] [rbp-90h] int v18; // [rsp+24h] [rbp-8Ch] long long v19; // [rsp+28h] [rbp-88h] char v20; // [rsp+30h] [rbp-80h] _BYTE v21[8]; // [rsp+38h] [rbp-78h] BYREF _BYTE v22[64]; // [rsp+40h] [rbp-70h] BYREF unsigned long long v23; // [rsp+80h] [rbp-30h] v23 = __readfsqword(0x28u); v4 = *(_QWORD *)(a1 + 16); v5 = net_field_length(a3); switch ( *(_DWORD *)(a1 + 96) ) { case 7: case 0xA: case 0xC: convert_to_datetime(v4, a3, v5, *(unsigned int *)(a2 + 112)); break; case 0xB: convert_to_datetime(v4, a3, v5, *(unsigned int *)(a2 + 112)); *(_DWORD *)(v4 + 8) = 0; *(_QWORD *)v4 = 0LL; break; case 0xD: convert_to_datetime(v22, a3, v5, *(unsigned int *)(a2 + 112)); v8 = v22[1]; **(_BYTE **)(a1 + 16) = v22[0]; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = v8; break; default: v6 = *(_DWORD *)(a2 + 112); convert_to_datetime(&v13, a3, v5, v6); switch ( v6 ) { case 7u: case 0xCu: v7 = __sprintf_chk(v22, 1LL, 60LL, "%04u-%02u-%02u %02u:%02u:%02u", v13, v14, v15, v16, v17, v18); goto LABEL_10; case 0xAu: v10 = (int)__sprintf_chk(v22, 1LL, 60LL, "%04u-%02u-%02u", v13, v14, v15); break; case 0xBu: v9 = "-"; if ( !v20 ) v9 = ""; v7 = __sprintf_chk(v22, 1LL, 60LL, "%s%02u:%02u:%02u", v9, v16, v17, v18); LABEL_10: v10 = v7; if ( (unsigned int)(*(_DWORD *)(a2 + 104) - 1) <= 5 ) { __sprintf_chk(v21, 1LL, 8LL, ".%06lu", v19); v11 = *(unsigned int *)(a2 + 104); if ( v11 <= 5 ) v21[v11 + 1] = 0; v10 += strlen(v21); __strcat_chk(v22, v21, 60LL); } break; default: v22[0] = 0; v10 = 0LL; break; } convert_froma_string(a1, v22, v10); break; } *a3 += v5; return __readfsqword(0x28u); }
ps_fetch_datetime: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13,qword ptr [RDI + 0x10] MOV RDI,RDX CALL 0x00118911 MOV R14,RAX MOV EAX,dword ptr [R15 + 0x60] ADD EAX,-0x7 CMP EAX,0x6 JA 0x0012711c LEA RCX,[0x13c9f8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV ECX,dword ptr [R12 + 0x70] MOV RDI,R13 MOV RSI,RBX MOV EDX,R14D CALL 0x00127cf1 JMP 0x0012731b caseD_8: MOV R13D,dword ptr [R12 + 0x70] LEA RDI,[RBP + -0xa0] MOV RSI,RBX MOV EDX,R14D MOV ECX,R13D CALL 0x00127cf1 ADD R13D,-0x7 CMP R13D,0x5 JA 0x00127305 LEA RAX,[0x13ca14] MOVSXD RCX,dword ptr [RAX + R13*0x4] ADD RCX,RAX switchD: JMP RCX caseD_7: MOV R8D,dword ptr [RBP + -0xa0] MOV R9D,dword ptr [RBP + -0x9c] MOV EAX,dword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xa8],RAX MOV R11D,dword ptr [RBP + -0x94] MOV R13D,dword ptr [RBP + -0x90] MOV R10D,dword ptr [RBP + -0x8c] LEA RCX,[0x139682] LEA RDI,[RBP + -0x70] MOV EDX,0x3c MOV ESI,0x1 XOR EAX,EAX PUSH R10 PUSH R13 PUSH R11 PUSH qword ptr [RBP + -0xa8] CALL 0x001132a0 ADD RSP,0x20 JMP 0x00127259 caseD_b: MOV ECX,dword ptr [R12 + 0x70] MOV RDI,R13 MOV RSI,RBX MOV EDX,R14D CALL 0x00127cf1 MOV dword ptr [R13 + 0x8],0x0 MOV qword ptr [R13],0x0 JMP 0x0012731b caseD_d: MOV ECX,dword ptr [R12 + 0x70] LEA R12,[RBP + -0x70] MOV RDI,R12 MOV RSI,RBX MOV EDX,R14D CALL 0x00127cf1 MOV EAX,dword ptr [R12] MOV RCX,qword ptr [R15 + 0x10] MOV byte ptr [RCX],AL MOV RCX,qword ptr [R15 + 0x10] MOV byte ptr [RCX + 0x1],AH JMP 0x0012731b caseD_b: CMP byte ptr [RBP + -0x80],0x0 LEA RAX,[0x137794] LEA R8,[0x1375ec] CMOVZ R8,RAX MOV R9D,dword ptr [RBP + -0x94] MOV R10D,dword ptr [RBP + -0x90] MOV R11D,dword ptr [RBP + -0x8c] LEA RCX,[0x13966a] LEA RDI,[RBP + -0x70] MOV EDX,0x3c MOV ESI,0x1 XOR EAX,EAX PUSH R11 PUSH R10 CALL 0x001132a0 ADD RSP,0x10 LAB_00127259: MOVSXD R13,EAX MOV EAX,dword ptr [R12 + 0x68] DEC EAX CMP EAX,0x5 JA 0x0012730c MOV R8,qword ptr [RBP + -0x88] LEA RCX,[0x13967b] LEA RDI,[RBP + -0x78] MOV EDX,0x8 MOV ESI,0x1 XOR EAX,EAX CALL 0x001132a0 MOV EAX,dword ptr [R12 + 0x68] CMP RAX,0x5 JA 0x001272a3 LEA RCX,[RBP + -0x78] MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0 LAB_001272a3: LEA R12,[RBP + -0x78] MOV RDI,R12 CALL 0x001131c0 ADD R13,RAX LEA RDI,[RBP + -0x70] MOV EDX,0x3c MOV RSI,R12 CALL 0x00113450 JMP 0x0012730c caseD_a: MOV R8D,dword ptr [RBP + -0xa0] MOV R9D,dword ptr [RBP + -0x9c] MOV R10D,dword ptr [RBP + -0x98] SUB RSP,0x8 LEA RCX,[0x13965b] LEA RDI,[RBP + -0x70] MOV EDX,0x3c MOV ESI,0x1 XOR EAX,EAX PUSH R10 CALL 0x001132a0 ADD RSP,0x10 MOVSXD R13,EAX JMP 0x0012730c caseD_8: MOV byte ptr [RBP + -0x70],0x0 XOR R13D,R13D LAB_0012730c: LEA RSI,[RBP + -0x70] MOV RDI,R15 MOV RDX,R13 CALL 0x00127821 LAB_0012731b: MOV EAX,R14D ADD qword ptr [RBX],RAX MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00127342 ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00127342: CALL 0x00113500
void ps_fetch_datetime(long param_1,long param_2,long *param_3) { int4 uVar1; int8 *puVar2; uint uVar3; int iVar4; size_t sVar5; char *pcVar6; long lVar7; long in_FS_OFFSET; int4 local_a8; int4 local_a4; int4 local_a0; int4 local_9c; int4 local_98; int4 local_94; int8 local_90; char local_88; char local_80; int1 auStack_7f [7]; uint local_78 [16]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); puVar2 = *(int8 **)(param_1 + 0x10); uVar3 = net_field_length(param_3); switch(*(int4 *)(param_1 + 0x60)) { case 7: case 10: case 0xc: convert_to_datetime(puVar2,param_3,uVar3,*(int4 *)(param_2 + 0x70)); break; default: uVar1 = *(int4 *)(param_2 + 0x70); convert_to_datetime(&local_a8,param_3,uVar3,uVar1); switch(uVar1) { case 7: case 0xc: iVar4 = __sprintf_chk(local_78,1,0x3c,"%04u-%02u-%02u %02u:%02u:%02u",local_a8,local_a4, local_a0,local_9c,local_98,local_94); goto LAB_00127259; default: local_78[0] = local_78[0] & 0xffffff00; lVar7 = 0; break; case 10: iVar4 = __sprintf_chk(local_78,1,0x3c,"%04u-%02u-%02u",local_a8,local_a4,local_a0); lVar7 = (long)iVar4; break; case 0xb: pcVar6 = "-"; if (local_88 == '\0') { pcVar6 = ""; } iVar4 = __sprintf_chk(local_78,1,0x3c,"%s%02u:%02u:%02u",pcVar6,local_9c,local_98,local_94); LAB_00127259: lVar7 = (long)iVar4; if (*(int *)(param_2 + 0x68) - 1U < 6) { __sprintf_chk(&local_80,1,8,".%06lu",local_90); if ((ulong)*(uint *)(param_2 + 0x68) < 6) { auStack_7f[*(uint *)(param_2 + 0x68)] = 0; } sVar5 = strlen(&local_80); lVar7 = lVar7 + sVar5; __strcat_chk(local_78,&local_80,0x3c); } } convert_froma_string(param_1,local_78,lVar7); break; case 0xb: convert_to_datetime(puVar2,param_3,uVar3,*(int4 *)(param_2 + 0x70)); *(int4 *)(puVar2 + 1) = 0; *puVar2 = 0; break; case 0xd: convert_to_datetime(local_78,param_3,uVar3,*(int4 *)(param_2 + 0x70)); **(int1 **)(param_1 + 0x10) = (char)local_78[0]; *(char *)(*(long *)(param_1 + 0x10) + 1) = (char)(local_78[0] >> 8); } *param_3 = *param_3 + (ulong)uVar3; if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
11,496
sqr_fp2x2
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/fp12_tower.c
static void sqr_fp2x2(vec768x ret, const vec384x a) { #if 1 sqr_382x(ret, a, BLS12_381_P); /* +~5% in final exponentiation */ #else vec384 t0, t1; add_mod_384(t0, a[0], a[1], BLS12_381_P); sub_mod_384(t1, a[0], a[1], BLS12_381_P); mul_384(ret[1], a[0], a[1]); add_mod_384x384(ret[1], ret[1], ret[1], BLS12_381_P); mul_384(ret[0], t0, t1); #endif }
O2
c
sqr_fp2x2: pushq %rbp movq %rsp, %rbp leaq 0x22be7(%rip), %rdx # 0x7fcb0 popq %rbp jmp 0x68220
sqr_fp2x2: push rbp mov rbp, rsp lea rdx, BLS12_381_P pop rbp jmp sqr_382x
long long sqr_fp2x2(long long a1, long long a2) { return sqr_382x(a1, a2, &BLS12_381_P); }
sqr_fp2x2: PUSH RBP MOV RBP,RSP LEA RDX,[0x17fcb0] POP RBP JMP 0x00168220
void sqr_fp2x2(int8 param_1,int8 param_2) { sqr_382x(param_1,param_2,BLS12_381_P); return; }
11,497
harvest_pins
eloqsql/mysys/lf_alloc-pin.c
static int harvest_pins(LF_PINS *el, struct st_harvester *hv) { int i; LF_PINS *el_end= el+MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH); for (; el < el_end; el++) { for (i= 0; i < LF_PINBOX_PINS; i++) { void *p= el->pin[i]; if (p) *hv->granary++= p; } } /* hv->npins may become negative below, but it means that we're on the last dynarray page and harvest_pins() won't be called again. We don't bother to make hv->npins() correct (that is 0) in this case. */ hv->npins-= LF_DYNARRAY_LEVEL_LENGTH; return 0; }
O0
c
harvest_pins: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpl $0x100, 0x8(%rax) # imm = 0x100 jge 0xfcced movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x34(%rbp) jmp 0xfccf7 movl $0x100, %eax # imm = 0x100 movl %eax, -0x34(%rbp) jmp 0xfccf7 movq -0x30(%rbp), %rax movl -0x34(%rbp), %ecx movslq %ecx, %rcx imulq $0x78, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xfcd6f movl $0x0, -0x14(%rbp) cmpl $0x4, -0x14(%rbp) jge 0xfcd5f movq -0x8(%rbp), %rax movslq -0x14(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0xfcd52 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rdx movq (%rdx), %rax movq %rax, %rsi addq $0x8, %rsi movq %rsi, (%rdx) movq %rcx, (%rax) jmp 0xfcd54 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0xfcd1d jmp 0xfcd61 movq -0x8(%rbp), %rax addq $0x78, %rax movq %rax, -0x8(%rbp) jmp 0xfcd0c movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx subl $0x100, %ecx # imm = 0x100 movl %ecx, 0x8(%rax) xorl %eax, %eax popq %rbp retq nopw %cs:(%rax,%rax)
harvest_pins: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_10] cmp dword ptr [rax+8], 100h jge short loc_FCCED mov rax, [rbp+var_10] mov eax, [rax+8] mov [rbp+var_34], eax jmp short loc_FCCF7 loc_FCCED: mov eax, 100h mov [rbp+var_34], eax jmp short $+2 loc_FCCF7: mov rax, [rbp+var_30] mov ecx, [rbp+var_34] movsxd rcx, ecx imul rcx, 78h ; 'x' add rax, rcx mov [rbp+var_20], rax loc_FCD0C: mov rax, [rbp+var_8] cmp rax, [rbp+var_20] jnb short loc_FCD6F mov [rbp+var_14], 0 loc_FCD1D: cmp [rbp+var_14], 4 jge short loc_FCD5F mov rax, [rbp+var_8] movsxd rcx, [rbp+var_14] mov rax, [rax+rcx*8] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_FCD52 mov rcx, [rbp+var_28] mov rdx, [rbp+var_10] mov rax, [rdx] mov rsi, rax add rsi, 8 mov [rdx], rsi mov [rax], rcx loc_FCD52: jmp short $+2 loc_FCD54: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_FCD1D loc_FCD5F: jmp short $+2 loc_FCD61: mov rax, [rbp+var_8] add rax, 78h ; 'x' mov [rbp+var_8], rax jmp short loc_FCD0C loc_FCD6F: mov rax, [rbp+var_10] mov ecx, [rax+8] sub ecx, 100h mov [rax+8], ecx xor eax, eax pop rbp retn
long long harvest_pins(unsigned long long a1, long long a2) { _QWORD *v2; // rax int v4; // [rsp+0h] [rbp-34h] long long v5; // [rsp+Ch] [rbp-28h] int i; // [rsp+20h] [rbp-14h] unsigned long long v7; // [rsp+2Ch] [rbp-8h] v7 = a1; if ( *(int *)(a2 + 8) >= 256 ) v4 = 256; else v4 = *(_DWORD *)(a2 + 8); while ( v7 < 120LL * v4 + a1 ) { for ( i = 0; i < 4; ++i ) { v5 = *(_QWORD *)(v7 + 8LL * i); if ( v5 ) { v2 = *(_QWORD **)a2; *(_QWORD *)a2 += 8LL; *v2 = v5; } } v7 += 120LL; } *(_DWORD *)(a2 + 8) -= 256; return 0LL; }
harvest_pins: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x100 JGE 0x001fcced MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x34],EAX JMP 0x001fccf7 LAB_001fcced: MOV EAX,0x100 MOV dword ptr [RBP + -0x34],EAX JMP 0x001fccf7 LAB_001fccf7: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x34] MOVSXD RCX,ECX IMUL RCX,RCX,0x78 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001fcd0c: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001fcd6f MOV dword ptr [RBP + -0x14],0x0 LAB_001fcd1d: CMP dword ptr [RBP + -0x14],0x4 JGE 0x001fcd5f MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001fcd52 MOV RCX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RDX] MOV RSI,RAX ADD RSI,0x8 MOV qword ptr [RDX],RSI MOV qword ptr [RAX],RCX LAB_001fcd52: JMP 0x001fcd54 LAB_001fcd54: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x001fcd1d LAB_001fcd5f: JMP 0x001fcd61 LAB_001fcd61: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x78 MOV qword ptr [RBP + -0x8],RAX JMP 0x001fcd0c LAB_001fcd6f: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] SUB ECX,0x100 MOV dword ptr [RAX + 0x8],ECX XOR EAX,EAX POP RBP RET
int8 harvest_pins(ulong param_1,int8 *param_2) { long lVar1; long *plVar2; int local_3c; int local_1c; ulong local_10; if (*(int *)(param_2 + 1) < 0x100) { local_3c = *(int *)(param_2 + 1); } else { local_3c = 0x100; } for (local_10 = param_1; local_10 < param_1 + (long)local_3c * 0x78; local_10 = local_10 + 0x78) { for (local_1c = 0; local_1c < 4; local_1c = local_1c + 1) { lVar1 = *(long *)(local_10 + (long)local_1c * 8); if (lVar1 != 0) { plVar2 = (long *)*param_2; *param_2 = plVar2 + 1; *plVar2 = lVar1; } } } *(int *)(param_2 + 1) = *(int *)(param_2 + 1) + -0x100; return 0; }
11,498
my_create
eloqsql/mysys/my_create.c
File my_create(const char *FileName, int CreateFlags, int access_flags, myf MyFlags) { int fd; DBUG_ENTER("my_create"); DBUG_PRINT("my",("Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %lu", FileName, CreateFlags, access_flags, MyFlags)); #if defined(_WIN32) fd= my_win_open(FileName, access_flags | O_CREAT); #else fd= open((char *) FileName, access_flags | O_CREAT | O_CLOEXEC, CreateFlags ? CreateFlags : my_umask); #endif if ((MyFlags & MY_SYNC_DIR) && (fd >=0) && my_sync_dir_by_file(FileName, MyFlags)) { my_close(fd, MyFlags); fd= -1; } fd= my_register_filename(fd, FileName, FILE_BY_CREATE, EE_CANTCREATEFILE, MyFlags); DBUG_RETURN(fd); }
O0
c
my_create: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq %rcx, -0x18(%rbp) jmp 0xef698 movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movl -0x10(%rbp), %eax orl $0x40, %eax orl $0x80000, %eax # imm = 0x80000 movl %eax, -0x20(%rbp) cmpl $0x0, -0xc(%rbp) je 0xef6bc movl -0xc(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0xef6c8 leaq 0x1d04e5(%rip), %rax # 0x2bfba8 movl (%rax), %eax movl %eax, -0x2c(%rbp) movl -0x20(%rbp), %esi movq -0x28(%rbp), %rdi movl -0x2c(%rbp), %edx movb $0x0, %al callq 0x2a950 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax andq $0x8000, %rax # imm = 0x8000 cmpq $0x0, %rax je 0xef717 cmpl $0x0, -0x1c(%rbp) jl 0xef717 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xf5d30 cmpl $0x0, %eax je 0xef717 movl -0x1c(%rbp), %edi movq -0x18(%rbp), %rsi callq 0xf44d0 movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF movl -0x1c(%rbp), %edi movq -0x8(%rbp), %rsi movq -0x18(%rbp), %r8 movl $0x2, %edx movl $0x1, %ecx callq 0xf4370 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_create: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_18], rcx jmp short $+2 loc_EF698: mov rax, [rbp+var_8] mov [rbp+var_28], rax mov eax, [rbp+var_10] or eax, 40h or eax, 80000h mov [rbp+var_20], eax cmp [rbp+var_C], 0 jz short loc_EF6BC mov eax, [rbp+var_C] mov [rbp+var_2C], eax jmp short loc_EF6C8 loc_EF6BC: lea rax, my_umask mov eax, [rax] mov [rbp+var_2C], eax loc_EF6C8: mov esi, [rbp+var_20] mov rdi, [rbp+var_28] mov edx, [rbp+var_2C] mov al, 0 call _open64 mov [rbp+var_1C], eax mov rax, [rbp+var_18] and rax, 8000h cmp rax, 0 jz short loc_EF717 cmp [rbp+var_1C], 0 jl short loc_EF717 mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call my_sync_dir_by_file cmp eax, 0 jz short loc_EF717 mov edi, [rbp+var_1C] mov rsi, [rbp+var_18] call my_close mov [rbp+var_1C], 0FFFFFFFFh loc_EF717: mov edi, [rbp+var_1C] mov rsi, [rbp+var_8] mov r8, [rbp+var_18] mov edx, 2 mov ecx, 1 call my_register_filename mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov [rbp+var_30], eax mov eax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_create(long long a1, unsigned int a2, int a3, long long a4) { unsigned int v5; // [rsp+4h] [rbp-2Ch] int v6; // [rsp+14h] [rbp-1Ch] if ( a2 ) v5 = a2; else v5 = my_umask; v6 = open64(a1, a3 | 0x80040u, v5); if ( (a4 & 0x8000) != 0 && v6 >= 0 && (unsigned int)my_sync_dir_by_file(a1, a4) ) { my_close((unsigned int)v6, a4); v6 = -1; } return (unsigned int)my_register_filename((unsigned int)v6, a1, 2LL, 1LL, a4); }
my_create: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x18],RCX JMP 0x001ef698 LAB_001ef698: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x10] OR EAX,0x40 OR EAX,0x80000 MOV dword ptr [RBP + -0x20],EAX CMP dword ptr [RBP + -0xc],0x0 JZ 0x001ef6bc MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001ef6c8 LAB_001ef6bc: LEA RAX,[0x3bfba8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX LAB_001ef6c8: MOV ESI,dword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x2c] MOV AL,0x0 CALL 0x0012a950 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x8000 CMP RAX,0x0 JZ 0x001ef717 CMP dword ptr [RBP + -0x1c],0x0 JL 0x001ef717 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001f5d30 CMP EAX,0x0 JZ 0x001ef717 MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001f44d0 MOV dword ptr [RBP + -0x1c],0xffffffff LAB_001ef717: MOV EDI,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RBP + -0x8] MOV R8,qword ptr [RBP + -0x18] MOV EDX,0x2 MOV ECX,0x1 CALL 0x001f4370 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
int4 my_create(char *param_1,uint param_2,uint param_3,ulong param_4) { int iVar1; int4 uVar2; uint local_34; int local_24; local_34 = param_2; if (param_2 == 0) { local_34 = my_umask; } local_24 = open64(param_1,param_3 | 0x80040,(ulong)local_34); if ((((param_4 & 0x8000) != 0) && (-1 < local_24)) && (iVar1 = my_sync_dir_by_file(param_1,param_4), iVar1 != 0)) { my_close(local_24,param_4); local_24 = -1; } uVar2 = my_register_filename(local_24,param_1,2,1,param_4); return uVar2; }
11,499
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O0
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) jmp 0x58119 movq -0x10(%rbp), %rax cmpq $0x0, 0x90(%rax) jne 0x58139 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) xorl %eax, %eax popq %rbp retq nopl (%rax)
write_hook_for_redo: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 jmp short $+2 loc_58119: mov rax, [rbp+var_10] cmp qword ptr [rax+90h], 0 jnz short loc_58139 mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+90h], rcx loc_58139: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 JMP 0x00158119 LAB_00158119: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x90],0x0 JNZ 0x00158139 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX LAB_00158139: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }