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
8,600
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
static std::vector<T> string_split(const std::string & str, char delim) { static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string"); std::vector<T> values; std::istringstream str_stream(str); std::string token; while (std::getline(str_stream, token, delim)) { T value; std::istringstream token_stream(token); token_stream >> value; values.push_back(value); } return values; }
O2
c
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x328, %rsp # imm = 0x328 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x28(%rsp), %rdi pushq $0x8 popq %rdx callq 0x23ed0 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x8(%rsp), %r15 pushq $0x2c popq %rbp leaq 0x1a8(%rsp), %r12 pushq $0x8 popq %r13 leaq 0x4(%rsp), %r14 leaq 0x28(%rsp), %rdi movq %r15, %rsi movl %ebp, %edx callq 0x24060 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x3840c movq %r12, %rdi movq %r15, %rsi movl %r13d, %edx callq 0x23ed0 movq %r12, %rdi movq %r14, %rsi callq 0x235a0 movq %rbx, %rdi movq %r14, %rsi callq 0x53228 movq %r12, %rdi callq 0x23440 jmp 0x383c1 leaq 0x8(%rsp), %rdi callq 0x241c8 leaq 0x28(%rsp), %rdi callq 0x23440 movq %rbx, %rax addq $0x328, %rsp # imm = 0x328 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x38465 jmp 0x3843c movq %rax, %r14 jmp 0x38451 movq %rax, %r14 leaq 0x1a8(%rsp), %rdi callq 0x23440 leaq 0x8(%rsp), %rdi callq 0x241c8 leaq 0x28(%rsp), %rdi callq 0x23440 movq %rbx, %rdi callq 0x2858a movq %r14, %rdi callq 0x23f90 nop
_ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 328h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea rdi, [rsp+358h+var_330] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+358h+var_340] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r15, [rsp+358h+var_350] push 2Ch ; ',' pop rbp lea r12, [rsp+358h+var_1B0] push 8 pop r13 lea r14, [rsp+358h+var_354] loc_383C1: lea rdi, [rsp+358h+var_330] mov rsi, r15 mov edx, ebp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_3840C mov rdi, r12 mov rsi, r15 mov edx, r13d call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) mov rdi, r12 mov rsi, r14 call __ZNSirsERi; std::istream::operator>>(int &) mov rdi, rbx mov rsi, r14 call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) mov rdi, r12 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() jmp short loc_383C1 loc_3840C: lea rdi, [rsp+358h+var_350]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+358h+var_330] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() mov rax, rbx add rsp, 328h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_38465 jmp short $+2 loc_3843C: mov r14, rax jmp short loc_38451 mov r14, rax lea rdi, [rsp+arg_1A0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_38451: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_38465: mov rdi, rbx call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, r14 call __Unwind_Resume
long long string_split<int>(long long a1, long long a2) { _QWORD *v2; // rax _BYTE v4[4]; // [rsp+4h] [rbp-354h] BYREF _QWORD v5[2]; // [rsp+8h] [rbp-350h] BYREF char v6; // [rsp+18h] [rbp-340h] BYREF _BYTE v7[384]; // [rsp+28h] [rbp-330h] BYREF _BYTE v8[432]; // [rsp+1A8h] [rbp-1B0h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::istringstream::basic_istringstream(v7, a2, 8LL); v5[0] = &v6; v5[1] = 0LL; v6 = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; std::istringstream::basic_istringstream(v8, v5, 8LL); std::istream::operator>>(v8, v4); std::vector<int>::push_back(a1, v4); std::istringstream::~istringstream(v8); } std::string::~string(v5); std::istringstream::~istringstream(v7); return a1; }
string_split<int>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x328 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LAB_0013838a: LEA RDI,[RSP + 0x28] PUSH 0x8 POP RDX CALL 0x00123ed0 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R15,[RSP + 0x8] PUSH 0x2c POP RBP LEA R12,[RSP + 0x1a8] PUSH 0x8 POP R13 LEA R14,[RSP + 0x4] LAB_001383c1: LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV EDX,EBP CALL 0x00124060 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0013840c LAB_001383de: MOV RDI,R12 MOV RSI,R15 MOV EDX,R13D CALL 0x00123ed0 LAB_001383ec: MOV RDI,R12 MOV RSI,R14 CALL 0x001235a0 MOV RDI,RBX MOV RSI,R14 CALL 0x00153228 LAB_00138402: MOV RDI,R12 CALL 0x00123440 JMP 0x001383c1 LAB_0013840c: LEA RDI,[RSP + 0x8] CALL 0x001241c8 LEA RDI,[RSP + 0x28] CALL 0x00123440 MOV RAX,RBX ADD RSP,0x328 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */ string * string_split<int>(string *param_1,char param_2) { istream *piVar1; int7 in_register_00000031; int local_354; int1 *local_350; int8 local_348; int1 local_340 [16]; istringstream local_330 [384]; istream local_1b0 [384]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; /* try { // try from 0013838a to 00138396 has its CatchHandler @ 00138435 */ std::__cxx11::istringstream::istringstream(local_330,CONCAT71(in_register_00000031,param_2),8); local_350 = local_340; local_348 = 0; local_340[0] = 0; while( true ) { /* try { // try from 001383c1 to 001383cf has its CatchHandler @ 0013843c */ piVar1 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_330,(string *)&local_350,','); if (((byte)piVar1[*(long *)(*(long *)piVar1 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 001383de to 001383eb has its CatchHandler @ 0013843a */ std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8); /* try { // try from 001383ec to 00138401 has its CatchHandler @ 00138441 */ std::istream::operator>>(local_1b0,&local_354); std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)param_1,&local_354); std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0); } std::__cxx11::string::~string((string *)&local_350); std::__cxx11::istringstream::~istringstream(local_330); return param_1; }
8,601
psi_mutex_trylock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line); # else int result= pthread_mutex_trylock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_trylock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x843d56(%rip), %rax # 0x1b0e4d0 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x7587e0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x12ca7d0 leaq 0x843d13(%rip), %rax # 0x1b0e4d0 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_mutex_trylock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_trylock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_12CA7D0 lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_12CA7D0: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[50])( v6, *(_QWORD *)(a1 + 64), 1LL, a2, a3); v4 = pthread_mutex_trylock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4); return v4; }
operator(): PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
/* std::_Select1st<std::pair<char const* const, dict_index_t*> >::TEMPNAMEPLACEHOLDERVALUE(std::pair<char const* const, dict_index_t*> const&) const */ pair * __thiscall std::_Select1st<std::pair<char_const*const,dict_index_t*>>::operator() (_Select1st<std::pair<char_const*const,dict_index_t*>> *this,pair *param_1) { return param_1; }
8,602
CLI::App::get_footer[abi:cxx11]() const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/App.hpp
CLI11_NODISCARD std::string get_footer() const { return (footer_callback_) ? footer_callback_() + '\n' + footer_ : footer_; }
O0
cpp
CLI::App::get_footer[abi:cxx11]() const: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x80(%rbp) movq %rdi, %rax movq %rax, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x70(%rbp) addq $0x110, %rdi # imm = 0x110 callq 0x30d20 movb $0x0, -0x51(%rbp) movb $0x0, -0x65(%rbp) testb $0x1, %al jne 0x4ca80 jmp 0x4cad6 movq -0x70(%rbp), %rsi addq $0x110, %rsi # imm = 0x110 leaq -0x50(%rbp), %rdi movq %rdi, -0x88(%rbp) callq 0x30d80 movq -0x88(%rbp), %rsi movb $0x1, -0x51(%rbp) leaq -0x30(%rbp), %rdi movl $0xa, %edx callq 0xf6a0 jmp 0x4cab6 movq -0x80(%rbp), %rdi movq -0x70(%rbp), %rdx movb $0x1, -0x65(%rbp) addq $0xf0, %rdx leaq -0x30(%rbp), %rsi callq 0xf5d0 jmp 0x4cad4 jmp 0x4caee movq -0x80(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0xf0, %rsi callq 0x9250 jmp 0x4caec jmp 0x4caee testb $0x1, -0x65(%rbp) jne 0x4caf6 jmp 0x4caff leaq -0x30(%rbp), %rdi callq 0x9b90 testb $0x1, -0x51(%rbp) jne 0x4cb07 jmp 0x4cb10 leaq -0x50(%rbp), %rdi callq 0x9b90 movq -0x78(%rbp), %rax addq $0x90, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x4cb4a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) testb $0x1, -0x65(%rbp) jne 0x4cb3f jmp 0x4cb48 leaq -0x30(%rbp), %rdi callq 0x9b90 jmp 0x4cb4a testb $0x1, -0x51(%rbp) jne 0x4cb52 jmp 0x4cb5b leaq -0x50(%rbp), %rdi callq 0x9b90 jmp 0x4cb5d movq -0x60(%rbp), %rdi callq 0x9a70 nopw %cs:(%rax,%rax)
_ZNK3CLI3App10get_footerB5cxx11Ev: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_80], rdi mov rax, rdi mov [rbp+var_78], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] mov [rbp+var_70], rdi add rdi, 110h call _ZNKSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEcvbEv; std::function<std::string ()(void)>::operator bool(void) mov [rbp+var_51], 0 mov [rbp+var_65], 0 test al, 1 jnz short loc_4CA80 jmp short loc_4CAD6 loc_4CA80: mov rsi, [rbp+var_70] add rsi, 110h lea rdi, [rbp+var_50] mov [rbp+var_88], rdi call _ZNKSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEvEEclEv; std::function<std::string ()(void)>::operator()(void) mov rsi, [rbp+var_88] mov [rbp+var_51], 1 lea rdi, [rbp+var_30] mov edx, 0Ah call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S5_; std::operator+<char>(std::string&&,char) jmp short $+2 loc_4CAB6: mov rdi, [rbp+var_80] mov rdx, [rbp+var_70] mov [rbp+var_65], 1 add rdx, 0F0h lea rsi, [rbp+var_30] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) jmp short $+2 loc_4CAD4: jmp short loc_4CAEE loc_4CAD6: mov rdi, [rbp+var_80] mov rsi, [rbp+var_70] add rsi, 0F0h call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_4CAEC: jmp short $+2 loc_4CAEE: test [rbp+var_65], 1 jnz short loc_4CAF6 jmp short loc_4CAFF loc_4CAF6: lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_4CAFF: test [rbp+var_51], 1 jnz short loc_4CB07 jmp short loc_4CB10 loc_4CB07: lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_4CB10: mov rax, [rbp+var_78] add rsp, 90h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp short loc_4CB4A mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax test [rbp+var_65], 1 jnz short loc_4CB3F jmp short loc_4CB48 loc_4CB3F: lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_4CB48: jmp short $+2 loc_4CB4A: test [rbp+var_51], 1 jnz short loc_4CB52 jmp short loc_4CB5B loc_4CB52: lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_4CB5B: jmp short $+2 loc_4CB5D: mov rdi, [rbp+var_60] call __Unwind_Resume
long long CLI::App::get_footer[abi:cxx11](long long a1, long long a2) { char v3; // [rsp+2Bh] [rbp-65h] char v4; // [rsp+3Fh] [rbp-51h] _BYTE v5[32]; // [rsp+40h] [rbp-50h] BYREF _BYTE v6[32]; // [rsp+60h] [rbp-30h] BYREF long long v7; // [rsp+80h] [rbp-10h] long long v8; // [rsp+88h] [rbp-8h] v8 = a1; v7 = a2; v4 = 0; v3 = 0; if ( std::function<std::string ()(void)>::operator bool((std::_Function_base *)(a2 + 272)) ) { std::function<std::string ()(void)>::operator()((long long)v5, (std::_Function_base *)(a2 + 272)); v4 = 1; std::operator+<char>((long long)v6, (long long)v5, 10); v3 = 1; std::operator+<char>(a1, (long long)v6, a2 + 240); } else { std::string::basic_string(a1, a2 + 240); } if ( (v3 & 1) != 0 ) std::string::~string(v6); if ( (v4 & 1) != 0 ) std::string::~string(v5); return a1; }
get_footer[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x80],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RDI ADD RDI,0x110 CALL 0x00130d20 MOV byte ptr [RBP + -0x51],0x0 MOV byte ptr [RBP + -0x65],0x0 TEST AL,0x1 JNZ 0x0014ca80 JMP 0x0014cad6 LAB_0014ca80: MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x110 LEA RDI,[RBP + -0x50] MOV qword ptr [RBP + -0x88],RDI CALL 0x00130d80 MOV RSI,qword ptr [RBP + -0x88] MOV byte ptr [RBP + -0x51],0x1 LAB_0014caa6: LEA RDI,[RBP + -0x30] MOV EDX,0xa CALL 0x0010f6a0 JMP 0x0014cab6 LAB_0014cab6: MOV RDI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x70] MOV byte ptr [RBP + -0x65],0x1 ADD RDX,0xf0 LAB_0014cac9: LEA RSI,[RBP + -0x30] CALL 0x0010f5d0 JMP 0x0014cad4 LAB_0014cad4: JMP 0x0014caee LAB_0014cad6: MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0xf0 CALL 0x00109250 LAB_0014caea: JMP 0x0014caec LAB_0014caec: JMP 0x0014caee LAB_0014caee: TEST byte ptr [RBP + -0x65],0x1 JNZ 0x0014caf6 JMP 0x0014caff LAB_0014caf6: LEA RDI,[RBP + -0x30] CALL 0x00109b90 LAB_0014caff: TEST byte ptr [RBP + -0x51],0x1 JNZ 0x0014cb07 JMP 0x0014cb10 LAB_0014cb07: LEA RDI,[RBP + -0x50] CALL 0x00109b90 LAB_0014cb10: MOV RAX,qword ptr [RBP + -0x78] ADD RSP,0x90 POP RBP RET
/* CLI::App::get_footer[abi:cxx11]() const */ string * CLI::App::get_footer_abi_cxx11_(void) { bool bVar1; long in_RSI; string *in_RDI; function<std::__cxx11::string()> local_58 [32]; string local_38 [48]; bVar1 = std::function::operator_cast_to_bool((function *)(in_RSI + 0x110)); if (bVar1) { std::function<std::__cxx11::string()>::operator()(local_58); /* try { // try from 0014caa6 to 0014cab3 has its CatchHandler @ 0014cb1d */ std::operator+(local_38,(char)local_58); /* try { // try from 0014cac9 to 0014cae9 has its CatchHandler @ 0014cb2b */ std::operator+(in_RDI,local_38); std::__cxx11::string::~string(local_38); std::__cxx11::string::~string((string *)local_58); } else { std::__cxx11::string::string(in_RDI,(string *)(in_RSI + 0xf0)); } return in_RDI; }
8,603
dynamic_column_time_store
eloqsql/mysys/ma_dyncol.c
static enum enum_dyncol_func_result dynamic_column_time_store(DYNAMIC_COLUMN *str, MYSQL_TIME *value, enum enum_dyncol_format format) { uchar *buf; if (dynstr_realloc(str, 6)) return ER_DYNCOL_RESOURCE; buf= ((uchar *)str->str) + str->length; if (value->time_type == MYSQL_TIMESTAMP_NONE || value->time_type == MYSQL_TIMESTAMP_ERROR || value->time_type == MYSQL_TIMESTAMP_DATE) { value->neg= 0; value->second_part= 0; value->hour= 0; value->minute= 0; value->second= 0; } DBUG_ASSERT(value->hour <= 838); DBUG_ASSERT(value->minute <= 59); DBUG_ASSERT(value->second <= 59); DBUG_ASSERT(value->second_part <= 999999); if (format == dyncol_fmt_num || value->second_part) { /* 00000!<-hours--><min-><sec-><---microseconds---> 1123456789012345612345612345678901234567890 <123456><123456><123456><123456><123456><123456> */ buf[0]= (value->second_part & 0xff); buf[1]= ((value->second_part & 0xff00) >> 8); buf[2]= (uchar)(((value->second & 0xf) << 4) | ((value->second_part & 0xf0000) >> 16)); buf[3]= ((value->minute << 2) | ((value->second & 0x30) >> 4)); buf[4]= (value->hour & 0xff); buf[5]= ((value->neg ? 0x4 : 0) | (value->hour >> 8)); str->length+= 6; } else { /* !<-hours--><min-><sec-> 11234567890123456123456 <123456><123456><123456> */ buf[0]= (value->second) | ((value->minute & 0x3) << 6); buf[1]= (value->minute >> 2) | ((value->hour & 0xf) << 4); buf[2]= (value->hour >> 4) | (value->neg ? 0x80 : 0); str->length+= 3; } return ER_DYNCOL_OK; }
O3
c
dynamic_column_time_store: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx movl $0x6, %esi callq 0x29a6f movl %eax, %ecx movl $0xfffffffd, %eax # imm = 0xFFFFFFFD testb %cl, %cl jne 0x2d4bc movq (%rbx), %rax addq 0x8(%rbx), %rax movl 0x24(%r14), %ecx addl $0x2, %ecx cmpl $0x2, %ecx ja 0x2d403 xorps %xmm0, %xmm0 movups %xmm0, 0xc(%r14) movq $0x0, 0x19(%r14) testl %r15d, %r15d setne %dl movq 0x18(%r14), %rcx testq %rcx, %rcx sete %sil testb %sil, %dl je 0x2d45b movl 0x10(%r14), %ecx shll $0x6, %ecx orl 0x14(%r14), %ecx movb %cl, (%rax) movl 0xc(%r14), %ecx movl 0x10(%r14), %edx shrl $0x2, %edx shll $0x4, %ecx orl %edx, %ecx movb %cl, 0x1(%rax) movl 0xc(%r14), %edx shrl $0x4, %edx xorl %ecx, %ecx cmpb $0x0, 0x20(%r14) setne %cl shll $0x7, %ecx orl %edx, %ecx movl $0x3, %edx movl $0x2, %esi jmp 0x2d4b3 movb %cl, (%rax) movb 0x19(%r14), %cl movb %cl, 0x1(%rax) movl 0x14(%r14), %ecx shll $0x4, %ecx movzwl 0x1a(%r14), %edx andl $0xf, %edx orl %ecx, %edx movb %dl, 0x2(%rax) movl 0x10(%r14), %ecx movl 0x14(%r14), %edx shrl $0x4, %edx andl $0x3, %edx leal (%rdx,%rcx,4), %ecx movb %cl, 0x3(%rax) movb 0xc(%r14), %cl movb %cl, 0x4(%rax) xorl %edx, %edx cmpb $0x0, 0x20(%r14) setne %dl shll $0x2, %edx movl 0xc(%r14), %ecx shrl $0x8, %ecx orl %edx, %ecx movl $0x6, %edx movl $0x5, %esi movb %cl, (%rax,%rsi) addq %rdx, 0x8(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
dynamic_column_time_store: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r15d, edx mov r14, rsi mov rbx, rdi mov esi, 6 call dynstr_realloc mov ecx, eax mov eax, 0FFFFFFFDh test cl, cl jnz loc_2D4BC mov rax, [rbx] add rax, [rbx+8] mov ecx, [r14+24h] add ecx, 2 cmp ecx, 2 ja short loc_2D403 xorps xmm0, xmm0 movups xmmword ptr [r14+0Ch], xmm0 mov qword ptr [r14+19h], 0 loc_2D403: test r15d, r15d setnz dl mov rcx, [r14+18h] test rcx, rcx setz sil test dl, sil jz short loc_2D45B mov ecx, [r14+10h] shl ecx, 6 or ecx, [r14+14h] mov [rax], cl mov ecx, [r14+0Ch] mov edx, [r14+10h] shr edx, 2 shl ecx, 4 or ecx, edx mov [rax+1], cl mov edx, [r14+0Ch] shr edx, 4 xor ecx, ecx cmp byte ptr [r14+20h], 0 setnz cl shl ecx, 7 or ecx, edx mov edx, 3 mov esi, 2 jmp short loc_2D4B3 loc_2D45B: mov [rax], cl mov cl, [r14+19h] mov [rax+1], cl mov ecx, [r14+14h] shl ecx, 4 movzx edx, word ptr [r14+1Ah] and edx, 0Fh or edx, ecx mov [rax+2], dl mov ecx, [r14+10h] mov edx, [r14+14h] shr edx, 4 and edx, 3 lea ecx, [rdx+rcx*4] mov [rax+3], cl mov cl, [r14+0Ch] mov [rax+4], cl xor edx, edx cmp byte ptr [r14+20h], 0 setnz dl shl edx, 2 mov ecx, [r14+0Ch] shr ecx, 8 or ecx, edx mov edx, 6 mov esi, 5 loc_2D4B3: mov [rax+rsi], cl add [rbx+8], rdx xor eax, eax loc_2D4BC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long dynamic_column_time_store(long long *a1, long long a2, int a3) { bool v4; // cl long long result; // rax _BYTE *v6; // rax long long v7; // rcx int v8; // ecx long long v9; // rdx long long v10; // rsi v4 = dynstr_realloc(a1, 6LL); result = 4294967293LL; if ( !v4 ) { v6 = (_BYTE *)(a1[1] + *a1); if ( *(_DWORD *)(a2 + 36) >= 0xFFFFFFFE || *(_DWORD *)(a2 + 36) == 0 ) { *(_OWORD *)(a2 + 12) = 0LL; *(_QWORD *)(a2 + 25) = 0LL; } v7 = *(_QWORD *)(a2 + 24); if ( v7 == 0 && a3 != 0 ) { *v6 = *(_BYTE *)(a2 + 20) | (*(_BYTE *)(a2 + 16) << 6); v6[1] = (*(_DWORD *)(a2 + 16) >> 2) | (16 * *(_DWORD *)(a2 + 12)); v8 = (*(_DWORD *)(a2 + 12) >> 4) | ((*(_BYTE *)(a2 + 32) != 0) << 7); v9 = 3LL; v10 = 2LL; } else { *v6 = v7; v6[1] = *(_BYTE *)(a2 + 25); v6[2] = (16 * *(_DWORD *)(a2 + 20)) | *(_WORD *)(a2 + 26) & 0xF; v6[3] = ((*(_DWORD *)(a2 + 20) >> 4) & 3) + 4 * *(_DWORD *)(a2 + 16); v6[4] = *(_BYTE *)(a2 + 12); v8 = (4 * (*(_BYTE *)(a2 + 32) != 0)) | (*(_DWORD *)(a2 + 12) >> 8); v9 = 6LL; v10 = 5LL; } v6[v10] = v8; a1[1] += v9; return 0LL; } return result; }
dynamic_column_time_store: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI MOV ESI,0x6 CALL 0x00129a6f MOV ECX,EAX MOV EAX,0xfffffffd TEST CL,CL JNZ 0x0012d4bc MOV RAX,qword ptr [RBX] ADD RAX,qword ptr [RBX + 0x8] MOV ECX,dword ptr [R14 + 0x24] ADD ECX,0x2 CMP ECX,0x2 JA 0x0012d403 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0xc],XMM0 MOV qword ptr [R14 + 0x19],0x0 LAB_0012d403: TEST R15D,R15D SETNZ DL MOV RCX,qword ptr [R14 + 0x18] TEST RCX,RCX SETZ SIL TEST DL,SIL JZ 0x0012d45b MOV ECX,dword ptr [R14 + 0x10] SHL ECX,0x6 OR ECX,dword ptr [R14 + 0x14] MOV byte ptr [RAX],CL MOV ECX,dword ptr [R14 + 0xc] MOV EDX,dword ptr [R14 + 0x10] SHR EDX,0x2 SHL ECX,0x4 OR ECX,EDX MOV byte ptr [RAX + 0x1],CL MOV EDX,dword ptr [R14 + 0xc] SHR EDX,0x4 XOR ECX,ECX CMP byte ptr [R14 + 0x20],0x0 SETNZ CL SHL ECX,0x7 OR ECX,EDX MOV EDX,0x3 MOV ESI,0x2 JMP 0x0012d4b3 LAB_0012d45b: MOV byte ptr [RAX],CL MOV CL,byte ptr [R14 + 0x19] MOV byte ptr [RAX + 0x1],CL MOV ECX,dword ptr [R14 + 0x14] SHL ECX,0x4 MOVZX EDX,word ptr [R14 + 0x1a] AND EDX,0xf OR EDX,ECX MOV byte ptr [RAX + 0x2],DL MOV ECX,dword ptr [R14 + 0x10] MOV EDX,dword ptr [R14 + 0x14] SHR EDX,0x4 AND EDX,0x3 LEA ECX,[RDX + RCX*0x4] MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [R14 + 0xc] MOV byte ptr [RAX + 0x4],CL XOR EDX,EDX CMP byte ptr [R14 + 0x20],0x0 SETNZ DL SHL EDX,0x2 MOV ECX,dword ptr [R14 + 0xc] SHR ECX,0x8 OR ECX,EDX MOV EDX,0x6 MOV ESI,0x5 LAB_0012d4b3: MOV byte ptr [RAX + RSI*0x1],CL ADD qword ptr [RBX + 0x8],RDX XOR EAX,EAX LAB_0012d4bc: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 dynamic_column_time_store(long *param_1,long param_2,int param_3) { char cVar1; int8 uVar2; byte *pbVar3; byte bVar4; long lVar5; long lVar6; cVar1 = dynstr_realloc(param_1,6); uVar2 = 0xfffffffd; if (cVar1 == '\0') { pbVar3 = (byte *)(*param_1 + param_1[1]); if (*(int *)(param_2 + 0x24) + 2U < 3) { *(int8 *)(param_2 + 0xc) = 0; *(int8 *)(param_2 + 0x14) = 0; *(int8 *)(param_2 + 0x19) = 0; } if (param_3 == 0 || *(long *)(param_2 + 0x18) != 0) { *pbVar3 = (byte)*(long *)(param_2 + 0x18); pbVar3[1] = *(byte *)(param_2 + 0x19); pbVar3[2] = (byte)*(int2 *)(param_2 + 0x1a) & 0xf | (byte)(*(int *)(param_2 + 0x14) << 4); pbVar3[3] = ((byte)(*(uint *)(param_2 + 0x14) >> 4) & 3) + (char)*(int4 *)(param_2 + 0x10) * '\x04'; pbVar3[4] = *(byte *)(param_2 + 0xc); bVar4 = (byte)((uint)*(int4 *)(param_2 + 0xc) >> 8) | (*(char *)(param_2 + 0x20) != '\0') << 2; lVar5 = 6; lVar6 = 5; } else { *pbVar3 = (byte)(*(int *)(param_2 + 0x10) << 6) | (byte)*(int4 *)(param_2 + 0x14); pbVar3[1] = (byte)(*(int *)(param_2 + 0xc) << 4) | (byte)(*(uint *)(param_2 + 0x10) >> 2); bVar4 = (*(char *)(param_2 + 0x20) != '\0') << 7 | (byte)(*(uint *)(param_2 + 0xc) >> 4); lVar5 = 3; lVar6 = 2; } pbVar3[lVar6] = bVar4; param_1[1] = param_1[1] + lVar5; uVar2 = 0; } return uVar2; }
8,604
my_realpath
eloqsql/mysys/my_symlink.c
int my_realpath(char *to, const char *filename, myf MyFlags) { #if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) int result=0; char buff[BUFF_LEN]; char *ptr; DBUG_ENTER("my_realpath"); DBUG_PRINT("info",("executing realpath")); if ((ptr=realpath(filename,buff))) strmake(to, ptr, FN_REFLEN-1); else { /* Realpath didn't work; Use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ if (MyFlags) DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); if (my_errno == ENOENT) result= 1; else result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) int ret= GetFullPathName(filename,FN_REFLEN, to, NULL); if (ret == 0 || ret > FN_REFLEN) { my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError(); if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); /* GetFullPathName didn't work : use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ my_load_path(to, filename, NullS); return -1; } #else my_load_path(to, filename, NullS); #endif return 0; }
O0
c
my_realpath: pushq %rbp movq %rsp, %rbp subq $0x1060, %rsp # imm = 0x1060 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x1020(%rbp) movq %rsi, -0x1028(%rbp) movq %rdx, -0x1030(%rbp) movl $0x0, -0x1034(%rbp) jmp 0x5aa69 movq -0x1028(%rbp), %rdi leaq -0x1010(%rbp), %rsi callq 0x26100 movq %rax, -0x1040(%rbp) cmpq $0x0, %rax je 0x5aaa6 movq -0x1020(%rbp), %rdi movq -0x1040(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0xace00 jmp 0x5ab46 cmpq $0x0, -0x1030(%rbp) je 0x5aab6 jmp 0x5aab2 jmp 0x5aab4 jmp 0x5aab6 callq 0x26050 movl (%rax), %eax movl %eax, -0x1044(%rbp) callq 0x5b3e0 movl -0x1044(%rbp), %ecx movl %ecx, (%rax) movq -0x1030(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x5ab0d movq -0x1028(%rbp), %rax movq %rax, -0x1050(%rbp) callq 0x5b3e0 movq -0x1050(%rbp), %rdx movl (%rax), %ecx movl $0x1a, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x658c0 movq -0x1020(%rbp), %rdi movq -0x1028(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x646c0 callq 0x5b3e0 cmpl $0x2, (%rax) jne 0x5ab3a movl $0x1, -0x1034(%rbp) jmp 0x5ab44 movl $0xffffffff, -0x1034(%rbp) # imm = 0xFFFFFFFF jmp 0x5ab46 jmp 0x5ab48 movl -0x1034(%rbp), %eax movl %eax, -0x1014(%rbp) movl -0x1014(%rbp), %eax movl %eax, -0x1054(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5ab81 movl -0x1054(%rbp), %eax addq $0x1060, %rsp # imm = 0x1060 popq %rbp retq callq 0x26360 nopw %cs:(%rax,%rax)
my_realpath: push rbp mov rbp, rsp sub rsp, 1060h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_1020], rdi mov [rbp+var_1028], rsi mov [rbp+var_1030], rdx mov [rbp+var_1034], 0 jmp short $+2 loc_5AA69: mov rdi, [rbp+var_1028] lea rsi, [rbp+var_1010] call _realpath mov [rbp+var_1040], rax cmp rax, 0 jz short loc_5AAA6 mov rdi, [rbp+var_1020] mov rsi, [rbp+var_1040] mov edx, 1FFh call strmake jmp loc_5AB46 loc_5AAA6: cmp [rbp+var_1030], 0 jz short loc_5AAB6 jmp short $+2 loc_5AAB2: jmp short $+2 loc_5AAB4: jmp short $+2 loc_5AAB6: call ___errno_location mov eax, [rax] mov [rbp+var_1044], eax call _my_thread_var mov ecx, [rbp+var_1044] mov [rax], ecx mov rax, [rbp+var_1030] and rax, 10h cmp rax, 0 jz short loc_5AB0D mov rax, [rbp+var_1028] mov [rbp+var_1050], rax call _my_thread_var mov rdx, [rbp+var_1050] mov ecx, [rax] mov edi, 1Ah xor eax, eax mov esi, eax mov al, 0 call my_error loc_5AB0D: mov rdi, [rbp+var_1020] mov rsi, [rbp+var_1028] xor eax, eax mov edx, eax call my_load_path call _my_thread_var cmp dword ptr [rax], 2 jnz short loc_5AB3A mov [rbp+var_1034], 1 jmp short loc_5AB44 loc_5AB3A: mov [rbp+var_1034], 0FFFFFFFFh loc_5AB44: jmp short $+2 loc_5AB46: jmp short $+2 loc_5AB48: mov eax, [rbp+var_1034] mov [rbp+var_1014], eax mov eax, [rbp+var_1014] mov [rbp+var_1054], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5AB81 mov eax, [rbp+var_1054] add rsp, 1060h pop rbp retn loc_5AB81: call ___stack_chk_fail
long long my_realpath(long long a1, long long a2, char a3) { _DWORD *v3; // rax int v4; // r8d int v5; // r9d long long v7; // [rsp+1Ch] [rbp-1044h] long long v8; // [rsp+20h] [rbp-1040h] unsigned int v9; // [rsp+2Ch] [rbp-1034h] _BYTE v11[4104]; // [rsp+50h] [rbp-1010h] BYREF unsigned long long v12; // [rsp+1058h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = 0; v8 = realpath(a2, v11); if ( v8 ) { strmake(a1, v8, 511LL); } else { v7 = *(unsigned int *)__errno_location(); *(_DWORD *)my_thread_var() = v7; if ( (a3 & 0x10) != 0 ) { v3 = (_DWORD *)my_thread_var(); my_error(26, 0, a2, *v3, v4, v5); } my_load_path(a1, a2, 0LL); if ( *(_DWORD *)my_thread_var() == 2 ) return 1; else return (unsigned int)-1; } return v9; }
my_realpath: PUSH RBP MOV RBP,RSP SUB RSP,0x1060 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x1020],RDI MOV qword ptr [RBP + -0x1028],RSI MOV qword ptr [RBP + -0x1030],RDX MOV dword ptr [RBP + -0x1034],0x0 JMP 0x0015aa69 LAB_0015aa69: MOV RDI,qword ptr [RBP + -0x1028] LEA RSI,[RBP + -0x1010] CALL 0x00126100 MOV qword ptr [RBP + -0x1040],RAX CMP RAX,0x0 JZ 0x0015aaa6 MOV RDI,qword ptr [RBP + -0x1020] MOV RSI,qword ptr [RBP + -0x1040] MOV EDX,0x1ff CALL 0x001ace00 JMP 0x0015ab46 LAB_0015aaa6: CMP qword ptr [RBP + -0x1030],0x0 JZ 0x0015aab6 JMP 0x0015aab2 LAB_0015aab2: JMP 0x0015aab4 LAB_0015aab4: JMP 0x0015aab6 LAB_0015aab6: CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1044],EAX CALL 0x0015b3e0 MOV ECX,dword ptr [RBP + -0x1044] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x1030] AND RAX,0x10 CMP RAX,0x0 JZ 0x0015ab0d MOV RAX,qword ptr [RBP + -0x1028] MOV qword ptr [RBP + -0x1050],RAX CALL 0x0015b3e0 MOV RDX,qword ptr [RBP + -0x1050] MOV ECX,dword ptr [RAX] MOV EDI,0x1a XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x001658c0 LAB_0015ab0d: MOV RDI,qword ptr [RBP + -0x1020] MOV RSI,qword ptr [RBP + -0x1028] XOR EAX,EAX MOV EDX,EAX CALL 0x001646c0 CALL 0x0015b3e0 CMP dword ptr [RAX],0x2 JNZ 0x0015ab3a MOV dword ptr [RBP + -0x1034],0x1 JMP 0x0015ab44 LAB_0015ab3a: MOV dword ptr [RBP + -0x1034],0xffffffff LAB_0015ab44: JMP 0x0015ab46 LAB_0015ab46: JMP 0x0015ab48 LAB_0015ab48: MOV EAX,dword ptr [RBP + -0x1034] MOV dword ptr [RBP + -0x1014],EAX MOV EAX,dword ptr [RBP + -0x1014] MOV dword ptr [RBP + -0x1054],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015ab81 MOV EAX,dword ptr [RBP + -0x1054] ADD RSP,0x1060 POP RBP RET LAB_0015ab81: CALL 0x00126360
int4 my_realpath(int8 param_1,char *param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; int4 local_103c; char local_1018 [4104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_103c = 0; pcVar2 = realpath(param_2,local_1018); if (pcVar2 == (char *)0x0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_3 & 0x10) != 0) { puVar4 = (int4 *)_my_thread_var(); my_error(0x1a,0,param_2,*puVar4); } my_load_path(param_1,param_2,0); piVar3 = (int *)_my_thread_var(); if (*piVar3 == 2) { local_103c = 1; } else { local_103c = 0xffffffff; } } else { strmake(param_1,pcVar2,0x1ff); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_103c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
8,605
string_table_intern_n
tsotchke[P]eshkol/src/core/utils/string_table.c
const char* string_table_intern_n(StringTable* table, const char* string, size_t length) { assert(table != NULL); assert(string != NULL); // Compute hash uint32_t hash = hash_string(string, length); // Compute bucket index size_t bucket = hash & (table->bucket_count - 1); // Look for existing entry Entry* entry = table->buckets[bucket]; while (entry) { if (entry->hash == hash && entry->length == length && memcmp(entry->string, string, length) == 0) { return entry->string; } entry = entry->next; } // String not found, create new entry // Check if resize needed if (table->count >= table->resize_threshold) { string_table_resize(table); // Recompute bucket after resize bucket = hash & (table->bucket_count - 1); } // Allocate string char* new_string = arena_alloc(table->arena, length + 1); if (!new_string) return NULL; // Copy string memcpy(new_string, string, length); new_string[length] = '\0'; // Allocate entry entry = arena_alloc(table->arena, sizeof(Entry)); if (!entry) return NULL; // Initialize entry entry->string = new_string; entry->length = length; entry->hash = hash; entry->next = table->buckets[bucket]; // Add to bucket table->buckets[bucket] = entry; table->count++; return new_string; }
O0
c
string_table_intern_n: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x230d jmp 0x232c leaq 0xddc(%rip), %rdi # 0x30f0 leaq 0x1398(%rip), %rsi # 0x36b3 movl $0x7b, %edx leaq 0x1416(%rip), %rcx # 0x373d callq 0x1080 cmpq $0x0, -0x18(%rbp) je 0x2335 jmp 0x2354 leaq 0x1448(%rip), %rdi # 0x3784 leaq 0x1370(%rip), %rsi # 0x36b3 movl $0x7c, %edx leaq 0x13ee(%rip), %rcx # 0x373d callq 0x1080 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x2500 movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x23e6 movq -0x38(%rbp), %rax movl 0x10(%rax), %eax cmpl -0x24(%rbp), %eax jne 0x23d8 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x23d8 movq -0x38(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x10a0 cmpl $0x0, %eax jne 0x23d8 movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x24eb movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x238e movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x20(%rcx), %rax jb 0x2417 movq -0x10(%rbp), %rdi callq 0x2560 movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x20(%rbp), %rsi addq $0x1, %rsi callq 0x1be0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x2443 movq $0x0, -0x8(%rbp) jmp 0x24eb movq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x10d0 movq -0x40(%rbp), %rax movq -0x20(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x20, %esi callq 0x1be0 movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x2486 movq $0x0, -0x8(%rbp) jmp 0x24eb movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x24(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rcx movq (%rax,%rcx,8), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
string_table_intern_n: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_230D jmp short loc_232C loc_230D: lea rdi, aTableNull; "table != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"... mov edx, 7Bh ; '{' lea rcx, aConstCharStrin; "const char *string_table_intern_n(Strin"... call ___assert_fail loc_232C: cmp [rbp+var_18], 0 jz short loc_2335 jmp short loc_2354 loc_2335: lea rdi, aStringNull; "string != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eshkol"... mov edx, 7Ch ; '|' lea rcx, aConstCharStrin; "const char *string_table_intern_n(Strin"... call ___assert_fail loc_2354: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call hash_string mov [rbp+var_24], eax mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] sub rcx, 1 and rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_30] mov rax, [rax+rcx*8] mov [rbp+var_38], rax loc_238E: cmp [rbp+var_38], 0 jz short loc_23E6 mov rax, [rbp+var_38] mov eax, [rax+10h] cmp eax, [rbp+var_24] jnz short loc_23D8 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_20] jnz short loc_23D8 mov rax, [rbp+var_38] mov rdi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcmp cmp eax, 0 jnz short loc_23D8 mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_8], rax jmp loc_24EB loc_23D8: mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_38], rax jmp short loc_238E loc_23E6: mov rax, [rbp+var_10] mov rax, [rax+18h] mov rcx, [rbp+var_10] cmp rax, [rcx+20h] jb short loc_2417 mov rdi, [rbp+var_10] call string_table_resize mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] sub rcx, 1 and rax, rcx mov [rbp+var_30], rax loc_2417: mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_20] add rsi, 1 call arena_alloc mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_2443 mov [rbp+var_8], 0 jmp loc_24EB loc_2443: mov rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rax, [rbp+var_40] mov rcx, [rbp+var_20] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 20h ; ' ' call arena_alloc mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz short loc_2486 mov [rbp+var_8], 0 jmp short loc_24EB loc_2486: mov rcx, [rbp+var_40] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+8], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_30] mov rcx, [rax+rcx*8] mov rax, [rbp+var_38] mov [rax+18h], rcx mov rdx, [rbp+var_38] mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_30] mov [rax+rcx*8], rdx mov rax, [rbp+var_10] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_24EB: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long string_table_intern_n(long long *a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-40h] _QWORD *i; // [rsp+8h] [rbp-38h] long long v6; // [rsp+8h] [rbp-38h] long long v7; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+1Ch] [rbp-24h] if ( !a1 ) __assert_fail( "table != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c", 123LL, "const char *string_table_intern_n(StringTable *, const char *, size_t)"); if ( !a2 ) __assert_fail( "string != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c", 124LL, "const char *string_table_intern_n(StringTable *, const char *, size_t)"); v8 = hash_string(a2, a3); v7 = (a1[2] - 1) & v8; for ( i = *(_QWORD **)(a1[1] + 8 * v7); i; i = (_QWORD *)i[3] ) { if ( *((_DWORD *)i + 4) == v8 && i[1] == a3 && !(unsigned int)memcmp(*i, a2, a3) ) return *i; } if ( a1[3] >= (unsigned long long)a1[4] ) { string_table_resize(a1); v7 = (a1[2] - 1) & v8; } v4 = arena_alloc(*a1, a3 + 1); if ( !v4 ) return 0LL; memcpy(v4, a2, a3); *(_BYTE *)(v4 + a3) = 0; v6 = arena_alloc(*a1, 32LL); if ( !v6 ) return 0LL; *(_QWORD *)v6 = v4; *(_QWORD *)(v6 + 8) = a3; *(_DWORD *)(v6 + 16) = v8; *(_QWORD *)(v6 + 24) = *(_QWORD *)(a1[1] + 8 * v7); *(_QWORD *)(a1[1] + 8 * v7) = v6; ++a1[3]; return v4; }
string_table_intern_n: 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 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010230d JMP 0x0010232c LAB_0010230d: LEA RDI,[0x1030de] LEA RSI,[0x10368f] MOV EDX,0x7b LEA RCX,[0x103707] CALL 0x00101080 LAB_0010232c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00102335 JMP 0x00102354 LAB_00102335: LEA RDI,[0x10374e] LEA RSI,[0x10368f] MOV EDX,0x7c LEA RCX,[0x103707] CALL 0x00101080 LAB_00102354: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00102500 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SUB RCX,0x1 AND RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x38],RAX LAB_0010238e: CMP qword ptr [RBP + -0x38],0x0 JZ 0x001023e6 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x10] CMP EAX,dword ptr [RBP + -0x24] JNZ 0x001023d8 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001023d8 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001010a0 CMP EAX,0x0 JNZ 0x001023d8 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x001024eb LAB_001023d8: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX JMP 0x0010238e LAB_001023e6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x20] JC 0x00102417 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00102560 MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] SUB RCX,0x1 AND RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00102417: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 CALL 0x00101be0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x00102443 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001024eb LAB_00102443: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001010d0 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x20 CALL 0x00101be0 MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00102486 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001024eb LAB_00102486: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x18],RCX MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_001024eb: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
void * string_table_intern_n(int8 *param_1,void *param_2,size_t param_3) { uint uVar1; int iVar2; int8 *puVar3; int8 *local_40; ulong local_38; void *local_10; if (param_1 == (int8 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("table != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",0x7b, "const char *string_table_intern_n(StringTable *, const char *, size_t)"); } if (param_2 != (void *)0x0) { uVar1 = hash_string(param_2,param_3); local_38 = (ulong)uVar1 & param_1[2] - 1; local_40 = *(int8 **)(param_1[1] + local_38 * 8); while( true ) { if (local_40 == (int8 *)0x0) { if ((ulong)param_1[4] <= (ulong)param_1[3]) { string_table_resize(param_1); local_38 = (ulong)uVar1 & param_1[2] - 1; } local_10 = (void *)arena_alloc(*param_1,param_3 + 1); if (local_10 == (void *)0x0) { local_10 = (void *)0x0; } else { memcpy(local_10,param_2,param_3); *(int1 *)((long)local_10 + param_3) = 0; puVar3 = (int8 *)arena_alloc(*param_1,0x20); if (puVar3 == (int8 *)0x0) { local_10 = (void *)0x0; } else { *puVar3 = local_10; puVar3[1] = param_3; *(uint *)(puVar3 + 2) = uVar1; puVar3[3] = *(int8 *)(param_1[1] + local_38 * 8); *(int8 **)(param_1[1] + local_38 * 8) = puVar3; param_1[3] = param_1[3] + 1; } } return local_10; } if (((*(uint *)(local_40 + 2) == uVar1) && (local_40[1] == param_3)) && (iVar2 = memcmp((void *)*local_40,param_2,param_3), iVar2 == 0)) break; local_40 = (int8 *)local_40[3]; } return (void *)*local_40; } /* WARNING: Subroutine does not return */ __assert_fail("string != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/utils/string_table.c",0x7c, "const char *string_table_intern_n(StringTable *, const char *, size_t)"); }
8,606
cs_leave
eloqsql/strings/ctype.c
static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; int rc; switch(state){ case _CS_COLLATION: if (i->tailoring_length) i->cs.tailoring= i->tailoring; rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK; break; /* Rules: Logical Reset Positions */ case _CS_RESET_FIRST_NON_IGNORABLE: rc= tailoring_append(st, "[first non-ignorable]", 0, NULL); break; case _CS_RESET_LAST_NON_IGNORABLE: rc= tailoring_append(st, "[last non-ignorable]", 0, NULL); break; case _CS_RESET_FIRST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[first primary ignorable]", 0, NULL); break; case _CS_RESET_LAST_PRIMARY_IGNORABLE: rc= tailoring_append(st, "[last primary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL); break; case _CS_RESET_LAST_SECONDARY_IGNORABLE: rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL); break; case _CS_RESET_LAST_TERTIARY_IGNORABLE: rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL); break; case _CS_RESET_FIRST_TRAILING: rc= tailoring_append(st, "[first trailing]", 0, NULL); break; case _CS_RESET_LAST_TRAILING: rc= tailoring_append(st, "[last trailing]", 0, NULL); break; case _CS_RESET_FIRST_VARIABLE: rc= tailoring_append(st, "[first variable]", 0, NULL); break; case _CS_RESET_LAST_VARIABLE: rc= tailoring_append(st, "[last variable]", 0, NULL); break; default: rc=MY_XML_OK; } return rc; }
O0
c
cs_leave: 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 0x140(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xbefd0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0xbddc6 movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0xbddcd xorl %eax, %eax movl %eax, -0x34(%rbp) jmp 0xbddcd movl -0x34(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x38(%rbp) subl $0x9, %eax je 0xbdea7 jmp 0xbdde4 movl -0x38(%rbp), %eax subl $0x191, %eax # imm = 0x191 je 0xbdf54 jmp 0xbddf4 movl -0x38(%rbp), %eax subl $0x192, %eax # imm = 0x192 je 0xbdf73 jmp 0xbde04 movl -0x38(%rbp), %eax subl $0x193, %eax # imm = 0x193 je 0xbdf92 jmp 0xbde14 movl -0x38(%rbp), %eax subl $0x194, %eax # imm = 0x194 je 0xbdfb1 jmp 0xbde24 movl -0x38(%rbp), %eax subl $0x195, %eax # imm = 0x195 je 0xbdfd0 jmp 0xbde34 movl -0x38(%rbp), %eax subl $0x196, %eax # imm = 0x196 je 0xbdfef jmp 0xbde44 movl -0x38(%rbp), %eax subl $0x197, %eax # imm = 0x197 je 0xbe00b jmp 0xbde54 movl -0x38(%rbp), %eax subl $0x198, %eax # imm = 0x198 je 0xbe027 jmp 0xbde64 movl -0x38(%rbp), %eax subl $0x199, %eax # imm = 0x199 je 0xbe043 jmp 0xbde74 movl -0x38(%rbp), %eax subl $0x19a, %eax # imm = 0x19A je 0xbe05f jmp 0xbde84 movl -0x38(%rbp), %eax subl $0x19b, %eax # imm = 0x19B je 0xbdf16 jmp 0xbde94 movl -0x38(%rbp), %eax subl $0x19c, %eax # imm = 0x19C je 0xbdf35 jmp 0xbe07b movq -0x20(%rbp), %rax cmpq $0x0, 0x690(%rax) je 0xbdecb movq -0x20(%rbp), %rax movq 0x688(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x718(%rax) movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax cmpq $0x0, 0xa8(%rax) je 0xbdf04 movq -0x20(%rbp), %rax movq 0x7a8(%rax), %rax movq 0xa8(%rax), %rax movq -0x20(%rbp), %rdi addq $0x6e0, %rdi # imm = 0x6E0 callq *%rax movl %eax, -0x3c(%rbp) jmp 0xbdf0b xorl %eax, %eax movl %eax, -0x3c(%rbp) jmp 0xbdf0b movl -0x3c(%rbp), %eax movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14187(%rip), %rsi # 0xd20a8 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x1417e(%rip), %rsi # 0xd20be xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14174(%rip), %rsi # 0xd20d3 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x1416f(%rip), %rsi # 0xd20ed xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14169(%rip), %rsi # 0xd2106 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14166(%rip), %rsi # 0xd2122 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14162(%rip), %rsi # 0xd213d xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x1415e(%rip), %rsi # 0xd2158 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x1415c(%rip), %rsi # 0xd2172 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14151(%rip), %rsi # 0xd2183 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x14145(%rip), %rsi # 0xd2193 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movq -0x8(%rbp), %rdi leaq 0x1413a(%rip), %rsi # 0xd21a4 xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xbf060 movl %eax, -0x30(%rbp) jmp 0xbe082 movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax,%rax)
cs_leave: 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+140h] mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call cs_file_sec mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_BDDC6 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_34], eax jmp short loc_BDDCD loc_BDDC6: xor eax, eax mov [rbp+var_34], eax jmp short $+2 loc_BDDCD: mov eax, [rbp+var_34] mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_38], eax sub eax, 9 jz loc_BDEA7 jmp short $+2 loc_BDDE4: mov eax, [rbp+var_38] sub eax, 191h jz loc_BDF54 jmp short $+2 loc_BDDF4: mov eax, [rbp+var_38] sub eax, 192h jz loc_BDF73 jmp short $+2 loc_BDE04: mov eax, [rbp+var_38] sub eax, 193h jz loc_BDF92 jmp short $+2 loc_BDE14: mov eax, [rbp+var_38] sub eax, 194h jz loc_BDFB1 jmp short $+2 loc_BDE24: mov eax, [rbp+var_38] sub eax, 195h jz loc_BDFD0 jmp short $+2 loc_BDE34: mov eax, [rbp+var_38] sub eax, 196h jz loc_BDFEF jmp short $+2 loc_BDE44: mov eax, [rbp+var_38] sub eax, 197h jz loc_BE00B jmp short $+2 loc_BDE54: mov eax, [rbp+var_38] sub eax, 198h jz loc_BE027 jmp short $+2 loc_BDE64: mov eax, [rbp+var_38] sub eax, 199h jz loc_BE043 jmp short $+2 loc_BDE74: mov eax, [rbp+var_38] sub eax, 19Ah jz loc_BE05F jmp short $+2 loc_BDE84: mov eax, [rbp+var_38] sub eax, 19Bh jz loc_BDF16 jmp short $+2 loc_BDE94: mov eax, [rbp+var_38] sub eax, 19Ch jz loc_BDF35 jmp loc_BE07B loc_BDEA7: mov rax, [rbp+var_20] cmp qword ptr [rax+690h], 0 jz short loc_BDECB mov rax, [rbp+var_20] mov rcx, [rax+688h] mov rax, [rbp+var_20] mov [rax+718h], rcx loc_BDECB: mov rax, [rbp+var_20] mov rax, [rax+7A8h] cmp qword ptr [rax+0A8h], 0 jz short loc_BDF04 mov rax, [rbp+var_20] mov rax, [rax+7A8h] mov rax, [rax+0A8h] mov rdi, [rbp+var_20] add rdi, 6E0h call rax mov [rbp+var_3C], eax jmp short loc_BDF0B loc_BDF04: xor eax, eax mov [rbp+var_3C], eax jmp short $+2 loc_BDF0B: mov eax, [rbp+var_3C] mov [rbp+var_30], eax jmp loc_BE082 loc_BDF16: mov rdi, [rbp+var_8] lea rsi, aFirstNonIgnora; "[first non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDF35: mov rdi, [rbp+var_8] lea rsi, aLastNonIgnorab; "[last non-ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDF54: mov rdi, [rbp+var_8] lea rsi, aFirstPrimaryIg; "[first primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDF73: mov rdi, [rbp+var_8] lea rsi, aLastPrimaryIgn; "[last primary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDF92: mov rdi, [rbp+var_8] lea rsi, aFirstSecondary; "[first secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDFB1: mov rdi, [rbp+var_8] lea rsi, aLastSecondaryI; "[last secondary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDFD0: mov rdi, [rbp+var_8] lea rsi, aFirstTertiaryI; "[first tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp loc_BE082 loc_BDFEF: mov rdi, [rbp+var_8] lea rsi, aLastTertiaryIg; "[last tertiary ignorable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_BE082 loc_BE00B: mov rdi, [rbp+var_8] lea rsi, aFirstTrailing; "[first trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_BE082 loc_BE027: mov rdi, [rbp+var_8] lea rsi, aLastTrailing; "[last trailing]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_BE082 loc_BE043: mov rdi, [rbp+var_8] lea rsi, aFirstVariable; "[first variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_BE082 loc_BE05F: mov rdi, [rbp+var_8] lea rsi, aLastVariable; "[last variable]" xor eax, eax mov ecx, eax mov rdx, rcx call tailoring_append mov [rbp+var_30], eax jmp short loc_BE082 loc_BE07B: mov [rbp+var_30], 0 loc_BE082: mov eax, [rbp+var_30] add rsp, 40h pop rbp retn
long long cs_leave(long long a1, long long a2, long long a3) { int v5; // [rsp+Ch] [rbp-34h] int *v7; // [rsp+18h] [rbp-28h] _QWORD *v8; // [rsp+20h] [rbp-20h] v8 = *(_QWORD **)(a1 + 320); v7 = (int *)cs_file_sec(a2, a3); if ( v7 ) v5 = *v7; else v5 = 0; switch ( v5 ) { case 9: if ( v8[210] ) v8[227] = v8[209]; if ( *(_QWORD *)(v8[245] + 168LL) ) return (unsigned int)(*(long long ( **)(_QWORD *))(v8[245] + 168LL))(v8 + 220); else return 0; case 401: return (unsigned int)tailoring_append(a1, "[first primary ignorable]", 0LL); case 402: return (unsigned int)tailoring_append(a1, "[last primary ignorable]", 0LL); case 403: return (unsigned int)tailoring_append(a1, "[first secondary ignorable]", 0LL); case 404: return (unsigned int)tailoring_append(a1, "[last secondary ignorable]", 0LL); case 405: return (unsigned int)tailoring_append(a1, "[first tertiary ignorable]", 0LL); case 406: return (unsigned int)tailoring_append(a1, "[last tertiary ignorable]", 0LL); case 407: return (unsigned int)tailoring_append(a1, "[first trailing]", 0LL); case 408: return (unsigned int)tailoring_append(a1, "[last trailing]", 0LL); case 409: return (unsigned int)tailoring_append(a1, "[first variable]", 0LL); case 410: return (unsigned int)tailoring_append(a1, "[last variable]", 0LL); case 411: return (unsigned int)tailoring_append(a1, "[first non-ignorable]", 0LL); case 412: return (unsigned int)tailoring_append(a1, "[last non-ignorable]", 0LL); default: return 0; } }
cs_leave: 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 + 0x140] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001befd0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001bddc6 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x001bddcd LAB_001bddc6: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x001bddcd LAB_001bddcd: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x38],EAX SUB EAX,0x9 JZ 0x001bdea7 JMP 0x001bdde4 LAB_001bdde4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x191 JZ 0x001bdf54 JMP 0x001bddf4 LAB_001bddf4: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x192 JZ 0x001bdf73 JMP 0x001bde04 LAB_001bde04: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x193 JZ 0x001bdf92 JMP 0x001bde14 LAB_001bde14: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x194 JZ 0x001bdfb1 JMP 0x001bde24 LAB_001bde24: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x195 JZ 0x001bdfd0 JMP 0x001bde34 LAB_001bde34: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x196 JZ 0x001bdfef JMP 0x001bde44 LAB_001bde44: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x197 JZ 0x001be00b JMP 0x001bde54 LAB_001bde54: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x198 JZ 0x001be027 JMP 0x001bde64 LAB_001bde64: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x199 JZ 0x001be043 JMP 0x001bde74 LAB_001bde74: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19a JZ 0x001be05f JMP 0x001bde84 LAB_001bde84: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19b JZ 0x001bdf16 JMP 0x001bde94 LAB_001bde94: MOV EAX,dword ptr [RBP + -0x38] SUB EAX,0x19c JZ 0x001bdf35 JMP 0x001be07b LAB_001bdea7: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x690],0x0 JZ 0x001bdecb MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x688] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x718],RCX LAB_001bdecb: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] CMP qword ptr [RAX + 0xa8],0x0 JZ 0x001bdf04 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0xa8] MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x6e0 CALL RAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001bdf0b LAB_001bdf04: XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001bdf0b LAB_001bdf0b: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdf16: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d20a8] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdf35: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d20be] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdf54: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d20d3] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdf73: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d20ed] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdf92: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2106] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdfb1: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2122] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdfd0: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d213d] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001bdfef: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2158] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001be00b: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2172] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001be027: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2183] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001be043: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d2193] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001be05f: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1d21a4] XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001bf060 MOV dword ptr [RBP + -0x30],EAX JMP 0x001be082 LAB_001be07b: MOV dword ptr [RBP + -0x30],0x0 LAB_001be082: MOV EAX,dword ptr [RBP + -0x30] ADD RSP,0x40 POP RBP RET
int4 cs_leave(long param_1,int8 param_2,int8 param_3) { long lVar1; int *piVar2; int4 local_44; int local_3c; int4 local_38; lVar1 = *(long *)(param_1 + 0x140); piVar2 = (int *)cs_file_sec(param_2,param_3); if (piVar2 == (int *)0x0) { local_3c = 0; } else { local_3c = *piVar2; } if (local_3c == 9) { if (*(long *)(lVar1 + 0x690) != 0) { *(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688); } if (*(long *)(*(long *)(lVar1 + 0x7a8) + 0xa8) == 0) { local_44 = 0; } else { local_44 = (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8))(lVar1 + 0x6e0); } local_38 = local_44; } else if (local_3c == 0x191) { local_38 = tailoring_append(param_1,"[first primary ignorable]",0); } else if (local_3c == 0x192) { local_38 = tailoring_append(param_1,"[last primary ignorable]",0); } else if (local_3c == 0x193) { local_38 = tailoring_append(param_1,"[first secondary ignorable]",0); } else if (local_3c == 0x194) { local_38 = tailoring_append(param_1,"[last secondary ignorable]",0); } else if (local_3c == 0x195) { local_38 = tailoring_append(param_1,"[first tertiary ignorable]",0); } else if (local_3c == 0x196) { local_38 = tailoring_append(param_1,"[last tertiary ignorable]",0); } else if (local_3c == 0x197) { local_38 = tailoring_append(param_1,"[first trailing]",0); } else if (local_3c == 0x198) { local_38 = tailoring_append(param_1,"[last trailing]",0); } else if (local_3c == 0x199) { local_38 = tailoring_append(param_1,"[first variable]",0); } else if (local_3c == 0x19a) { local_38 = tailoring_append(param_1,"[last variable]",0); } else if (local_3c == 0x19b) { local_38 = tailoring_append(param_1,"[first non-ignorable]",0); } else if (local_3c == 0x19c) { local_38 = tailoring_append(param_1,"[last non-ignorable]",0); } else { local_38 = 0; } return local_38; }
8,607
ggml_compute_forward_pool_2d
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_pool_2d( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src = dst->src[0]; assert(src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16); if (params->ith != 0) { return; } const int32_t * opts = (const int32_t *)dst->op_params; enum ggml_op_pool op = opts[0]; const int k0 = opts[1]; const int k1 = opts[2]; const int s0 = opts[3]; const int s1 = opts[4]; const int p0 = opts[5]; const int p1 = opts[6]; const char * cdata = (const char*)src->data; const char * const data_end = cdata + ggml_nbytes(src); const int64_t px = dst->ne[0]; const int64_t py = dst->ne[1]; const int64_t pa = px * py; float * dplane = (float *)dst->data; const int ka = k0 * k1; const int offset0 = -p0; const int offset1 = -p1; while (cdata < data_end) { for (int oy = 0; oy < py; ++oy) { float * const drow = dplane + oy * px; for (int ox = 0; ox < px; ++ox) { float * const out = drow + ox; switch (op) { case GGML_OP_POOL_AVG: *out = 0; break; case GGML_OP_POOL_MAX: *out = -FLT_MAX; break; case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error"); } const int ix = offset0 + ox * s0; const int iy = offset1 + oy * s1; for (int ky = 0; ky < k1; ++ky) { if (iy + ky < 0 || iy + ky >= src->ne[1]) continue; const void * srow = (const void *)(cdata + src->nb[1] * (iy + ky)); for (int kx = 0; kx < k0; ++kx) { int j = ix + kx; if (j < 0 || j >= src->ne[0]) continue; const float srow_j = (src->type == GGML_TYPE_F32) ? ((const float*)srow)[j] : GGML_FP16_TO_FP32(((const ggml_fp16_t*)srow)[j]); switch (op) { case GGML_OP_POOL_AVG: *out += srow_j; break; case GGML_OP_POOL_MAX: if (srow_j > *out) *out = srow_j; break; case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error"); } } } switch (op) { case GGML_OP_POOL_AVG: *out /= ka; break; case GGML_OP_POOL_MAX: break; case GGML_OP_POOL_COUNT: GGML_ABORT("fatal error"); } } } cdata += src->nb[2]; dplane += pa; } }
O0
c
ggml_compute_forward_pool_2d: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x17d74 movq -0x18(%rbp), %rax cmpl $0x1, (%rax) jne 0x17d76 jmp 0x17d95 leaq 0x5d6ce(%rip), %rdi # 0x7544b leaq 0x5bdde(%rip), %rsi # 0x73b62 movl $0x2809, %edx # imm = 0x2809 leaq 0x5d77a(%rip), %rcx # 0x7550a callq 0xd690 movq -0x8(%rbp), %rax cmpl $0x0, (%rax) je 0x17da3 jmp 0x181e3 movq -0x10(%rbp), %rax addq $0x54, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x20(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x28(%rbp) movq -0x20(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x20(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x30(%rbp) movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movl 0x14(%rax), %eax movl %eax, -0x38(%rbp) movq -0x20(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0x18(%rbp), %rdi callq 0xd0d0 movq %rax, %rcx movq -0xc8(%rbp), %rax addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax imulq -0x60(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax movq %rax, -0x70(%rbp) movl -0x28(%rbp), %eax imull -0x2c(%rbp), %eax movl %eax, -0x74(%rbp) xorl %eax, %eax subl -0x38(%rbp), %eax movl %eax, -0x78(%rbp) xorl %eax, %eax subl -0x3c(%rbp), %eax movl %eax, -0x7c(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x181e3 movl $0x0, -0x80(%rbp) movslq -0x80(%rbp), %rax cmpq -0x60(%rbp), %rax jge 0x181be movq -0x70(%rbp), %rax movslq -0x80(%rbp), %rcx imulq -0x58(%rbp), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x88(%rbp) movl $0x0, -0x8c(%rbp) movslq -0x8c(%rbp), %rax cmpq -0x58(%rbp), %rax jge 0x181ae movq -0x88(%rbp), %rax movslq -0x8c(%rbp), %rcx leaq (%rax,%rcx,4), %rax movq %rax, -0x98(%rbp) movl -0x24(%rbp), %eax movl %eax, -0xcc(%rbp) testl %eax, %eax je 0x17f22 jmp 0x17ef7 movl -0xcc(%rbp), %eax subl $0x1, %eax je 0x17f11 jmp 0x17f04 movl -0xcc(%rbp), %eax subl $0x2, %eax je 0x17f37 jmp 0x17f51 movq -0x98(%rbp), %rax vpxor %xmm0, %xmm0, %xmm0 vmovss %xmm0, (%rax) jmp 0x17f51 movq -0x98(%rbp), %rax vmovss 0x5bba7(%rip), %xmm0 # 0x73ad8 vmovss %xmm0, (%rax) jmp 0x17f51 leaq 0x5bc24(%rip), %rdi # 0x73b62 movl $0x282c, %esi # imm = 0x282C leaq 0x5be73(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 movl -0x78(%rbp), %eax movl -0x8c(%rbp), %ecx imull -0x30(%rbp), %ecx addl %ecx, %eax movl %eax, -0x9c(%rbp) movl -0x7c(%rbp), %eax movl -0x80(%rbp), %ecx imull -0x34(%rbp), %ecx addl %ecx, %eax movl %eax, -0xa0(%rbp) movl $0x0, -0xa4(%rbp) movl -0xa4(%rbp), %eax cmpl -0x2c(%rbp), %eax jge 0x18139 movl -0xa0(%rbp), %eax addl -0xa4(%rbp), %eax cmpl $0x0, %eax jl 0x17fba movl -0xa0(%rbp), %eax addl -0xa4(%rbp), %eax cltq movq -0x18(%rbp), %rcx cmpq 0x18(%rcx), %rax jl 0x17fbf jmp 0x18125 movq -0x48(%rbp), %rax movq -0x18(%rbp), %rcx movq 0x38(%rcx), %rcx movl -0xa0(%rbp), %edx addl -0xa4(%rbp), %edx movslq %edx, %rdx imulq %rdx, %rcx addq %rcx, %rax movq %rax, -0xb0(%rbp) movl $0x0, -0xb4(%rbp) movl -0xb4(%rbp), %eax cmpl -0x28(%rbp), %eax jge 0x18123 movl -0x9c(%rbp), %eax addl -0xb4(%rbp), %eax movl %eax, -0xb8(%rbp) cmpl $0x0, -0xb8(%rbp) jl 0x1802d movslq -0xb8(%rbp), %rax movq -0x18(%rbp), %rcx cmpq 0x10(%rcx), %rax jl 0x18032 jmp 0x1810f movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x18058 movq -0xb0(%rbp), %rax movslq -0xb8(%rbp), %rcx vmovss (%rax,%rcx,4), %xmm0 vmovss %xmm0, -0xd0(%rbp) jmp 0x18077 movq -0xb0(%rbp), %rax movslq -0xb8(%rbp), %rcx movzwl (%rax,%rcx,2), %edi callq 0xfab0 vmovss %xmm0, -0xd0(%rbp) vmovss -0xd0(%rbp), %xmm0 vmovss %xmm0, -0xbc(%rbp) movl -0x24(%rbp), %eax movl %eax, -0xd4(%rbp) testl %eax, %eax je 0x180c9 jmp 0x18096 movl -0xd4(%rbp), %eax subl $0x1, %eax je 0x180b0 jmp 0x180a3 movl -0xd4(%rbp), %eax subl $0x2, %eax je 0x180f3 jmp 0x1810d vmovss -0xbc(%rbp), %xmm0 movq -0x98(%rbp), %rax vaddss (%rax), %xmm0, %xmm0 vmovss %xmm0, (%rax) jmp 0x1810d vmovss -0xbc(%rbp), %xmm0 movq -0x98(%rbp), %rax vucomiss (%rax), %xmm0 jbe 0x180f1 vmovss -0xbc(%rbp), %xmm0 movq -0x98(%rbp), %rax vmovss %xmm0, (%rax) jmp 0x1810d leaq 0x5ba68(%rip), %rdi # 0x73b62 movl $0x283c, %esi # imm = 0x283C leaq 0x5bcb7(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 jmp 0x1810f movl -0xb4(%rbp), %eax addl $0x1, %eax movl %eax, -0xb4(%rbp) jmp 0x17ff2 jmp 0x18125 movl -0xa4(%rbp), %eax addl $0x1, %eax movl %eax, -0xa4(%rbp) jmp 0x17f82 movl -0x24(%rbp), %eax movl %eax, -0xd8(%rbp) testl %eax, %eax je 0x1817c jmp 0x18148 movl -0xd8(%rbp), %eax subl $0x1, %eax je 0x18162 jmp 0x18155 movl -0xd8(%rbp), %eax subl $0x2, %eax je 0x1817e jmp 0x18198 vcvtsi2ssl -0x74(%rbp), %xmm0, %xmm1 movq -0x98(%rbp), %rax vmovss (%rax), %xmm0 vdivss %xmm1, %xmm0, %xmm0 vmovss %xmm0, (%rax) jmp 0x18198 jmp 0x18198 leaq 0x5b9dd(%rip), %rdi # 0x73b62 movl $0x2843, %esi # imm = 0x2843 leaq 0x5bc2c(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 jmp 0x1819a movl -0x8c(%rbp), %eax addl $0x1, %eax movl %eax, -0x8c(%rbp) jmp 0x17ebe jmp 0x181b0 movl -0x80(%rbp), %eax addl $0x1, %eax movl %eax, -0x80(%rbp) jmp 0x17e8b movq -0x18(%rbp), %rax movq 0x40(%rax), %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x68(%rbp), %rax shlq $0x2, %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x17e76 addq $0xe0, %rsp popq %rbp retq nopl (%rax)
ggml_compute_forward_pool_2d: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_17D74 mov rax, [rbp+var_18] cmp dword ptr [rax], 1 jnz short loc_17D76 loc_17D74: jmp short loc_17D95 loc_17D76: lea rdi, aSrcTypeGgmlTyp; "src->type == GGML_TYPE_F32 || src->type"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 2809h lea rcx, aVoidGgmlComput_1; "void ggml_compute_forward_pool_2d(const"... call ___assert_fail loc_17D95: mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jz short loc_17DA3 jmp loc_181E3 loc_17DA3: mov rax, [rbp+var_10] add rax, 54h ; 'T' mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_24], eax mov rax, [rbp+var_20] mov eax, [rax+4] mov [rbp+var_28], eax mov rax, [rbp+var_20] mov eax, [rax+8] mov [rbp+var_2C], eax mov rax, [rbp+var_20] mov eax, [rax+0Ch] mov [rbp+var_30], eax mov rax, [rbp+var_20] mov eax, [rax+10h] mov [rbp+var_34], eax mov rax, [rbp+var_20] mov eax, [rax+14h] mov [rbp+var_38], eax mov rax, [rbp+var_20] mov eax, [rax+18h] mov [rbp+var_3C], eax mov rax, [rbp+var_18] mov rax, [rax+0F8h] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_C8], rax mov rdi, [rbp+var_18] call _ggml_nbytes mov rcx, rax mov rax, [rbp+var_C8] add rax, rcx mov [rbp+var_50], 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_60], rax mov rax, [rbp+var_58] imul rax, [rbp+var_60] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rax, [rax+0F8h] mov [rbp+var_70], rax mov eax, [rbp+var_28] imul eax, [rbp+var_2C] mov [rbp+var_74], eax xor eax, eax sub eax, [rbp+var_38] mov [rbp+var_78], eax xor eax, eax sub eax, [rbp+var_3C] mov [rbp+var_7C], eax loc_17E76: mov rax, [rbp+var_48] cmp rax, [rbp+var_50] jnb loc_181E3 mov [rbp+var_80], 0 loc_17E8B: movsxd rax, [rbp+var_80] cmp rax, [rbp+var_60] jge loc_181BE mov rax, [rbp+var_70] movsxd rcx, [rbp+var_80] imul rcx, [rbp+var_58] shl rcx, 2 add rax, rcx mov [rbp+var_88], rax mov [rbp+var_8C], 0 loc_17EBE: movsxd rax, [rbp+var_8C] cmp rax, [rbp+var_58] jge loc_181AE mov rax, [rbp+var_88] movsxd rcx, [rbp+var_8C] lea rax, [rax+rcx*4] mov [rbp+var_98], rax mov eax, [rbp+var_24] mov [rbp+var_CC], eax test eax, eax jz short loc_17F22 jmp short $+2 loc_17EF7: mov eax, [rbp+var_CC] sub eax, 1 jz short loc_17F11 jmp short $+2 loc_17F04: mov eax, [rbp+var_CC] sub eax, 2 jz short loc_17F37 jmp short loc_17F51 loc_17F11: mov rax, [rbp+var_98] vpxor xmm0, xmm0, xmm0 vmovss dword ptr [rax], xmm0 jmp short loc_17F51 loc_17F22: mov rax, [rbp+var_98] vmovss xmm0, cs:dword_73AD8 vmovss dword ptr [rax], xmm0 jmp short loc_17F51 loc_17F37: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 282Ch lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_17F51: mov eax, [rbp+var_78] mov ecx, [rbp+var_8C] imul ecx, [rbp+var_30] add eax, ecx mov [rbp+var_9C], eax mov eax, [rbp+var_7C] mov ecx, [rbp+var_80] imul ecx, [rbp+var_34] add eax, ecx mov [rbp+var_A0], eax mov [rbp+var_A4], 0 loc_17F82: mov eax, [rbp+var_A4] cmp eax, [rbp+var_2C] jge loc_18139 mov eax, [rbp+var_A0] add eax, [rbp+var_A4] cmp eax, 0 jl short loc_17FBA mov eax, [rbp+var_A0] add eax, [rbp+var_A4] cdqe mov rcx, [rbp+var_18] cmp rax, [rcx+18h] jl short loc_17FBF loc_17FBA: jmp loc_18125 loc_17FBF: mov rax, [rbp+var_48] mov rcx, [rbp+var_18] mov rcx, [rcx+38h] mov edx, [rbp+var_A0] add edx, [rbp+var_A4] movsxd rdx, edx imul rcx, rdx add rax, rcx mov [rbp+var_B0], rax mov [rbp+var_B4], 0 loc_17FF2: mov eax, [rbp+var_B4] cmp eax, [rbp+var_28] jge loc_18123 mov eax, [rbp+var_9C] add eax, [rbp+var_B4] mov [rbp+var_B8], eax cmp [rbp+var_B8], 0 jl short loc_1802D movsxd rax, [rbp+var_B8] mov rcx, [rbp+var_18] cmp rax, [rcx+10h] jl short loc_18032 loc_1802D: jmp loc_1810F loc_18032: mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_18058 mov rax, [rbp+var_B0] movsxd rcx, [rbp+var_B8] vmovss xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_D0], xmm0 jmp short loc_18077 loc_18058: mov rax, [rbp+var_B0] movsxd rcx, [rbp+var_B8] movzx edi, word ptr [rax+rcx*2] call ggml_lookup_fp16_to_fp32 vmovss [rbp+var_D0], xmm0 loc_18077: vmovss xmm0, [rbp+var_D0] vmovss [rbp+var_BC], xmm0 mov eax, [rbp+var_24] mov [rbp+var_D4], eax test eax, eax jz short loc_180C9 jmp short $+2 loc_18096: mov eax, [rbp+var_D4] sub eax, 1 jz short loc_180B0 jmp short $+2 loc_180A3: mov eax, [rbp+var_D4] sub eax, 2 jz short loc_180F3 jmp short loc_1810D loc_180B0: vmovss xmm0, [rbp+var_BC] mov rax, [rbp+var_98] vaddss xmm0, xmm0, dword ptr [rax] vmovss dword ptr [rax], xmm0 jmp short loc_1810D loc_180C9: vmovss xmm0, [rbp+var_BC] mov rax, [rbp+var_98] vucomiss xmm0, dword ptr [rax] jbe short loc_180F1 vmovss xmm0, [rbp+var_BC] mov rax, [rbp+var_98] vmovss dword ptr [rax], xmm0 loc_180F1: jmp short loc_1810D loc_180F3: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 283Ch lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_1810D: jmp short $+2 loc_1810F: mov eax, [rbp+var_B4] add eax, 1 mov [rbp+var_B4], eax jmp loc_17FF2 loc_18123: jmp short $+2 loc_18125: mov eax, [rbp+var_A4] add eax, 1 mov [rbp+var_A4], eax jmp loc_17F82 loc_18139: mov eax, [rbp+var_24] mov [rbp+var_D8], eax test eax, eax jz short loc_1817C jmp short $+2 loc_18148: mov eax, [rbp+var_D8] sub eax, 1 jz short loc_18162 jmp short $+2 loc_18155: mov eax, [rbp+var_D8] sub eax, 2 jz short loc_1817E jmp short loc_18198 loc_18162: vcvtsi2ss xmm1, xmm0, [rbp+var_74] mov rax, [rbp+var_98] vmovss xmm0, dword ptr [rax] vdivss xmm0, xmm0, xmm1 vmovss dword ptr [rax], xmm0 jmp short loc_18198 loc_1817C: jmp short loc_18198 loc_1817E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2843h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_18198: jmp short $+2 loc_1819A: mov eax, [rbp+var_8C] add eax, 1 mov [rbp+var_8C], eax jmp loc_17EBE loc_181AE: jmp short $+2 loc_181B0: mov eax, [rbp+var_80] add eax, 1 mov [rbp+var_80], eax jmp loc_17E8B loc_181BE: mov rax, [rbp+var_18] mov rax, [rax+40h] add rax, [rbp+var_48] mov [rbp+var_48], rax mov rax, [rbp+var_68] shl rax, 2 add rax, [rbp+var_70] mov [rbp+var_70], rax jmp loc_17E76 loc_181E3: add rsp, 0E0h pop rbp retn
_DWORD * ggml_compute_forward_pool_2d(_DWORD *a1, long long a2, __m128 _XMM0) { _DWORD *result; // rax int v18; // [rsp+28h] [rbp-B8h] int n; // [rsp+2Ch] [rbp-B4h] long long v20; // [rsp+30h] [rbp-B0h] int m; // [rsp+3Ch] [rbp-A4h] int v22; // [rsp+40h] [rbp-A0h] int v23; // [rsp+44h] [rbp-9Ch] int k; // [rsp+54h] [rbp-8Ch] long long v25; // [rsp+58h] [rbp-88h] int j; // [rsp+60h] [rbp-80h] long long i; // [rsp+70h] [rbp-70h] long long v28; // [rsp+80h] [rbp-60h] long long v29; // [rsp+88h] [rbp-58h] unsigned long long v30; // [rsp+90h] [rbp-50h] _DWORD *v31; // [rsp+98h] [rbp-48h] int v32; // [rsp+A4h] [rbp-3Ch] int v33; // [rsp+A8h] [rbp-38h] int v34; // [rsp+ACh] [rbp-34h] int v35; // [rsp+B0h] [rbp-30h] int v36; // [rsp+B4h] [rbp-2Ch] int v37; // [rsp+B8h] [rbp-28h] int v38; // [rsp+BCh] [rbp-24h] long long v39; // [rsp+C8h] [rbp-18h] v39 = *(_QWORD *)(a2 + 152); if ( *(_DWORD *)v39 > 1u ) __assert_fail( "src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 10249LL, "void ggml_compute_forward_pool_2d(const struct ggml_compute_params *, struct ggml_tensor *)"); result = a1; if ( !*a1 ) { v38 = *(_DWORD *)(a2 + 84); v37 = *(_DWORD *)(a2 + 88); v36 = *(_DWORD *)(a2 + 92); v35 = *(_DWORD *)(a2 + 96); v34 = *(_DWORD *)(a2 + 100); v33 = *(_DWORD *)(a2 + 104); v32 = *(_DWORD *)(a2 + 108); v31 = *(_DWORD **)(v39 + 248); v30 = (unsigned long long)v31 + ggml_nbytes(v39); v29 = *(_QWORD *)(a2 + 16); v28 = *(_QWORD *)(a2 + 24); for ( i = *(_QWORD *)(a2 + 248); ; i += 4 * v28 * v29 ) { result = v31; if ( (unsigned long long)v31 >= v30 ) break; for ( j = 0; j < v28; ++j ) { v25 = 4 * v29 * j + i; for ( k = 0; k < v29; ++k ) { if ( v38 ) { if ( v38 == 1 ) { _RAX = v25 + 4LL * k; __asm { vpxor xmm0, xmm0, xmm0 vmovss dword ptr [rax], xmm0 } } else if ( v38 == 2 ) { *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/g" "gml-cpu/ggml-cpu.c", 10284LL, "fatal error"); } } else { _RAX = v25 + 4LL * k; __asm { vmovss xmm0, cs:dword_73AD8 vmovss dword ptr [rax], xmm0 } } v23 = v35 * k - v33; v22 = v34 * j - v32; for ( m = 0; m < v36; ++m ) { if ( m + v22 >= 0 && m + v22 < *(_QWORD *)(v39 + 24) ) { v20 = (long long)v31 + (m + v22) * *(_QWORD *)(v39 + 56); for ( n = 0; n < v37; ++n ) { v18 = n + v23; if ( n + v23 >= 0 && v18 < *(_QWORD *)(v39 + 16) ) { if ( *(_DWORD *)v39 ) { _XMM0 = ggml_lookup_fp16_to_fp32(*(_WORD *)(v20 + 2LL * v18)); __asm { vmovss [rbp+var_D0], xmm0 } } else { _RAX = v20; _RCX = v18; __asm { vmovss xmm0, dword ptr [rax+rcx*4] vmovss [rbp+var_D0], xmm0 } } __asm { vmovss xmm0, [rbp+var_D0] vmovss [rbp+var_BC], xmm0 } if ( v38 ) { if ( v38 == 1 ) { __asm { vmovss xmm0, [rbp+var_BC] } _RAX = v25 + 4LL * k; __asm { vaddss xmm0, xmm0, dword ptr [rax] vmovss dword ptr [rax], xmm0 } } else if ( v38 == 2 ) { *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/gg" "ml/src/ggml-cpu/ggml-cpu.c", 10300LL, "fatal error"); } } else { __asm { vmovss xmm0, [rbp+var_BC] } _RAX = v25 + 4LL * k; __asm { vucomiss xmm0, dword ptr [rax] } } } } } } if ( v38 ) { if ( v38 == 1 ) { __asm { vcvtsi2ss xmm1, xmm0, [rbp+var_74] } _RAX = v25 + 4LL * k; __asm { vmovss xmm0, dword ptr [rax] vdivss xmm0, xmm0, xmm1 vmovss dword ptr [rax], xmm0 } } else if ( v38 == 2 ) { *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/g" "gml-cpu/ggml-cpu.c", 10307LL, "fatal error"); } } } } v31 = (_DWORD *)((char *)v31 + *(_QWORD *)(v39 + 64)); } } return result; }
ggml_compute_forward_pool_2d: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x00117d74 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x1 JNZ 0x00117d76 LAB_00117d74: JMP 0x00117d95 LAB_00117d76: LEA RDI,[0x17544b] LEA RSI,[0x173b62] MOV EDX,0x2809 LEA RCX,[0x17550a] CALL 0x0010d690 LAB_00117d95: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JZ 0x00117da3 JMP 0x001181e3 LAB_00117da3: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x54 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xc8],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010d0d0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xc8] ADD RAX,RCX MOV qword ptr [RBP + -0x50],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 qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x58] IMUL RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x74],EAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x78],EAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x7c],EAX LAB_00117e76: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JNC 0x001181e3 MOV dword ptr [RBP + -0x80],0x0 LAB_00117e8b: MOVSXD RAX,dword ptr [RBP + -0x80] CMP RAX,qword ptr [RBP + -0x60] JGE 0x001181be MOV RAX,qword ptr [RBP + -0x70] MOVSXD RCX,dword ptr [RBP + -0x80] IMUL RCX,qword ptr [RBP + -0x58] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x88],RAX MOV dword ptr [RBP + -0x8c],0x0 LAB_00117ebe: MOVSXD RAX,dword ptr [RBP + -0x8c] CMP RAX,qword ptr [RBP + -0x58] JGE 0x001181ae MOV RAX,qword ptr [RBP + -0x88] MOVSXD RCX,dword ptr [RBP + -0x8c] LEA RAX,[RAX + RCX*0x4] MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0xcc],EAX TEST EAX,EAX JZ 0x00117f22 JMP 0x00117ef7 LAB_00117ef7: MOV EAX,dword ptr [RBP + -0xcc] SUB EAX,0x1 JZ 0x00117f11 JMP 0x00117f04 LAB_00117f04: MOV EAX,dword ptr [RBP + -0xcc] SUB EAX,0x2 JZ 0x00117f37 JMP 0x00117f51 LAB_00117f11: MOV RAX,qword ptr [RBP + -0x98] VPXOR XMM0,XMM0,XMM0 VMOVSS dword ptr [RAX],XMM0 JMP 0x00117f51 LAB_00117f22: MOV RAX,qword ptr [RBP + -0x98] VMOVSS XMM0,dword ptr [0x00173ad8] VMOVSS dword ptr [RAX],XMM0 JMP 0x00117f51 LAB_00117f37: LEA RDI,[0x173b62] MOV ESI,0x282c LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00117f51: MOV EAX,dword ptr [RBP + -0x78] MOV ECX,dword ptr [RBP + -0x8c] IMUL ECX,dword ptr [RBP + -0x30] ADD EAX,ECX MOV dword ptr [RBP + -0x9c],EAX MOV EAX,dword ptr [RBP + -0x7c] MOV ECX,dword ptr [RBP + -0x80] IMUL ECX,dword ptr [RBP + -0x34] ADD EAX,ECX MOV dword ptr [RBP + -0xa0],EAX MOV dword ptr [RBP + -0xa4],0x0 LAB_00117f82: MOV EAX,dword ptr [RBP + -0xa4] CMP EAX,dword ptr [RBP + -0x2c] JGE 0x00118139 MOV EAX,dword ptr [RBP + -0xa0] ADD EAX,dword ptr [RBP + -0xa4] CMP EAX,0x0 JL 0x00117fba MOV EAX,dword ptr [RBP + -0xa0] ADD EAX,dword ptr [RBP + -0xa4] CDQE MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x18] JL 0x00117fbf LAB_00117fba: JMP 0x00118125 LAB_00117fbf: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x38] MOV EDX,dword ptr [RBP + -0xa0] ADD EDX,dword ptr [RBP + -0xa4] MOVSXD RDX,EDX IMUL RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0xb0],RAX MOV dword ptr [RBP + -0xb4],0x0 LAB_00117ff2: MOV EAX,dword ptr [RBP + -0xb4] CMP EAX,dword ptr [RBP + -0x28] JGE 0x00118123 MOV EAX,dword ptr [RBP + -0x9c] ADD EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xb8],EAX CMP dword ptr [RBP + -0xb8],0x0 JL 0x0011802d MOVSXD RAX,dword ptr [RBP + -0xb8] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x10] JL 0x00118032 LAB_0011802d: JMP 0x0011810f LAB_00118032: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x00118058 MOV RAX,qword ptr [RBP + -0xb0] MOVSXD RCX,dword ptr [RBP + -0xb8] VMOVSS XMM0,dword ptr [RAX + RCX*0x4] VMOVSS dword ptr [RBP + -0xd0],XMM0 JMP 0x00118077 LAB_00118058: MOV RAX,qword ptr [RBP + -0xb0] MOVSXD RCX,dword ptr [RBP + -0xb8] MOVZX EDI,word ptr [RAX + RCX*0x2] CALL 0x0010fab0 VMOVSS dword ptr [RBP + -0xd0],XMM0 LAB_00118077: VMOVSS XMM0,dword ptr [RBP + -0xd0] VMOVSS dword ptr [RBP + -0xbc],XMM0 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0xd4],EAX TEST EAX,EAX JZ 0x001180c9 JMP 0x00118096 LAB_00118096: MOV EAX,dword ptr [RBP + -0xd4] SUB EAX,0x1 JZ 0x001180b0 JMP 0x001180a3 LAB_001180a3: MOV EAX,dword ptr [RBP + -0xd4] SUB EAX,0x2 JZ 0x001180f3 JMP 0x0011810d LAB_001180b0: VMOVSS XMM0,dword ptr [RBP + -0xbc] MOV RAX,qword ptr [RBP + -0x98] VADDSS XMM0,XMM0,dword ptr [RAX] VMOVSS dword ptr [RAX],XMM0 JMP 0x0011810d LAB_001180c9: VMOVSS XMM0,dword ptr [RBP + -0xbc] MOV RAX,qword ptr [RBP + -0x98] VUCOMISS XMM0,dword ptr [RAX] JBE 0x001180f1 VMOVSS XMM0,dword ptr [RBP + -0xbc] MOV RAX,qword ptr [RBP + -0x98] VMOVSS dword ptr [RAX],XMM0 LAB_001180f1: JMP 0x0011810d LAB_001180f3: LEA RDI,[0x173b62] MOV ESI,0x283c LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_0011810d: JMP 0x0011810f LAB_0011810f: MOV EAX,dword ptr [RBP + -0xb4] ADD EAX,0x1 MOV dword ptr [RBP + -0xb4],EAX JMP 0x00117ff2 LAB_00118123: JMP 0x00118125 LAB_00118125: MOV EAX,dword ptr [RBP + -0xa4] ADD EAX,0x1 MOV dword ptr [RBP + -0xa4],EAX JMP 0x00117f82 LAB_00118139: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0xd8],EAX TEST EAX,EAX JZ 0x0011817c JMP 0x00118148 LAB_00118148: MOV EAX,dword ptr [RBP + -0xd8] SUB EAX,0x1 JZ 0x00118162 JMP 0x00118155 LAB_00118155: MOV EAX,dword ptr [RBP + -0xd8] SUB EAX,0x2 JZ 0x0011817e JMP 0x00118198 LAB_00118162: VCVTSI2SS XMM1,XMM0,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + -0x98] VMOVSS XMM0,dword ptr [RAX] VDIVSS XMM0,XMM0,XMM1 VMOVSS dword ptr [RAX],XMM0 JMP 0x00118198 LAB_0011817c: JMP 0x00118198 LAB_0011817e: LEA RDI,[0x173b62] MOV ESI,0x2843 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00118198: JMP 0x0011819a LAB_0011819a: MOV EAX,dword ptr [RBP + -0x8c] ADD EAX,0x1 MOV dword ptr [RBP + -0x8c],EAX JMP 0x00117ebe LAB_001181ae: JMP 0x001181b0 LAB_001181b0: MOV EAX,dword ptr [RBP + -0x80] ADD EAX,0x1 MOV dword ptr [RBP + -0x80],EAX JMP 0x00117e8b LAB_001181be: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x68] SHL RAX,0x2 ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX JMP 0x00117e76 LAB_001181e3: ADD RSP,0xe0 POP RBP RET
void ggml_compute_forward_pool_2d(int *param_1,long param_2) { float *pfVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int *piVar9; long lVar10; int iVar11; int iVar12; long lVar13; ulong uVar14; long lVar15; float local_d8; int local_bc; int local_ac; int local_94; int local_88; long local_78; ulong local_50; piVar9 = *(int **)(param_2 + 0x98); if ((*piVar9 != 0) && (*piVar9 != 1)) { /* WARNING: Subroutine does not return */ __assert_fail("src->type == GGML_TYPE_F32 || src->type == GGML_TYPE_F16", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2809, "void ggml_compute_forward_pool_2d(const struct ggml_compute_params *, struct ggml_tensor *)" ); } if (*param_1 == 0) { iVar2 = *(int *)(param_2 + 0x54); iVar3 = *(int *)(param_2 + 0x58); iVar4 = *(int *)(param_2 + 0x5c); iVar5 = *(int *)(param_2 + 0x60); iVar6 = *(int *)(param_2 + 100); iVar7 = *(int *)(param_2 + 0x68); iVar8 = *(int *)(param_2 + 0x6c); local_50 = *(ulong *)(piVar9 + 0x3e); lVar13 = ggml_nbytes(piVar9); uVar14 = local_50 + lVar13; lVar13 = *(long *)(param_2 + 0x10); lVar10 = *(long *)(param_2 + 0x18); local_78 = *(long *)(param_2 + 0xf8); for (; local_50 < uVar14; local_50 = *(long *)(piVar9 + 0x10) + local_50) { for (local_88 = 0; local_88 < lVar10; local_88 = local_88 + 1) { for (local_94 = 0; local_94 < lVar13; local_94 = local_94 + 1) { pfVar1 = (float *)(local_78 + local_88 * lVar13 * 4 + (long)local_94 * 4); if (iVar2 == 0) { *pfVar1 = DAT_00173ad8; } else if (iVar2 == 1) { *pfVar1 = 0.0; } else if (iVar2 == 2) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x282c,"fatal error"); } iVar11 = local_88 * iVar6 - iVar8; for (local_ac = 0; local_ac < iVar4; local_ac = local_ac + 1) { if ((-1 < iVar11 + local_ac) && ((long)(iVar11 + local_ac) < *(long *)(piVar9 + 6))) { lVar15 = local_50 + *(long *)(piVar9 + 0xe) * (long)(iVar11 + local_ac); for (local_bc = 0; local_bc < iVar3; local_bc = local_bc + 1) { iVar12 = (local_94 * iVar5 - iVar7) + local_bc; if ((-1 < iVar12) && ((long)iVar12 < *(long *)(piVar9 + 4))) { if (*piVar9 == 0) { local_d8 = *(float *)(lVar15 + (long)iVar12 * 4); } else { local_d8 = (float)ggml_lookup_fp16_to_fp32 (*(int2 *)(lVar15 + (long)iVar12 * 2)); } if (iVar2 == 0) { if (*pfVar1 < local_d8) { *pfVar1 = local_d8; } } else if (iVar2 == 1) { *pfVar1 = local_d8 + *pfVar1; } else if (iVar2 == 2) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x283c,"fatal error"); } } } } } if (iVar2 != 0) { if (iVar2 == 1) { *pfVar1 = *pfVar1 / (float)(iVar3 * iVar4); } else if (iVar2 == 2) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2843,"fatal error"); } } } } local_78 = lVar13 * lVar10 * 4 + local_78; } } return; }
8,608
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 0x5be05 cmpq %rdi, 0x10(%rsi) jbe 0x5be05 movslq 0x8(%rdi), %rax cmpq $0xf, %rax jg 0x5be03 movq 0x18(%rsi,%rax,8), %rcx movq %rcx, (%rdi) movq %rdi, 0x18(%rsi,%rax,8) popq %rbp retq popq %rbp jmp 0x243c0
Bfree: push rbp mov rbp, rsp cmp [rsi], rdi ja short loc_5BE05 cmp [rsi+10h], rdi jbe short loc_5BE05 movsxd rax, dword ptr [rdi+8] cmp rax, 0Fh jg short loc_5BE03 mov rcx, [rsi+rax*8+18h] mov [rdi], rcx mov [rsi+rax*8+18h], rdi loc_5BE03: pop rbp retn loc_5BE05: 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 0x0015be05 CMP qword ptr [RSI + 0x10],RDI JBE 0x0015be05 MOVSXD RAX,dword ptr [RDI + 0x8] CMP RAX,0xf JG 0x0015be03 MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18] MOV qword ptr [RDI],RCX MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI LAB_0015be03: POP RBP RET LAB_0015be05: POP RBP JMP 0x001243c0
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; }
8,609
vemit_tap
eloqsql/unittest/mytap/tap.c
static void vemit_tap(int pass, char const *fmt, va_list ap) { fprintf(tapout, "%sok %d%s", pass ? "" : "not ", ++g_test.last, (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); fflush(tapout); }
O0
c
vemit_tap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq 0x1a7f9e(%rip), %rax # 0x1ccfb8 movq (%rax), %rax movq %rax, -0x30(%rbp) movl -0x4(%rbp), %edx leaq 0x54183(%rip), %rax # 0x791ae leaq 0x57bc1(%rip), %rcx # 0x7cbf3 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x28(%rbp) movl 0x35f8d9(%rip), %eax # 0x38491c addl $0x1, %eax movl %eax, -0x20(%rbp) movl %eax, 0x35f8cd(%rip) # 0x38491c xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0x2506b movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x19(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rdi movb -0x19(%rbp), %sil leaq 0x57b72(%rip), %r8 # 0x7cbf3 leaq 0x5412b(%rip), %rax # 0x791b3 testb $0x1, %sil cmovneq %rax, %r8 leaq 0x5410d(%rip), %rsi # 0x791a4 movb $0x0, %al callq 0x24400 cmpq $0x0, -0x10(%rbp) je 0x250c8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x250c8 movq 0x1a7f00(%rip), %rax # 0x1ccfb8 movq (%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x243d0 movq 0x1a7ee9(%rip), %rax # 0x1ccfb8 movq (%rax), %rdi callq 0x24320 addq $0x30, %rsp popq %rbp retq nopl (%rax)
vemit_tap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, cs:stdout_ptr mov rax, [rax] mov [rbp+var_30], rax mov edx, [rbp+var_4] lea rax, aNot; "not " lea rcx, asc_7CBEF+4; "" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_28], rax mov eax, cs:dword_38491C add eax, 1 mov [rbp+var_20], eax mov cs:dword_38491C, eax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_2506B mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_19], al loc_2506B: mov ecx, [rbp+var_20] mov rdx, [rbp+var_28] mov rdi, [rbp+var_30] mov sil, [rbp+var_19] lea r8, asc_7CBEF+4; "" lea rax, asc_791B3; " - " test sil, 1 cmovnz r8, rax lea rsi, aSokDS; "%sok %d%s" mov al, 0 call _fprintf cmp [rbp+var_10], 0 jz short loc_250C8 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_250C8 mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _vfprintf loc_250C8: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 30h pop rbp retn
long long vemit_tap(int a1, _BYTE *a2, long long a3) { const char *v3; // rax const char *v4; // r8 int v6; // [rsp+10h] [rbp-20h] bool v7; // [rsp+17h] [rbp-19h] v3 = "not "; if ( a1 ) v3 = ""; v6 = ++dword_38491C; v7 = 0; if ( a2 ) v7 = *a2 != 0; v4 = ""; if ( v7 ) v4 = " - "; fprintf(stdout, "%sok %d%s", v3, v6, v4); if ( a2 && *a2 ) vfprintf(stdout, a2, a3); return fflush(stdout); }
vemit_tap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [0x002ccfb8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV EDX,dword ptr [RBP + -0x4] LEA RAX,[0x1791ae] LEA RCX,[0x17cbf3] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [0x0048491c] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [0x0048491c],EAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x0012506b MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_0012506b: MOV ECX,dword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x30] MOV SIL,byte ptr [RBP + -0x19] LEA R8,[0x17cbf3] LEA RAX,[0x1791b3] TEST SIL,0x1 CMOVNZ R8,RAX LEA RSI,[0x1791a4] MOV AL,0x0 CALL 0x00124400 CMP qword ptr [RBP + -0x10],0x0 JZ 0x001250c8 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001250c8 MOV RAX,qword ptr [0x002ccfb8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001243d0 LAB_001250c8: MOV RAX,qword ptr [0x002ccfb8] MOV RDI,qword ptr [RAX] CALL 0x00124320 ADD RSP,0x30 POP RBP RET
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3) { int *puVar1; int *puVar2; bool bVar3; puVar1 = &DAT_001791ae; if (param_1 != 0) { puVar1 = &DAT_0017cbf3; } DAT_0048491c = DAT_0048491c + 1; bVar3 = false; if (param_2 != (char *)0x0) { bVar3 = *param_2 != '\0'; } puVar2 = &DAT_0017cbf3; if (bVar3) { puVar2 = &DAT_001791b3; } fprintf(*(FILE **)PTR_stdout_002ccfb8,"%sok %d%s",puVar1,(ulong)DAT_0048491c,puVar2); if ((param_2 != (char *)0x0) && (*param_2 != '\0')) { vfprintf(*(FILE **)PTR_stdout_002ccfb8,param_2,param_3); } fflush(*(FILE **)PTR_stdout_002ccfb8); return; }
8,610
parts_copy_string
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/parts/parts.c
const char* parts_copy_string(PENGINE_T instance, uint32_t parm, uint32_t flags, char* buffer, int len) { buffer[0] = '\0' ; #if defined CFG_ENGINE_REGISTRY_ENABLE if (flags & PART_ACTION_FLAG_INDEXED) { const char * str = engine_get_string (instance, parm, 0) ; if (str) { int32_t res = registry_string_get (str, (char*)buffer, len - 2) ; if (res > 0) { buffer[len-1] = '\0' ; } } } else #endif if (flags & PART_ACTION_FLAG_STRING) { const char* str = engine_get_string (instance, parm, 0) ; if (str) { strncpy(buffer, str, len-2) ; buffer[len-1] = '\0' ; } } return buffer ; }
O3
c
parts_copy_string: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rcx, %rbx movb $0x0, (%rcx) testb $0x8, %dl je 0x82be movl %r8d, %r14d movzwl %si, %esi xorl %edx, %edx callq 0xffe1 testq %rax, %rax je 0x82be leal -0x2(%r14), %ecx movslq %ecx, %rdx movq %rbx, %rdi movq %rax, %rsi callq 0x6090 movslq %r14d, %rax movb $0x0, -0x1(%rbx,%rax) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
parts_copy_string: push rbp mov rbp, rsp push r14 push rbx mov rbx, rcx mov byte ptr [rcx], 0 test dl, 8 jz short loc_82BE mov r14d, r8d movzx esi, si xor edx, edx call engine_get_string test rax, rax jz short loc_82BE lea ecx, [r14-2] movsxd rdx, ecx mov rdi, rbx mov rsi, rax call _strncpy movsxd rax, r14d mov byte ptr [rbx+rax-1], 0 loc_82BE: mov rax, rbx pop rbx pop r14 pop rbp retn
_BYTE * parts_copy_string(long long a1, unsigned __int16 a2, char a3, _BYTE *a4, int a5) { long long string; // rax *a4 = 0; if ( (a3 & 8) != 0 ) { string = engine_get_string(a1, a2, 0LL); if ( string ) { strncpy(a4, string, a5 - 2); a4[a5 - 1] = 0; } } return a4; }
parts_copy_string: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RCX MOV byte ptr [RCX],0x0 TEST DL,0x8 JZ 0x001082be MOV R14D,R8D MOVZX ESI,SI XOR EDX,EDX CALL 0x0010ffe1 TEST RAX,RAX JZ 0x001082be LEA ECX,[R14 + -0x2] MOVSXD RDX,ECX MOV RDI,RBX MOV RSI,RAX CALL 0x00106090 MOVSXD RAX,R14D MOV byte ptr [RBX + RAX*0x1 + -0x1],0x0 LAB_001082be: MOV RAX,RBX POP RBX POP R14 POP RBP RET
char * parts_copy_string(int8 param_1,int2 param_2,ulong param_3,char *param_4, int param_5) { char *__src; *param_4 = '\0'; if ((param_3 & 8) != 0) { __src = (char *)engine_get_string(param_1,param_2,0); if (__src != (char *)0x0) { strncpy(param_4,__src,(long)(param_5 + -2)); param_4[(long)param_5 + -1] = '\0'; } } return param_4; }
8,611
nglog::DoRawLog(char**, unsigned long*, char const*, ...)
ng-log[P]ng-log/src/raw_logging.cc
static bool DoRawLog(char** buf, size_t* size, const char* format, ...) { va_list ap; va_start(ap, format); int n = std::vsnprintf(*buf, *size, format, ap); va_end(ap); if (n < 0 || static_cast<size_t>(n) > *size) return false; *size -= static_cast<size_t>(n); *buf += n; return true; }
O1
cpp
nglog::DoRawLog(char**, unsigned long*, char const*, ...): pushq %r14 pushq %rbx subq $0xd8, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x20(%rsp), %rsi movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x1f5ff movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movq %rsp, %rcx movq %rsi, 0x10(%rcx) leaq 0xf0(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000018, %rax # imm = 0x3000000018 movq %rax, (%rcx) movq (%rdi), %rdi movq (%r14), %rsi callq 0x7300 testl %eax, %eax js 0x1f63e movl %eax, %eax movq (%r14), %rcx subq %rax, %rcx jb 0x1f63e movq %rcx, (%r14) addq %rax, (%rbx) addq $0xd8, %rsp popq %rbx popq %r14 retq
_ZN5nglogL8DoRawLogEPPcPmPKcz: push r14 push rbx sub rsp, 0D8h mov r14, rsi mov rbx, rdi lea rsi, [rsp+0E8h+var_C8] mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_1F5FF movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_88], xmm1 movaps [rsp+0E8h+var_78], xmm2 movaps [rsp+0E8h+var_68], xmm3 movaps [rsp+0E8h+var_58], xmm4 movaps [rsp+0E8h+var_48], xmm5 movaps [rsp+0E8h+var_38], xmm6 movaps [rsp+0E8h+var_28], xmm7 loc_1F5FF: mov rcx, rsp mov [rcx+10h], rsi lea rax, [rsp+0E8h+arg_0] mov [rcx+8], rax mov rax, 3000000018h mov [rcx], rax mov rdi, [rdi] mov rsi, [r14] call _vsnprintf test eax, eax js short loc_1F63E mov eax, eax mov rcx, [r14] sub rcx, rax jb short loc_1F63E mov [r14], rcx add [rbx], rax loc_1F63E: add rsp, 0D8h pop rbx pop r14 retn
long long nglog::DoRawLog( nglog *this, char **a2, unsigned long long *a3, const char *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { long long result; // rax _QWORD v16[4]; // [rsp+0h] [rbp-E8h] BYREF char v17; // [rsp+20h] [rbp-C8h] BYREF const char *v18; // [rsp+38h] [rbp-B0h] long long v19; // [rsp+40h] [rbp-A8h] long long v20; // [rsp+48h] [rbp-A0h] __m128 v21; // [rsp+50h] [rbp-98h] __m128 v22; // [rsp+60h] [rbp-88h] __m128 v23; // [rsp+70h] [rbp-78h] __m128 v24; // [rsp+80h] [rbp-68h] __m128 v25; // [rsp+90h] [rbp-58h] __m128 v26; // [rsp+A0h] [rbp-48h] __m128 v27; // [rsp+B0h] [rbp-38h] __m128 v28; // [rsp+C0h] [rbp-28h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v18 = a4; v19 = a5; v20 = a6; v16[2] = &v17; v16[1] = &a15; v16[0] = 0x3000000018LL; result = vsnprintf(*(_QWORD *)this, *a2, a3, v16); if ( (int)result >= 0 ) { result = (unsigned int)result; if ( (unsigned long long)*a2 >= (unsigned int)result ) { *a2 -= (unsigned int)result; *(_QWORD *)this += (unsigned int)result; } } return result; }
DoRawLog: PUSH R14 PUSH RBX SUB RSP,0xd8 MOV R14,RSI MOV RBX,RDI LEA RSI,[RSP + 0x20] MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0011f5ff MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_0011f5ff: MOV RCX,RSP MOV qword ptr [RCX + 0x10],RSI LEA RAX,[RSP + 0xf0] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000018 MOV qword ptr [RCX],RAX MOV RDI,qword ptr [RDI] MOV RSI,qword ptr [R14] CALL 0x00107300 TEST EAX,EAX JS 0x0011f63e MOV EAX,EAX MOV RCX,qword ptr [R14] SUB RCX,RAX JC 0x0011f63e MOV qword ptr [R14],RCX ADD qword ptr [RBX],RAX LAB_0011f63e: ADD RSP,0xd8 POP RBX POP R14 RET
/* nglog::DoRawLog(char**, unsigned long*, char const*, ...) */ void nglog::DoRawLog(char **param_1,ulong *param_2,char *param_3,...) { char in_AL; uint uVar1; ulong uVar2; int8 in_RCX; int8 in_R8; int8 in_R9; int8 in_XMM0_Qa; int8 in_XMM1_Qa; int8 in_XMM2_Qa; int8 in_XMM3_Qa; int8 in_XMM4_Qa; int8 in_XMM5_Qa; int8 in_XMM6_Qa; int8 in_XMM7_Qa; int8 local_e8; int1 *local_e0; int1 *local_d8; int1 local_c8 [24]; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; local_d8 = local_c8; if (in_AL != '\0') { local_98 = in_XMM0_Qa; local_88 = in_XMM1_Qa; local_78 = in_XMM2_Qa; local_68 = in_XMM3_Qa; local_58 = in_XMM4_Qa; local_48 = in_XMM5_Qa; local_38 = in_XMM6_Qa; local_28 = in_XMM7_Qa; } local_e0 = &stack0x00000008; local_e8 = 0x3000000018; local_b0 = in_RCX; local_a8 = in_R8; local_a0 = in_R9; uVar1 = vsnprintf(*param_1,*param_2,param_3,&local_e8); if (-1 < (int)uVar1) { uVar2 = (ulong)uVar1; if (uVar2 <= *param_2) { *param_2 = *param_2 - uVar2; *param_1 = *param_1 + uVar2; } } return; }
8,612
has_path
eloqsql/mysys/my_getwd.c
my_bool has_path(const char *name) { return MY_TEST(strchr(name, FN_LIBCHAR)) #if FN_LIBCHAR != '/' || MY_TEST(strchr(name, '/')) #endif #ifdef FN_DEVCHAR || MY_TEST(strchr(name, FN_DEVCHAR)) #endif ; }
O0
c
has_path: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movl $0x2f, %esi callq 0x24100 movq %rax, %rdx xorl %eax, %eax movl $0x1, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
has_path: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov esi, 2Fh ; '/' call _strchr mov rdx, rax xor eax, eax mov ecx, 1 cmp rdx, 0 cmovnz eax, ecx add rsp, 10h pop rbp retn
_BOOL8 has_path(long long a1) { return strchr(a1, 47LL) != 0; }
has_path: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x2f CALL 0x00124100 MOV RDX,RAX XOR EAX,EAX MOV ECX,0x1 CMP RDX,0x0 CMOVNZ EAX,ECX ADD RSP,0x10 POP RBP RET
bool has_path(char *param_1) { char *pcVar1; pcVar1 = strchr(param_1,0x2f); return pcVar1 != (char *)0x0; }
8,613
allocate_dynamic
eloqsql/mysys/array.c
my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) { DBUG_ENTER("allocate_dynamic"); if (max_elements >= array->max_element) { uint size; uchar *new_ptr; size= (max_elements + array->alloc_increment)/array->alloc_increment; size*= array->alloc_increment; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this senerio, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr= (uchar*) my_realloc(array->m_psi_key, array->buffer,size * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(TRUE); array->buffer= new_ptr; array->max_element= size; } DBUG_RETURN(FALSE); }
O0
c
allocate_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0x25875 movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx xorl %edx, %edx divl 0x10(%rcx) movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax imull -0x18(%rbp), %eax movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x2581e movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx orq $0x10, %rdx callq 0x2a4b0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x257e3 jmp 0x257da movb $0x0, -0x1(%rbp) jmp 0x2587b movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x24200 movq -0x10(%rbp), %rax movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF andq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) jmp 0x25860 movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movl -0x18(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x50, %rcx callq 0x2a680 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x2585e jmp 0x25858 movb $0x1, -0x1(%rbp) jmp 0x2587b jmp 0x25860 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xc(%rax) jmp 0x25877 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
allocate_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb loc_25875 mov eax, [rbp+var_14] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] xor edx, edx div dword ptr [rcx+10h] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov eax, [rax+10h] imul eax, [rbp+var_18] mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz short loc_2581E mov rax, [rbp+var_10] mov edi, [rax+18h] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov esi, eax mov rax, [rbp+var_10] mov rdx, [rax+20h] or rdx, 10h call my_malloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_257E3 jmp short $+2 loc_257DA: mov [rbp+var_1], 0 jmp loc_2587B loc_257E3: mov rdi, [rbp+var_20] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy mov rax, [rbp+var_10] mov rcx, 0FFFFFEFFh and rcx, [rax+20h] mov [rax+20h], rcx jmp short loc_25860 loc_2581E: mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax] mov eax, [rbp+var_18] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 50h call my_realloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_2585E jmp short $+2 loc_25858: mov [rbp+var_1], 1 jmp short loc_2587B loc_2585E: jmp short $+2 loc_25860: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], rcx mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+0Ch], ecx loc_25875: jmp short $+2 loc_25877: mov [rbp+var_1], 0 loc_2587B: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char allocate_dynamic(long long a1, unsigned int a2) { long long v3; // [rsp+0h] [rbp-20h] unsigned int v4; // [rsp+8h] [rbp-18h] if ( a2 < *(_DWORD *)(a1 + 12) ) return 0; v4 = (*(_DWORD *)(a1 + 16) + a2) / *(_DWORD *)(a1 + 16) * *(_DWORD *)(a1 + 16); if ( (*(_QWORD *)(a1 + 32) & 0x100LL) == 0 ) { v3 = my_realloc(*(unsigned int *)(a1 + 24), *(_QWORD *)a1, *(_DWORD *)(a1 + 20) * v4, *(_QWORD *)(a1 + 32) | 0x50LL); if ( !v3 ) return 1; goto LABEL_8; } v3 = my_malloc(*(unsigned int *)(a1 + 24), *(_DWORD *)(a1 + 20) * v4, *(_QWORD *)(a1 + 32) | 0x10LL); if ( v3 ) { memcpy(v3, *(_QWORD *)a1, (unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8))); *(_QWORD *)(a1 + 32) &= 0xFFFFFEFFuLL; LABEL_8: *(_QWORD *)a1 = v3; *(_DWORD *)(a1 + 12) = v4; return 0; } return 0; }
allocate_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x00125875 MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] XOR EDX,EDX DIV dword ptr [RCX + 0x10] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] IMUL EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x0012581e MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] OR RDX,0x10 CALL 0x0012a4b0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001257e3 JMP 0x001257da LAB_001257da: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012587b LAB_001257e3: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x00124200 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xfffffeff AND RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX JMP 0x00125860 LAB_0012581e: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x50 CALL 0x0012a680 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0012585e JMP 0x00125858 LAB_00125858: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012587b LAB_0012585e: JMP 0x00125860 LAB_00125860: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xc],ECX LAB_00125875: JMP 0x00125877 LAB_00125877: MOV byte ptr [RBP + -0x1],0x0 LAB_0012587b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 allocate_dynamic(int8 *param_1,uint param_2) { int iVar1; void *local_28; if (*(uint *)((long)param_1 + 0xc) <= param_2) { iVar1 = *(int *)(param_1 + 2) * ((param_2 + *(int *)(param_1 + 2)) / *(uint *)(param_1 + 2)); if ((param_1[4] & 0x100) == 0) { local_28 = (void *)my_realloc(*(int4 *)(param_1 + 3),*param_1, iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)my_malloc(*(int4 *)(param_1 + 3), iVar1 * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10); if (local_28 == (void *)0x0) { return 0; } memcpy(local_28,(void *)*param_1, (ulong)(uint)(*(int *)(param_1 + 1) * *(int *)((long)param_1 + 0x14))); param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = local_28; *(int *)((long)param_1 + 0xc) = iVar1; } return 0; }
8,614
google::protobuf::FieldDescriptorProto::InternalSwap(google::protobuf::FieldDescriptorProto*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
void FieldDescriptorProto::InternalSwap(FieldDescriptorProto* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.extendee_, lhs_arena, &other->_impl_.extendee_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.type_name_, lhs_arena, &other->_impl_.type_name_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.default_value_, lhs_arena, &other->_impl_.default_value_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.json_name_, lhs_arena, &other->_impl_.json_name_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.proto3_optional_) + sizeof(FieldDescriptorProto::_impl_.proto3_optional_) - PROTOBUF_FIELD_OFFSET(FieldDescriptorProto, _impl_.options_)>( reinterpret_cast<char*>(&_impl_.options_), reinterpret_cast<char*>(&other->_impl_.options_)); swap(_impl_.label_, other->_impl_.label_); swap(_impl_.type_, other->_impl_.type_); }
O0
cpp
google::protobuf::FieldDescriptorProto::InternalSwap(google::protobuf::FieldDescriptorProto*): subq $0xf8, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rdi movq %rdi, (%rsp) callq 0x80180 movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rdi callq 0x80180 movq (%rsp), %rcx movq %rax, 0x8(%rsp) addq $0x8, %rcx movq 0x18(%rsp), %rax addq $0x8, %rax movq %rcx, 0x30(%rsp) movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0xde020 movq (%rsp), %rax addq $0x10, %rax movq %rax, 0x50(%rsp) movl $0x0, 0x4c(%rsp) movq 0x50(%rsp), %rdi movslq 0x4c(%rsp), %rax shlq $0x2, %rax addq %rax, %rdi movq 0x18(%rsp), %rax addq $0x10, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rsi movslq 0x3c(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi callq 0xd5790 movq (%rsp), %rsi addq $0x10, %rsi addq $0x8, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x8, %rcx movq 0x8(%rsp), %rax movq %rsi, 0xf0(%rsp) movq %rdx, 0xe8(%rsp) movq %rcx, 0xe0(%rsp) movq %rax, 0xd8(%rsp) movq 0xe0(%rsp), %rdi movq 0xf0(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x10, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x10, %rcx movq 0x8(%rsp), %rax movq %rsi, 0xd0(%rsp) movq %rdx, 0xc8(%rsp) movq %rcx, 0xc0(%rsp) movq %rax, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq 0xd0(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x18, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x18, %rcx movq 0x8(%rsp), %rax movq %rsi, 0xb0(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0xa0(%rsp) movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x20, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x90(%rsp) movq %rdx, 0x88(%rsp) movq %rcx, 0x80(%rsp) movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x28, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x28, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x70(%rsp) movq %rdx, 0x68(%rsp) movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0xde4b0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x30, %rdi movq 0x18(%rsp), %rsi addq $0x10, %rsi addq $0x30, %rsi callq 0xd7580 movq (%rsp), %rdi addq $0x10, %rdi addq $0x44, %rdi movq 0x18(%rsp), %rsi addq $0x10, %rsi addq $0x44, %rsi callq 0xd75c0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x48, %rdi movq 0x18(%rsp), %rsi addq $0x10, %rsi addq $0x48, %rsi callq 0xd75c0 addq $0xf8, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf20FieldDescriptorProto12InternalSwapEPS1_: sub rsp, 0F8h mov [rsp+0F8h+var_D8], rdi mov [rsp+0F8h+var_E0], rsi mov rdi, [rsp+0F8h+var_D8]; this mov [rsp+0F8h+var_F8], rdi call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov [rsp+0F8h+var_E8], rax mov rdi, [rsp+0F8h+var_E0]; this call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov rcx, [rsp+0F8h+var_F8] mov [rsp+0F8h+var_F0], rax add rcx, 8 mov rax, [rsp+0F8h+var_E0] add rax, 8 mov [rsp+0F8h+var_C8], rcx mov [rsp+0F8h+var_D0], rax mov rdi, [rsp+0F8h+var_C8] mov rsi, [rsp+0F8h+var_D0] call _ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rax, [rsp+0F8h+var_F8] add rax, 10h mov [rsp+0F8h+var_A8], rax mov [rsp+0F8h+var_AC], 0 mov rdi, [rsp+0F8h+var_A8] movsxd rax, [rsp+0F8h+var_AC] shl rax, 2 add rdi, rax mov rax, [rsp+0F8h+var_E0] add rax, 10h mov [rsp+0F8h+var_B8], rax mov [rsp+0F8h+var_BC], 0 mov rsi, [rsp+0F8h+var_B8] movsxd rax, [rsp+0F8h+var_BC] 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 rsi, [rsp+0F8h+var_F8] add rsi, 10h add rsi, 8 mov rdx, [rsp+0F8h+var_E8] mov rcx, [rsp+0F8h+var_E0] add rcx, 10h add rcx, 8 mov rax, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_8], rsi mov [rsp+0F8h+var_10], rdx mov [rsp+0F8h+var_18], rcx mov [rsp+0F8h+var_20], rax mov rdi, [rsp+0F8h+var_18] mov rsi, [rsp+0F8h+var_8] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0F8h+var_F8] add rsi, 10h add rsi, 10h mov rdx, [rsp+0F8h+var_E8] mov rcx, [rsp+0F8h+var_E0] add rcx, 10h add rcx, 10h mov rax, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_28], rsi mov [rsp+0F8h+var_30], rdx mov [rsp+0F8h+var_38], rcx mov [rsp+0F8h+var_40], rax mov rdi, [rsp+0F8h+var_38] mov rsi, [rsp+0F8h+var_28] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0F8h+var_F8] add rsi, 10h add rsi, 18h mov rdx, [rsp+0F8h+var_E8] mov rcx, [rsp+0F8h+var_E0] add rcx, 10h add rcx, 18h mov rax, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_48], rsi mov [rsp+0F8h+var_50], rdx mov [rsp+0F8h+var_58], rcx mov [rsp+0F8h+var_60], rax mov rdi, [rsp+0F8h+var_58] mov rsi, [rsp+0F8h+var_48] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0F8h+var_F8] add rsi, 10h add rsi, 20h ; ' ' mov rdx, [rsp+0F8h+var_E8] mov rcx, [rsp+0F8h+var_E0] add rcx, 10h add rcx, 20h ; ' ' mov rax, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_68], rsi mov [rsp+0F8h+var_70], rdx mov [rsp+0F8h+var_78], rcx mov [rsp+0F8h+var_80], rax mov rdi, [rsp+0F8h+var_78] mov rsi, [rsp+0F8h+var_68] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0F8h+var_F8] add rsi, 10h add rsi, 28h ; '(' mov rdx, [rsp+0F8h+var_E8] mov rcx, [rsp+0F8h+var_E0] add rcx, 10h add rcx, 28h ; '(' mov rax, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_88], rsi mov [rsp+0F8h+var_90], rdx mov [rsp+0F8h+var_98], rcx mov [rsp+0F8h+var_A0], rax mov rdi, [rsp+0F8h+var_98] mov rsi, [rsp+0F8h+var_88] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rdi, [rsp+0F8h+var_F8] add rdi, 10h add rdi, 30h ; '0' mov rsi, [rsp+0F8h+var_E0] add rsi, 10h add rsi, 30h ; '0' call _ZN6google8protobuf8internal7memswapILi17EEENSt9enable_ifIXaageT_Lm16EltT_lsLj1ELi31EEvE4typeEPcS6_; google::protobuf::internal::memswap<17>(char *,char *) mov rdi, [rsp+0F8h+var_F8] add rdi, 10h add rdi, 44h ; 'D' mov rsi, [rsp+0F8h+var_E0] add rsi, 10h add rsi, 44h ; 'D' call _ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rdi, [rsp+0F8h+var_F8] add rdi, 10h add rdi, 48h ; 'H' mov rsi, [rsp+0F8h+var_E0] add rsi, 10h add rsi, 48h ; 'H' call _ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ add rsp, 0F8h retn
long long google::protobuf::FieldDescriptorProto::InternalSwap( google::protobuf::FieldDescriptorProto *this, google::protobuf::FieldDescriptorProto *a2) { google::protobuf::MessageLite::GetArenaForAllocation(this); google::protobuf::MessageLite::GetArenaForAllocation(a2); std::swap<long>((char *)this + 8, (char *)a2 + 8); std::swap<unsigned int>((char *)this + 16, (char *)a2 + 16); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 24, (char *)this + 24); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 32, (char *)this + 32); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 40, (char *)this + 40); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 48, (char *)this + 48); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 56, (char *)this + 56); google::protobuf::internal::memswap<17>((char *)this + 64, (char *)a2 + 64); std::swap<int>((char *)this + 84, (char *)a2 + 84); return std::swap<int>((char *)this + 88, (char *)a2 + 88); }
InternalSwap: SUB RSP,0xf8 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RDI CALL 0x00180180 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x00180180 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001de020 MOV RAX,qword ptr [RSP] ADD RAX,0x10 MOV qword ptr [RSP + 0x50],RAX MOV dword ptr [RSP + 0x4c],0x0 MOV RDI,qword ptr [RSP + 0x50] MOVSXD RAX,dword ptr [RSP + 0x4c] SHL RAX,0x2 ADD RDI,RAX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x3c],0x0 MOV RSI,qword ptr [RSP + 0x40] MOVSXD RAX,dword ptr [RSP + 0x3c] SHL RAX,0x2 ADD RSI,RAX CALL 0x001d5790 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x8 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xf0],RSI MOV qword ptr [RSP + 0xe8],RDX MOV qword ptr [RSP + 0xe0],RCX MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xf0] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x10 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x10 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xd0],RSI MOV qword ptr [RSP + 0xc8],RDX MOV qword ptr [RSP + 0xc0],RCX MOV qword ptr [RSP + 0xb8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xd0] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x18 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x18 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xb0],RSI MOV qword ptr [RSP + 0xa8],RDX MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x20 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x20 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x90],RSI MOV qword ptr [RSP + 0x88],RDX MOV qword ptr [RSP + 0x80],RCX MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x90] CALL 0x001de4b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x28 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x28 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RSI MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x70] CALL 0x001de4b0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x30 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x10 ADD RSI,0x30 CALL 0x001d7580 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x44 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x10 ADD RSI,0x44 CALL 0x001d75c0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x48 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x10 ADD RSI,0x48 CALL 0x001d75c0 ADD RSP,0xf8 RET
/* google::protobuf::FieldDescriptorProto::InternalSwap(google::protobuf::FieldDescriptorProto*) */ void __thiscall google::protobuf::FieldDescriptorProto::InternalSwap (FieldDescriptorProto *this,FieldDescriptorProto *param_1) { MessageLite::GetArenaForAllocation((MessageLite *)this); MessageLite::GetArenaForAllocation((MessageLite *)param_1); std::swap<long>((long *)(this + 8),(long *)(param_1 + 8)); std::swap<unsigned_int>((uint *)(this + 0x10),(uint *)(param_1 + 0x10)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x18),(TaggedStringPtr *)(this + 0x18)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x20),(TaggedStringPtr *)(this + 0x20)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x28),(TaggedStringPtr *)(this + 0x28)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x30),(TaggedStringPtr *)(this + 0x30)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x38),(TaggedStringPtr *)(this + 0x38)); std::enable_if<((17)>=(16ul))&&((17)<((1u)<<(31))),void>::type_google::protobuf::internal:: memswap<17>((char *)(this + 0x40),(char *)(param_1 + 0x40)); std::swap<int>((int *)(this + 0x54),(int *)(param_1 + 0x54)); std::swap<int>((int *)(this + 0x58),(int *)(param_1 + 0x58)); return; }
8,615
get_rowpos_in_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_rowpos_in_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, uint rownr, struct st_row_pos_info *res) { MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; uchar *dir; uint block_size= share->block_size; uint max_entry, max_length, rec_offset; DBUG_ENTER("get_rowpos_in_head_or_tail_page"); if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 0); res->empty_space= block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE; } else { page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) /* Read error */ { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (uchar) page_type); if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != (uchar) page_type) goto err; res->empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET); } max_entry= (uint) buff[DIR_COUNT_OFFSET]; if (max_entry <= rownr) { if (extend_directory(info, buff, block_size, max_entry, rownr, &res->empty_space, page_type == HEAD_PAGE)) goto err; } /* The following dir entry is unused in case of insert / update but not in case of undo_update / undo_delete */ dir= dir_entry_pos(buff, block_size, rownr); if (extend_area_on_page(info, buff, dir, rownr, length, &res->empty_space, &rec_offset, &max_length, page_type == HEAD_PAGE)) goto err; res->buff= buff; res->rownr= rownr; res->dir= dir; res->data= buff + rec_offset; res->length= length; DBUG_RETURN(0); err: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_rowpos_in_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, -0x40(%rbp) movl %ecx, -0x2c(%rbp) movq %rdi, %r14 movq (%rdi), %rbx movl 0x7bc(%rbx), %r12d cmpb $0x0, 0x15(%rsi) je 0x4dbc8 movl %r8d, -0x30(%rbp) leaq -0x60(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rbx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movl 0x7d4(%rbx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x70b16 addq $0x10, %rsp movq %rax, %r13 testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0x96aa2 cmpb $0x0, 0x10(%r15) je 0x4dc8e movb 0x7(%r13), %al andb $0x7, %al movl -0x30(%rbp), %r8d cmpb %r8b, %al movq -0x40(%rbp), %rbx jne 0x4dc84 movzwl 0xa(%r13), %eax jmp 0x4dbf3 movq %rdx, %r13 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx xorl %ecx, %ecx movl %r8d, %r15d callq 0x4beb2 movl %r15d, %r8d movl 0xc18(%rbx), %ecx movl %r12d, %eax subl %ecx, %eax addl $-0x10, %eax movq -0x40(%rbp), %rbx movq 0x10(%rbp), %r15 movl %eax, 0x20(%r15) movzbl 0x8(%r13), %ecx cmpl %ebx, %ecx ja 0x4dc39 leaq 0x20(%r15), %r9 xorl %eax, %eax cmpl $0x1, %r8d sete %al subq $0x8, %rsp movq %r14, %rdi movq %r13, %rsi movl %r12d, %edx movl %r8d, %r15d movl %ebx, %r8d pushq %rax callq 0x4bf48 movl %r15d, %r8d movq 0x10(%rbp), %r15 addq $0x10, %rsp testb %al, %al jne 0x4dc84 addq %r13, %r12 leal (,%rbx,4), %eax subq %rax, %r12 addq $-0x8, %r12 leaq 0x20(%r15), %r9 xorl %eax, %eax cmpl $0x1, %r8d sete %al subq $0x8, %rsp leaq -0x44(%rbp), %r10 leaq -0x34(%rbp), %r11 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %ebx, %ecx movl -0x2c(%rbp), %r8d pushq %rax pushq %r10 pushq %r11 callq 0x4c0be addq $0x20, %rsp testb %al, %al je 0x4dcae movq %r14, %rdi movl $0x7f, %esi jmp 0x4dc98 callq 0xa8ec2 movl (%rax), %esi movq %r14, %rdi callq 0x39354 movb $0x1, %al addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, (%r15) movl %ebx, 0x1c(%r15) movq %r12, 0x10(%r15) movl -0x34(%rbp), %eax addq %r13, %rax movq %rax, 0x8(%r15) movl -0x2c(%rbp), %eax movl %eax, 0x18(%r15) xorl %eax, %eax jmp 0x4dc9f
get_rowpos_in_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_40], r9 mov [rbp+var_2C], ecx mov r14, rdi mov rbx, [rdi] mov r12d, [rbx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_4DBC8 mov [rbp+var_30], r8d lea r15, [rbp+var_60] mov dword ptr [r15+8], 6 mov rdi, [rbx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov r9d, [rbx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov r13, rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_4DC8E mov al, [r13+7] and al, 7 mov r8d, [rbp+var_30] cmp al, r8b mov rbx, [rbp+var_40] jnz loc_4DC84 movzx eax, word ptr [r13+0Ah] jmp short loc_4DBF3 loc_4DBC8: mov r13, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d xor ecx, ecx mov r15d, r8d call make_empty_page mov r8d, r15d mov ecx, [rbx+0C18h] mov eax, r12d sub eax, ecx add eax, 0FFFFFFF0h mov rbx, [rbp+var_40] loc_4DBF3: mov r15, [rbp+arg_0] mov [r15+20h], eax movzx ecx, byte ptr [r13+8] cmp ecx, ebx ja short loc_4DC39 lea r9, [r15+20h] xor eax, eax cmp r8d, 1 setz al sub rsp, 8 mov rdi, r14 mov rsi, r13 mov edx, r12d mov r15d, r8d mov r8d, ebx push rax call extend_directory mov r8d, r15d mov r15, [rbp+arg_0] add rsp, 10h test al, al jnz short loc_4DC84 loc_4DC39: add r12, r13 lea eax, ds:0[rbx*4] sub r12, rax add r12, 0FFFFFFFFFFFFFFF8h lea r9, [r15+20h] xor eax, eax cmp r8d, 1 setz al sub rsp, 8 lea r10, [rbp+var_44] lea r11, [rbp+var_34] mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, ebx mov r8d, [rbp+var_2C] push rax push r10 push r11 call extend_area_on_page add rsp, 20h test al, al jz short loc_4DCAE loc_4DC84: mov rdi, r14 mov esi, 7Fh jmp short loc_4DC98 loc_4DC8E: call _my_thread_var mov esi, [rax] mov rdi, r14 loc_4DC98: call _ma_set_fatal_error mov al, 1 loc_4DC9F: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DCAE: mov [r15], r13 mov [r15+1Ch], ebx mov [r15+10h], r12 mov eax, [rbp+var_34] add rax, r13 mov [r15+8], rax mov eax, [rbp+var_2C] mov [r15+18h], eax xor eax, eax jmp short loc_4DC9F
char get_rowpos_in_head_or_tail_page( long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6, long long a7) { long long v8; // rbx long long v9; // r12 long long v10; // r13 long long *v11; // rdi long long v12; // rdx long long v13; // rcx int v14; // r9d long long v15; // r8 unsigned int v16; // ebx int v17; // eax long long v19; // r15 unsigned int v20; // ecx unsigned int v21; // r15d char v22; // al unsigned __int16 *v23; // r12 long long *v24; // rdi int v25; // esi _BYTE v27[8]; // [rsp+0h] [rbp-60h] BYREF int v28; // [rsp+8h] [rbp-58h] bool v29; // [rsp+10h] [rbp-50h] int v30; // [rsp+1Ch] [rbp-44h] BYREF long long v31; // [rsp+20h] [rbp-40h] unsigned int v32; // [rsp+2Ch] [rbp-34h] BYREF unsigned int v33; // [rsp+30h] [rbp-30h] unsigned int v34; // [rsp+34h] [rbp-2Ch] v31 = a6; v34 = a4; v8 = *a1; v9 = *(unsigned int *)(*a1 + 1980); if ( *(_BYTE *)(a2 + 21) ) { v33 = a5; v28 = 6; v10 = pagecache_read( *(_QWORD *)(v8 + 1536), (int)a1 + 1136, *(_QWORD *)a2, 0, 0, *(_DWORD *)(v8 + 2004), 4, (long long)v27); v29 = v10 != 0; v11 = a1 + 93; insert_dynamic(a1 + 93, v27); if ( !v29 ) { v25 = *(_DWORD *)my_thread_var(v11); v24 = a1; goto LABEL_11; } v15 = v33; v16 = v31; if ( (*(_BYTE *)(v10 + 7) & 7) != (_BYTE)v33 ) { LABEL_9: v24 = a1; v25 = 127; LABEL_11: ma_set_fatal_error(v24, v25, v12, v13, v15, v14); return 1; } v17 = *(unsigned __int16 *)(v10 + 10); } else { v10 = (long long)a3; make_empty_page((long long)a1, a3, a5, 0); LODWORD(v15) = a5; v17 = v9 - *(_DWORD *)(v8 + 3096) - 16; v16 = v31; } v19 = a7; *(_DWORD *)(a7 + 32) = v17; v20 = *(unsigned __int8 *)(v10 + 8); if ( v20 <= v16 ) { v21 = v15; v22 = extend_directory(a1, v10, v9, v20, v16, (unsigned int *)(a7 + 32), (_DWORD)v15 == 1); v15 = v21; v19 = a7; if ( v22 ) goto LABEL_9; } v23 = (unsigned __int16 *)(v10 + v9 - 4 * v16 - 8); if ( extend_area_on_page((long long)a1, v10, v23, v16, v34, (_DWORD *)(v19 + 32), &v32, &v30, (_DWORD)v15 == 1) ) goto LABEL_9; *(_QWORD *)v19 = v10; *(_DWORD *)(v19 + 28) = v16; *(_QWORD *)(v19 + 16) = v23; *(_QWORD *)(v19 + 8) = v10 + v32; *(_DWORD *)(v19 + 24) = v34; return 0; }
get_rowpos_in_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x40],R9 MOV dword ptr [RBP + -0x2c],ECX MOV R14,RDI MOV RBX,qword ptr [RDI] MOV R12D,dword ptr [RBX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x0014dbc8 MOV dword ptr [RBP + -0x30],R8D LEA R15,[RBP + -0x60] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RBX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV R9D,dword ptr [RBX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x00170b16 ADD RSP,0x10 MOV R13,RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x00196aa2 CMP byte ptr [R15 + 0x10],0x0 JZ 0x0014dc8e MOV AL,byte ptr [R13 + 0x7] AND AL,0x7 MOV R8D,dword ptr [RBP + -0x30] CMP AL,R8B MOV RBX,qword ptr [RBP + -0x40] JNZ 0x0014dc84 MOVZX EAX,word ptr [R13 + 0xa] JMP 0x0014dbf3 LAB_0014dbc8: MOV R13,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D XOR ECX,ECX MOV R15D,R8D CALL 0x0014beb2 MOV R8D,R15D MOV ECX,dword ptr [RBX + 0xc18] MOV EAX,R12D SUB EAX,ECX ADD EAX,-0x10 MOV RBX,qword ptr [RBP + -0x40] LAB_0014dbf3: MOV R15,qword ptr [RBP + 0x10] MOV dword ptr [R15 + 0x20],EAX MOVZX ECX,byte ptr [R13 + 0x8] CMP ECX,EBX JA 0x0014dc39 LEA R9,[R15 + 0x20] XOR EAX,EAX CMP R8D,0x1 SETZ AL SUB RSP,0x8 MOV RDI,R14 MOV RSI,R13 MOV EDX,R12D MOV R15D,R8D MOV R8D,EBX PUSH RAX CALL 0x0014bf48 MOV R8D,R15D MOV R15,qword ptr [RBP + 0x10] ADD RSP,0x10 TEST AL,AL JNZ 0x0014dc84 LAB_0014dc39: ADD R12,R13 LEA EAX,[RBX*0x4] SUB R12,RAX ADD R12,-0x8 LEA R9,[R15 + 0x20] XOR EAX,EAX CMP R8D,0x1 SETZ AL SUB RSP,0x8 LEA R10,[RBP + -0x44] LEA R11,[RBP + -0x34] MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV ECX,EBX MOV R8D,dword ptr [RBP + -0x2c] PUSH RAX PUSH R10 PUSH R11 CALL 0x0014c0be ADD RSP,0x20 TEST AL,AL JZ 0x0014dcae LAB_0014dc84: MOV RDI,R14 MOV ESI,0x7f JMP 0x0014dc98 LAB_0014dc8e: CALL 0x001a8ec2 MOV ESI,dword ptr [RAX] MOV RDI,R14 LAB_0014dc98: CALL 0x00139354 MOV AL,0x1 LAB_0014dc9f: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014dcae: MOV qword ptr [R15],R13 MOV dword ptr [R15 + 0x1c],EBX MOV qword ptr [R15 + 0x10],R12 MOV EAX,dword ptr [RBP + -0x34] ADD RAX,R13 MOV qword ptr [R15 + 0x8],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [R15 + 0x18],EAX XOR EAX,EAX JMP 0x0014dc9f
int8 get_rowpos_in_head_or_tail_page (long *param_1,int8 *param_2,long param_3,int4 param_4,int param_5, ulong param_6,long *param_7) { uint uVar1; ulong uVar2; char cVar3; uint uVar4; int4 *puVar5; int4 uVar6; long lVar7; int1 local_68 [8]; int4 local_60; char local_58; int1 local_4c [4]; ulong local_48; uint local_3c; int local_38; int4 local_34; lVar7 = *param_1; uVar1 = *(uint *)(lVar7 + 0x7bc); local_48 = param_6; local_34 = param_4; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,0); uVar4 = (uVar1 - *(int *)(lVar7 + 0xc18)) - 0x10; LAB_0014dbf3: uVar2 = local_48; *(uint *)(param_7 + 4) = uVar4; uVar4 = (uint)local_48; if ((uVar4 < *(byte *)(param_3 + 8)) || (cVar3 = extend_directory(param_1,param_3,(ulong)uVar1,*(byte *)(param_3 + 8), local_48 & 0xffffffff,param_7 + 4,param_5 == 1), cVar3 == '\0')) { lVar7 = (((ulong)uVar1 + param_3) - (ulong)(uVar4 * 4)) + -8; cVar3 = extend_area_on_page(param_1,param_3,lVar7,uVar2 & 0xffffffff,local_34,param_7 + 4, &local_3c,local_4c,param_5 == 1); if (cVar3 == '\0') { *param_7 = param_3; *(uint *)((long)param_7 + 0x1c) = uVar4; param_7[2] = lVar7; param_7[1] = (ulong)local_3c + param_3; *(int4 *)(param_7 + 3) = local_34; return 0; } } } else { local_60 = 6; local_38 = param_5; param_3 = pagecache_read(*(int8 *)(lVar7 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar7 + 0x7d4),4,local_68); local_58 = param_3 != 0; insert_dynamic(param_1 + 0x5d,local_68); if (local_58 == '\0') { puVar5 = (int4 *)_my_thread_var(); uVar6 = *puVar5; goto LAB_0014dc98; } if ((*(byte *)(param_3 + 7) & 7) == (byte)local_38) { uVar4 = (uint)*(ushort *)(param_3 + 10); param_5 = local_38; goto LAB_0014dbf3; } } uVar6 = 0x7f; LAB_0014dc98: _ma_set_fatal_error(param_1,uVar6); return 1; }
8,616
check_mb_utf16
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf16(const char *start, const char *end) { if (start + 2 > end) { return 0; } if (UTF16_HIGH_HEAD(*start)) { return (start + 4 <= end) && UTF16_LOW_HEAD(start[2]) ? 4 : 0; } if (UTF16_LOW_HEAD(*start)) { return 0; } return 2; }
O0
c
check_mb_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0x43c13 movl $0x0, -0x4(%rbp) jmp 0x43c89 movq -0x10(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xd8, %eax jne 0x43c66 movq -0x10(%rbp), %rcx addq $0x4, %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x19(%rbp) ja 0x43c51 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax sete %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %dl xorl %eax, %eax movl $0x4, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0x43c89 movq -0x10(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax jne 0x43c82 movl $0x0, -0x4(%rbp) jmp 0x43c89 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
check_mb_utf16: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_43C13 mov [rbp+var_4], 0 jmp short loc_43C89 loc_43C13: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0D8h jnz short loc_43C66 mov rcx, [rbp+var_10] add rcx, 4 xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_19], al ja short loc_43C51 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] and eax, 0FCh cmp eax, 0DCh setz al mov [rbp+var_19], al loc_43C51: mov dl, [rbp+var_19] xor eax, eax mov ecx, 4 test dl, 1 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_43C89 loc_43C66: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0DCh jnz short loc_43C82 mov [rbp+var_4], 0 jmp short loc_43C89 loc_43C82: mov [rbp+var_4], 2 loc_43C89: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_utf16(_BYTE *a1, unsigned long long a2) { unsigned int v2; // eax bool v4; // [rsp+1h] [rbp-19h] if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (*a1 & 0xFC) == 0xD8 ) { v4 = 0; if ( (unsigned long long)(a1 + 4) <= a2 ) v4 = (a1[2] & 0xFC) == 220; v2 = 0; if ( v4 ) return 4; return v2; } else if ( (*a1 & 0xFC) == 0xDC ) { return 0; } else { return 2; } } else { return 0; } }
check_mb_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x00143c13 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00143c89 LAB_00143c13: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xd8 JNZ 0x00143c66 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x4 XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x19],AL JA 0x00143c51 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0xfc CMP EAX,0xdc SETZ AL MOV byte ptr [RBP + -0x19],AL LAB_00143c51: MOV DL,byte ptr [RBP + -0x19] XOR EAX,EAX MOV ECX,0x4 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x00143c89 LAB_00143c66: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xdc JNZ 0x00143c82 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00143c89 LAB_00143c82: MOV dword ptr [RBP + -0x4],0x2 LAB_00143c89: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_utf16(byte *param_1,byte *param_2) { bool bVar1; int4 local_c; if (param_2 < param_1 + 2) { local_c = 0; } else if ((*param_1 & 0xfc) == 0xd8) { bVar1 = false; if (param_1 + 4 <= param_2) { bVar1 = (param_1[2] & 0xfc) == 0xdc; } local_c = 0; if (bVar1) { local_c = 4; } } else if ((*param_1 & 0xfc) == 0xdc) { local_c = 0; } else { local_c = 2; } return local_c; }
8,617
stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)
SDL3Lite/dependencies/stb_image.h
static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) { memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order ri->num_channels = 0; // test the formats with a very explicit header first (at least a FOURCC // or distinctive magic number first) #ifndef STBI_NO_PNG if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_BMP if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_GIF if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PSD if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); #else STBI_NOTUSED(bpc); #endif #ifndef STBI_NO_PIC if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); #endif // then the formats that can end up attempting to load with just 1 or 2 // bytes matching expectations; these are prone to false positives, so // try them later #ifndef STBI_NO_JPEG if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PNM if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_HDR if (stbi__hdr_test(s)) { float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); } #endif #ifndef STBI_NO_TGA // test tga last because it's a crappy test! if (stbi__tga_test(s)) return stbi__tga_load(s,x,y,comp,req_comp, ri); #endif return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); }
O0
c
stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rdi xorl %esi, %esi movl $0xc, %edx callq 0x214a0 movq -0x38(%rbp), %rax movl $0x8, (%rax) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x38(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x10(%rbp), %rdi callq 0x307c0 cmpl $0x0, %eax je 0x30554 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movl -0x2c(%rbp), %r8d movq -0x38(%rbp), %r9 callq 0x307f0 movq %rax, -0x8(%rbp) jmp 0x3056f leaq 0xb1b1(%rip), %rdi # 0x3b70c callq 0x2f390 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx cmovneq %rax, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZL15stbi__load_mainP13stbi__contextPiS1_S1_iP17stbi__result_infoi: push rbp mov rbp, rsp sub rsp, 40h mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 mov rdi, [rbp+var_38] xor esi, esi mov edx, 0Ch call _memset mov rax, [rbp+var_38] mov dword ptr [rax], 8 mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 mov rax, [rbp+var_38] mov dword ptr [rax+4], 0 mov rdi, [rbp+var_10] call _ZL14stbi__bmp_testP13stbi__context; stbi__bmp_test(stbi__context *) cmp eax, 0 jz short loc_30554 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8d, [rbp+var_2C] mov r9, [rbp+var_38] call _ZL14stbi__bmp_loadP13stbi__contextPiS1_S1_iP17stbi__result_info; stbi__bmp_load(stbi__context *,int *,int *,int *,int,stbi__result_info *) mov [rbp+var_8], rax jmp short loc_3056F loc_30554: lea rdi, aUnknownImageTy; "unknown image type" call _ZL9stbi__errPKc; stbi__err(char const*) mov ecx, eax xor eax, eax cmp ecx, 0 cmovnz rax, rax mov [rbp+var_8], rax loc_3056F: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long stbi__load_main(long long a1, long long a2, long long a3, long long a4, unsigned int a5, _DWORD *a6) { memset(a6, 0LL, 12LL); *a6 = 8; a6[2] = 0; a6[1] = 0; if ( (unsigned int)stbi__bmp_test(a1) ) return stbi__bmp_load(a1, a2, a3, a4, a5, a6); stbi__err("unknown image type"); return 0LL; }
stbi__load_main: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV EAX,dword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x38],R9 MOV RDI,qword ptr [RBP + -0x38] XOR ESI,ESI MOV EDX,0xc CALL 0x001214a0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x8 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001307c0 CMP EAX,0x0 JZ 0x00130554 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RBP + -0x2c] MOV R9,qword ptr [RBP + -0x38] CALL 0x001307f0 MOV qword ptr [RBP + -0x8],RAX JMP 0x0013056f LAB_00130554: LEA RDI,[0x13b70c] CALL 0x0012f390 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 CMOVNZ RAX,RAX MOV qword ptr [RBP + -0x8],RAX LAB_0013056f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
/* stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int) */ int8 stbi__load_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5, stbi__result_info *param_6,int param_7) { int iVar1; int8 local_10; memset(param_6,0,0xc); *(int4 *)param_6 = 8; *(int4 *)(param_6 + 8) = 0; *(int4 *)(param_6 + 4) = 0; iVar1 = stbi__bmp_test(param_1); if (iVar1 == 0) { stbi__err("unknown image type"); local_10 = 0; } else { local_10 = stbi__bmp_load(param_1,param_2,param_3,param_4,param_5,param_6); } return local_10; }
8,618
stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)
SDL3Lite/dependencies/stb_image.h
static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) { memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order ri->num_channels = 0; // test the formats with a very explicit header first (at least a FOURCC // or distinctive magic number first) #ifndef STBI_NO_PNG if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_BMP if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_GIF if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PSD if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); #else STBI_NOTUSED(bpc); #endif #ifndef STBI_NO_PIC if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); #endif // then the formats that can end up attempting to load with just 1 or 2 // bytes matching expectations; these are prone to false positives, so // try them later #ifndef STBI_NO_JPEG if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_PNM if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); #endif #ifndef STBI_NO_HDR if (stbi__hdr_test(s)) { float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); } #endif #ifndef STBI_NO_TGA // test tga last because it's a crappy test! if (stbi__tga_test(s)) return stbi__tga_load(s,x,y,comp,req_comp, ri); #endif return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); }
O3
c
stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int): subq $0x38, %rsp movl 0x40(%rsp), %eax movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movl %r8d, 0xc(%rsp) movq %r9, (%rsp) movq (%rsp), %rdi xorl %esi, %esi movl $0xc, %edx callq 0x214a0 movq (%rsp), %rax movl $0x8, (%rax) movq (%rsp), %rax movl $0x0, 0x8(%rax) movq (%rsp), %rax movl $0x0, 0x4(%rax) movq 0x28(%rsp), %rdi callq 0x30c60 cmpl $0x0, %eax je 0x309dd movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rcx movl 0xc(%rsp), %r8d movq (%rsp), %r9 callq 0x30c90 movq %rax, 0x30(%rsp) jmp 0x309f9 leaq 0xad28(%rip), %rdi # 0x3b70c callq 0x2f5a0 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx cmovneq %rax, %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
_ZL15stbi__load_mainP13stbi__contextPiS1_S1_iP17stbi__result_infoi: sub rsp, 38h mov eax, [rsp+38h+arg_0] mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov [rsp+38h+var_28], rcx mov [rsp+38h+var_2C], r8d mov [rsp+38h+var_38], r9 mov rdi, [rsp+38h+var_38] xor esi, esi mov edx, 0Ch call _memset mov rax, [rsp+38h+var_38] mov dword ptr [rax], 8 mov rax, [rsp+38h+var_38] mov dword ptr [rax+8], 0 mov rax, [rsp+38h+var_38] mov dword ptr [rax+4], 0 mov rdi, [rsp+38h+var_10] call _ZL14stbi__bmp_testP13stbi__context; stbi__bmp_test(stbi__context *) cmp eax, 0 jz short loc_309DD mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] mov r8d, [rsp+38h+var_2C] mov r9, [rsp+38h+var_38] call _ZL14stbi__bmp_loadP13stbi__contextPiS1_S1_iP17stbi__result_info; stbi__bmp_load(stbi__context *,int *,int *,int *,int,stbi__result_info *) mov [rsp+38h+var_8], rax jmp short loc_309F9 loc_309DD: lea rdi, aUnknownImageTy; "unknown image type" call _ZL9stbi__errPKc; stbi__err(char const*) mov ecx, eax xor eax, eax cmp ecx, 0 cmovnz rax, rax mov [rsp+38h+var_8], rax loc_309F9: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long stbi__load_main(long long a1, long long a2, long long a3, long long a4, unsigned int a5, _DWORD *a6) { memset(a6, 0LL, 12LL); *a6 = 8; a6[2] = 0; a6[1] = 0; if ( (unsigned int)stbi__bmp_test(a1) ) return stbi__bmp_load(a1, a2, a3, a4, a5, a6); stbi__err("unknown image type"); return 0LL; }
stbi__load_main: SUB RSP,0x38 MOV EAX,dword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0xc],R8D MOV qword ptr [RSP],R9 MOV RDI,qword ptr [RSP] XOR ESI,ESI MOV EDX,0xc CALL 0x001214a0 MOV RAX,qword ptr [RSP] MOV dword ptr [RAX],0x8 MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RSP] MOV dword ptr [RAX + 0x4],0x0 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00130c60 CMP EAX,0x0 JZ 0x001309dd MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV R8D,dword ptr [RSP + 0xc] MOV R9,qword ptr [RSP] CALL 0x00130c90 MOV qword ptr [RSP + 0x30],RAX JMP 0x001309f9 LAB_001309dd: LEA RDI,[0x13b70c] CALL 0x0012f5a0 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 CMOVNZ RAX,RAX MOV qword ptr [RSP + 0x30],RAX LAB_001309f9: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
/* stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int) */ int8 stbi__load_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5, stbi__result_info *param_6,int param_7) { int iVar1; int8 local_8; memset(param_6,0,0xc); *(int4 *)param_6 = 8; *(int4 *)(param_6 + 8) = 0; *(int4 *)(param_6 + 4) = 0; iVar1 = stbi__bmp_test(param_1); if (iVar1 == 0) { stbi__err("unknown image type"); local_8 = 0; } else { local_8 = stbi__bmp_load(param_1,param_2,param_3,param_4,param_5,param_6); } return local_8; }
8,619
minja::Parser::parseExpansion()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseExpansion() { static std::regex expansion_tok(R"(\*\*?)"); auto op_str = consumeToken(expansion_tok); auto expr = parseValueExpression(); if (op_str.empty()) return expr; if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression"); return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict); }
O1
cpp
minja::Parser::parseExpansion(): pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0xa7494(%rip), %rax # 0x135170 movb (%rax), %al testb %al, %al je 0x8de23 leaq 0xa7463(%rip), %rdx # 0x135150 leaq 0x40(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x88dfe leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x8df18 cmpq $0x0, 0x48(%rsp) movq 0x10(%rsp), %rax je 0x8dd49 testq %rax, %rax je 0x8de7a movq (%r14), %rax movq %rax, 0x60(%rsp) movq 0x8(%r14), %rax movq %rax, 0x68(%rsp) testq %rax, %rax je 0x8dd6e movq 0xa6249(%rip), %rcx # 0x133f88 cmpb $0x0, (%rcx) je 0x8dd6a incl 0x8(%rax) jmp 0x8dd6e movq %rax, (%rbx) xorl %eax, %eax movq %rax, 0x8(%rbx) movq 0x18(%rsp), %rcx movq %rax, 0x18(%rsp) movq %rcx, 0x8(%rbx) movq %rax, 0x10(%rsp) jmp 0x8ddee lock incl 0x8(%rax) movq 0x20(%r14), %rax subq 0x10(%r14), %rax leaq 0x60(%rsp), %r14 movq %rax, 0x10(%r14) leaq 0x6feda(%rip), %rsi # 0xfdc60 leaq 0x40(%rsp), %rdi callq 0x1b230 cmpl $0x1, %eax movl $0x4, %eax sbbl $0x0, %eax leaq 0x3c(%rsp), %r9 movl %eax, (%r9) leaq 0x28(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x20(%rsp), %rsi leaq 0xf(%rsp), %rdx leaq 0x10(%rsp), %r8 movq %r14, %rcx callq 0x9a74a xorl %eax, %eax movq %rax, 0x8(%rbx) movaps 0x20(%rsp), %xmm0 movq %rax, 0x28(%rsp) movups %xmm0, (%rbx) movq %rax, 0x20(%rsp) movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x8ddee callq 0x720e2 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8ddfd callq 0x720e2 leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8de18 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b940 movq %rbx, %rax addq $0x78, %rsp popq %rbx popq %r14 retq leaq 0xa7346(%rip), %rdi # 0x135170 callq 0x1c0a0 testl %eax, %eax je 0x8dce6 leaq 0xa7312(%rip), %rdi # 0x135150 leaq 0x69627(%rip), %rsi # 0xf746c movl $0x10, %edx callq 0x67112 leaq -0x26a3c(%rip), %rdi # 0x6741a leaq 0xa72f3(%rip), %rsi # 0x135150 leaq 0xa6ab4(%rip), %rdx # 0x134918 callq 0x1b800 leaq 0xa7300(%rip), %rdi # 0x135170 callq 0x1b5f0 jmp 0x8dce6 movl $0x10, %edi callq 0x1b460 movq %rax, %r14 leaq 0x695e4(%rip), %rsi # 0xf7472 movq %rax, %rdi callq 0x1b340 movq 0xa6153(%rip), %rsi # 0x133ff0 movq 0xa60bc(%rip), %rdx # 0x133f60 movq %r14, %rdi callq 0x1bfa0 movq %rax, %rbx leaq 0xa72ba(%rip), %rdi # 0x135170 callq 0x1b5e0 jmp 0x8df10 movq %rax, %rbx jmp 0x8dee1 movq %rax, %rbx movq %r14, %rdi callq 0x1b6b0 jmp 0x8dee1 movq %rax, %rbx movq 0x68(%rsp), %rdi testq %rdi, %rdi je 0x8dee1 callq 0x720e2 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8def5 callq 0x720e2 jmp 0x8def5 movq %rax, %rbx leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8df10 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b940 movq %rbx, %rdi callq 0x1c040
_ZN5minja6Parser14parseExpansionEv: push r14 push rbx sub rsp, 78h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok mov al, [rax] test al, al jz loc_8DE23 loc_8DCE6: lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rdi, [rsp+88h+var_48] mov rsi, r14 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+88h+var_78]; this mov rsi, r14 call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void) cmp [rsp+88h+var_40], 0 mov rax, [rsp+88h+var_78] jz short loc_8DD49 test rax, rax jz loc_8DE7A mov rax, [r14] mov [rsp+88h+var_28], rax mov rax, [r14+8] mov [rsp+88h+var_20], rax test rax, rax jz short loc_8DD6E mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_8DD6A inc dword ptr [rax+8] jmp short loc_8DD6E loc_8DD49: mov [rbx], rax xor eax, eax mov [rbx+8], rax mov rcx, [rsp+88h+var_70] mov [rsp+88h+var_70], rax mov [rbx+8], rcx mov [rsp+88h+var_78], rax jmp loc_8DDEE loc_8DD6A: lock inc dword ptr [rax+8] loc_8DD6E: mov rax, [r14+20h] sub rax, [r14+10h] lea r14, [rsp+88h+var_28] mov [r14+10h], rax lea rsi, asc_FDC5F+1; "*" lea rdi, [rsp+88h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) cmp eax, 1 mov eax, 4 sbb eax, 0 lea r9, [rsp+88h+var_4C] mov [r9], eax lea rdi, [rsp+88h+var_68+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+88h+var_68] lea rdx, [rsp+88h+var_79] lea r8, [rsp+88h+var_78] mov rcx, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&) xor eax, eax mov [rbx+8], rax movaps xmm0, [rsp+88h+var_68] mov qword ptr [rsp+88h+var_68+8], rax movups xmmword ptr [rbx], xmm0 mov qword ptr [rsp+88h+var_68], rax mov rdi, [rsp+88h+var_20] test rdi, rdi jz short loc_8DDEE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8DDEE: mov rdi, [rsp+88h+var_70] test rdi, rdi jz short loc_8DDFD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8DDFD: lea rax, [rsp+88h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8DE18 mov rsi, [rsp+88h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8DE18: mov rax, rbx add rsp, 78h pop rbx pop r14 retn loc_8DE23: lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_8DCE6 lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok lea rsi, asc_F746C; "\\*\\*?" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_8DCE6 loc_8DE7A: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_8DF10 mov rbx, rax jmp short loc_8DEE1 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_8DEE1 mov rbx, rax mov rdi, [rsp+88h+var_20] test rdi, rdi jz short loc_8DEE1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8DEE1: mov rdi, [rsp+88h+var_70] test rdi, rdi jz short loc_8DEF5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_8DEF5 mov rbx, rax loc_8DEF5: lea rax, [rsp+88h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8DF10 mov rsi, [rsp+88h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8DF10: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, long long *a2) { volatile signed __int32 *v2; // rax volatile signed __int32 *v3; // rcx __int128 v4; // xmm0 std::runtime_error *exception; // r14 char v7; // [rsp+Fh] [rbp-79h] BYREF long long v8; // [rsp+10h] [rbp-78h] BYREF volatile signed __int32 *v9; // [rsp+18h] [rbp-70h] __int128 v10; // [rsp+20h] [rbp-68h] BYREF int v11; // [rsp+3Ch] [rbp-4Ch] void *v12[2]; // [rsp+40h] [rbp-48h] BYREF long long v13; // [rsp+50h] [rbp-38h] BYREF long long v14; // [rsp+60h] [rbp-28h] BYREF volatile signed __int32 *v15; // [rsp+68h] [rbp-20h] long long v16; // [rsp+70h] [rbp-18h] if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], (long long)"\\*\\*?", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v12, (long long)a2, (long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11], 1u); minja::Parser::parseValueExpression((minja::Parser *)&v8); if ( v12[1] ) { if ( !v8 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = *a2; v2 = (volatile signed __int32 *)a2[1]; v15 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v2 + 2); else _InterlockedIncrement(v2 + 2); } v16 = a2[4] - a2[2]; v11 = 4 - ((unsigned int)std::string::compare(v12, "*") == 0); *(_QWORD *)&v10 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>( (char *)&v10 + 8, &v10, &v7, &v14, &v8); *((_QWORD *)this + 1) = 0LL; v4 = v10; *((_QWORD *)&v10 + 1) = 0LL; *(_OWORD *)this = v4; *(_QWORD *)&v10 = 0LL; if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); } else { *(_QWORD *)this = v8; *((_QWORD *)this + 1) = 0LL; v3 = v9; v9 = 0LL; *((_QWORD *)this + 1) = v3; v8 = 0LL; } if ( v9 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); return this; }
parseExpansion: PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x235170] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0018de23 LAB_0018dce6: LEA RDX,[0x235150] LEA RDI,[RSP + 0x40] MOV RSI,R14 MOV ECX,0x1 CALL 0x00188dfe LAB_0018dcff: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x0018df18 CMP qword ptr [RSP + 0x48],0x0 MOV RAX,qword ptr [RSP + 0x10] JZ 0x0018dd49 TEST RAX,RAX JZ 0x0018de7a MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x68],RAX TEST RAX,RAX JZ 0x0018dd6e MOV RCX,qword ptr [0x00233f88] CMP byte ptr [RCX],0x0 JZ 0x0018dd6a INC dword ptr [RAX + 0x8] JMP 0x0018dd6e LAB_0018dd49: MOV qword ptr [RBX],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RSP + 0x10],RAX JMP 0x0018ddee LAB_0018dd6a: INC.LOCK dword ptr [RAX + 0x8] LAB_0018dd6e: MOV RAX,qword ptr [R14 + 0x20] SUB RAX,qword ptr [R14 + 0x10] LEA R14,[RSP + 0x60] MOV qword ptr [R14 + 0x10],RAX LEA RSI,[0x1fdc60] LEA RDI,[RSP + 0x40] CALL 0x0011b230 CMP EAX,0x1 MOV EAX,0x4 SBB EAX,0x0 LEA R9,[RSP + 0x3c] MOV dword ptr [R9],EAX LEA RDI,[RSP + 0x28] MOV qword ptr [RDI + -0x8],0x0 LAB_0018ddb0: LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0xf] LEA R8,[RSP + 0x10] MOV RCX,R14 CALL 0x0019a74a XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RAX MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x68] TEST RDI,RDI JZ 0x0018ddee CALL 0x001720e2 LAB_0018ddee: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0018ddfd CALL 0x001720e2 LAB_0018ddfd: LEA RAX,[RSP + 0x50] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0018de18 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011b940 LAB_0018de18: MOV RAX,RBX ADD RSP,0x78 POP RBX POP R14 RET LAB_0018de23: LEA RDI,[0x235170] CALL 0x0011c0a0 TEST EAX,EAX JZ 0x0018dce6 LAB_0018de37: LEA RDI,[0x235150] LEA RSI,[0x1f746c] MOV EDX,0x10 CALL 0x00167112 LAB_0018de4f: LEA RDI,[0x16741a] LEA RSI,[0x235150] LEA RDX,[0x234918] CALL 0x0011b800 LEA RDI,[0x235170] CALL 0x0011b5f0 JMP 0x0018dce6 LAB_0018de7a: MOV EDI,0x10 CALL 0x0011b460 MOV R14,RAX LAB_0018de87: LEA RSI,[0x1f7472] MOV RDI,RAX CALL 0x0011b340 LAB_0018de96: MOV RSI,qword ptr [0x00233ff0] MOV RDX,qword ptr [0x00233f60] MOV RDI,R14 CALL 0x0011bfa0
/* minja::Parser::parseExpansion() */ void minja::Parser::parseExpansion(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1; long lVar2; int iVar3; runtime_error *this; int8 *in_RSI; long *in_RDI; int1 local_79; long local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68; long alStack_60 [2]; int local_4c; long *local_48; long local_40; long local_38 [2]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; long local_18; if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0018de37 to 0018de4e has its CatchHandler @ 0018deac */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_); } } consumeToken(&local_48); /* try { // try from 0018dcff to 0018dd0b has its CatchHandler @ 0018def2 */ parseValueExpression(); p_Var1 = local_70; if (local_40 == 0) { *in_RDI = local_78; in_RDI[1] = 0; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; in_RDI[1] = (long)p_Var1; local_78 = 0; } else { if (local_78 == 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018de87 to 0018de95 has its CatchHandler @ 0018dec2 */ std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression"); /* try { // try from 0018de96 to 0018deab has its CatchHandler @ 0018debd */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00233ff0,PTR__runtime_error_00233f60); } local_28 = *in_RSI; local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00233f88 == '\0') { LOCK(); *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; UNLOCK(); } else { *(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1; } } local_18 = in_RSI[4] - in_RSI[2]; iVar3 = std::__cxx11::string::compare((char *)&local_48); local_4c = 4 - (uint)(iVar3 == 0); local_68 = 0; /* try { // try from 0018ddb0 to 0018ddc6 has its CatchHandler @ 0018decf */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60,&local_68,&local_79, &local_28,&local_78); lVar2 = alStack_60[0]; in_RDI[1] = 0; alStack_60[0] = 0; *in_RDI = local_68; in_RDI[1] = lVar2; local_68 = 0; if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return; }
8,620
exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD
eloqsql/storage/maria/ma_recovery.c
prototype_redo_exec_hook(REDO_INSERT_ROW_HEAD) { int error= 1; uchar *buff= NULL; MARIA_HA *info= get_MARIA_HA_from_REDO_record(rec); if (info == NULL || maria_is_crashed(info)) { /* Table was skipped at open time (because later dropped/renamed, not transactional, or create_rename_lsn newer than LOGREC_FILE_ID), or record was skipped due to skip_redo_lsn; it is not an error. */ return 0; } /* Note that REDO is per page, we still consider it if its transaction committed long ago and is unknown. */ /* If REDO's LSN is > page's LSN (read from disk), we are going to modify the page and change its LSN. The normal runtime code stores the UNDO's LSN into the page. Here storing the REDO's LSN (rec->lsn) would work (we are not writing to the log here, so don't have to "flush up to UNDO's LSN"). But in a test scenario where we do updates at runtime, then remove tables, apply the log and check that this results in the same table as at runtime, putting the same LSN as runtime had done will decrease differences. So we use the UNDO's LSN which is current_group_end_lsn. */ enlarge_buffer(rec); if (log_record_buffer.str == NULL) { eprint(tracef, "Failed to read allocate buffer for record"); goto end; } if (translog_read_record(rec->lsn, 0, rec->record_length, log_record_buffer.str, NULL) != rec->record_length) { eprint(tracef, "Failed to read record"); goto end; } buff= log_record_buffer.str; if (_ma_apply_redo_insert_row_head_or_tail(info, current_group_end_lsn, HEAD_PAGE, (rec->type == LOGREC_REDO_NEW_ROW_HEAD), buff + FILEID_STORE_SIZE, buff + FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE, rec->record_length - (FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE))) goto end; error= 0; end: return error; }
O0
c
exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x1, -0x14(%rbp) movq $0x0, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x617d0 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x5eb64 movq -0x28(%rbp), %rax movq (%rax), %rax movl 0x170(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x5eb70 movl $0x0, -0x4(%rbp) jmp 0x5ec58 movq -0x10(%rbp), %rdi callq 0x61020 cmpq $0x0, 0xc50c8f(%rip) # 0xcaf810 jne 0x5eba0 leaq 0xc50da6(%rip), %rax # 0xcaf930 movq (%rax), %rdi leaq 0x1214c8(%rip), %rsi # 0x18005c movb $0x0, %al callq 0x62e60 jmp 0x5ec52 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x14(%rax), %edx movq 0xc50c5b(%rip), %rcx # 0xcaf810 xorl %esi, %esi xorl %eax, %eax movl %eax, %r8d callq 0x491a0 movq -0x10(%rbp), %rcx cmpl 0x14(%rcx), %eax je 0x5ebe4 leaq 0xc50d5f(%rip), %rax # 0xcaf930 movq (%rax), %rdi leaq 0x1209b9(%rip), %rsi # 0x17f594 movb $0x0, %al callq 0x62e60 jmp 0x5ec52 movq 0xc50c25(%rip), %rax # 0xcaf810 movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rdi movq 0xc50c9e(%rip), %rsi # 0xcaf898 movq -0x10(%rbp), %rax cmpl $0x3, 0x420(%rax) sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x20(%rbp), %r8 addq $0x2, %r8 movq -0x20(%rbp), %r9 addq $0x2, %r9 addq $0x5, %r9 addq $0x1, %r9 movq -0x10(%rbp), %rax movl 0x14(%rax), %eax subl $0x8, %eax movl %eax, %eax movl $0x1, %edx movsbl %cl, %ecx movq %rax, (%rsp) callq 0x32f70 cmpl $0x0, %eax je 0x5ec4b jmp 0x5ec52 movl $0x0, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], 1 mov [rbp+var_20], 0 mov rdi, [rbp+var_10] call get_MARIA_HA_from_REDO_record mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_5EB64 mov rax, [rbp+var_28] mov rax, [rax] mov eax, [rax+170h] and eax, 2 cmp eax, 0 jz short loc_5EB70 loc_5EB64: mov [rbp+var_4], 0 jmp loc_5EC58 loc_5EB70: mov rdi, [rbp+var_10] call enlarge_buffer cmp cs:log_record_buffer, 0 jnz short loc_5EBA0 lea rax, tracef mov rdi, [rax] lea rsi, aFailedToReadAl; "Failed to read allocate buffer for reco"... mov al, 0 call eprint jmp loc_5EC52 loc_5EBA0: mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov edx, [rax+14h] mov rcx, cs:log_record_buffer xor esi, esi xor eax, eax mov r8d, eax call translog_read_record mov rcx, [rbp+var_10] cmp eax, [rcx+14h] jz short loc_5EBE4 lea rax, tracef mov rdi, [rax] lea rsi, aFailedToReadRe; "Failed to read record" mov al, 0 call eprint jmp short loc_5EC52 loc_5EBE4: mov rax, cs:log_record_buffer mov [rbp+var_20], rax mov rdi, [rbp+var_28] mov rsi, cs:current_group_end_lsn mov rax, [rbp+var_10] cmp dword ptr [rax+420h], 3 setz al and al, 1 movzx eax, al mov cl, al mov r8, [rbp+var_20] add r8, 2 mov r9, [rbp+var_20] add r9, 2 add r9, 5 add r9, 1 mov rax, [rbp+var_10] mov eax, [rax+14h] sub eax, 8 mov eax, eax mov edx, 1 movsx ecx, cl mov [rsp+30h+var_30], rax call _ma_apply_redo_insert_row_head_or_tail cmp eax, 0 jz short loc_5EC4B jmp short loc_5EC52 loc_5EC4B: mov [rbp+var_14], 0 loc_5EC52: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_5EC58: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD(long long a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d int v5; // edx int v6; // r8d int v7; // r9d long long *MARIA_HA_from_REDO_record; // [rsp+8h] [rbp-28h] unsigned int v10; // [rsp+1Ch] [rbp-14h] v10 = 1; MARIA_HA_from_REDO_record = (long long *)get_MARIA_HA_from_REDO_record(a1); if ( MARIA_HA_from_REDO_record && (*(_DWORD *)(*MARIA_HA_from_REDO_record + 368) & 2) == 0 ) { enlarge_buffer(a1); if ( log_record_buffer ) { if ( (unsigned int)translog_read_record(*(_QWORD *)a1, 0, *(_DWORD *)(a1 + 20), log_record_buffer, 0LL) == *(_DWORD *)(a1 + 20) ) return ma_apply_redo_insert_row_head_or_tail( MARIA_HA_from_REDO_record, current_group_end_lsn, 1u, *(_DWORD *)(a1 + 1056) == 3, log_record_buffer + 2, log_record_buffer + 8, (unsigned int)(*(_DWORD *)(a1 + 20) - 8)) != 0; else eprint(tracef, (unsigned int)"Failed to read record", v5, a1, v6, v7); } else { eprint(tracef, (unsigned int)"Failed to read allocate buffer for record", v1, v2, v3, v4); } return v10; } else { return 0; } }
exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x1 MOV qword ptr [RBP + -0x20],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001617d0 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x0015eb64 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x2 CMP EAX,0x0 JZ 0x0015eb70 LAB_0015eb64: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015ec58 LAB_0015eb70: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00161020 CMP qword ptr [0x00daf810],0x0 JNZ 0x0015eba0 LEA RAX,[0xdaf930] MOV RDI,qword ptr [RAX] LEA RSI,[0x28005c] MOV AL,0x0 CALL 0x00162e60 JMP 0x0015ec52 LAB_0015eba0: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x14] MOV RCX,qword ptr [0x00daf810] XOR ESI,ESI XOR EAX,EAX MOV R8D,EAX CALL 0x001491a0 MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x14] JZ 0x0015ebe4 LEA RAX,[0xdaf930] MOV RDI,qword ptr [RAX] LEA RSI,[0x27f594] MOV AL,0x0 CALL 0x00162e60 JMP 0x0015ec52 LAB_0015ebe4: MOV RAX,qword ptr [0x00daf810] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [0x00daf898] MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x420],0x3 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV R8,qword ptr [RBP + -0x20] ADD R8,0x2 MOV R9,qword ptr [RBP + -0x20] ADD R9,0x2 ADD R9,0x5 ADD R9,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] SUB EAX,0x8 MOV EAX,EAX MOV EDX,0x1 MOVSX ECX,CL MOV qword ptr [RSP],RAX CALL 0x00132f70 CMP EAX,0x0 JZ 0x0015ec4b JMP 0x0015ec52 LAB_0015ec4b: MOV dword ptr [RBP + -0x14],0x0 LAB_0015ec52: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0015ec58: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 exec_REDO_LOGREC_REDO_INSERT_ROW_HEAD(int8 *param_1) { int iVar1; long *plVar2; int4 local_1c; int4 local_c; local_1c = 1; plVar2 = (long *)get_MARIA_HA_from_REDO_record(param_1); if ((plVar2 == (long *)0x0) || ((*(uint *)(*plVar2 + 0x170) & 2) != 0)) { local_c = 0; } else { enlarge_buffer(param_1); if (log_record_buffer == 0) { eprint(tracef,"Failed to read allocate buffer for record"); } else { iVar1 = translog_read_record (*param_1,0,*(int4 *)((long)param_1 + 0x14),log_record_buffer,0); if (iVar1 == *(int *)((long)param_1 + 0x14)) { iVar1 = _ma_apply_redo_insert_row_head_or_tail (plVar2,current_group_end_lsn,1,*(int *)(param_1 + 0x84) == 3, log_record_buffer + 2,log_record_buffer + 8, *(int *)((long)param_1 + 0x14) + -8); if (iVar1 == 0) { local_1c = 0; } } else { eprint(tracef,"Failed to read record"); } } local_c = local_1c; } return local_c; }
8,621
test_escaping
eloqsql/libmariadb/unittest/libmariadb/charset.c
int test_escaping(MYSQL *mysql) { int i= 0, rc, len; char out[20]; const char *escape_chars[] = {"'", "\x0", "\n", "\r", "\\", "\0", NULL}; /* reset sql_mode, mysql_change_user call doesn't reset it */ rc= mysql_query(mysql, "SET sql_mode=''"); check_mysql_rc(rc, mysql); while (escape_chars[i]) { len= mysql_real_escape_string(mysql, out, escape_chars[i], 1); FAIL_IF(len < 2, "Len < 2"); i++; } return OK; }
O0
c
test_escaping: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movl $0x0, -0x34(%rbp) leaq -0x80(%rbp), %rdi leaq 0x45a92(%rip), %rsi # 0x5af50 movl $0x38, %edx callq 0x13360 movq -0x30(%rbp), %rdi leaq 0x38eac(%rip), %rsi # 0x4e37f callq 0x22f20 movl %eax, -0x38(%rbp) cmpl $0x0, -0x38(%rbp) je 0x15536 movl -0x38(%rbp), %eax movl %eax, -0x8c(%rbp) movq -0x30(%rbp), %rdi callq 0x268a0 movq %rax, -0x88(%rbp) movq -0x30(%rbp), %rdi callq 0x26870 movl -0x8c(%rbp), %esi movq -0x88(%rbp), %rdx movl %eax, %ecx leaq 0x38d12(%rip), %rdi # 0x4e22b leaq 0x3916c(%rip), %r8 # 0x4e68c movl $0x81, %r9d movb $0x0, %al callq 0x187a0 movl $0x1, -0x24(%rbp) jmp 0x155a8 jmp 0x15538 jmp 0x1553a movslq -0x34(%rbp), %rax cmpq $0x0, -0x80(%rbp,%rax,8) je 0x155a1 movq -0x30(%rbp), %rdi leaq -0x20(%rbp), %rsi movslq -0x34(%rbp), %rax movq -0x80(%rbp,%rax,8), %rdx movl $0x1, %ecx callq 0x269c0 movl %eax, -0x3c(%rbp) cmpl $0x2, -0x3c(%rbp) jge 0x15594 leaq 0x38b75(%rip), %rdi # 0x4e0e6 leaq 0x39201(%rip), %rsi # 0x4e779 leaq 0x3910d(%rip), %rdx # 0x4e68c movl $0x85, %ecx movb $0x0, %al callq 0x187a0 movl $0x1, -0x24(%rbp) jmp 0x155a8 jmp 0x15596 movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x1553a movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x90(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x155d2 movl -0x90(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x134b0 nopw (%rax,%rax)
test_escaping: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_34], 0 lea rdi, [rbp+var_80] lea rsi, off_5AF50; "'" mov edx, 38h ; '8' call _memcpy mov rdi, [rbp+var_30] lea rsi, aSetSqlMode; "SET sql_mode=''" call mysql_query mov [rbp+var_38], eax cmp [rbp+var_38], 0 jz short loc_15536 mov eax, [rbp+var_38] mov [rbp+var_8C], eax mov rdi, [rbp+var_30] call mysql_error mov [rbp+var_88], rax mov rdi, [rbp+var_30] call mysql_errno mov esi, [rbp+var_8C] mov rdx, [rbp+var_88] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 81h mov al, 0 call diag mov [rbp+var_24], 1 jmp short loc_155A8 loc_15536: jmp short $+2 loc_15538: jmp short $+2 loc_1553A: movsxd rax, [rbp+var_34] cmp [rbp+rax*8+var_80], 0 jz short loc_155A1 mov rdi, [rbp+var_30] lea rsi, [rbp+var_20] movsxd rax, [rbp+var_34] mov rdx, [rbp+rax*8+var_80] mov ecx, 1 call mysql_real_escape_string mov [rbp+var_3C], eax cmp [rbp+var_3C], 2 jge short loc_15594 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aLen2; "Len < 2" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 85h mov al, 0 call diag mov [rbp+var_24], 1 jmp short loc_155A8 loc_15594: jmp short $+2 loc_15596: mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_1553A loc_155A1: mov [rbp+var_24], 0 loc_155A8: mov eax, [rbp+var_24] mov [rbp+var_90], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_155D2 mov eax, [rbp+var_90] add rsp, 90h pop rbp retn loc_155D2: call ___stack_chk_fail
long long test_escaping(long long a1) { int v1; // eax int v2; // r8d int v3; // r9d int v5; // [rsp+4h] [rbp-8Ch] int v6; // [rsp+8h] [rbp-88h] _QWORD v7[8]; // [rsp+10h] [rbp-80h] BYREF int v8; // [rsp+54h] [rbp-3Ch] int v9; // [rsp+58h] [rbp-38h] int v10; // [rsp+5Ch] [rbp-34h] long long v11; // [rsp+60h] [rbp-30h] _BYTE v13[24]; // [rsp+70h] [rbp-20h] BYREF unsigned long long v14; // [rsp+88h] [rbp-8h] v14 = __readfsqword(0x28u); v11 = a1; v10 = 0; memcpy(v7, &off_5AF50, 56LL); v9 = mysql_query(v11, "SET sql_mode=''"); if ( v9 ) { v5 = v9; v6 = mysql_error(v11); v1 = mysql_errno(v11); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v5, v6, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 129); return 1; } else { while ( v7[v10] ) { v8 = mysql_real_escape_string(v11, v13, v7[v10], 1LL); if ( v8 < 2 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Len < 2", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 133, v2, v3); return 1; } ++v10; } return 0; } }
test_escaping: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x30],RDI MOV dword ptr [RBP + -0x34],0x0 LEA RDI,[RBP + -0x80] LEA RSI,[0x15af50] MOV EDX,0x38 CALL 0x00113360 MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x14e37f] CALL 0x00122f20 MOV dword ptr [RBP + -0x38],EAX CMP dword ptr [RBP + -0x38],0x0 JZ 0x00115536 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x8c],EAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x001268a0 MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00126870 MOV ESI,dword ptr [RBP + -0x8c] MOV RDX,qword ptr [RBP + -0x88] MOV ECX,EAX LEA RDI,[0x14e22b] LEA R8,[0x14e68c] MOV R9D,0x81 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x24],0x1 JMP 0x001155a8 LAB_00115536: JMP 0x00115538 LAB_00115538: JMP 0x0011553a LAB_0011553a: MOVSXD RAX,dword ptr [RBP + -0x34] CMP qword ptr [RBP + RAX*0x8 + -0x80],0x0 JZ 0x001155a1 MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x20] MOVSXD RAX,dword ptr [RBP + -0x34] MOV RDX,qword ptr [RBP + RAX*0x8 + -0x80] MOV ECX,0x1 CALL 0x001269c0 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x2 JGE 0x00115594 LEA RDI,[0x14e0e6] LEA RSI,[0x14e779] LEA RDX,[0x14e68c] MOV ECX,0x85 MOV AL,0x0 CALL 0x001187a0 MOV dword ptr [RBP + -0x24],0x1 JMP 0x001155a8 LAB_00115594: JMP 0x00115596 LAB_00115596: MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0011553a LAB_001155a1: MOV dword ptr [RBP + -0x24],0x0 LAB_001155a8: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x90],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001155d2 MOV EAX,dword ptr [RBP + -0x90] ADD RSP,0x90 POP RBP RET LAB_001155d2: CALL 0x001134b0
int4 test_escaping(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; long in_FS_OFFSET; long local_88 [8]; int local_44; int local_40; int local_3c; int8 local_38; int4 local_2c; int1 local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_3c = 0; local_38 = param_1; memcpy(local_88,&DAT_0015af50,0x38); iVar1 = mysql_query(local_38,"SET sql_mode=\'\'"); local_40 = iVar1; if (iVar1 == 0) { for (; local_88[local_3c] != 0; local_3c = local_3c + 1) { local_44 = mysql_real_escape_string(local_38,local_28,local_88[local_3c],1); if (local_44 < 2) { diag("Error: %s (%s: %d)","Len < 2", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 0x85); local_2c = 1; goto LAB_001155a8; } } local_2c = 0; } else { uVar3 = mysql_error(local_38); uVar2 = mysql_errno(local_38); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x81); local_2c = 1; } LAB_001155a8: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2c; }
8,622
test_escaping
eloqsql/libmariadb/unittest/libmariadb/charset.c
int test_escaping(MYSQL *mysql) { int i= 0, rc, len; char out[20]; const char *escape_chars[] = {"'", "\x0", "\n", "\r", "\\", "\0", NULL}; /* reset sql_mode, mysql_change_user call doesn't reset it */ rc= mysql_query(mysql, "SET sql_mode=''"); check_mysql_rc(rc, mysql); while (escape_chars[i]) { len= mysql_real_escape_string(mysql, out, escape_chars[i], 1); FAIL_IF(len < 2, "Len < 2"); i++; } return OK; }
O3
c
test_escaping: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x21605(%rip), %rsi # 0x36339 callq 0x1d045 testl %eax, %eax je 0x14d78 movl %eax, %r14d movq %rbx, %rdi callq 0x1f0be movq %rax, %r15 movq %rbx, %rdi callq 0x1f0a9 leaq 0x2148b(%rip), %rdi # 0x361e5 leaq 0x218df(%rip), %r8 # 0x36640 movl %r14d, %esi movq %r15, %rdx movl %eax, %ecx movl $0x81, %r9d xorl %eax, %eax callq 0x16f1f jmp 0x14dce xorl %r15d, %r15d leaq 0x2ddde(%rip), %r12 # 0x42b60 leaq -0x40(%rbp), %r14 movq (%r15,%r12), %rdx movl $0x1, %ecx movq %rbx, %rdi movq %r14, %rsi callq 0x1f13d cmpl $0x1, %eax jle 0x14dad addq $0x8, %r15 cmpq $0x30, %r15 jne 0x14d86 xorl %eax, %eax jmp 0x14dd3 leaq 0x212ec(%rip), %rdi # 0x360a0 leaq 0x21972(%rip), %rsi # 0x3672d leaq 0x2187e(%rip), %rdx # 0x36640 movl $0x85, %ecx xorl %eax, %eax callq 0x16f1f movl $0x1, %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x14def addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
test_escaping: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rsi, aSetSqlMode; "SET sql_mode=''" call mysql_query test eax, eax jz short loc_14D78 mov r14d, eax mov rdi, rbx call mysql_error mov r15, rax mov rdi, rbx call mysql_errno lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, r14d mov rdx, r15 mov ecx, eax mov r9d, 81h xor eax, eax call diag jmp short loc_14DCE loc_14D78: xor r15d, r15d lea r12, off_42B60; "'" lea r14, [rbp+var_40] loc_14D86: mov rdx, [r15+r12] mov ecx, 1 mov rdi, rbx mov rsi, r14 call mysql_real_escape_string cmp eax, 1 jle short loc_14DAD add r15, 8 cmp r15, 30h ; '0' jnz short loc_14D86 xor eax, eax jmp short loc_14DD3 loc_14DAD: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aLen2; "Len < 2" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 85h xor eax, eax call diag loc_14DCE: mov eax, 1 loc_14DD3: mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_14DEF add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_14DEF: call ___stack_chk_fail
long long test_escaping(long long a1) { int v1; // eax int v2; // r14d int v3; // r15d int v4; // eax long long v5; // r15 int v6; // r8d int v7; // r9d _BYTE v9[24]; // [rsp+0h] [rbp-40h] BYREF unsigned long long v10; // [rsp+18h] [rbp-28h] v10 = __readfsqword(0x28u); v1 = mysql_query(a1, "SET sql_mode=''"); if ( v1 ) { v2 = v1; v3 = mysql_error(a1); v4 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v2, v3, v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 129); } else { v5 = 0LL; while ( (int)mysql_real_escape_string(a1, v9, *(_UNKNOWN **)((char *)&off_42B60 + v5), 1LL) > 1 ) { v5 += 8LL; if ( v5 == 48 ) return 0LL; } diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Len < 2", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 133, v6, v7); } return 1LL; }
test_escaping: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RSI,[0x136339] CALL 0x0011d045 TEST EAX,EAX JZ 0x00114d78 MOV R14D,EAX MOV RDI,RBX CALL 0x0011f0be MOV R15,RAX MOV RDI,RBX CALL 0x0011f0a9 LEA RDI,[0x1361e5] LEA R8,[0x136640] MOV ESI,R14D MOV RDX,R15 MOV ECX,EAX MOV R9D,0x81 XOR EAX,EAX CALL 0x00116f1f JMP 0x00114dce LAB_00114d78: XOR R15D,R15D LEA R12,[0x142b60] LEA R14,[RBP + -0x40] LAB_00114d86: MOV RDX,qword ptr [R15 + R12*0x1] MOV ECX,0x1 MOV RDI,RBX MOV RSI,R14 CALL 0x0011f13d CMP EAX,0x1 JLE 0x00114dad ADD R15,0x8 CMP R15,0x30 JNZ 0x00114d86 XOR EAX,EAX JMP 0x00114dd3 LAB_00114dad: LEA RDI,[0x1360a0] LEA RSI,[0x13672d] LEA RDX,[0x136640] MOV ECX,0x85 XOR EAX,EAX CALL 0x00116f1f LAB_00114dce: MOV EAX,0x1 LAB_00114dd3: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x00114def ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00114def: CALL 0x00113500
int8 test_escaping(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; long lVar4; long in_FS_OFFSET; int1 local_48 [24]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = mysql_query(param_1,"SET sql_mode=\'\'"); if (iVar1 == 0) { lVar4 = 0; do { iVar1 = mysql_real_escape_string (param_1,local_48,*(int8 *)((long)&PTR_s___00142b60 + lVar4),1); if (iVar1 < 2) { diag("Error: %s (%s: %d)","Len < 2", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c", 0x85); goto LAB_00114dce; } lVar4 = lVar4 + 8; } while (lVar4 != 0x30); uVar3 = 0; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/charset.c",0x81); LAB_00114dce: uVar3 = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
8,623
ma_update_blob_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_update_blob_record(MARIA_HA *info, MARIA_RECORD_POS pos, const uchar *oldrec __attribute__ ((unused)), const uchar *record) { uchar *rec_buff; int error; ulong reclength,reclength2,extra; my_bool buff_alloced; extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+ MARIA_DYN_DELETE_BLOCK_HEADER); reclength= (info->s->base.pack_reclength+ _ma_calc_total_blob_length(info,record)+ extra); #ifdef NOT_USED /* We now support big rows */ if (reclength > MARIA_DYN_MAX_ROW_LENGTH) { my_errno=HA_ERR_TO_BIG_ROW; return 1; } #endif alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength); if (!rec_buff) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ return(1); } reclength2= _ma_rec_pack(info, rec_buff+ ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), record); if (!reclength2) { error= 1; goto err; } DBUG_ASSERT(reclength2 <= reclength); error=update_dynamic_record(info,pos, rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER), reclength2); err: stack_alloc_free(rec_buff, buff_alloced); return(error != 0); }
O0
c
ma_update_blob_record: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) movq %rcx, -0x30(%rbp) movq $0x5c, -0x58(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x3a0(%rax), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0x3cb60 movq %rax, %rcx movq -0x78(%rbp), %rax addq %rcx, %rax addq -0x58(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq (%rax), %rax leaq -0x68(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax cmpq -0x68(%rbp), %rax jbe 0x3cd07 movq -0x70(%rbp), %rcx subq -0x68(%rbp), %rcx movl $0x10000, %eax # imm = 0x10000 cmpq %rcx, %rax jb 0x3cce8 movq -0x70(%rbp), %rcx subq -0x68(%rbp), %rcx movl $0x8000, %eax # imm = 0x8000 cmpq %rcx, %rax jae 0x3cd07 movl $0x1000, %eax # imm = 0x1000 cmpq -0x68(%rbp), %rax ja 0x3cd07 movb $0x0, -0x59(%rbp) movq -0x48(%rbp), %rcx addq $0xf, %rcx andq $-0x10, %rcx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x38(%rbp) jmp 0x3cd1f movb $0x1, -0x59(%rbp) movq -0x48(%rbp), %rsi xorl %edi, %edi movl $0x10010, %edx # imm = 0x10010 callq 0xf3860 movq %rax, -0x38(%rbp) jmp 0x3cd21 cmpq $0x0, -0x38(%rbp) jne 0x3cd39 callq 0xf60c0 movl $0x80, (%rax) movb $0x1, -0x9(%rbp) jmp 0x3cda3 movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi addq $0x18, %rsi movq -0x30(%rbp), %rdx callq 0x3baa0 movl %eax, %eax movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) jne 0x3cd64 movl $0x1, -0x3c(%rbp) jmp 0x3cd87 jmp 0x3cd66 jmp 0x3cd68 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x38(%rbp), %rdx addq $0x18, %rdx movq -0x50(%rbp), %rcx callq 0x3c270 movsbl %al, %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rdi movsbl -0x59(%rbp), %esi callq 0x3cc00 cmpl $0x0, -0x3c(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x9(%rbp) movb -0x9(%rbp), %al movb %al, -0x79(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3cdc3 movb -0x79(%rbp), %al movq %rbp, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
_ma_update_blob_record: push rbp mov rbp, rsp sub rsp, 80h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx mov [rbp+var_30], rcx mov [rbp+var_58], 5Ch ; '\' mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+3A0h] mov [rbp+var_78], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_30] call _ma_calc_total_blob_length mov rcx, rax mov rax, [rbp+var_78] add rax, rcx add rax, [rbp+var_58] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_68], rax mov rax, [rbp+var_18] mov rax, [rax+78h] mov rax, [rax] lea rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_70], rax mov rax, [rbp+var_70] cmp rax, [rbp+var_68] jbe short loc_3CD07 mov rcx, [rbp+var_70] sub rcx, [rbp+var_68] mov eax, 10000h cmp rax, rcx jb short loc_3CCE8 mov rcx, [rbp+var_70] sub rcx, [rbp+var_68] mov eax, 8000h cmp rax, rcx jnb short loc_3CD07 mov eax, 1000h cmp rax, [rbp+var_68] ja short loc_3CD07 loc_3CCE8: mov [rbp+var_59], 0 mov rcx, [rbp+var_48] add rcx, 0Fh and rcx, 0FFFFFFFFFFFFFFF0h mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_38], rax jmp short loc_3CD1F loc_3CD07: mov [rbp+var_59], 1 mov rsi, [rbp+var_48] xor edi, edi mov edx, offset stru_10010 call my_malloc mov [rbp+var_38], rax loc_3CD1F: jmp short $+2 loc_3CD21: cmp [rbp+var_38], 0 jnz short loc_3CD39 call _my_thread_var mov dword ptr [rax], 80h mov [rbp+var_9], 1 jmp short loc_3CDA3 loc_3CD39: mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] add rsi, 18h mov rdx, [rbp+var_30] call _ma_rec_pack mov eax, eax mov [rbp+var_50], rax cmp [rbp+var_50], 0 jnz short loc_3CD64 mov [rbp+var_3C], 1 jmp short loc_3CD87 loc_3CD64: jmp short $+2 loc_3CD66: jmp short $+2 loc_3CD68: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_38] add rdx, 18h mov rcx, [rbp+var_50] call update_dynamic_record movsx eax, al mov [rbp+var_3C], eax loc_3CD87: mov rdi, [rbp+var_38] movsx esi, [rbp+var_59] call stack_alloc_free cmp [rbp+var_3C], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_9], al loc_3CDA3: mov al, [rbp+var_9] mov [rbp+var_79], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3CDC3 mov al, [rbp+var_79] mov rsp, rbp pop rbp retn loc_3CDC3: call ___stack_chk_fail
bool ma_update_blob_record(long long a1, long long a2, long long a3, _BYTE *a4) { unsigned int v4; // eax long long v6; // [rsp+0h] [rbp-80h] BYREF long long v7; // [rsp+8h] [rbp-78h] unsigned long long v8; // [rsp+10h] [rbp-70h] unsigned long long v9; // [rsp+18h] [rbp-68h] BYREF char v10; // [rsp+27h] [rbp-59h] long long v11; // [rsp+28h] [rbp-58h] unsigned long long v12; // [rsp+30h] [rbp-50h] unsigned long long v13; // [rsp+38h] [rbp-48h] int updated; // [rsp+44h] [rbp-3Ch] long long v15; // [rsp+48h] [rbp-38h] _BYTE *v16; // [rsp+50h] [rbp-30h] long long v17; // [rsp+58h] [rbp-28h] long long v18; // [rsp+60h] [rbp-20h] _DWORD *v19; // [rsp+68h] [rbp-18h] unsigned long long v21; // [rsp+78h] [rbp-8h] v21 = __readfsqword(0x28u); v19 = (_DWORD *)a1; v18 = a2; v17 = a3; v16 = a4; v11 = 92LL; v7 = *(_QWORD *)(*(_QWORD *)a1 + 928LL); v13 = ma_calc_total_blob_length((_QWORD *)a1, (long long)a4, a3) + v7 + 92; v9 = v13; v8 = **(_QWORD **)(a1 + 120) - (_QWORD)&v9; if ( v8 <= v13 || v8 - v9 <= 0x10000 && (v8 - v9 <= 0x8000 || v9 < 0x1000) ) { v10 = 1; v15 = my_malloc(0LL, v13, &stru_10010); } else { v10 = 0; v15 = (long long)&v6 - ((v13 + 15) & 0xFFFFFFFFFFFFFFF0LL); } if ( v15 ) { v4 = ma_rec_pack(v19, (_BYTE *)(v15 + 24), v16); v12 = v4; if ( v4 ) updated = update_dynamic_record((long long)v19, v18, v15 + 24, v12); else updated = 1; stack_alloc_free(v15, v10); return updated != 0; } else { *(_DWORD *)my_thread_var() = 128; return 1; } }
_ma_update_blob_record: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x58],0x5c MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x3a0] MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x30] CALL 0x0013cb60 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,RCX ADD RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX] LEA RCX,[RBP + -0x68] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x68] JBE 0x0013cd07 MOV RCX,qword ptr [RBP + -0x70] SUB RCX,qword ptr [RBP + -0x68] MOV EAX,0x10000 CMP RAX,RCX JC 0x0013cce8 MOV RCX,qword ptr [RBP + -0x70] SUB RCX,qword ptr [RBP + -0x68] MOV EAX,0x8000 CMP RAX,RCX JNC 0x0013cd07 MOV EAX,0x1000 CMP RAX,qword ptr [RBP + -0x68] JA 0x0013cd07 LAB_0013cce8: MOV byte ptr [RBP + -0x59],0x0 MOV RCX,qword ptr [RBP + -0x48] ADD RCX,0xf AND RCX,-0x10 MOV RAX,RSP SUB RAX,RCX MOV RSP,RAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0013cd1f LAB_0013cd07: MOV byte ptr [RBP + -0x59],0x1 MOV RSI,qword ptr [RBP + -0x48] XOR EDI,EDI MOV EDX,0x10010 CALL 0x001f3860 MOV qword ptr [RBP + -0x38],RAX LAB_0013cd1f: JMP 0x0013cd21 LAB_0013cd21: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0013cd39 CALL 0x001f60c0 MOV dword ptr [RAX],0x80 MOV byte ptr [RBP + -0x9],0x1 JMP 0x0013cda3 LAB_0013cd39: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] ADD RSI,0x18 MOV RDX,qword ptr [RBP + -0x30] CALL 0x0013baa0 MOV EAX,EAX MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 JNZ 0x0013cd64 MOV dword ptr [RBP + -0x3c],0x1 JMP 0x0013cd87 LAB_0013cd64: JMP 0x0013cd66 LAB_0013cd66: JMP 0x0013cd68 LAB_0013cd68: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] ADD RDX,0x18 MOV RCX,qword ptr [RBP + -0x50] CALL 0x0013c270 MOVSX EAX,AL MOV dword ptr [RBP + -0x3c],EAX LAB_0013cd87: MOV RDI,qword ptr [RBP + -0x38] MOVSX ESI,byte ptr [RBP + -0x59] CALL 0x0013cc00 CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x9],AL LAB_0013cda3: MOV AL,byte ptr [RBP + -0x9] MOV byte ptr [RBP + -0x79],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013cdc3 MOV AL,byte ptr [RBP + -0x79] MOV RSP,RBP POP RBP RET LAB_0013cdc3: CALL 0x0012a270
int8 _ma_update_blob_record(long *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; long *plVar2; char cVar3; uint uVar4; long lVar5; int4 *puVar6; ulong uVar7; int1 *puVar8; int iVar9; int1 *puVar10; long in_FS_OFFSET; int1 auStack_88 [7]; bool local_81; long local_80; ulong local_78; ulong local_70; char local_61; long local_60; ulong local_58; ulong local_50; int local_44; int1 *local_40; int8 local_38; int8 local_30; int8 local_28; long *local_20; bool local_11; long local_10; puVar8 = auStack_88; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_60 = 0x5c; local_80 = *(long *)(*param_1 + 0x3a0); local_38 = param_4; local_30 = param_3; local_28 = param_2; local_20 = param_1; lVar5 = _ma_calc_total_blob_length(param_1,param_4); local_70 = local_80 + lVar5 + local_60; local_78 = *(long *)local_20[0xf] - (long)&local_70; local_50 = local_70; if ((local_70 < local_78) && ((0x10000 < local_78 - local_70 || ((0x8000 < local_78 - local_70 && (0xfff < local_70)))))) { local_61 = '\0'; puVar8 = auStack_88 + -(local_70 + 0xf & 0xfffffffffffffff0); local_40 = puVar8; } else { local_61 = '\x01'; local_40 = (int1 *)my_malloc(0,local_70,0x10010); } plVar2 = local_20; uVar1 = local_38; if (local_40 == (int1 *)0x0) { *(int8 *)(puVar8 + -8) = 0x13cd2d; puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x80; local_11 = true; } else { puVar10 = local_40 + 0x18; *(int8 *)(puVar8 + -8) = 0x13cd4e; uVar4 = _ma_rec_pack(plVar2,puVar10,uVar1); plVar2 = local_20; uVar1 = local_28; uVar7 = (ulong)uVar4; local_58 = uVar7; if (uVar7 == 0) { local_44 = 1; } else { puVar10 = local_40 + 0x18; *(int8 *)(puVar8 + -8) = 0x13cd81; cVar3 = update_dynamic_record(plVar2,uVar1,puVar10,uVar7); local_44 = (int)cVar3; } puVar10 = local_40; iVar9 = (int)local_61; *(int8 *)(puVar8 + -8) = 0x13cd94; stack_alloc_free(puVar10,iVar9); local_11 = local_44 != 0; } local_81 = local_11; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_11); } /* WARNING: Subroutine does not return */ *(int8 *)(puVar8 + -8) = 0x13cdc8; __stack_chk_fail(); }
8,624
my_thread_end
eloqsql/mysys/my_thr_init.c
void my_thread_end(void) { struct st_my_thread_var *tmp; tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", tmp, pthread_self(), tmp ? (long) tmp->id : 0L); #endif /* Remove the instrumentation for this thread. This must be done before trashing st_my_thread_var, because the LF_HASH depends on it. */ PSI_CALL_delete_current_thread(); /* We need to disable DBUG early for this thread to ensure that the the mutex calls doesn't enable it again To this we have to both do DBUG_POP() and also reset THR_KEY_mysys as the key is used by DBUG. */ DBUG_POP(); set_mysys_var(NULL); if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { free(tmp->dbug); tmp->dbug=0; } #endif my_thread_destory_thr_mutex(tmp); /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called my_thread_end and thus freed all memory they have allocated in my_thread_init() and DBUG_xxxx */ mysql_mutex_lock(&THR_LOCK_threads); DBUG_ASSERT(THR_thread_count != 0); if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); /* Trash variable so that we can detect false accesses to my_thread_var */ tmp->init= 2; free(tmp); } }
O0
c
my_thread_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp callq 0x2bad0 movq %rax, -0x8(%rbp) leaq 0x1a5890(%rip), %rax # 0x1d1858 movq (%rax), %rax callq *0x138(%rax) jmp 0x2bfd3 xorl %eax, %eax movl %eax, %edi callq 0x2bf80 cmpq $0x0, -0x8(%rbp) je 0x2c05c movq -0x8(%rbp), %rax movsbl 0xe8(%rax), %eax cmpl $0x0, %eax je 0x2c05c movq -0x8(%rbp), %rdi callq 0x2baf0 leaq 0x35d385(%rip), %rdi # 0x389388 leaq 0x508a2(%rip), %rsi # 0x7c8ac movl $0x175, %edx # imm = 0x175 callq 0x2be30 jmp 0x2c016 leaq 0x35d16b(%rip), %rax # 0x389188 movl (%rax), %eax addl $-0x1, %eax leaq 0x35d15f(%rip), %rcx # 0x389188 movl %eax, (%rcx) cmpl $0x0, %eax jne 0x2c03c leaq 0x35d3e1(%rip), %rdi # 0x389418 callq 0x2c070 leaq 0x35d345(%rip), %rdi # 0x389388 callq 0x2bf20 movq -0x8(%rbp), %rax movb $0x2, 0xe8(%rax) movq -0x8(%rbp), %rdi callq 0x243e0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_end: push rbp mov rbp, rsp sub rsp, 10h call _my_thread_var mov [rbp+var_8], rax lea rax, PSI_server mov rax, [rax] call qword ptr [rax+138h] jmp short $+2 loc_2BFD3: xor eax, eax mov edi, eax call set_mysys_var cmp [rbp+var_8], 0 jz short loc_2C05C mov rax, [rbp+var_8] movsx eax, byte ptr [rax+0E8h] cmp eax, 0 jz short loc_2C05C mov rdi, [rbp+var_8] call my_thread_destory_thr_mutex lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 175h call inline_mysql_mutex_lock jmp short $+2 loc_2C016: lea rax, THR_thread_count mov eax, [rax] add eax, 0FFFFFFFFh lea rcx, THR_thread_count mov [rcx], eax cmp eax, 0 jnz short loc_2C03C lea rdi, THR_COND_threads call inline_mysql_cond_signal loc_2C03C: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock mov rax, [rbp+var_8] mov byte ptr [rax+0E8h], 2 mov rdi, [rbp+var_8] call _free loc_2C05C: add rsp, 10h pop rbp retn
long long my_thread_end() { long long result; // rax long long v1; // [rsp+8h] [rbp-8h] v1 = my_thread_var(); (*((void (**)(void))PSI_server[0] + 39))(); result = set_mysys_var(0LL); if ( v1 ) { result = (unsigned int)*(char *)(v1 + 232); if ( *(_BYTE *)(v1 + 232) ) { my_thread_destory_thr_mutex(v1); inline_mysql_mutex_lock( (long long)&THR_LOCK_threads, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 0x175u); if ( !--THR_thread_count ) inline_mysql_cond_signal(&THR_COND_threads); inline_mysql_mutex_unlock((long long)&THR_LOCK_threads); *(_BYTE *)(v1 + 232) = 2; return free(v1); } } return result; }
my_thread_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CALL 0x0012bad0 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[0x2d1858] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x138] JMP 0x0012bfd3 LAB_0012bfd3: XOR EAX,EAX MOV EDI,EAX CALL 0x0012bf80 CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012c05c MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0xe8] CMP EAX,0x0 JZ 0x0012c05c MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012baf0 LEA RDI,[0x489388] LEA RSI,[0x17c8ac] MOV EDX,0x175 CALL 0x0012be30 JMP 0x0012c016 LAB_0012c016: LEA RAX,[0x489188] MOV EAX,dword ptr [RAX] ADD EAX,-0x1 LEA RCX,[0x489188] MOV dword ptr [RCX],EAX CMP EAX,0x0 JNZ 0x0012c03c LEA RDI,[0x489418] CALL 0x0012c070 LAB_0012c03c: LEA RDI,[0x489388] CALL 0x0012bf20 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xe8],0x2 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001243e0 LAB_0012c05c: ADD RSP,0x10 POP RBP RET
void my_thread_end(void) { void *__ptr; __ptr = (void *)_my_thread_var(); (**(code **)(PSI_server + 0x138))(); set_mysys_var(0); if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) { my_thread_destory_thr_mutex(__ptr); inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0x175 ); THR_thread_count = THR_thread_count + -1; if (THR_thread_count == 0) { inline_mysql_cond_signal(THR_COND_threads); } inline_mysql_mutex_unlock(THR_LOCK_threads); *(int1 *)((long)__ptr + 0xe8) = 2; free(__ptr); } return; }
8,625
cxxopts::Options::Options(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
zkingston[P]unknot/build_O0/_deps/cxxopts-src/include/cxxopts.hpp
explicit Options(std::string program_name, std::string help_string = "") : m_program(std::move(program_name)) , m_help_string(toLocalString(std::move(help_string))) , m_custom_help("[OPTION...]") , m_positional_help("positional parameters") , m_show_positional(false) , m_allow_unrecognised(false) , m_width(76) , m_tab_expansion(false) , m_options(std::make_shared<OptionMap>()) { }
O0
cpp
cxxopts::Options::Options(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): subq $0x88, %rsp movq %rdx, 0x50(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq 0x80(%rsp), %rdi movq %rdi, 0x48(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) callq 0x12750 movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi addq $0x20, %rdi movq %rdi, 0x58(%rsp) callq 0x1a950 jmp 0x16ae2 movq 0x40(%rsp), %rax addq $0x40, %rax movq %rax, 0x30(%rsp) leaq 0x63(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x13550 movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rdx leaq 0x5b6344(%rip), %rsi # 0x5cce54 callq 0x169d0 jmp 0x16b17 leaq 0x63(%rsp), %rdi callq 0x12d00 movq 0x40(%rsp), %rax addq $0x60, %rax movq %rax, 0x20(%rsp) leaq 0x62(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x13550 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rdx leaq 0x5b6311(%rip), %rsi # 0x5cce60 callq 0x169d0 jmp 0x16b56 leaq 0x62(%rsp), %rdi callq 0x12d00 movq 0x40(%rsp), %rdi movb $0x0, 0x80(%rdi) movb $0x0, 0x81(%rdi) movq $0x4c, 0x88(%rdi) movb $0x0, 0x90(%rdi) addq $0x98, %rdi callq 0x1a980 jmp 0x16b93 movq 0x40(%rsp), %rdi addq $0xa8, %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x18, %edx callq 0x126a0 movq (%rsp), %rdi callq 0x1a9f0 movq 0x40(%rsp), %rdi addq $0xc0, %rdi movq %rdi, 0x8(%rsp) xorl %esi, %esi movl $0x38, %edx callq 0x126a0 movq 0x8(%rsp), %rdi callq 0x1aa00 movq 0x40(%rsp), %rdi addq $0xf8, %rdi movq %rdi, 0x10(%rsp) xorl %esi, %esi movl $0x18, %edx callq 0x126a0 movq 0x10(%rsp), %rdi callq 0x1a9f0 movq 0x40(%rsp), %rdi addq $0x110, %rdi # imm = 0x110 movq %rdi, 0x18(%rsp) xorl %esi, %esi movl $0x30, %edx callq 0x126a0 movq 0x18(%rsp), %rdi callq 0x1aa10 addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x16ca5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x63(%rsp), %rdi callq 0x12d00 jmp 0x16c9b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x62(%rsp), %rdi callq 0x12d00 jmp 0x16c91 movq 0x20(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) callq 0x13768 movq 0x30(%rsp), %rdi callq 0x13768 movq 0x58(%rsp), %rdi callq 0x13768 movq 0x48(%rsp), %rdi callq 0x13768 movq 0x68(%rsp), %rdi callq 0x13540 nopl (%rax)
_ZN7cxxopts7OptionsC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: sub rsp, 88h mov [rsp+88h+var_38], rdx mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov rdi, [rsp+88h+var_8] mov [rsp+88h+var_40], rdi mov rax, rdi mov [rsp+88h+var_48], rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EOS4_; std::string::basic_string(std::string&&) mov rdi, [rsp+88h+var_40] mov rsi, [rsp+88h+var_38] add rdi, 20h ; ' ' mov [rsp+88h+var_30], rdi call _ZN7cxxopts13toLocalStringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_OS7_; cxxopts::toLocalString<std::string>(std::string&&) jmp short $+2 loc_16AE2: mov rax, [rsp+88h+var_48] add rax, 40h ; '@' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_25] mov [rsp+88h+var_50], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+88h+var_58] mov rdx, [rsp+88h+var_50] lea rsi, aOption; "[OPTION...]" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_16B17: lea rdi, [rsp+88h+var_25] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+88h+var_48] add rax, 60h ; '`' mov [rsp+88h+var_68], rax lea rdi, [rsp+88h+var_26] mov [rsp+88h+var_60], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+88h+var_68] mov rdx, [rsp+88h+var_60] lea rsi, aPositionalPara; "positional parameters" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_16B56: lea rdi, [rsp+88h+var_26] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+88h+var_48] mov byte ptr [rdi+80h], 0 mov byte ptr [rdi+81h], 0 mov qword ptr [rdi+88h], 4Ch ; 'L' mov byte ptr [rdi+90h], 0 add rdi, 98h call _ZSt11make_sharedISt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN7cxxopts13OptionDetailsEESt4hashIS6_ESt8equal_toIS6_ESaISt4pairIKS6_SA_EEEJEES7_IT_EDpOT0_; std::make_shared<std::unordered_map<std::string,std::shared_ptr<cxxopts::OptionDetails>>>() jmp short $+2 loc_16B93: mov rdi, [rsp+88h+var_48] add rdi, 0A8h mov [rsp+88h+var_88], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+88h+var_88] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rsp+88h+var_48] add rdi, 0C0h mov [rsp+88h+var_80], rdi xor esi, esi mov edx, 38h ; '8' call _memset mov rdi, [rsp+88h+var_80] call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EEC2Ev; std::unordered_set<std::string>::unordered_set(void) mov rdi, [rsp+88h+var_48] add rdi, 0F8h mov [rsp+88h+var_78], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+88h+var_78] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rsp+88h+var_48] add rdi, 110h mov [rsp+88h+var_70], rdi xor esi, esi mov edx, 30h ; '0' call _memset mov rdi, [rsp+88h+var_70] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN7cxxopts16HelpGroupDetailsESt4lessIS5_ESaISt4pairIKS5_S7_EEEC2Ev; std::map<std::string,cxxopts::HelpGroupDetails>::map(void) add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp short loc_16CA5 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_5B] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_16C9B mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_5A] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_16C91 mov rdi, [rsp+arg_18]; void * mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16C91: mov rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16C9B: mov rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_16CA5: mov rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_60] call __Unwind_Resume
long long cxxopts::Options::Options(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rdx int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d char v11; // [rsp+62h] [rbp-26h] BYREF _BYTE v12[13]; // [rsp+63h] [rbp-25h] BYREF long long v13; // [rsp+70h] [rbp-18h] long long v14; // [rsp+78h] [rbp-10h] long long v15; // [rsp+80h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; std::string::basic_string(); cxxopts::toLocalString<std::string>(a1 + 32, a3); std::allocator<char>::allocator(v12, a3, v3); std::string::basic_string<std::allocator<char>>(a1 + 64, (long long)"[OPTION...]", (long long)v12); std::allocator<char>::~allocator(v12); std::allocator<char>::allocator(&v11, "[OPTION...]", v4); std::string::basic_string<std::allocator<char>>(a1 + 96, (long long)"positional parameters", (long long)&v11); std::allocator<char>::~allocator(&v11); *(_BYTE *)(a1 + 128) = 0; *(_BYTE *)(a1 + 129) = 0; *(_QWORD *)(a1 + 136) = 76LL; *(_BYTE *)(a1 + 144) = 0; std::make_shared<std::unordered_map<std::string,std::shared_ptr<cxxopts::OptionDetails>>>( a1 + 152, (unsigned int)"positional parameters", v5, v6, v7, v8); memset(a1 + 168, 0LL, 24LL); std::vector<std::string>::vector(a1 + 168); memset(a1 + 192, 0LL, 56LL); std::unordered_set<std::string>::unordered_set(a1 + 192); memset(a1 + 248, 0LL, 24LL); std::vector<std::string>::vector(a1 + 248); memset(a1 + 272, 0LL, 48LL); return std::map<std::string,cxxopts::HelpGroupDetails>::map(a1 + 272); }
Options: SUB RSP,0x88 MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV RDI,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x48],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x40],RAX CALL 0x00112750 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] ADD RDI,0x20 MOV qword ptr [RSP + 0x58],RDI LAB_00116adb: CALL 0x0011a950 JMP 0x00116ae2 LAB_00116ae2: MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x40 MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x63] MOV qword ptr [RSP + 0x38],RDI CALL 0x00113550 MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_00116b09: LEA RSI,[0x6cce54] CALL 0x001169d0 JMP 0x00116b17 LAB_00116b17: LEA RDI,[RSP + 0x63] CALL 0x00112d00 MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x60 MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0x62] MOV qword ptr [RSP + 0x28],RDI CALL 0x00113550 MOV RDI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LAB_00116b48: LEA RSI,[0x6cce60] CALL 0x001169d0 JMP 0x00116b56 LAB_00116b56: LEA RDI,[RSP + 0x62] CALL 0x00112d00 MOV RDI,qword ptr [RSP + 0x40] MOV byte ptr [RDI + 0x80],0x0 MOV byte ptr [RDI + 0x81],0x0 MOV qword ptr [RDI + 0x88],0x4c MOV byte ptr [RDI + 0x90],0x0 ADD RDI,0x98 LAB_00116b8c: CALL 0x0011a980 LAB_00116b91: JMP 0x00116b93 LAB_00116b93: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0xa8 MOV qword ptr [RSP],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x001126a0 MOV RDI,qword ptr [RSP] CALL 0x0011a9f0 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0xc0 MOV qword ptr [RSP + 0x8],RDI XOR ESI,ESI MOV EDX,0x38 CALL 0x001126a0 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011aa00 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0xf8 MOV qword ptr [RSP + 0x10],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x001126a0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011a9f0 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x110 MOV qword ptr [RSP + 0x18],RDI XOR ESI,ESI MOV EDX,0x30 CALL 0x001126a0 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0011aa10 ADD RSP,0x88 RET
/* cxxopts::Options::Options(std::__cxx11::string, std::__cxx11::string) */ void __thiscall cxxopts::Options::Options(Options *this,string *param_2,string *param_3) { allocator local_26; allocator local_25 [13]; string *local_18; string *local_10; Options *local_8; local_18 = param_3; local_10 = param_2; local_8 = this; std::__cxx11::string::string((string *)this,param_2); /* try { // try from 00116adb to 00116adf has its CatchHandler @ 00116c35 */ toLocalString<std::__cxx11::string>((cxxopts *)(this + 0x20),param_3); std::allocator<char>::allocator(); /* try { // try from 00116b09 to 00116b14 has its CatchHandler @ 00116c45 */ std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x40),"[OPTION...]",local_25) ; std::allocator<char>::~allocator((allocator<char> *)local_25); std::allocator<char>::allocator(); /* try { // try from 00116b48 to 00116b53 has its CatchHandler @ 00116c5f */ std::__cxx11::string::string<std::allocator<char>> ((string *)(this + 0x60),"positional parameters",&local_26); std::allocator<char>::~allocator((allocator<char> *)&local_26); this[0x80] = (Options)0x0; this[0x81] = (Options)0x0; *(int8 *)(this + 0x88) = 0x4c; this[0x90] = (Options)0x0; /* try { // try from 00116b8c to 00116b90 has its CatchHandler @ 00116c79 */ std:: make_shared<std::unordered_map<std::__cxx11::string,std::shared_ptr<cxxopts::OptionDetails>,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<cxxopts::OptionDetails>>>>> (); memset((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0xa8),0,0x18); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0xa8)); memset((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(this + 0xc0),0,0x38); std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::unordered_set((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)(this + 0xc0)); memset((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0xf8),0,0x18); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0xf8)); memset((map<std::__cxx11::string,cxxopts::HelpGroupDetails,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,cxxopts::HelpGroupDetails>>> *)(this + 0x110),0,0x30); std:: map<std::__cxx11::string,cxxopts::HelpGroupDetails,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,cxxopts::HelpGroupDetails>>> ::map((map<std::__cxx11::string,cxxopts::HelpGroupDetails,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,cxxopts::HelpGroupDetails>>> *)(this + 0x110)); return; }
8,626
httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long, unsigned long)
nickolajgrishuk[P]metricz-cpp/build_O1/_deps/httplib-src/httplib.h
inline std::string make_content_range_header_field(size_t offset, size_t length, size_t content_length) { std::string field = "bytes "; field += std::to_string(offset); field += "-"; field += std::to_string(offset + length - 1); field += "/"; field += std::to_string(content_length); return field; }
O1
c
httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) leaq 0x10e2c(%rip), %rsi # 0x2e34a leaq 0x10e2b(%rip), %rdx # 0x2e350 callq 0x107fc movl $0x1, %esi cmpq $0xa, %r12 jb 0x1d584 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r12, %rcx cmpq $0x63, %rcx jbe 0x1d57d cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x1d582 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x1d584 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x1d547 addl $-0x3, %esi jmp 0x1d584 addl $-0x2, %esi jmp 0x1d584 decl %esi movl %esi, %esi leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x8(%rsp), %rdi xorl %edx, %edx callq 0x8650 movq 0x8(%rsp), %rdi movl 0x10(%rsp), %esi movq %r12, %rdx callq 0x1e54c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x8170 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x1d5cd callq 0x8520 leaq 0x10d7e(%rip), %rsi # 0x2e352 movq %rbx, %rdi callq 0x8a20 addq %r12, %r15 decq %r15 movl $0x1, %esi cmpq $0xa, %r15 jb 0x1d63c movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r15, %rcx cmpq $0x63, %rcx jbe 0x1d635 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x1d63a cmpq $0x2710, %rcx # imm = 0x2710 jb 0x1d63c movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x1d5ff addl $-0x3, %esi jmp 0x1d63c addl $-0x2, %esi jmp 0x1d63c decl %esi movl %esi, %esi leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) xorl %edx, %edx callq 0x8650 movq 0x8(%rsp), %rdi movl 0x10(%rsp), %esi movq %r15, %rdx callq 0x1e54c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x8170 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x1d67f callq 0x8520 leaq 0xfdb8(%rip), %rsi # 0x2d43e movq %rbx, %rdi callq 0x8a20 movl $0x1, %esi cmpq $0xa, %r14 jb 0x1d6e8 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0x1d6e1 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x1d6e6 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x1d6e8 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x1d6ab addl $-0x3, %esi jmp 0x1d6e8 addl $-0x2, %esi jmp 0x1d6e8 decl %esi movl %esi, %esi leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) xorl %edx, %edx callq 0x8650 movq 0x8(%rsp), %rdi movl 0x10(%rsp), %esi movq %r14, %rdx callq 0x1e54c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x8170 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x1d72b callq 0x8520 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1d745 jmp 0x1d75b jmp 0x1d745 jmp 0x1d75b movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x1d75e callq 0x8520 jmp 0x1d75e jmp 0x1d75b movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0x1d76b callq 0x8520 movq %r14, %rdi callq 0x8990
_ZN7httplib6detail31make_content_range_header_fieldB5cxx11Emmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 lea rsi, aBytes_0; "bytes " lea rdx, aBytes_0+6; "" 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 esi, 1 cmp r12, 0Ah jb short loc_1D584 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r12 loc_1D547: cmp rcx, 63h ; 'c' jbe short loc_1D57D cmp rcx, 3E7h jbe short loc_1D582 cmp rcx, 2710h jb short loc_1D584 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_1D547 add esi, 0FFFFFFFDh jmp short loc_1D584 loc_1D57D: add esi, 0FFFFFFFEh jmp short loc_1D584 loc_1D582: dec esi loc_1D584: mov esi, esi lea rbp, [rsp+58h+var_40] mov [rbp-10h], rbp lea rdi, [rsp+58h+var_50] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+58h+var_50] mov esi, dword ptr [rsp+58h+var_48] mov rdx, r12 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) 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_1D5CD call __ZdlPv; operator delete(void *) loc_1D5CD: lea rsi, asc_2E351+1; "-" mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) add r15, r12 dec r15 mov esi, 1 cmp r15, 0Ah jb short loc_1D63C mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r15 loc_1D5FF: cmp rcx, 63h ; 'c' jbe short loc_1D635 cmp rcx, 3E7h jbe short loc_1D63A cmp rcx, 2710h jb short loc_1D63C mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_1D5FF add esi, 0FFFFFFFDh jmp short loc_1D63C loc_1D635: add esi, 0FFFFFFFEh jmp short loc_1D63C loc_1D63A: dec esi loc_1D63C: mov esi, esi lea rdi, [rsp+58h+var_50] mov [rdi], rbp xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+58h+var_50] mov esi, dword ptr [rsp+58h+var_48] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) 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_1D67F call __ZdlPv; operator delete(void *) loc_1D67F: lea rsi, aHttpHttp+10h; "/" mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov esi, 1 cmp r14, 0Ah jb short loc_1D6E8 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r14 loc_1D6AB: cmp rcx, 63h ; 'c' jbe short loc_1D6E1 cmp rcx, 3E7h jbe short loc_1D6E6 cmp rcx, 2710h jb short loc_1D6E8 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_1D6AB add esi, 0FFFFFFFDh jmp short loc_1D6E8 loc_1D6E1: add esi, 0FFFFFFFEh jmp short loc_1D6E8 loc_1D6E6: dec esi loc_1D6E8: mov esi, esi lea rdi, [rsp+58h+var_50] mov [rdi], rbp xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+58h+var_50] mov esi, dword ptr [rsp+58h+var_48] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) 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_1D72B call __ZdlPv; operator delete(void *) loc_1D72B: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1D745 jmp short loc_1D75B jmp short loc_1D745 jmp short loc_1D75B loc_1D745: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, rbp jz short loc_1D75E call __ZdlPv; operator delete(void *) jmp short loc_1D75E jmp short $+2 loc_1D75B: mov r14, rax loc_1D75E: mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_1D76B call __ZdlPv; operator delete(void *) loc_1D76B: mov rdi, r14 call __Unwind_Resume
_QWORD * httplib::detail::make_content_range_header_field[abi:cxx11]( _QWORD *a1, unsigned long long a2, long long a3, unsigned long long a4) { unsigned int v7; // esi unsigned long long v8; // rcx bool v9; // cc unsigned long long v10; // r15 unsigned int v11; // esi unsigned long long v12; // rcx unsigned int v13; // esi unsigned long long v14; // rcx void *v16; // [rsp+8h] [rbp-50h] BYREF long long v17; // [rsp+10h] [rbp-48h] _BYTE v18[64]; // [rsp+18h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "bytes ", (long long)""); v7 = 1; if ( a2 >= 0xA ) { v7 = 4; v8 = a2; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_10; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_10; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710uLL; if ( v9 ) { v7 -= 3; goto LABEL_10; } } --v7; } LABEL_10: v16 = v18; std::string::_M_construct(&v16, v7, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v16, (unsigned int)v17, a2); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16); std::string::append(a1, "-"); v10 = a2 + a3 - 1; v11 = 1; if ( v10 >= 0xA ) { v11 = 4; v12 = v10; while ( 1 ) { if ( v12 <= 0x63 ) { v11 -= 2; goto LABEL_21; } if ( v12 <= 0x3E7 ) break; if ( v12 < 0x2710 ) goto LABEL_21; v11 += 4; v9 = v12 <= 0x1869F; v12 /= 0x2710uLL; if ( v9 ) { v11 -= 3; goto LABEL_21; } } --v11; } LABEL_21: v16 = v18; std::string::_M_construct(&v16, v11, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v16, (unsigned int)v17, v10); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16); std::string::append(a1, "/"); v13 = 1; if ( a4 >= 0xA ) { v13 = 4; v14 = a4; while ( 1 ) { if ( v14 <= 0x63 ) { v13 -= 2; goto LABEL_32; } if ( v14 <= 0x3E7 ) break; if ( v14 < 0x2710 ) goto LABEL_32; v13 += 4; v9 = v14 <= 0x1869F; v14 /= 0x2710uLL; if ( v9 ) { v13 -= 3; goto LABEL_32; } } --v13; } LABEL_32: v16 = v18; std::string::_M_construct(&v16, v13, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v16, (unsigned int)v17, a4); std::string::_M_append(a1, v16, v17); if ( v16 != v18 ) operator delete(v16); return a1; }
make_content_range_header_field[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 LEA RSI,[0x12e34a] LEA RDX,[0x12e350] CALL 0x001107fc MOV ESI,0x1 CMP R12,0xa JC 0x0011d584 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R12 LAB_0011d547: CMP RCX,0x63 JBE 0x0011d57d CMP RCX,0x3e7 JBE 0x0011d582 CMP RCX,0x2710 JC 0x0011d584 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0011d547 ADD ESI,-0x3 JMP 0x0011d584 LAB_0011d57d: ADD ESI,-0x2 JMP 0x0011d584 LAB_0011d582: DEC ESI LAB_0011d584: MOV ESI,ESI LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP LAB_0011d58f: LEA RDI,[RSP + 0x8] XOR EDX,EDX CALL 0x00108650 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x10] MOV RDX,R12 CALL 0x0011e54c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0011d5b6: MOV RDI,RBX CALL 0x00108170 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x0011d5cd CALL 0x00108520 LAB_0011d5cd: LEA RSI,[0x12e352] MOV RDI,RBX CALL 0x00108a20 ADD R15,R12 DEC R15 MOV ESI,0x1 CMP R15,0xa JC 0x0011d63c MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R15 LAB_0011d5ff: CMP RCX,0x63 JBE 0x0011d635 CMP RCX,0x3e7 JBE 0x0011d63a CMP RCX,0x2710 JC 0x0011d63c MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0011d5ff ADD ESI,-0x3 JMP 0x0011d63c LAB_0011d635: ADD ESI,-0x2 JMP 0x0011d63c LAB_0011d63a: DEC ESI LAB_0011d63c: MOV ESI,ESI LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_0011d646: XOR EDX,EDX CALL 0x00108650 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x10] MOV RDX,R15 CALL 0x0011e54c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0011d668: MOV RDI,RBX CALL 0x00108170 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x0011d67f CALL 0x00108520 LAB_0011d67f: LEA RSI,[0x12d43e] MOV RDI,RBX CALL 0x00108a20 MOV ESI,0x1 CMP R14,0xa JC 0x0011d6e8 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R14 LAB_0011d6ab: CMP RCX,0x63 JBE 0x0011d6e1 CMP RCX,0x3e7 JBE 0x0011d6e6 CMP RCX,0x2710 JC 0x0011d6e8 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0011d6ab ADD ESI,-0x3 JMP 0x0011d6e8 LAB_0011d6e1: ADD ESI,-0x2 JMP 0x0011d6e8 LAB_0011d6e6: DEC ESI LAB_0011d6e8: MOV ESI,ESI LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_0011d6f2: XOR EDX,EDX CALL 0x00108650 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x10] MOV RDX,R14 CALL 0x0011e54c MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0011d714: MOV RDI,RBX CALL 0x00108170 LAB_0011d71c: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x0011d72b CALL 0x00108520 LAB_0011d72b: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* httplib::detail::make_content_range_header_field[abi:cxx11](unsigned long, unsigned long, unsigned long) */ detail * __thiscall httplib::detail::make_content_range_header_field_abi_cxx11_ (detail *this,ulong param_1,ulong param_2,ulong param_3) { bool bVar1; char cVar2; ulong uVar3; char cVar4; ulong uVar5; char *local_50; uint local_48; char local_40 [16]; *(detail **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,"bytes ",""); cVar4 = '\x01'; if (9 < param_1) { uVar5 = param_1; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar5 < 100) { cVar4 = cVar4 + -2; goto LAB_0011d584; } if (uVar5 < 1000) { cVar4 = cVar4 + -1; goto LAB_0011d584; } if (uVar5 < 10000) goto LAB_0011d584; bVar1 = 99999 < uVar5; uVar5 = uVar5 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0011d584: /* try { // try from 0011d58f to 0011d59a has its CatchHandler @ 0011d759 */ local_50 = local_40; std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>(local_50,local_48,param_1); /* try { // try from 0011d5b6 to 0011d5bd has its CatchHandler @ 0011d745 */ std::__cxx11::string::_M_append((char *)this,(ulong)local_50); if (local_50 != local_40) { operator_delete(local_50); } /* try { // try from 0011d5cd to 0011d5db has its CatchHandler @ 0011d75b */ std::__cxx11::string::append((char *)this); uVar5 = (param_2 + param_1) - 1; cVar4 = '\x01'; if (9 < uVar5) { uVar3 = uVar5; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_0011d63c; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_0011d63c; } if (uVar3 < 10000) goto LAB_0011d63c; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0011d63c: local_50 = local_40; /* try { // try from 0011d646 to 0011d64c has its CatchHandler @ 0011d743 */ std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>(local_50,local_48,uVar5); /* try { // try from 0011d668 to 0011d66f has its CatchHandler @ 0011d741 */ std::__cxx11::string::_M_append((char *)this,(ulong)local_50); if (local_50 != local_40) { operator_delete(local_50); } /* try { // try from 0011d67f to 0011d68d has its CatchHandler @ 0011d75b */ std::__cxx11::string::append((char *)this); cVar4 = '\x01'; if (9 < param_3) { uVar5 = param_3; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar5 < 100) { cVar4 = cVar4 + -2; goto LAB_0011d6e8; } if (uVar5 < 1000) { cVar4 = cVar4 + -1; goto LAB_0011d6e8; } if (uVar5 < 10000) goto LAB_0011d6e8; bVar1 = 99999 < uVar5; uVar5 = uVar5 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0011d6e8: local_50 = local_40; /* try { // try from 0011d6f2 to 0011d6f8 has its CatchHandler @ 0011d73f */ std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>(local_50,local_48,param_3); /* try { // try from 0011d714 to 0011d71b has its CatchHandler @ 0011d73d */ std::__cxx11::string::_M_append((char *)this,(ulong)local_50); if (local_50 != local_40) { operator_delete(local_50); } return this; }
8,627
minja::Parser::parseMathPow()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPow() { auto left = parseMathPlusMinus(); if (!left) throw std::runtime_error("Expected left side of 'math pow' expression"); while (!consumeToken("**").empty()) { auto right = parseMathPlusMinus(); if (!right) throw std::runtime_error("Expected right side of 'math pow' expression"); left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::MulMul); } return left; }
O2
cpp
minja::Parser::parseMathPow(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %rbx callq 0x61666 cmpq $0x0, (%rbx) je 0x615ab leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r12 leaq 0x38(%rsp), %r13 movq %r14, %rdi leaq 0x381bb(%rip), %rsi # 0x99685 movq %r12, %rdx callq 0x255a4 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx pushq $0x1 popq %rcx callq 0x55ed0 movq 0x40(%rsp), %rbp movq %r13, %rdi callq 0x22078 movq %r14, %rdi callq 0x22078 testq %rbp, %rbp je 0x61567 movq %r14, %rdi movq %r15, %rsi callq 0x61666 cmpq $0x0, 0x8(%rsp) je 0x61579 movq %r13, %rdi movq %r15, %rsi callq 0x55474 movl $0x4, 0x4(%rsp) movq %r12, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r14, %rcx leaq 0x4(%rsp), %r8 callq 0x6163f movq %rbx, %rdi movq %r12, %rsi callq 0x6adc8 leaq 0x30(%rsp), %rdi callq 0x341e0 leaq 0x40(%rsp), %rdi callq 0x341e0 leaq 0x10(%rsp), %rdi callq 0x341e0 jmp 0x614c0 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %r15 leaq 0x380fd(%rip), %rsi # 0x99688 movq %rax, %rdi callq 0x212d0 movq 0x78a56(%rip), %rsi # 0xd9ff0 movq 0x789c7(%rip), %rdx # 0xd9f68 movq %r15, %rdi callq 0x21de0 jmp 0x615db pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %r15 leaq 0x3809c(%rip), %rsi # 0x99659 movq %rax, %rdi callq 0x212d0 movq 0x78a24(%rip), %rsi # 0xd9ff0 movq 0x78995(%rip), %rdx # 0xd9f68 movq %r15, %rdi callq 0x21de0 jmp 0x61619 movq %rax, %r14 movq %r15, %rdi callq 0x215c0 jmp 0x6162b jmp 0x615f9 movq %rax, %r14 movq %r15, %rdi callq 0x215c0 jmp 0x6160b movq %rax, %r14 jmp 0x6160b movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x341e0 leaq 0x10(%rsp), %rdi callq 0x341e0 jmp 0x6162b jmp 0x61619 movq %rax, %r14 jmp 0x6162b movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x22078 addq $0x8, %rbx movq %rbx, %rdi callq 0x341e0 movq %r14, %rdi callq 0x21e50
_ZN5minja6Parser12parseMathPowEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rsi mov rbx, rdi call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp qword ptr [rbx], 0 jz loc_615AB lea r14, [rsp+88h+var_80] lea r12, [rsp+88h+var_60] lea r13, [rsp+88h+var_50] loc_614C0: mov rdi, r14 lea rsi, asc_99685; "**" mov rdx, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r13 mov rsi, r15 mov rdx, r14 push 1 pop rcx call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov rbp, [rsp+88h+var_48] mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbp, rbp jz short loc_61567 mov rdi, r14; this mov rsi, r15 call _ZN5minja6Parser18parseMathPlusMinusEv; minja::Parser::parseMathPlusMinus(void) cmp [rsp+88h+var_80], 0 jz short loc_61579 mov rdi, r13; this mov rsi, r15 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) mov [rsp+88h+var_84], 4 mov rdi, r12 mov rsi, r13 mov rdx, rbx mov rcx, r14 lea r8, [rsp+88h+var_84] call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&) mov rdi, rbx mov rsi, r12 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr20__sp_compatible_withIPT_PS1_EE5valueERS4_E4typeEOS_IS8_LS3_2EE lea rdi, [rsp+88h+var_58] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_614C0 loc_61567: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_61579: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_3; "Expected right side of 'math pow' expre"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_615DB loc_615AB: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_3; "Expected left side of 'math pow' expres"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_615DB: jmp short loc_61619 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6162B jmp short loc_615F9 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6160B loc_615F9: mov r14, rax jmp short loc_6160B mov r14, rax lea rdi, [rsp+88h+var_48] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_6160B: lea rdi, [rsp+88h+var_78] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_6162B jmp short $+2 loc_61619: mov r14, rax jmp short loc_6162B mov r14, rax lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6162B: add rbx, 8 mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPow(minja::Parser *this, _QWORD *a2) { long long v2; // rbp std::runtime_error *v4; // r15 std::runtime_error *exception; // r15 int v6; // [rsp+4h] [rbp-84h] BYREF long long v7; // [rsp+8h] [rbp-80h] BYREF _QWORD v8[3]; // [rsp+10h] [rbp-78h] BYREF _BYTE v9[8]; // [rsp+28h] [rbp-60h] BYREF long long v10; // [rsp+30h] [rbp-58h] BYREF long long v11; // [rsp+38h] [rbp-50h] BYREF _QWORD v12[9]; // [rsp+40h] [rbp-48h] BYREF minja::Parser::parseMathPlusMinus(this); if ( !*(_QWORD *)this ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math pow' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } while ( 1 ) { std::string::basic_string<std::allocator<char>>(&v7, (long long)"**"); minja::Parser::consumeToken(&v11, (long long)a2, &v7, 1u); v2 = v12[0]; std::string::~string(&v11); std::string::~string(&v7); if ( !v2 ) break; minja::Parser::parseMathPlusMinus((minja::Parser *)&v7); if ( !v7 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected right side of 'math pow' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::get_location((minja::Parser *)&v11, a2); v6 = 4; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>( v9, &v11, this, &v7, &v6); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=<minja::BinaryOpExpr>(this, v9); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8); } return this; }
parseMathPow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV RBX,RDI CALL 0x00161666 CMP qword ptr [RBX],0x0 JZ 0x001615ab LEA R14,[RSP + 0x8] LEA R12,[RSP + 0x28] LEA R13,[RSP + 0x38] LAB_001614c0: MOV RDI,R14 LEA RSI,[0x199685] MOV RDX,R12 CALL 0x001255a4 LAB_001614d2: MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 PUSH 0x1 POP RCX CALL 0x00155ed0 MOV RBP,qword ptr [RSP + 0x40] MOV RDI,R13 CALL 0x00122078 MOV RDI,R14 CALL 0x00122078 TEST RBP,RBP JZ 0x00161567 LAB_001614fd: MOV RDI,R14 MOV RSI,R15 CALL 0x00161666 CMP qword ptr [RSP + 0x8],0x0 JZ 0x00161579 LAB_00161510: MOV RDI,R13 MOV RSI,R15 CALL 0x00155474 MOV dword ptr [RSP + 0x4],0x4 LAB_00161523: MOV RDI,R12 MOV RSI,R13 MOV RDX,RBX MOV RCX,R14 LEA R8,[RSP + 0x4] CALL 0x0016163f LAB_00161539: MOV RDI,RBX MOV RSI,R12 CALL 0x0016adc8 LEA RDI,[RSP + 0x30] CALL 0x001341e0 LEA RDI,[RSP + 0x40] CALL 0x001341e0 LEA RDI,[RSP + 0x10] CALL 0x001341e0 JMP 0x001614c0 LAB_00161567: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00161579: PUSH 0x10 POP RDI CALL 0x001213f0 MOV R15,RAX LAB_00161584: LEA RSI,[0x199688] MOV RDI,RAX CALL 0x001212d0 LAB_00161593: MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,R15 CALL 0x00121de0 LAB_001615ab: PUSH 0x10 POP RDI CALL 0x001213f0 MOV R15,RAX LAB_001615b6: LEA RSI,[0x199659] MOV RDI,RAX CALL 0x001212d0 LAB_001615c5: MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,R15 CALL 0x00121de0
/* minja::Parser::parseMathPow() */ void minja::Parser::parseMathPow(void) { long lVar1; runtime_error *prVar2; __shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *in_RDI; long local_80; __shared_count<(__gnu_cxx::_Lock_policy)2> local_78 [24]; Location local_60 [8]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [8]; string local_50 [8]; long local_48 [3]; parseMathPlusMinus(); if (*(long *)in_RDI == 0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001615b6 to 001615c4 has its CatchHandler @ 001615dd */ std::runtime_error::runtime_error(prVar2,"Expected left side of \'math pow\' expression"); /* try { // try from 001615c5 to 001615da has its CatchHandler @ 001615db */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); } while( true ) { /* try { // try from 001614c0 to 001614d1 has its CatchHandler @ 00161619 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_80,"**",(allocator *)local_60); /* try { // try from 001614d2 to 001614e2 has its CatchHandler @ 0016161e */ consumeToken(local_50); lVar1 = local_48[0]; std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)&local_80); if (lVar1 == 0) { return; } /* try { // try from 001614fd to 00161507 has its CatchHandler @ 00161617 */ parseMathPlusMinus(); if (local_80 == 0) break; /* try { // try from 00161510 to 0016151a has its CatchHandler @ 001615f9 */ get_location(); /* try { // try from 00161523 to 00161538 has its CatchHandler @ 001615fe */ std:: make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op> (local_60,(shared_ptr *)local_50,(shared_ptr *)in_RDI,(Op *)&local_80); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= (in_RDI,(__shared_ptr *)local_60); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_48); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_78); } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00161584 to 00161592 has its CatchHandler @ 001615ec */ std::runtime_error::runtime_error(prVar2,"Expected right side of \'math pow\' expression"); /* try { // try from 00161593 to 001615a8 has its CatchHandler @ 001615ea */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); }
8,628
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O0
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x2e92c movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x2f, %eax jne 0x2e92c xorl %eax, %eax leaq 0x35615a(%rip), %rcx # 0x384a58 cmpq $0x0, (%rcx) movb %al, -0x11(%rbp) je 0x2e91f leaq 0x35614a(%rip), %rax # 0x384a58 movq (%rax), %rdi callq 0x2e8d0 cmpl $0x0, %eax setne %al movb %al, -0x11(%rbp) movb -0x11(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x2e948 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x2e941 movl $0x1, -0x4(%rbp) jmp 0x2e948 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_if_hard_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz short loc_2E92C mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 2Fh ; '/' jnz short loc_2E92C xor eax, eax lea rcx, home_dir cmp qword ptr [rcx], 0 mov [rbp+var_11], al jz short loc_2E91F lea rax, home_dir mov rdi, [rax] call test_if_hard_path cmp eax, 0 setnz al mov [rbp+var_11], al loc_2E91F: mov al, [rbp+var_11] and al, 1 movzx eax, al mov [rbp+var_4], eax jmp short loc_2E948 loc_2E92C: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_2E941 mov [rbp+var_4], 1 jmp short loc_2E948 loc_2E941: mov [rbp+var_4], 0 loc_2E948: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
_BOOL8 test_if_hard_path(char *a1) { bool v2; // [rsp+Fh] [rbp-11h] if ( *a1 == 126 && a1[1] == 47 ) { v2 = 0; if ( home_dir ) return (unsigned int)test_if_hard_path(home_dir) != 0; return v2; } else { return *a1 == 47; } }
test_if_hard_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7e JNZ 0x0012e92c MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x2f JNZ 0x0012e92c XOR EAX,EAX LEA RCX,[0x484a58] CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0x11],AL JZ 0x0012e91f LEA RAX,[0x484a58] MOV RDI,qword ptr [RAX] CALL 0x0012e8d0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x11],AL LAB_0012e91f: MOV AL,byte ptr [RBP + -0x11] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0012e948 LAB_0012e92c: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x0012e941 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012e948 LAB_0012e941: MOV dword ptr [RBP + -0x4],0x0 LAB_0012e948: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool test_if_hard_path(char *param_1) { int iVar1; bool local_19; if ((*param_1 == '~') && (param_1[1] == '/')) { local_19 = false; if (home_dir != 0) { iVar1 = test_if_hard_path(home_dir); local_19 = iVar1 != 0; } } else if (*param_1 == '/') { local_19 = true; } else { local_19 = false; } return local_19; }
8,629
test_if_hard_path
eloqsql/mysys/my_getwd.c
int test_if_hard_path(register const char *dir_name) { if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR) return (home_dir != NullS && test_if_hard_path(home_dir)); if (dir_name[0] == FN_LIBCHAR) return (TRUE); #ifdef FN_DEVCHAR return (strchr(dir_name,FN_DEVCHAR) != 0); #else return FALSE; #endif }
O3
c
test_if_hard_path: pushq %rbp movq %rsp, %rbp leaq 0x33a05b(%rip), %rax # 0x364d08 movq (%rax), %rax movb (%rdi), %cl cmpb $0x7e, %cl jne 0x2acc9 cmpb $0x2f, 0x1(%rdi) jne 0x2acc9 movq %rax, %rdi testq %rax, %rax jne 0x2acb0 xorl %eax, %eax jmp 0x2acd1 xorl %eax, %eax cmpb $0x2f, %cl sete %al popq %rbp retq
test_if_hard_path: push rbp mov rbp, rsp lea rax, home_dir mov rax, [rax] loc_2ACB0: mov cl, [rdi] cmp cl, 7Eh ; '~' jnz short loc_2ACC9 cmp byte ptr [rdi+1], 2Fh ; '/' jnz short loc_2ACC9 mov rdi, rax test rax, rax jnz short loc_2ACB0 xor eax, eax jmp short loc_2ACD1 loc_2ACC9: xor eax, eax cmp cl, 2Fh ; '/' setz al loc_2ACD1: pop rbp retn
_BOOL8 test_if_hard_path(_BYTE *a1) { while ( *a1 == 126 && a1[1] == 47 ) { a1 = (_BYTE *)home_dir; if ( !home_dir ) return 0LL; } return *a1 == 47; }
test_if_hard_path: PUSH RBP MOV RBP,RSP LEA RAX,[0x464d08] MOV RAX,qword ptr [RAX] LAB_0012acb0: MOV CL,byte ptr [RDI] CMP CL,0x7e JNZ 0x0012acc9 CMP byte ptr [RDI + 0x1],0x2f JNZ 0x0012acc9 MOV RDI,RAX TEST RAX,RAX JNZ 0x0012acb0 XOR EAX,EAX JMP 0x0012acd1 LAB_0012acc9: XOR EAX,EAX CMP CL,0x2f SETZ AL LAB_0012acd1: POP RBP RET
bool test_if_hard_path(char *param_1) { while ((*param_1 == '~' && (param_1[1] == '/'))) { param_1 = home_dir; if (home_dir == (char *)0x0) { return false; } } return *param_1 == '/'; }
8,630
ModelLoader::init_from_diffusers_file(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&)
7CodeWizard[P]stablediffusion/model.cpp
bool ModelLoader::init_from_diffusers_file(const std::string& file_path, const std::string& prefix) { std::string unet_path = path_join(file_path, "unet/diffusion_pytorch_model.safetensors"); std::string vae_path = path_join(file_path, "vae/diffusion_pytorch_model.safetensors"); std::string clip_path = path_join(file_path, "text_encoder/model.safetensors"); if (!init_from_safetensors_file(unet_path, "unet.")) { return false; } if (!init_from_safetensors_file(vae_path, "vae.")) { return false; } if (!init_from_safetensors_file(clip_path, "te.")) { return false; } return true; }
O1
cpp
ModelLoader::init_from_diffusers_file(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&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x59369(%rip), %rsi # 0xc201e leaq 0x5938a(%rip), %rdx # 0xc2046 leaq 0x48(%rsp), %rdi callq 0x2fa9c leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %r14, %rsi callq 0x7a222 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x68cef movq 0x58(%rsp), %rsi incq %rsi callq 0xa5e0 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x59347(%rip), %rsi # 0xc2047 leaq 0x59367(%rip), %rdx # 0xc206e leaq 0x28(%rsp), %rdi callq 0x2fa9c leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rdx movq %r14, %rsi callq 0x7a222 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x68d3a movq 0x38(%rsp), %rsi incq %rsi callq 0xa5e0 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x59325(%rip), %rsi # 0xc206f leaq 0x5933c(%rip), %rdx # 0xc208d leaq 0x8(%rsp), %rdi callq 0x2fa9c leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r14, %rsi callq 0x7a222 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68d84 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 leaq 0x8(%rsp), %rdi movq %r13, (%rdi) leaq 0x592fb(%rip), %rsi # 0xc208e leaq 0x592f9(%rip), %rdx # 0xc2093 callq 0x2fa9c leaq 0x68(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x692d8 movl %eax, %ebp movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68dca movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 testb %bpl, %bpl je 0x68e66 leaq 0x8(%rsp), %rdi movq %r13, (%rdi) leaq 0x5526d(%rip), %rsi # 0xbe04f leaq 0x5526a(%rip), %rdx # 0xbe053 callq 0x2fa9c leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x692d8 movl %eax, %ebp movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68e19 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 testb %bpl, %bpl je 0x68e66 leaq 0x8(%rsp), %rdi movq %r13, (%rdi) leaq 0x546f3(%rip), %rsi # 0xbd520 leaq 0x546ef(%rip), %rdx # 0xbd523 callq 0x2fa9c leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x692d8 movl %eax, %ebx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68e68 movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 jmp 0x68e68 xorl %ebx, %ebx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x68e7f movq 0x38(%rsp), %rsi incq %rsi callq 0xa5e0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x68e96 movq 0x58(%rsp), %rsi incq %rsi callq 0xa5e0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x68eb1 movq 0x78(%rsp), %rsi incq %rsi callq 0xa5e0 movl %ebx, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x68ecd jmp 0x68ee9 jmp 0x68ecd jmp 0x68ee9 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68eec movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 jmp 0x68eec movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x68f1c movq 0x38(%rsp), %rsi jmp 0x68f0f movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x68f1c movq 0x18(%rsp), %rsi incq %rsi callq 0xa5e0 jmp 0x68f1c movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x68f4c movq 0x58(%rsp), %rsi incq %rsi callq 0xa5e0 jmp 0x68f4c movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x68f4c movq 0x38(%rsp), %rsi jmp 0x68f2b movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x68f67 movq 0x78(%rsp), %rsi incq %rsi callq 0xa5e0 movq %rbx, %rdi callq 0xaae0 movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x68f67 movq 0x58(%rsp), %rsi jmp 0x68f5f movq %rax, %rbx jmp 0x68f67
_ZN11ModelLoader24init_from_diffusers_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov rbx, rdi lea r15, [rsp+0B8h+var_60] mov [r15-10h], r15 lea rsi, aUnetDiffusionP; "unet/diffusion_pytorch_model.safetensor"... lea rdx, aUnetDiffusionP+28h; "" lea rdi, [rsp+0B8h+var_70] 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) lea rdi, [rsp+0B8h+var_50]; int lea rdx, [rsp+0B8h+var_70]; int mov rsi, r14; int call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) mov rdi, [rsp+0B8h+var_70]; void * cmp rdi, r15 jz short loc_68CEF mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68CEF: lea r12, [rsp+0B8h+var_80] mov [r12-10h], r12 lea rsi, aVaeDiffusionPy; "vae/diffusion_pytorch_model.safetensors" lea rdx, aVaeDiffusionPy+27h; "" lea rdi, [rsp+0B8h+var_90] 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) lea rdi, [rsp+0B8h+var_70]; int lea rdx, [rsp+0B8h+var_90]; int mov rsi, r14; int call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) mov rdi, [rsp+0B8h+var_90]; void * cmp rdi, r12 jz short loc_68D3A mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68D3A: lea r13, [rsp+0B8h+var_A0] mov [r13-10h], r13 lea rsi, aTextEncoderMod; "text_encoder/model.safetensors" lea rdx, aTextEncoderMod+1Eh; "" lea rdi, [rsp+0B8h+var_B0] 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) lea rdi, [rsp+0B8h+var_90]; int lea rdx, [rsp+0B8h+var_B0]; int mov rsi, r14; int call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r13 jz short loc_68D84 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68D84: lea rdi, [rsp+0B8h+var_B0] mov [rdi], r13 lea rsi, aUnet_0; "unet." lea rdx, aUnet_0+5; "" 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) lea rsi, [rsp+0B8h+var_50] lea rdx, [rsp+0B8h+var_B0] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebp, eax mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r13 jz short loc_68DCA mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68DCA: test bpl, bpl jz loc_68E66 lea rdi, [rsp+0B8h+var_B0] mov [rdi], r13 lea rsi, aVae_0; "vae." lea rdx, aVae_0+4; "" 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) lea rsi, [rsp+0B8h+var_70] lea rdx, [rsp+0B8h+var_B0] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebp, eax mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r13 jz short loc_68E19 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68E19: test bpl, bpl jz short loc_68E66 lea rdi, [rsp+0B8h+var_B0] mov [rdi], r13 lea rsi, aBBatchCountCou+3Fh; "te." lea rdx, aBBatchCountCou+42h; "" 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) lea rsi, [rsp+0B8h+var_90] lea rdx, [rsp+0B8h+var_B0] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebx, eax mov rdi, [rsp+0B8h+var_B0]; void * cmp rdi, r13 jz short loc_68E68 mov rsi, [rsp+0B8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68E68 loc_68E66: xor ebx, ebx loc_68E68: mov rdi, [rsp+0B8h+var_90]; void * cmp rdi, r12 jz short loc_68E7F mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68E7F: mov rdi, [rsp+0B8h+var_70]; void * cmp rdi, r15 jz short loc_68E96 mov rsi, [rsp+0B8h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68E96: lea rax, [rsp+0B8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_68EB1 mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68EB1: mov eax, ebx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_68ECD jmp short loc_68EE9 jmp short loc_68ECD jmp short loc_68EE9 loc_68ECD: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_68EEC mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68EEC loc_68EE9: mov rbx, rax loc_68EEC: mov rdi, [rsp+arg_20] cmp rdi, r12 jz short loc_68F1C mov rsi, [rsp+arg_30] jmp short loc_68F0F mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_68F1C mov rsi, [rsp+arg_10] loc_68F0F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68F1C mov rbx, rax loc_68F1C: mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_68F4C mov rsi, [rsp+arg_50] loc_68F2B: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_68F4C mov rbx, rax mov rdi, [rsp+arg_20] cmp rdi, r12 jz short loc_68F4C mov rsi, [rsp+arg_30] jmp short loc_68F2B mov rbx, rax loc_68F4C: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_68F67 mov rsi, [rsp+arg_70] loc_68F5F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_68F67: mov rdi, rbx call __Unwind_Resume mov rbx, rax mov rdi, [rsp+arg_40] cmp rdi, r15 jz short loc_68F67 mov rsi, [rsp+arg_50] jmp short loc_68F5F mov rbx, rax jmp short loc_68F67
long long ModelLoader::init_from_diffusers_file(long long a1, int a2) { int v2; // ecx int v3; // r8d int v4; // r9d int v5; // ecx int v6; // r8d int v7; // r9d int v8; // ecx int v9; // r8d int v10; // r9d char v11; // bp char v12; // bp unsigned int v13; // ebx void *v15; // [rsp+0h] [rbp-B8h] void *v16; // [rsp+0h] [rbp-B8h] void *v17; // [rsp+0h] [rbp-B8h] void *v18; // [rsp+8h] [rbp-B0h] BYREF long long v19; // [rsp+10h] [rbp-A8h] _QWORD v20[2]; // [rsp+18h] [rbp-A0h] BYREF void *v21[2]; // [rsp+28h] [rbp-90h] BYREF _QWORD v22[2]; // [rsp+38h] [rbp-80h] BYREF void *v23[2]; // [rsp+48h] [rbp-70h] BYREF _QWORD v24[2]; // [rsp+58h] [rbp-60h] BYREF int v25[4]; // [rsp+68h] [rbp-50h] BYREF long long v26; // [rsp+78h] [rbp-40h] BYREF v23[0] = v24; std::string::_M_construct<char const*>(v23, "unet/diffusion_pytorch_model.safetensors", (long long)""); path_join((int)v25, a2, (int)v23, v2, v3, v4, v15, (int)v18, v19); if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); v21[0] = v22; std::string::_M_construct<char const*>(v21, "vae/diffusion_pytorch_model.safetensors", (long long)""); path_join((int)v23, a2, (int)v21, v5, v6, v7, v16, (int)v18, v19); if ( v21[0] != v22 ) operator delete(v21[0], v22[0] + 1LL); v18 = v20; std::string::_M_construct<char const*>(&v18, "text_encoder/model.safetensors", (long long)""); path_join((int)v21, a2, (int)&v18, v8, v9, v10, v17, (int)v18, v19); if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); v18 = v20; std::string::_M_construct<char const*>(&v18, "unet.", (long long)""); v11 = ModelLoader::init_from_safetensors_file(a1, v25, &v18); if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( !v11 ) goto LABEL_15; v18 = v20; std::string::_M_construct<char const*>(&v18, "vae.", (long long)""); v12 = ModelLoader::init_from_safetensors_file(a1, v23, &v18); if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); if ( v12 ) { v18 = v20; std::string::_M_construct<char const*>(&v18, "te.", (long long)""); v13 = ModelLoader::init_from_safetensors_file(a1, v21, &v18); if ( v18 != v20 ) operator delete(v18, v20[0] + 1LL); } else { LABEL_15: v13 = 0; } if ( v21[0] != v22 ) operator delete(v21[0], v22[0] + 1LL); if ( v23[0] != v24 ) operator delete(v23[0], v24[0] + 1LL); if ( *(long long **)v25 != &v26 ) operator delete(*(void **)v25, v26 + 1); return v13; }
8,631
ModelLoader::init_from_diffusers_file(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&)
7CodeWizard[P]stablediffusion/model.cpp
bool ModelLoader::init_from_diffusers_file(const std::string& file_path, const std::string& prefix) { std::string unet_path = path_join(file_path, "unet/diffusion_pytorch_model.safetensors"); std::string vae_path = path_join(file_path, "vae/diffusion_pytorch_model.safetensors"); std::string clip_path = path_join(file_path, "text_encoder/model.safetensors"); if (!init_from_safetensors_file(unet_path, "unet.")) { return false; } if (!init_from_safetensors_file(vae_path, "vae.")) { return false; } if (!init_from_safetensors_file(clip_path, "te.")) { return false; } return true; }
O2
cpp
ModelLoader::init_from_diffusers_file(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&): pushq %rbp pushq %r14 pushq %rbx subq $0x90, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x568c0(%rip), %rsi # 0x9df2e leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x19f24 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rdx movq %r14, %rsi callq 0x55d76 leaq 0x50(%rsp), %rdi callq 0xac60 leaq 0x568b7(%rip), %rsi # 0x9df57 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x19f24 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx movq %r14, %rsi callq 0x55d76 leaq 0x30(%rsp), %rdi callq 0xac60 leaq 0x568ad(%rip), %rsi # 0x9df7f leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x19f24 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rdx movq %r14, %rsi callq 0x55d76 leaq 0x10(%rsp), %rdi callq 0xac60 leaq 0x5689a(%rip), %rsi # 0x9df9e leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x19f24 leaq 0x70(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x47aae movl %eax, %ebp leaq 0x10(%rsp), %rdi callq 0xac60 testb %bpl, %bpl je 0x477a5 leaq 0x52842(%rip), %rsi # 0x99f7f leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x19f24 leaq 0x50(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x47aae movl %eax, %ebp leaq 0x10(%rsp), %rdi callq 0xac60 testb %bpl, %bpl je 0x477a5 leaq 0x51ce6(%rip), %rsi # 0x9945c leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x19f24 leaq 0x30(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x47aae movl %eax, %ebx leaq 0x10(%rsp), %rdi callq 0xac60 jmp 0x477a7 xorl %ebx, %ebx leaq 0x30(%rsp), %rdi callq 0xac60 leaq 0x50(%rsp), %rdi callq 0xac60 leaq 0x70(%rsp), %rdi callq 0xac60 movl %ebx, %eax addq $0x90, %rsp popq %rbx popq %r14 popq %rbp retq jmp 0x477db jmp 0x477ea jmp 0x477db jmp 0x477ea movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0xac60 jmp 0x477ed movq %rax, %rbx leaq 0x30(%rsp), %rdi jmp 0x477fc movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0xac60 leaq 0x50(%rsp), %rdi callq 0xac60 leaq 0x70(%rsp), %rdi callq 0xac60 movq %rbx, %rdi callq 0xaab0 movq %rax, %rbx jmp 0x47801 movq %rax, %rbx leaq 0x30(%rsp), %rdi jmp 0x47806 movq %rax, %rbx jmp 0x4780b movq %rax, %rbx leaq 0x50(%rsp), %rdi jmp 0x47810 movq %rax, %rbx jmp 0x47815
_ZN11ModelLoader24init_from_diffusers_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push rbp push r14 push rbx sub rsp, 90h mov r14, rsi mov rbx, rdi lea rsi, aUnetDiffusionP; "unet/diffusion_pytorch_model.safetensor"... lea rdi, [rsp+0A8h+var_58] lea rdx, [rsp+0A8h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_38] lea rdx, [rsp+0A8h+var_58] mov rsi, r14 call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) lea rdi, [rsp+0A8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aVaeDiffusionPy; "vae/diffusion_pytorch_model.safetensors" lea rdi, [rsp+0A8h+var_78] lea rdx, [rsp+0A8h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_58] lea rdx, [rsp+0A8h+var_78] mov rsi, r14 call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) lea rdi, [rsp+0A8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aTextEncoderMod; "text_encoder/model.safetensors" lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_78] lea rdx, [rsp+0A8h+var_98] mov rsi, r14 call _Z9path_joinRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; path_join(std::string const&,std::string const&) lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aUnet_0; "unet." lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+0A8h+var_38] lea rdx, [rsp+0A8h+var_98] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebp, eax lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jz short loc_477A5 lea rsi, aVae_0; "vae." lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+0A8h+var_58] lea rdx, [rsp+0A8h+var_98] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebp, eax lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jz short loc_477A5 lea rsi, aBBatchCountCou+3Fh; "te." lea rdi, [rsp+0A8h+var_98] lea rdx, [rsp+0A8h+var_99] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+0A8h+var_78] lea rdx, [rsp+0A8h+var_98] mov rdi, rbx call _ZN11ModelLoader26init_from_safetensors_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; ModelLoader::init_from_safetensors_file(std::string const&,std::string const&) mov ebx, eax lea rdi, [rsp+0A8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_477A7 loc_477A5: xor ebx, ebx loc_477A7: lea rdi, [rsp+0A8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, ebx add rsp, 90h pop rbx pop r14 pop rbp retn jmp short loc_477DB jmp short loc_477EA jmp short loc_477DB jmp short loc_477EA loc_477DB: mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_477ED loc_477EA: mov rbx, rax loc_477ED: lea rdi, [rsp+arg_28] jmp short loc_477FC mov rbx, rax lea rdi, [rsp+arg_8]; void * loc_477FC: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_47801: lea rdi, [rsp+arg_48]; void * loc_47806: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4780B: lea rdi, [rsp+arg_68]; void * loc_47810: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_47815: mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_47801 mov rbx, rax lea rdi, [rsp+arg_28] jmp short loc_47806 mov rbx, rax jmp short loc_4780B mov rbx, rax lea rdi, [rsp+arg_48] jmp short loc_47810 mov rbx, rax jmp short loc_47815
long long ModelLoader::init_from_diffusers_file(long long a1, long long a2) { char v2; // bp char v3; // bp unsigned int v4; // ebx _QWORD v6[4]; // [rsp+10h] [rbp-98h] BYREF _QWORD v7[4]; // [rsp+30h] [rbp-78h] BYREF _QWORD v8[4]; // [rsp+50h] [rbp-58h] BYREF _BYTE v9[56]; // [rsp+70h] [rbp-38h] BYREF std::string::basic_string<std::allocator<char>>(v8, (long long)"unet/diffusion_pytorch_model.safetensors"); path_join(v9, a2, v8); std::string::~string(v8); std::string::basic_string<std::allocator<char>>(v7, (long long)"vae/diffusion_pytorch_model.safetensors"); path_join(v8, a2, v7); std::string::~string(v7); std::string::basic_string<std::allocator<char>>(v6, (long long)"text_encoder/model.safetensors"); path_join(v7, a2, v6); std::string::~string(v6); std::string::basic_string<std::allocator<char>>(v6, (long long)"unet."); v2 = ModelLoader::init_from_safetensors_file(a1, v9, v6); std::string::~string(v6); if ( v2 && (std::string::basic_string<std::allocator<char>>(v6, (long long)"vae."), v3 = ModelLoader::init_from_safetensors_file(a1, v8, v6), std::string::~string(v6), v3) ) { std::string::basic_string<std::allocator<char>>(v6, (long long)"te."); v4 = ModelLoader::init_from_safetensors_file(a1, v7, v6); std::string::~string(v6); } else { v4 = 0; } std::string::~string(v7); std::string::~string(v8); std::string::~string(v9); return v4; }
init_from_diffusers_file: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x90 MOV R14,RSI MOV RBX,RDI LAB_00147667: LEA RSI,[0x19df2e] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] CALL 0x00119f24 LAB_0014767d: LEA RDI,[RSP + 0x70] LEA RDX,[RSP + 0x50] MOV RSI,R14 CALL 0x00155d76 LEA RDI,[RSP + 0x50] CALL 0x0010ac60 LAB_00147699: LEA RSI,[0x19df57] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] CALL 0x00119f24 LAB_001476af: LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] MOV RSI,R14 CALL 0x00155d76 LEA RDI,[RSP + 0x30] CALL 0x0010ac60 LAB_001476cb: LEA RSI,[0x19df7f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00119f24 LAB_001476e1: LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x10] MOV RSI,R14 CALL 0x00155d76 LEA RDI,[RSP + 0x10] CALL 0x0010ac60 LAB_001476fd: LEA RSI,[0x19df9e] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00119f24 LAB_00147713: LEA RSI,[RSP + 0x70] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x00147aae MOV EBP,EAX LEA RDI,[RSP + 0x10] CALL 0x0010ac60 TEST BPL,BPL JZ 0x001477a5 LAB_00147736: LEA RSI,[0x199f7f] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00119f24 LAB_0014774c: LEA RSI,[RSP + 0x50] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x00147aae MOV EBP,EAX LEA RDI,[RSP + 0x10] CALL 0x0010ac60 TEST BPL,BPL JZ 0x001477a5 LAB_0014776f: LEA RSI,[0x19945c] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00119f24 LAB_00147785: LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x00147aae LAB_00147797: MOV EBX,EAX LEA RDI,[RSP + 0x10] CALL 0x0010ac60 JMP 0x001477a7 LAB_001477a5: XOR EBX,EBX LAB_001477a7: LEA RDI,[RSP + 0x30] CALL 0x0010ac60 LEA RDI,[RSP + 0x50] CALL 0x0010ac60 LEA RDI,[RSP + 0x70] CALL 0x0010ac60 MOV EAX,EBX ADD RSP,0x90 POP RBX POP R14 POP RBP RET
/* ModelLoader::init_from_diffusers_file(std::__cxx11::string const&, std::__cxx11::string const&) */ int4 ModelLoader::init_from_diffusers_file(string *param_1,string *param_2) { char cVar1; int4 uVar2; allocator local_99; allocator local_98 [32]; allocator local_78 [32]; string local_58 [32]; string local_38 [32]; /* try { // try from 00147667 to 0014767c has its CatchHandler @ 0014783b */ std::__cxx11::string::string<std::allocator<char>> (local_58,"unet/diffusion_pytorch_model.safetensors",local_78); /* try { // try from 0014767d to 0014768e has its CatchHandler @ 00147831 */ path_join(local_38,param_2); std::__cxx11::string::~string(local_58); /* try { // try from 00147699 to 001476ae has its CatchHandler @ 0014782c */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_78,"vae/diffusion_pytorch_model.safetensors",local_98); /* try { // try from 001476af to 001476c0 has its CatchHandler @ 00147822 */ path_join(local_58,param_2); std::__cxx11::string::~string((string *)local_78); /* try { // try from 001476cb to 001476e0 has its CatchHandler @ 0014781d */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_98,"text_encoder/model.safetensors",&local_99); /* try { // try from 001476e1 to 001476f2 has its CatchHandler @ 001477f4 */ path_join((string *)local_78,param_2); std::__cxx11::string::~string((string *)local_98); /* try { // try from 001476fd to 00147712 has its CatchHandler @ 001477ea */ std::__cxx11::string::string<std::allocator<char>>((string *)local_98,"unet.",&local_99); /* try { // try from 00147713 to 00147724 has its CatchHandler @ 001477db */ cVar1 = init_from_safetensors_file((ModelLoader *)param_1,local_38,(string *)local_98); std::__cxx11::string::~string((string *)local_98); if (cVar1 != '\0') { /* try { // try from 00147736 to 0014774b has its CatchHandler @ 001477d9 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_98,"vae.",&local_99); /* try { // try from 0014774c to 0014775d has its CatchHandler @ 001477d7 */ cVar1 = init_from_safetensors_file((ModelLoader *)param_1,local_58,(string *)local_98); std::__cxx11::string::~string((string *)local_98); if (cVar1 != '\0') { /* try { // try from 0014776f to 00147784 has its CatchHandler @ 001477d5 */ std::__cxx11::string::string<std::allocator<char>>((string *)local_98,"te.",&local_99); /* try { // try from 00147785 to 00147796 has its CatchHandler @ 001477d3 */ uVar2 = init_from_safetensors_file ((ModelLoader *)param_1,(string *)local_78,(string *)local_98); std::__cxx11::string::~string((string *)local_98); goto LAB_001477a7; } } uVar2 = 0; LAB_001477a7: std::__cxx11::string::~string((string *)local_78); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_38); return uVar2; }
8,632
check_skipped_lsn
eloqsql/storage/maria/ma_loghandler.c
void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file, pgcache_page_no_t page) { if (lsn <= log_descriptor.horizon) { DBUG_PRINT("info", ("Page is up to date, skipping redo")); } else { /* Give error, but don't flood the log */ if (skipped_lsn_err_count++ < MAX_LSN_ERRORS && ! info->s->redo_error_given++) { eprint(tracef, "Table %s has wrong LSN: " LSN_FMT " on page: %llu", (index_file ? info->s->data_file_name.str : info->s->index_file_name.str), LSN_IN_PARTS(lsn), (ulonglong) page); recovery_found_crashed_tables++; } } }
O0
c
check_skipped_lsn: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq 0xbef484(%rip), %rax # 0xc7c058 jg 0x8cbdf jmp 0x8cbd8 jmp 0x8cbda jmp 0x8ccab leaq 0xbefa4a(%rip), %rax # 0xc7c630 movl (%rax), %eax movl %eax, %edx addl $0x1, %edx leaq 0xbefa3c(%rip), %rcx # 0xc7c630 movl %edx, (%rcx) cmpl $0xa, %eax jae 0x8cca9 movq -0x8(%rbp), %rax movq (%rax), %rcx movb 0x7eb(%rcx), %al movb %al, %dl addb $0x1, %dl movb %dl, 0x7eb(%rcx) cmpb $0x0, %al jne 0x8cca9 leaq 0xbef9fa(%rip), %rax # 0xc7c620 movq (%rax), %rax movq %rax, -0x28(%rbp) movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x8cc4a movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x5c0(%rax), %rax movq %rax, -0x30(%rbp) jmp 0x8cc5c movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x5d0(%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rdx movq -0x10(%rbp), %rax sarq $0x20, %rax movl %eax, %ecx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl %eax, %r8d movq -0x20(%rbp), %r9 leaq 0xc60e3(%rip), %rsi # 0x152d6d movb $0x0, %al callq 0x9c210 leaq 0xbef990(%rip), %rax # 0xc7c628 movq (%rax), %rcx addq $0x1, %rcx leaq 0xbef982(%rip), %rax # 0xc7c628 movq %rcx, (%rax) jmp 0x8ccab addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
check_skipped_lsn: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp rax, cs:qword_C7C058 jg short loc_8CBDF jmp short $+2 loc_8CBD8: jmp short $+2 loc_8CBDA: jmp loc_8CCAB loc_8CBDF: lea rax, skipped_lsn_err_count mov eax, [rax] mov edx, eax add edx, 1 lea rcx, skipped_lsn_err_count mov [rcx], edx cmp eax, 0Ah jnb loc_8CCA9 mov rax, [rbp+var_8] mov rcx, [rax] mov al, [rcx+7EBh] mov dl, al add dl, 1 mov [rcx+7EBh], dl cmp al, 0 jnz loc_8CCA9 lea rax, tracef mov rax, [rax] mov [rbp+var_28], rax movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_8CC4A mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+5C0h] mov [rbp+var_30], rax jmp short loc_8CC5C loc_8CC4A: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+5D0h] mov [rbp+var_30], rax loc_8CC5C: mov rdi, [rbp+var_28] mov rdx, [rbp+var_30] mov rax, [rbp+var_10] sar rax, 20h mov ecx, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov r8d, eax mov r9, [rbp+var_20] lea rsi, aTableSHasWrong; "Table %s has wrong LSN: (%u,0x%x) on pa"... mov al, 0 call eprint lea rax, recovery_found_crashed_tables mov rcx, [rax] add rcx, 1 lea rax, recovery_found_crashed_tables mov [rax], rcx loc_8CCA9: jmp short $+2 loc_8CCAB: add rsp, 30h pop rbp retn
char check_skipped_lsn(long long a1, long long a2, char a3, int a4) { _QWORD *v4; // rax LOBYTE(v4) = a2; if ( a2 > qword_C7C058 ) { LODWORD(v4) = skipped_lsn_err_count++; if ( (unsigned int)v4 < 0xA ) { LOBYTE(v4) = *(_BYTE *)(*(_QWORD *)a1 + 2027LL); *(_BYTE *)(*(_QWORD *)a1 + 2027LL) = (_BYTE)v4 + 1; if ( !(_BYTE)v4 ) { if ( a3 ) eprint( tracef, (unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu", *(_QWORD *)(*(_QWORD *)a1 + 1472LL), HIDWORD(a2), a2, a4, *(_QWORD *)(*(_QWORD *)a1 + 1472LL)); else eprint( tracef, (unsigned int)"Table %s has wrong LSN: (%u,0x%x) on page: %llu", *(_QWORD *)(*(_QWORD *)a1 + 1488LL), HIDWORD(a2), a2, a4, *(_QWORD *)(*(_QWORD *)a1 + 1488LL)); v4 = &recovery_found_crashed_tables; ++recovery_found_crashed_tables; } } } return (char)v4; }
check_skipped_lsn: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [0x00d7c058] JG 0x0018cbdf JMP 0x0018cbd8 LAB_0018cbd8: JMP 0x0018cbda LAB_0018cbda: JMP 0x0018ccab LAB_0018cbdf: LEA RAX,[0xd7c630] MOV EAX,dword ptr [RAX] MOV EDX,EAX ADD EDX,0x1 LEA RCX,[0xd7c630] MOV dword ptr [RCX],EDX CMP EAX,0xa JNC 0x0018cca9 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV AL,byte ptr [RCX + 0x7eb] MOV DL,AL ADD DL,0x1 MOV byte ptr [RCX + 0x7eb],DL CMP AL,0x0 JNZ 0x0018cca9 LEA RAX,[0xd7c620] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x0018cc4a MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x5c0] MOV qword ptr [RBP + -0x30],RAX JMP 0x0018cc5c LAB_0018cc4a: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x5d0] MOV qword ptr [RBP + -0x30],RAX LAB_0018cc5c: MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 MOV ECX,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV R8D,EAX MOV R9,qword ptr [RBP + -0x20] LEA RSI,[0x252d6d] MOV AL,0x0 CALL 0x0019c210 LEA RAX,[0xd7c628] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0xd7c628] MOV qword ptr [RAX],RCX LAB_0018cca9: JMP 0x0018ccab LAB_0018ccab: ADD RSP,0x30 POP RBP RET
void check_skipped_lsn(long *param_1,ulong param_2,char param_3,int8 param_4) { char cVar1; uint uVar2; bool bVar3; int8 local_38; if (((DAT_00d7c058 < (long)param_2) && (uVar2 = skipped_lsn_err_count + 1, bVar3 = skipped_lsn_err_count < 10, skipped_lsn_err_count = uVar2, bVar3)) && (cVar1 = *(char *)(*param_1 + 0x7eb), *(char *)(*param_1 + 0x7eb) = cVar1 + '\x01', cVar1 == '\0')) { if (param_3 == '\0') { local_38 = *(int8 *)(*param_1 + 0x5d0); } else { local_38 = *(int8 *)(*param_1 + 0x5c0); } eprint(tracef,"Table %s has wrong LSN: (%u,0x%x) on page: %llu",local_38, (long)param_2 >> 0x20 & 0xffffffff,param_2 & 0xffffffff,param_4); recovery_found_crashed_tables = recovery_found_crashed_tables + 1; } return; }
8,633
codegen_handle_composition_call
tsotchke[P]eshkol/src/backend/codegen/closures.c
bool codegen_handle_composition_call(CodegenContext* context, const AstNode* node, FILE* output) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_CALL); assert(output != NULL); // Get diagnostics context DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); // Check if this is a direct call to 'compose' if (node->as.call.callee->type == AST_IDENTIFIER && strcmp(node->as.call.callee->as.identifier.name, "compose") == 0 && node->as.call.arg_count >= 2) { // Use the specialized handler for direct compose calls return codegen_handle_direct_composition(context, node, output); } // Check if this is a direct call to 'compose-n' if (node->as.call.callee->type == AST_IDENTIFIER && strcmp(node->as.call.callee->as.identifier.name, "compose-n") == 0) { // Handle compose-n specially return codegen_handle_compose_n(context, node, output); } // For other composition calls, use a more robust approach diagnostic_debug(diagnostics, node->line, node->column, "Handling function composition call"); // Generate a temporary variable for the closure fprintf(output, "({ EshkolClosure* _compose_closure = "); if (!codegen_generate_expression(context, node->as.call.callee)) { return false; } // Call the function directly using eshkol_closure_call fprintf(output, "; eshkol_closure_call(_compose_closure, (void*[]){"); // Generate arguments for (size_t i = 0; i < node->as.call.arg_count; i++) { if (i > 0) { fprintf(output, ", "); } fprintf(output, "(void*)("); if (!codegen_generate_expression(context, node->as.call.args[i])) { return false; } fprintf(output, ")"); } fprintf(output, "}); })"); return true; }
O1
c
codegen_handle_composition_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x10ead movq %rsi, %r14 testq %rsi, %rsi je 0x10ecc cmpl $0x19, (%r14) jne 0x10eeb movq %rdx, %rbx testq %rdx, %rdx je 0x10f0a movq %rdi, %r15 callq 0xb838 movq %rax, %r12 movq 0x48(%r14), %r13 movl (%r13), %ebp cmpl $0x6, %ebp jne 0x10d96 movq 0x48(%r13), %rdi leaq 0xe8b8(%rip), %rsi # 0x1f605 callq 0x21f0 testl %eax, %eax jne 0x10d79 cmpq $0x2, 0x58(%r14) jb 0x10d79 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x10bb7 cmpl $0x6, %ebp jne 0x10d96 movq 0x48(%r13), %rdi leaq 0xf231(%rip), %rsi # 0x1ffba callq 0x21f0 testl %eax, %eax je 0x10e91 movl 0x8(%r14), %esi movl 0x10(%r14), %edx leaq 0xf21f(%rip), %rcx # 0x1ffc4 movq %r12, %rdi callq 0x405e leaq 0xf233(%rip), %rdi # 0x1ffe7 movl $0x25, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x48(%r14), %rsi movq %r15, %rdi callq 0x115b0 testb %al, %al je 0x10e80 leaq 0xf22c(%rip), %rdi # 0x2000d movl $0x32, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 cmpq $0x0, 0x58(%r14) je 0x10e63 xorl %ebp, %ebp leaq 0xfa9f(%rip), %r12 # 0x208a2 leaq 0x105f8(%rip), %r13 # 0x21402 testq %rbp, %rbp je 0x10e24 movl $0x2, %esi movl $0x1, %edx movq %r13, %rdi movq %rbx, %rcx callq 0x22c0 movl $0x8, %esi movl $0x1, %edx movq %r12, %rdi movq %rbx, %rcx callq 0x22c0 movq 0x50(%r14), %rax movq (%rax,%rbp,8), %rsi movq %r15, %rdi callq 0x115b0 testb %al, %al je 0x10e80 movl $0x29, %edi movq %rbx, %rsi callq 0x21c0 incq %rbp cmpq 0x58(%r14), %rbp jb 0x10e0a leaq 0xf1d6(%rip), %rdi # 0x20040 movl $0x6, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movb $0x1, %al jmp 0x10e82 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x10f29 leaq 0x9eb3(%rip), %rdi # 0x1ad67 leaq 0xe9e8(%rip), %rsi # 0x1f8a3 leaq 0xf0a7(%rip), %rcx # 0x1ff69 movl $0x218, %edx # imm = 0x218 callq 0x2180 leaq 0xba0d(%rip), %rdi # 0x1c8e0 leaq 0xe9c9(%rip), %rsi # 0x1f8a3 leaq 0xf088(%rip), %rcx # 0x1ff69 movl $0x219, %edx # imm = 0x219 callq 0x2180 leaq 0xf029(%rip), %rdi # 0x1ff1b leaq 0xe9aa(%rip), %rsi # 0x1f8a3 leaq 0xf069(%rip), %rcx # 0x1ff69 movl $0x21a, %edx # imm = 0x21A callq 0x2180 leaq 0xc97f(%rip), %rdi # 0x1d890 leaq 0xe98b(%rip), %rsi # 0x1f8a3 leaq 0xf04a(%rip), %rcx # 0x1ff69 movl $0x21b, %edx # imm = 0x21B callq 0x2180
codegen_handle_composition_call: push rbp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_10EAD mov r14, rsi test rsi, rsi jz loc_10ECC cmp dword ptr [r14], 19h jnz loc_10EEB mov rbx, rdx test rdx, rdx jz loc_10F0A mov r15, rdi call codegen_context_get_diagnostics mov r12, rax mov r13, [r14+48h] mov ebp, [r13+0] cmp ebp, 6 jnz short loc_10D96 mov rdi, [r13+48h] lea rsi, aCompose; "compose" call _strcmp test eax, eax jnz short loc_10D79 cmp qword ptr [r14+58h], 2 jb short loc_10D79 mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp codegen_handle_direct_composition loc_10D79: cmp ebp, 6 jnz short loc_10D96 mov rdi, [r13+48h] lea rsi, aComposeN; "compose-n" call _strcmp test eax, eax jz loc_10E91 loc_10D96: mov esi, [r14+8] mov edx, [r14+10h] lea rcx, aHandlingFuncti; "Handling function composition call" mov rdi, r12 call diagnostic_debug lea rdi, aEshkolclosureC; "({ EshkolClosure* _compose_closure = " mov esi, 25h ; '%' mov edx, 1 mov rcx, rbx call _fwrite mov rsi, [r14+48h] mov rdi, r15 call codegen_generate_expression test al, al jz loc_10E80 lea rdi, aEshkolClosureC_2; "; eshkol_closure_call(_compose_closure,"... mov esi, 32h ; '2' mov edx, 1 mov rcx, rbx call _fwrite cmp qword ptr [r14+58h], 0 jz short loc_10E63 xor ebp, ebp lea r12, aVoidCalleeVoid+10h; "(void*)(" lea r13, aCharBuffer64Sn+3Ah; ", " loc_10E0A: test rbp, rbp jz short loc_10E24 mov esi, 2 mov edx, 1 mov rdi, r13 mov rcx, rbx call _fwrite loc_10E24: mov esi, 8 mov edx, 1 mov rdi, r12 mov rcx, rbx call _fwrite mov rax, [r14+50h] mov rsi, [rax+rbp*8] mov rdi, r15 call codegen_generate_expression test al, al jz short loc_10E80 mov edi, 29h ; ')' mov rsi, rbx call _fputc inc rbp cmp rbp, [r14+58h] jb short loc_10E0A loc_10E63: lea rdi, asc_20040; "}); })" mov esi, 6 mov edx, 1 mov rcx, rbx call _fwrite mov al, 1 jmp short loc_10E82 loc_10E80: xor eax, eax loc_10E82: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_10E91: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp codegen_handle_compose_n loc_10EAD: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 218h call ___assert_fail loc_10ECC: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 219h call ___assert_fail loc_10EEB: lea rdi, aNodeTypeAstCal; "node->type == AST_CALL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 21Ah call ___assert_fail loc_10F0A: lea rdi, aContextOutputN+9; "output != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 21Bh call ___assert_fail
char codegen_handle_composition_call(long long a1, long long a2, long long a3) { long long v4; // r8 long long v5; // r9 long long diagnostics; // r12 long long v7; // r13 long long v9; // rbp if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 536LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 537LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( *(_DWORD *)a2 != 25 ) __assert_fail( "node->type == AST_CALL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 538LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( !a3 ) __assert_fail( "output != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 539LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); diagnostics = codegen_context_get_diagnostics(a1); v7 = *(_QWORD *)(a2 + 72); if ( *(_DWORD *)v7 != 6 ) goto LABEL_10; if ( !(unsigned int)strcmp(*(_QWORD *)(v7 + 72), "compose") && *(_QWORD *)(a2 + 88) >= 2uLL ) return codegen_handle_direct_composition(a1, a2, a3); if ( !(unsigned int)strcmp(*(_QWORD *)(v7 + 72), "compose-n") ) return codegen_handle_compose_n(a1, a2, a3); LABEL_10: diagnostic_debug( diagnostics, *(_DWORD *)(a2 + 8), *(_DWORD *)(a2 + 16), (long long)"Handling function composition call", v4, v5); fwrite("({ EshkolClosure* _compose_closure = ", 37LL, 1LL, a3); if ( (unsigned __int8)codegen_generate_expression(a1, *(_QWORD *)(a2 + 72)) ) { fwrite("; eshkol_closure_call(_compose_closure, (void*[]){", 50LL, 1LL, a3); if ( !*(_QWORD *)(a2 + 88) ) { LABEL_17: fwrite("}); })", 6LL, 1LL, a3); return 1; } v9 = 0LL; while ( 1 ) { if ( v9 ) fwrite(", ", 2LL, 1LL, a3); fwrite("(void*)(", 8LL, 1LL, a3); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_QWORD *)(*(_QWORD *)(a2 + 80) + 8 * v9)) ) break; fputc(41LL, a3); if ( (unsigned long long)++v9 >= *(_QWORD *)(a2 + 88) ) goto LABEL_17; } } return 0; }
codegen_handle_composition_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00110ead MOV R14,RSI TEST RSI,RSI JZ 0x00110ecc CMP dword ptr [R14],0x19 JNZ 0x00110eeb MOV RBX,RDX TEST RDX,RDX JZ 0x00110f0a MOV R15,RDI CALL 0x0010b838 MOV R12,RAX MOV R13,qword ptr [R14 + 0x48] MOV EBP,dword ptr [R13] CMP EBP,0x6 JNZ 0x00110d96 MOV RDI,qword ptr [R13 + 0x48] LEA RSI,[0x11f605] CALL 0x001021f0 TEST EAX,EAX JNZ 0x00110d79 CMP qword ptr [R14 + 0x58],0x2 JC 0x00110d79 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00110bb7 LAB_00110d79: CMP EBP,0x6 JNZ 0x00110d96 MOV RDI,qword ptr [R13 + 0x48] LEA RSI,[0x11ffba] CALL 0x001021f0 TEST EAX,EAX JZ 0x00110e91 LAB_00110d96: MOV ESI,dword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0x10] LEA RCX,[0x11ffc4] MOV RDI,R12 CALL 0x0010405e LEA RDI,[0x11ffe7] MOV ESI,0x25 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV RSI,qword ptr [R14 + 0x48] MOV RDI,R15 CALL 0x001115b0 TEST AL,AL JZ 0x00110e80 LEA RDI,[0x12000d] MOV ESI,0x32 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 CMP qword ptr [R14 + 0x58],0x0 JZ 0x00110e63 XOR EBP,EBP LEA R12,[0x1208a2] LEA R13,[0x121402] LAB_00110e0a: TEST RBP,RBP JZ 0x00110e24 MOV ESI,0x2 MOV EDX,0x1 MOV RDI,R13 MOV RCX,RBX CALL 0x001022c0 LAB_00110e24: MOV ESI,0x8 MOV EDX,0x1 MOV RDI,R12 MOV RCX,RBX CALL 0x001022c0 MOV RAX,qword ptr [R14 + 0x50] MOV RSI,qword ptr [RAX + RBP*0x8] MOV RDI,R15 CALL 0x001115b0 TEST AL,AL JZ 0x00110e80 MOV EDI,0x29 MOV RSI,RBX CALL 0x001021c0 INC RBP CMP RBP,qword ptr [R14 + 0x58] JC 0x00110e0a LAB_00110e63: LEA RDI,[0x120040] MOV ESI,0x6 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV AL,0x1 JMP 0x00110e82 LAB_00110e80: XOR EAX,EAX LAB_00110e82: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00110e91: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00110f29 LAB_00110ead: LEA RDI,[0x11ad67] LEA RSI,[0x11f8a3] LEA RCX,[0x11ff69] MOV EDX,0x218 CALL 0x00102180 LAB_00110ecc: LEA RDI,[0x11c8e0] LEA RSI,[0x11f8a3] LEA RCX,[0x11ff69] MOV EDX,0x219 CALL 0x00102180 LAB_00110eeb: LEA RDI,[0x11ff1b] LEA RSI,[0x11f8a3] LEA RCX,[0x11ff69] MOV EDX,0x21a CALL 0x00102180 LAB_00110f0a: LEA RDI,[0x11d890] LEA RSI,[0x11f8a3] LEA RCX,[0x11ff69] MOV EDX,0x21b CALL 0x00102180
int8 codegen_handle_composition_call(long param_1,int *param_2,FILE *param_3) { int *piVar1; char cVar2; int iVar3; int8 uVar4; ulong uVar5; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x218, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x219, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (*param_2 != 0x19) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_CALL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x21a, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (param_3 == (FILE *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("output != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x21b, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } uVar4 = codegen_context_get_diagnostics(); piVar1 = *(int **)(param_2 + 0x12); if (*piVar1 == 6) { iVar3 = strcmp(*(char **)(piVar1 + 0x12),"compose"); if ((iVar3 == 0) && (1 < *(ulong *)(param_2 + 0x16))) { uVar4 = codegen_handle_direct_composition(param_1,param_2,param_3); return uVar4; } iVar3 = strcmp(*(char **)(piVar1 + 0x12),"compose-n"); if (iVar3 == 0) { uVar4 = codegen_handle_compose_n(param_1,param_2,param_3); return uVar4; } } diagnostic_debug(uVar4,param_2[2],param_2[4],"Handling function composition call"); fwrite("({ EshkolClosure* _compose_closure = ",0x25,1,param_3); cVar2 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x12)); if (cVar2 == '\0') { LAB_00110e80: uVar4 = 0; } else { fwrite("; eshkol_closure_call(_compose_closure, (void*[]){",0x32,1,param_3); if (*(long *)(param_2 + 0x16) != 0) { uVar5 = 0; do { if (uVar5 != 0) { fwrite(", ",2,1,param_3); } fwrite("(void*)(",8,1,param_3); cVar2 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x14) + uVar5 * 8)); if (cVar2 == '\0') goto LAB_00110e80; fputc(0x29,param_3); uVar5 = uVar5 + 1; } while (uVar5 < *(ulong *)(param_2 + 0x16)); } fwrite("}); })",6,1,param_3); uVar4 = 1; } return uVar4; }
8,634
codegen_handle_composition_call
tsotchke[P]eshkol/src/backend/codegen/closures.c
bool codegen_handle_composition_call(CodegenContext* context, const AstNode* node, FILE* output) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_CALL); assert(output != NULL); // Get diagnostics context DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); // Check if this is a direct call to 'compose' if (node->as.call.callee->type == AST_IDENTIFIER && strcmp(node->as.call.callee->as.identifier.name, "compose") == 0 && node->as.call.arg_count >= 2) { // Use the specialized handler for direct compose calls return codegen_handle_direct_composition(context, node, output); } // Check if this is a direct call to 'compose-n' if (node->as.call.callee->type == AST_IDENTIFIER && strcmp(node->as.call.callee->as.identifier.name, "compose-n") == 0) { // Handle compose-n specially return codegen_handle_compose_n(context, node, output); } // For other composition calls, use a more robust approach diagnostic_debug(diagnostics, node->line, node->column, "Handling function composition call"); // Generate a temporary variable for the closure fprintf(output, "({ EshkolClosure* _compose_closure = "); if (!codegen_generate_expression(context, node->as.call.callee)) { return false; } // Call the function directly using eshkol_closure_call fprintf(output, "; eshkol_closure_call(_compose_closure, (void*[]){"); // Generate arguments for (size_t i = 0; i < node->as.call.arg_count; i++) { if (i > 0) { fprintf(output, ", "); } fprintf(output, "(void*)("); if (!codegen_generate_expression(context, node->as.call.args[i])) { return false; } fprintf(output, ")"); } fprintf(output, "}); })"); return true; }
O3
c
codegen_handle_composition_call: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x10815 movq %rsi, %r14 testq %rsi, %rsi je 0x10834 cmpl $0x19, (%r14) jne 0x10853 movq %rdx, %rbx testq %rdx, %rdx je 0x10872 movq %rdi, %r15 callq 0xb340 movq %rax, %r12 movq 0x48(%r14), %rax cmpl $0x6, (%rax) jne 0x106fe movq 0x48(%rax), %r13 leaq 0xdf4d(%rip), %rsi # 0x1e605 movq %r13, %rdi callq 0x21f0 testl %eax, %eax jne 0x106e7 cmpq $0x2, 0x58(%r14) jb 0x106e7 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x10526 leaq 0xe8cc(%rip), %rsi # 0x1efba movq %r13, %rdi callq 0x21f0 testl %eax, %eax je 0x107f9 movl 0x8(%r14), %esi movl 0x10(%r14), %edx leaq 0xe8b7(%rip), %rcx # 0x1efc4 movq %r12, %rdi callq 0x3f78 leaq 0xe8cb(%rip), %rdi # 0x1efe7 movl $0x25, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movq 0x48(%r14), %rsi movq %r15, %rdi callq 0x10f0c testb %al, %al je 0x107e8 leaq 0xe8c4(%rip), %rdi # 0x1f00d movl $0x32, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 cmpq $0x0, 0x58(%r14) je 0x107cb xorl %ebp, %ebp leaq 0xf137(%rip), %r12 # 0x1f8a2 leaq 0xfcaa(%rip), %r13 # 0x2041c testq %rbp, %rbp je 0x1078c movl $0x2, %esi movl $0x1, %edx movq %r13, %rdi movq %rbx, %rcx callq 0x22c0 movl $0x8, %esi movl $0x1, %edx movq %r12, %rdi movq %rbx, %rcx callq 0x22c0 movq 0x50(%r14), %rax movq (%rax,%rbp,8), %rsi movq %r15, %rdi callq 0x10f0c testb %al, %al je 0x107e8 movl $0x29, %edi movq %rbx, %rsi callq 0x21c0 incq %rbp cmpq 0x58(%r14), %rbp jb 0x10772 leaq 0xe86e(%rip), %rdi # 0x1f040 movl $0x6, %esi movl $0x1, %edx movq %rbx, %rcx callq 0x22c0 movb $0x1, %al jmp 0x107ea xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x10891 leaq 0x9543(%rip), %rdi # 0x19d5f leaq 0xe080(%rip), %rsi # 0x1e8a3 leaq 0xe73f(%rip), %rcx # 0x1ef69 movl $0x218, %edx # imm = 0x218 callq 0x2180 leaq 0xb094(%rip), %rdi # 0x1b8cf leaq 0xe061(%rip), %rsi # 0x1e8a3 leaq 0xe720(%rip), %rcx # 0x1ef69 movl $0x219, %edx # imm = 0x219 callq 0x2180 leaq 0xe6c1(%rip), %rdi # 0x1ef1b leaq 0xe042(%rip), %rsi # 0x1e8a3 leaq 0xe701(%rip), %rcx # 0x1ef69 movl $0x21a, %edx # imm = 0x21A callq 0x2180 leaq 0xc017(%rip), %rdi # 0x1c890 leaq 0xe023(%rip), %rsi # 0x1e8a3 leaq 0xe6e2(%rip), %rcx # 0x1ef69 movl $0x21b, %edx # imm = 0x21B callq 0x2180
codegen_handle_composition_call: push rbp push r15 push r14 push r13 push r12 push rbx push rax test rdi, rdi jz loc_10815 mov r14, rsi test rsi, rsi jz loc_10834 cmp dword ptr [r14], 19h jnz loc_10853 mov rbx, rdx test rdx, rdx jz loc_10872 mov r15, rdi call codegen_context_get_diagnostics mov r12, rax mov rax, [r14+48h] cmp dword ptr [rax], 6 jnz short loc_106FE mov r13, [rax+48h] lea rsi, aCompose; "compose" mov rdi, r13 call _strcmp test eax, eax jnz short loc_106E7 cmp qword ptr [r14+58h], 2 jb short loc_106E7 mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp codegen_handle_direct_composition loc_106E7: lea rsi, aComposeN; "compose-n" mov rdi, r13 call _strcmp test eax, eax jz loc_107F9 loc_106FE: mov esi, [r14+8] mov edx, [r14+10h] lea rcx, aHandlingFuncti; "Handling function composition call" mov rdi, r12 call diagnostic_debug lea rdi, aEshkolclosureC; "({ EshkolClosure* _compose_closure = " mov esi, 25h ; '%' mov edx, 1 mov rcx, rbx call _fwrite mov rsi, [r14+48h] mov rdi, r15 call codegen_generate_expression test al, al jz loc_107E8 lea rdi, aEshkolClosureC_2; "; eshkol_closure_call(_compose_closure,"... mov esi, 32h ; '2' mov edx, 1 mov rcx, rbx call _fwrite cmp qword ptr [r14+58h], 0 jz short loc_107CB xor ebp, ebp lea r12, aVoidCalleeVoid+10h; "(void*)(" lea r13, aCharBuffer64Sn+3Ah; ", " loc_10772: test rbp, rbp jz short loc_1078C mov esi, 2 mov edx, 1 mov rdi, r13 mov rcx, rbx call _fwrite loc_1078C: mov esi, 8 mov edx, 1 mov rdi, r12 mov rcx, rbx call _fwrite mov rax, [r14+50h] mov rsi, [rax+rbp*8] mov rdi, r15 call codegen_generate_expression test al, al jz short loc_107E8 mov edi, 29h ; ')' mov rsi, rbx call _fputc inc rbp cmp rbp, [r14+58h] jb short loc_10772 loc_107CB: lea rdi, asc_1F040; "}); })" mov esi, 6 mov edx, 1 mov rcx, rbx call _fwrite mov al, 1 jmp short loc_107EA loc_107E8: xor eax, eax loc_107EA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_107F9: mov rdi, r15 mov rsi, r14 mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp codegen_handle_compose_n loc_10815: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 218h call ___assert_fail loc_10834: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 219h call ___assert_fail loc_10853: lea rdi, aNodeTypeAstCal; "node->type == AST_CALL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 21Ah call ___assert_fail loc_10872: lea rdi, aContextOutputN+9; "output != NULL" lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github/2025_star3"... lea rcx, aBoolCodegenHan_0; "_Bool codegen_handle_composition_call(C"... mov edx, 21Bh call ___assert_fail
char codegen_handle_composition_call(long long a1, long long a2, long long a3) { long long v4; // r8 long long v5; // r9 long long diagnostics; // r12 long long v7; // rax long long v8; // r13 long long v10; // rbp if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 536LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 537LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( *(_DWORD *)a2 != 25 ) __assert_fail( "node->type == AST_CALL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 538LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); if ( !a3 ) __assert_fail( "output != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c", 539LL, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)"); diagnostics = codegen_context_get_diagnostics(a1); v7 = *(_QWORD *)(a2 + 72); if ( *(_DWORD *)v7 != 6 ) goto LABEL_10; v8 = *(_QWORD *)(v7 + 72); if ( !(unsigned int)strcmp(v8, "compose") && *(_QWORD *)(a2 + 88) >= 2uLL ) return codegen_handle_direct_composition(a1, a2, a3); if ( !(unsigned int)strcmp(v8, "compose-n") ) return codegen_handle_compose_n(a1, a2, a3); LABEL_10: diagnostic_debug( diagnostics, *(_DWORD *)(a2 + 8), *(_DWORD *)(a2 + 16), (long long)"Handling function composition call", v4, v5); fwrite("({ EshkolClosure* _compose_closure = ", 37LL, 1LL, a3); if ( (unsigned __int8)codegen_generate_expression(a1, *(_QWORD *)(a2 + 72)) ) { fwrite("; eshkol_closure_call(_compose_closure, (void*[]){", 50LL, 1LL, a3); if ( !*(_QWORD *)(a2 + 88) ) { LABEL_17: fwrite("}); })", 6LL, 1LL, a3); return 1; } v10 = 0LL; while ( 1 ) { if ( v10 ) fwrite(", ", 2LL, 1LL, a3); fwrite("(void*)(", 8LL, 1LL, a3); if ( !(unsigned __int8)codegen_generate_expression(a1, *(_QWORD *)(*(_QWORD *)(a2 + 80) + 8 * v10)) ) break; fputc(41LL, a3); if ( (unsigned long long)++v10 >= *(_QWORD *)(a2 + 88) ) goto LABEL_17; } } return 0; }
codegen_handle_composition_call: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00110815 MOV R14,RSI TEST RSI,RSI JZ 0x00110834 CMP dword ptr [R14],0x19 JNZ 0x00110853 MOV RBX,RDX TEST RDX,RDX JZ 0x00110872 MOV R15,RDI CALL 0x0010b340 MOV R12,RAX MOV RAX,qword ptr [R14 + 0x48] CMP dword ptr [RAX],0x6 JNZ 0x001106fe MOV R13,qword ptr [RAX + 0x48] LEA RSI,[0x11e605] MOV RDI,R13 CALL 0x001021f0 TEST EAX,EAX JNZ 0x001106e7 CMP qword ptr [R14 + 0x58],0x2 JC 0x001106e7 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00110526 LAB_001106e7: LEA RSI,[0x11efba] MOV RDI,R13 CALL 0x001021f0 TEST EAX,EAX JZ 0x001107f9 LAB_001106fe: MOV ESI,dword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0x10] LEA RCX,[0x11efc4] MOV RDI,R12 CALL 0x00103f78 LEA RDI,[0x11efe7] MOV ESI,0x25 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV RSI,qword ptr [R14 + 0x48] MOV RDI,R15 CALL 0x00110f0c TEST AL,AL JZ 0x001107e8 LEA RDI,[0x11f00d] MOV ESI,0x32 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 CMP qword ptr [R14 + 0x58],0x0 JZ 0x001107cb XOR EBP,EBP LEA R12,[0x11f8a2] LEA R13,[0x12041c] LAB_00110772: TEST RBP,RBP JZ 0x0011078c MOV ESI,0x2 MOV EDX,0x1 MOV RDI,R13 MOV RCX,RBX CALL 0x001022c0 LAB_0011078c: MOV ESI,0x8 MOV EDX,0x1 MOV RDI,R12 MOV RCX,RBX CALL 0x001022c0 MOV RAX,qword ptr [R14 + 0x50] MOV RSI,qword ptr [RAX + RBP*0x8] MOV RDI,R15 CALL 0x00110f0c TEST AL,AL JZ 0x001107e8 MOV EDI,0x29 MOV RSI,RBX CALL 0x001021c0 INC RBP CMP RBP,qword ptr [R14 + 0x58] JC 0x00110772 LAB_001107cb: LEA RDI,[0x11f040] MOV ESI,0x6 MOV EDX,0x1 MOV RCX,RBX CALL 0x001022c0 MOV AL,0x1 JMP 0x001107ea LAB_001107e8: XOR EAX,EAX LAB_001107ea: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001107f9: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00110891 LAB_00110815: LEA RDI,[0x119d5f] LEA RSI,[0x11e8a3] LEA RCX,[0x11ef69] MOV EDX,0x218 CALL 0x00102180 LAB_00110834: LEA RDI,[0x11b8cf] LEA RSI,[0x11e8a3] LEA RCX,[0x11ef69] MOV EDX,0x219 CALL 0x00102180 LAB_00110853: LEA RDI,[0x11ef1b] LEA RSI,[0x11e8a3] LEA RCX,[0x11ef69] MOV EDX,0x21a CALL 0x00102180 LAB_00110872: LEA RDI,[0x11c890] LEA RSI,[0x11e8a3] LEA RCX,[0x11ef69] MOV EDX,0x21b CALL 0x00102180
int8 codegen_handle_composition_call(long param_1,int *param_2,FILE *param_3) { char *__s1; char cVar1; int iVar2; int8 uVar3; ulong uVar4; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x218, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x219, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (*param_2 != 0x19) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_CALL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x21a, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } if (param_3 == (FILE *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("output != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/closures.c" ,0x21b, "_Bool codegen_handle_composition_call(CodegenContext *, const AstNode *, FILE *)" ); } uVar3 = codegen_context_get_diagnostics(); if (**(int **)(param_2 + 0x12) == 6) { __s1 = *(char **)(*(int **)(param_2 + 0x12) + 0x12); iVar2 = strcmp(__s1,"compose"); if ((iVar2 == 0) && (1 < *(ulong *)(param_2 + 0x16))) { uVar3 = codegen_handle_direct_composition(param_1,param_2,param_3); return uVar3; } iVar2 = strcmp(__s1,"compose-n"); if (iVar2 == 0) { uVar3 = codegen_handle_compose_n(param_1,param_2,param_3); return uVar3; } } diagnostic_debug(uVar3,param_2[2],param_2[4],"Handling function composition call"); fwrite("({ EshkolClosure* _compose_closure = ",0x25,1,param_3); cVar1 = codegen_generate_expression(param_1,*(int8 *)(param_2 + 0x12)); if (cVar1 == '\0') { LAB_001107e8: uVar3 = 0; } else { fwrite("; eshkol_closure_call(_compose_closure, (void*[]){",0x32,1,param_3); if (*(long *)(param_2 + 0x16) != 0) { uVar4 = 0; do { if (uVar4 != 0) { fwrite(", ",2,1,param_3); } fwrite("(void*)(",8,1,param_3); cVar1 = codegen_generate_expression (param_1,*(int8 *)(*(long *)(param_2 + 0x14) + uVar4 * 8)); if (cVar1 == '\0') goto LAB_001107e8; fputc(0x29,param_3); uVar4 = uVar4 + 1; } while (uVar4 < *(ulong *)(param_2 + 0x16)); } fwrite("}); })",6,1,param_3); uVar3 = 1; } return uVar3; }
8,635
google::protobuf::FloatValue::~FloatValue()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wrappers.pb.cc
FloatValue::~FloatValue() { // @@protoc_insertion_point(destructor:google.protobuf.FloatValue) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; } SharedDtor(); }
O3
cpp
google::protobuf::FloatValue::~FloatValue(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x8(%rdi), %rbx testb $0x1, 0x8(%rdi) je 0xb07cd movq %rbx, %rdi callq 0x734ec leaq 0x159d4c(%rip), %rax # 0x20a520 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x73456 movq %rax, %rdi callq 0x33bfc
_ZN6google8protobuf10FloatValueD2Ev: push r14 push rbx push rax mov r14, rdi lea rbx, [rdi+8] test byte ptr [rdi+8], 1 jz short loc_B07CD mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata21DeleteOutOfLineHelperINS0_15UnknownFieldSetEEEPNS0_5ArenaEv; google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>(void) loc_B07CD: lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, rax call __clang_call_terminate
void google::protobuf::FloatValue::~FloatValue(google::protobuf::FloatValue *this) { if ( (*((_BYTE *)this + 8) & 1) != 0 ) google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>((long long *)this + 1); *(_QWORD *)this = &`vtable for'google::protobuf::MessageLite + 2; google::protobuf::internal::InternalMetadata::~InternalMetadata((google::protobuf::FloatValue *)((char *)this + 8)); }
~FloatValue: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RBX,[RDI + 0x8] TEST byte ptr [RDI + 0x8],0x1 JZ 0x001b07cd LAB_001b07c5: MOV RDI,RBX CALL 0x001734ec LAB_001b07cd: LEA RAX,[0x30a520] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00173456
/* google::protobuf::FloatValue::~FloatValue() */ void __thiscall google::protobuf::FloatValue::~FloatValue(FloatValue *this) { if (((byte)this[8] & 1) != 0) { /* try { // try from 001b07c5 to 001b07cc has its CatchHandler @ 001b07ea */ internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } *(int ***)this = &PTR__MessageLite_0030a530; internal::InternalMetadata::~InternalMetadata((InternalMetadata *)(this + 8)); return; }
8,636
common_sampler_sample(common_sampler*, llama_context*, int, bool)
monkey531[P]llama/common/sampling.cpp
llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) { gsmpl->set_logits(ctx, idx); auto & grmr = gsmpl->grmr; auto & chain = gsmpl->chain; auto & cur_p = gsmpl->cur_p; // initialized by set_logits if (grammar_first) { llama_sampler_apply(grmr, &cur_p); } llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration"); const llama_token id = cur_p.data[cur_p.selected].id; if (grammar_first) { return id; } // check if it the sampled token fits the grammar { llama_token_data single_token_data = { id, 1.0f, 0.0f }; llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false }; llama_sampler_apply(grmr, &single_token_data_array); const bool is_valid = single_token_data_array.data[0].logit != -INFINITY; if (is_valid) { return id; } } // resampling: // if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain gsmpl->set_logits(ctx, idx); llama_sampler_apply(grmr, &cur_p); llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration"); return cur_p.data[cur_p.selected].id; }
O2
cpp
common_sampler_sample(common_sampler*, llama_context*, int, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %r12d movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx callq 0x9abf0 leaq 0x198(%rbx), %r14 testl %r12d, %r12d je 0x99e75 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x24d70 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x24d70 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0x99f51 movq (%r14), %rcx imulq $0xc, %rax, %rax movl (%rcx,%rax), %r13d testb %r12b, %r12b jne 0x99f3f leaq 0xc(%rsp), %rax movl %r13d, (%rax) leaq 0x18(%rsp), %r12 movq %rax, (%r12) movq $0x1, 0x8(%r12) orq $-0x1, 0x10(%r12) movss 0x1220f(%rip), %xmm0 # 0xac0e0 movlps %xmm0, 0x4(%rax) movb $0x0, 0x18(%r12) movq 0x138(%rbx), %rdi movq %r12, %rsi callq 0x24d70 movq (%r12), %rax movss 0x211e6(%rip), %xmm0 # 0xbb0dc ucomiss 0x4(%rax), %xmm0 jb 0x99f3f movq %rbx, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x9abf0 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x24d70 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x24d70 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0x99f6d movq (%r14), %rcx imulq $0xc, %rax, %rax movl (%rcx,%rax), %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x212f9(%rip), %rdi # 0xbb251 leaq 0x121e1(%rip), %rdx # 0xac140 leaq 0x213b5(%rip), %rcx # 0xbb31b movl $0x133, %esi # imm = 0x133 jmp 0x99f87 leaq 0x212dd(%rip), %rdi # 0xbb251 leaq 0x121c5(%rip), %rdx # 0xac140 leaq 0x213f9(%rip), %rcx # 0xbb37b movl $0x14f, %esi # imm = 0x14F xorl %eax, %eax callq 0x24e90
_Z21common_sampler_sampleP14common_samplerP13llama_contextib: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12d, ecx mov ebp, edx mov r15, rsi mov rbx, rdi call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) lea r14, [rbx+198h] test r12d, r12d jz short loc_99E75 mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply loc_99E75: mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_99F51 mov rcx, [r14] imul rax, 0Ch mov r13d, [rcx+rax] test r12b, r12b jnz loc_99F3F lea rax, [rsp+68h+var_5C] mov [rax], r13d lea r12, [rsp+68h+var_50] mov [r12], rax mov qword ptr [r12+8], 1 or qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh movss xmm0, cs:dword_AC0E0 movlps qword ptr [rax+4], xmm0 mov byte ptr [r12+18h], 0 mov rdi, [rbx+138h] mov rsi, r12 call _llama_sampler_apply mov rax, [r12] movss xmm0, cs:dword_BB0DC ucomiss xmm0, dword ptr [rax+4] jb short loc_99F3F mov rdi, rbx mov rsi, r15 mov edx, ebp call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_99F6D mov rcx, [r14] imul rax, 0Ch mov r13d, [rcx+rax] loc_99F3F: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_99F51: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"... mov esi, 133h jmp short loc_99F87 loc_99F6D: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"... mov esi, 14Fh loc_99F87: xor eax, eax call _ggml_abort
long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4) { _QWORD *v6; // r14 long long v7; // rax unsigned int v8; // r13d long long v9; // rax int v11; // [rsp+Ch] [rbp-5Ch] BYREF double v12; // [rsp+10h] [rbp-58h] BYREF _QWORD v13[3]; // [rsp+18h] [rbp-50h] BYREF char v14; // [rsp+30h] [rbp-38h] ((void (*)(void))common_sampler::set_logits)(); v6 = a1 + 51; if ( a4 ) llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v7 = a1[53]; if ( v7 == -1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 307LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""); } else { v8 = *(_DWORD *)(*v6 + 12 * v7); if ( (_BYTE)a4 ) return v8; v11 = *(_DWORD *)(*v6 + 12 * v7); v13[0] = &v11; v13[1] = 1LL; v13[2] = -1LL; _mm_storel_ps(&v12, (__m128)0x3F800000u); v14 = 0; llama_sampler_apply(a1[39], v13); if ( *(float *)(v13[0] + 4LL) > -INFINITY ) return v8; common_sampler::set_logits(a1, a2, a3); llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v9 = a1[53]; if ( v9 != -1 ) return *(unsigned int *)(*v6 + 12 * v9); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 335LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""); } return common_sampler_sample_and_accept_n(); }
common_sampler_sample: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12D,ECX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI CALL 0x0019abf0 LEA R14,[RBX + 0x198] TEST R12D,R12D JZ 0x00199e75 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x00124d70 LAB_00199e75: MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x00124d70 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x00199f51 MOV RCX,qword ptr [R14] IMUL RAX,RAX,0xc MOV R13D,dword ptr [RCX + RAX*0x1] TEST R12B,R12B JNZ 0x00199f3f LEA RAX,[RSP + 0xc] MOV dword ptr [RAX],R13D LEA R12,[RSP + 0x18] MOV qword ptr [R12],RAX MOV qword ptr [R12 + 0x8],0x1 OR qword ptr [R12 + 0x10],-0x1 MOVSS XMM0,dword ptr [0x001ac0e0] MOVLPS qword ptr [RAX + 0x4],XMM0 MOV byte ptr [R12 + 0x18],0x0 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R12 CALL 0x00124d70 MOV RAX,qword ptr [R12] MOVSS XMM0,dword ptr [0x001bb0dc] UCOMISS XMM0,dword ptr [RAX + 0x4] JC 0x00199f3f MOV RDI,RBX MOV RSI,R15 MOV EDX,EBP CALL 0x0019abf0 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x00124d70 MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x00124d70 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x00199f6d MOV RCX,qword ptr [R14] IMUL RAX,RAX,0xc MOV R13D,dword ptr [RCX + RAX*0x1] LAB_00199f3f: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00199f51: LEA RDI,[0x1bb251] LEA RDX,[0x1ac140] LEA RCX,[0x1bb31b] MOV ESI,0x133 JMP 0x00199f87 LAB_00199f6d: LEA RDI,[0x1bb251] LEA RDX,[0x1ac140] LEA RCX,[0x1bb37b] MOV ESI,0x14f LAB_00199f87: XOR EAX,EAX CALL 0x00124e90
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_sampler_sample(common_sampler*, llama_context*, int, bool) */ int4 common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4) { common_sampler *pcVar1; int7 in_register_00000009; char *pcVar2; int8 uVar3; int4 uVar4; int4 local_5c; ulong local_58; int4 *local_50; int8 local_48; int8 local_40; int1 local_38; common_sampler::set_logits(param_1,param_2,param_3); pcVar1 = param_1 + 0x198; if ((int)CONCAT71(in_register_00000009,param_4) != 0) { llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); } llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) != -1) { uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); if (!param_4) { local_50 = &local_5c; local_48 = 1; local_40 = 0xffffffffffffffff; local_58 = (ulong)_DAT_001ac0e0; local_38 = 0; local_5c = uVar4; llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50); if ((float)local_50[1] <= DAT_001bb0dc) { common_sampler::set_logits(param_1,param_2,param_3); llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) == -1) { pcVar2 = "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"" ; uVar3 = 0x14f; goto LAB_00199f87; } uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); } } return uVar4; } pcVar2 = "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"" ; uVar3 = 0x133; LAB_00199f87: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
8,637
maria_versioning
eloqsql/storage/maria/ma_state.c
void maria_versioning(MARIA_HA *info, my_bool versioning) { MARIA_SHARE *share= info->s; DBUG_ENTER("maria_versioning"); /* For now, this is a hack */ if (share->have_versioning) { enum thr_lock_type save_lock_type; share->lock_key_trees= versioning; /* Set up info->lock.type temporary for _ma_block_get_status() */ save_lock_type= info->lock.type; info->lock.type= versioning ? TL_WRITE_CONCURRENT_INSERT : TL_WRITE; _ma_block_get_status((void*) info, versioning); info->lock.type= save_lock_type; if (versioning) info->state= &share->state.common; else info->state= &share->state.state; /* Change global values by default */ info->state_start= info->state; /* Initial values */ } DBUG_VOID_RETURN; }
O3
c
maria_versioning: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax cmpb $0x0, 0x7e8(%rax) je 0x4381a movb %sil, 0x7e3(%rax) movl 0x6d0(%rdi), %ecx xorl %r8d, %r8d movl $0x50, %edx testb %sil, %sil sete %r8b leal 0x8(%r8,%r8,4), %esi movl %esi, 0x6d0(%rdi) movq (%rdi), %r8 movl 0x7c4(%r8), %esi movq %rsi, 0x610(%rdi) movl 0x418(%r8), %r8d movl %r8d, 0x618(%rdi) je 0x437fb orl $0x1, %r8d movl %r8d, 0x618(%rdi) addq $0x6, %rsi movq %rsi, 0x610(%rdi) jmp 0x43809 movl $0x18, %edx cmpb $0x0, 0x688(%rdi) je 0x437e3 movl %ecx, 0x6d0(%rdi) addq %rdx, %rax movq %rax, 0x20(%rdi) movq %rax, 0x60(%rdi) popq %rbp retq
maria_versioning: push rbp mov rbp, rsp mov rax, [rdi] cmp byte ptr [rax+7E8h], 0 jz short loc_4381A mov [rax+7E3h], sil mov ecx, [rdi+6D0h] xor r8d, r8d mov edx, 50h ; 'P' test sil, sil setz r8b lea esi, [r8+r8*4+8] mov [rdi+6D0h], esi mov r8, [rdi] mov esi, [r8+7C4h] mov [rdi+610h], rsi mov r8d, [r8+418h] mov [rdi+618h], r8d jz short loc_437FB loc_437E3: or r8d, 1 mov [rdi+618h], r8d add rsi, 6 mov [rdi+610h], rsi jmp short loc_43809 loc_437FB: mov edx, 18h cmp byte ptr [rdi+688h], 0 jz short loc_437E3 loc_43809: mov [rdi+6D0h], ecx add rax, rdx mov [rdi+20h], rax mov [rdi+60h], rax loc_4381A: pop rbp retn
long long maria_versioning(long long *a1, char a2) { long long result; // rax int v3; // ecx long long v4; // rdx bool v5; // zf long long v6; // r8 long long v7; // rsi int v8; // r8d result = *a1; if ( *(_BYTE *)(*a1 + 2024) ) { *(_BYTE *)(result + 2019) = a2; v3 = *((_DWORD *)a1 + 436); v4 = 80LL; v5 = a2 == 0; *((_DWORD *)a1 + 436) = 5 * (a2 == 0) + 8; v6 = *a1; v7 = *(unsigned int *)(*a1 + 1988); a1[194] = v7; v8 = *(_DWORD *)(v6 + 1048); *((_DWORD *)a1 + 390) = v8; if ( !v5 || (v4 = 24LL, !*((_BYTE *)a1 + 1672)) ) { *((_DWORD *)a1 + 390) = v8 | 1; a1[194] = v7 + 6; } *((_DWORD *)a1 + 436) = v3; result += v4; a1[4] = result; a1[12] = result; } return result; }
maria_versioning: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x7e8],0x0 JZ 0x0014381a MOV byte ptr [RAX + 0x7e3],SIL MOV ECX,dword ptr [RDI + 0x6d0] XOR R8D,R8D MOV EDX,0x50 TEST SIL,SIL SETZ R8B LEA ESI,[R8 + R8*0x4 + 0x8] MOV dword ptr [RDI + 0x6d0],ESI MOV R8,qword ptr [RDI] MOV ESI,dword ptr [R8 + 0x7c4] MOV qword ptr [RDI + 0x610],RSI MOV R8D,dword ptr [R8 + 0x418] MOV dword ptr [RDI + 0x618],R8D JZ 0x001437fb LAB_001437e3: OR R8D,0x1 MOV dword ptr [RDI + 0x618],R8D ADD RSI,0x6 MOV qword ptr [RDI + 0x610],RSI JMP 0x00143809 LAB_001437fb: MOV EDX,0x18 CMP byte ptr [RDI + 0x688],0x0 JZ 0x001437e3 LAB_00143809: MOV dword ptr [RDI + 0x6d0],ECX ADD RAX,RDX MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0x60],RAX LAB_0014381a: POP RBP RET
void maria_versioning(long *param_1,char param_2) { uint uVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; lVar2 = *param_1; if (*(char *)(lVar2 + 0x7e8) != '\0') { *(char *)(lVar2 + 0x7e3) = param_2; lVar3 = param_1[0xda]; lVar4 = 0x50; *(uint *)(param_1 + 0xda) = (uint)(param_2 == '\0') * 5 + 8; uVar5 = (ulong)*(uint *)(*param_1 + 0x7c4); param_1[0xc2] = uVar5; uVar1 = *(uint *)(*param_1 + 0x418); *(uint *)(param_1 + 0xc3) = uVar1; if ((param_2 != '\0') || (lVar4 = 0x18, (char)param_1[0xd1] == '\0')) { *(uint *)(param_1 + 0xc3) = uVar1 | 1; param_1[0xc2] = uVar5 + 6; } *(int *)(param_1 + 0xda) = (int)lVar3; param_1[4] = lVar2 + lVar4; param_1[0xc] = lVar2 + lVar4; } return; }
8,638
google::protobuf::compiler::java::ImmutableEnumFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/enum_field.cc
void ImmutableEnumFieldGenerator::GenerateMembers(io::Printer* printer) const { printer->Print(variables_, "private int $name$_ = $default_number$;\n"); PrintExtraFieldInfo(variables_, printer); if (HasHazzer(descriptor_)) { WriteFieldAccessorDocComment(printer, descriptor_, HAZZER); printer->Print(variables_, "@java.lang.Override $deprecation$public boolean " "${$has$capitalized_name$$}$() {\n" " return $get_has_field_bit_message$;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } if (SupportUnknownEnumValue(descriptor_->file())) { WriteFieldEnumValueAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override $deprecation$public int " "${$get$capitalized_name$Value$}$() {\n" " return $name$_;\n" "}\n"); printer->Annotate("{", "}", descriptor_); } WriteFieldAccessorDocComment(printer, descriptor_, GETTER); printer->Print(variables_, "@java.lang.Override $deprecation$public $type$ " "${$get$capitalized_name$$}$() {\n" " $type$ result = $type$.forNumber($name$_);\n" " return result == null ? $unknown$ : result;\n" "}\n"); printer->Annotate("{", "}", descriptor_); }
O3
cpp
google::protobuf::compiler::java::ImmutableEnumFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x18(%rdi), %r15 leaq 0xf3a63(%rip), %rdx # 0x1e7f4a movq %rsi, %rdi movq %r15, %rsi callq 0x16cd32 movq %r15, %rdi movq %rbx, %rsi callq 0xd5ca2 movq 0x8(%r14), %r12 movb 0x1(%r12), %al notb %al testb $0x60, %al je 0xf456d movq %r12, %rdi callq 0x11d7ce testq %rax, %rax jne 0xf4531 movb 0x1(%r12), %al testb $0x2, %al jne 0xf4531 movq 0x10(%r12), %rcx cmpb $0x2, 0x3(%rcx) jne 0xf4600 movq 0x8(%r14), %rsi movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf3a2b(%rip), %rdx # 0x1e7f73 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xfbb7b(%rip), %rsi # 0x1f00d9 leaq 0xec168(%rip), %rdx # 0x1e06cd movq %rbx, %rdi callq 0xafc7e movq 0x8(%r14), %rsi movq 0x10(%rsi), %rax cmpb $0x3, 0x3(%rax) jne 0xf45ba movq %rbx, %rdi movl $0x1, %edx xorl %ecx, %ecx callq 0xd0175 leaq 0xf3a5b(%rip), %rdx # 0x1e7fec movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xfbb32(%rip), %rsi # 0x1f00d9 leaq 0xec11f(%rip), %rdx # 0x1e06cd movq %rbx, %rdi callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x1, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf3a82(%rip), %rdx # 0x1e8052 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0xfbaf3(%rip), %rsi # 0x1f00d9 leaq 0xec0e0(%rip), %rdx # 0x1e06cd movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0xafc7e testb $0x10, %al sete %cl movq 0x28(%r12), %rax testq %rax, %rax sete %dl orb %cl, %dl jne 0xf456d cmpl $0x1, 0x4(%rax) jne 0xf4531 movq 0x20(%rax), %rax testb $0x2, 0x1(%rax) je 0xf4531 jmp 0xf456d nop
_ZNK6google8protobuf8compiler4java27ImmutableEnumFieldGenerator15GenerateMembersEPNS0_2io7PrinterE: push r15; int push r14; int push r12; char push rbx; int push rax; void * mov rbx, rsi mov r14, rdi lea r15, [rdi+18h] lea rdx, aPrivateIntName_0; "private int $name$_ = $default_number$;"... mov rdi, rsi; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rdi, r15 mov rsi, rbx call _ZN6google8protobuf8compiler4java19PrintExtraFieldInfoERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPNS0_2io7PrinterE; google::protobuf::compiler::java::PrintExtraFieldInfo(std::map<std::string,std::string> const&,google::protobuf::io::Printer *) mov r12, [r14+8] mov al, [r12+1] not al test al, 60h jz short loc_F456D mov rdi, r12; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) test rax, rax jnz short loc_F4531 mov al, [r12+1] test al, 2 jnz short loc_F4531 mov rcx, [r12+10h] cmp byte ptr [rcx+3], 2 jnz loc_F4600 loc_F4531: mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this xor edx, edx xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_99; "@java.lang.Override $deprecation$public"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea rsi, a0oneof1+0Bh; "{" lea rdx, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) loc_F456D: mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rax, [rsi+10h] cmp byte ptr [rax+3], 3 jnz short loc_F45BA mov rdi, rbx; this mov edx, 1 xor ecx, ecx call _ZN6google8protobuf8compiler4java37WriteFieldEnumValueAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldEnumValueAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_100; "@java.lang.Override $deprecation$public"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea rsi, a0oneof1+0Bh; "{" lea rdx, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * loc_F45BA: mov rdi, rbx; this mov edx, 1 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_101; "@java.lang.Override $deprecation$public"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea rsi, a0oneof1+0Bh; "{" lea rdx, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) loc_F4600: test al, 10h setz cl mov rax, [r12+28h] test rax, rax setz dl or dl, cl jnz loc_F456D cmp dword ptr [rax+4], 1 jnz loc_F4531 mov rax, [rax+20h] test byte ptr [rax+1], 2 jz loc_F4531 jmp loc_F456D
GenerateMembers: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[RDI + 0x18] LEA RDX,[0x2e7f4a] MOV RDI,RSI MOV RSI,R15 CALL 0x0026cd32 MOV RDI,R15 MOV RSI,RBX CALL 0x001d5ca2 MOV R12,qword ptr [R14 + 0x8] MOV AL,byte ptr [R12 + 0x1] NOT AL TEST AL,0x60 JZ 0x001f456d MOV RDI,R12 CALL 0x0021d7ce TEST RAX,RAX JNZ 0x001f4531 MOV AL,byte ptr [R12 + 0x1] TEST AL,0x2 JNZ 0x001f4531 MOV RCX,qword ptr [R12 + 0x10] CMP byte ptr [RCX + 0x3],0x2 JNZ 0x001f4600 LAB_001f4531: MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e7f73] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA RSI,[0x2f00d9] LEA RDX,[0x2e06cd] MOV RDI,RBX CALL 0x001afc7e LAB_001f456d: MOV RSI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RSI + 0x10] CMP byte ptr [RAX + 0x3],0x3 JNZ 0x001f45ba MOV RDI,RBX MOV EDX,0x1 XOR ECX,ECX CALL 0x001d0175 LEA RDX,[0x2e7fec] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA RSI,[0x2f00d9] LEA RDX,[0x2e06cd] MOV RDI,RBX CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] LAB_001f45ba: MOV RDI,RBX MOV EDX,0x1 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e8052] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA RSI,[0x2f00d9] LEA RDX,[0x2e06cd] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x001afc7e LAB_001f4600: TEST AL,0x10 SETZ CL MOV RAX,qword ptr [R12 + 0x28] TEST RAX,RAX SETZ DL OR DL,CL JNZ 0x001f456d CMP dword ptr [RAX + 0x4],0x1 JNZ 0x001f4531 MOV RAX,qword ptr [RAX + 0x20] TEST byte ptr [RAX + 0x1],0x2 JZ 0x001f4531 JMP 0x001f456d
/* google::protobuf::compiler::java::ImmutableEnumFieldGenerator::GenerateMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::ImmutableEnumFieldGenerator::GenerateMembers (ImmutableEnumFieldGenerator *this,Printer *param_1) { map *pmVar1; FieldDescriptor *this_00; long lVar2; pmVar1 = (map *)(this + 0x18); io::Printer::Print(param_1,pmVar1,"private int $name$_ = $default_number$;\n"); PrintExtraFieldInfo(pmVar1,param_1); this_00 = *(FieldDescriptor **)(this + 8); if (((~(byte)this_00[1] & 0x60) != 0) && ((((lVar2 = FieldDescriptor::message_type(this_00), lVar2 != 0 || (((byte)this_00[1] & 2) != 0) ) || (*(char *)(*(long *)(this_00 + 0x10) + 3) == '\x02')) || ((lVar2 = *(long *)(this_00 + 0x28), lVar2 != 0 && ((byte)this_00[1] & 0x10) != 0 && ((*(int *)(lVar2 + 4) != 1 || ((*(byte *)(*(long *)(lVar2 + 0x20) + 1) & 2) == 0)))))))) { WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),0,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override $deprecation$public boolean ${$has$capitalized_name$$}$() {\n return $get_has_field_bit_message$;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); } lVar2 = *(long *)(this + 8); if (*(char *)(*(long *)(lVar2 + 0x10) + 3) == '\x03') { WriteFieldEnumValueAccessorDocComment(param_1,lVar2,1,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override $deprecation$public int ${$get$capitalized_name$Value$}$() {\n return $name$_;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); lVar2 = *(long *)(this + 8); } WriteFieldAccessorDocComment(param_1,lVar2,1,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override $deprecation$public $type$ ${$get$capitalized_name$$}$() {\n $type$ result = $type$.forNumber($name$_);\n return result == null ? $unknown$ : result;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); return; }
8,639
ma_zlib_decompress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t *source_len) { int rc; if (!ctx) return 1; rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len); if (rc != Z_OK) return 1; return 0; }
O0
c
ma_zlib_decompress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x67cd9 movb $0x1, -0x1(%rbp) jmp 0x67d04 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rax movq (%rax), %rcx callq 0x37a40 movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x67d00 movb $0x1, -0x1(%rbp) jmp 0x67d04 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
ma_zlib_decompress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_10], 0 jnz short loc_67CD9 mov [rbp+var_1], 1 jmp short loc_67D04 loc_67CD9: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rbp+var_30] mov rcx, [rax] call _uncompress mov [rbp+var_34], eax cmp [rbp+var_34], 0 jz short loc_67D00 mov [rbp+var_1], 1 jmp short loc_67D04 loc_67D00: mov [rbp+var_1], 0 loc_67D04: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0; }
ma_zlib_decompress: 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 qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00167cd9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00167d04 LAB_00167cd9: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] CALL 0x00137a40 MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x00167d00 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00167d04 LAB_00167d00: MOV byte ptr [RBP + -0x1],0x0 LAB_00167d04: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; int1 local_9; if (param_1 == 0) { local_9 = 1; } else { iVar1 = uncompress(param_2,param_3,param_4,*param_5); if (iVar1 == 0) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
8,640
inline_mysql_file_create_with_symlink
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_create_with_symlink( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *linkname, const char *filename, int create_flags, int access_flags, myf flags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_create_with_symlink(linkname, filename, create_flags, access_flags, flags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_create_with_symlink(linkname, filename, create_flags, access_flags, flags); return file; }
O3
c
inline_mysql_file_create_with_symlink: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %rbx movl %r8d, %r14d movq %rcx, %r15 movq %rdx, %r12 movl %esi, -0x2c(%rbp) movl %edi, %esi leaq 0x302cab(%rip), %rax # 0x3aea18 movq (%rax), %rax leaq -0x80(%rbp), %rdi leaq -0x38(%rbp), %r13 xorl %edx, %edx movq %r13, %r8 callq *0x148(%rax) movq %rax, (%r13) testq %rax, %rax jne 0xabdb2 movq %r12, %rdi movq %r15, %rsi xorl %edx, %edx movl %r14d, %ecx movq %rbx, %r8 callq 0xc0a24 movl %eax, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x302c5f(%rip), %r13 # 0x3aea18 movq (%r13), %rcx leaq 0x534e3(%rip), %rsi # 0xff2a7 movq %rax, %rdi movl -0x2c(%rbp), %edx callq *0x1f0(%rcx) movq %r12, %rdi movq %r15, %rsi xorl %edx, %edx movl %r14d, %ecx movq %rbx, %r8 callq 0xc0a24 movl %eax, %ebx movq (%r13), %rax movq -0x38(%rbp), %rdi movl %ebx, %esi callq *0x200(%rax) jmp 0xabda1
inline_mysql_file_create_with_symlink_1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, r9 mov r14d, r8d mov r15, rcx mov r12, rdx mov [rbp+var_2C], esi mov esi, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] lea r13, [rbp+var_38] xor edx, edx mov r8, r13 call qword ptr [rax+148h] mov [r13+0], rax test rax, rax jnz short loc_ABDB2 mov rdi, r12 mov rsi, r15 xor edx, edx mov ecx, r14d mov r8, rbx call my_create_with_symlink mov ebx, eax loc_ABDA1: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_ABDB2: lea r13, PSI_server mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, [rbp+var_2C] call qword ptr [rcx+1F0h] mov rdi, r12 mov rsi, r15 xor edx, edx mov ecx, r14d mov r8, rbx call my_create_with_symlink mov ebx, eax mov rax, [r13+0] mov rdi, [rbp+var_38] mov esi, ebx call qword ptr [rax+200h] jmp short loc_ABDA1
long long inline_mysql_file_create_with_symlink_1( unsigned int a1, unsigned int a2, long long a3, long long a4, unsigned int a5, long long a6) { long long v10; // rax _BYTE v12[72]; // [rsp+0h] [rbp-80h] BYREF long long v13; // [rsp+48h] [rbp-38h] BYREF unsigned int v14; // [rsp+54h] [rbp-2Ch] v14 = a2; v10 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v12, a1, 0LL, a4, &v13); v13 = v10; if ( v10 ) { ((void ( *)(long long, const char *, _QWORD))PSI_server[62])( v10, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_create.c", v14); a6 = (unsigned int)my_create_with_symlink(a3, a4, 0LL, a5, a6); ((void ( *)(long long, long long))PSI_server[64])(v13, a6); } else { LODWORD(a6) = my_create_with_symlink(a3, a4, 0LL, a5, a6); } return (unsigned int)a6; }
inline_mysql_file_create_with_symlink: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,R9 MOV R14D,R8D MOV R15,RCX MOV R12,RDX MOV dword ptr [RBP + -0x2c],ESI MOV ESI,EDI LEA RAX,[0x4aea18] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] LEA R13,[RBP + -0x38] XOR EDX,EDX MOV R8,R13 CALL qword ptr [RAX + 0x148] MOV qword ptr [R13],RAX TEST RAX,RAX JNZ 0x001abdb2 MOV RDI,R12 MOV RSI,R15 XOR EDX,EDX MOV ECX,R14D MOV R8,RBX CALL 0x001c0a24 MOV EBX,EAX LAB_001abda1: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001abdb2: LEA R13,[0x4aea18] MOV RCX,qword ptr [R13] LEA RSI,[0x1ff2a7] MOV RDI,RAX MOV EDX,dword ptr [RBP + -0x2c] CALL qword ptr [RCX + 0x1f0] MOV RDI,R12 MOV RSI,R15 XOR EDX,EDX MOV ECX,R14D MOV R8,RBX CALL 0x001c0a24 MOV EBX,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,EBX CALL qword ptr [RAX + 0x200] JMP 0x001abda1
int4 inline_mysql_file_create_with_symlink (int4 param_1,int4 param_2,int8 param_3,int8 param_4, int4 param_5,int8 param_6) { int4 uVar1; int1 local_88 [72]; long local_40; int4 local_34; local_34 = param_2; local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40); if (local_40 == 0) { uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6); } else { (**(code **)(PSI_server + 0x1f0)) (local_40,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_create.c", local_34); uVar1 = my_create_with_symlink(param_3,param_4,0,param_5,param_6); (**(code **)(PSI_server + 0x200))(local_40,uVar1); } return uVar1; }
8,641
mi_ft_cmp
eloqsql/storage/myisam/ft_update.c
int _mi_ft_cmp(MI_INFO *info, uint keynr, const uchar *rec1, const uchar *rec2) { FT_SEG_ITERATOR ftsi1, ftsi2; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; DBUG_ENTER("_mi_ft_cmp"); _mi_ft_segiterator_init(info, keynr, rec1, &ftsi1); _mi_ft_segiterator_init(info, keynr, rec2, &ftsi2); while (_mi_ft_segiterator(&ftsi1) && _mi_ft_segiterator(&ftsi2)) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || ha_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, (uchar*) ftsi2.pos,ftsi2.len,0))) DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT); } DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL); }
O3
c
mi_ft_cmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq (%rdi), %rax movq 0x218(%rax), %rax movl %esi, %esi imulq $0x70, %rsi, %rsi movq 0x28(%rax,%rsi), %r8 movq (%r8), %rbx movzwl 0x8(%rax,%rsi), %eax leaq -0x60(%rbp), %rdi movl %eax, (%rdi) movq %r8, 0x8(%rdi) movq %rdx, 0x10(%rdi) xorl %r14d, %r14d movq %r14, 0x18(%rdi) movl %r14d, 0x4(%rdi) movl %eax, -0x40(%rbp) movq %r8, -0x38(%rbp) movq %rcx, -0x30(%rbp) movq %r14, -0x28(%rbp) movl %r14d, -0x3c(%rbp) callq 0x793a6 testl %eax, %eax je 0x7967c leaq -0x40(%rbp), %r15 leaq -0x60(%rbp), %r12 movq %r15, %rdi callq 0x793a6 testl %eax, %eax je 0x79679 movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rcx cmpq %rcx, %rsi je 0x7966d movl $0x1, %r14d testq %rsi, %rsi je 0x7967c testq %rcx, %rcx je 0x7967c movl -0x5c(%rbp), %edx movl -0x3c(%rbp), %r8d movq %rbx, %rdi xorl %r9d, %r9d callq 0xa5ad0 testl %eax, %eax jne 0x7967c movq %r12, %rdi callq 0x793a6 testl %eax, %eax jne 0x7962e xorl %r14d, %r14d movl %r14d, %eax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_ft_cmp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 40h mov rax, [rdi] mov rax, [rax+218h] mov esi, esi imul rsi, 70h ; 'p' mov r8, [rax+rsi+28h] mov rbx, [r8] movzx eax, word ptr [rax+rsi+8] lea rdi, [rbp+var_60] mov [rdi], eax mov [rdi+8], r8 mov [rdi+10h], rdx xor r14d, r14d mov [rdi+18h], r14 mov [rdi+4], r14d mov [rbp+var_40], eax mov [rbp+var_38], r8 mov [rbp+var_30], rcx mov [rbp+var_28], r14 mov [rbp+var_3C], r14d call _mi_ft_segiterator test eax, eax jz short loc_7967C lea r15, [rbp+var_40] lea r12, [rbp+var_60] loc_7962E: mov rdi, r15 call _mi_ft_segiterator test eax, eax jz short loc_79679 mov rsi, [rbp+var_48] mov rcx, [rbp+var_28] cmp rsi, rcx jz short loc_7966D mov r14d, 1 test rsi, rsi jz short loc_7967C test rcx, rcx jz short loc_7967C mov edx, [rbp+var_5C] mov r8d, [rbp+var_3C] mov rdi, rbx xor r9d, r9d call ha_compare_text test eax, eax jnz short loc_7967C loc_7966D: mov rdi, r12 call _mi_ft_segiterator test eax, eax jnz short loc_7962E loc_79679: xor r14d, r14d loc_7967C: mov eax, r14d add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4) { long long v4; // rax long long v5; // rsi _QWORD *v6; // r8 long long v7; // rbx unsigned int v8; // r14d int v10; // [rsp+0h] [rbp-60h] BYREF unsigned int v11; // [rsp+4h] [rbp-5Ch] _QWORD *v12; // [rsp+8h] [rbp-58h] long long v13; // [rsp+10h] [rbp-50h] long long v14; // [rsp+18h] [rbp-48h] int v15; // [rsp+20h] [rbp-40h] BYREF unsigned int v16; // [rsp+24h] [rbp-3Ch] _QWORD *v17; // [rsp+28h] [rbp-38h] long long v18; // [rsp+30h] [rbp-30h] long long v19; // [rsp+38h] [rbp-28h] v4 = *(_QWORD *)(*(_QWORD *)a1 + 536LL); v5 = 112LL * a2; v6 = *(_QWORD **)(v4 + v5 + 40); v7 = *v6; v10 = *(unsigned __int16 *)(v4 + v5 + 8); v12 = v6; v13 = a3; v8 = 0; v14 = 0LL; v11 = 0; v15 = v10; v17 = v6; v18 = a4; v19 = 0LL; v16 = 0; if ( (unsigned int)mi_ft_segiterator((long long)&v10) ) { do { if ( !(unsigned int)mi_ft_segiterator((long long)&v15) ) break; if ( v14 != v19 ) { v8 = 1; if ( !v14 || !v19 || (unsigned int)ha_compare_text(v7, v14, v11, v19, v16, 0LL) ) return v8; } } while ( (unsigned int)mi_ft_segiterator((long long)&v10) ); return 0; } return v8; }
_mi_ft_cmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x218] MOV ESI,ESI IMUL RSI,RSI,0x70 MOV R8,qword ptr [RAX + RSI*0x1 + 0x28] MOV RBX,qword ptr [R8] MOVZX EAX,word ptr [RAX + RSI*0x1 + 0x8] LEA RDI,[RBP + -0x60] MOV dword ptr [RDI],EAX MOV qword ptr [RDI + 0x8],R8 MOV qword ptr [RDI + 0x10],RDX XOR R14D,R14D MOV qword ptr [RDI + 0x18],R14 MOV dword ptr [RDI + 0x4],R14D MOV dword ptr [RBP + -0x40],EAX MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x28],R14 MOV dword ptr [RBP + -0x3c],R14D CALL 0x001793a6 TEST EAX,EAX JZ 0x0017967c LEA R15,[RBP + -0x40] LEA R12,[RBP + -0x60] LAB_0017962e: MOV RDI,R15 CALL 0x001793a6 TEST EAX,EAX JZ 0x00179679 MOV RSI,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x28] CMP RSI,RCX JZ 0x0017966d MOV R14D,0x1 TEST RSI,RSI JZ 0x0017967c TEST RCX,RCX JZ 0x0017967c MOV EDX,dword ptr [RBP + -0x5c] MOV R8D,dword ptr [RBP + -0x3c] MOV RDI,RBX XOR R9D,R9D CALL 0x001a5ad0 TEST EAX,EAX JNZ 0x0017967c LAB_0017966d: MOV RDI,R12 CALL 0x001793a6 TEST EAX,EAX JNZ 0x0017962e LAB_00179679: XOR R14D,R14D LAB_0017967c: MOV EAX,R14D ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _mi_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4) { int8 uVar1; int iVar2; uint local_68; int4 local_64; int8 *local_60; int8 local_58; long local_50; uint local_48; int4 local_44; int8 *local_40; int8 local_38; long local_30; local_60 = *(int8 **)(*(long *)(*param_1 + 0x218) + 0x28 + (ulong)param_2 * 0x70); uVar1 = *local_60; local_68 = (uint)*(ushort *)(*(long *)(*param_1 + 0x218) + 8 + (ulong)param_2 * 0x70); local_50 = 0; local_64 = 0; local_30 = 0; local_44 = 0; local_58 = param_3; local_48 = local_68; local_40 = local_60; local_38 = param_4; iVar2 = _mi_ft_segiterator(); if (iVar2 != 0) { do { iVar2 = _mi_ft_segiterator(&local_48); if (iVar2 == 0) { return 0; } if (local_50 != local_30) { if (local_50 == 0) { return 1; } if (local_30 == 0) { return 1; } iVar2 = ha_compare_text(uVar1,local_50,local_64,local_30,local_44,0); if (iVar2 != 0) { return 1; } } iVar2 = _mi_ft_segiterator(&local_68); } while (iVar2 != 0); } return 0; }
8,642
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O3
c
my_mb_wc_gbk: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x33b0d movsbq (%rdx), %rdi testq %rdi, %rdi js 0x33a91 movq %rdi, (%rsi) movl $0x1, %eax jmp 0x33b0d leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x33b0d movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x33b0d cmpl $0xff, %ecx je 0x33b0d movzbl 0x1(%rdx), %edx leal -0x7f(%rdx), %edi cmpb $-0x3f, %dil setb %dil cmpb $-0x1, %dl setge %r8b testb %dil, %r8b jne 0x33b0d shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0 cmpl $0x7d10, %eax # imm = 0x7D10 jae 0x33b01 movl %eax, %eax leaq 0x1452e5(%rip), %rcx # 0x178dd0 movzwl (%rcx,%rax,2), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x33b0d jmp 0x33b08 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_gbk: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_33B0D movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_33A91 mov [rsi], rdi mov eax, 1 jmp short loc_33B0D loc_33A91: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_33B0D movzx ecx, dil xor eax, eax cmp ecx, 80h jz short loc_33B0D cmp ecx, 0FFh jz short loc_33B0D movzx edx, byte ptr [rdx+1] lea edi, [rdx-7Fh] cmp dil, 0C1h setb dil cmp dl, 0FFh setnl r8b test r8b, dil jnz short loc_33B0D shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EC0h cmp eax, 7D10h jnb short loc_33B01 mov eax, eax lea rcx, tab_gbk_uni0 movzx eax, word ptr [rcx+rax*2] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_33B0D jmp short loc_33B08 loc_33B01: mov qword ptr [rsi], 0 loc_33B08: mov eax, 0FFFFFFFEh loc_33B0D: pop rbp retn
long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx unsigned int v7; // eax long long v8; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 ) { v7 = ((unsigned __int8)v5 << 8) + v6 - 33088; if ( v7 >= 0x7D10 ) { *a2 = 0LL; } else { v8 = tab_gbk_uni0[v7]; *a2 = v8; result = 2LL; if ( (_WORD)v8 ) return result; } return 4294967294LL; } } } } return result; }
my_mb_wc_gbk: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00133b0d MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x00133a91 MOV qword ptr [RSI],RDI MOV EAX,0x1 JMP 0x00133b0d LAB_00133a91: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00133b0d MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x00133b0d CMP ECX,0xff JZ 0x00133b0d MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + -0x7f] CMP DIL,0xc1 SETC DIL CMP DL,0xff SETGE R8B TEST R8B,DIL JNZ 0x00133b0d SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ec0 CMP EAX,0x7d10 JNC 0x00133b01 MOV EAX,EAX LEA RCX,[0x278dd0] MOVZX EAX,word ptr [RCX + RAX*0x2] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x00133b0d JMP 0x00133b08 LAB_00133b01: MOV qword ptr [RSI],0x0 LAB_00133b08: MOV EAX,0xfffffffe LAB_00133b0d: POP RBP RET
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int8 uVar5; uVar5 = 0xffffff9b; if (param_3 < param_4) { bVar1 = *param_3; if ((long)(char)bVar1 < 0) { uVar5 = 0xffffff9a; if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) && (bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) { uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140; if (uVar4 < 0x7d10) { uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 != 0) { return 2; } } else { *param_2 = 0; } uVar5 = 0xfffffffe; } } else { *param_2 = (long)(char)bVar1; uVar5 = 1; } } return uVar5; }
8,643
JS_ToIntegerFree
bluesky950520[P]quickjs/quickjs.c
static __maybe_unused JSValue JS_ToIntegerFree(JSContext *ctx, JSValue val) { uint32_t tag; JSValue ret; redo: tag = JS_VALUE_GET_NORM_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = js_int32(JS_VALUE_GET_INT(val)); break; case JS_TAG_FLOAT64: { double d = JS_VALUE_GET_FLOAT64(val); if (isnan(d)) { ret = js_int32(0); } else { /* convert -0 to +0 */ d = trunc(d) + 0.0; ret = js_number(d); } } break; default: val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) return val; goto redo; } return ret; }
O2
c
JS_ToIntegerFree: pushq %rbx movq %rsi, %rax movq %rdi, %rbx cmpl $0x4, %edx jb 0x60e3f cmpl $0x7, %edx je 0x60e45 movq %rbx, %rdi movq %rax, %rsi callq 0x2e216 cmpl $0x6, %edx jne 0x60e23 jmp 0x60e43 movl %eax, %eax xorl %edx, %edx popq %rbx retq movq %rax, %xmm0 ucomisd %xmm0, %xmm0 jp 0x60e64 callq 0xe150 xorpd %xmm1, %xmm1 addsd %xmm1, %xmm0 callq 0x16f9e jmp 0x60e43 xorl %eax, %eax jmp 0x60e41
JS_ToIntegerFree: push rbx mov rax, rsi mov rbx, rdi loc_60E23: cmp edx, 4 jb short loc_60E3F cmp edx, 7 jz short loc_60E45 mov rdi, rbx mov rsi, rax call JS_ToNumberFree cmp edx, 6 jnz short loc_60E23 jmp short loc_60E43 loc_60E3F: mov eax, eax loc_60E41: xor edx, edx loc_60E43: pop rbx retn loc_60E45: movq xmm0, rax ucomisd xmm0, xmm0 jp short loc_60E64 call _trunc xorpd xmm1, xmm1 addsd xmm0, xmm1 call js_number jmp short loc_60E43 loc_60E64: xor eax, eax jmp short loc_60E41
long long JS_ToIntegerFree(long long a1, long long a2, long long a3) { long long result; // rax double v4; // xmm0_8 result = a2; while ( 1 ) { if ( (unsigned int)a3 < 4 ) return (unsigned int)result; if ( (_DWORD)a3 == 7 ) break; result = JS_ToNumberFree(a1, result, a3); if ( (_DWORD)a3 == 6 ) return result; } v4 = trunc(*(double *)&result); return js_number(v4 + 0.0); }
JS_ToIntegerFree: PUSH RBX MOV RAX,RSI MOV RBX,RDI LAB_00160e23: CMP EDX,0x4 JC 0x00160e3f CMP EDX,0x7 JZ 0x00160e45 MOV RDI,RBX MOV RSI,RAX CALL 0x0012e216 CMP EDX,0x6 JNZ 0x00160e23 JMP 0x00160e43 LAB_00160e3f: MOV EAX,EAX LAB_00160e41: XOR EDX,EDX LAB_00160e43: POP RBX RET LAB_00160e45: MOVQ XMM0,RAX UCOMISD XMM0,XMM0 JP 0x00160e64 CALL 0x0010e150 XORPD XMM1,XMM1 ADDSD XMM0,XMM1 CALL 0x00116f9e JMP 0x00160e43 LAB_00160e64: XOR EAX,EAX JMP 0x00160e41
ulong JS_ToIntegerFree(int8 param_1,int8 param_2,int8 param_3) { ulong uVar1; double dVar2; int1 auVar3 [16]; auVar3._8_8_ = param_3; auVar3._0_8_ = param_2; while( true ) { dVar2 = auVar3._0_8_; if (auVar3._8_4_ < 4) { return (ulong)dVar2 & 0xffffffff; } if (auVar3._8_4_ == 7) break; auVar3 = JS_ToNumberFree(param_1,dVar2); if (auVar3._8_4_ == 6) { return auVar3._0_8_; } } if (!NAN(dVar2)) { dVar2 = trunc(dVar2); uVar1 = js_number(dVar2 + 0.0); return uVar1; } return 0; }
8,644
gzclose_r
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzread.c
int ZEXPORT gzclose_r(file) gzFile file; { int ret, err; gz_statep state; /* get internal structure */ if (file == NULL) return Z_STREAM_ERROR; state = (gz_statep)file; /* check that we're reading */ if (state->mode != GZ_READ) return Z_STREAM_ERROR; /* free memory and close file */ if (state->size) { inflateEnd(&(state->strm)); free(state->out); free(state->in); } err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; gz_error(state, Z_OK, NULL); free(state->path); ret = close(state->fd); free(state); return ret ? Z_ERRNO : err; }
O3
c
gzclose_r: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0xfffffffe, %r14d # imm = 0xFFFFFFFE testq %rdi, %rdi je 0x7fb9 movq %rdi, %rbx cmpl $0x1c4f, 0x18(%rdi) # imm = 0x1C4F jne 0x7fb9 cmpl $0x0, 0x28(%rbx) je 0x7f76 leaq 0x80(%rbx), %rdi callq 0x31d0 movq 0x38(%rbx), %rdi callq 0x3060 movq 0x30(%rbx), %rdi callq 0x3060 xorl %eax, %eax cmpl $-0x5, 0x74(%rbx) setne %al leal (%rax,%rax,4), %r15d addl $-0x5, %r15d xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x757b movq 0x20(%rbx), %rdi callq 0x3060 movl 0x1c(%rbx), %edi callq 0x3150 movl %eax, %ebp movq %rbx, %rdi callq 0x3060 negl %ebp sbbl %r14d, %r14d orl %r15d, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
gzclose_r: push rbp push r15 push r14 push rbx push rax mov r14d, 0FFFFFFFEh test rdi, rdi jz short loc_7FB9 mov rbx, rdi cmp dword ptr [rdi+18h], 1C4Fh jnz short loc_7FB9 cmp dword ptr [rbx+28h], 0 jz short loc_7F76 lea rdi, [rbx+80h] call _inflateEnd mov rdi, [rbx+38h] call _free mov rdi, [rbx+30h] call _free loc_7F76: xor eax, eax cmp dword ptr [rbx+74h], 0FFFFFFFBh setnz al lea r15d, [rax+rax*4] add r15d, 0FFFFFFFBh xor r14d, r14d mov rdi, rbx xor esi, esi xor edx, edx call gz_error mov rdi, [rbx+20h] call _free mov edi, [rbx+1Ch] call _close mov ebp, eax mov rdi, rbx call _free neg ebp sbb r14d, r14d or r14d, r15d loc_7FB9: mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long gzclose_r(long long a1) { unsigned int v1; // r14d int v2; // r15d int v3; // ebp v1 = -2; if ( a1 && *(_DWORD *)(a1 + 24) == 7247 ) { if ( *(_DWORD *)(a1 + 40) ) { inflateEnd(a1 + 128); free(*(_QWORD *)(a1 + 56)); free(*(_QWORD *)(a1 + 48)); } v2 = 5 * (*(_DWORD *)(a1 + 116) != -5) - 5; gz_error(a1, 0, 0LL); free(*(_QWORD *)(a1 + 32)); v3 = close(*(unsigned int *)(a1 + 28)); free(a1); return v2 | (unsigned int)-(v3 != 0); } return v1; }
gzclose_r: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,0xfffffffe TEST RDI,RDI JZ 0x00107fb9 MOV RBX,RDI CMP dword ptr [RDI + 0x18],0x1c4f JNZ 0x00107fb9 CMP dword ptr [RBX + 0x28],0x0 JZ 0x00107f76 LEA RDI,[RBX + 0x80] CALL 0x001031d0 MOV RDI,qword ptr [RBX + 0x38] CALL 0x00103060 MOV RDI,qword ptr [RBX + 0x30] CALL 0x00103060 LAB_00107f76: XOR EAX,EAX CMP dword ptr [RBX + 0x74],-0x5 SETNZ AL LEA R15D,[RAX + RAX*0x4] ADD R15D,-0x5 XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0010757b MOV RDI,qword ptr [RBX + 0x20] CALL 0x00103060 MOV EDI,dword ptr [RBX + 0x1c] CALL 0x00103150 MOV EBP,EAX MOV RDI,RBX CALL 0x00103060 NEG EBP SBB R14D,R14D OR R14D,R15D LAB_00107fb9: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
uint gzclose_r(void *param_1) { int iVar1; int iVar2; uint uVar3; uVar3 = 0xfffffffe; if ((param_1 != (void *)0x0) && (*(int *)((long)param_1 + 0x18) == 0x1c4f)) { if (*(int *)((long)param_1 + 0x28) != 0) { inflateEnd((long)param_1 + 0x80); free(*(void **)((long)param_1 + 0x38)); free(*(void **)((long)param_1 + 0x30)); } iVar1 = *(int *)((long)param_1 + 0x74); gz_error(param_1,0,0); free(*(void **)((long)param_1 + 0x20)); iVar2 = close(*(int *)((long)param_1 + 0x1c)); free(param_1); uVar3 = -(uint)(iVar2 != 0) | (uint)(iVar1 != -5) * 5 - 5; } return uVar3; }
8,645
maria_ft_parse_internal
eloqsql/storage/maria/ma_ft_parser.c
static int maria_ft_parse_internal(MYSQL_FTPARSER_PARAM *param, const char *doc_arg, int doc_len) { uchar *doc= (uchar*) doc_arg; uchar *end= doc + doc_len; MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam; TREE *wtree= ft_param->wtree; FT_WORD w; DBUG_ENTER("maria_ft_parse_internal"); while (maria_ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE)) if (param->mysql_add_word(param, (char*)w.pos, w.len, 0)) DBUG_RETURN(1); DBUG_RETURN(0); }
O3
c
maria_ft_parse_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq -0x48(%rbp), %r14 movq %rsi, (%r14) movslq %edx, %r15 addq %rsi, %r15 movq 0x18(%rdi), %rax movq (%rax), %r12 leaq -0x40(%rbp), %r13 movq 0x230(%r12), %rdi movq %r14, %rsi movq %r15, %rdx movq %r13, %rcx movl $0x1, %r8d callq 0x604ff testb %al, %al je 0x6073b movq -0x40(%rbp), %rsi movl -0x38(%rbp), %edx movq %rbx, %rdi xorl %ecx, %ecx callq *0x8(%rbx) testl %eax, %eax je 0x60701 movl $0x1, %eax jmp 0x6073d xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
maria_ft_parse_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rbp+var_48] mov [r14], rsi movsxd r15, edx add r15, rsi mov rax, [rdi+18h] mov r12, [rax] lea r13, [rbp+var_40] loc_60701: mov rdi, [r12+230h] mov rsi, r14 mov rdx, r15 mov rcx, r13 mov r8d, 1 call maria_ft_simple_get_word test al, al jz short loc_6073B mov rsi, [rbp+var_40] mov edx, [rbp+var_38] mov rdi, rbx xor ecx, ecx call qword ptr [rbx+8] test eax, eax jz short loc_60701 mov eax, 1 jmp short loc_6073D loc_6073B: xor eax, eax loc_6073D: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long maria_ft_parse_internal(long long a1, _BYTE *a2, int a3) { unsigned long long v3; // r15 long long v4; // r12 _BYTE *v6; // [rsp+8h] [rbp-48h] BYREF long long v7; // [rsp+10h] [rbp-40h] BYREF unsigned int v8; // [rsp+18h] [rbp-38h] v6 = a2; v3 = (unsigned long long)&a2[a3]; v4 = **(_QWORD **)(a1 + 24); while ( maria_ft_simple_get_word(*(_QWORD *)(v4 + 560), &v6, v3, &v7, 1) ) { if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(a1 + 8))(a1, v7, v8, 0LL) ) return 1LL; } return 0LL; }
maria_ft_parse_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RBP + -0x48] MOV qword ptr [R14],RSI MOVSXD R15,EDX ADD R15,RSI MOV RAX,qword ptr [RDI + 0x18] MOV R12,qword ptr [RAX] LEA R13,[RBP + -0x40] LAB_00160701: MOV RDI,qword ptr [R12 + 0x230] MOV RSI,R14 MOV RDX,R15 MOV RCX,R13 MOV R8D,0x1 CALL 0x001604ff TEST AL,AL JZ 0x0016073b MOV RSI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x38] MOV RDI,RBX XOR ECX,ECX CALL qword ptr [RBX + 0x8] TEST EAX,EAX JZ 0x00160701 MOV EAX,0x1 JMP 0x0016073d LAB_0016073b: XOR EAX,EAX LAB_0016073d: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 maria_ft_parse_internal(long param_1,long param_2,int param_3) { long lVar1; char cVar2; int iVar3; long local_50; int8 local_48; int4 local_40; lVar1 = **(long **)(param_1 + 0x18); local_50 = param_2; do { cVar2 = maria_ft_simple_get_word (*(int8 *)(lVar1 + 0x230),&local_50,param_3 + param_2,&local_48,1); if (cVar2 == '\0') { return 0; } iVar3 = (**(code **)(param_1 + 8))(param_1,local_48,local_40,0); } while (iVar3 == 0); return 1; }
8,646
psi_cond_wait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_wait(mysql_cond_t *that, mysql_mutex_t *mutex, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_WAIT, file, line); int result= my_cond_wait(&that->m_cond, &mutex->m_mutex); if (locker) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O0
c
psi_cond_wait: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) leaq 0x1b4a8a(%rip), %rax # 0x234258 movq (%rax), %rax movq 0x1c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rdx movq -0x18(%rbp), %r8 movl -0x1c(%rbp), %r9d leaq -0x58(%rbp), %rdi xorl %ecx, %ecx callq *%rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x364b0 movl %eax, -0x64(%rbp) cmpq $0x0, -0x60(%rbp) je 0x7f82d leaq 0x1b4a3e(%rip), %rax # 0x234258 movq (%rax), %rax movq 0x1c8(%rax), %rax movq -0x60(%rbp), %rdi movl -0x64(%rbp), %esi callq *%rax movl -0x64(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_cond_wait: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C0h] mov rcx, [rbp+var_8] mov rsi, [rcx+30h] mov rcx, [rbp+var_10] mov rdx, [rcx+40h] mov r8, [rbp+var_18] mov r9d, [rbp+var_1C] lea rdi, [rbp+var_58] xor ecx, ecx call rax mov [rbp+var_60], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call _pthread_cond_wait mov [rbp+var_64], eax cmp [rbp+var_60], 0 jz short loc_7F82D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C8h] mov rdi, [rbp+var_60] mov esi, [rbp+var_64] call rax loc_7F82D: mov eax, [rbp+var_64] add rsp, 70h pop rbp retn
long long psi_cond_wait(long long a1, long long a2, long long a3, unsigned int a4) { unsigned int v5; // [rsp+Ch] [rbp-64h] long long v6; // [rsp+10h] [rbp-60h] _BYTE v7[60]; // [rsp+18h] [rbp-58h] BYREF unsigned int v8; // [rsp+54h] [rbp-1Ch] long long v9; // [rsp+58h] [rbp-18h] long long v10; // [rsp+60h] [rbp-10h] long long v11; // [rsp+68h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, _QWORD, long long, _QWORD))PSI_server + 56))( v7, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 0LL, a3, a4); v5 = pthread_cond_wait(v11, v10); if ( v6 ) (*((void ( **)(long long, _QWORD))PSI_server + 57))(v6, v5); return v5; }
psi_cond_wait: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX LEA RAX,[0x334258] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x40] MOV R8,qword ptr [RBP + -0x18] MOV R9D,dword ptr [RBP + -0x1c] LEA RDI,[RBP + -0x58] XOR ECX,ECX CALL RAX MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001364b0 MOV dword ptr [RBP + -0x64],EAX CMP qword ptr [RBP + -0x60],0x0 JZ 0x0017f82d LEA RAX,[0x334258] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c8] MOV RDI,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + -0x64] CALL RAX LAB_0017f82d: MOV EAX,dword ptr [RBP + -0x64] ADD RSP,0x70 POP RBP RET
int psi_cond_wait(pthread_cond_t *param_1,pthread_mutex_t *param_2,int8 param_3, int4 param_4) { int iVar1; long lVar2; int1 local_60 [60]; int4 local_24; int8 local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; local_24 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_60,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),0,param_3, param_4); iVar1 = pthread_cond_wait(local_10,local_18); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
8,647
std::shared_ptr<spdlog::async_logger> spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, spdlog::color_mode&)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/async.h
static std::shared_ptr<async_logger> create(std::string logger_name, SinkArgs &&...args) { auto &registry_inst = details::registry::instance(); // create global thread pool if not already exists.. auto &mutex = registry_inst.tp_mutex(); std::lock_guard<std::recursive_mutex> tp_lock(mutex); auto tp = registry_inst.get_tp(); if (tp == nullptr) { tp = std::make_shared<details::thread_pool>(details::default_async_q_size, 1U); registry_inst.set_tp(tp); } auto sink = std::make_shared<Sink>(std::forward<SinkArgs>(args)...); auto new_logger = std::make_shared<async_logger>(std::move(logger_name), std::move(sink), std::move(tp), OverflowPolicy); registry_inst.initialize_logger(new_logger); return new_logger; }
O3
c
std::shared_ptr<spdlog::async_logger> spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stdout_sink<spdlog::details::console_mutex>, spdlog::color_mode&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, spdlog::color_mode&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %r14 callq 0x2e0ae movq %rax, %r15 movq %rax, %rdi callq 0x2dfc6 movq %rax, %rbx movq %rax, %rdi callq 0x11350 testl %eax, %eax jne 0x3c76a leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x2da04 cmpq $0x0, 0x20(%rsp) jne 0x3c6a7 leaq 0xc(%rsp), %r8 movl $0x1, (%r8) leaq 0x18(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x472c4(%rip), %rcx # 0x838d8 leaq 0x10(%rsp), %rsi leaq 0xb(%rsp), %rdx callq 0x3d20e movq 0x10(%rsp), %rcx movq 0x18(%rsp), %rax xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movq %rcx, 0x20(%rsp) movq 0x28(%rsp), %rdi movq %rax, 0x28(%rsp) testq %rdi, %rdi je 0x3c662 callq 0x1912a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3c65d callq 0x1912a movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0x40(%rsp) movq %rax, 0x48(%rsp) testq %rax, %rax je 0x3c68b movq 0x7792b(%rip), %rcx # 0xb3fa8 cmpb $0x0, (%rcx) je 0x3c687 incl 0x8(%rax) jmp 0x3c68b lock incl 0x8(%rax) leaq 0x40(%rsp), %rsi movq %r15, %rdi callq 0x2d9b0 movq 0x48(%rsp), %rdi testq %rdi, %rdi je 0x3c6a7 callq 0x1912a leaq 0x18(%rsp), %rdi movq $0x0, -0x8(%rdi) leaq 0x10(%rsp), %rsi leaq 0xc(%rsp), %rdx movq %r13, %rcx callq 0x3cffc leaq 0xc(%rsp), %r9 movl $0x0, (%r9) leaq 0xb(%rsp), %rsi leaq 0x10(%rsp), %rcx leaq 0x20(%rsp), %r8 movq %r14, %rdi movq %r12, %rdx callq 0x3da70 movq (%r14), %rax movq %rax, 0x30(%rsp) movq 0x8(%r14), %rax movq %rax, 0x38(%rsp) testq %rax, %rax je 0x3c717 movq 0x7789f(%rip), %rcx # 0xb3fa8 cmpb $0x0, (%rcx) je 0x3c713 incl 0x8(%rax) jmp 0x3c717 lock incl 0x8(%rax) leaq 0x30(%rsp), %rsi movq %r15, %rdi callq 0x2d5a6 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x3c733 callq 0x1912a movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3c742 callq 0x1912a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x3c751 callq 0x1912a movq %rbx, %rdi callq 0x112d0 movq %r14, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x114f0 movq %rax, %r15 movq 0x48(%rsp), %rdi jmp 0x3c7a7 jmp 0x3c7b3 movq %rax, %r15 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x3c78f callq 0x1912a movq 0x8(%r14), %rdi testq %rdi, %rdi je 0x3c7a2 callq 0x1912a jmp 0x3c7a2 movq %rax, %r15 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x3c7b6 callq 0x1912a jmp 0x3c7b6 movq %rax, %r15 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x3c7ca callq 0x1912a jmp 0x3c7ca movq %rax, %r15 movq %rbx, %rdi callq 0x112d0 movq %r15, %rdi callq 0x11760
_ZN6spdlog18async_factory_implILNS_21async_overflow_policyE0EE6createINS_5sinks21ansicolor_stderr_sinkINS_7details17console_nullmutexEEEJRNS_10color_modeEEEESt10shared_ptrINS_12async_loggerEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT0_: push r15 push r14 push r13 push r12 push rbx sub rsp, 50h mov r13, rdx mov r12, rsi mov r14, rdi call _ZN6spdlog7details8registry8instanceEv; spdlog::details::registry::instance(void) mov r15, rax mov rdi, rax; this call _ZN6spdlog7details8registry8tp_mutexEv; spdlog::details::registry::tp_mutex(void) mov rbx, rax mov rdi, rax call _pthread_mutex_lock test eax, eax jnz loc_3C76A lea rdi, [rsp+78h+var_58]; this mov rsi, r15 call _ZN6spdlog7details8registry6get_tpEv; spdlog::details::registry::get_tp(void) cmp [rsp+78h+var_58], 0 jnz loc_3C6A7 lea r8, [rsp+78h+var_6C] mov dword ptr [r8], 1 lea rdi, [rsp+78h+var_68+8] mov qword ptr [rdi-8], 0 lea rcx, _ZN6spdlog7detailsL20default_async_q_sizeE; spdlog::details::default_async_q_size lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_6D] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN6spdlog7details11thread_poolESaIS6_EJRKmjEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<spdlog::details::thread_pool,std::allocator<spdlog::details::thread_pool>,ulong const&,uint>(spdlog::details::thread_pool *&,std::_Sp_alloc_shared_tag<std::allocator<spdlog::details::thread_pool>>,ulong const&,uint &&) mov rcx, qword ptr [rsp+78h+var_68] mov rax, qword ptr [rsp+78h+var_68+8] xorps xmm0, xmm0 movaps [rsp+78h+var_68], xmm0 mov [rsp+78h+var_58], rcx mov rdi, [rsp+78h+var_50] mov [rsp+78h+var_50], rax test rdi, rdi jz short loc_3C662 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) mov rdi, qword ptr [rsp+78h+var_68+8] test rdi, rdi jz short loc_3C65D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C65D: mov rax, [rsp+78h+var_50] loc_3C662: mov rcx, [rsp+78h+var_58] mov [rsp+78h+var_38], rcx mov [rsp+78h+var_30], rax test rax, rax jz short loc_3C68B mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_3C687 inc dword ptr [rax+8] jmp short loc_3C68B loc_3C687: lock inc dword ptr [rax+8] loc_3C68B: lea rsi, [rsp+78h+var_38] mov rdi, r15 call _ZN6spdlog7details8registry6set_tpESt10shared_ptrINS0_11thread_poolEE; spdlog::details::registry::set_tp(std::shared_ptr<spdlog::details::thread_pool>) mov rdi, [rsp+78h+var_30] test rdi, rdi jz short loc_3C6A7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C6A7: lea rdi, [rsp+78h+var_68+8] mov qword ptr [rdi-8], 0 lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_6C] mov rcx, r13 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN6spdlog5sinks21ansicolor_stderr_sinkINS4_7details17console_nullmutexEEESaIS9_EJRNS4_10color_modeEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,std::allocator<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,spdlog::color_mode &>(spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex> *&,std::_Sp_alloc_shared_tag<std::allocator<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>>,spdlog::color_mode &) lea r9, [rsp+78h+var_6C] mov dword ptr [r9], 0 lea rsi, [rsp+78h+var_6D] lea rcx, [rsp+78h+var_68] lea r8, [rsp+78h+var_58] mov rdi, r14 mov rdx, r12 call _ZNSt12__shared_ptrIN6spdlog12async_loggerELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrINS0_5sinks21ansicolor_stderr_sinkINS0_7details17console_nullmutexEEEESD_INSG_11thread_poolEENS0_21async_overflow_policyEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<spdlog::async_logger,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<spdlog::async_logger>,std::string,std::shared_ptr<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,std::shared_ptr<spdlog::details::thread_pool>,spdlog::async_overflow_policy>(std::_Sp_alloc_shared_tag<std::allocator<spdlog::async_logger>>,std::string,std::shared_ptr<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,std::shared_ptr<spdlog::details::thread_pool>,spdlog::async_overflow_policy &&) mov rax, [r14] mov [rsp+78h+var_48], rax mov rax, [r14+8] mov [rsp+78h+var_40], rax test rax, rax jz short loc_3C717 mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rcx], 0 jz short loc_3C713 inc dword ptr [rax+8] jmp short loc_3C717 loc_3C713: lock inc dword ptr [rax+8] loc_3C717: lea rsi, [rsp+78h+var_48] mov rdi, r15; int call _ZN6spdlog7details8registry17initialize_loggerESt10shared_ptrINS_6loggerEE; spdlog::details::registry::initialize_logger(std::shared_ptr<spdlog::logger>) mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_3C733 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C733: mov rdi, qword ptr [rsp+78h+var_68+8] test rdi, rdi jz short loc_3C742 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C742: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_3C751 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C751: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 50h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_3C76A: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r15, rax mov rdi, [rsp+78h+var_30] jmp short loc_3C7A7 jmp short loc_3C7B3 mov r15, rax mov rdi, [rsp+78h+var_40] test rdi, rdi jz short loc_3C78F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3C78F: mov rdi, [r14+8] test rdi, rdi jz short loc_3C7A2 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_3C7A2 mov r15, rax loc_3C7A2: mov rdi, qword ptr [rsp+78h+var_68+8] loc_3C7A7: test rdi, rdi jz short loc_3C7B6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_3C7B6 loc_3C7B3: mov r15, rax loc_3C7B6: mov rdi, [rsp+78h+var_50] test rdi, rdi jz short loc_3C7CA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_3C7CA mov r15, rax loc_3C7CA: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r15 call __Unwind_Resume
spdlog::details::registry * spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,spdlog::color_mode &>( spdlog::details::registry *a1, long long a2, long long a3) { spdlog::details::registry *v5; // r15 long long v6; // rbx int v7; // eax volatile signed __int32 *v8; // rax long long v9; // rcx volatile signed __int32 *v10; // rdi volatile signed __int32 *v11; // rax char v13; // [rsp+Bh] [rbp-6Dh] BYREF int v14; // [rsp+Ch] [rbp-6Ch] BYREF __int128 v15; // [rsp+10h] [rbp-68h] BYREF long long v16; // [rsp+20h] [rbp-58h] BYREF volatile signed __int32 *v17; // [rsp+28h] [rbp-50h] long long v18; // [rsp+30h] [rbp-48h] BYREF volatile signed __int32 *v19; // [rsp+38h] [rbp-40h] __int128 v20; // [rsp+40h] [rbp-38h] BYREF v5 = (spdlog::details::registry *)spdlog::details::registry::instance(a1); v6 = spdlog::details::registry::tp_mutex(v5); v7 = pthread_mutex_lock(v6); if ( v7 ) std::__throw_system_error(v7); spdlog::details::registry::get_tp((spdlog::details::registry *)&v16, (long long)v5); if ( !v16 ) { v14 = 1; *(_QWORD *)&v15 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<spdlog::details::thread_pool,std::allocator<spdlog::details::thread_pool>,unsigned long const&,unsigned int>( (char *)&v15 + 8, &v15, &v13, &spdlog::details::default_async_q_size); v8 = (volatile signed __int32 *)*((_QWORD *)&v15 + 1); v9 = v15; v15 = 0LL; v16 = v9; v10 = v17; v17 = v8; if ( v10 ) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10); if ( *((_QWORD *)&v15 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v15 + 1)); v8 = v17; } *(_QWORD *)&v20 = v16; *((_QWORD *)&v20 + 1) = v8; if ( v8 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v8 + 2); else _InterlockedIncrement(v8 + 2); } spdlog::details::registry::set_tp((long long)v5, &v20); if ( *((_QWORD *)&v20 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v20 + 1)); } *(_QWORD *)&v15 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,std::allocator<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,spdlog::color_mode &>( (char *)&v15 + 8, &v15, &v14, a3); v14 = 0; std::__shared_ptr<spdlog::async_logger,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<spdlog::async_logger>,std::string,std::shared_ptr<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,std::shared_ptr<spdlog::details::thread_pool>,spdlog::async_overflow_policy>( a1, &v13, a2, &v15, &v16, &v14); v18 = *(_QWORD *)a1; v11 = (volatile signed __int32 *)*((_QWORD *)a1 + 1); v19 = v11; if ( v11 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v11 + 2); else _InterlockedIncrement(v11 + 2); } spdlog::details::registry::initialize_logger((long long)v5, &v18); if ( v19 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( *((_QWORD *)&v15 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v15 + 1)); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); pthread_mutex_unlock(v6); return a1; }
create<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,spdlog::color_mode&>: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R13,RDX MOV R12,RSI MOV R14,RDI CALL 0x0012e0ae MOV R15,RAX MOV RDI,RAX CALL 0x0012dfc6 MOV RBX,RAX MOV RDI,RAX CALL 0x00111350 TEST EAX,EAX JNZ 0x0013c76a LAB_0013c5db: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x0012da04 CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0013c6a7 LEA R8,[RSP + 0xc] MOV dword ptr [R8],0x1 LEA RDI,[RSP + 0x18] MOV qword ptr [RDI + -0x8],0x0 LAB_0013c60d: LEA RCX,[0x1838d8] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xb] CALL 0x0013d20e MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV qword ptr [RSP + 0x20],RCX MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x28],RAX TEST RDI,RDI JZ 0x0013c662 CALL 0x0011912a MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0013c65d CALL 0x0011912a LAB_0013c65d: MOV RAX,qword ptr [RSP + 0x28] LAB_0013c662: MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],RAX TEST RAX,RAX JZ 0x0013c68b MOV RCX,qword ptr [0x001b3fa8] CMP byte ptr [RCX],0x0 JZ 0x0013c687 INC dword ptr [RAX + 0x8] JMP 0x0013c68b LAB_0013c687: INC.LOCK dword ptr [RAX + 0x8] LAB_0013c68b: LEA RSI,[RSP + 0x40] MOV RDI,R15 CALL 0x0012d9b0 MOV RDI,qword ptr [RSP + 0x48] TEST RDI,RDI JZ 0x0013c6a7 CALL 0x0011912a LAB_0013c6a7: LEA RDI,[RSP + 0x18] MOV qword ptr [RDI + -0x8],0x0 LAB_0013c6b4: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xc] MOV RCX,R13 CALL 0x0013cffc LEA R9,[RSP + 0xc] MOV dword ptr [R9],0x0 LAB_0013c6d2: LEA RSI,[RSP + 0xb] LEA RCX,[RSP + 0x10] LEA R8,[RSP + 0x20] MOV RDI,R14 MOV RDX,R12 CALL 0x0013da70 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x38],RAX TEST RAX,RAX JZ 0x0013c717 MOV RCX,qword ptr [0x001b3fa8] CMP byte ptr [RCX],0x0 JZ 0x0013c713 INC dword ptr [RAX + 0x8] JMP 0x0013c717 LAB_0013c713: INC.LOCK dword ptr [RAX + 0x8] LAB_0013c717: LEA RSI,[RSP + 0x30] MOV RDI,R15 CALL 0x0012d5a6 LAB_0013c724: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0013c733 CALL 0x0011912a LAB_0013c733: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0013c742 CALL 0x0011912a LAB_0013c742: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0013c751 CALL 0x0011912a LAB_0013c751: MOV RDI,RBX CALL 0x001112d0 MOV RAX,R14 ADD RSP,0x50 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0013c76a: MOV EDI,EAX CALL 0x001114f0
/* std::shared_ptr<spdlog::async_logger> spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>::create<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>, spdlog::color_mode&>(std::__cxx11::string, spdlog::color_mode&) */ async_factory_impl<(spdlog::async_overflow_policy)0> * __thiscall spdlog::async_factory_impl<(spdlog::async_overflow_policy)0>:: create<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,spdlog::color_mode&> (async_factory_impl<(spdlog::async_overflow_policy)0> *this,int8 param_2, int8 param_3) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; int iVar1; registry *this_01; pthread_mutex_t *__mutex; int1 local_6d; int4 local_6c; long local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_60; long local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40; long local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30; this_01 = (registry *)details::registry::instance(); __mutex = (pthread_mutex_t *)details::registry::tp_mutex(this_01); iVar1 = pthread_mutex_lock(__mutex); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } /* try { // try from 0013c5db to 0013c5e7 has its CatchHandler @ 0013c7c7 */ details::registry::get_tp(); if (local_58 == 0) { local_6c = 1; local_68 = 0; /* try { // try from 0013c60d to 0013c622 has its CatchHandler @ 0013c77b */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<spdlog::details::thread_pool,std::allocator<spdlog::details::thread_pool>,unsigned_long_const&,unsigned_int> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_60,&local_68,&local_6d, &details::default_async_q_size); this_00 = local_50; local_50 = p_Stack_60; local_58 = local_68; local_68 = 0; p_Stack_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; if ((this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) && (std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00), p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0)) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_60); } local_38 = local_58; if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001b3fa8 == '\0') { LOCK(); *(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1; UNLOCK(); } else { *(int *)(local_50 + 8) = *(int *)(local_50 + 8) + 1; } } /* try { // try from 0013c68b to 0013c697 has its CatchHandler @ 0013c771 */ local_30 = local_50; details::registry::set_tp(this_01,&local_38); if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30); } } local_68 = 0; /* try { // try from 0013c6b4 to 0013c6c5 has its CatchHandler @ 0013c7b3 */ std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>,std::allocator<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,spdlog::color_mode&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&p_Stack_60,&local_68,&local_6c,param_3); local_6c = 0; /* try { // try from 0013c6d2 to 0013c6eb has its CatchHandler @ 0013c79f */ std::__shared_ptr<spdlog::async_logger,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<spdlog::async_logger>,std::__cxx11::string,std::shared_ptr<spdlog::sinks::ansicolor_stderr_sink<spdlog::details::console_nullmutex>>,std::shared_ptr<spdlog::details::thread_pool>,spdlog::async_overflow_policy> ((__shared_ptr<spdlog::async_logger,(__gnu_cxx::_Lock_policy)2> *)this,&local_6d,param_2 ,&local_68,&local_58); local_48 = *(int8 *)this; local_40 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 8); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001b3fa8 == '\0') { LOCK(); *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; UNLOCK(); } else { *(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1; } } /* try { // try from 0013c717 to 0013c723 has its CatchHandler @ 0013c77d */ details::registry::initialize_logger(this_01,&local_48); if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40); } if (p_Stack_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_60); } if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50); } pthread_mutex_unlock(__mutex); return this; }
8,648
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 0x7899e movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x6c, %eax je 0x78986 movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x7899c movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x789dc movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x7a, %eax jne 0x789c2 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x789da movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x70, %eax jne 0x789d8 movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x789da jmp 0x789dc 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_7899E 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_78986 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_7899C loc_78986: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov dword ptr [rax], 1 loc_7899C: jmp short loc_789DC loc_7899E: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 7Ah ; 'z' jnz short loc_789C2 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_789DA loc_789C2: mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 70h ; 'p' jnz short loc_789D8 mov rax, [rbp+var_10] mov dword ptr [rax], 1 loc_789D8: jmp short $+2 loc_789DA: jmp short $+2 loc_789DC: 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 0x0017899e 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 0x00178986 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x0017899c LAB_00178986: 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_0017899c: JMP 0x001789dc LAB_0017899e: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x7a JNZ 0x001789c2 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 0x001789da LAB_001789c2: MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x70 JNZ 0x001789d8 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 LAB_001789d8: JMP 0x001789da LAB_001789da: JMP 0x001789dc LAB_001789dc: 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; }
8,649
LefDefParser::defiNet::clearRectPoly()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::clearRectPoly() { int i; if (polygonNames_) { struct defiPoints* p; for (i = 0; i < numPolys_; i++) { if (polygonNames_[i]){ free((char*)(polygonNames_[i])); } if (polyRouteStatus_[i]) { free((char*)(polyRouteStatus_[i])); } if (polyShapeTypes_[i]) { free((char*)(polyShapeTypes_[i])); } if (polyRouteStatusShieldNames_[i]) { free((char*)(polyRouteStatusShieldNames_[i])); } p = polygons_[i]; free((char*)(p->x)); free((char*)(p->y)); free((char*)(polygons_[i])); } free((char*)(polyMasks_)); free((char*)(polygonNames_)); free((char*)(polygons_)); free((char*)(polyRouteStatus_)); free((char*)(polyShapeTypes_)); free((char*)(polyRouteStatusShieldNames_)); } numPolys_ = 0; polysAllocated_ = 0; polyMasks_ = 0; polygonNames_ = 0; polyRouteStatus_= 0; polyShapeTypes_= 0; polyRouteStatusShieldNames_ = 0; polygons_ = 0; if (rectNames_) { for (i = 0; i < numRects_; i++) { if (rectNames_[i]){ free((char*)(rectNames_[i])); } if (rectRouteStatus_[i]){ free((char*)(rectRouteStatus_[i])); } if (rectShapeTypes_[i]) { free((char*)(rectShapeTypes_[i])); } if (rectRouteStatusShieldNames_[i]) { free((char*)(rectRouteStatusShieldNames_[i])); } } free((char*)(rectMasks_)); free((char*)(rectNames_)); free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); free((char*)(rectShapeTypes_)); free((char*)(rectRouteStatus_)); free((char*)(rectRouteStatusShieldNames_)); } rectNames_ = 0; rectsAllocated_ = 0; xl_ = 0; yl_ = 0; xh_ = 0; yh_ = 0; numRects_ = 0; rectMasks_ = 0; rectRouteStatus_ = 0; rectShapeTypes_ = 0; rectRouteStatusShieldNames_=0; }
O0
cpp
LefDefParser::defiNet::clearRectPoly(): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x178(%rax) je 0x3bdfc movl $0x0, 0x1c(%rsp) movq 0x8(%rsp), %rcx movl 0x1c(%rsp), %eax cmpl 0x170(%rcx), %eax jge 0x3bd96 movq 0x8(%rsp), %rax movq 0x178(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bca0 movq 0x8(%rsp), %rax movq 0x178(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x198(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bcd2 movq 0x8(%rsp), %rax movq 0x198(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1a0(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bd04 movq 0x8(%rsp), %rax movq 0x1a0(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1a8(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bd36 movq 0x8(%rsp), %rax movq 0x1a8(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x188(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x10(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x188(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x3bc59 movq 0x8(%rsp), %rax movq 0x190(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x178(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x188(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x198(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1a0(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1a8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movl $0x0, 0x170(%rax) movl $0x0, 0x180(%rax) movq $0x0, 0x190(%rax) movq $0x0, 0x178(%rax) movq $0x0, 0x198(%rax) movq $0x0, 0x1a0(%rax) movq $0x0, 0x1a8(%rax) movq $0x0, 0x188(%rax) cmpq $0x0, 0x1b8(%rax) je 0x3bff5 movl $0x0, 0x1c(%rsp) movq 0x8(%rsp), %rcx movl 0x1c(%rsp), %eax cmpl 0x1b0(%rcx), %eax jge 0x3bf5c movq 0x8(%rsp), %rax movq 0x1b8(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3beb4 movq 0x8(%rsp), %rax movq 0x1b8(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1e8(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bee6 movq 0x8(%rsp), %rax movq 0x1e8(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1f8(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bf18 movq 0x8(%rsp), %rax movq 0x1f8(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1f0(%rax), %rax movslq 0x1c(%rsp), %rcx cmpq $0x0, (%rax,%rcx,8) je 0x3bf4a movq 0x8(%rsp), %rax movq 0x1f0(%rax), %rax movslq 0x1c(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x72a0 jmp 0x3bf4c movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x3be6d movq 0x8(%rsp), %rax movq 0x1e0(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1b8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1c0(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1c8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1d0(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1d8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1f8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1e8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x1f0(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq $0x0, 0x1b8(%rax) movl $0x0, 0x1b4(%rax) movq $0x0, 0x1c0(%rax) movq $0x0, 0x1c8(%rax) movq $0x0, 0x1d0(%rax) movq $0x0, 0x1d8(%rax) movl $0x0, 0x1b0(%rax) movq $0x0, 0x1e0(%rax) movq $0x0, 0x1e8(%rax) movq $0x0, 0x1f8(%rax) movq $0x0, 0x1f0(%rax) addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser7defiNet13clearRectPolyEv: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax cmp qword ptr [rax+178h], 0 jz loc_3BDFC mov [rsp+28h+var_C], 0 loc_3BC59: mov rcx, [rsp+28h+var_20] mov eax, [rsp+28h+var_C] cmp eax, [rcx+170h] jge loc_3BD96 mov rax, [rsp+28h+var_20] mov rax, [rax+178h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BCA0 mov rax, [rsp+28h+var_20] mov rax, [rax+178h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BCA0: mov rax, [rsp+28h+var_20] mov rax, [rax+198h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BCD2 mov rax, [rsp+28h+var_20] mov rax, [rax+198h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BCD2: mov rax, [rsp+28h+var_20] mov rax, [rax+1A0h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BD04 mov rax, [rsp+28h+var_20] mov rax, [rax+1A0h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BD04: mov rax, [rsp+28h+var_20] mov rax, [rax+1A8h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BD36 mov rax, [rsp+28h+var_20] mov rax, [rax+1A8h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BD36: mov rax, [rsp+28h+var_20] mov rax, [rax+188h] movsxd rcx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov [rsp+28h+var_18], rax mov rax, [rsp+28h+var_18] mov rdi, [rax+8] call _free mov rax, [rsp+28h+var_18] mov rdi, [rax+10h] call _free mov rax, [rsp+28h+var_20] mov rax, [rax+188h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free mov eax, [rsp+28h+var_C] add eax, 1 mov [rsp+28h+var_C], eax jmp loc_3BC59 loc_3BD96: mov rax, [rsp+28h+var_20] mov rdi, [rax+190h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+178h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+188h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+198h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1A0h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1A8h] call _free loc_3BDFC: mov rax, [rsp+28h+var_20] mov dword ptr [rax+170h], 0 mov dword ptr [rax+180h], 0 mov qword ptr [rax+190h], 0 mov qword ptr [rax+178h], 0 mov qword ptr [rax+198h], 0 mov qword ptr [rax+1A0h], 0 mov qword ptr [rax+1A8h], 0 mov qword ptr [rax+188h], 0 cmp qword ptr [rax+1B8h], 0 jz loc_3BFF5 mov [rsp+28h+var_C], 0 loc_3BE6D: mov rcx, [rsp+28h+var_20] mov eax, [rsp+28h+var_C] cmp eax, [rcx+1B0h] jge loc_3BF5C mov rax, [rsp+28h+var_20] mov rax, [rax+1B8h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BEB4 mov rax, [rsp+28h+var_20] mov rax, [rax+1B8h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BEB4: mov rax, [rsp+28h+var_20] mov rax, [rax+1E8h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BEE6 mov rax, [rsp+28h+var_20] mov rax, [rax+1E8h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BEE6: mov rax, [rsp+28h+var_20] mov rax, [rax+1F8h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BF18 mov rax, [rsp+28h+var_20] mov rax, [rax+1F8h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BF18: mov rax, [rsp+28h+var_20] mov rax, [rax+1F0h] movsxd rcx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz short loc_3BF4A mov rax, [rsp+28h+var_20] mov rax, [rax+1F0h] movsxd rcx, [rsp+28h+var_C] mov rdi, [rax+rcx*8] call _free loc_3BF4A: jmp short $+2 loc_3BF4C: mov eax, [rsp+28h+var_C] add eax, 1 mov [rsp+28h+var_C], eax jmp loc_3BE6D loc_3BF5C: mov rax, [rsp+28h+var_20] mov rdi, [rax+1E0h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1B8h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1C0h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1C8h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1D0h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1D8h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1F8h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1E8h] call _free mov rax, [rsp+28h+var_20] mov rdi, [rax+1F0h] call _free loc_3BFF5: mov rax, [rsp+28h+var_20] mov qword ptr [rax+1B8h], 0 mov dword ptr [rax+1B4h], 0 mov qword ptr [rax+1C0h], 0 mov qword ptr [rax+1C8h], 0 mov qword ptr [rax+1D0h], 0 mov qword ptr [rax+1D8h], 0 mov dword ptr [rax+1B0h], 0 mov qword ptr [rax+1E0h], 0 mov qword ptr [rax+1E8h], 0 mov qword ptr [rax+1F8h], 0 mov qword ptr [rax+1F0h], 0 add rsp, 28h retn
LefDefParser::defiNet * LefDefParser::defiNet::clearRectPoly(LefDefParser::defiNet *this) { LefDefParser::defiNet *result; // rax long long v2; // [rsp+10h] [rbp-18h] int i; // [rsp+1Ch] [rbp-Ch] int j; // [rsp+1Ch] [rbp-Ch] if ( *((_QWORD *)this + 47) ) { for ( i = 0; i < *((_DWORD *)this + 92); ++i ) { if ( *(_QWORD *)(*((_QWORD *)this + 47) + 8LL * i) ) free(*(_QWORD *)(*((_QWORD *)this + 47) + 8LL * i)); if ( *(_QWORD *)(*((_QWORD *)this + 51) + 8LL * i) ) free(*(_QWORD *)(*((_QWORD *)this + 51) + 8LL * i)); if ( *(_QWORD *)(*((_QWORD *)this + 52) + 8LL * i) ) free(*(_QWORD *)(*((_QWORD *)this + 52) + 8LL * i)); if ( *(_QWORD *)(*((_QWORD *)this + 53) + 8LL * i) ) free(*(_QWORD *)(*((_QWORD *)this + 53) + 8LL * i)); v2 = *(_QWORD *)(*((_QWORD *)this + 49) + 8LL * i); free(*(_QWORD *)(v2 + 8)); free(*(_QWORD *)(v2 + 16)); free(*(_QWORD *)(*((_QWORD *)this + 49) + 8LL * i)); } free(*((_QWORD *)this + 50)); free(*((_QWORD *)this + 47)); free(*((_QWORD *)this + 49)); free(*((_QWORD *)this + 51)); free(*((_QWORD *)this + 52)); free(*((_QWORD *)this + 53)); } *((_DWORD *)this + 92) = 0; *((_DWORD *)this + 96) = 0; *((_QWORD *)this + 50) = 0LL; *((_QWORD *)this + 47) = 0LL; *((_QWORD *)this + 51) = 0LL; *((_QWORD *)this + 52) = 0LL; *((_QWORD *)this + 53) = 0LL; *((_QWORD *)this + 49) = 0LL; if ( *((_QWORD *)this + 55) ) { for ( j = 0; j < *((_DWORD *)this + 108); ++j ) { if ( *(_QWORD *)(*((_QWORD *)this + 55) + 8LL * j) ) free(*(_QWORD *)(*((_QWORD *)this + 55) + 8LL * j)); if ( *(_QWORD *)(*((_QWORD *)this + 61) + 8LL * j) ) free(*(_QWORD *)(*((_QWORD *)this + 61) + 8LL * j)); if ( *(_QWORD *)(*((_QWORD *)this + 63) + 8LL * j) ) free(*(_QWORD *)(*((_QWORD *)this + 63) + 8LL * j)); if ( *(_QWORD *)(*((_QWORD *)this + 62) + 8LL * j) ) free(*(_QWORD *)(*((_QWORD *)this + 62) + 8LL * j)); } free(*((_QWORD *)this + 60)); free(*((_QWORD *)this + 55)); free(*((_QWORD *)this + 56)); free(*((_QWORD *)this + 57)); free(*((_QWORD *)this + 58)); free(*((_QWORD *)this + 59)); free(*((_QWORD *)this + 63)); free(*((_QWORD *)this + 61)); free(*((_QWORD *)this + 62)); } result = this; *((_QWORD *)this + 55) = 0LL; *((_DWORD *)this + 109) = 0; *((_QWORD *)this + 56) = 0LL; *((_QWORD *)this + 57) = 0LL; *((_QWORD *)this + 58) = 0LL; *((_QWORD *)this + 59) = 0LL; *((_DWORD *)this + 108) = 0; *((_QWORD *)this + 60) = 0LL; *((_QWORD *)this + 61) = 0LL; *((_QWORD *)this + 63) = 0LL; *((_QWORD *)this + 62) = 0LL; return result; }
clearRectPoly: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RAX + 0x178],0x0 JZ 0x0013bdfc MOV dword ptr [RSP + 0x1c],0x0 LAB_0013bc59: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RCX + 0x170] JGE 0x0013bd96 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x178] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bca0 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x178] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bca0: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x198] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bcd2 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x198] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bcd2: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1a0] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bd04 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1a0] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bd04: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1a8] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bd36 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1a8] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bd36: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x188] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x188] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0013bc59 LAB_0013bd96: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x190] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x178] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x188] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x198] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1a0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1a8] CALL 0x001072a0 LAB_0013bdfc: MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x170],0x0 MOV dword ptr [RAX + 0x180],0x0 MOV qword ptr [RAX + 0x190],0x0 MOV qword ptr [RAX + 0x178],0x0 MOV qword ptr [RAX + 0x198],0x0 MOV qword ptr [RAX + 0x1a0],0x0 MOV qword ptr [RAX + 0x1a8],0x0 MOV qword ptr [RAX + 0x188],0x0 CMP qword ptr [RAX + 0x1b8],0x0 JZ 0x0013bff5 MOV dword ptr [RSP + 0x1c],0x0 LAB_0013be6d: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RCX + 0x1b0] JGE 0x0013bf5c MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1b8] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013beb4 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1b8] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013beb4: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1e8] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bee6 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1e8] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bee6: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1f8] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bf18 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1f8] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bf18: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1f0] MOVSXD RCX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0013bf4a MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x1f0] MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001072a0 LAB_0013bf4a: JMP 0x0013bf4c LAB_0013bf4c: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0013be6d LAB_0013bf5c: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1e0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1b8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1c0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1c8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1d0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1d8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1f8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1e8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x1f0] CALL 0x001072a0 LAB_0013bff5: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x1b8],0x0 MOV dword ptr [RAX + 0x1b4],0x0 MOV qword ptr [RAX + 0x1c0],0x0 MOV qword ptr [RAX + 0x1c8],0x0 MOV qword ptr [RAX + 0x1d0],0x0 MOV qword ptr [RAX + 0x1d8],0x0 MOV dword ptr [RAX + 0x1b0],0x0 MOV qword ptr [RAX + 0x1e0],0x0 MOV qword ptr [RAX + 0x1e8],0x0 MOV qword ptr [RAX + 0x1f8],0x0 MOV qword ptr [RAX + 0x1f0],0x0 ADD RSP,0x28 RET
/* LefDefParser::defiNet::clearRectPoly() */ void __thiscall LefDefParser::defiNet::clearRectPoly(defiNet *this) { long lVar1; int local_c; if (*(long *)(this + 0x178) != 0) { for (local_c = 0; local_c < *(int *)(this + 0x170); local_c = local_c + 1) { if (*(long *)(*(long *)(this + 0x178) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x178) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x198) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x198) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x1a0) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1a0) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x1a8) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1a8) + (long)local_c * 8)); } lVar1 = *(long *)(*(long *)(this + 0x188) + (long)local_c * 8); free(*(void **)(lVar1 + 8)); free(*(void **)(lVar1 + 0x10)); free(*(void **)(*(long *)(this + 0x188) + (long)local_c * 8)); } free(*(void **)(this + 400)); free(*(void **)(this + 0x178)); free(*(void **)(this + 0x188)); free(*(void **)(this + 0x198)); free(*(void **)(this + 0x1a0)); free(*(void **)(this + 0x1a8)); } *(int4 *)(this + 0x170) = 0; *(int4 *)(this + 0x180) = 0; *(int8 *)(this + 400) = 0; *(int8 *)(this + 0x178) = 0; *(int8 *)(this + 0x198) = 0; *(int8 *)(this + 0x1a0) = 0; *(int8 *)(this + 0x1a8) = 0; *(int8 *)(this + 0x188) = 0; if (*(long *)(this + 0x1b8) != 0) { for (local_c = 0; local_c < *(int *)(this + 0x1b0); local_c = local_c + 1) { if (*(long *)(*(long *)(this + 0x1b8) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1b8) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x1e8) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1e8) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x1f8) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1f8) + (long)local_c * 8)); } if (*(long *)(*(long *)(this + 0x1f0) + (long)local_c * 8) != 0) { free(*(void **)(*(long *)(this + 0x1f0) + (long)local_c * 8)); } } free(*(void **)(this + 0x1e0)); free(*(void **)(this + 0x1b8)); free(*(void **)(this + 0x1c0)); free(*(void **)(this + 0x1c8)); free(*(void **)(this + 0x1d0)); free(*(void **)(this + 0x1d8)); free(*(void **)(this + 0x1f8)); free(*(void **)(this + 0x1e8)); free(*(void **)(this + 0x1f0)); } *(int8 *)(this + 0x1b8) = 0; *(int4 *)(this + 0x1b4) = 0; *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; *(int8 *)(this + 0x1d0) = 0; *(int8 *)(this + 0x1d8) = 0; *(int4 *)(this + 0x1b0) = 0; *(int8 *)(this + 0x1e0) = 0; *(int8 *)(this + 0x1e8) = 0; *(int8 *)(this + 0x1f8) = 0; *(int8 *)(this + 0x1f0) = 0; return; }
8,650
js_sub_string
bluesky950520[P]quickjs/quickjs.c
static JSValue js_sub_string(JSContext *ctx, JSString *p, int start, int end) { int len = end - start; if (start == 0 && end == p->len) { return js_dup(JS_MKPTR(JS_TAG_STRING, p)); } if (len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } if (p->is_wide_char) { JSString *str; int i; uint16_t c = 0; for (i = start; i < end; i++) { c |= p->u.str16[i]; } if (c > 0xFF) return js_new_string16_len(ctx, p->u.str16 + start, len); str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; for (i = 0; i < len; i++) { str->u.str8[i] = p->u.str16[start + i]; } str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); } else { return js_new_string8_len(ctx, (const char *)(p->u.str8 + start), len); } }
O0
c
js_sub_string: subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movl %edx, 0x34(%rsp) movl %ecx, 0x30(%rsp) movl 0x30(%rsp), %eax subl 0x34(%rsp), %eax movl %eax, 0x2c(%rsp) cmpl $0x0, 0x34(%rsp) jne 0x4f8a2 movl 0x30(%rsp), %eax movq 0x38(%rsp), %rcx movq 0x4(%rcx), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF cmpl %ecx, %eax jne 0x4f8a2 movq 0x38(%rsp), %rax movq %rax, 0x18(%rsp) movq $-0x7, 0x20(%rsp) movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x20410 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x4fa22 cmpl $0x0, 0x2c(%rsp) jg 0x4f8c7 movq 0x40(%rsp), %rdi movl $0x2f, %esi callq 0x27d40 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x4fa22 movq 0x38(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x4f9f9 movw $0x0, 0xa(%rsp) movl 0x34(%rsp), %eax movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x30(%rsp), %eax jge 0x4f921 movq 0x38(%rsp), %rax movslq 0xc(%rsp), %rcx movzwl 0x18(%rax,%rcx,2), %ecx movzwl 0xa(%rsp), %eax orl %ecx, %eax movw %ax, 0xa(%rsp) movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x4f8ef movzwl 0xa(%rsp), %eax cmpl $0xff, %eax jle 0x4f95e movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi addq $0x18, %rsi movslq 0x34(%rsp), %rax shlq %rax addq %rax, %rsi movl 0x2c(%rsp), %edx callq 0x5f4a0 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x4fa22 movq 0x40(%rsp), %rdi movl 0x2c(%rsp), %esi xorl %edx, %edx callq 0x284a0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x4f991 movl $0x0, 0x48(%rsp) movq $0x6, 0x50(%rsp) jmp 0x4fa22 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x2c(%rsp), %eax jge 0x4f9d5 movq 0x38(%rsp), %rax movl 0x34(%rsp), %ecx addl 0xc(%rsp), %ecx movslq %ecx, %rcx movw 0x18(%rax,%rcx,2), %ax movb %al, %dl movq 0x10(%rsp), %rax movslq 0xc(%rsp), %rcx movb %dl, 0x18(%rax,%rcx) movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x4f999 movq 0x10(%rsp), %rax movslq 0x2c(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) movq $-0x7, 0x50(%rsp) jmp 0x4fa22 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi addq $0x18, %rsi movslq 0x34(%rsp), %rax addq %rax, %rsi movl 0x2c(%rsp), %edx callq 0x27300 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
js_sub_string: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov [rsp+58h+var_24], edx mov [rsp+58h+var_28], ecx mov eax, [rsp+58h+var_28] sub eax, [rsp+58h+var_24] mov [rsp+58h+var_2C], eax cmp [rsp+58h+var_24], 0 jnz short loc_4F8A2 mov eax, [rsp+58h+var_28] mov rcx, [rsp+58h+var_20] mov rcx, [rcx+4] and rcx, 7FFFFFFFh cmp eax, ecx jnz short loc_4F8A2 mov rax, [rsp+58h+var_20] mov [rsp+58h+var_40], rax mov [rsp+58h+var_38], 0FFFFFFFFFFFFFFF9h mov rdi, [rsp+58h+var_40] mov rsi, [rsp+58h+var_38] call js_dup mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp loc_4FA22 loc_4F8A2: cmp [rsp+58h+var_2C], 0 jg short loc_4F8C7 mov rdi, [rsp+58h+var_18] mov esi, 2Fh ; '/' call JS_AtomToString mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp loc_4FA22 loc_4F8C7: mov rax, [rsp+58h+var_20] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz loc_4F9F9 mov [rsp+58h+var_4E], 0 mov eax, [rsp+58h+var_24] mov [rsp+58h+var_4C], eax loc_4F8EF: mov eax, [rsp+58h+var_4C] cmp eax, [rsp+58h+var_28] jge short loc_4F921 mov rax, [rsp+58h+var_20] movsxd rcx, [rsp+58h+var_4C] movzx ecx, word ptr [rax+rcx*2+18h] movzx eax, [rsp+58h+var_4E] or eax, ecx mov [rsp+58h+var_4E], ax mov eax, [rsp+58h+var_4C] add eax, 1 mov [rsp+58h+var_4C], eax jmp short loc_4F8EF loc_4F921: movzx eax, [rsp+58h+var_4E] cmp eax, 0FFh jle short loc_4F95E mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_20] add rsi, 18h movsxd rax, [rsp+58h+var_24] shl rax, 1 add rsi, rax mov edx, [rsp+58h+var_2C] call js_new_string16_len mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp loc_4FA22 loc_4F95E: mov rdi, [rsp+58h+var_18] mov esi, [rsp+58h+var_2C] xor edx, edx call js_alloc_string mov [rsp+58h+var_48], rax cmp [rsp+58h+var_48], 0 jnz short loc_4F991 mov dword ptr [rsp+58h+var_10], 0 mov [rsp+58h+var_8], 6 jmp loc_4FA22 loc_4F991: mov [rsp+58h+var_4C], 0 loc_4F999: mov eax, [rsp+58h+var_4C] cmp eax, [rsp+58h+var_2C] jge short loc_4F9D5 mov rax, [rsp+58h+var_20] mov ecx, [rsp+58h+var_24] add ecx, [rsp+58h+var_4C] movsxd rcx, ecx mov ax, [rax+rcx*2+18h] mov dl, al mov rax, [rsp+58h+var_48] movsxd rcx, [rsp+58h+var_4C] mov [rax+rcx+18h], dl mov eax, [rsp+58h+var_4C] add eax, 1 mov [rsp+58h+var_4C], eax jmp short loc_4F999 loc_4F9D5: mov rax, [rsp+58h+var_48] movsxd rcx, [rsp+58h+var_2C] mov byte ptr [rax+rcx+18h], 0 mov rax, [rsp+58h+var_48] mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], 0FFFFFFFFFFFFFFF9h jmp short loc_4FA22 loc_4F9F9: mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_20] add rsi, 18h movsxd rax, [rsp+58h+var_24] add rsi, rax mov edx, [rsp+58h+var_2C] call js_new_string8_len mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx loc_4FA22: mov rax, [rsp+58h+var_10] mov rdx, [rsp+58h+var_8] add rsp, 58h retn
_DWORD * js_sub_string(long long a1, _DWORD *a2, int a3, int a4) { unsigned __int16 v5; // [rsp+Ah] [rbp-4Eh] int i; // [rsp+Ch] [rbp-4Ch] signed int j; // [rsp+Ch] [rbp-4Ch] long long v8; // [rsp+10h] [rbp-48h] signed int v9; // [rsp+2Ch] [rbp-2Ch] long long v11; // [rsp+48h] [rbp-10h] v9 = a4 - a3; if ( !a3 && a4 == (a2[1] & 0x7FFFFFFF) ) return js_dup(a2, 0xFFFFFFF9); if ( v9 <= 0 ) return (_DWORD *)JS_AtomToString(a1, 0x2Fu); if ( (*(_QWORD *)(a2 + 1) & 0x80000000LL) == 0 ) return (_DWORD *)js_new_string8_len(a1, (long long)a2 + a3 + 24, v9); v5 = 0; for ( i = a3; i < a4; ++i ) v5 |= *((_WORD *)a2 + i + 12); if ( v5 > 0xFFu ) return (_DWORD *)js_new_string16_len(a1, (char *)a2 + 2 * a3 + 24, (unsigned int)v9); v8 = js_alloc_string(a1, v9, 0); if ( v8 ) { for ( j = 0; j < v9; ++j ) *(_BYTE *)(v8 + j + 24) = *((_WORD *)a2 + j + a3 + 12); *(_BYTE *)(v8 + v9 + 24) = 0; return (_DWORD *)v8; } else { LODWORD(v11) = 0; } return (_DWORD *)v11; }
js_sub_string: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV dword ptr [RSP + 0x34],EDX MOV dword ptr [RSP + 0x30],ECX MOV EAX,dword ptr [RSP + 0x30] SUB EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x2c],EAX CMP dword ptr [RSP + 0x34],0x0 JNZ 0x0014f8a2 MOV EAX,dword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x4] AND RCX,0x7fffffff CMP EAX,ECX JNZ 0x0014f8a2 MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x7 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00120410 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0014fa22 LAB_0014f8a2: CMP dword ptr [RSP + 0x2c],0x0 JG 0x0014f8c7 MOV RDI,qword ptr [RSP + 0x40] MOV ESI,0x2f CALL 0x00127d40 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0014fa22 LAB_0014f8c7: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x0014f9f9 MOV word ptr [RSP + 0xa],0x0 MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0xc],EAX LAB_0014f8ef: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x30] JGE 0x0014f921 MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0xc] MOVZX ECX,word ptr [RAX + RCX*0x2 + 0x18] MOVZX EAX,word ptr [RSP + 0xa] OR EAX,ECX MOV word ptr [RSP + 0xa],AX MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x0014f8ef LAB_0014f921: MOVZX EAX,word ptr [RSP + 0xa] CMP EAX,0xff JLE 0x0014f95e MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] ADD RSI,0x18 MOVSXD RAX,dword ptr [RSP + 0x34] SHL RAX,0x1 ADD RSI,RAX MOV EDX,dword ptr [RSP + 0x2c] CALL 0x0015f4a0 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0014fa22 LAB_0014f95e: MOV RDI,qword ptr [RSP + 0x40] MOV ESI,dword ptr [RSP + 0x2c] XOR EDX,EDX CALL 0x001284a0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x0014f991 MOV dword ptr [RSP + 0x48],0x0 MOV qword ptr [RSP + 0x50],0x6 JMP 0x0014fa22 LAB_0014f991: MOV dword ptr [RSP + 0xc],0x0 LAB_0014f999: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x2c] JGE 0x0014f9d5 MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RSP + 0x34] ADD ECX,dword ptr [RSP + 0xc] MOVSXD RCX,ECX MOV AX,word ptr [RAX + RCX*0x2 + 0x18] MOV DL,AL MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0xc] MOV byte ptr [RAX + RCX*0x1 + 0x18],DL MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x0014f999 LAB_0014f9d5: MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x2c] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],-0x7 JMP 0x0014fa22 LAB_0014f9f9: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] ADD RSI,0x18 MOVSXD RAX,dword ptr [RSP + 0x34] ADD RSI,RAX MOV EDX,dword ptr [RSP + 0x2c] CALL 0x00127300 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX LAB_0014fa22: MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
int1 [16] js_sub_string(int8 param_1,long param_2,int param_3,uint param_4) { int iVar1; long lVar2; int1 auVar3 [16]; ushort local_4e; int local_4c; int4 local_10; int4 uStack_c; int8 local_8; iVar1 = param_4 - param_3; if ((param_3 == 0) && (param_4 == ((uint)*(int8 *)(param_2 + 4) & 0x7fffffff))) { auVar3 = js_dup(param_2,0xfffffffffffffff9); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } else if (iVar1 < 1) { auVar3 = JS_AtomToString(param_1,0x2f); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } else if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) { auVar3 = js_new_string8_len(param_1,param_2 + 0x18 + (long)param_3,iVar1); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } else { local_4e = 0; for (local_4c = param_3; local_4c < (int)param_4; local_4c = local_4c + 1) { local_4e = local_4e | *(ushort *)(param_2 + 0x18 + (long)local_4c * 2); } if (local_4e < 0x100) { lVar2 = js_alloc_string(param_1,iVar1,0); if (lVar2 == 0) { local_10 = 0; local_8 = 6; } else { for (local_4c = 0; local_4c < iVar1; local_4c = local_4c + 1) { *(char *)(lVar2 + 0x18 + (long)local_4c) = (char)*(int2 *)(param_2 + 0x18 + (long)(param_3 + local_4c) * 2); } *(int1 *)(lVar2 + 0x18 + (long)iVar1) = 0; local_10 = (int4)lVar2; uStack_c = (int4)((ulong)lVar2 >> 0x20); local_8 = 0xfffffffffffffff9; } } else { auVar3 = js_new_string16_len(param_1,param_2 + 0x18 + (long)param_3 * 2,iVar1); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } } auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
8,651
js_sub_string
bluesky950520[P]quickjs/quickjs.c
static JSValue js_sub_string(JSContext *ctx, JSString *p, int start, int end) { int len = end - start; if (start == 0 && end == p->len) { return js_dup(JS_MKPTR(JS_TAG_STRING, p)); } if (len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } if (p->is_wide_char) { JSString *str; int i; uint16_t c = 0; for (i = start; i < end; i++) { c |= p->u.str16[i]; } if (c > 0xFF) return js_new_string16_len(ctx, p->u.str16 + start, len); str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; for (i = 0; i < len; i++) { str->u.str8[i] = p->u.str16[start + i]; } str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); } else { return js_new_string8_len(ctx, (const char *)(p->u.str8 + start), len); } }
O3
c
js_sub_string: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %rbx testl %edx, %edx jne 0x349e2 movl $0x7fffffff, %eax # imm = 0x7FFFFFFF andl 0x4(%rbx), %eax cmpl %ecx, %eax je 0x34a1a movl %ecx, %r14d subl %ebp, %r14d testl %r14d, %r14d jle 0x34a0b testb $-0x80, 0x7(%rbx) jne 0x34a28 movslq %ebp, %rax leaq (%rbx,%rax), %rsi addq $0x18, %rsi movl %r14d, %edx callq 0x1fcd9 jmp 0x34ac5 movq 0x18(%rdi), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %rbx incl (%rbx) movq $-0x7, %rdx jmp 0x34ad1 cmpl %ebp, %ecx jle 0x34a89 movslq %ebp, %rax movslq %ecx, %rdx xorl %ecx, %ecx orw 0x18(%rbx,%rax,2), %cx incq %rax cmpq %rax, %rdx jne 0x34a34 movzwl %cx, %eax cmpl $0x100, %eax # imm = 0x100 jb 0x34a89 movl %r14d, %esi movl $0x1, %edx callq 0x20686 testq %rax, %rax je 0x34aca movq %rax, %r15 movslq %ebp, %rax leaq (%rbx,%rax,2), %rsi addq $0x18, %rsi movq %r15, %rdi addq $0x18, %rdi addl %r14d, %r14d movq %r14, %rdx callq 0xe5a0 movq $-0x7, %rdx movq %r15, %rbx jmp 0x34ad1 movl %r14d, %esi xorl %edx, %edx callq 0x20686 testq %rax, %rax je 0x34aca movslq %ebp, %rdx movl %r14d, %ecx leaq (%rbx,%rdx,2), %rdx addq $0x18, %rdx xorl %esi, %esi movb (%rdx,%rsi,2), %dil movb %dil, 0x18(%rax,%rsi) incq %rsi cmpq %rsi, %rcx jne 0x34aa8 movb $0x0, 0x18(%rax,%rcx) movq $-0x7, %rdx movq %rax, %rbx jmp 0x34ad1 movl $0x6, %edx xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_sub_string: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov rbx, rsi test edx, edx jnz short loc_349E2 mov eax, 7FFFFFFFh and eax, [rbx+4] cmp eax, ecx jz short loc_34A1A loc_349E2: mov r14d, ecx sub r14d, ebp test r14d, r14d jle short loc_34A0B test byte ptr [rbx+7], 80h jnz short loc_34A28 movsxd rax, ebp lea rsi, [rbx+rax] add rsi, 18h mov edx, r14d call js_new_string8_len jmp loc_34AC5 loc_34A0B: mov rax, [rdi+18h] mov rax, [rax+68h] mov rbx, [rax+178h] loc_34A1A: inc dword ptr [rbx] mov rdx, 0FFFFFFFFFFFFFFF9h jmp loc_34AD1 loc_34A28: cmp ecx, ebp jle short loc_34A89 movsxd rax, ebp movsxd rdx, ecx xor ecx, ecx loc_34A34: or cx, [rbx+rax*2+18h] inc rax cmp rdx, rax jnz short loc_34A34 movzx eax, cx cmp eax, 100h jb short loc_34A89 mov esi, r14d mov edx, 1 call js_alloc_string test rax, rax jz short loc_34ACA mov r15, rax movsxd rax, ebp lea rsi, [rbx+rax*2] add rsi, 18h mov rdi, r15 add rdi, 18h add r14d, r14d mov rdx, r14 call _memcpy mov rdx, 0FFFFFFFFFFFFFFF9h mov rbx, r15 jmp short loc_34AD1 loc_34A89: mov esi, r14d xor edx, edx call js_alloc_string test rax, rax jz short loc_34ACA movsxd rdx, ebp mov ecx, r14d lea rdx, [rbx+rdx*2] add rdx, 18h xor esi, esi loc_34AA8: mov dil, [rdx+rsi*2] mov [rax+rsi+18h], dil inc rsi cmp rcx, rsi jnz short loc_34AA8 mov byte ptr [rax+rcx+18h], 0 mov rdx, 0FFFFFFFFFFFFFFF9h loc_34AC5: mov rbx, rax jmp short loc_34AD1 loc_34ACA: mov edx, 6 xor ebx, ebx loc_34AD1: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_sub_string(long long a1, long long a2, int a3, int a4) { _DWORD *v5; // rbx unsigned int v6; // r14d long long v7; // rax long long v8; // rax long long v9; // rdx unsigned __int16 v10; // cx long long v11; // rax long long v12; // r15 long long v13; // rsi v5 = (_DWORD *)a2; if ( a3 || (*(_DWORD *)(a2 + 4) & 0x7FFFFFFF) != a4 ) { v6 = a4 - a3; if ( a4 - a3 > 0 ) { if ( *(char *)(a2 + 7) >= 0 ) return js_new_string8_len(a1, a2 + a3 + 24, v6); if ( a4 <= a3 ) goto LABEL_14; v8 = a3; v9 = a4; v10 = 0; do v10 |= *(_WORD *)(a2 + 2 * v8++ + 24); while ( v9 != v8 ); if ( v10 < 0x100u ) { LABEL_14: v7 = js_alloc_string(a1, v6, 0); if ( v7 ) { v13 = 0LL; do { *(_BYTE *)(v7 + v13 + 24) = *((_BYTE *)v5 + 2 * a3 + 2 * v13 + 24); ++v13; } while ( v6 != v13 ); *(_BYTE *)(v7 + v6 + 24) = 0; return v7; } } else { v11 = js_alloc_string(a1, v6, 1u); if ( v11 ) { v12 = v11; memcpy(v11 + 24, a2 + 2LL * a3 + 24, 2 * v6); return v12; } } return 0LL; } v5 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); } ++*v5; return (long long)v5; }
js_sub_string: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV RBX,RSI TEST EDX,EDX JNZ 0x001349e2 MOV EAX,0x7fffffff AND EAX,dword ptr [RBX + 0x4] CMP EAX,ECX JZ 0x00134a1a LAB_001349e2: MOV R14D,ECX SUB R14D,EBP TEST R14D,R14D JLE 0x00134a0b TEST byte ptr [RBX + 0x7],0x80 JNZ 0x00134a28 MOVSXD RAX,EBP LEA RSI,[RBX + RAX*0x1] ADD RSI,0x18 MOV EDX,R14D CALL 0x0011fcd9 JMP 0x00134ac5 LAB_00134a0b: MOV RAX,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV RBX,qword ptr [RAX + 0x178] LAB_00134a1a: INC dword ptr [RBX] MOV RDX,-0x7 JMP 0x00134ad1 LAB_00134a28: CMP ECX,EBP JLE 0x00134a89 MOVSXD RAX,EBP MOVSXD RDX,ECX XOR ECX,ECX LAB_00134a34: OR CX,word ptr [RBX + RAX*0x2 + 0x18] INC RAX CMP RDX,RAX JNZ 0x00134a34 MOVZX EAX,CX CMP EAX,0x100 JC 0x00134a89 MOV ESI,R14D MOV EDX,0x1 CALL 0x00120686 TEST RAX,RAX JZ 0x00134aca MOV R15,RAX MOVSXD RAX,EBP LEA RSI,[RBX + RAX*0x2] ADD RSI,0x18 MOV RDI,R15 ADD RDI,0x18 ADD R14D,R14D MOV RDX,R14 CALL 0x0010e5a0 MOV RDX,-0x7 MOV RBX,R15 JMP 0x00134ad1 LAB_00134a89: MOV ESI,R14D XOR EDX,EDX CALL 0x00120686 TEST RAX,RAX JZ 0x00134aca MOVSXD RDX,EBP MOV ECX,R14D LEA RDX,[RBX + RDX*0x2] ADD RDX,0x18 XOR ESI,ESI LAB_00134aa8: MOV DIL,byte ptr [RDX + RSI*0x2] MOV byte ptr [RAX + RSI*0x1 + 0x18],DIL INC RSI CMP RCX,RSI JNZ 0x00134aa8 MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV RDX,-0x7 LAB_00134ac5: MOV RBX,RAX JMP 0x00134ad1 LAB_00134aca: MOV EDX,0x6 XOR EBX,EBX LAB_00134ad1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int * js_sub_string(long param_1,int *param_2,int param_3,uint param_4) { int *piVar1; long lVar2; ushort uVar3; ulong uVar4; uint uVar5; if ((param_3 != 0) || ((param_2[1] & 0x7fffffffU) != param_4)) { uVar5 = param_4 - param_3; if (0 < (int)uVar5) { if ((*(byte *)((long)param_2 + 7) & 0x80) == 0) { piVar1 = (int *)js_new_string8_len(param_1,(long)param_2 + (long)param_3 + 0x18,uVar5); return piVar1; } if (param_3 < (int)param_4) { lVar2 = (long)param_3; uVar3 = 0; do { uVar3 = uVar3 | *(ushort *)((long)param_2 + lVar2 * 2 + 0x18); lVar2 = lVar2 + 1; } while ((int)param_4 != lVar2); if (0xff < uVar3) { piVar1 = (int *)js_alloc_string(param_1,uVar5,1); if (piVar1 == (int *)0x0) { return (int *)0x0; } memcpy(piVar1 + 6,(void *)((long)param_2 + (long)param_3 * 2 + 0x18),(ulong)(uVar5 * 2)); return piVar1; } } piVar1 = (int *)js_alloc_string(param_1,uVar5,0); if (piVar1 == (int *)0x0) { return (int *)0x0; } uVar4 = 0; do { *(int1 *)((long)piVar1 + uVar4 + 0x18) = *(int1 *)((long)param_2 + uVar4 * 2 + (long)param_3 * 2 + 0x18); uVar4 = uVar4 + 1; } while (uVar5 != uVar4); *(int1 *)((long)piVar1 + (ulong)uVar5 + 0x18) = 0; return piVar1; } param_2 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); } *param_2 = *param_2 + 1; return param_2; }
8,652
parser_parse_atom
tsotchke[P]eshkol/src/frontend/parser/parser_expressions.c
AstNode* parser_parse_atom(Parser* parser) { size_t line = parser->current.line; size_t column = parser->current.column; if (parser_match(parser, TOKEN_NUMBER)) { return ast_create_number(parser->arena, parser->previous.value.number, line, column); } else if (parser_match(parser, TOKEN_BOOLEAN)) { return ast_create_boolean(parser->arena, parser->previous.value.boolean, line, column); } else if (parser_match(parser, TOKEN_CHARACTER)) { return ast_create_character(parser->arena, parser->previous.value.character, line, column); } else if (parser_match(parser, TOKEN_STRING)) { return ast_create_string(parser->arena, parser->previous.value.string_id, line, column); } else if (parser_match(parser, TOKEN_IDENTIFIER)) { StringId name = parser->previous.value.string_id; AstNode* node = ast_create_identifier(parser->arena, name, line, column); if (!node) { parser_error(parser, "Failed to create identifier node"); return NULL; } // Resolve the binding uint64_t binding_id = binding_system_resolve_binding(parser->bindings, name); if (binding_id != 0) { // Set the binding ID in the node node->binding_id = binding_id; // Set the scope ID in the node node->scope_id = binding_system_get_binding_scope(parser->bindings, binding_id); } return node; } else { parser_error(parser, "Expected expression"); return NULL; } }
O2
c
parser_parse_atom: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %r15 movq 0x40(%rdi), %r14 pushq $0xd popq %rsi callq 0x56b9 testb %al, %al je 0x5a84 movq (%rbx), %rdi movsd 0x78(%rbx), %xmm0 movq %r15, %rsi movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x9a2c pushq $0xc popq %rsi movq %rbx, %rdi callq 0x56b9 testb %al, %al je 0x5ab0 movq (%rbx), %rdi movzbl 0x78(%rbx), %esi movq %r15, %rdx movq %r14, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x9a50 pushq $0xe popq %rsi movq %rbx, %rdi callq 0x56b9 testb %al, %al je 0x5adc movq (%rbx), %rdi movsbl 0x78(%rbx), %esi movq %r15, %rdx movq %r14, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x9a65 pushq $0xf popq %rsi movq %rbx, %rdi callq 0x56b9 testb %al, %al je 0x5b08 movq (%rbx), %rdi movq 0x78(%rbx), %rsi movq %r15, %rdx movq %r14, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x9a7a pushq $0xb popq %rsi movq %rbx, %rdi callq 0x56b9 testb %al, %al je 0x5b61 movq (%rbx), %rdi movq 0x78(%rbx), %r12 movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x9acc testq %rax, %rax je 0x5b6a movq %rax, %r14 movq 0x88(%rbx), %rdi movq %r12, %rsi callq 0x76f7 testq %rax, %rax je 0x5b7c movq %rax, 0x28(%r14) movq 0x88(%rbx), %rdi movq %rax, %rsi callq 0x77fd movq %rax, 0x30(%r14) jmp 0x5b7c leaq 0x12f8e(%rip), %rsi # 0x18af6 jmp 0x5b71 leaq 0x12f64(%rip), %rsi # 0x18ad5 movq %rbx, %rdi callq 0x58b0 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
parser_parse_atom: push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r15, [rdi+38h] mov r14, [rdi+40h] push 0Dh pop rsi call parser_match test al, al jz short loc_5A84 mov rdi, [rbx] movsd xmm0, qword ptr [rbx+78h] mov rsi, r15 mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ast_create_number loc_5A84: push 0Ch pop rsi mov rdi, rbx call parser_match test al, al jz short loc_5AB0 mov rdi, [rbx] movzx esi, byte ptr [rbx+78h] mov rdx, r15 mov rcx, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ast_create_boolean loc_5AB0: push 0Eh pop rsi mov rdi, rbx call parser_match test al, al jz short loc_5ADC mov rdi, [rbx] movsx esi, byte ptr [rbx+78h] mov rdx, r15 mov rcx, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ast_create_character loc_5ADC: push 0Fh pop rsi mov rdi, rbx call parser_match test al, al jz short loc_5B08 mov rdi, [rbx] mov rsi, [rbx+78h] mov rdx, r15 mov rcx, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ast_create_string loc_5B08: push 0Bh pop rsi mov rdi, rbx call parser_match test al, al jz short loc_5B61 mov rdi, [rbx] mov r12, [rbx+78h] mov rsi, r12 mov rdx, r15 mov rcx, r14 call ast_create_identifier test rax, rax jz short loc_5B6A mov r14, rax mov rdi, [rbx+88h] mov rsi, r12 call binding_system_resolve_binding test rax, rax jz short loc_5B7C mov [r14+28h], rax mov rdi, [rbx+88h] mov rsi, rax call binding_system_get_binding_scope mov [r14+30h], rax jmp short loc_5B7C loc_5B61: lea rsi, aExpectedExpres; "Expected expression" jmp short loc_5B71 loc_5B6A: lea rsi, aFailedToCreate; "Failed to create identifier node" loc_5B71: mov rdi, rbx call parser_error xor r14d, r14d loc_5B7C: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long parser_parse_atom(double *a1) { long long v1; // r15 long long v2; // r14 long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 long long v8; // r12 long long identifier; // rax long long v10; // r14 long long v11; // rax const char *v12; // rsi v1 = *((_QWORD *)a1 + 7); v2 = *((_QWORD *)a1 + 8); if ( (unsigned __int8)parser_match((long long)a1, 13) ) return ast_create_number(*(_QWORD *)a1, v1, v2, a1[15]); if ( (unsigned __int8)parser_match((long long)a1, 12) ) return ast_create_boolean(*(_QWORD *)a1, *((unsigned __int8 *)a1 + 120), v1, v2); if ( (unsigned __int8)parser_match((long long)a1, 14) ) return ast_create_character(*(_QWORD *)a1, (unsigned int)*((char *)a1 + 120), v1, v2); if ( (unsigned __int8)parser_match((long long)a1, 15) ) return ast_create_string(*(_QWORD *)a1, *((_QWORD *)a1 + 15), v1, v2); if ( (unsigned __int8)parser_match((long long)a1, 11) ) { v8 = *((_QWORD *)a1 + 15); identifier = ast_create_identifier(*(_QWORD *)a1, v8, v1, v2); if ( identifier ) { v10 = identifier; v11 = binding_system_resolve_binding(*((_QWORD *)a1 + 17), v8); if ( v11 ) { *(_QWORD *)(v10 + 40) = v11; *(_QWORD *)(v10 + 48) = binding_system_get_binding_scope(*((_QWORD *)a1 + 17), v11); } return v10; } v12 = "Failed to create identifier node"; } else { v12 = "Expected expression"; } parser_error((long long)a1, (long long)v12, v4, v5, v6, v7); return 0LL; }
parser_parse_atom: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R15,qword ptr [RDI + 0x38] MOV R14,qword ptr [RDI + 0x40] PUSH 0xd POP RSI CALL 0x001056b9 TEST AL,AL JZ 0x00105a84 MOV RDI,qword ptr [RBX] MOVSD XMM0,qword ptr [RBX + 0x78] MOV RSI,R15 MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00109a2c LAB_00105a84: PUSH 0xc POP RSI MOV RDI,RBX CALL 0x001056b9 TEST AL,AL JZ 0x00105ab0 MOV RDI,qword ptr [RBX] MOVZX ESI,byte ptr [RBX + 0x78] MOV RDX,R15 MOV RCX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00109a50 LAB_00105ab0: PUSH 0xe POP RSI MOV RDI,RBX CALL 0x001056b9 TEST AL,AL JZ 0x00105adc MOV RDI,qword ptr [RBX] MOVSX ESI,byte ptr [RBX + 0x78] MOV RDX,R15 MOV RCX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00109a65 LAB_00105adc: PUSH 0xf POP RSI MOV RDI,RBX CALL 0x001056b9 TEST AL,AL JZ 0x00105b08 MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x78] MOV RDX,R15 MOV RCX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x00109a7a LAB_00105b08: PUSH 0xb POP RSI MOV RDI,RBX CALL 0x001056b9 TEST AL,AL JZ 0x00105b61 MOV RDI,qword ptr [RBX] MOV R12,qword ptr [RBX + 0x78] MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x00109acc TEST RAX,RAX JZ 0x00105b6a MOV R14,RAX MOV RDI,qword ptr [RBX + 0x88] MOV RSI,R12 CALL 0x001076f7 TEST RAX,RAX JZ 0x00105b7c MOV qword ptr [R14 + 0x28],RAX MOV RDI,qword ptr [RBX + 0x88] MOV RSI,RAX CALL 0x001077fd MOV qword ptr [R14 + 0x30],RAX JMP 0x00105b7c LAB_00105b61: LEA RSI,[0x118af6] JMP 0x00105b71 LAB_00105b6a: LEA RSI,[0x118ad5] LAB_00105b71: MOV RDI,RBX CALL 0x001058b0 XOR R14D,R14D LAB_00105b7c: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
long parser_parse_atom(int8 *param_1) { int8 uVar1; int8 uVar2; char cVar3; long lVar4; long lVar5; int8 uVar6; char *pcVar7; uVar6 = param_1[7]; uVar1 = param_1[8]; cVar3 = parser_match(param_1,0xd); if (cVar3 != '\0') { lVar4 = ast_create_number(param_1[0xf],*param_1,uVar6,uVar1); return lVar4; } cVar3 = parser_match(param_1,0xc); if (cVar3 != '\0') { lVar4 = ast_create_boolean(*param_1,*(int1 *)(param_1 + 0xf),uVar6,uVar1); return lVar4; } cVar3 = parser_match(param_1,0xe); if (cVar3 != '\0') { lVar4 = ast_create_character(*param_1,(int)*(char *)(param_1 + 0xf),uVar6,uVar1); return lVar4; } cVar3 = parser_match(param_1,0xf); if (cVar3 == '\0') { cVar3 = parser_match(param_1,0xb); if (cVar3 == '\0') { pcVar7 = "Expected expression"; } else { uVar2 = param_1[0xf]; lVar4 = ast_create_identifier(*param_1,uVar2,uVar6,uVar1); if (lVar4 != 0) { lVar5 = binding_system_resolve_binding(param_1[0x11],uVar2); if (lVar5 == 0) { return lVar4; } *(long *)(lVar4 + 0x28) = lVar5; uVar6 = binding_system_get_binding_scope(param_1[0x11],lVar5); *(int8 *)(lVar4 + 0x30) = uVar6; return lVar4; } pcVar7 = "Failed to create identifier node"; } parser_error(param_1,pcVar7); return 0; } lVar4 = ast_create_string(*param_1,param_1[0xf],uVar6,uVar1); return lVar4; }
8,653
google::protobuf::compiler::cpp::ServiceGenerator::ServiceGenerator(google::protobuf::ServiceDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, google::protobuf::compiler::cpp::Options const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/service.cc
ServiceGenerator::ServiceGenerator( const ServiceDescriptor* descriptor, const std::map<std::string, std::string>& vars, const Options& options) : descriptor_(descriptor), vars_(vars), options_(options) { vars_["classname"] = descriptor_->name(); vars_["full_name"] = descriptor_->full_name(); }
O3
cpp
google::protobuf::compiler::cpp::ServiceGenerator::ServiceGenerator(google::protobuf::ServiceDescriptor const*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<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&, google::protobuf::compiler::cpp::Options const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r15 movq %rdi, %r14 movq %rsi, (%rdi) leaq 0x8(%rdi), %rbx movq %rbx, %rdi movq %rdx, %rsi callq 0x7e61e movq %r15, 0x38(%r14) movq (%r14), %rax movq 0x8(%rax), %r15 leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x109b27(%rip), %rsi # 0x1a649e leaq 0x109b29(%rip), %rdx # 0x1a64a7 leaq 0x8(%rsp), %rdi callq 0x250b2 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x2e310 movq %rax, %rdi movq %r15, %rsi callq 0x1f260 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9c9af callq 0x1f4a0 movq (%r14), %rax movq 0x8(%rax), %r14 leaq 0x8(%rsp), %rdi movq %r12, (%rdi) leaq 0x114302(%rip), %rsi # 0x1b0cc7 leaq 0x114304(%rip), %rdx # 0x1b0cd0 callq 0x250b2 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x2e310 addq $0x20, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x1f260 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9c9fc callq 0x1f4a0 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x9ca0a movq %rax, %r14 jmp 0x9ca23 jmp 0x9ca11 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9ca23 callq 0x1f4a0 movq %rbx, %rdi callq 0x2e5e0 movq %r14, %rdi callq 0x1f860 nop
_ZN6google8protobuf8compiler3cpp16ServiceGeneratorC2EPKNS0_17ServiceDescriptorERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4lessISD_ESaISt4pairIKSD_SD_EEERKNS2_7OptionsE: push r15 push r14 push r12 push rbx sub rsp, 28h mov r15, rcx mov r14, rdi mov [rdi], rsi lea rbx, [rdi+8] mov rdi, rbx mov rsi, rdx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; 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(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>>> const&) mov [r14+38h], r15 mov rax, [r14] mov r15, [rax+8] lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea rsi, aMetadataClassn+9; "classname" lea rdx, aMetadataClassn+12h; "" 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) lea rsi, [rsp+48h+var_40] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_9C9AF call __ZdlPv; operator delete(void *) loc_9C9AF: mov rax, [r14] mov r14, [rax+8] lea rdi, [rsp+48h+var_40] mov [rdi], r12 lea rsi, aNestedFullName+7; "full_name" lea rdx, aNestedFullName+10h; "" 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) lea rsi, [rsp+48h+var_40] mov rdi, rbx call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) add r14, 20h ; ' ' mov rdi, rax mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_9C9FC call __ZdlPv; operator delete(void *) loc_9C9FC: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_9CA0A: mov r14, rax jmp short loc_9CA23 jmp short $+2 loc_9CA11: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_9CA23 call __ZdlPv; operator delete(void *) loc_9CA23: mov rdi, rbx 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 rdi, r14 call __Unwind_Resume
void google::protobuf::compiler::cpp::ServiceGenerator::ServiceGenerator( _QWORD *a1, long long a2, long long a3, long long a4) { long long v5; // r15 long long v6; // rax long long v7; // r14 long long v8; // rax void *v9[2]; // [rsp+8h] [rbp-40h] BYREF _BYTE v10[48]; // [rsp+18h] [rbp-30h] BYREF *a1 = a2; 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( (long long)(a1 + 1), a3); a1[7] = a4; v5 = *(_QWORD *)(*a1 + 8LL); v9[0] = v10; std::string::_M_construct<char const*>((long long)v9, "classname", (long long)""); v6 = std::map<std::string,std::string>::operator[]((long long)(a1 + 1), (long long)v9); std::string::_M_assign(v6, v5); if ( v9[0] != v10 ) operator delete(v9[0]); v7 = *(_QWORD *)(*a1 + 8LL); v9[0] = v10; std::string::_M_construct<char const*>((long long)v9, "full_name", (long long)""); v8 = std::map<std::string,std::string>::operator[]((long long)(a1 + 1), (long long)v9); std::string::_M_assign(v8, v7 + 32); if ( v9[0] != v10 ) operator delete(v9[0]); }
ServiceGenerator: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RCX MOV R14,RDI MOV qword ptr [RDI],RSI LEA RBX,[RDI + 0x8] MOV RDI,RBX MOV RSI,RDX CALL 0x0017e61e MOV qword ptr [R14 + 0x38],R15 MOV RAX,qword ptr [R14] MOV R15,qword ptr [RAX + 0x8] LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LAB_0019c970: LEA RSI,[0x2a649e] LEA RDX,[0x2a64a7] LEA RDI,[RSP + 0x8] CALL 0x001250b2 LAB_0019c988: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0012e310 MOV RDI,RAX MOV RSI,R15 CALL 0x0011f260 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0019c9af CALL 0x0011f4a0 LAB_0019c9af: MOV RAX,qword ptr [R14] MOV R14,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R12 LAB_0019c9be: LEA RSI,[0x2b0cc7] LEA RDX,[0x2b0cd0] CALL 0x001250b2 LAB_0019c9d1: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0012e310 ADD R14,0x20 MOV RDI,RAX MOV RSI,R14 CALL 0x0011f260 LAB_0019c9ed: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0019c9fc CALL 0x0011f4a0 LAB_0019c9fc: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* google::protobuf::compiler::cpp::ServiceGenerator::ServiceGenerator(google::protobuf::ServiceDescriptor const*, std::map<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&, google::protobuf::compiler::cpp::Options const&) */ void __thiscall google::protobuf::compiler::cpp::ServiceGenerator::ServiceGenerator (ServiceGenerator *this,ServiceDescriptor *param_1,map *param_2,Options *param_3) { _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>>> *this_00; string *psVar1; int1 *local_40 [2]; int1 local_30 [16]; *(ServiceDescriptor **)this = param_1; this_00 = (_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>>> *)(this + 8); 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(this_00,(_Rb_tree *)param_2); *(Options **)(this + 0x38) = param_3; /* try { // try from 0019c970 to 0019c987 has its CatchHandler @ 0019ca0a */ local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,"classname",""); /* try { // try from 0019c988 to 0019c99f has its CatchHandler @ 0019ca11 */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_40); std::__cxx11::string::_M_assign(psVar1); if (local_40[0] != local_30) { operator_delete(local_40[0]); } local_40[0] = local_30; /* try { // try from 0019c9be to 0019c9d0 has its CatchHandler @ 0019ca08 */ std::__cxx11::string::_M_construct<char_const*>(local_40,"full_name",""); /* try { // try from 0019c9d1 to 0019c9ec has its CatchHandler @ 0019ca0f */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this_00,(string *)local_40); std::__cxx11::string::_M_assign(psVar1); if (local_40[0] != local_30) { operator_delete(local_40[0]); } return; }
8,654
free_arg_list
bluesky950520[P]quickjs/quickjs.c
static void free_arg_list(JSContext *ctx, JSValue *tab, uint32_t len) { uint32_t i; for(i = 0; i < len; i++) { JS_FreeValue(ctx, tab[i]); } js_free(ctx, tab); }
O3
c
free_arg_list: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 testl %edx, %edx je 0x402ca movl %edx, %r15d shlq $0x4, %r15 xorl %r12d, %r12d movq 0x8(%rbx,%r12), %rdx cmpl $-0x9, %edx jb 0x402c1 movq (%rbx,%r12), %rsi movq 0x18(%r14), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x402c1 callq 0x20d90 addq $0x10, %r12 cmpq %r12, %r15 jne 0x4029e movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x1c845
free_arg_list: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi test edx, edx jz short loc_402CA mov r15d, edx shl r15, 4 xor r12d, r12d loc_4029E: mov rdx, [rbx+r12+8] cmp edx, 0FFFFFFF7h jb short loc_402C1 mov rsi, [rbx+r12] mov rdi, [r14+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_402C1 call js_free_value_rt loc_402C1: add r12, 10h cmp r15, r12 jnz short loc_4029E loc_402CA: mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp js_free
long long free_arg_list(long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v8; // r15 long long v9; // r12 long long v10; // rdx _QWORD *v11; // rsi long long v12; // rdi int v13; // eax long long v14; // rcx if ( a3 ) { v8 = 16LL * a3; v9 = 0LL; do { v10 = *(_QWORD *)(a2 + v9 + 8); if ( (unsigned int)v10 >= 0xFFFFFFF7 ) { v11 = *(_QWORD **)(a2 + v9); v12 = *(_QWORD *)(a1 + 24); v13 = *(_DWORD *)v11; v14 = (unsigned int)(*(_DWORD *)v11 - 1); *(_DWORD *)v11 = v14; if ( v13 <= 1 ) js_free_value_rt(v12, v11, v10, v14, a5, a6); } v9 += 16LL; } while ( v8 != v9 ); } return js_free(a1, a2); }
free_arg_list: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI TEST EDX,EDX JZ 0x001402ca MOV R15D,EDX SHL R15,0x4 XOR R12D,R12D LAB_0014029e: MOV RDX,qword ptr [RBX + R12*0x1 + 0x8] CMP EDX,-0x9 JC 0x001402c1 MOV RSI,qword ptr [RBX + R12*0x1] MOV RDI,qword ptr [R14 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001402c1 CALL 0x00120d90 LAB_001402c1: ADD R12,0x10 CMP R15,R12 JNZ 0x0014029e LAB_001402ca: MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0011c845
void free_arg_list(long param_1,long param_2,uint param_3) { int iVar1; int8 uVar2; long lVar3; if (param_3 != 0) { lVar3 = 0; do { if (0xfffffff6 < (uint)*(int8 *)(param_2 + 8 + lVar3)) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = **(int **)(param_2 + lVar3); **(int **)(param_2 + lVar3) = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2); } } lVar3 = lVar3 + 0x10; } while ((ulong)param_3 << 4 != lVar3); } js_free(param_1,param_2); return; }
8,655
my_fill_utf8mb3_mb
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill) { char *end= str + length; char buf[10]; char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); for ( ; str + buflen <= end ; ) { memcpy(str, buf, buflen); str+= buflen; } for ( ; str < end; ) *str++= ' '; }
O0
c
my_fill_utf8mb3_mb: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0xd8(%rax), %rax movq -0x20(%rbp), %rdi movslq -0x34(%rbp), %rsi leaq -0x12(%rbp), %rdx leaq -0x12(%rbp), %rcx addq $0xa, %rcx callq *%rax movb %al, -0x41(%rbp) jmp 0x9d03d jmp 0x9d03f movq -0x28(%rbp), %rax movsbl -0x41(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax cmpq -0x40(%rbp), %rax ja 0x9d079 movq -0x28(%rbp), %rdi leaq -0x12(%rbp), %rsi movsbq -0x41(%rbp), %rdx callq 0x26280 movsbl -0x41(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x9d03f jmp 0x9d07b movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x9d099 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x20, (%rax) jmp 0x9d07b movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x9d0b1 addq $0x50, %rsp popq %rbp retq callq 0x26370 nopw %cs:(%rax,%rax)
my_fill_utf8mb3_mb: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rax, [rax+0D8h] mov rdi, [rbp+var_20] movsxd rsi, [rbp+var_34] lea rdx, [rbp+var_12] lea rcx, [rbp+var_12] add rcx, 0Ah call rax mov [rbp+var_41], al jmp short $+2 loc_9D03D: jmp short $+2 loc_9D03F: mov rax, [rbp+var_28] movsx ecx, [rbp+var_41] movsxd rcx, ecx add rax, rcx cmp rax, [rbp+var_40] ja short loc_9D079 mov rdi, [rbp+var_28] lea rsi, [rbp+var_12] movsx rdx, [rbp+var_41] call _memcpy movsx ecx, [rbp+var_41] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp short loc_9D03F loc_9D079: jmp short $+2 loc_9D07B: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] jnb short loc_9D099 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_9D07B loc_9D099: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_9D0B1 add rsp, 50h pop rbp retn loc_9D0B1: call ___stack_chk_fail
unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4) { _BYTE *v4; // rax char i; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] _BYTE *v8; // [rsp+28h] [rbp-28h] _BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF v10 = __readfsqword(0x28u); v8 = a2; v7 = (unsigned long long)&a2[a3]; for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, a4, v9, &v10); (unsigned long long)&v8[i] <= v7; v8 += i ) memcpy(v8, v9, i); while ( (unsigned long long)v8 < v7 ) { v4 = v8++; *v4 = 32; } return __readfsqword(0x28u); }
my_fill_utf8mb3_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0xd8] MOV RDI,qword ptr [RBP + -0x20] MOVSXD RSI,dword ptr [RBP + -0x34] LEA RDX,[RBP + -0x12] LEA RCX,[RBP + -0x12] ADD RCX,0xa CALL RAX MOV byte ptr [RBP + -0x41],AL JMP 0x0019d03d LAB_0019d03d: JMP 0x0019d03f LAB_0019d03f: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RBP + -0x41] MOVSXD RCX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x40] JA 0x0019d079 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x12] MOVSX RDX,byte ptr [RBP + -0x41] CALL 0x00126280 MOVSX ECX,byte ptr [RBP + -0x41] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x0019d03f LAB_0019d079: JMP 0x0019d07b LAB_0019d07b: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0019d099 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x20 JMP 0x0019d07b LAB_0019d099: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0019d0b1 ADD RSP,0x50 POP RBP RET LAB_0019d0b1: CALL 0x00126370
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4) { char cVar1; long in_FS_OFFSET; int1 *local_30; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10); for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3; local_30 = local_30 + (int)cVar1) { memcpy(local_30,local_1a,(long)cVar1); } while (local_30 < param_2 + param_3) { *local_30 = 0x20; local_30 = local_30 + 1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
8,656
gguf_init_from_file
monkey531[P]llama/ggml/src/gguf.cpp
struct gguf_context * gguf_init_from_file(const char * fname, struct gguf_init_params params) { FILE * file = ggml_fopen(fname, "rb"); if (!file) { fprintf(stderr, "%s: failed to open GGUF file '%s'\n", __func__, fname); return nullptr; } struct gguf_context * result = gguf_init_from_file_impl(file, params); fclose(file); return result; }
O3
cpp
gguf_init_from_file: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x1d463(%rip), %rsi # 0x5a126 callq 0x17230 testq %rax, %rax je 0x3ccf8 movq %rax, %r15 movzbl %bpl, %esi movq %rax, %rdi movq %r14, %rdx callq 0x16ef0 movq %rax, %rbx movq %r15, %rdi callq 0x17010 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x2d2c9(%rip), %rax # 0x69fc8 movq (%rax), %rdi leaq 0x1d420(%rip), %rsi # 0x5a129 leaq 0x1d43c(%rip), %rdx # 0x5a14c movq %rbx, %rcx xorl %eax, %eax callq 0x17820 xorl %eax, %eax jmp 0x3cced
gguf_init_from_file: push rbp push r15 push r14 push rbx push rax mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aRb; "rb" call _ggml_fopen test rax, rax jz short loc_3CCF8 mov r15, rax movzx esi, bpl mov rdi, rax mov rdx, r14 call __Z24gguf_init_from_file_implP8_IO_FILE16gguf_init_params; gguf_init_from_file_impl(_IO_FILE *,gguf_init_params) mov rbx, rax mov rdi, r15 call _fclose mov rax, rbx loc_3CCED: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_3CCF8: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToOpenG; "%s: failed to open GGUF file '%s'\n" lea rdx, aGgufInitFromFi_1; "gguf_init_from_file" mov rcx, rbx xor eax, eax call _fprintf xor eax, eax jmp short loc_3CCED
_QWORD * gguf_init_from_file( const char *a1, unsigned __int8 a2, _QWORD *a3, double a4, __m128i a5, __m128i a6, __m128i a7, double a8, double a9, __m128i a10, __m128 a11) { long long v12; // rax double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // r15 _QWORD *v16; // rbx v12 = ggml_fopen(a1, "rb"); if ( v12 ) { v15 = v12; v16 = gguf_init_from_file_impl(v12, a2, a3, a4, a5, a6, a7, v13, v14, a10, a11); fclose(v15); return v16; } else { fprintf(stderr, "%s: failed to open GGUF file '%s'\n", "gguf_init_from_file", a1); return 0LL; } }
gguf_init_from_file: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LEA RSI,[0x15a126] CALL 0x00117230 TEST RAX,RAX JZ 0x0013ccf8 MOV R15,RAX MOVZX ESI,BPL MOV RDI,RAX MOV RDX,R14 CALL 0x00116ef0 MOV RBX,RAX MOV RDI,R15 CALL 0x00117010 MOV RAX,RBX LAB_0013cced: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0013ccf8: MOV RAX,qword ptr [0x00169fc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x15a129] LEA RDX,[0x15a14c] MOV RCX,RBX XOR EAX,EAX CALL 0x00117820 XOR EAX,EAX JMP 0x0013cced
int8 gguf_init_from_file(char *param_1,int1 param_2,int8 param_3) { FILE *__stream; int8 uVar1; __stream = ggml_fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { fprintf(*(FILE **)PTR_stderr_00169fc8,"%s: failed to open GGUF file \'%s\'\n", "gguf_init_from_file",param_1); uVar1 = 0; } else { uVar1 = gguf_init_from_file_impl(__stream,param_2,param_3); fclose(__stream); } return uVar1; }
8,657
ggml_mrope_cache_init
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_mrope_cache_init( float theta_base_t, float theta_base_h, float theta_base_w, float theta_base_e, int sections[4], bool indep_sects, float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale, float * cache, float sin_sign, float theta_scale) { // ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py float theta_t = theta_base_t; float theta_h = theta_base_h; float theta_w = theta_base_w; float theta_e = theta_base_e; // extra position id for vision encoder int sect_dims = sections[0] + sections[1] + sections[2] + sections[3]; int sec_w = sections[1] + sections[0]; int sec_e = sections[2] + sec_w; GGML_ASSERT(sect_dims <= ne0); for (int64_t i0 = 0; i0 < ne0; i0 += 2) { const float ff = freq_factors ? freq_factors[i0/2] : 1.0f; int sector = (i0 / 2) % sect_dims; if (indep_sects) { // compute theta independently for each dim sections // (i.e. reset corresponding theta when `i0` go from one section to another) if (sector == 0) { theta_t = theta_base_t; } else if (sector == sections[0]) { theta_h = theta_base_h;; } else if (sector == sec_w) { theta_w = theta_base_w; } else if (sector == sec_e) { theta_e = theta_base_e; } } float theta = theta_t; if (sector >= sections[0] && sector < sec_w) { theta = theta_h; } else if (sector >= sec_w && sector < sec_w + sections[2]) { theta = theta_w; } else if (sector >= sec_w + sections[2]) { theta = theta_e; } rope_yarn( theta/ff, freq_scale, corr_dims, i0, ext_factor, mscale, &cache[i0 + 0], &cache[i0 + 1] ); cache[i0 + 1] *= sin_sign; theta_t *= theta_scale; theta_w *= theta_scale; theta_h *= theta_scale; theta_e *= theta_scale; } }
O3
c
ggml_mrope_cache_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp vmovss %xmm7, 0x2c(%rsp) vmovss %xmm6, 0x28(%rsp) vmovss %xmm5, 0x24(%rsp) movq %rcx, 0x48(%rsp) vmovss %xmm4, 0x20(%rsp) movl %esi, 0x1c(%rsp) vmovaps %xmm3, 0x50(%rsp) vmovss %xmm2, 0x4(%rsp) vmovss %xmm1, 0x8(%rsp) vmovss %xmm0, 0xc(%rsp) movslq (%rdi), %rax movslq 0x4(%rdi), %r14 addq %rax, %r14 movslq 0x8(%rdi), %rcx addq %r14, %rcx movq %rdi, 0x10(%rsp) movslq 0xc(%rdi), %rsi movq %rcx, 0x38(%rsp) addq %rcx, %rsi movq %rsi, 0x40(%rsp) cmpq %r8, %rsi jg 0x26aa1 movq %r8, %r12 testq %r8, %r8 jle 0x26a8f movq %r9, %rbx movq %rdx, %r13 addq $0x4, %rbx xorl %r15d, %r15d vmovss 0xc(%rsp), %xmm3 vmovss 0x8(%rsp), %xmm4 xorl %ebp, %ebp vmovss 0x4(%rsp), %xmm5 vmovaps 0x50(%rsp), %xmm2 vmovss 0x2c78a(%rip), %xmm0 # 0x530e0 testq %r13, %r13 je 0x26962 vmovss (%r13,%r15,4), %xmm0 movq %r15, %rax cqto idivq 0x40(%rsp) cmpb $0x0, 0x1c(%rsp) je 0x2698d movq 0x10(%rsp), %rax movl (%rax), %eax testq %rdx, %rdx je 0x26996 cmpl %edx, %eax jne 0x2699e movl %edx, %eax vmovss 0x8(%rsp), %xmm4 jmp 0x269c2 movq 0x10(%rsp), %rax movl (%rax), %eax jmp 0x269c2 vmovss 0xc(%rsp), %xmm3 jmp 0x269c2 cmpl %edx, %r14d jne 0x269ab vmovss 0x4(%rsp), %xmm5 jmp 0x269c2 cmpl %edx, 0x38(%rsp) sete %cl kmovd %ecx, %k1 vmovaps 0x50(%rsp), %xmm1 vmovss %xmm1, %xmm2, %xmm2 {%k1} cmpl %edx, %r14d jle 0x269cf vmovaps %xmm4, %xmm1 cmpl %edx, %eax jle 0x269fa movq 0x10(%rsp), %rax movl 0x8(%rax), %eax addl %r14d, %eax cmpl %edx, %r14d jg 0x269e7 vmovaps %xmm5, %xmm1 cmpl %edx, %eax jg 0x269fa cmpl %edx, %eax setg %al kmovd %eax, %k1 vmovaps %xmm2, %xmm1 vmovss %xmm3, %xmm1, %xmm1 {%k1} vdivss %xmm0, %xmm1, %xmm0 leaq -0x4(%rbx), %rdx vmovss 0x20(%rsp), %xmm1 movq 0x48(%rsp), %rdi movq %rbp, %rsi vmovaps %xmm2, 0x70(%rsp) vmovss 0x24(%rsp), %xmm2 vmovaps %xmm3, 0x60(%rsp) vmovss 0x28(%rsp), %xmm3 movq %rbx, %rcx vmovss %xmm4, 0x34(%rsp) vmovss %xmm5, 0x30(%rsp) callq 0x26ac2 vmovss 0x30(%rsp), %xmm5 vmovss 0x34(%rsp), %xmm4 vmovaps 0x60(%rsp), %xmm3 vmovaps 0x70(%rsp), %xmm2 vmovss 0x2c(%rsp), %xmm0 vmulss (%rbx), %xmm0, %xmm0 vmovss %xmm0, (%rbx) vmovss 0xc0(%rsp), %xmm0 vmulss %xmm0, %xmm3, %xmm3 vmulss %xmm0, %xmm5, %xmm5 vmulss %xmm0, %xmm4, %xmm4 vmulss %xmm0, %xmm2, %xmm2 addq $0x2, %rbp incq %r15 addq $0x8, %rbx cmpq %r12, %rbp jl 0x2694e addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2cdc2(%rip), %rdi # 0x5386a leaq 0x2ce12(%rip), %rdx # 0x538c1 leaq 0x2daba(%rip), %rcx # 0x54570 movl $0x2403, %esi # imm = 0x2403 xorl %eax, %eax callq 0x8950
ggml_mrope_cache_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h vmovss [rsp+0B8h+var_8C], xmm7 vmovss [rsp+0B8h+var_90], xmm6 vmovss [rsp+0B8h+var_94], xmm5 mov [rsp+0B8h+var_70], rcx vmovss [rsp+0B8h+var_98], xmm4 mov [rsp+0B8h+var_9C], esi vmovaps [rsp+0B8h+var_68], xmm3 vmovss [rsp+0B8h+var_B4], xmm2 vmovss [rsp+0B8h+var_B0], xmm1 vmovss [rsp+0B8h+var_AC], xmm0 movsxd rax, dword ptr [rdi] movsxd r14, dword ptr [rdi+4] add r14, rax movsxd rcx, dword ptr [rdi+8] add rcx, r14 mov [rsp+0B8h+var_A8], rdi movsxd rsi, dword ptr [rdi+0Ch] mov [rsp+0B8h+var_80], rcx add rsi, rcx mov [rsp+0B8h+var_78], rsi cmp rsi, r8 jg loc_26AA1 mov r12, r8 test r8, r8 jle loc_26A8F mov rbx, r9 mov r13, rdx add rbx, 4 xor r15d, r15d vmovss xmm3, [rsp+0B8h+var_AC] vmovss xmm4, [rsp+0B8h+var_B0] xor ebp, ebp vmovss xmm5, [rsp+0B8h+var_B4] vmovaps xmm2, [rsp+0B8h+var_68] loc_2694E: vmovss xmm0, cs:dword_530E0 test r13, r13 jz short loc_26962 vmovss xmm0, dword ptr [r13+r15*4+0] loc_26962: mov rax, r15 cqo idiv [rsp+0B8h+var_78] cmp byte ptr [rsp+0B8h+var_9C], 0 jz short loc_2698D mov rax, [rsp+0B8h+var_A8] mov eax, [rax] test rdx, rdx jz short loc_26996 cmp eax, edx jnz short loc_2699E mov eax, edx vmovss xmm4, [rsp+0B8h+var_B0] jmp short loc_269C2 loc_2698D: mov rax, [rsp+0B8h+var_A8] mov eax, [rax] jmp short loc_269C2 loc_26996: vmovss xmm3, [rsp+0B8h+var_AC] jmp short loc_269C2 loc_2699E: cmp r14d, edx jnz short loc_269AB vmovss xmm5, [rsp+0B8h+var_B4] jmp short loc_269C2 loc_269AB: cmp dword ptr [rsp+0B8h+var_80], edx setz cl kmovd k1, ecx vmovaps xmm1, [rsp+0B8h+var_68] vmovss xmm2{k1}, xmm2, xmm1 loc_269C2: cmp r14d, edx jle short loc_269CF vmovaps xmm1, xmm4 cmp eax, edx jle short loc_269FA loc_269CF: mov rax, [rsp+0B8h+var_A8] mov eax, [rax+8] add eax, r14d cmp r14d, edx jg short loc_269E7 vmovaps xmm1, xmm5 cmp eax, edx jg short loc_269FA loc_269E7: cmp eax, edx setnle al kmovd k1, eax vmovaps xmm1, xmm2 vmovss xmm1{k1}, xmm1, xmm3 loc_269FA: vdivss xmm0, xmm1, xmm0 lea rdx, [rbx-4] vmovss xmm1, [rsp+0B8h+var_98] mov rdi, [rsp+0B8h+var_70] mov rsi, rbp vmovaps [rsp+0B8h+var_48], xmm2 vmovss xmm2, [rsp+0B8h+var_94] vmovaps [rsp+0B8h+var_58], xmm3 vmovss xmm3, [rsp+0B8h+var_90] mov rcx, rbx vmovss [rsp+0B8h+var_84], xmm4 vmovss [rsp+0B8h+var_88], xmm5 call rope_yarn vmovss xmm5, [rsp+0B8h+var_88] vmovss xmm4, [rsp+0B8h+var_84] vmovaps xmm3, [rsp+0B8h+var_58] vmovaps xmm2, [rsp+0B8h+var_48] vmovss xmm0, [rsp+0B8h+var_8C] vmulss xmm0, xmm0, dword ptr [rbx] vmovss dword ptr [rbx], xmm0 vmovss xmm0, [rsp+0B8h+arg_0] vmulss xmm3, xmm3, xmm0 vmulss xmm5, xmm5, xmm0 vmulss xmm4, xmm4, xmm0 vmulss xmm2, xmm2, xmm0 add rbp, 2 inc r15 add rbx, 8 cmp rbp, r12 jl loc_2694E loc_26A8F: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_26AA1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSectDimsNe0; "sect_dims <= ne0" mov esi, 2403h xor eax, eax call _ggml_abort
long long ggml_mrope_cache_init( int *a1, char a2, long long a3, long long a4, long long a5, long long a6, __m128 _XMM0, __m128 _XMM1, __m128 _XMM2, __m128 _XMM3, __m128 _XMM4, __m128 _XMM5, __m128 _XMM6, __m128 _XMM7, int a15) { long long result; // rax long long v16; // r14 long long v24; // rbp long long v29; // rdx int v30; // eax long long v46; // rdx long long v47; // rcx double v48; // xmm0_8 int v58; // [rsp+38h] [rbp-80h] long long v59; // [rsp+40h] [rbp-78h] __asm { vmovss [rsp+0B8h+var_8C], xmm7 vmovss [rsp+0B8h+var_90], xmm6 vmovss [rsp+0B8h+var_94], xmm5 vmovss [rsp+0B8h+var_98], xmm4 vmovaps [rsp+0B8h+var_68], xmm3 vmovss [rsp+0B8h+var_B4], xmm2 vmovss [rsp+0B8h+var_B0], xmm1 vmovss [rsp+0B8h+var_AC], xmm0 } result = *a1; v16 = result + a1[1]; _RCX = v16 + a1[2]; v58 = v16 + a1[2]; v59 = _RCX + a1[3]; if ( v59 > a5 ) { v48 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 9219LL, "GGML_ASSERT(%s) failed", "sect_dims <= ne0"); return rope_yarn( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 9219LL, v46, v47, v48, *(double *)_XMM1.m128_u64, *(double *)_XMM2.m128_u64, *(double *)_XMM3.m128_u64); } else if ( a5 > 0 ) { _R13 = a3; _RBX = a6 + 4; _R15 = 0LL; __asm { vmovss xmm3, [rsp+0B8h+var_AC] vmovss xmm4, [rsp+0B8h+var_B0] } v24 = 0LL; __asm { vmovss xmm5, [rsp+0B8h+var_B4] vmovaps xmm2, [rsp+0B8h+var_68] } do { __asm { vmovss xmm0, cs:dword_530E0 } if ( _R13 ) __asm { vmovss xmm0, dword ptr [r13+r15*4+0] } v29 = _R15 % v59; if ( a2 ) { v30 = *a1; if ( v29 ) { if ( v30 == (_DWORD)v29 ) { v30 = _R15 % v59; __asm { vmovss xmm4, [rsp+0B8h+var_B0] } } else if ( (_DWORD)v16 == (_DWORD)v29 ) { __asm { vmovss xmm5, [rsp+0B8h+var_B4] } } else { LOBYTE(_RCX) = v58 == (_DWORD)v29; __asm { kmovd k1, ecx vmovaps xmm1, [rsp+0B8h+var_68] vmovss xmm2{k1}, xmm2, xmm1 } } } else { __asm { vmovss xmm3, [rsp+0B8h+var_AC] } } } else { v30 = *a1; } if ( (int)v16 <= (int)v29 ) goto LABEL_17; __asm { vmovaps xmm1, xmm4 } if ( v30 > (int)v29 ) { LABEL_17: _EAX = v16 + a1[2]; if ( (int)v16 > (int)v29 ) goto LABEL_19; __asm { vmovaps xmm1, xmm5 } if ( _EAX <= (int)v29 ) { LABEL_19: LOBYTE(_EAX) = _EAX > (int)v29; __asm { kmovd k1, eax vmovaps xmm1, xmm2 vmovss xmm1{k1}, xmm1, xmm3 } } } __asm { vdivss xmm0, xmm1, xmm0 vmovss xmm1, [rsp+0B8h+var_98] vmovaps [rsp+0B8h+var_48], xmm2 vmovss xmm2, [rsp+0B8h+var_94] vmovaps [rsp+0B8h+var_58], xmm3 vmovss xmm3, [rsp+0B8h+var_90] vmovss [rsp+0B8h+var_84], xmm4 vmovss [rsp+0B8h+var_88], xmm5 } result = rope_yarn( a4, v24, _RBX - 4, _RBX, *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, *(double *)&_XMM3); __asm { vmovss xmm5, [rsp+0B8h+var_88] vmovss xmm4, [rsp+0B8h+var_84] vmovaps xmm3, [rsp+0B8h+var_58] vmovaps xmm2, [rsp+0B8h+var_48] vmovss xmm0, [rsp+0B8h+var_8C] vmulss xmm0, xmm0, dword ptr [rbx] vmovss dword ptr [rbx], xmm0 vmovss xmm0, [rsp+0B8h+arg_0] vmulss xmm3, xmm3, xmm0 vmulss xmm5, xmm5, xmm0 vmulss xmm4, xmm4, xmm0 vmulss xmm2, xmm2, xmm0 } v24 += 2LL; ++_R15; _RBX += 8LL; } while ( v24 < a5 ); } return result; }
ggml_mrope_cache_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 VMOVSS dword ptr [RSP + 0x2c],XMM7 VMOVSS dword ptr [RSP + 0x28],XMM6 VMOVSS dword ptr [RSP + 0x24],XMM5 MOV qword ptr [RSP + 0x48],RCX VMOVSS dword ptr [RSP + 0x20],XMM4 MOV dword ptr [RSP + 0x1c],ESI VMOVAPS xmmword ptr [RSP + 0x50],XMM3 VMOVSS dword ptr [RSP + 0x4],XMM2 VMOVSS dword ptr [RSP + 0x8],XMM1 VMOVSS dword ptr [RSP + 0xc],XMM0 MOVSXD RAX,dword ptr [RDI] MOVSXD R14,dword ptr [RDI + 0x4] ADD R14,RAX MOVSXD RCX,dword ptr [RDI + 0x8] ADD RCX,R14 MOV qword ptr [RSP + 0x10],RDI MOVSXD RSI,dword ptr [RDI + 0xc] MOV qword ptr [RSP + 0x38],RCX ADD RSI,RCX MOV qword ptr [RSP + 0x40],RSI CMP RSI,R8 JG 0x00126aa1 MOV R12,R8 TEST R8,R8 JLE 0x00126a8f MOV RBX,R9 MOV R13,RDX ADD RBX,0x4 XOR R15D,R15D VMOVSS XMM3,dword ptr [RSP + 0xc] VMOVSS XMM4,dword ptr [RSP + 0x8] XOR EBP,EBP VMOVSS XMM5,dword ptr [RSP + 0x4] VMOVAPS XMM2,xmmword ptr [RSP + 0x50] LAB_0012694e: VMOVSS XMM0,dword ptr [0x001530e0] TEST R13,R13 JZ 0x00126962 VMOVSS XMM0,dword ptr [R13 + R15*0x4] LAB_00126962: MOV RAX,R15 CQO IDIV qword ptr [RSP + 0x40] CMP byte ptr [RSP + 0x1c],0x0 JZ 0x0012698d MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] TEST RDX,RDX JZ 0x00126996 CMP EAX,EDX JNZ 0x0012699e MOV EAX,EDX VMOVSS XMM4,dword ptr [RSP + 0x8] JMP 0x001269c2 LAB_0012698d: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX] JMP 0x001269c2 LAB_00126996: VMOVSS XMM3,dword ptr [RSP + 0xc] JMP 0x001269c2 LAB_0012699e: CMP R14D,EDX JNZ 0x001269ab VMOVSS XMM5,dword ptr [RSP + 0x4] JMP 0x001269c2 LAB_001269ab: CMP dword ptr [RSP + 0x38],EDX SETZ CL KMOVD K1,ECX VMOVAPS XMM1,xmmword ptr [RSP + 0x50] VMOVSS XMM2{K1},XMM2,XMM1 LAB_001269c2: CMP R14D,EDX JLE 0x001269cf VMOVAPS XMM1,XMM4 CMP EAX,EDX JLE 0x001269fa LAB_001269cf: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x8] ADD EAX,R14D CMP R14D,EDX JG 0x001269e7 VMOVAPS XMM1,XMM5 CMP EAX,EDX JG 0x001269fa LAB_001269e7: CMP EAX,EDX SETG AL KMOVD K1,EAX VMOVAPS XMM1,XMM2 VMOVSS XMM1{K1},XMM1,XMM3 LAB_001269fa: VDIVSS XMM0,XMM1,XMM0 LEA RDX,[RBX + -0x4] VMOVSS XMM1,dword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x48] MOV RSI,RBP VMOVAPS xmmword ptr [RSP + 0x70],XMM2 VMOVSS XMM2,dword ptr [RSP + 0x24] VMOVAPS xmmword ptr [RSP + 0x60],XMM3 VMOVSS XMM3,dword ptr [RSP + 0x28] MOV RCX,RBX VMOVSS dword ptr [RSP + 0x34],XMM4 VMOVSS dword ptr [RSP + 0x30],XMM5 CALL 0x00126ac2 VMOVSS XMM5,dword ptr [RSP + 0x30] VMOVSS XMM4,dword ptr [RSP + 0x34] VMOVAPS XMM3,xmmword ptr [RSP + 0x60] VMOVAPS XMM2,xmmword ptr [RSP + 0x70] VMOVSS XMM0,dword ptr [RSP + 0x2c] VMULSS XMM0,XMM0,dword ptr [RBX] VMOVSS dword ptr [RBX],XMM0 VMOVSS XMM0,dword ptr [RSP + 0xc0] VMULSS XMM3,XMM3,XMM0 VMULSS XMM5,XMM5,XMM0 VMULSS XMM4,XMM4,XMM0 VMULSS XMM2,XMM2,XMM0 ADD RBP,0x2 INC R15 ADD RBX,0x8 CMP RBP,R12 JL 0x0012694e LAB_00126a8f: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00126aa1: LEA RDI,[0x15386a] LEA RDX,[0x1538c1] LEA RCX,[0x154570] MOV ESI,0x2403 XOR EAX,EAX CALL 0x00108950
void ggml_mrope_cache_init (float param_1,float param_2,float param_3,int8 param_4,int4 param_5, int4 param_6,int4 param_7,float param_8,int *param_9,char param_10, long param_11,int8 param_12,long param_13,long param_14,float param_15) { int iVar1; int iVar2; int iVar3; float fVar4; float fVar5; int iVar6; long lVar7; int iVar8; long lVar9; float *pfVar10; long lVar11; long lVar12; int iVar13; long lVar14; float fVar15; int1 auVar16 [16]; int1 auVar17 [12]; float fVar18; int1 auVar19 [16]; int1 auVar20 [64]; float fVar21; int8 in_XMM3_Qb; float fVar22; float fVar23; int local_80; int local_68; local_68 = (int)param_4; iVar1 = *param_9; iVar2 = param_9[1]; lVar7 = (long)param_9[2] + (long)iVar2 + (long)iVar1; lVar12 = param_9[3] + lVar7; if (param_13 < lVar12) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2403,"GGML_ASSERT(%s) failed","sect_dims <= ne0"); } if (0 < param_13) { pfVar10 = (float *)(param_14 + 4); lVar14 = 0; lVar11 = 0; auVar20 = ZEXT1664(CONCAT88(in_XMM3_Qb,param_4)); fVar15 = param_1; fVar5 = param_2; fVar4 = param_3; do { auVar16 = auVar20._0_16_; fVar18 = DAT_001530e0; if (param_11 != 0) { fVar18 = *(float *)(param_11 + lVar14 * 4); } lVar9 = lVar14 % lVar12; iVar8 = (int)lVar9; iVar13 = (int)((long)iVar2 + (long)iVar1); fVar23 = fVar4; fVar22 = fVar5; if (param_10 == '\0') { iVar6 = *param_9; fVar21 = fVar15; } else { iVar3 = *param_9; iVar6 = iVar3; fVar21 = param_1; if (((lVar9 != 0) && (iVar6 = iVar8, fVar21 = fVar15, fVar22 = param_2, iVar3 != iVar8)) && (iVar6 = iVar3, fVar23 = param_3, fVar22 = fVar5, iVar13 != iVar8)) { local_80 = (int)lVar7; auVar16._4_12_ = auVar20._4_12_; auVar16._0_4_ = (uint)(local_80 == iVar8) * local_68 + (uint)(local_80 != iVar8) * auVar20._0_4_; fVar23 = fVar4; } } if (((iVar13 <= iVar8) || (fVar15 = fVar22, auVar17 = (int1 [12])0x0, iVar8 < iVar6)) && ((iVar6 = param_9[2] + iVar13, iVar8 < iVar13 || (fVar15 = fVar23, auVar17 = (int1 [12])0x0, iVar6 <= iVar8)))) { auVar17 = auVar16._4_12_; fVar15 = (float)((uint)(iVar8 < iVar6) * (int)fVar21 + (uint)(iVar8 >= iVar6) * (int)auVar16._0_4_); } auVar19._0_4_ = fVar15 / fVar18; auVar19._4_12_ = auVar17; rope_yarn(auVar19._0_8_,param_5,param_6,param_7,param_12,lVar11,pfVar10 + -1,pfVar10); *pfVar10 = param_8 * *pfVar10; fVar15 = fVar21 * param_15; fVar4 = fVar23 * param_15; fVar5 = fVar22 * param_15; auVar20 = ZEXT464((uint)(auVar16._0_4_ * param_15)); lVar11 = lVar11 + 2; lVar14 = lVar14 + 1; pfVar10 = pfVar10 + 2; } while (lVar11 < param_13); } return; }
8,658
mysql_stmt_fetch_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_fetch_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_fetch, (parms->stmt), parms->stmt->mysql, int, r_int) }
O0
c
mysql_stmt_fetch_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x2a4d0 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_fetch_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_stmt_fetch mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_stmt_fetch_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); v2[2] = mysql_stmt_fetch(*a1); result = v2; *v2 = 0; return result; }
mysql_stmt_fetch_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0012a4d0 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_stmt_fetch_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_fetch(*param_1); puVar1[2] = uVar2; *puVar1 = 0; return; }
8,659
my_wc_mb_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O0
c
my_wc_mb_eucjpms: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x491dd movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x491c5 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x49305 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x49305 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0x491f3 movl $0x0, -0x4(%rbp) jmp 0x49305 movq -0x18(%rbp), %rcx leaq 0x1ece52(%rip), %rax # 0x236050 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x4924f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x49224 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x49305 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x49305 movq -0x18(%rbp), %rcx leaq 0x20cdf6(%rip), %rax # 0x256050 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x492b0 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x49280 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x49305 movq -0x20(%rbp), %rax movb $-0x71, (%rax) movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movl $0x3, -0x4(%rbp) jmp 0x49305 cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61 jb 0x492fe cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F ja 0x492fe movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x492db movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x49305 movq -0x20(%rbp), %rax movb $-0x72, (%rax) movq -0x18(%rbp), %rax subq $0xfec0, %rax # imm = 0xFEC0 movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x49305 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_eucjpms: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_491DD mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_491C5 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_49305 loc_491C5: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_49305 loc_491DD: cmp [rbp+var_18], 0FFFFh jbe short loc_491F3 mov [rbp+var_4], 0 jmp loc_49305 loc_491F3: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0208_eucjpms movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_4924F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_49224 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_49305 loc_49224: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp loc_49305 loc_4924F: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0212_eucjpms movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_492B0 mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_49280 mov [rbp+var_4], 0FFFFFF99h jmp loc_49305 loc_49280: mov rax, [rbp+var_20] mov byte ptr [rax], 8Fh mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov [rbp+var_4], 3 jmp short loc_49305 loc_492B0: cmp [rbp+var_18], 0FF61h jb short loc_492FE cmp [rbp+var_18], 0FF9Fh ja short loc_492FE mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_492DB mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_49305 loc_492DB: mov rax, [rbp+var_20] mov byte ptr [rax], 8Eh mov rax, [rbp+var_18] sub rax, 0FEC0h mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp short loc_49305 loc_492FE: mov [rbp+var_4], 0 loc_49305: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { __int16 v5; // [rsp+0h] [rbp-2Ch] __int16 v6; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjpms[a2]; if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else { v6 = unicode_to_jisx0212_eucjpms[a2]; if ( v6 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = -113; a3[1] = HIBYTE(v6); a3[2] = v6; return 3; } else { return (unsigned int)-103; } } else if ( a2 < 0xFF61 || a2 > 0xFF9F ) { return 0; } else if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = -114; a3[1] = a2 + 64; return 2; } else { return (unsigned int)-102; } } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_eucjpms: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x001491dd MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001491c5 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00149305 LAB_001491c5: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00149305 LAB_001491dd: CMP qword ptr [RBP + -0x18],0xffff JBE 0x001491f3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00149305 LAB_001491f3: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x336050] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x0014924f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00149224 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00149305 LAB_00149224: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00149305 LAB_0014924f: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x356050] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x001492b0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00149280 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00149305 LAB_00149280: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8f MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV dword ptr [RBP + -0x4],0x3 JMP 0x00149305 LAB_001492b0: CMP qword ptr [RBP + -0x18],0xff61 JC 0x001492fe CMP qword ptr [RBP + -0x18],0xff9f JA 0x001492fe MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001492db MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00149305 LAB_001492db: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8e MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0xfec0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00149305 LAB_001492fe: MOV dword ptr [RBP + -0x4],0x0 LAB_00149305: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_eucjpms(int8 param_1,ulong param_2,char *param_3,char *param_4) { short sVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_2 < 0x10000) { sVar1 = *(short *)(unicode_to_jisx0208_eucjpms + param_2 * 2); if (sVar1 == 0) { sVar1 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2); if (sVar1 == 0) { if ((param_2 < 0xff61) || (0xff9f < param_2)) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = -0x72; param_3[1] = (char)param_2 + '@'; local_c = 2; } } else if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { *param_3 = -0x71; param_3[1] = (char)((ushort)sVar1 >> 8); param_3[2] = (char)sVar1; local_c = 3; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)((ushort)sVar1 >> 8); param_3[1] = (char)sVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
8,660
my_strnncollsp_padspace_bin
eloqsql/strings/ctype-bin.c
int my_strnncollsp_padspace_bin(const uchar *str, size_t length) { for ( ; length ; str++, length--) { if (*str < ' ') return -1; else if (*str > ' ') return 1; } return 0; }
O0
c
my_strnncollsp_padspace_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x46afb movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x46ac8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x46b02 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jle 0x46add movl $0x1, -0x4(%rbp) jmp 0x46b02 jmp 0x46adf jmp 0x46ae1 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x46aac movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_strnncollsp_padspace_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_46AAC: cmp [rbp+var_18], 0 jz short loc_46AFB mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_46AC8 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_46B02 loc_46AC8: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jle short loc_46ADD mov [rbp+var_4], 1 jmp short loc_46B02 loc_46ADD: jmp short $+2 loc_46ADF: jmp short $+2 loc_46AE1: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_46AAC loc_46AFB: mov [rbp+var_4], 0 loc_46B02: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2) { while ( a2 ) { if ( *a1 < 0x20u ) return (unsigned int)-1; if ( *a1 > 0x20u ) return 1; ++a1; --a2; } return 0; }
my_strnncollsp_padspace_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_00146aac: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00146afb MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x00146ac8 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00146b02 LAB_00146ac8: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JLE 0x00146add MOV dword ptr [RBP + -0x4],0x1 JMP 0x00146b02 LAB_00146add: JMP 0x00146adf LAB_00146adf: JMP 0x00146ae1 LAB_00146ae1: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00146aac LAB_00146afb: MOV dword ptr [RBP + -0x4],0x0 LAB_00146b02: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2) { long local_20; byte *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_20 == 0) { return 0; } if (*local_18 < 0x20) break; if (0x20 < *local_18) { return 1; } local_18 = local_18 + 1; local_20 = local_20 + -1; } return 0xffffffff; }
8,661
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O1
cpp
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x20(%rdi), %r15 movq 0x28(%rdi), %r12 cmpq %r12, %r15 je 0xa2374 movq %rdx, %rbx movq %rsi, %r14 movq (%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x9b336 addq $0x10, %r15 cmpq %r12, %r15 jne 0xa235d addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZNK5minja12SequenceNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx push rax mov r15, [rdi+20h] mov r12, [rdi+28h] cmp r15, r12 jz short loc_A2374 mov rbx, rdx mov r14, rsi loc_A235D: mov rdi, [r15] mov rsi, r14 mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) add r15, 10h cmp r15, r12 jnz short loc_A235D loc_A2374: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long minja::SequenceNode::do_render(long long a1) { long long ( ****v1)(_QWORD); // r15 long long ( ****i)(_QWORD); // r12 long long result; // rax v1 = *(long long ( *****)(_QWORD))(a1 + 32); for ( i = *(long long ( *****)(_QWORD))(a1 + 40); v1 != i; v1 += 2 ) result = minja::TemplateNode::render(*v1); return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,qword ptr [RDI + 0x20] MOV R12,qword ptr [RDI + 0x28] CMP R15,R12 JZ 0x001a2374 MOV RBX,RDX MOV R14,RSI LAB_001a235d: MOV RDI,qword ptr [R15] MOV RSI,R14 MOV RDX,RBX CALL 0x0019b336 ADD R15,0x10 CMP R15,R12 JNZ 0x001a235d LAB_001a2374: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::SequenceNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::SequenceNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int8 *puVar1; int8 *puVar2; puVar1 = *(int8 **)(param_1 + 0x28); for (puVar2 = *(int8 **)(param_1 + 0x20); puVar2 != puVar1; puVar2 = puVar2 + 2) { TemplateNode::render((ostringstream *)*puVar2,param_2); } return; }
8,662
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O2
cpp
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx callq 0x72dec leaq 0x87006(%rip), %rax # 0xfd468 addq $0x10, %rax movq %rax, (%rbx) leaq 0x28(%rbx), %rax movq %rax, 0x10(%rsp) andq $0x0, 0x28(%rbx) movups (%r13), %xmm0 andq $0x0, 0x8(%r13) movups %xmm0, 0x20(%rbx) andq $0x0, (%r13) movups (%r12), %xmm0 movups %xmm0, 0x30(%rbx) movq 0x10(%r12), %rax movq %rax, 0x40(%rbx) xorps %xmm0, %xmm0 andq $0x0, 0x10(%r12) movups %xmm0, (%r12) andq $0x0, 0x50(%rbx) movups (%r15), %xmm1 andq $0x0, 0x8(%r15) movups %xmm1, 0x48(%rbx) andq $0x0, (%r15) leaq 0x30(%rbx), %rax movq %rax, 0x8(%rsp) leaq 0x50(%rbx), %r12 leaq 0x58(%rbx), %r13 leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movq $0x1, 0x60(%rbx) movups %xmm0, 0x68(%rbx) movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000 movups %xmm0, 0x80(%rbx) xorl %ebp, %ebp pushq $0x30 popq %r14 xorl %r15d, %r15d movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax subq %rsi, %rax cqto idivq %r14 cmpq %rax, %r15 jae 0x76533 cmpq $0x0, 0x8(%rsi,%rbp) je 0x7652a addq %rbp, %rsi movq %r13, %rdi callq 0x7672c movq %r15, (%rax) incq %r15 addq $0x30, %rbp jmp 0x764ff addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp movq %r13, %rdi callq 0x76b6e movq %r12, %rdi callq 0x4f7fe movq 0x8(%rsp), %rdi callq 0x61304 movq 0x10(%rsp), %rdi callq 0x4f7fe movq %rbx, %rdi callq 0x77a66 movq %rbp, %rdi callq 0x23fd0 nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rbx], rax lea rax, [rbx+28h] mov [rsp+48h+var_38], rax and qword ptr [rbx+28h], 0 movups xmm0, xmmword ptr [r13+0] and qword ptr [r13+8], 0 movups xmmword ptr [rbx+20h], xmm0 and qword ptr [r13+0], 0 movups xmm0, xmmword ptr [r12] movups xmmword ptr [rbx+30h], xmm0 mov rax, [r12+10h] mov [rbx+40h], rax xorps xmm0, xmm0 and qword ptr [r12+10h], 0 movups xmmword ptr [r12], xmm0 and qword ptr [rbx+50h], 0 movups xmm1, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [rbx+48h], xmm1 and qword ptr [r15], 0 lea rax, [rbx+30h] mov [rsp+48h+var_40], rax lea r12, [rbx+50h] lea r13, [rbx+58h] lea rax, [rbx+88h] mov [rbx+58h], rax mov qword ptr [rbx+60h], 1 movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 3F800000h movups xmmword ptr [rbx+80h], xmm0 xor ebp, ebp push 30h ; '0' pop r14 xor r15d, r15d loc_764FF: mov rsi, [rbx+30h] mov rax, [rbx+38h] sub rax, rsi cqo idiv r14 cmp r15, rax jnb short loc_76533 cmp qword ptr [rsi+rbp+8], 0 jz short loc_7652A add rsi, rbp mov rdi, r13 call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,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>,true>::operator[](std::string const&) mov [rax], r15 loc_7652A: inc r15 add rbp, 30h ; '0' jmp short loc_764FF loc_76533: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rax mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,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() mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+arg_0] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, rbp call __Unwind_Resume
unsigned long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5) { int v8; // ecx int v9; // r8d int v10; // r9d __int128 v11; // xmm0 __int128 v12; // xmm1 long long v13; // rbp unsigned long long i; // r15 long long v15; // rsi unsigned long long result; // rax char v17; // [rsp+0h] [rbp-48h] minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; *(_QWORD *)(a1 + 40) = 0LL; v11 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v11; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; *(_QWORD *)(a1 + 64) = *(_QWORD *)(a4 + 16); *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v12 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v12; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; v13 = 0LL; for ( i = 0LL; ; ++i ) { v15 = *(_QWORD *)(a1 + 48); result = (*(_QWORD *)(a1 + 56) - v15) / 48; if ( i >= result ) break; if ( *(_QWORD *)(v15 + v13 + 8) ) *(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,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>,true>::operator[]( (int)a1 + 88, (int)v13 + (int)v15, (*(_QWORD *)(a1 + 56) - v15) % 48, v8, v9, v10, v17) = i; v13 += 48LL; } return result; }
MacroNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI CALL 0x00172dec LEA RAX,[0x1fd468] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RAX,[RBX + 0x28] MOV qword ptr [RSP + 0x10],RAX AND qword ptr [RBX + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R13] AND qword ptr [R13 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 AND qword ptr [R13],0x0 MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RBX + 0x40],RAX XORPS XMM0,XMM0 AND qword ptr [R12 + 0x10],0x0 MOVUPS xmmword ptr [R12],XMM0 AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM1,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM1 AND qword ptr [R15],0x0 LEA RAX,[RBX + 0x30] MOV qword ptr [RSP + 0x8],RAX LEA R12,[RBX + 0x50] LEA R13,[RBX + 0x58] LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV qword ptr [RBX + 0x60],0x1 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV dword ptr [RBX + 0x78],0x3f800000 MOVUPS xmmword ptr [RBX + 0x80],XMM0 XOR EBP,EBP PUSH 0x30 POP R14 XOR R15D,R15D LAB_001764ff: MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] SUB RAX,RSI CQO IDIV R14 CMP R15,RAX JNC 0x00176533 CMP qword ptr [RSI + RBP*0x1 + 0x8],0x0 JZ 0x0017652a ADD RSI,RBP LAB_0017651f: MOV RDI,R13 CALL 0x0017672c LAB_00176527: MOV qword ptr [RAX],R15 LAB_0017652a: INC R15 ADD RBP,0x30 JMP 0x001764ff LAB_00176533: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::MacroNode::MacroNode (MacroNode *this,Location *param_1,shared_ptr *param_2,vector *param_3,shared_ptr *param_4 ) { long lVar1; int8 uVar2; ulong *puVar3; long lVar4; ulong uVar5; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_001fd478; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 0x10) = 0; *(int8 *)param_3 = 0; *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x50) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar2; *(int8 *)param_4 = 0; *(MacroNode **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; lVar4 = 0; for (uVar5 = 0; lVar1 = *(long *)(this + 0x30), uVar5 < (ulong)((*(long *)(this + 0x38) - lVar1) / 0x30); uVar5 = uVar5 + 1) { if (*(long *)(lVar1 + 8 + lVar4) != 0) { /* try { // try from 0017651f to 00176526 has its CatchHandler @ 00176542 */ puVar3 = (ulong *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,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>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,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>,true> *)(this + 0x58),(string *)(lVar1 + lVar4)); *puVar3 = uVar5; } lVar4 = lVar4 + 0x30; } return; }
8,663
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
MacroNode(const Location & location, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(location), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::SequenceNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq (%rsi), %r12 movq 0x8(%rsi), %r13 cmpq %r13, %r12 je 0x897d7 movq %rdi, %rbx leaq 0x18(%rsp), %rbp movq 0x18(%rbx), %rax movq 0x20(%rbx), %rsi subq %rsi, %rax movq 0x8(%r12), %rdx cmpq %rdx, %rax jl 0x897ca addq %rsi, %rdx movq %rbp, 0x8(%rsp) leaq 0x8(%rsp), %rdi callq 0x70172 movq 0x10(%rsp), %rdx cmpq 0x8(%r12), %rdx jne 0x897a3 movq 0x8(%rsp), %r15 testq %rdx, %rdx je 0x897ad movq (%r12), %rsi movq %r15, %rdi callq 0x1a930 testl %eax, %eax sete %r14b jmp 0x897b0 movq 0x8(%rsp), %r15 xorl %r14d, %r14d jmp 0x897b0 movb $0x1, %r14b cmpq %rbp, %r15 je 0x897c5 movq 0x18(%rsp), %rsi incq %rsi movq %r15, %rdi callq 0x1a8f0 testb %r14b, %r14b jne 0x897db addq $0x20, %r12 cmpq %r13, %r12 jne 0x89752 xorl %eax, %eax jmp 0x897dd movb $0x1, %al addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZNK5minja6Parser11peekSymbolsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, [rsi] mov r13, [rsi+8] cmp r12, r13 jz loc_897D7 mov rbx, rdi lea rbp, [rsp+58h+var_40] loc_89752: mov rax, [rbx+18h] mov rsi, [rbx+20h] sub rax, rsi mov rdx, [r12+8] cmp rax, rdx jl short loc_897CA add rdx, rsi mov [rsp+58h+var_50], rbp lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdx, [rsp+58h+var_48] cmp rdx, [r12+8] jnz short loc_897A3 mov r15, [rsp+58h+var_50] test rdx, rdx jz short loc_897AD mov rsi, [r12] mov rdi, r15 call _bcmp test eax, eax setz r14b jmp short loc_897B0 loc_897A3: mov r15, [rsp+58h+var_50] xor r14d, r14d jmp short loc_897B0 loc_897AD: mov r14b, 1 loc_897B0: cmp r15, rbp jz short loc_897C5 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_897C5: test r14b, r14b jnz short loc_897DB loc_897CA: add r12, 20h ; ' ' cmp r12, r13 jnz loc_89752 loc_897D7: xor eax, eax jmp short loc_897DD loc_897DB: mov al, 1 loc_897DD: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char minja::Parser::peekSymbols(long long a1, _QWORD *a2) { _QWORD *v2; // r12 _QWORD *v3; // r13 _BYTE *v4; // rsi long long v5; // rdx _QWORD *v6; // r15 bool v7; // r14 void *v9; // [rsp+8h] [rbp-50h] BYREF long long v10; // [rsp+10h] [rbp-48h] _QWORD v11[8]; // [rsp+18h] [rbp-40h] BYREF v2 = (_QWORD *)*a2; v3 = (_QWORD *)a2[1]; if ( (_QWORD *)*a2 == v3 ) return 0; while ( 1 ) { v4 = *(_BYTE **)(a1 + 32); v5 = v2[1]; if ( *(_QWORD *)(a1 + 24) - (_QWORD)v4 >= v5 ) { v9 = v11; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>( (long long)&v9, v4, (long long)&v4[v5]); if ( v10 == v2[1] ) { v6 = v9; v7 = !v10 || (unsigned int)bcmp(v9, *v2) == 0; } else { v6 = v9; v7 = 0; } if ( v6 != v11 ) operator delete(v6, v11[0] + 1LL); if ( v7 ) break; } v2 += 4; if ( v2 == v3 ) return 0; } return 1; }
peekSymbols: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] CMP R12,R13 JZ 0x001897d7 MOV RBX,RDI LEA RBP,[RSP + 0x18] LAB_00189752: MOV RAX,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RBX + 0x20] SUB RAX,RSI MOV RDX,qword ptr [R12 + 0x8] CMP RAX,RDX JL 0x001897ca ADD RDX,RSI MOV qword ptr [RSP + 0x8],RBP LEA RDI,[RSP + 0x8] CALL 0x00170172 MOV RDX,qword ptr [RSP + 0x10] CMP RDX,qword ptr [R12 + 0x8] JNZ 0x001897a3 MOV R15,qword ptr [RSP + 0x8] TEST RDX,RDX JZ 0x001897ad MOV RSI,qword ptr [R12] MOV RDI,R15 CALL 0x0011a930 TEST EAX,EAX SETZ R14B JMP 0x001897b0 LAB_001897a3: MOV R15,qword ptr [RSP + 0x8] XOR R14D,R14D JMP 0x001897b0 LAB_001897ad: MOV R14B,0x1 LAB_001897b0: CMP R15,RBP JZ 0x001897c5 MOV RSI,qword ptr [RSP + 0x18] INC RSI MOV RDI,R15 CALL 0x0011a8f0 LAB_001897c5: TEST R14B,R14B JNZ 0x001897db LAB_001897ca: ADD R12,0x20 CMP R12,R13 JNZ 0x00189752 LAB_001897d7: XOR EAX,EAX JMP 0x001897dd LAB_001897db: MOV AL,0x1 LAB_001897dd: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::Parser::peekSymbols(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) const */ int8 __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1) { int8 *puVar1; long lVar2; long *plVar3; int iVar4; int8 *puVar5; bool bVar6; long *local_50; size_t local_48; long local_40 [2]; puVar5 = *(int8 **)param_1; puVar1 = *(int8 **)(param_1 + 8); if (puVar5 != puVar1) { do { lVar2 = *(long *)(this + 0x20); if ((long)puVar5[1] <= *(long *)(this + 0x18) - lVar2) { local_50 = local_40; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_50,lVar2,puVar5[1] + lVar2); plVar3 = local_50; if (local_48 == puVar5[1]) { if (local_48 == 0) { bVar6 = true; } else { iVar4 = bcmp(local_50,(void *)*puVar5,local_48); bVar6 = iVar4 == 0; } } else { bVar6 = false; } if (plVar3 != local_40) { operator_delete(plVar3,local_40[0] + 1); } if (bVar6) { return 1; } } puVar5 = puVar5 + 4; } while (puVar5 != puVar1); } return 0; }
8,664
ma_get_hash_keyval
eloqsql/libmariadb/libmariadb/mariadb_lib.c
uchar *ma_get_hash_keyval(const uchar *hash_entry, unsigned int *length, my_bool not_used __attribute__((unused))) { /* Hash entry has the following format: Offset: 0 key (\0 terminated) key_length + 1 value (\0 terminated) */ uchar *p= (uchar *)hash_entry; size_t len= strlen((char *)p); *length= (unsigned int)len; return p; }
O0
c
ma_get_hash_keyval: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x36400 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq
ma_get_hash_keyval: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _strlen mov [rbp+var_28], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long ma_get_hash_keyval(long long a1, _DWORD *a2) { *a2 = strlen(a1); return a1; }
ma_get_hash_keyval: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00136400 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
char * ma_get_hash_keyval(char *param_1,int4 *param_2) { size_t sVar1; sVar1 = strlen(param_1); *param_2 = (int)sVar1; return param_1; }
8,665
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
llama.cpp/common/minja/minja.hpp
std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); std::vector<std::string> ret; for (size_t i = 0, n = match.size(); i < n; ++i) { ret.push_back(match[i].str()); } return ret; } it = start; return {}; }
O3
cpp
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0xe335c xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movl $0x0, (%rsp) movq %r15, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x74216 testb %al, %al je 0xe20f1 movq 0x28(%rsp), %rdx movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, %r15 subq %rax, %r15 je 0xe20d8 movq (%rax), %rdi cmpq $0x48, %r15 jne 0xe20e9 cmpq %rdx, %rdi jne 0xe20f1 jmp 0xe20df cmpq %rdx, -0x48(%rax,%r15) jne 0xe20f1 leaq (%rax,%r15), %rsi addq $-0x48, %rsi jmp 0xe212c movq %rax, %rsi cmpq %rdx, %rdi je 0xe212c movq %r12, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xe211a movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x20180 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsi), %rdi subq %rdx, %rdi xorl %edx, %edx cmpb $0x0, 0x10(%rsi) cmovneq %rdi, %rdx addq %rdx, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) cmpq %rcx, %rax je 0xe2103 sarq $0x3, %r15 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r15 addq $-0x3, %r15 je 0xe2103 leaq 0x48(%rsp), %r13 xorl %ebp, %ebp leaq 0x38(%rsp), %r14 xorl %r12d, %r12d movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax subq %rsi, %rax je 0xe21ad movq %rax, %rcx sarq $0x3, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB imulq %rdx, %rcx addq $-0x3, %rcx cmpq %r12, %rcx jbe 0xe21ad addq %rbp, %rsi jmp 0xe21b4 addq %rax, %rsi addq $-0x48, %rsi movq %r14, %rdi callq 0x69b26 movq %rbx, %rdi movq %r14, %rsi callq 0x7639e movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xe21de movq 0x48(%rsp), %rsi incq %rsi callq 0x20180 incq %r12 addq $0x18, %rbp cmpq %r12, %r15 jne 0xe217b jmp 0xe2103 movq %rax, %r14 jmp 0xe221b movq %rax, %r14 jmp 0xe2213 movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r13, %rdi je 0xe2213 movq 0x48(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rdi callq 0x27ea0 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xe2232 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x20180 movq %r14, %rdi callq 0x20b50
_ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 lea rdx, [rsp+88h+var_78] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov [rsp+88h+var_88], 0 mov rcx, r15 xor r8d, r8d xor r9d, r9d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool) test al, al jz short loc_E20F1 mov rdx, [rsp+88h+var_60] mov rax, [rsp+88h+var_78] mov rcx, [rsp+88h+var_70] mov r15, rcx sub r15, rax jz short loc_E20D8 mov rdi, [rax] cmp r15, 48h ; 'H' jnz short loc_E20E9 cmp rdi, rdx jnz short loc_E20F1 jmp short loc_E20DF loc_E20D8: cmp [rax+r15-48h], rdx jnz short loc_E20F1 loc_E20DF: lea rsi, [rax+r15] add rsi, 0FFFFFFFFFFFFFFB8h jmp short loc_E212C loc_E20E9: mov rsi, rax cmp rdi, rdx jz short loc_E212C loc_E20F1: mov [r14+20h], r12 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_E2103: mov rdi, [rsp+88h+var_78]; void * test rdi, rdi jz short loc_E211A mov rsi, [rsp+88h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E211A: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E212C: mov rdi, [rsi+8] sub rdi, rdx xor edx, edx cmp byte ptr [rsi+10h], 0 cmovnz rdx, rdi add [r14+20h], rdx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 cmp rax, rcx jz short loc_E2103 sar r15, 3 mov rax, 0AAAAAAAAAAAAAAABh imul r15, rax add r15, 0FFFFFFFFFFFFFFFDh jz short loc_E2103 lea r13, [rsp+88h+var_40] xor ebp, ebp lea r14, [rsp+88h+var_50] xor r12d, r12d loc_E217B: mov rsi, [rsp+88h+var_78] mov rax, [rsp+88h+var_70] sub rax, rsi jz short loc_E21AD mov rcx, rax sar rcx, 3 mov rdx, 0AAAAAAAAAAAAAAABh imul rcx, rdx add rcx, 0FFFFFFFFFFFFFFFDh cmp rcx, r12 jbe short loc_E21AD add rsi, rbp jmp short loc_E21B4 loc_E21AD: add rsi, rax add rsi, 0FFFFFFFFFFFFFFB8h loc_E21B4: mov rdi, r14 call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+88h+var_50]; void * cmp rdi, r13 jz short loc_E21DE mov rsi, [rsp+88h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E21DE: inc r12 add rbp, 18h cmp r15, r12 jnz short loc_E217B jmp loc_E2103 mov r14, rax jmp short loc_E221B mov r14, rax jmp short loc_E2213 mov r14, rax mov rdi, [rsp+arg_30]; void * cmp rdi, r13 jz short loc_E2213 mov rsi, [rsp+arg_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E2213: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_E221B: mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_E2232 mov rsi, [rsp+arg_18] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E2232: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // r15 long long v10; // rdi long long v11; // rsi long long v13; // rdx unsigned long long v14; // r15 long long v15; // rbp unsigned long long i; // r12 long long *v17; // rsi __int128 v18; // [rsp+10h] [rbp-78h] BYREF __int128 v19; // [rsp+20h] [rbp-68h] void *v20[2]; // [rsp+38h] [rbp-50h] BYREF long long v21; // [rsp+48h] [rbp-40h] BYREF v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v19 = 0LL; v18 = 0LL; if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (char **)&v18, a3, 0, 0, 0) ) goto LABEL_9; v8 = v18; v9 = *((_QWORD *)&v18 + 1) - v18; if ( *((_QWORD *)&v18 + 1) != (_QWORD)v18 ) { v10 = *(_QWORD *)v18; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v19 + 1) ) goto LABEL_7; } else { v11 = v18; if ( v10 == *((_QWORD *)&v19 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v18 + 1) - 72LL) != *((_QWORD *)&v19 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v18 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v19 + 1); *(_QWORD *)(a2 + 32) += v13; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) ) { v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3; if ( v14 ) { v15 = 0LL; for ( i = 0LL; i != v14; ++i ) { if ( *((_QWORD *)&v18 + 1) == (_QWORD)v18 || 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v18 + 1) - v18) >> 3) - 3 <= i ) { v17 = (long long *)(*((_QWORD *)&v18 + 1) - 72LL); } else { v17 = (long long *)(v15 + v18); } std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v20, v17); std::vector<std::string>::emplace_back<std::string>(a1, v20); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); v15 += 24LL; } } } LABEL_10: if ( (_QWORD)v18 ) operator delete((void *)v18, v19 - v18); return a1; }
consumeTokenGroups: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x001e335c XORPS XMM0,XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_001e2098: MOV dword ptr [RSP],0x0 MOV RCX,R15 XOR R8D,R8D XOR R9D,R9D CALL 0x00174216 TEST AL,AL JZ 0x001e20f1 MOV RDX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV R15,RCX SUB R15,RAX JZ 0x001e20d8 MOV RDI,qword ptr [RAX] CMP R15,0x48 JNZ 0x001e20e9 CMP RDI,RDX JNZ 0x001e20f1 JMP 0x001e20df LAB_001e20d8: CMP qword ptr [RAX + R15*0x1 + -0x48],RDX JNZ 0x001e20f1 LAB_001e20df: LEA RSI,[RAX + R15*0x1] ADD RSI,-0x48 JMP 0x001e212c LAB_001e20e9: MOV RSI,RAX CMP RDI,RDX JZ 0x001e212c LAB_001e20f1: MOV qword ptr [R14 + 0x20],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_001e2103: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001e211a MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x00120180 LAB_001e211a: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e212c: MOV RDI,qword ptr [RSI + 0x8] SUB RDI,RDX XOR EDX,EDX CMP byte ptr [RSI + 0x10],0x0 CMOVNZ RDX,RDI ADD qword ptr [R14 + 0x20],RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 CMP RAX,RCX JZ 0x001e2103 SAR R15,0x3 MOV RAX,-0x5555555555555555 IMUL R15,RAX ADD R15,-0x3 JZ 0x001e2103 LEA R13,[RSP + 0x48] XOR EBP,EBP LEA R14,[RSP + 0x38] XOR R12D,R12D LAB_001e217b: MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RSI JZ 0x001e21ad MOV RCX,RAX SAR RCX,0x3 MOV RDX,-0x5555555555555555 IMUL RCX,RDX ADD RCX,-0x3 CMP RCX,R12 JBE 0x001e21ad ADD RSI,RBP JMP 0x001e21b4 LAB_001e21ad: ADD RSI,RAX ADD RSI,-0x48 LAB_001e21b4: MOV RDI,R14 CALL 0x00169b26 LAB_001e21bc: MOV RDI,RBX MOV RSI,R14 CALL 0x0017639e LAB_001e21c7: MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R13 JZ 0x001e21de MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x00120180 LAB_001e21de: INC R12 ADD RBP,0x18 CMP R15,R12 JNZ 0x001e217b JMP 0x001e2103
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * minja::Parser::consumeTokenGroups (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; bool bVar2; long *plVar3; long lVar4; long lVar5; long *local_78; long *plStack_70; long local_68; long lStack_60; long *local_50 [2]; long local_40 [2]; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_68 = 0; lStack_60 = 0; local_78 = (long *)0x0; plStack_70 = (long *)0x0; /* try { // try from 001e2098 to 001e20ac has its CatchHandler @ 001e21ef */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78, param_3,0,0,0); if (bVar2) { lVar5 = (long)plStack_70 - (long)local_78; if (lVar5 == 0) { lVar4 = local_78[-9]; joined_r0x001e20dd: if (lVar4 != lStack_60) goto LAB_001e20f1; plVar3 = (long *)((long)local_78 + lVar5 + -0x48); } else { lVar4 = *local_78; if (lVar5 == 0x48) goto joined_r0x001e20dd; plVar3 = local_78; if (lVar4 != lStack_60) goto LAB_001e20f1; } lVar4 = 0; if ((char)plVar3[2] != '\0') { lVar4 = plVar3[1] - lStack_60; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; if ((local_78 != plStack_70) && (lVar5 = (lVar5 >> 3) * -0x5555555555555555, lVar5 != 3)) { lVar4 = 0; do { /* try { // try from 001e21b4 to 001e21bb has its CatchHandler @ 001e21f4 */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str (); /* try { // try from 001e21bc to 001e21c6 has its CatchHandler @ 001e21f9 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(param_1,(string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar4 = lVar4 + 1; } while (lVar5 + -3 != lVar4); } } else { LAB_001e20f1: *(int8 *)(param_2 + 0x20) = uVar1; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; } if (local_78 != (long *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } return param_1; }
8,666
uf_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); }
O0
c
uf_endspace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0x452cb movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x1f2dad(%rip), %rcx # 0x238070 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x452de movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0x42a10 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0x45300 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x45353 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x45333 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0x44970 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x281c0 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_endspace: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_452CB mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_452DE loc_452CB: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits mov [rbp+var_28], eax loc_452DE: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_45300 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_45353 loc_45300: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_45333 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes loc_45333: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset loc_45353: add rsp, 30h pop rbp retn
long long uf_endspace(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { unsigned int v4; // eax int v5; // ecx long long result; // rax unsigned int bits; // [rsp+8h] [rbp-28h] if ( a2[1] < *(_DWORD *)(a1 + 28) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 28)); } else { v4 = *a2; v5 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v5; bits = mask[*(unsigned int *)(a1 + 28)] & (v4 >> v5); } if ( &a3[bits] <= a4 ) { if ( &a3[bits] != a4 ) decode_bytes(a1, (long long)a2, a3, &a4[-bits]); return memset(&a4[-bits], 32LL, bits); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_endspace: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001452cb MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x338070] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001452de LAB_001452cb: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x00142a10 MOV dword ptr [RBP + -0x28],EAX LAB_001452de: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x00145300 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x00145353 LAB_00145300: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x00145333 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x00144970 LAB_00145333: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x001281c0 LAB_00145353: ADD RSP,0x30 POP RBP RET
void uf_endspace(long param_1,uint *param_2,long param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < param_3 + (ulong)local_30) { param_2[10] = 1; } else { if (param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } return; }
8,667
ma_read_block_record
eloqsql/storage/maria/ma_blockrec.c
int _ma_read_block_record(MARIA_HA *info, uchar *record, MARIA_RECORD_POS record_pos) { MARIA_SHARE *share= info->s; uchar *data, *end_of_data, *buff; uint offset; int ret; DBUG_ENTER("_ma_read_block_record"); DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u", (ulong) record_pos, (ulong) ma_recordpos_to_page(record_pos), ma_recordpos_to_dir_entry(record_pos))); offset= ma_recordpos_to_dir_entry(record_pos); if (!(buff= pagecache_read(share->pagecache, &info->dfile, ma_recordpos_to_page(record_pos), 0, info->buff, share->page_type, PAGECACHE_LOCK_LEFT_UNLOCKED, 0))) DBUG_RETURN(my_errno); /* Unallocated page access can happen if this is an access to a page where all rows where deleted as part of this statement. */ DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == HEAD_PAGE || (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == UNALLOCATED_PAGE); if (((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == UNALLOCATED_PAGE) || !(data= get_record_position(share, buff, offset, &end_of_data))) { DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_PRINT("warning", ("Wrong directory entry in data block")); my_errno= HA_ERR_RECORD_DELETED; /* File crashed */ DBUG_RETURN(HA_ERR_RECORD_DELETED); } ret= _ma_read_block_record2(info, record, data, end_of_data); DBUG_RETURN(ret); }
O3
c
ma_read_block_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r14 movq (%rdi), %r15 movq 0x600(%r15), %rdi leaq 0x470(%r14), %rsi shrq $0x8, %rdx movq 0x378(%r14), %r8 movl 0x7d4(%r15), %r9d xorl %ecx, %ecx pushq $0x0 pushq $0x0 callq 0x72726 addq $0x10, %rsp testq %rax, %rax je 0x4d8f6 testb $0x7, 0x7(%rax) je 0x4d8e4 movzbl %r12b, %edx leaq -0x28(%rbp), %rcx movq %r15, %rdi movq %rax, %rsi callq 0x4d90a testq %rax, %rax je 0x4d8e4 movq -0x28(%rbp), %rcx movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x4cdad callq 0xac2be movl $0x86, (%rax) movl $0x86, %eax jmp 0x4d8fd callq 0xac2be movl (%rax), %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ma_read_block_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r12, rdx mov rbx, rsi mov r14, rdi mov r15, [rdi] mov rdi, [r15+600h] lea rsi, [r14+470h] shr rdx, 8 mov r8, [r14+378h] mov r9d, [r15+7D4h] xor ecx, ecx push 0 push 0 call pagecache_read add rsp, 10h test rax, rax jz short loc_4D8F6 test byte ptr [rax+7], 7 jz short loc_4D8E4 movzx edx, r12b lea rcx, [rbp+var_28] mov rdi, r15 mov rsi, rax call get_record_position test rax, rax jz short loc_4D8E4 mov rcx, [rbp+var_28] mov rdi, r14 mov rsi, rbx mov rdx, rax add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp jmp _ma_read_block_record2 loc_4D8E4: call _my_thread_var mov dword ptr [rax], 86h mov eax, 86h jmp short loc_4D8FD loc_4D8F6: call _my_thread_var mov eax, [rax] loc_4D8FD: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_read_block_record(long long **a1, long long a2, unsigned long long a3) { unsigned __int8 v3; // r12 long long *v5; // r15 long long v6; // rdi long long v7; // rax long long record_position; // rax long long v9; // r8 unsigned int *v10; // r9 unsigned long long v12[5]; // [rsp+8h] [rbp-28h] BYREF v3 = a3; v5 = *a1; v6 = (*a1)[192]; v7 = pagecache_read(v6, (int)a1 + 1136, a3 >> 8, 0, (unsigned int)a1[111], *((_DWORD *)v5 + 501), 0, 0LL); if ( !v7 ) return *(unsigned int *)my_thread_var(v6); if ( (*(_BYTE *)(v7 + 7) & 7) != 0 ) { v6 = (long long)v5; record_position = get_record_position(v5, v7, v3, v12); if ( record_position ) return ma_read_block_record2(a1, a2, record_position, v12[0], v9, v10); } *(_DWORD *)my_thread_var(v6) = 134; return 134LL; }
_ma_read_block_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,RDX MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI] MOV RDI,qword ptr [R15 + 0x600] LEA RSI,[R14 + 0x470] SHR RDX,0x8 MOV R8,qword ptr [R14 + 0x378] MOV R9D,dword ptr [R15 + 0x7d4] XOR ECX,ECX PUSH 0x0 PUSH 0x0 CALL 0x00172726 ADD RSP,0x10 TEST RAX,RAX JZ 0x0014d8f6 TEST byte ptr [RAX + 0x7],0x7 JZ 0x0014d8e4 MOVZX EDX,R12B LEA RCX,[RBP + -0x28] MOV RDI,R15 MOV RSI,RAX CALL 0x0014d90a TEST RAX,RAX JZ 0x0014d8e4 MOV RCX,qword ptr [RBP + -0x28] MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0014cdad LAB_0014d8e4: CALL 0x001ac2be MOV dword ptr [RAX],0x86 MOV EAX,0x86 JMP 0x0014d8fd LAB_0014d8f6: CALL 0x001ac2be MOV EAX,dword ptr [RAX] LAB_0014d8fd: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
ulong _ma_read_block_record(long *param_1,int8 param_2,ulong param_3) { long lVar1; long lVar2; ulong uVar3; int4 *puVar4; uint *puVar5; int8 local_30; lVar2 = *param_1; lVar1 = pagecache_read(*(int8 *)(lVar2 + 0x600),param_1 + 0x8e,param_3 >> 8,0,param_1[0x6f], *(int4 *)(lVar2 + 0x7d4),0,0); if (lVar1 == 0) { puVar5 = (uint *)_my_thread_var(); uVar3 = (ulong)*puVar5; } else { if ((*(byte *)(lVar1 + 7) & 7) != 0) { lVar2 = get_record_position(lVar2,lVar1,param_3 & 0xff,&local_30); if (lVar2 != 0) { uVar3 = _ma_read_block_record2(param_1,param_2,lVar2,local_30); return uVar3; } } puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x86; uVar3 = 0x86; } return uVar3; }
8,668
translog_finish_page
eloqsql/storage/maria/ma_loghandler.c
static void translog_finish_page(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { uint16 left= TRANSLOG_PAGE_SIZE - cursor->current_page_fill; uchar *page= cursor->ptr - cursor->current_page_fill; DBUG_ENTER("translog_finish_page"); DBUG_PRINT("enter", ("Buffer: #%u %p " "Buffer addr: " LSN_FMT " " "Page addr: " LSN_FMT " " "size:%u (%u) Pg:%u left:%u", (uint) cursor->buffer_no, cursor->buffer, LSN_IN_PARTS(cursor->buffer->offset), (uint)LSN_FILE_NO(*horizon), (uint)(LSN_OFFSET(*horizon) - cursor->current_page_fill), (uint) cursor->buffer->size, (uint) (cursor->ptr -cursor->buffer->buffer), (uint) cursor->current_page_fill, (uint) left)); DBUG_ASSERT(LSN_FILE_NO(*horizon) == LSN_FILE_NO(cursor->buffer->offset) || translog_status == TRANSLOG_UNINITED); if ((LSN_FILE_NO(*horizon) != LSN_FILE_NO(cursor->buffer->offset))) DBUG_VOID_RETURN; // everything wrong do not write to awoid more problems translog_check_cursor(cursor); if (cursor->protected) { DBUG_PRINT("info", ("Already protected and finished")); DBUG_VOID_RETURN; } cursor->protected= 1; DBUG_ASSERT(left < TRANSLOG_PAGE_SIZE); if (left != 0) { DBUG_PRINT("info", ("left: %u", (uint) left)); memset(cursor->ptr, TRANSLOG_FILLER, left); cursor->ptr+= left; (*horizon)+= left; /* offset increasing */ if (!cursor->chaser) cursor->buffer->size+= left; /* We are finishing the page so reset the counter */ cursor->current_page_fill= 0; DBUG_PRINT("info", ("Finish Page buffer #%u: %p " "chaser: %d Size: %lu (%lu)", (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); translog_check_cursor(cursor); } /* When we are finishing the page other thread might not finish the page header yet (in case if we started from the middle of the page) so we have to read log_descriptor.flags but not the flags from the page. */ if (log_descriptor.flags & TRANSLOG_SECTOR_PROTECTION) { translog_put_sector_protection(page, cursor); DBUG_PRINT("info", ("drop write_counter")); cursor->write_counter= 0; cursor->previous_offset= 0; } if (log_descriptor.flags & TRANSLOG_PAGE_CRC) { uint32 crc= translog_crc(page + log_descriptor.page_overhead, TRANSLOG_PAGE_SIZE - log_descriptor.page_overhead); DBUG_PRINT("info", ("CRC: %lx", (ulong) crc)); /* We have page number, file number and flag before crc */ int4store(page + 3 + 3 + 1, crc); } DBUG_VOID_RETURN; }
O3
c
translog_finish_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq 0x28(%rsi), %rax movq 0x100010(%rax), %rax xorq (%rdi), %rax shrq $0x20, %rax jne 0x351bd movq %rsi, %r14 cmpb $0x0, 0x38(%rsi) jne 0x351bd movzwl 0x30(%r14), %r13d movq 0x20(%r14), %rbx movb $0x1, 0x38(%r14) movzwl %r13w, %eax cmpl $0x2000, %eax # imm = 0x2000 je 0x35171 movq %rdi, %r15 movl $0x2000, %eax # imm = 0x2000 subl %r13d, %eax movzwl %ax, %r12d movq %rbx, %rdi movl $0xff, %esi movq %r12, %rdx callq 0x292a0 addq %r12, 0x20(%r14) addq %r12, (%r15) cmpb $0x0, 0x37(%r14) jne 0x3516a movq 0x28(%r14), %rax addl %r12d, 0x100030(%rax) movw $0x0, 0x30(%r14) subq %r13, %rbx movl 0x3c8d7e(%rip), %eax # 0x3fdef8 testb $0x2, %al je 0x3519d movl 0x34(%r14), %edx movzwl 0x32(%r14), %esi movq %rbx, %rdi callq 0x389bd movl $0x0, 0x32(%r14) movl 0x3c8d5b(%rip), %eax # 0x3fdef8 testb $0x1, %al je 0x351bd movzwl 0x3c8d6c(%rip), %eax # 0x3fdf14 leaq (%rbx,%rax), %rsi movl $0x2000, %edx # imm = 0x2000 subl %eax, %edx xorl %edi, %edi callq 0xa7f14 movl %eax, 0x7(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
translog_finish_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rax, [rsi+28h] mov rax, ds:qword_100010[rax] xor rax, [rdi] shr rax, 20h jnz loc_351BD mov r14, rsi cmp byte ptr [rsi+38h], 0 jnz loc_351BD movzx r13d, word ptr [r14+30h] mov rbx, [r14+20h] mov byte ptr [r14+38h], 1 movzx eax, r13w cmp eax, 2000h jz short loc_35171 mov r15, rdi mov eax, 2000h sub eax, r13d movzx r12d, ax mov rdi, rbx mov esi, 0FFh mov rdx, r12 call _memset add [r14+20h], r12 add [r15], r12 cmp byte ptr [r14+37h], 0 jnz short loc_3516A mov rax, [r14+28h] add dword ptr ds:qword_100030[rax], r12d loc_3516A: mov word ptr [r14+30h], 0 loc_35171: sub rbx, r13 mov eax, cs:dword_3FDEF8 test al, 2 jz short loc_3519D mov edx, [r14+34h] movzx esi, word ptr [r14+32h] mov rdi, rbx call translog_put_sector_protection mov dword ptr [r14+32h], 0 mov eax, cs:dword_3FDEF8 loc_3519D: test al, 1 jz short loc_351BD movzx eax, cs:word_3FDF14 lea rsi, [rbx+rax] mov edx, 2000h sub edx, eax xor edi, edi call my_checksum mov [rbx+7], eax loc_351BD: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long translog_finish_page(_QWORD *a1, long long a2) { unsigned long long result; // rax long long v3; // r13 long long v4; // rbx long long v5; // r12 long long v6; // rbx result = (*a1 ^ *(unsigned long long *)((char *)&qword_100010 + *(_QWORD *)(a2 + 40))) >> 32; if ( !result && !*(_BYTE *)(a2 + 56) ) { v3 = *(unsigned __int16 *)(a2 + 48); v4 = *(_QWORD *)(a2 + 32); *(_BYTE *)(a2 + 56) = 1; if ( (unsigned __int16)v3 != 0x2000 ) { v5 = (unsigned __int16)(0x2000 - v3); memset(v4, 255LL, v5); *(_QWORD *)(a2 + 32) += v5; *a1 += v5; if ( !*(_BYTE *)(a2 + 55) ) *(_DWORD *)((char *)&qword_100030 + *(_QWORD *)(a2 + 40)) += v5; *(_WORD *)(a2 + 48) = 0; } v6 = v4 - v3; result = (unsigned int)dword_3FDEF8; if ( (dword_3FDEF8 & 2) != 0 ) { translog_put_sector_protection(v6, *(unsigned __int16 *)(a2 + 50), *(unsigned int *)(a2 + 52)); *(_DWORD *)(a2 + 50) = 0; result = (unsigned int)dword_3FDEF8; } if ( (result & 1) != 0 ) { result = my_checksum( 0LL, v6 + (unsigned __int16)word_3FDF14, 0x2000 - (unsigned int)(unsigned __int16)word_3FDF14); *(_DWORD *)(v6 + 7) = result; } } return result; }
translog_finish_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RAX,qword ptr [RSI + 0x28] MOV RAX,qword ptr [RAX + 0x100010] XOR RAX,qword ptr [RDI] SHR RAX,0x20 JNZ 0x001351bd MOV R14,RSI CMP byte ptr [RSI + 0x38],0x0 JNZ 0x001351bd MOVZX R13D,word ptr [R14 + 0x30] MOV RBX,qword ptr [R14 + 0x20] MOV byte ptr [R14 + 0x38],0x1 MOVZX EAX,R13W CMP EAX,0x2000 JZ 0x00135171 MOV R15,RDI MOV EAX,0x2000 SUB EAX,R13D MOVZX R12D,AX MOV RDI,RBX MOV ESI,0xff MOV RDX,R12 CALL 0x001292a0 ADD qword ptr [R14 + 0x20],R12 ADD qword ptr [R15],R12 CMP byte ptr [R14 + 0x37],0x0 JNZ 0x0013516a MOV RAX,qword ptr [R14 + 0x28] ADD dword ptr [RAX + 0x100030],R12D LAB_0013516a: MOV word ptr [R14 + 0x30],0x0 LAB_00135171: SUB RBX,R13 MOV EAX,dword ptr [0x004fdef8] TEST AL,0x2 JZ 0x0013519d MOV EDX,dword ptr [R14 + 0x34] MOVZX ESI,word ptr [R14 + 0x32] MOV RDI,RBX CALL 0x001389bd MOV dword ptr [R14 + 0x32],0x0 MOV EAX,dword ptr [0x004fdef8] LAB_0013519d: TEST AL,0x1 JZ 0x001351bd MOVZX EAX,word ptr [0x004fdf14] LEA RSI,[RBX + RAX*0x1] MOV EDX,0x2000 SUB EDX,EAX XOR EDI,EDI CALL 0x001a7f14 MOV dword ptr [RBX + 0x7],EAX LAB_001351bd: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void translog_finish_page(ulong *param_1,long param_2) { ushort uVar1; void *__s; int4 uVar2; long lVar3; uint uVar4; ulong __n; if (((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 7) ^ *param_1) >> 0x20 == 0) && (*(char *)(param_2 + 0x38) == '\0')) { uVar1 = *(ushort *)(param_2 + 0x30); __s = *(void **)(param_2 + 0x20); *(int1 *)(param_2 + 0x38) = 1; if (uVar1 != 0x2000) { uVar4 = 0x2000 - uVar1 & 0xffff; __n = (ulong)uVar4; memset(__s,0xff,__n); *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + __n; *param_1 = *param_1 + __n; if (*(char *)(param_2 + 0x37) == '\0') { *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + *(long *)(param_2 + 0x28) + 0x27) + uVar4; } *(int2 *)(param_2 + 0x30) = 0; } lVar3 = (long)__s - (ulong)uVar1; if ((DAT_004fdef8 & 2) != 0) { translog_put_sector_protection (lVar3,*(int2 *)(param_2 + 0x32),*(int4 *)(param_2 + 0x34)); *(int4 *)(param_2 + 0x32) = 0; } if ((DAT_004fdef8 & 1) != 0) { uVar2 = my_checksum(0,lVar3 + (ulong)(uint)DAT_004fdf14,0x2000 - (uint)DAT_004fdf14); *(int4 *)(lVar3 + 7) = uVar2; } } return; }
8,669
LefDefParser::defrData::StoreAlias()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/def_keywords.cpp
void defrData::StoreAlias() { int tokenSize = TOKEN_SIZE; char *aname = (char*)malloc(tokenSize); DefGetToken(&aname, &tokenSize); char *line = (char*)malloc(tokenSize); DefGetToken(&line, &tokenSize); char *uc_line = (char*)malloc(tokenSize); string so_far; /* contains alias contents as we build it */ if (strcmp(line,"=") != 0) { defError(6000, "Expecting '='"); return; } /* now keep getting lines till we get one that contains &ENDALIAS */ for(char *p = NULL ;p == NULL;){ int i; char *s = line; for(i=0;i<tokenSize-1;i++) { int ch = GETC(); if (ch == EOF) { defError(6001, "End of file in &ALIAS"); return; } *s++ = ch; if (ch == '\n') { print_lines(++nlines); break; } } *s = '\0'; uc_array(line, uc_line); /* make upper case copy */ p = strstr(uc_line, "&ENDALIAS"); /* look for END_ALIAS */ if (p != NULL) /* if we find it */ *(line + (p - uc_line)) = 0; /* remove it from the line */ so_far += line; } def_alias_set[aname] = so_far; free(aname); free(line); free(uc_line); }
O3
cpp
LefDefParser::defrData::StoreAlias(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq 0x24(%rsp), %r14 movl $0x1000, (%r14) # imm = 0x1000 movl $0x1000, %edi # imm = 0x1000 callq 0x6270 leaq 0x30(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi movq %r14, %rdx callq 0x16df8 movslq (%r14), %rdi callq 0x6270 leaq 0x28(%rsp), %r15 movq %rax, (%r15) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x16df8 movslq (%r14), %rdi callq 0x6270 movq %rax, %r14 movq 0x4bdea(%rip), %rax # 0x62fa8 addq $0x18, %rax movq %rax, 0x18(%rsp) movq (%r15), %rax cmpb $0x3d, (%rax) jne 0x171d5 cmpb $0x0, 0x1(%rax) je 0x1720b leaq 0x2aab8(%rip), %rdx # 0x41c94 movq %rbx, %rdi movl $0x1770, %esi # imm = 0x1770 callq 0x1693a movq 0x18(%rsp), %rdi addq $-0x18, %rdi leaq 0x10(%rsp), %rsi callq 0x6120 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %ebp, %ebp leaq 0x18(%rsp), %r12 testq %rbp, %rbp jne 0x17376 movq 0x28(%rsp), %r15 movl 0x24(%rsp), %ebp movq %r15, %r13 cmpl $0x2, %ebp jl 0x172ec leaq 0x1(%r15), %rax decl %ebp movq %rax, %r13 movq %rbx, %rdi callq 0x168d0 cmpl $-0x1, %eax je 0x1735d movb %al, -0x1(%r13) cmpl $0xa, %eax je 0x17260 leaq 0x1(%r13), %rax decl %ebp jne 0x17236 jmp 0x172ec movq 0x1c8(%rbx), %rbp incq %rbp movq %rbp, 0x1c8(%rbx) movq 0x9250(%rbx), %rcx movslq 0x30(%rcx), %rsi movq %rbp, %rax cqto idivq %rsi testq %rdx, %rdx jne 0x172ec movq 0x110(%rcx), %rax testq %rax, %rax je 0x172a6 movq 0x9258(%rbx), %rcx movq 0x10(%rcx), %rdi movl %ebp, %esi callq *%rax jmp 0x172c2 movq 0x118(%rcx), %rax testq %rax, %rax je 0x172c2 movq 0x9258(%rbx), %rcx movq 0x10(%rcx), %rdi movq %rbp, %rsi callq *%rax movq 0x9250(%rbx), %rcx movq 0x100(%rcx), %rax testq %rax, %rax je 0x172db movl %ebp, %edi callq *%rax jmp 0x172ec movq 0x108(%rcx), %rax testq %rax, %rax je 0x172ec movq %rbp, %rdi callq *%rax movb $0x0, (%r13) movb (%r15), %al movq %r14, %r13 testb %al, %al je 0x1731b leaq 0x1(%r15), %rbp movq %r14, %r13 movsbl %al, %edi callq 0x6330 movb %al, (%r13) incq %r13 movb (%rbp), %al incq %rbp testb %al, %al jne 0x17302 movb $0x0, (%r13) movq %r14, %rdi leaq 0x2a98e(%rip), %rsi # 0x41cb8 callq 0x6080 movq %rax, %rbp testq %rax, %rax je 0x17342 movq %rbp, %rax subq %r14, %rax movb $0x0, (%r15,%rax) movq %r15, %rdi callq 0x60d0 movq %r12, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x6070 jmp 0x17212 leaq 0x2a93e(%rip), %rdx # 0x41ca2 movq %rbx, %rdi movl $0x1771, %esi # imm = 0x1771 callq 0x1693a jmp 0x171e9 movq 0x30(%rsp), %r15 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx movq %r15, %rsi callq 0x163ba addq $0x1e8, %rbx # imm = 0x1E8 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x16356 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0x6260 movq 0x10(%rsp), %rdi addq $-0x18, %rdi leaq 0xe(%rsp), %rsi callq 0x6120 movq %r15, %rdi callq 0x6220 movq 0x28(%rsp), %rdi callq 0x6220 movq %r14, %rdi callq 0x6220 jmp 0x171e9 jmp 0x17402 movq %rax, %rbx movq 0x10(%rsp), %rdi addq $-0x18, %rdi leaq 0xe(%rsp), %rsi callq 0x6120 jmp 0x17405 jmp 0x17402 jmp 0x17402 jmp 0x17402 jmp 0x17402 movq %rax, %rbx movq 0x18(%rsp), %rdi addq $-0x18, %rdi leaq 0x10(%rsp), %rsi callq 0x6120 movq %rbx, %rdi callq 0x6300
_ZN12LefDefParser8defrData10StoreAliasEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rdi lea r14, [rsp+68h+var_44] mov dword ptr [r14], 1000h mov edi, 1000h call _malloc lea rsi, [rsp+68h+var_38]; char ** mov [rsi], rax mov rdi, rbx; this mov rdx, r14; int * call _ZN12LefDefParser8defrData11DefGetTokenEPPcPi; LefDefParser::defrData::DefGetToken(char **,int *) movsxd rdi, dword ptr [r14] call _malloc lea r15, [rsp+68h+var_40] mov [r15], rax mov rdi, rbx; this mov rsi, r15; char ** mov rdx, r14; int * call _ZN12LefDefParser8defrData11DefGetTokenEPPcPi; LefDefParser::defrData::DefGetToken(char **,int *) movsxd rdi, dword ptr [r14] call _malloc mov r14, rax mov rax, cs:_ZNSs4_Rep20_S_empty_rep_storageE_ptr add rax, 18h mov [rsp+68h+var_50], rax mov rax, [r15] cmp byte ptr [rax], 3Dh ; '=' jnz short loc_171D5 cmp byte ptr [rax+1], 0 jz short loc_1720B loc_171D5: lea rdx, aExpecting; "Expecting '='" mov rdi, rbx; this mov esi, 1770h; int call _ZN12LefDefParser8defrData8defErrorEiPKc; LefDefParser::defrData::defError(int,char const*) loc_171E9: mov rdi, [rsp+68h+var_50] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+68h+var_58] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1720B: xor ebp, ebp lea r12, [rsp+68h+var_50] loc_17212: test rbp, rbp jnz loc_17376 mov r15, [rsp+68h+var_40] mov ebp, [rsp+68h+var_44] mov r13, r15 cmp ebp, 2 jl loc_172EC lea rax, [r15+1] dec ebp loc_17236: mov r13, rax mov rdi, rbx; this call _ZN12LefDefParser8defrData4GETCEv; LefDefParser::defrData::GETC(void) cmp eax, 0FFFFFFFFh jz loc_1735D mov [r13-1], al cmp eax, 0Ah jz short loc_17260 lea rax, [r13+1] dec ebp jnz short loc_17236 jmp loc_172EC loc_17260: mov rbp, [rbx+1C8h] inc rbp mov [rbx+1C8h], rbp mov rcx, [rbx+9250h] movsxd rsi, dword ptr [rcx+30h] mov rax, rbp cqo idiv rsi test rdx, rdx jnz short loc_172EC mov rax, [rcx+110h] test rax, rax jz short loc_172A6 mov rcx, [rbx+9258h] mov rdi, [rcx+10h] mov esi, ebp call rax jmp short loc_172C2 loc_172A6: mov rax, [rcx+118h] test rax, rax jz short loc_172C2 mov rcx, [rbx+9258h] mov rdi, [rcx+10h] mov rsi, rbp call rax loc_172C2: mov rcx, [rbx+9250h] mov rax, [rcx+100h] test rax, rax jz short loc_172DB mov edi, ebp call rax jmp short loc_172EC loc_172DB: mov rax, [rcx+108h] test rax, rax jz short loc_172EC mov rdi, rbp call rax loc_172EC: mov byte ptr [r13+0], 0 mov al, [r15] mov r13, r14 test al, al jz short loc_1731B lea rbp, [r15+1] mov r13, r14 loc_17302: movsx edi, al call _toupper mov [r13+0], al inc r13 mov al, [rbp+0] inc rbp test al, al jnz short loc_17302 loc_1731B: mov byte ptr [r13+0], 0 mov rdi, r14 lea rsi, aEndalias; "&ENDALIAS" call _strstr mov rbp, rax test rax, rax jz short loc_17342 mov rax, rbp sub rax, r14 mov byte ptr [r15+rax], 0 loc_17342: mov rdi, r15 call _strlen mov rdi, r12; this mov rsi, r15; char * mov rdx, rax; unsigned __int64 call __ZNSs6appendEPKcm; std::string::append(char const*,ulong) jmp loc_17212 loc_1735D: lea rdx, aEndOfFileInAli; "End of file in &ALIAS" mov rdi, rbx; this mov esi, 1771h; int call _ZN12LefDefParser8defrData8defErrorEiPKc; LefDefParser::defrData::defError(int,char const*) jmp loc_171E9 loc_17376: mov r15, [rsp+68h+var_38] lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_59] mov rsi, r15 call _ZNSsC2ISaIcEEEPKcRKS0_; std::string::string<std::allocator<char>>(char const*,std::allocator<char> const&) add rbx, 1E8h lea rsi, [rsp+68h+var_58] mov rdi, rbx call _ZNSt3mapISsSsN12LefDefParser17defCompareStringsESaISt4pairIKSsSsEEEixEOSs; std::map<std::string,std::string,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::operator[](std::string &&) lea rsi, [rsp+68h+var_50]; std::string * mov rdi, rax; this call __ZNSs6assignERKSs; std::string::assign(std::string const&) mov rdi, [rsp+68h+var_58] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+68h+var_5A] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) mov rdi, r15 call _free mov rdi, [rsp+68h+var_40] call _free mov rdi, r14 call _free jmp loc_171E9 jmp short loc_17402 mov rbx, rax mov rdi, [rsp+arg_8] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+arg_6] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) jmp short loc_17405 jmp short loc_17402 jmp short loc_17402 jmp short loc_17402 jmp short $+2 loc_17402: mov rbx, rax loc_17405: mov rdi, [rsp+arg_10] add rdi, 0FFFFFFFFFFFFFFE8h lea rsi, [rsp+arg_8] call __ZNSs4_Rep10_M_disposeERKSaIcE; std::string::_Rep::_M_dispose(std::allocator<char> const&) mov rdi, rbx call __Unwind_Resume
long long LefDefParser::defrData::StoreAlias(LefDefParser::defrData *this) { long long v1; // rsi long long v2; // rdx long long v3; // r14 long long v5; // rbp char *v6; // r15 char *v7; // r13 char *v8; // rax int v9; // ebp int v10; // eax long long v11; // rbp long long v12; // rcx void ( *v13)(_QWORD, _QWORD); // rax void ( *v14)(_QWORD, long long); // rax long long v15; // rcx void ( *v16)(_QWORD); // rax void ( *v17)(long long); // rax char v18; // al _BYTE *v19; // r13 char *v20; // rbp unsigned long long v21; // rax char *v22; // r15 std::string *v23; // rax char v24; // [rsp+Eh] [rbp-5Ah] BYREF char v25; // [rsp+Fh] [rbp-59h] BYREF long long v26; // [rsp+10h] [rbp-58h] BYREF char *v27; // [rsp+18h] [rbp-50h] BYREF int v28; // [rsp+24h] [rbp-44h] BYREF char *v29; // [rsp+28h] [rbp-40h] BYREF char *v30; // [rsp+30h] [rbp-38h] BYREF v28 = 4096; v30 = (char *)malloc(4096LL); LefDefParser::defrData::DefGetToken(this, &v30, &v28); v29 = (char *)malloc(v28); v1 = (long long)&v29; LefDefParser::defrData::DefGetToken(this, &v29, &v28); v3 = malloc(v28); v27 = (char *)&std::string::_Rep::_S_empty_rep_storage + 24; if ( *(_WORD *)v29 == 61 ) { v5 = 0LL; while ( !v5 ) { v6 = v29; v7 = v29; if ( v28 >= 2 ) { v8 = v29 + 1; v9 = v28 - 1; while ( 1 ) { v7 = v8; v10 = LefDefParser::defrData::GETC(this); if ( v10 == -1 ) { LefDefParser::defrData::defError(this, 0x1771u, "End of file in &ALIAS"); return std::string::_Rep::_M_dispose(v27 - 24, &v26); } *(v7 - 1) = v10; if ( v10 == 10 ) break; v8 = v7 + 1; if ( !--v9 ) goto LABEL_21; } v11 = *((_QWORD *)this + 57) + 1LL; *((_QWORD *)this + 57) = v11; v12 = *((_QWORD *)this + 4682); v1 = *(int *)(v12 + 48); v2 = v11 % v1; if ( !(v11 % v1) ) { v13 = *(void ( **)(_QWORD, _QWORD))(v12 + 272); if ( v13 ) { v1 = (unsigned int)v11; v13(*(_QWORD *)(*((_QWORD *)this + 4683) + 16LL), (unsigned int)v11); } else { v14 = *(void ( **)(_QWORD, long long))(v12 + 280); if ( v14 ) { v1 = v11; v14(*(_QWORD *)(*((_QWORD *)this + 4683) + 16LL), v11); } } v15 = *((_QWORD *)this + 4682); v16 = *(void ( **)(_QWORD))(v15 + 256); if ( v16 ) { v16((unsigned int)v11); } else { v17 = *(void ( **)(long long))(v15 + 264); if ( v17 ) v17(v11); } } } LABEL_21: *v7 = 0; v18 = *v6; v19 = (_BYTE *)v3; if ( *v6 ) { v20 = v6 + 1; v19 = (_BYTE *)v3; do { *v19++ = toupper((unsigned int)v18, v1, v2); v18 = *v20++; } while ( v18 ); } *v19 = 0; v5 = strstr(v3, "&ENDALIAS"); if ( v5 ) v6[v5 - v3] = 0; v21 = strlen(v6); v1 = (long long)v6; std::string::append((std::string *)&v27, v6, v21); } v22 = v30; std::string::string<std::allocator<char>>(&v26, (long long)v30, (long long)&v25); v23 = (std::string *)std::map<std::string,std::string,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string const,std::string>>>::operator[]( (long long)this + 488, &v26); std::string::assign(v23, (const std::string *)&v27); std::string::_Rep::_M_dispose(v26 - 24, &v24); free(v22); free(v29); free(v3); } else { LefDefParser::defrData::defError(this, 0x1770u, "Expecting '='"); } return std::string::_Rep::_M_dispose(v27 - 24, &v26); }
StoreAlias: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA R14,[RSP + 0x24] MOV dword ptr [R14],0x1000 MOV EDI,0x1000 CALL 0x00106270 LEA RSI,[RSP + 0x30] MOV qword ptr [RSI],RAX MOV RDI,RBX MOV RDX,R14 CALL 0x00116df8 MOVSXD RDI,dword ptr [R14] CALL 0x00106270 LEA R15,[RSP + 0x28] MOV qword ptr [R15],RAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00116df8 MOVSXD RDI,dword ptr [R14] CALL 0x00106270 MOV R14,RAX MOV RAX,qword ptr [0x00162fa8] ADD RAX,0x18 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [R15] CMP byte ptr [RAX],0x3d JNZ 0x001171d5 CMP byte ptr [RAX + 0x1],0x0 JZ 0x0011720b LAB_001171d5: LEA RDX,[0x141c94] MOV RDI,RBX MOV ESI,0x1770 CALL 0x0011693a LAB_001171e9: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,-0x18 LEA RSI,[RSP + 0x10] CALL 0x00106120 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011720b: XOR EBP,EBP LEA R12,[RSP + 0x18] LAB_00117212: TEST RBP,RBP JNZ 0x00117376 MOV R15,qword ptr [RSP + 0x28] MOV EBP,dword ptr [RSP + 0x24] MOV R13,R15 CMP EBP,0x2 JL 0x001172ec LEA RAX,[R15 + 0x1] DEC EBP LAB_00117236: MOV R13,RAX LAB_00117239: MOV RDI,RBX CALL 0x001168d0 CMP EAX,-0x1 JZ 0x0011735d MOV byte ptr [R13 + -0x1],AL CMP EAX,0xa JZ 0x00117260 LEA RAX,[R13 + 0x1] DEC EBP JNZ 0x00117236 JMP 0x001172ec LAB_00117260: MOV RBP,qword ptr [RBX + 0x1c8] INC RBP MOV qword ptr [RBX + 0x1c8],RBP MOV RCX,qword ptr [RBX + 0x9250] MOVSXD RSI,dword ptr [RCX + 0x30] MOV RAX,RBP CQO IDIV RSI TEST RDX,RDX JNZ 0x001172ec MOV RAX,qword ptr [RCX + 0x110] TEST RAX,RAX JZ 0x001172a6 MOV RCX,qword ptr [RBX + 0x9258] MOV RDI,qword ptr [RCX + 0x10] LAB_001172a0: MOV ESI,EBP CALL RAX JMP 0x001172c2 LAB_001172a6: MOV RAX,qword ptr [RCX + 0x118] TEST RAX,RAX JZ 0x001172c2 MOV RCX,qword ptr [RBX + 0x9258] MOV RDI,qword ptr [RCX + 0x10] MOV RSI,RBP CALL RAX LAB_001172c2: MOV RCX,qword ptr [RBX + 0x9250] MOV RAX,qword ptr [RCX + 0x100] TEST RAX,RAX JZ 0x001172db MOV EDI,EBP CALL RAX JMP 0x001172ec LAB_001172db: MOV RAX,qword ptr [RCX + 0x108] TEST RAX,RAX JZ 0x001172ec MOV RDI,RBP CALL RAX LAB_001172ec: MOV byte ptr [R13],0x0 MOV AL,byte ptr [R15] MOV R13,R14 TEST AL,AL JZ 0x0011731b LEA RBP,[R15 + 0x1] MOV R13,R14 LAB_00117302: MOVSX EDI,AL CALL 0x00106330 MOV byte ptr [R13],AL INC R13 MOV AL,byte ptr [RBP] INC RBP TEST AL,AL JNZ 0x00117302 LAB_0011731b: MOV byte ptr [R13],0x0 MOV RDI,R14 LEA RSI,[0x141cb8] CALL 0x00106080 MOV RBP,RAX TEST RAX,RAX JZ 0x00117342 MOV RAX,RBP SUB RAX,R14 MOV byte ptr [R15 + RAX*0x1],0x0 LAB_00117342: MOV RDI,R15 CALL 0x001060d0 LAB_0011734a: MOV RDI,R12 MOV RSI,R15 MOV RDX,RAX CALL 0x00106070 JMP 0x00117212 LAB_0011735d: LEA RDX,[0x141ca2] MOV RDI,RBX MOV ESI,0x1771 CALL 0x0011693a JMP 0x001171e9 LAB_00117376: MOV R15,qword ptr [RSP + 0x30] LAB_0011737b: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RSI,R15 CALL 0x001163ba ADD RBX,0x1e8 LAB_00117394: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00116356 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x00106260 LAB_001173ae: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,-0x18 LEA RSI,[RSP + 0xe] CALL 0x00106120 MOV RDI,R15 CALL 0x00106220 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00106220 MOV RDI,R14 CALL 0x00106220 JMP 0x001171e9
/* LefDefParser::defrData::StoreAlias() */ void __thiscall LefDefParser::defrData::StoreAlias(defrData *this) { char cVar1; long lVar2; code *pcVar3; char *__s; int iVar4; char *__haystack; char *pcVar5; string *psVar6; int iVar7; ulong uVar8; char *pcVar9; allocator local_59; long local_58; int *local_50; int local_44; char *local_40; char *local_38; local_44 = 0x1000; local_38 = (char *)malloc(0x1000); DefGetToken(this,&local_38,&local_44); local_40 = (char *)malloc((long)local_44); DefGetToken(this,&local_40,&local_44); __haystack = (char *)malloc((long)local_44); local_50 = PTR__S_empty_rep_storage_00162fa8 + 0x18; if ((*local_40 == '=') && (local_40[1] == '\0')) { pcVar5 = (char *)0x0; while (pcVar9 = local_38, __s = local_40, pcVar5 == (char *)0x0) { pcVar5 = local_40; if (1 < local_44) { iVar7 = local_44 + -1; pcVar9 = local_40; do { pcVar5 = pcVar9 + 1; /* try { // try from 00117239 to 00117240 has its CatchHandler @ 00117402 */ iVar4 = GETC(this); if (iVar4 == -1) { /* try { // try from 0011735d to 00117370 has its CatchHandler @ 001173fc */ defError(this,0x1771,"End of file in &ALIAS"); goto LAB_001171e9; } *pcVar9 = (char)iVar4; if (iVar4 == 10) { uVar8 = *(long *)(this + 0x1c8) + 1; *(ulong *)(this + 0x1c8) = uVar8; lVar2 = *(long *)(this + 0x9250); if ((long)uVar8 % (long)*(int *)(lVar2 + 0x30) == 0) { if (*(code **)(lVar2 + 0x110) == (code *)0x0) { if (*(code **)(lVar2 + 0x118) != (code *)0x0) { (**(code **)(lVar2 + 0x118)) (*(int8 *)(*(long *)(this + 0x9258) + 0x10),uVar8); } } else { /* try { // try from 001172a0 to 001172eb has its CatchHandler @ 001173fa */ (**(code **)(lVar2 + 0x110)) (*(int8 *)(*(long *)(this + 0x9258) + 0x10),uVar8 & 0xffffffff); } pcVar3 = *(code **)(*(long *)(this + 0x9250) + 0x100); if (pcVar3 == (code *)0x0) { pcVar3 = *(code **)(*(long *)(this + 0x9250) + 0x108); if (pcVar3 != (code *)0x0) { (*pcVar3)(uVar8); } } else { (*pcVar3)(uVar8 & 0xffffffff); } } break; } iVar7 = iVar7 + -1; pcVar9 = pcVar5; } while (iVar7 != 0); } *pcVar5 = '\0'; cVar1 = *__s; pcVar5 = __haystack; pcVar9 = __s; while (cVar1 != '\0') { pcVar9 = pcVar9 + 1; iVar7 = toupper((int)cVar1); *pcVar5 = (char)iVar7; pcVar5 = pcVar5 + 1; cVar1 = *pcVar9; } *pcVar5 = '\0'; pcVar5 = strstr(__haystack,"&ENDALIAS"); if (pcVar5 != (char *)0x0) { __s[(long)pcVar5 - (long)__haystack] = '\0'; } strlen(__s); /* try { // try from 0011734a to 00117357 has its CatchHandler @ 001173fe */ std::string::append((char *)&local_50,(ulong)__s); } /* try { // try from 0011737b to 0011738c has its CatchHandler @ 001173e0 */ std::string::string<std::allocator<char>>((string *)&local_58,local_38,&local_59); /* try { // try from 00117394 to 001173ad has its CatchHandler @ 001173e2 */ psVar6 = (string *) std:: map<std::string,std::string,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string_const,std::string>>> ::operator[]((map<std::string,std::string,LefDefParser::defCompareStrings,std::allocator<std::pair<std::string_const,std::string>>> *)(this + 0x1e8),(string *)&local_58); std::string::assign(psVar6); std::string::_Rep::_M_dispose((allocator *)(local_58 + -0x18)); free(pcVar9); free(local_40); free(__haystack); } else { /* try { // try from 001171d5 to 001171e8 has its CatchHandler @ 00117400 */ defError(this,6000,"Expecting \'=\'"); } LAB_001171e9: std::string::_Rep::_M_dispose((allocator *)(local_50 + -0x18)); return; }
8,670
rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>& rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&)
mnn-tts/MNN/3rd_party/rapidjson/document.h
GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) { MemberIterator member = FindMember(name); if (member != MemberEnd()) return member->value; else { RAPIDJSON_ASSERT(false); // see above note // This will generate -Wexit-time-destructors in clang // static GenericValue NullValue; // return NullValue; // Use static buffer and placement-new to prevent destruction static char buffer[sizeof(GenericValue)]; return *new (buffer) GenericValue(); } }
O0
c
rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>& rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rsi movq %rsi, 0x8(%rsp) movq 0x28(%rsp), %rdx leaq 0x20(%rsp), %rdi callq 0xbe20 movq 0x8(%rsp), %rsi leaq 0x10(%rsp), %rdi callq 0xc0b0 leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xbd80 movq 0x18(%rsp), %rsi leaq 0x20(%rsp), %rdi callq 0xc090 testb $0x1, %al jne 0xc3ba jmp 0xc3cd leaq 0x20(%rsp), %rdi callq 0xc230 addq $0x10, %rax addq $0x38, %rsp retq leaq 0x5c3c(%rip), %rdi # 0x12010 leaq 0x3d8e(%rip), %rsi # 0x10169 movl $0x473, %edx # imm = 0x473 leaq 0x5c2f(%rip), %rcx # 0x12016 callq 0x30c0 nopl (%rax)
_ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEixIS5_EERS6_RKNS0_IS2_T_EE: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rsi, [rsp+38h+var_8] mov [rsp+38h+var_30], rsi mov rdx, [rsp+38h+var_10] lea rdi, [rsp+38h+var_18] call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE10FindMemberIS5_EENS_21GenericMemberIteratorILb0ES2_S5_EERKNS0_IS2_T_EE; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&) mov rsi, [rsp+38h+var_30] lea rdi, [rsp+38h+var_28] call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE9MemberEndEv; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberEnd(void) lea rdi, [rsp+38h+var_20] lea rsi, [rsp+38h+var_28] call _ZN9rapidjson21GenericMemberIteratorILb1ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEC2ERKNS0_ILb0ES2_S5_EE; rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericMemberIterator(rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> const&) mov rsi, [rsp+38h+var_20] lea rdi, [rsp+38h+var_18] call _ZNK9rapidjson21GenericMemberIteratorILb0ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEneENS0_ILb1ES2_S5_EE; rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator!=(rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>) test al, 1 jnz short loc_C3BA jmp short loc_C3CD loc_C3BA: lea rdi, [rsp+38h+var_18] call _ZNK9rapidjson21GenericMemberIteratorILb0ENS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEptEv; rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator->(void) add rax, 10h add rsp, 38h retn loc_C3CD: lea rdi, aFalse; "false" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 473h lea rcx, aGenericvalueEn; "GenericValue<Encoding, Allocator> &rapi"... call ___assert_fail
long long rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>( unsigned int *a1, long long a2) { long long v3; // [rsp+10h] [rbp-28h] BYREF long long v4; // [rsp+18h] [rbp-20h] BYREF _QWORD v5[3]; // [rsp+20h] [rbp-18h] BYREF v5[2] = a1; v5[1] = a2; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>( (long long)v5, (long long)a1, a2); rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::MemberEnd( (long long)&v3, a1); rapidjson::GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericMemberIterator( &v4, &v3); if ( !rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator!=( v5, v4) ) __assert_fail( "false", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h", 1139LL, "GenericValue<Encoding, Allocator> &rapidjson::GenericValue<rapidjson::UTF8<>>::operator[](const GenericValue<Encod" "ing, SourceAllocator> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAlloca" "tor = rapidjson::MemoryPoolAllocator<>]"); return rapidjson::GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::operator->((long long)v5) + 16; }
operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RSI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x20] CALL 0x0010be20 MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] CALL 0x0010c0b0 LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x10] CALL 0x0010bd80 MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0x20] CALL 0x0010c090 TEST AL,0x1 JNZ 0x0010c3ba JMP 0x0010c3cd LAB_0010c3ba: LEA RDI,[RSP + 0x20] CALL 0x0010c230 ADD RAX,0x10 ADD RSP,0x38 RET LAB_0010c3cd: LEA RDI,[0x112010] LEA RSI,[0x110169] MOV EDX,0x473 LEA RCX,[0x112016] CALL 0x001030c0
/* rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >& rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) */ GenericValue * __thiscall rapidjson:: GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>:: operator[]<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> (GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *this,GenericValue *param_1) { ulong uVar1; long lVar2; GenericMemberIterator local_28 [8]; int8 local_20; GenericValue local_18 [8]; GenericValue *local_10; GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *local_8; local_10 = param_1; local_8 = this; FindMember<rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>(local_18); MemberEnd(); GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> ::GenericMemberIterator ((GenericMemberIterator<true,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *)&local_20,local_28); uVar1 = GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> ::operator!=((GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *)local_18,local_20); if ((uVar1 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/document.h", 0x473, "GenericValue<Encoding, Allocator> &rapidjson::GenericValue<rapidjson::UTF8<>>::operator[](const GenericValue<Encoding, SourceAllocator> &) [Encoding = rapidjson::UTF8<>, Allocator = rapidjson::MemoryPoolAllocator<>, SourceAllocator = rapidjson::MemoryPoolAllocator<>]" ); } lVar2 = GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> ::operator->((GenericMemberIterator<false,rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *)local_18); return (GenericValue *)(lVar2 + 0x10); }
8,671
mark_eval_captured_variables
bluesky950520[P]quickjs/quickjs.c
static void mark_eval_captured_variables(JSContext *ctx, JSFunctionDef *s, int scope_level) { int idx; JSVarDef *vd; for (idx = s->scopes[scope_level].first; idx >= 0;) { vd = &s->vars[idx]; vd->is_captured = 1; idx = vd->scope_next; } }
O2
c
mark_eval_captured_variables: movq 0xf8(%rdi), %rax movl %esi, %ecx leaq (%rax,%rcx,8), %rax addq $0x4, %rax movslq (%rax), %rax testq %rax, %rax js 0x5c275 movq 0x90(%rdi), %rcx shlq $0x4, %rax addq %rcx, %rax addq $0x8, %rax orl $0x4, 0x4(%rax) jmp 0x5c255 retq
mark_eval_captured_variables: mov rax, [rdi+0F8h] mov ecx, esi lea rax, [rax+rcx*8] add rax, 4 loc_5C255: movsxd rax, dword ptr [rax] test rax, rax js short locret_5C275 mov rcx, [rdi+90h] shl rax, 4 add rax, rcx add rax, 8 or dword ptr [rax+4], 4 jmp short loc_5C255 locret_5C275: retn
long long mark_eval_captured_variables(long long a1, unsigned int a2) { int *i; // rax long long result; // rax for ( i = (int *)(*(_QWORD *)(a1 + 248) + 8LL * a2 + 4); ; i[1] |= 4u ) { result = *i; if ( result < 0 ) break; i = (int *)(*(_QWORD *)(a1 + 144) + 16 * result + 8); } return result; }
mark_eval_captured_variables: MOV RAX,qword ptr [RDI + 0xf8] MOV ECX,ESI LEA RAX,[RAX + RCX*0x8] ADD RAX,0x4 LAB_0015c255: MOVSXD RAX,dword ptr [RAX] TEST RAX,RAX JS 0x0015c275 MOV RCX,qword ptr [RDI + 0x90] SHL RAX,0x4 ADD RAX,RCX ADD RAX,0x8 OR dword ptr [RAX + 0x4],0x4 JMP 0x0015c255 LAB_0015c275: RET
void mark_eval_captured_variables(long param_1,uint param_2) { uint *puVar1; int *piVar2; long lVar3; piVar2 = (int *)(*(long *)(param_1 + 0xf8) + (ulong)param_2 * 8 + 4); while (-1 < (long)*piVar2) { lVar3 = (long)*piVar2 * 0x10 + *(long *)(param_1 + 0x90); puVar1 = (uint *)(lVar3 + 0xc); *puVar1 = *puVar1 | 4; piVar2 = (int *)(lVar3 + 8); } return; }
8,672
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>::push_back(std::pair<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>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O2
cpp
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>::push_back(std::pair<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>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x87f0d movb $0x1, (%r14) callq 0x3cbd4 movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3cadc jmp 0x87f12 cmpl $0x1, %eax jne 0x87f26 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x8809c pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x425be leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2be82(%rip), %rsi # 0xb3dca leaq 0x10(%rsp), %rdi callq 0x6272b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x42472 xorl %ebp, %ebp leaq 0x71fd5(%rip), %rsi # 0xf9f48 leaq -0x48e2c(%rip), %rdx # 0x3f14e movq %rbx, %rdi callq 0x23e90 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x87f99 jmp 0x87fa1 movq %rax, %r14 movq %rbx, %rdi callq 0x23660 movq %r14, %rdi callq 0x23f10 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_87F0D mov byte ptr [r14], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; 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>::create<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>>>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 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) jmp short loc_87F12 loc_87F0D: cmp eax, 1 jnz short loc_87F26 loc_87F12: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; 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>>>>::insert(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>> const&) loc_87F26: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; 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>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_87F99 jmp short loc_87FA1 mov r14, rax loc_87F99: mov rdi, rbx; void * call ___cxa_free_exception loc_87FA1: mov rdi, r14 call __Unwind_Resume
long long 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>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = 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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; *(_QWORD *)(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>::create<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>>>>>(); 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); } return 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>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x00187f0d MOV byte ptr [R14],0x1 CALL 0x0013cbd4 MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013cadc JMP 0x00187f12 LAB_00187f0d: CMP EAX,0x1 JNZ 0x00187f26 LAB_00187f12: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0018809c LAB_00187f26: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x001425be LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00187f41: LEA RSI,[0x1b3dca] LEA RDI,[RSP + 0x10] CALL 0x0016272b MOV BPL,0x1 LAB_00187f55: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00142472 XOR EBP,EBP LEA RSI,[0x1f9f48] LEA RDX,[0x13f14e] MOV RDI,RBX CALL 0x00123e90
/* 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>::push_back(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> > const&) */ void __thiscall 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> ::push_back(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,pair *param_1) { ordered_map *poVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (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> )0x0) { *this = (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> )0x1; poVar1 = create<nlohmann::json_abi_v3_11_3::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>>>>> (); *(ordered_map **)(this + 8) = poVar1; assert_invariant(SUB81(this,0)); } else if (*this != (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> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00187f41 to 00187f51 has its CatchHandler @ 00187f96 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 00187f55 to 00187f81 has its CatchHandler @ 00187f82 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>>> ::insert(*(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>>>> **)(this + 8),param_1); return; }
8,673
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>::push_back(std::pair<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>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O3
cpp
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>::push_back(std::pair<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>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0xb797a movb $0x1, (%r14) movl $0x20, %edi callq 0x1a870 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x579d6 jmp 0xb797f cmpl $0x1, %eax jne 0xb7993 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0xb7b94 movl $0x20, %edi callq 0x1a430 movq %rax, %rbx movq %r14, %rdi callq 0x5df1e leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x38423(%rip), %rsi # 0xefdda leaq 0x10(%rsp), %rdi callq 0x85ac7 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x5dcc6 xorl %ebp, %ebp leaq 0x70566(%rip), %rsi # 0x127f48 leaq -0x5d895(%rip), %rdx # 0x5a154 movq %rbx, %rdi callq 0x1aea0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb7a0f movq 0x20(%rsp), %rsi incq %rsi callq 0x1a890 testb %bpl, %bpl jne 0xb7a19 jmp 0xb7a21 movq %rax, %r14 movq %rbx, %rdi callq 0x1a640 movq %r14, %rdi callq 0x1af20 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_B797A mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 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) jmp short loc_B797F loc_B797A: cmp eax, 1 jnz short loc_B7993 loc_B797F: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; 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>>>>::insert(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>> const&) loc_B7993: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; 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>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B7A0F mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B7A0F: test bpl, bpl jnz short loc_B7A19 jmp short loc_B7A21 mov r14, rax loc_B7A19: mov rdi, rbx; void * call ___cxa_free_exception loc_B7A21: mov rdi, r14 call __Unwind_Resume
long long 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>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = 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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; 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); } return 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>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x001b797a MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x0011a870 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x001579d6 JMP 0x001b797f LAB_001b797a: CMP EAX,0x1 JNZ 0x001b7993 LAB_001b797f: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001b7b94 LAB_001b7993: MOV EDI,0x20 CALL 0x0011a430 MOV RBX,RAX MOV RDI,R14 CALL 0x0015df1e LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b79b0: LEA RSI,[0x1efdda] LEA RDI,[RSP + 0x10] CALL 0x00185ac7 MOV BPL,0x1 LAB_001b79c4: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0015dcc6 XOR EBP,EBP LEA RSI,[0x227f48] LEA RDX,[0x15a154] MOV RDI,RBX CALL 0x0011aea0
/* 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>::push_back(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> > const&) */ void __thiscall 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> ::push_back(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,pair *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (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> )0x0) { *this = (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> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else if (*this != (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> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001b79b0 to 001b79c0 has its CatchHandler @ 001b7a16 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 001b79c4 to 001b79f0 has its CatchHandler @ 001b79f1 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>>> ::insert(*(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>>>> **)(this + 8),param_1); return; }
8,674
add_directory
eloqsql/mysys/my_default.c
static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs) { char buf[FN_REFLEN]; size_t len; char *p; my_bool err __attribute__((unused)); len= normalize_dirname(buf, dir); if (!(p= strmake_root(alloc, buf, len))) return 1; /* Failure */ /* Should never fail if DEFAULT_DIRS_SIZE is correct size */ err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE); DBUG_ASSERT(err == FALSE); return 0; }
O3
c
add_directory: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdx, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq -0x220(%rbp), %r15 movq %r15, %rdi callq 0xbc227 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0xbe3ad testq %rax, %rax je 0xb38bf movl $0x8, %edx movq %rax, %rdi movq %rbx, %rsi callq 0xbd684 xorl %eax, %eax jmp 0xb38c4 movl $0x1, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0xb38e1 addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2b280 nop
add_directory: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 208h mov rbx, rdx mov r14, rdi mov rax, fs:28h mov [rbp+var_20], rax lea r15, [rbp+var_220] mov rdi, r15 call normalize_dirname mov rdi, r14 mov rsi, r15 mov rdx, rax call strmake_root test rax, rax jz short loc_B38BF mov edx, 8 mov rdi, rax mov rsi, rbx call array_append_string_unique xor eax, eax jmp short loc_B38C4 loc_B38BF: mov eax, 1 loc_B38C4: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_B38E1 add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_B38E1: call ___stack_chk_fail
long long add_directory(long long a1, long long a2, long long a3) { long long v4; // rax long long v5; // rax _BYTE v7[512]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v8; // [rsp+200h] [rbp-20h] v8 = __readfsqword(0x28u); v4 = normalize_dirname(v7); v5 = strmake_root(a1, v7, v4); if ( !v5 ) return 1LL; array_append_string_unique(v5, a3, 8LL); return 0LL; }
add_directory: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA R15,[RBP + -0x220] MOV RDI,R15 CALL 0x001bc227 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x001be3ad TEST RAX,RAX JZ 0x001b38bf MOV EDX,0x8 MOV RDI,RAX MOV RSI,RBX CALL 0x001bd684 XOR EAX,EAX JMP 0x001b38c4 LAB_001b38bf: MOV EAX,0x1 LAB_001b38c4: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x001b38e1 ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_001b38e1: CALL 0x0012b280
bool add_directory(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; long in_FS_OFFSET; int1 local_228 [512]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = normalize_dirname(local_228); lVar2 = strmake_root(param_1,local_228,uVar1); if (lVar2 != 0) { array_append_string_unique(lVar2,param_3,8); } if (*(long *)(in_FS_OFFSET + 0x28) != local_28) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar2 == 0; }
8,675
my_xml_enter
eloqsql/strings/xml.c
static int my_xml_enter(MY_XML_PARSER *st, const char *str, size_t len) { if (my_xml_attr_ensure_space(st, len + 1 /* the separator char */)) return MY_XML_ERROR; if (st->attr.end > st->attr.start) { st->attr.end[0]= '/'; st->attr.end++; } memcpy(st->attr.end, str, len); st->attr.end+= len; st->attr.end[0]= '\0'; if (st->flags & MY_XML_FLAG_RELATIVE_NAMES) return st->enter ? st->enter(st, str, len) : MY_XML_OK; else return st->enter ? st->enter(st, st->attr.start, st->attr.end - st->attr.start) : MY_XML_OK; }
O0
c
my_xml_enter: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x1, %rsi callq 0xcc050 cmpl $0x0, %eax je 0xcbb86 movl $0x1, -0x4(%rbp) jmp 0xcbc9c movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x118(%rcx), %rax jbe 0xcbbc2 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x2f, (%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x370c0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x120(%rax), %rcx movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xcbc47 movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0xcbc38 movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movl %eax, -0x24(%rbp) jmp 0xcbc3f xorl %eax, %eax movl %eax, -0x24(%rbp) jmp 0xcbc3f movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xcbc9c movq -0x10(%rbp), %rax cmpq $0x0, 0x148(%rax) je 0xcbc8f movq -0x10(%rbp), %rax movq 0x148(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x120(%rcx), %rdx movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rcx subq %rcx, %rdx callq *%rax movl %eax, -0x28(%rbp) jmp 0xcbc96 xorl %eax, %eax movl %eax, -0x28(%rbp) jmp 0xcbc96 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_xml_enter: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, 1 call my_xml_attr_ensure_space cmp eax, 0 jz short loc_CBB86 mov [rbp+var_4], 1 jmp loc_CBC9C loc_CBB86: mov rax, [rbp+var_10] mov rax, [rax+120h] mov rcx, [rbp+var_10] cmp rax, [rcx+118h] jbe short loc_CBBC2 mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_10] mov rcx, [rax+120h] add rcx, 1 mov [rax+120h], rcx loc_CBBC2: mov rax, [rbp+var_10] mov rdi, [rax+120h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax+120h] mov [rax+120h], rcx mov rax, [rbp+var_10] mov rax, [rax+120h] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_CBC47 mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_CBC38 mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_24], eax jmp short loc_CBC3F loc_CBC38: xor eax, eax mov [rbp+var_24], eax jmp short $+2 loc_CBC3F: mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_CBC9C loc_CBC47: mov rax, [rbp+var_10] cmp qword ptr [rax+148h], 0 jz short loc_CBC8F mov rax, [rbp+var_10] mov rax, [rax+148h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+118h] mov rcx, [rbp+var_10] mov rdx, [rcx+120h] mov rcx, [rbp+var_10] mov rcx, [rcx+118h] sub rdx, rcx call rax mov [rbp+var_28], eax jmp short loc_CBC96 loc_CBC8F: xor eax, eax mov [rbp+var_28], eax jmp short $+2 loc_CBC96: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_CBC9C: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_xml_enter(long long a1, long long a2, long long a3) { if ( (unsigned int)my_xml_attr_ensure_space(a1, a3 + 1) ) { return 1; } else { if ( *(_QWORD *)(a1 + 288) > *(_QWORD *)(a1 + 280) ) *(_BYTE *)(*(_QWORD *)(a1 + 288))++ = 47; memcpy(*(_QWORD *)(a1 + 288), a2, a3); *(_QWORD *)(a1 + 288) += a3; **(_BYTE **)(a1 + 288) = 0; if ( (*(_DWORD *)a1 & 1) != 0 ) { if ( *(_QWORD *)(a1 + 328) ) return (unsigned int)(*(long long ( **)(long long, long long, long long))(a1 + 328))(a1, a2, a3); else return 0; } else if ( *(_QWORD *)(a1 + 328) ) { return (unsigned int)(*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 328))( a1, *(_QWORD *)(a1 + 280), *(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280)); } else { return 0; } } }
my_xml_enter: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 RSI,qword ptr [RBP + -0x20] ADD RSI,0x1 CALL 0x001cc050 CMP EAX,0x0 JZ 0x001cbb86 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001cbc9c LAB_001cbb86: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x118] JBE 0x001cbbc2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x120] ADD RCX,0x1 MOV qword ptr [RAX + 0x120],RCX LAB_001cbbc2: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x120] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001370c0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x120] MOV qword ptr [RAX + 0x120],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x001cbc47 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x001cbc38 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x24],EAX JMP 0x001cbc3f LAB_001cbc38: XOR EAX,EAX MOV dword ptr [RBP + -0x24],EAX JMP 0x001cbc3f LAB_001cbc3f: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x001cbc9c LAB_001cbc47: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x148],0x0 JZ 0x001cbc8f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x148] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x118] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x118] SUB RDX,RCX CALL RAX MOV dword ptr [RBP + -0x28],EAX JMP 0x001cbc96 LAB_001cbc8f: XOR EAX,EAX MOV dword ptr [RBP + -0x28],EAX JMP 0x001cbc96 LAB_001cbc96: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_001cbc9c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_xml_enter(uint *param_1,void *param_2,size_t param_3) { int iVar1; int4 local_30; int4 local_2c; int4 local_c; iVar1 = my_xml_attr_ensure_space(param_1,param_3 + 1); if (iVar1 == 0) { if (*(ulong *)(param_1 + 0x46) < *(ulong *)(param_1 + 0x48)) { **(int1 **)(param_1 + 0x48) = 0x2f; *(long *)(param_1 + 0x48) = *(long *)(param_1 + 0x48) + 1; } memcpy(*(void **)(param_1 + 0x48),param_2,param_3); *(size_t *)(param_1 + 0x48) = param_3 + *(long *)(param_1 + 0x48); **(int1 **)(param_1 + 0x48) = 0; if ((*param_1 & 1) == 0) { if (*(long *)(param_1 + 0x52) == 0) { local_30 = 0; } else { local_30 = (**(code **)(param_1 + 0x52)) (param_1,*(int8 *)(param_1 + 0x46), *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46)); } local_c = local_30; } else { if (*(long *)(param_1 + 0x52) == 0) { local_2c = 0; } else { local_2c = (**(code **)(param_1 + 0x52))(param_1,param_2,param_3); } local_c = local_2c; } } else { local_c = 1; } return local_c; }
8,676
ssz_add_dynamic_list_bytes
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_dynamic_list_bytes(ssz_builder_t* buffer, int num_elements, bytes_t data) { const ssz_def_t* child_def = buffer->def->def.vector.type; if (ssz_is_dynamic(child_def)) { uint32_t offset = 4 * num_elements + buffer->dynamic.data.len; ssz_add_uint32(buffer, offset); buffer_append(&buffer->dynamic, data); } else buffer_append(&buffer->fixed, data); }
O0
c
ssz_add_dynamic_list_bytes: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edx, -0x10(%rbp) movq %rcx, -0x8(%rbp) movq %rdi, -0x18(%rbp) movl %esi, -0x1c(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi callq 0x9f620 testb $0x1, %al jne 0xa3854 jmp 0xa3886 movl -0x1c(%rbp), %eax shll $0x2, %eax movq -0x18(%rbp), %rcx addl 0x20(%rcx), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi callq 0xa38a0 movq -0x18(%rbp), %rdi addq $0x20, %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rdx callq 0x9e080 jmp 0xa389a movq -0x18(%rbp), %rdi addq $0x8, %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rdx callq 0x9e080 addq $0x30, %rsp popq %rbp retq
ssz_add_dynamic_list_bytes: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], edx mov [rbp+var_8], rcx mov [rbp+var_18], rdi mov [rbp+var_1C], esi mov rax, [rbp+var_18] mov rax, [rax] mov rax, [rax+10h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] call ssz_is_dynamic test al, 1 jnz short loc_A3854 jmp short loc_A3886 loc_A3854: mov eax, [rbp+var_1C] shl eax, 2 mov rcx, [rbp+var_18] add eax, [rcx+20h] mov [rbp+var_2C], eax mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] call ssz_add_uint32 mov rdi, [rbp+var_18] add rdi, 20h ; ' ' mov esi, [rbp+var_10] mov rdx, [rbp+var_8] call buffer_append jmp short loc_A389A loc_A3886: mov rdi, [rbp+var_18] add rdi, 8 mov esi, [rbp+var_10] mov rdx, [rbp+var_8] call buffer_append loc_A389A: add rsp, 30h pop rbp retn
long long ssz_add_dynamic_list_bytes(unsigned int *a1, int a2, unsigned int a3, long long a4) { if ( (ssz_is_dynamic(*(_QWORD *)(*(_QWORD *)a1 + 16LL)) & 1) == 0 ) return buffer_append(a1 + 2, a3, a4); ssz_add_uint32(a1, a1[8] + 4 * a2); return buffer_append(a1 + 8, a3, a4); }
ssz_add_dynamic_list_bytes: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x10],EDX MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x18],RDI MOV dword ptr [RBP + -0x1c],ESI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x0019f620 TEST AL,0x1 JNZ 0x001a3854 JMP 0x001a3886 LAB_001a3854: MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x2 MOV RCX,qword ptr [RBP + -0x18] ADD EAX,dword ptr [RCX + 0x20] MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] CALL 0x001a38a0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x20 MOV ESI,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] CALL 0x0019e080 JMP 0x001a389a LAB_001a3886: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 MOV ESI,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] CALL 0x0019e080 LAB_001a389a: ADD RSP,0x30 POP RBP RET
void ssz_add_dynamic_list_bytes(long *param_1,int param_2,int4 param_3,int8 param_4) { ulong uVar1; uVar1 = ssz_is_dynamic(*(int8 *)(*param_1 + 0x10)); if ((uVar1 & 1) == 0) { buffer_append(param_1 + 1,param_3,param_4); } else { ssz_add_uint32(param_1,param_2 * 4 + (int)param_1[4]); buffer_append(param_1 + 4,param_3,param_4); } return; }
8,677
ssz_add_dynamic_list_bytes
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_dynamic_list_bytes(ssz_builder_t* buffer, int num_elements, bytes_t data) { const ssz_def_t* child_def = buffer->def->def.vector.type; if (ssz_is_dynamic(child_def)) { uint32_t offset = 4 * num_elements + buffer->dynamic.data.len; ssz_add_uint32(buffer, offset); buffer_append(&buffer->dynamic, data); } else buffer_append(&buffer->fixed, data); }
O2
c
ssz_add_dynamic_list_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movl %edx, %ebp movl %esi, %r15d movq %rdi, %r14 movq (%rdi), %rax movq 0x10(%rax), %rdi callq 0x4bbf0 testb %al, %al je 0x4e208 shll $0x2, %r15d leaq 0x20(%r14), %r12 addl 0x20(%r14), %r15d movq %r14, %rdi movl %r15d, %esi callq 0x4e224 jmp 0x4e20f addq $0x8, %r14 movq %r14, %r12 movq %r12, %rdi movl %ebp, %esi movq %rbx, %rdx popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x4b08b
ssz_add_dynamic_list_bytes: push rbp push r15 push r14 push r12 push rbx mov rbx, rcx mov ebp, edx mov r15d, esi mov r14, rdi mov rax, [rdi] mov rdi, [rax+10h] call ssz_is_dynamic test al, al jz short loc_4E208 shl r15d, 2 lea r12, [r14+20h] add r15d, [r14+20h] mov rdi, r14 mov esi, r15d call ssz_add_uint32 jmp short loc_4E20F loc_4E208: add r14, 8 mov r12, r14 loc_4E20F: mov rdi, r12 mov esi, ebp mov rdx, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp buffer_append
long long ssz_add_dynamic_list_bytes(unsigned int *a1, int a2, unsigned int a3, long long a4) { unsigned int *v6; // r12 if ( (unsigned __int8)ssz_is_dynamic(*(_QWORD *)(*(_QWORD *)a1 + 16LL)) ) { v6 = a1 + 8; ssz_add_uint32(a1, a1[8] + 4 * a2); } else { v6 = a1 + 2; } return buffer_append(v6, a3, a4); }
ssz_add_dynamic_list_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV EBP,EDX MOV R15D,ESI MOV R14,RDI MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0014bbf0 TEST AL,AL JZ 0x0014e208 SHL R15D,0x2 LEA R12,[R14 + 0x20] ADD R15D,dword ptr [R14 + 0x20] MOV RDI,R14 MOV ESI,R15D CALL 0x0014e224 JMP 0x0014e20f LAB_0014e208: ADD R14,0x8 MOV R12,R14 LAB_0014e20f: MOV RDI,R12 MOV ESI,EBP MOV RDX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0014b08b
void ssz_add_dynamic_list_bytes(long *param_1,int param_2,int4 param_3,int8 param_4) { char cVar1; long *plVar2; cVar1 = ssz_is_dynamic(*(int8 *)(*param_1 + 0x10)); if (cVar1 == '\0') { plVar2 = param_1 + 1; } else { plVar2 = param_1 + 4; ssz_add_uint32(param_1,param_2 * 4 + (int)param_1[4]); } buffer_append(plVar2,param_3,param_4); return; }
8,678
ssz_add_dynamic_list_bytes
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_dynamic_list_bytes(ssz_builder_t* buffer, int num_elements, bytes_t data) { const ssz_def_t* child_def = buffer->def->def.vector.type; if (ssz_is_dynamic(child_def)) { uint32_t offset = 4 * num_elements + buffer->dynamic.data.len; ssz_add_uint32(buffer, offset); buffer_append(&buffer->dynamic, data); } else buffer_append(&buffer->fixed, data); }
O3
c
ssz_add_dynamic_list_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %rbx movl %edx, %ebp movl %esi, %r15d movq %rdi, %r14 movq (%rdi), %rax movq 0x10(%rax), %rdi callq 0x53cc0 testb %al, %al je 0x56366 shll $0x2, %r15d addl 0x20(%r14), %r15d leaq 0x20(%r14), %r12 leaq 0xc(%rsp), %rdx movl %r15d, (%rdx) addq $0x8, %r14 movq %r14, %rdi movl $0x4, %esi callq 0x53029 movq %r12, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x53029 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq addq $0x8, %r14 movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x53029
ssz_add_dynamic_list_bytes: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rcx mov ebp, edx mov r15d, esi mov r14, rdi mov rax, [rdi] mov rdi, [rax+10h] call ssz_is_dynamic test al, al jz short loc_56366 shl r15d, 2 add r15d, [r14+20h] lea r12, [r14+20h] lea rdx, [rsp+38h+var_2C] mov [rdx], r15d add r14, 8 mov rdi, r14 mov esi, 4 call buffer_append mov rdi, r12 mov esi, ebp mov rdx, rbx call buffer_append add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_56366: add r14, 8 mov rdi, r14 mov esi, ebp mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp jmp buffer_append
long long ssz_add_dynamic_list_bytes(unsigned int *a1, int a2, unsigned int a3, long long a4) { int v7[11]; // [rsp+Ch] [rbp-2Ch] BYREF if ( !(unsigned __int8)ssz_is_dynamic(*(_QWORD *)(*(_QWORD *)a1 + 16LL)) ) return buffer_append(a1 + 2, a3, a4); v7[0] = a1[8] + 4 * a2; buffer_append(a1 + 2, 4u, (long long)v7); return buffer_append(a1 + 8, a3, a4); }
ssz_add_dynamic_list_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RCX MOV EBP,EDX MOV R15D,ESI MOV R14,RDI MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00153cc0 TEST AL,AL JZ 0x00156366 SHL R15D,0x2 ADD R15D,dword ptr [R14 + 0x20] LEA R12,[R14 + 0x20] LEA RDX,[RSP + 0xc] MOV dword ptr [RDX],R15D ADD R14,0x8 MOV RDI,R14 MOV ESI,0x4 CALL 0x00153029 MOV RDI,R12 MOV ESI,EBP MOV RDX,RBX CALL 0x00153029 ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00156366: ADD R14,0x8 MOV RDI,R14 MOV ESI,EBP MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00153029
void ssz_add_dynamic_list_bytes (long *param_1,int8 param_2,int4 param_3,int8 param_4) { char cVar1; cVar1 = ssz_is_dynamic(*(int8 *)(*param_1 + 0x10)); if (cVar1 != '\0') { buffer_append(param_1 + 1,4); buffer_append(param_1 + 4,param_3,param_4); return; } buffer_append(param_1 + 1,param_3,param_4); return; }
8,679
google::protobuf::internal::ThreadSafeArena::Init()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc
void ThreadSafeArena::Init() { #ifndef NDEBUG const bool was_message_owned = IsMessageOwned(); #endif // NDEBUG ThreadCache& tc = thread_cache(); auto id = tc.next_lifecycle_id; // We increment lifecycle_id's by multiples of two so we can use bit 0 as // a tag. constexpr uint64_t kDelta = 2; constexpr uint64_t kInc = ThreadCache::kPerThreadIds * kDelta; if (PROTOBUF_PREDICT_FALSE((id & (kInc - 1)) == 0)) { constexpr auto relaxed = std::memory_order_relaxed; // On platforms that don't support uint64_t atomics we can certainly not // afford to increment by large intervals and expect uniqueness due to // wrapping, hence we only add by 1. id = lifecycle_id_generator_.id.fetch_add(1, relaxed) * kInc; } tc.next_lifecycle_id = id + kDelta; // Message ownership is stored in tag_and_id_, and is set in the constructor. // This flag bit must be preserved, even across calls to Reset(). tag_and_id_ = id | (tag_and_id_ & kMessageOwnedArena); hint_.store(nullptr, std::memory_order_relaxed); threads_.store(nullptr, std::memory_order_relaxed); #ifndef NDEBUG GOOGLE_CHECK_EQ(was_message_owned, IsMessageOwned()); #endif // NDEBUG arena_stats_ = Sample(); }
O0
cpp
google::protobuf::internal::ThreadSafeArena::Init(): subq $0x78, %rsp movq %rdi, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x18(%rsp) callq 0x181e00 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq (%rax), %rax movq %rax, 0x38(%rsp) movq $0x2, 0x30(%rsp) movq $0x200, 0x28(%rsp) # imm = 0x200 movq 0x38(%rsp), %rax andq $0x1ff, %rax # imm = 0x1FF cmpq $0x0, %rax jne 0x1800eb movl $0x0, 0x24(%rsp) leaq 0xfd480(%rip), %rax # 0x27d4a0 movq %rax, 0x70(%rsp) movq $0x1, 0x68(%rsp) movl $0x0, 0x64(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x64(%rsp), %eax movq 0x68(%rsp), %rcx movq %rcx, 0x58(%rsp) decl %eax movl %eax, %ecx movq %rcx, 0x10(%rsp) subl $0x4, %eax ja 0x180071 movq 0x10(%rsp), %rax leaq 0x76770(%rip), %rcx # 0x1f67d8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax lock xaddq %rax, (%rcx) movq %rax, 0x50(%rsp) jmp 0x1800dd movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax lock xaddq %rax, (%rcx) movq %rax, 0x50(%rsp) jmp 0x1800dd movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax lock xaddq %rax, (%rcx) movq %rax, 0x50(%rsp) jmp 0x1800dd movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax lock xaddq %rax, (%rcx) movq %rax, 0x50(%rsp) jmp 0x1800dd movq 0x8(%rsp), %rcx movq 0x58(%rsp), %rax lock xaddq %rax, (%rcx) movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax shlq $0x9, %rax movq %rax, 0x38(%rsp) movq 0x18(%rsp), %rdi movq 0x38(%rsp), %rcx addq $0x2, %rcx movq 0x40(%rsp), %rax movq %rcx, (%rax) movq 0x38(%rsp), %rax movq (%rdi), %rcx andq $0x1, %rcx orq %rcx, %rax movq %rax, (%rdi) addq $0x18, %rdi xorl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0x181e20 movq 0x18(%rsp), %rdi addq $0x10, %rdi xorl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0x181e20 callq 0x181ec0 addq $0x78, %rsp retq
_ZN6google8protobuf8internal15ThreadSafeArena4InitEv: sub rsp, 78h mov [rsp+78h+var_30], rdi mov rax, [rsp+78h+var_30] mov [rsp+78h+var_60], rax call _ZN6google8protobuf8internal15ThreadSafeArena12thread_cacheEv; google::protobuf::internal::ThreadSafeArena::thread_cache(void) mov [rsp+78h+var_38], rax mov rax, [rsp+78h+var_38] mov rax, [rax] mov [rsp+78h+var_40], rax mov [rsp+78h+var_48], 2 mov [rsp+78h+var_50], 200h mov rax, [rsp+78h+var_40] and rax, 1FFh cmp rax, 0 jnz loc_1800EB mov [rsp+78h+var_54], 0 lea rax, _ZN6google8protobuf8internal15ThreadSafeArena23lifecycle_id_generator_E; google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_ mov [rsp+78h+var_8], rax mov [rsp+78h+var_10], 1 mov [rsp+78h+var_14], 0 mov rax, [rsp+78h+var_8] mov [rsp+78h+var_70], rax mov eax, [rsp+78h+var_14] mov rcx, [rsp+78h+var_10] mov [rsp+78h+var_20], rcx dec eax; switch 5 cases mov ecx, eax mov [rsp+78h+var_68], rcx sub eax, 4 ja short def_18006F; jumptable 000000000018006F default case mov rax, [rsp+78h+var_68] lea rcx, jpt_18006F movsxd rax, ds:(jpt_18006F - 1F67D8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_18006F: mov rcx, [rsp+78h+var_70]; jumptable 000000000018006F default case mov rax, [rsp+78h+var_20] lock xadd [rcx], rax mov [rsp+78h+var_28], rax jmp short loc_1800DD loc_180087: mov rcx, [rsp+78h+var_70]; jumptable 000000000018006F cases 1,2 mov rax, [rsp+78h+var_20] lock xadd [rcx], rax mov [rsp+78h+var_28], rax jmp short loc_1800DD loc_18009D: mov rcx, [rsp+78h+var_70]; jumptable 000000000018006F case 3 mov rax, [rsp+78h+var_20] lock xadd [rcx], rax mov [rsp+78h+var_28], rax jmp short loc_1800DD loc_1800B3: mov rcx, [rsp+78h+var_70]; jumptable 000000000018006F case 4 mov rax, [rsp+78h+var_20] lock xadd [rcx], rax mov [rsp+78h+var_28], rax jmp short loc_1800DD loc_1800C9: mov rcx, [rsp+78h+var_70]; jumptable 000000000018006F case 5 mov rax, [rsp+78h+var_20] lock xadd [rcx], rax mov [rsp+78h+var_28], rax loc_1800DD: mov rax, [rsp+78h+var_28] shl rax, 9 mov [rsp+78h+var_40], rax loc_1800EB: mov rdi, [rsp+78h+var_60] mov rcx, [rsp+78h+var_40] add rcx, 2 mov rax, [rsp+78h+var_38] mov [rax], rcx mov rax, [rsp+78h+var_40] mov rcx, [rdi] and rcx, 1 or rax, rcx mov [rdi], rax add rdi, 18h xor eax, eax mov esi, eax xor edx, edx call _ZNSt6atomicIPN6google8protobuf8internal11SerialArenaEE5storeES4_St12memory_order; std::atomic<google::protobuf::internal::SerialArena *>::store(google::protobuf::internal::SerialArena *,std::memory_order) mov rdi, [rsp+78h+var_60] add rdi, 10h; this xor eax, eax mov esi, eax xor edx, edx call _ZNSt6atomicIPN6google8protobuf8internal11SerialArenaEE5storeES4_St12memory_order; std::atomic<google::protobuf::internal::SerialArena *>::store(google::protobuf::internal::SerialArena *,std::memory_order) call _ZN6google8protobuf8internal6SampleEv; google::protobuf::internal::Sample(void) add rsp, 78h retn
long long google::protobuf::internal::ThreadSafeArena::Init(google::protobuf::internal::ThreadSafeArena *this) { signed long long v2; // [rsp+38h] [rbp-40h] signed long long *v3; // [rsp+40h] [rbp-38h] v3 = (signed long long *)google::protobuf::internal::ThreadSafeArena::thread_cache(this); v2 = *v3; if ( (*v3 & 0x1FF) == 0 ) v2 = _InterlockedExchangeAdd64( (volatile signed long long *)&google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_, 1uLL) << 9; *v3 = v2 + 2; *(_QWORD *)this = *(_QWORD *)this & 1LL | v2; std::atomic<google::protobuf::internal::SerialArena *>::store((char *)this + 24, 0LL, 0LL); std::atomic<google::protobuf::internal::SerialArena *>::store((char *)this + 16, 0LL, 0LL); return google::protobuf::internal::Sample((google::protobuf::internal::ThreadSafeArena *)((char *)this + 16)); }
8,680
google::protobuf::internal::ThreadSafeArena::Init()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc
void ThreadSafeArena::Init() { #ifndef NDEBUG const bool was_message_owned = IsMessageOwned(); #endif // NDEBUG ThreadCache& tc = thread_cache(); auto id = tc.next_lifecycle_id; // We increment lifecycle_id's by multiples of two so we can use bit 0 as // a tag. constexpr uint64_t kDelta = 2; constexpr uint64_t kInc = ThreadCache::kPerThreadIds * kDelta; if (PROTOBUF_PREDICT_FALSE((id & (kInc - 1)) == 0)) { constexpr auto relaxed = std::memory_order_relaxed; // On platforms that don't support uint64_t atomics we can certainly not // afford to increment by large intervals and expect uniqueness due to // wrapping, hence we only add by 1. id = lifecycle_id_generator_.id.fetch_add(1, relaxed) * kInc; } tc.next_lifecycle_id = id + kDelta; // Message ownership is stored in tag_and_id_, and is set in the constructor. // This flag bit must be preserved, even across calls to Reset(). tag_and_id_ = id | (tag_and_id_ & kMessageOwnedArena); hint_.store(nullptr, std::memory_order_relaxed); threads_.store(nullptr, std::memory_order_relaxed); #ifndef NDEBUG GOOGLE_CHECK_EQ(was_message_owned, IsMessageOwned()); #endif // NDEBUG arena_stats_ = Sample(); }
O3
cpp
google::protobuf::internal::ThreadSafeArena::Init(): pushq %rbx movq %rdi, %rbx movq %fs:0x0, %rax leaq -0x20(%rax), %rcx movq (%rcx), %rax testl $0x1ff, %eax # imm = 0x1FF je 0x9250e leaq 0x2(%rax), %rdx movq %rdx, (%rcx) movq (%rbx), %rcx andl $0x1, %ecx orq %rax, %rcx movq %rcx, (%rbx) movq $0x0, 0x18(%rbx) movq $0x0, 0x10(%rbx) popq %rbx retq movl $0x1, %eax lock xaddq %rax, 0x70cd4(%rip) # 0x1031f0 shlq $0x9, %rax jmp 0x924e9
_ZN6google8protobuf8internal15ThreadSafeArena4InitEv: push rbx mov rbx, rdi mov rax, fs:0 lea rcx, [rax-20h] mov rax, [rcx] test eax, 1FFh jz short loc_9250E loc_924E9: lea rdx, [rax+2] mov [rcx], rdx mov rcx, [rbx] and ecx, 1 or rcx, rax mov [rbx], rcx mov qword ptr [rbx+18h], 0 mov qword ptr [rbx+10h], 0 pop rbx retn loc_9250E: mov eax, 1 lock xadd cs:_ZN6google8protobuf8internal15ThreadSafeArena23lifecycle_id_generator_E, rax; google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_ shl rax, 9 jmp short loc_924E9
long long google::protobuf::internal::ThreadSafeArena::Init(google::protobuf::internal::ThreadSafeArena *this) { long long *v1; // rcx long long result; // rax v1 = (long long *)(__readfsqword(0) - 32); result = *v1; if ( (*v1 & 0x1FF) == 0 ) result = _InterlockedExchangeAdd64(&google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_, 1uLL) << 9; *v1 = result + 2; *(_QWORD *)this = result | *(_QWORD *)this & 1LL; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 2) = 0LL; return result; }
Init: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr FS:[0x0] LEA RCX,[RAX + -0x20] MOV RAX,qword ptr [RCX] TEST EAX,0x1ff JZ 0x0019250e LAB_001924e9: LEA RDX,[RAX + 0x2] MOV qword ptr [RCX],RDX MOV RCX,qword ptr [RBX] AND ECX,0x1 OR RCX,RAX MOV qword ptr [RBX],RCX MOV qword ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x10],0x0 POP RBX RET LAB_0019250e: MOV EAX,0x1 XADD.LOCK qword ptr [0x002031f0],RAX SHL RAX,0x9 JMP 0x001924e9
/* google::protobuf::internal::ThreadSafeArena::Init() */ void __thiscall google::protobuf::internal::ThreadSafeArena::Init(ThreadSafeArena *this) { ulong uVar1; long *in_FS_OFFSET; uVar1 = *(ulong *)(*in_FS_OFFSET + -0x20); if ((uVar1 & 0x1ff) == 0) { LOCK(); UNLOCK(); uVar1 = lifecycle_id_generator_ << 9; lifecycle_id_generator_ = lifecycle_id_generator_ + 1; } *(ulong *)(*in_FS_OFFSET + -0x20) = uVar1 + 2; *(ulong *)this = (uint)*(int8 *)this & 1 | uVar1; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x10) = 0; return; }
8,681
uf_zerofill_skip_zero
eloqsql/storage/maria/ma_packrec.c
static void uf_zerofill_skip_zero(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O0
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x4ac47 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4ac6b jmp 0x4ac87 movq -0x10(%rbp), %rdi callq 0x4ab70 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x4ac87 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 jmp 0x4accb movq -0x8(%rbp), %rax movl 0x24(%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x4aeb0 movq -0x20(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_zerofill_skip_zero: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_4AC47 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4AC6B jmp short loc_4AC87 loc_4AC47: mov rdi, [rbp+var_10] call fill_buffer mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_4AC87 loc_4AC6B: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx mov eax, eax mov edx, eax xor esi, esi call _memset jmp short loc_4ACCB loc_4AC87: mov rax, [rbp+var_8] mov ecx, [rax+24h] mov rax, [rbp+var_20] mov ecx, ecx mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes mov rdi, [rbp+var_20] mov rax, [rbp+var_8] mov eax, [rax+24h] mov edx, eax xor esi, esi call _memset loc_4ACCB: add rsp, 20h pop rbp retn
long long uf_zerofill_skip_zero(long long a1, int *a2, long long a3, long long a4) { int v4; // eax int v5; // ecx long long v8; // [rsp+0h] [rbp-20h] if ( a2[1] ) { v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 0LL, (unsigned int)(a4 - a3)); } fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); LABEL_6: v8 = a4 - *(unsigned int *)(a1 + 36); decode_bytes(a1, a2, a3, v8); return memset(v8, 0LL, *(unsigned int *)(a1 + 36)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP SUB RSP,0x20 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 RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0014ac47 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014ac6b JMP 0x0014ac87 LAB_0014ac47: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014ab70 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0014ac87 LAB_0014ac6b: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 JMP 0x0014accb LAB_0014ac87: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x24] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0014aeb0 MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x24] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 LAB_0014accb: ADD RSP,0x20 POP RBP RET
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x24)); decode_bytes(param_1,param_2,param_3,__s); memset(__s,0,(ulong)*(uint *)(param_1 + 0x24)); } else { memset(param_3,0,(ulong)(uint)((int)param_4 - (int)param_3)); } return; }
8,682
uf_zerofill_skip_zero
eloqsql/storage/maria/ma_packrec.c
static void uf_zerofill_skip_zero(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((char*) to,(uint) (end-to)); else { end-=rec->space_length_bits; decode_bytes(rec,bit_buff,to,end); bzero((char*) end,rec->space_length_bits); } }
O3
c
uf_zerofill_skip_zero: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x45ab4 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x45acc subl %r14d, %ebx movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx jmp 0x45aed movq %r12, %rdi callq 0x45a50 movl $0x1f, 0x4(%r12) cmpl $0x0, (%r12) js 0x45aa7 movl 0x24(%r15), %eax subq %rax, %rbx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x45c0d movl 0x24(%r15), %edx movq %rbx, %rdi xorl %esi, %esi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x2a290
uf_zerofill_skip_zero: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r12, rsi mov r15, rdi mov eax, [rsi+4] test eax, eax jz short loc_45AB4 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_45ACC loc_45AA7: sub ebx, r14d mov rdi, r14 xor esi, esi mov rdx, rbx jmp short loc_45AED loc_45AB4: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh cmp dword ptr [r12], 0 js short loc_45AA7 loc_45ACC: mov eax, [r15+24h] sub rbx, rax mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call decode_bytes mov edx, [r15+24h] mov rdi, rbx xor esi, esi loc_45AED: pop rbx pop r12 pop r14 pop r15 pop rbp jmp _memset
long long uf_zerofill_skip_zero(long long a1, int *a2, long long a3, long long a4) { int v6; // eax int v7; // ecx unsigned int v8; // eax long long v10; // rbx v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest(&v7, v8) ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } else { fill_buffer((long long)a2); a2[1] = 31; if ( *a2 < 0 ) return memset(a3, 0LL, (unsigned int)(a4 - a3)); } v10 = a4 - *(unsigned int *)(a1 + 36); decode_bytes(a1, a2, a3, v10); return memset(v10, 0LL, *(unsigned int *)(a1 + 36)); }
uf_zerofill_skip_zero: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00145ab4 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x00145acc LAB_00145aa7: SUB EBX,R14D MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX JMP 0x00145aed LAB_00145ab4: MOV RDI,R12 CALL 0x00145a50 MOV dword ptr [R12 + 0x4],0x1f CMP dword ptr [R12],0x0 JS 0x00145aa7 LAB_00145acc: MOV EAX,dword ptr [R15 + 0x24] SUB RBX,RAX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL 0x00145c0d MOV EDX,dword ptr [R15 + 0x24] MOV RDI,RBX XOR ESI,ESI LAB_00145aed: POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0012a290
void uf_zerofill_skip_zero(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; void *__s; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; if (-1 < (int)*param_2) goto LAB_00145acc; } else { uVar1 = param_2[1] - 1; param_2[1] = uVar1; if ((*param_2 >> (uVar1 & 0x1f) & 1) == 0) { LAB_00145acc: __s = (void *)(param_4 - (ulong)*(uint *)(param_1 + 0x24)); decode_bytes(param_1,param_2,param_3,__s); uVar1 = *(uint *)(param_1 + 0x24); goto LAB_00145aed; } } uVar1 = (int)param_4 - (int)param_3; __s = param_3; LAB_00145aed: memset(__s,0,(ulong)uVar1); return; }
8,683
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0xc4d8a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0xc4fa6 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0xc4db2 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0xc4fa6 cmpl $0xa1, -0x2c(%rbp) jl 0xc4e61 cmpl $0xfe, -0x2c(%rbp) jg 0xc4e61 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xc4de6 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xc4fa6 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x288920(%rip), %rax # 0x34d720 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xc4e1b movl $0x2, %eax movl %eax, -0x30(%rbp) jmp 0xc4e56 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x31(%rbp) jl 0xc4e43 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %dl movl $0xfffffffe, %eax # imm = 0xFFFFFFFE xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xc4fa6 cmpl $0x8e, -0x2c(%rbp) jne 0xc4ed1 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xc4e84 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xc4fa6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa1, %eax jl 0xc4ea2 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xdf, %eax jle 0xc4eae movl $0x0, -0x4(%rbp) jmp 0xc4fa6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl $0xfec0, %eax # imm = 0xFEC0 movslq %eax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0xc4fa6 cmpl $0x8f, -0x2c(%rbp) jne 0xc4f9f movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0xc4ef8 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0xc4fa6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x2a8809(%rip), %rax # 0x36d720 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xc4f32 movl $0x3, %eax movl %eax, -0x38(%rbp) jmp 0xc4f97 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0xc4f84 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x39(%rbp) jg 0xc4f84 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0xc4f84 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %dl movl $0xfffffffd, %eax # imm = 0xFFFFFFFD xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xc4fa6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_C4D8A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_C4FA6 loc_C4D8A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_C4DB2 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_C4FA6 loc_C4DB2: cmp [rbp+var_2C], 0A1h jl loc_C4E61 cmp [rbp+var_2C], 0FEh jg loc_C4E61 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_C4DE6 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_C4FA6 loc_C4DE6: mov eax, [rbp+var_2C] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax lea rax, jisx0208_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_C4E1B mov eax, 2 mov [rbp+var_30], eax jmp short loc_C4E56 loc_C4E1B: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_31], al jl short loc_C4E43 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh setnle al mov [rbp+var_31], al loc_C4E43: mov dl, [rbp+var_31] mov eax, 0FFFFFFFEh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_30], eax loc_C4E56: mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp loc_C4FA6 loc_C4E61: cmp [rbp+var_2C], 8Eh jnz short loc_C4ED1 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_C4E84 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_C4FA6 loc_C4E84: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A1h jl short loc_C4EA2 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0DFh jle short loc_C4EAE loc_C4EA2: mov [rbp+var_4], 0 jmp loc_C4FA6 loc_C4EAE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add eax, 0FEC0h movsxd rcx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_C4FA6 loc_C4ED1: cmp [rbp+var_2C], 8Fh jnz loc_C4F9F mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_C4EF8 mov [rbp+var_4], 0FFFFFF99h jmp loc_C4FA6 loc_C4EF8: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] add eax, ecx movsxd rcx, eax lea rax, jisx0212_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_C4F32 mov eax, 3 mov [rbp+var_38], eax jmp short loc_C4F97 loc_C4F32: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_C4F84 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0FEh mov [rbp+var_39], al jg short loc_C4F84 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_C4F84 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] cmp eax, 0FEh setnle al mov [rbp+var_39], al loc_C4F84: mov dl, [rbp+var_39] mov eax, 0FFFFFFFDh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_38], eax loc_C4F97: mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp short loc_C4FA6 loc_C4F9F: mov [rbp+var_4], 0 loc_C4FA6: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long v4; // rax unsigned int v5; // eax long long v6; // rax unsigned int v7; // eax bool v9; // [rsp+1h] [rbp-39h] bool v11; // [rsp+9h] [rbp-31h] unsigned int v13; // [rsp+Eh] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v13 = *a3; if ( v13 >= 0x80 ) { if ( *a3 < 0xA1u || *a3 == 255 ) { if ( v13 == 142 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu ) { *a2 = a3[1] + 65216; return 2; } else { return 0; } } else { return (unsigned int)-102; } } else if ( v13 == 143 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]]; *a2 = v6; if ( v6 ) { return 3; } else { v9 = 1; if ( a3[1] >= 0xA1u ) { v9 = 1; if ( a3[1] != 255 ) { v9 = 1; if ( a3[2] >= 0xA1u ) v9 = a3[2] == 255; } } v7 = -3; if ( v9 ) v7 = 0; return v7; } } else { return (unsigned int)-103; } } else { return 0; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)]; *a2 = v4; if ( v4 ) { return 2; } else { v11 = 1; if ( a3[1] >= 0xA1u ) v11 = a3[1] == 255; v5 = -2; if ( v11 ) v5 = 0; return v5; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001c4d8a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001c4fa6 LAB_001c4d8a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x001c4db2 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c4fa6 LAB_001c4db2: CMP dword ptr [RBP + -0x2c],0xa1 JL 0x001c4e61 CMP dword ptr [RBP + -0x2c],0xfe JG 0x001c4e61 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c4de6 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001c4fa6 LAB_001c4de6: MOV EAX,dword ptr [RBP + -0x2c] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x44d720] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001c4e1b MOV EAX,0x2 MOV dword ptr [RBP + -0x30],EAX JMP 0x001c4e56 LAB_001c4e1b: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x31],AL JL 0x001c4e43 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x31],AL LAB_001c4e43: MOV DL,byte ptr [RBP + -0x31] MOV EAX,0xfffffffe XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x30],EAX LAB_001c4e56: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX JMP 0x001c4fa6 LAB_001c4e61: CMP dword ptr [RBP + -0x2c],0x8e JNZ 0x001c4ed1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c4e84 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001c4fa6 LAB_001c4e84: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa1 JL 0x001c4ea2 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xdf JLE 0x001c4eae LAB_001c4ea2: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c4fa6 LAB_001c4eae: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EAX,0xfec0 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001c4fa6 LAB_001c4ed1: CMP dword ptr [RBP + -0x2c],0x8f JNZ 0x001c4f9f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001c4ef8 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001c4fa6 LAB_001c4ef8: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x46d720] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001c4f32 MOV EAX,0x3 MOV dword ptr [RBP + -0x38],EAX JMP 0x001c4f97 LAB_001c4f32: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x001c4f84 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xfe MOV byte ptr [RBP + -0x39],AL JG 0x001c4f84 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x001c4f84 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x39],AL LAB_001c4f84: MOV DL,byte ptr [RBP + -0x39] MOV EAX,0xfffffffd XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x38],EAX LAB_001c4f97: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x001c4fa6 LAB_001c4f9f: MOV dword ptr [RBP + -0x4],0x0 LAB_001c4fa6: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { ushort uVar1; bool bVar2; uint uVar3; int4 local_40; int4 local_38; int4 local_c; if (param_3 < param_4) { uVar3 = (uint)*param_3; if (uVar3 < 0x80) { *param_2 = (long)(int)uVar3; local_c = 1; } else if ((uVar3 < 0xa1) || (0xfe < uVar3)) { if (uVar3 == 0x8e) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) { local_c = 0; } else { *param_2 = (long)(int)(param_3[1] + 0xfec0); local_c = 2; } } else if (uVar3 == 0x8f) { if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { uVar1 = *(ushort *) (&jisx0212_eucjp_to_unicode + (long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) && (bVar2 = true, 0xa0 < param_3[2])) { bVar2 = 0xfe < param_3[2]; } local_40 = 0xfffffffd; if (bVar2) { local_40 = 0; } } else { local_40 = 3; } local_c = local_40; } } else { local_c = 0; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { uVar1 = *(ushort *) (jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (0xa0 < param_3[1]) { bVar2 = 0xfe < param_3[1]; } local_38 = 0xfffffffe; if (bVar2) { local_38 = 0; } } else { local_38 = 2; } local_c = local_38; } } else { local_c = 0xffffff9b; } return local_c; }
8,684
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x84c8f movzbl (%rdx), %edi testb %dil, %dil js 0x84c91 movq %rdi, (%rsi) movl $0x1, %eax popq %rbp retq leal 0x5f(%rdi), %eax cmpb $0x5d, %al ja 0x84cdd leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x84c8f movzbl 0x1(%rdx), %eax shll $0x9, %edi leal (%rdi,%rax,2), %eax leaq 0x20b6f9(%rip), %rcx # 0x2903b0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0x84c8f movb 0x1(%rdx), %al incb %al xorl %ecx, %ecx cmpb $-0x5e, %al setb %cl leal -0x2(,%rcx,2), %eax jmp 0x84c8f cmpq $0x8f, %rdi je 0x84d21 cmpl $0x8e, %edi jne 0x84d63 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x84c8f movzbl 0x1(%rdx), %ecx leal 0x20(%rcx), %edx movl $0x0, %eax cmpb $-0x3f, %dl jb 0x84c8f addq $0xfec0, %rcx # imm = 0xFEC0 movq %rcx, (%rsi) movl $0x2, %eax jmp 0x84c8f leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x84c8f movzwl 0x1(%rdx), %eax rolw $0x8, %ax movzwl %ax, %eax leaq 0x22b66b(%rip), %rcx # 0x2b03b0 movzwl (%rcx,%rax,2), %ecx movq %rcx, (%rsi) movl $0x3, %eax testq %rcx, %rcx jne 0x84c8f movb 0x1(%rdx), %al incb %al cmpb $-0x5e, %al jae 0x84d6a xorl %eax, %eax jmp 0x84c8f movb 0x2(%rdx), %cl movl $0x0, %eax cmpb $-0x5f, %cl jb 0x84c8f xorl %eax, %eax cmpb $-0x1, %cl sete %al leal (%rax,%rax,2), %eax addl $-0x3, %eax jmp 0x84c8f
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_84C8F movzx edi, byte ptr [rdx] test dil, dil js short loc_84C91 mov [rsi], rdi mov eax, 1 loc_84C8F: pop rbp retn loc_84C91: lea eax, [rdi+5Fh] cmp al, 5Dh ; ']' ja short loc_84CDD lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_84C8F movzx eax, byte ptr [rdx+1] shl edi, 9 lea eax, [rdi+rax*2] lea rcx, jisx0208_eucjp_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_84C8F mov al, [rdx+1] inc al xor ecx, ecx cmp al, 0A2h setb cl lea eax, ds:0FFFFFFFFFFFFFFFEh[rcx*2] jmp short loc_84C8F loc_84CDD: cmp rdi, 8Fh jz short loc_84D21 cmp edi, 8Eh jnz short loc_84D63 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_84C8F movzx ecx, byte ptr [rdx+1] lea edx, [rcx+20h] mov eax, 0 cmp dl, 0C1h jb short loc_84C8F add rcx, 0FEC0h mov [rsi], rcx mov eax, 2 jmp loc_84C8F loc_84D21: lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_84C8F movzx eax, word ptr [rdx+1] rol ax, 8 movzx eax, ax lea rcx, jisx0212_eucjp_to_unicode movzx ecx, word ptr [rcx+rax*2] mov [rsi], rcx mov eax, 3 test rcx, rcx jnz loc_84C8F mov al, [rdx+1] inc al cmp al, 0A2h jnb short loc_84D6A loc_84D63: xor eax, eax jmp loc_84C8F loc_84D6A: mov cl, [rdx+2] mov eax, 0 cmp cl, 0A1h jb loc_84C8F xor eax, eax cmp cl, 0FFh setz al lea eax, [rax+rax*2] add eax, 0FFFFFFFDh jmp loc_84C8F
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx long long v7; // rcx long long v8; // rcx unsigned __int8 v9; // cl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x5Du ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = jisx0208_eucjp_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) return 2 * (unsigned int)((unsigned __int8)(a3[1] + 1) < 0xA2u) - 2; } return result; } if ( v5 != 143 ) { if ( (_DWORD)v5 == 142 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v7 = a3[1]; result = 0LL; if ( (unsigned __int8)(v7 + 32) >= 0xC1u ) { *a2 = v7 + 65216; return 2LL; } } return result; } return 0LL; } result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v8 = jisx0212_eucjp_to_unicode[(unsigned __int16)__ROL2__(*(_WORD *)(a3 + 1), 8)]; *a2 = v8; result = 3LL; if ( v8 ) return result; if ( (unsigned __int8)(a3[1] + 1) < 0xA2u ) return 0LL; v9 = a3[2]; result = 0LL; if ( v9 >= 0xA1u ) return 3 * (unsigned int)(v9 == 0xFF) - 3; return result; }
my_mb_wc_euc_jp: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00184c8f MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x00184c91 MOV qword ptr [RSI],RDI MOV EAX,0x1 LAB_00184c8f: POP RBP RET LAB_00184c91: LEA EAX,[RDI + 0x5f] CMP AL,0x5d JA 0x00184cdd LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00184c8f MOVZX EAX,byte ptr [RDX + 0x1] SHL EDI,0x9 LEA EAX,[RDI + RAX*0x2] LEA RCX,[0x3903b0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x00184c8f MOV AL,byte ptr [RDX + 0x1] INC AL XOR ECX,ECX CMP AL,0xa2 SETC CL LEA EAX,[-0x2 + RCX*0x2] JMP 0x00184c8f LAB_00184cdd: CMP RDI,0x8f JZ 0x00184d21 CMP EDI,0x8e JNZ 0x00184d63 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00184c8f MOVZX ECX,byte ptr [RDX + 0x1] LEA EDX,[RCX + 0x20] MOV EAX,0x0 CMP DL,0xc1 JC 0x00184c8f ADD RCX,0xfec0 MOV qword ptr [RSI],RCX MOV EAX,0x2 JMP 0x00184c8f LAB_00184d21: LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x00184c8f MOVZX EAX,word ptr [RDX + 0x1] ROL AX,0x8 MOVZX EAX,AX LEA RCX,[0x3b03b0] MOVZX ECX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RCX MOV EAX,0x3 TEST RCX,RCX JNZ 0x00184c8f MOV AL,byte ptr [RDX + 0x1] INC AL CMP AL,0xa2 JNC 0x00184d6a LAB_00184d63: XOR EAX,EAX JMP 0x00184c8f LAB_00184d6a: MOV CL,byte ptr [RDX + 0x2] MOV EAX,0x0 CMP CL,0xa1 JC 0x00184c8f XOR EAX,EAX CMP CL,0xff SETZ AL LEA EAX,[RAX + RAX*0x2] ADD EAX,-0x3 JMP 0x00184c8f
int my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if ((byte)(bVar1 + 0x5f) < 0x5e) { iVar3 = -0x66; if (param_3 + 2 <= param_4) { uVar2 = *(ushort *) (jisx0208_eucjp_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; iVar3 = 2; if ((ulong)uVar2 == 0) { iVar3 = (uint)((byte)(param_3[1] + 1) < 0xa2) * 2 + -2; } } } else { if ((ulong)bVar1 == 0x8f) { if (param_4 < param_3 + 3) { return -0x67; } uVar2 = *(ushort *) (&jisx0212_eucjp_to_unicode + (ulong)(ushort)(*(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8) * 2); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 3; } if (0xa1 < (byte)(param_3[1] + 1)) { if (param_3[2] < 0xa1) { return 0; } return (uint)(param_3[2] == 0xff) * 3 + -3; } } else if (bVar1 == 0x8e) { if (param_4 < param_3 + 2) { return -0x66; } if ((byte)(param_3[1] + 0x20) < 0xc1) { return 0; } *param_2 = (ulong)param_3[1] + 0xfec0; return 2; } iVar3 = 0; } } else { *param_2 = (ulong)bVar1; iVar3 = 1; } } return iVar3; }
8,685
update_backward_delete_link
eloqsql/storage/maria/ma_dynrec.c
static my_bool update_backward_delete_link(MARIA_HA *info, my_off_t delete_block, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_ma_get_block_info(info, &block_info, info->dfile.file, delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O0
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x78(%rbp) movq %rsi, -0x80(%rbp) movq %rdx, -0x88(%rbp) cmpq $-0x1, -0x80(%rbp) je 0x4f8d5 movl $0x0, -0x10(%rbp) movq -0x78(%rbp), %rdi movq -0x78(%rbp), %rax movl 0x480(%rax), %edx movq -0x80(%rbp), %rcx leaq -0x60(%rbp), %rsi callq 0x4e980 andl $0x4, %eax cmpl $0x0, %eax je 0x4f8bf movq -0x88(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x88(%rbp), %rax shrq $0x20, %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa0(%rbp), %rax movb %al, -0x65(%rbp) movq -0xa0(%rbp), %rax shrq $0x8, %rax movb %al, -0x66(%rbp) movq -0xa0(%rbp), %rax shrq $0x10, %rax movb %al, -0x67(%rbp) movq -0xa0(%rbp), %rax shrq $0x18, %rax movb %al, -0x68(%rbp) movq -0x90(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movb %al, -0x61(%rbp) movq -0xa8(%rbp), %rax shrq $0x8, %rax movb %al, -0x62(%rbp) movq -0xa8(%rbp), %rax shrq $0x10, %rax movb %al, -0x63(%rbp) movq -0xa8(%rbp), %rax shrq $0x18, %rax movb %al, -0x64(%rbp) movq -0x78(%rbp), %rax movq (%rax), %rax movq 0x6e8(%rax), %rax movq -0x78(%rbp), %rdi leaq -0x68(%rbp), %rsi movq -0x80(%rbp), %rcx addq $0xc, %rcx movl $0x8, %edx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0x4f8bd jmp 0x4f8b7 movb $0x1, -0x69(%rbp) jmp 0x4f8db jmp 0x4f8d3 movq -0x78(%rbp), %rdi movl $0x7f, %esi callq 0x390d0 movb $0x1, -0x69(%rbp) jmp 0x4f8db jmp 0x4f8d5 jmp 0x4f8d7 movb $0x0, -0x69(%rbp) movb -0x69(%rbp), %al movb %al, -0xa9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4f905 movb -0xa9(%rbp), %al addq $0xb0, %rsp popq %rbp retq callq 0x2a250 nopw (%rax,%rax)
update_backward_delete_link: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_78], rdi mov [rbp+var_80], rsi mov [rbp+var_88], rdx cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh jz loc_4F8D5 mov [rbp+var_10], 0 mov rdi, [rbp+var_78] mov rax, [rbp+var_78] mov edx, [rax+480h] mov rcx, [rbp+var_80] lea rsi, [rbp+var_60] call _ma_get_block_info and eax, 4 cmp eax, 0 jz loc_4F8BF mov rax, [rbp+var_88] mov [rbp+var_90], rax mov rax, [rbp+var_88] shr rax, 20h mov [rbp+var_98], rax mov rax, [rbp+var_98] mov [rbp+var_A0], rax mov rax, [rbp+var_A0] mov [rbp+var_65], al mov rax, [rbp+var_A0] shr rax, 8 mov [rbp+var_66], al mov rax, [rbp+var_A0] shr rax, 10h mov [rbp+var_67], al mov rax, [rbp+var_A0] shr rax, 18h mov [rbp+var_68], al mov rax, [rbp+var_90] mov [rbp+var_A8], rax mov rax, [rbp+var_A8] mov [rbp+var_61], al mov rax, [rbp+var_A8] shr rax, 8 mov [rbp+var_62], al mov rax, [rbp+var_A8] shr rax, 10h mov [rbp+var_63], al mov rax, [rbp+var_A8] shr rax, 18h mov [rbp+var_64], al mov rax, [rbp+var_78] mov rax, [rax] mov rax, [rax+6E8h] mov rdi, [rbp+var_78] lea rsi, [rbp+var_68] mov rcx, [rbp+var_80] add rcx, 0Ch mov edx, 8 mov r8d, 4 call rax cmp rax, 0 jz short loc_4F8BD jmp short $+2 loc_4F8B7: mov [rbp+var_69], 1 jmp short loc_4F8DB loc_4F8BD: jmp short loc_4F8D3 loc_4F8BF: mov rdi, [rbp+var_78] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_69], 1 jmp short loc_4F8DB loc_4F8D3: jmp short $+2 loc_4F8D5: jmp short $+2 loc_4F8D7: mov [rbp+var_69], 0 loc_4F8DB: mov al, [rbp+var_69] mov [rbp+var_A9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4F905 mov al, [rbp+var_A9] add rsp, 0B0h pop rbp retn loc_4F905: call ___stack_chk_fail
bool update_backward_delete_link(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rdx long long v7; // rcx long long v8; // r8 int v9; // r9d _BYTE v13[8]; // [rsp+48h] [rbp-68h] BYREF unsigned __int8 v14[80]; // [rsp+50h] [rbp-60h] BYREF int v15; // [rsp+A0h] [rbp-10h] unsigned long long v16; // [rsp+A8h] [rbp-8h] v16 = __readfsqword(0x28u); if ( a2 == -1 ) return 0; v15 = 0; if ( (ma_get_block_info((long long)a1, v14, (unsigned int)a1[288], a2, a5, a6) & 4) == 0 ) { ma_set_fatal_error(a1, 0x7Fu, v6, v7, v8, v9); return 1; } v13[2] = BYTE5(a3); v13[3] = BYTE4(a3); v13[0] = HIBYTE(a3); v13[1] = BYTE6(a3); v13[6] = BYTE1(a3); v13[7] = a3; v13[4] = BYTE3(a3); v13[5] = BYTE2(a3); return (*(long long ( **)(_DWORD *, _BYTE *, long long, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, v13, 8LL, a2 + 12, 4LL) != 0; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x78],RDI MOV qword ptr [RBP + -0x80],RSI MOV qword ptr [RBP + -0x88],RDX CMP qword ptr [RBP + -0x80],-0x1 JZ 0x0014f8d5 MOV dword ptr [RBP + -0x10],0x0 MOV RDI,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x78] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x60] CALL 0x0014e980 AND EAX,0x4 CMP EAX,0x0 JZ 0x0014f8bf MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x88] SHR RAX,0x20 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0xa0] MOV byte ptr [RBP + -0x65],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x8 MOV byte ptr [RBP + -0x66],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x10 MOV byte ptr [RBP + -0x67],AL MOV RAX,qword ptr [RBP + -0xa0] SHR RAX,0x18 MOV byte ptr [RBP + -0x68],AL MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0xa8],RAX MOV RAX,qword ptr [RBP + -0xa8] MOV byte ptr [RBP + -0x61],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x8 MOV byte ptr [RBP + -0x62],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x10 MOV byte ptr [RBP + -0x63],AL MOV RAX,qword ptr [RBP + -0xa8] SHR RAX,0x18 MOV byte ptr [RBP + -0x64],AL MOV RAX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6e8] MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x68] MOV RCX,qword ptr [RBP + -0x80] ADD RCX,0xc MOV EDX,0x8 MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x0014f8bd JMP 0x0014f8b7 LAB_0014f8b7: MOV byte ptr [RBP + -0x69],0x1 JMP 0x0014f8db LAB_0014f8bd: JMP 0x0014f8d3 LAB_0014f8bf: MOV RDI,qword ptr [RBP + -0x78] MOV ESI,0x7f CALL 0x001390d0 MOV byte ptr [RBP + -0x69],0x1 JMP 0x0014f8db LAB_0014f8d3: JMP 0x0014f8d5 LAB_0014f8d5: JMP 0x0014f8d7 LAB_0014f8d7: MOV byte ptr [RBP + -0x69],0x0 LAB_0014f8db: MOV AL,byte ptr [RBP + -0x69] MOV byte ptr [RBP + -0xa9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014f905 MOV AL,byte ptr [RBP + -0xa9] ADD RSP,0xb0 POP RBP RET LAB_0014f905: CALL 0x0012a250
int8 update_backward_delete_link(long *param_1,long param_2,int8 param_3) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_71; int1 local_70; int1 local_6f; int1 local_6e; int1 local_6d; int1 local_6c; int1 local_6b; int1 local_6a; int1 local_69; int1 local_68 [80]; int4 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_18 = 0; uVar1 = _ma_get_block_info(param_1,local_68,(int)param_1[0x90],param_2); if ((uVar1 & 4) == 0) { _ma_set_fatal_error(param_1,0x7f); local_71 = 1; goto LAB_0014f8db; } local_6d = (int1)((ulong)param_3 >> 0x20); local_6e = (int1)((ulong)param_3 >> 0x28); local_6f = (int1)((ulong)param_3 >> 0x30); local_70 = (int1)((ulong)param_3 >> 0x38); local_69 = (int1)param_3; local_6a = (int1)((ulong)param_3 >> 8); local_6b = (int1)((ulong)param_3 >> 0x10); local_6c = (int1)((ulong)param_3 >> 0x18); lVar2 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_70,8,param_2 + 0xc,4); if (lVar2 != 0) { local_71 = 1; goto LAB_0014f8db; } } local_71 = 0; LAB_0014f8db: 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_71); }
8,686
mysql_free_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_free_result(MYSQL_RES *result) { if (result) { if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { result->handle->methods->db_skip_result(result->handle); result->handle->status=MYSQL_STATUS_READY; } free_rows(result->data); if (result->fields) ma_free_root(&result->field_alloc,MYF(0)); if (result->row) free(result->row); free(result); } return; }
O3
c
mysql_free_result: testq %rdi, %rdi je 0x1ab31 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x78(%rdi), %rdi testq %rdi, %rdi je 0x1aafa cmpl $0x2, 0x488(%rdi) jne 0x1aafa movq 0x4d0(%rdi), %rax callq *0x18(%rax) movq 0x78(%rbx), %rax movl $0x0, 0x488(%rax) movq 0x18(%rbx), %rdi callq 0x1a25a cmpq $0x0, 0x10(%rbx) je 0x1ab15 leaq 0x28(%rbx), %rdi xorl %esi, %esi callq 0x22757 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x1ab23 callq 0x13580 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13580 retq
mysql_free_result: test rdi, rdi jz short locret_1AB31 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+78h] test rdi, rdi jz short loc_1AAFA cmp dword ptr [rdi+488h], 2 jnz short loc_1AAFA mov rax, [rdi+4D0h] call qword ptr [rax+18h] mov rax, [rbx+78h] mov dword ptr [rax+488h], 0 loc_1AAFA: mov rdi, [rbx+18h] call free_rows cmp qword ptr [rbx+10h], 0 jz short loc_1AB15 lea rdi, [rbx+28h] xor esi, esi call ma_free_root loc_1AB15: mov rdi, [rbx+60h] test rdi, rdi jz short loc_1AB23 call _free loc_1AB23: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_1AB31: retn
long long mysql_free_result(_QWORD *a1) { long long v2; // rdi long long v3; // rdi long long result; // rax if ( a1 ) { v2 = a1[15]; if ( v2 && *(_DWORD *)(v2 + 1160) == 2 ) { (*(void ( **)(long long))(*(_QWORD *)(v2 + 1232) + 24LL))(v2); *(_DWORD *)(a1[15] + 1160LL) = 0; } free_rows(a1[3]); if ( a1[2] ) ma_free_root(a1 + 5, 0LL); v3 = a1[12]; if ( v3 ) free(v3); return free(a1); } return result; }
mysql_free_result: TEST RDI,RDI JZ 0x0011ab31 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x78] TEST RDI,RDI JZ 0x0011aafa CMP dword ptr [RDI + 0x488],0x2 JNZ 0x0011aafa MOV RAX,qword ptr [RDI + 0x4d0] CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x488],0x0 LAB_0011aafa: MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011a25a CMP qword ptr [RBX + 0x10],0x0 JZ 0x0011ab15 LEA RDI,[RBX + 0x28] XOR ESI,ESI CALL 0x00122757 LAB_0011ab15: MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x0011ab23 CALL 0x00113580 LAB_0011ab23: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113580 LAB_0011ab31: RET
void mysql_free_result(void *param_1) { long lVar1; if (param_1 != (void *)0x0) { lVar1 = *(long *)((long)param_1 + 0x78); if ((lVar1 != 0) && (*(int *)(lVar1 + 0x488) == 2)) { (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x18))(); *(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0; } free_rows(*(int8 *)((long)param_1 + 0x18)); if (*(long *)((long)param_1 + 0x10) != 0) { ma_free_root((long)param_1 + 0x28,0); } if (*(void **)((long)param_1 + 0x60) != (void *)0x0) { free(*(void **)((long)param_1 + 0x60)); } free(param_1); return; } return; }
8,687
mariadb_convert_string
eloqsql/libmariadb/libmariadb/ma_charset.c
size_t STDCALL mariadb_convert_string(const char *from __attribute__((unused)), size_t *from_len __attribute__((unused)), MARIADB_CHARSET_INFO *from_cs __attribute__((unused)), char *to __attribute__((unused)), size_t *to_len __attribute__((unused)), MARIADB_CHARSET_INFO *to_cs __attribute__((unused)), int *errorcode) { #ifndef HAVE_ICONV *errorcode= ENOTSUP; return -1; #else iconv_t conv= 0; size_t rc= -1; size_t save_len= *to_len; char to_encoding[128], from_encoding[128]; *errorcode= 0; /* check if conversion is supported */ if (!from_cs || !from_cs->encoding || !from_cs->encoding[0] || !to_cs || !to_cs->encoding || !to_cs->encoding[0]) { *errorcode= EINVAL; return rc; } map_charset_name(to_cs->encoding, 1, to_encoding, sizeof(to_encoding)); map_charset_name(from_cs->encoding, 0, from_encoding, sizeof(from_encoding)); if ((conv= iconv_open(to_encoding, from_encoding)) == (iconv_t)-1) { *errorcode= errno; goto error; } if ((rc= iconv(conv, IF_WIN(,IF_SOLARIS(,(char **)))&from, from_len, &to, to_len)) == (size_t)-1) { *errorcode= errno; goto error; } rc= save_len - *to_len; error: if (conv != (iconv_t)-1) iconv_close(conv); return rc; #endif }
O0
c
mariadb_convert_string: pushq %rbp movq %rsp, %rbp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq 0x10(%rbp), %rax movl $0x5f, (%rax) movq $-0x1, %rax popq %rbp retq nopw %cs:(%rax,%rax)
mariadb_convert_string: push rbp mov rbp, rsp mov rax, [rbp+arg_0] 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 [rbp+var_30], r9 mov rax, [rbp+arg_0] mov dword ptr [rax], 5Fh ; '_' mov rax, 0FFFFFFFFFFFFFFFFh pop rbp retn
long long mariadb_convert_string( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, _DWORD *a7) { *a7 = 95; return -1LL; }
mariadb_convert_string: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RBP + 0x10] 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 qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX],0x5f MOV RAX,-0x1 POP RBP RET
int8 mariadb_convert_string(void) { int4 *in_stack_00000008; *in_stack_00000008 = 0x5f; return 0xffffffffffffffff; }
8,688
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>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { // check callback for object start const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); keep_stack.push_back(keep); auto val = handle_value(BasicJsonType::value_t::object, true); ref_stack.push_back(val.second); // check object limit if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O2
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>>::start_object(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %r14 addq $0x80, %rdi leaq 0x8(%r14), %rbx movq 0x10(%r14), %rsi subq 0x8(%r14), %rsi shrq $0x3, %rsi leaq 0xa8(%r14), %rcx xorl %edx, %edx callq 0x45a54 leaq 0x20(%r14), %rdi movzbl %al, %esi callq 0x44cfa leaq 0x8(%rsp), %rsi movb $0x1, (%rsi) pushq $0x1 popq %rdx movq %r14, %rdi callq 0x45a78 leaq 0x50(%rsp), %rsi movb %al, -0x8(%rsi) movq %rdx, (%rsi) movq %rbx, %rdi callq 0x45c82 movq 0x10(%r14), %rax movq -0x8(%rax), %rdi testq %rdi, %rdi sete %al cmpq $-0x1, %r15 sete %cl orb %al, %cl jne 0x452f4 callq 0x45ca0 cmpq %r15, %rax jb 0x45301 movb $0x1, %al addq $0x58, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x20390 movq %rax, %rbx leaq 0x28(%rsp), %rdi movq %r15, %rsi callq 0x45e13 leaq 0x4bf2b(%rip), %rsi # 0x9124b leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x45db5 movq 0x10(%r14), %rax movq -0x8(%rax), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x198, %esi # imm = 0x198 callq 0x45cc8 xorl %ebp, %ebp leaq 0x8a05b(%rip), %rsi # 0xcf3b0 leaq 0x33f8(%rip), %rdx # 0x48754 movq %rbx, %rdi callq 0x20b30 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x20d88 jmp 0x45379 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi callq 0x20d88 testb %bpl, %bpl jne 0x4538d jmp 0x45395 movq %rax, %r14 movq %rbx, %rdi callq 0x20510 movq %r14, %rdi callq 0x20b90 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: push rbp push r15 push r14; char push rbx; int sub rsp, 58h mov r15, rsi mov r14, rdi add rdi, 80h lea rbx, [r14+8] mov rsi, [r14+10h] sub rsi, [r14+8] shr rsi, 3 lea rcx, [r14+0A8h] xor edx, edx 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> &) lea rdi, [r14+20h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) lea rsi, [rsp+78h+var_70] mov byte ptr [rsi], 1 push 1 pop rdx mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool) lea rsi, [rsp+78h+var_28] mov [rsi-8], al mov [rsi], rdx mov rdi, rbx call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; 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> *>>::push_back(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 rax, [r14+10h] mov rdi, [rax-8] test rdi, rdi setz al cmp r15, 0FFFFFFFFFFFFFFFFh setz cl or cl, al jnz short loc_452F4 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void) cmp rax, r15 jb short loc_45301 loc_452F4: mov al, 1 add rsp, 58h pop rbx pop r14 pop r15 pop rbp retn loc_45301: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+78h+var_50]; this mov rsi, r15; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+78h+var_70] lea rdx, [rsp+78h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) mov rax, [r14+10h] mov rcx, [rax-8] mov bpl, 1 lea rdx, [rsp+78h+var_70] mov rdi, rbx; this mov esi, 198h; int call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_45379 mov r14, rax mov bpl, 1 loc_45379: lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_4538D jmp short loc_45395 mov r14, rax loc_4538D: mov rdi, rbx; void * call ___cxa_free_exception loc_45395: mov rdi, r14 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>>::start_object( long long a1, unsigned long long a2) { unsigned __int8 v2; // al long long v3; // rdx nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx char v6; // [rsp+0h] [rbp-78h] int v7[6]; // [rsp+8h] [rbp-70h] BYREF char v8; // [rsp+20h] [rbp-58h] int v9[6]; // [rsp+28h] [rbp-50h] BYREF char v10; // [rsp+40h] [rbp-38h] int v11; // [rsp+48h] [rbp-30h] long long v12; // [rsp+50h] [rbp-28h] int v13; // [rsp+58h] [rbp-20h] char v14; // [rsp+60h] [rbp-18h] v2 = 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, (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3, 0LL, a1 + 168); std::vector<bool>::push_back(a1 + 32, v2); LOBYTE(v7[0]) = 1; LOBYTE(v11) = 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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, v7, 1LL); v12 = v3; 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> *>>::push_back(a1 + 8); if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) != 0LL && a2 != -1LL && 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>::max_size() < a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v9, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>( v7, "excessive object size: ", v9); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, v6, v7[0], v7[2], v7[4], v8, v9[0], v9[2], v9[4], v10, v11, v12, v13, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return 1; }
start_object: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV R14,RDI ADD RDI,0x80 LEA RBX,[R14 + 0x8] MOV RSI,qword ptr [R14 + 0x10] SUB RSI,qword ptr [R14 + 0x8] SHR RSI,0x3 LEA RCX,[R14 + 0xa8] XOR EDX,EDX CALL 0x00145a54 LEA RDI,[R14 + 0x20] MOVZX ESI,AL CALL 0x00144cfa LEA RSI,[RSP + 0x8] MOV byte ptr [RSI],0x1 PUSH 0x1 POP RDX MOV RDI,R14 CALL 0x00145a78 LEA RSI,[RSP + 0x50] MOV byte ptr [RSI + -0x8],AL MOV qword ptr [RSI],RDX MOV RDI,RBX CALL 0x00145c82 MOV RAX,qword ptr [R14 + 0x10] MOV RDI,qword ptr [RAX + -0x8] TEST RDI,RDI SETZ AL CMP R15,-0x1 SETZ CL OR CL,AL JNZ 0x001452f4 CALL 0x00145ca0 CMP RAX,R15 JC 0x00145301 LAB_001452f4: MOV AL,0x1 ADD RSP,0x58 POP RBX POP R14 POP R15 POP RBP RET LAB_00145301: PUSH 0x20 POP RDI CALL 0x00120390 MOV RBX,RAX LAB_0014530c: LEA RDI,[RSP + 0x28] MOV RSI,R15 CALL 0x00145e13 LAB_00145319: LEA RSI,[0x19124b] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x00145db5 MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [RAX + -0x8] MOV BPL,0x1 LAB_0014533a: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x198 CALL 0x00145cc8 XOR EBP,EBP LEA RSI,[0x1cf3b0] LEA RDX,[0x148754] MOV RDI,RBX CALL 0x00120b30
/* 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> >::start_object(unsigned long) */ 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>> ::start_object(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,ulong param_1) { bool bVar1; ulong uVar2; int8 uVar3; basic_json *extraout_RDX; detail local_70 [32]; __cxx11 local_50 [32]; int1 local_30; basic_json *local_28; bVar1 = (bool)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()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3, 0,this + 0xa8); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),bVar1); local_70[0] = (detail)0x1; local_30 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_70,true); local_28 = extraout_RDX; 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>*>> ::push_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),&local_28); if (param_1 != 0xffffffffffffffff && *(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> **)(*(long *)(this + 0x10) + -8) != (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> *)0x0) { uVar2 = 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> ::max_size(*(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> **)(*(long *)(this + 0x10) + -8)); if (uVar2 < param_1) { uVar3 = __cxa_allocate_exception(0x20); /* try { // try from 0014530c to 00145318 has its CatchHandler @ 0014538a */ std::__cxx11::to_string(local_50,param_1); /* try { // try from 00145319 to 0014532e has its CatchHandler @ 00145373 */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> (local_70,"excessive object size: ",(string *)local_50); /* try { // try from 0014533a to 00145363 has its CatchHandler @ 00145364 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x198,local_70,*(int8 *)(*(long *)(this + 0x10) + -8)); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&out_of_range::typeinfo,exception::~exception); } } return 1; }
8,689
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const { try { do_render(out, context); } catch (const LoopControlException & e) { // TODO: make stack creation lazy. Only needed if it was thrown outside of a loop. std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw LoopControlException(err.str(), e.control_type); } catch (const std::exception & e) { std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw std::runtime_error(err.str()); } }
O1
cpp
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, %r14 movq (%rdi), %rax callq *(%rax) addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx cmpl $0x2, %edx jne 0x9c105 movq %rbx, %rdi callq 0x1b370 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1bb90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1b890 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9c18a movl $0x18, %edi callq 0x1b430 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1bdc0 movl 0x10(%rbx), %ebx movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1bad0 leaq 0x91f3b(%rip), %rax # 0x12e018 addq $0x10, %rax movq %rax, (%r14) movl %ebx, 0x10(%r14) xorl %ebp, %ebp leaq 0x91f0f(%rip), %rsi # 0x12e000 movq 0x92e88(%rip), %rdx # 0x12ef80 movq %r14, %rdi callq 0x1bf20 jmp 0x9c18a cmpl $0x1, %edx jne 0x9c32d movq %rbx, %rdi callq 0x1b370 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1bb90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1b890 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9c1d0 movl $0x10, %edi callq 0x1b430 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1bdc0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1be30 xorl %ebp, %ebp movq 0x92e75(%rip), %rsi # 0x12eff0 movq 0x92dde(%rip), %rdx # 0x12ef60 movq %r14, %rdi callq 0x1bf20 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x78e44 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1ba00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c0a7 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c0a7 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x78e44 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1ba00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c146 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c146 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c2d8 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c2d8 jmp 0x9c2d5 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c305 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c305 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c28f movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c28f movq %rax, %rbx movb $0x1, %bpl testb %bpl, %bpl je 0x9c2d8 movq %r14, %rdi callq 0x1b670 jmp 0x9c2d8 jmp 0x9c302 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9c2c6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9c2c6 movq %rax, %rbx movb $0x1, %bpl testb %bpl, %bpl je 0x9c305 movq %r14, %rdi callq 0x1b670 jmp 0x9c305 movq %rax, %rbx movq 0x92c99(%rip), %rsi # 0x12ef78 leaq 0x28(%rsp), %rdi callq 0x1b4a0 leaq 0x98(%rsp), %rdi callq 0x1b2a0 jmp 0x9c2fb movq %rax, %rbx callq 0x1be60 jmp 0x9c32d movq %rax, %rbx movq 0x92c6c(%rip), %rsi # 0x12ef78 leaq 0x28(%rsp), %rdi callq 0x1b4a0 leaq 0x98(%rsp), %rdi callq 0x1b2a0 jmp 0x9c328 movq %rax, %rbx callq 0x1be60 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %rdi callq 0x2337b nop
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r14 push rbx sub rsp, 1A0h mov r14, rdi mov rax, [rdi] call qword ptr [rax] add rsp, 1A0h pop rbx pop r14 pop rbp retn mov rbx, rax cmp edx, 2 jnz loc_9C105 mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdi, [rsp+arg_20] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+8]; int test rsi, rsi jnz loc_9C18A loc_9C0A7: mov edi, 18h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+arg_28] lea rdi, [rsp+arg_0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov ebx, [rbx+10h] mov bpl, 1 lea rsi, [rsp+arg_0] mov rdi, r14 call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException add rax, 10h mov [r14], rax mov [r14+10h], ebx xor ebp, ebp lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD)) { return (**a1)(a1); }
render: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1a0 MOV R14,RDI MOV RAX,qword ptr [RDI] LAB_0019c055: CALL qword ptr [RAX] LAB_0019c057: ADD RSP,0x1a0 POP RBX POP R14 POP RBP RET
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2) { /* try { // try from 0019c055 to 0019c056 has its CatchHandler @ 0019c063 */ (*(code *)**(int8 **)param_1)(); return; }
8,690
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void render(std::ostringstream & out, const std::shared_ptr<Context> & context) const { try { do_render(out, context); } catch (const LoopControlException & e) { // TODO: make stack creation lazy. Only needed if it was thrown outside of a loop. std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw LoopControlException(err.str(), e.control_type); } catch (const std::exception & e) { std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw std::runtime_error(err.str()); } }
O3
cpp
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, %r14 movq (%rdi), %rax callq *(%rax) addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx cmpl $0x2, %edx jne 0x9a95f movq %rbx, %rdi callq 0x1a370 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1ab90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a890 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9a9e4 movl $0x18, %edi callq 0x1a430 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1adc0 movl 0x10(%rbx), %ebx movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1aad0 leaq 0x906e1(%rip), %rax # 0x12b018 addq $0x10, %rax movq %rax, (%r14) movl %ebx, 0x10(%r14) xorl %ebp, %ebp leaq 0x906b5(%rip), %rsi # 0x12b000 movq 0x9162e(%rip), %rdx # 0x12bf80 movq %r14, %rdi callq 0x1af20 jmp 0x9a9e4 cmpl $0x1, %edx jne 0x9ab81 movq %rbx, %rdi callq 0x1a370 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1ab90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a890 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9aa2a movl $0x10, %edi callq 0x1a430 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1adc0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1ae30 xorl %ebp, %ebp movq 0x9161b(%rip), %rsi # 0x12bff0 movq 0x91584(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af20 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x782d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a901 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9a901 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x782d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a9a0 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9a9a0 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ab2c movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9ab2c jmp 0x9ab29 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ab59 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9ab59 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9aae1 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x9aaeb jmp 0x9ab2c movq %rax, %rbx movq %r14, %rdi callq 0x1a670 jmp 0x9ab2c jmp 0x9ab56 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9ab15 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x9ab1f jmp 0x9ab59 movq %rax, %rbx movq %r14, %rdi callq 0x1a670 jmp 0x9ab59 movq %rax, %rbx movq 0x91445(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4a0 leaq 0x98(%rsp), %rdi callq 0x1a2a0 jmp 0x9ab4f movq %rax, %rbx callq 0x1ae60 jmp 0x9ab81 movq %rax, %rbx movq 0x91418(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4a0 leaq 0x98(%rsp), %rdi callq 0x1a2a0 jmp 0x9ab7c movq %rax, %rbx callq 0x1ae60 movq %rbx, %rdi callq 0x1afb0 movq %rax, %rdi callq 0x222a5 nop
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r14 push rbx sub rsp, 1A0h mov r14, rdi mov rax, [rdi] call qword ptr [rax] add rsp, 1A0h pop rbx pop r14 pop rbp retn mov rbx, rax cmp edx, 2 jnz loc_9A95F mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdi, [rsp+arg_20] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+8]; int test rsi, rsi jnz loc_9A9E4 loc_9A901: mov edi, 18h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+arg_28] lea rdi, [rsp+arg_0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov ebx, [rbx+10h] mov bpl, 1 lea rsi, [rsp+arg_0] mov rdi, r14 call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException add rax, 10h mov [r14], rax mov [r14+10h], ebx xor ebp, ebp lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD)) { return (**a1)(a1); }
render: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1a0 MOV R14,RDI MOV RAX,qword ptr [RDI] LAB_0019a8af: CALL qword ptr [RAX] LAB_0019a8b1: ADD RSP,0x1a0 POP RBX POP R14 POP RBP RET
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2) { /* try { // try from 0019a8af to 0019a8b0 has its CatchHandler @ 0019a8bd */ (*(code *)**(int8 **)param_1)(); return; }
8,691
my_context_continue
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_continue(struct my_context *c) { int ret; __asm__ __volatile__ ( "movq (%[save]), %%rax\n\t" "movq %%rsp, (%[save])\n\t" "movq %%rax, %%rsp\n\t" "movq 8(%[save]), %%rax\n\t" "movq %%rbp, 8(%[save])\n\t" "movq %%rax, %%rbp\n\t" "movq 24(%[save]), %%rax\n\t" "movq %%r12, 24(%[save])\n\t" "movq %%rax, %%r12\n\t" "movq 32(%[save]), %%rax\n\t" "movq %%r13, 32(%[save])\n\t" "movq %%rax, %%r13\n\t" "movq 40(%[save]), %%rax\n\t" "movq %%r14, 40(%[save])\n\t" "movq %%rax, %%r14\n\t" "movq 48(%[save]), %%rax\n\t" "movq %%r15, 48(%[save])\n\t" "movq %%rax, %%r15\n\t" "leaq 1f(%%rip), %%rax\n\t" "leaq 2f(%%rip), %%rcx\n\t" "movq %%rax, 56(%[save])\n\t" "movq 64(%[save]), %%rax\n\t" "movq %%rcx, 64(%[save])\n\t" "movq 16(%[save]), %%rcx\n\t" "movq %%rbx, 16(%[save])\n\t" "movq %%rcx, %%rbx\n\t" "jmpq *%%rax\n" /* Come here when operation is done. Be sure to use the same callee-save register for %[save] here and in my_context_spawn(), so we preserve the value correctly at this point. */ "1:\n\t" "movq (%[save]), %%rsp\n\t" "movq 8(%[save]), %%rbp\n\t" /* %rbx is preserved from my_context_spawn() in this case. */ "movq 24(%[save]), %%r12\n\t" "movq 32(%[save]), %%r13\n\t" "movq 40(%[save]), %%r14\n\t" "movq 48(%[save]), %%r15\n\t" "xorl %[ret], %[ret]\n\t" "jmp 3f\n" /* Come here when operation is suspended. */ "2:\n\t" "movl $1, %[ret]\n" "3:\n" : [ret] "=a" (ret) : /* Need this in callee-save register to preserve in function call. */ [save] "b" (&c->save[0]) : "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11", "memory", "cc" ); return ret; }
O0
c
my_context_continue: pushq %rbp movq %rsp, %rbp pushq %rbx movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rbx movq (%rbx), %rax movq %rsp, (%rbx) movq %rax, %rsp movq 0x8(%rbx), %rax movq %rbp, 0x8(%rbx) movq %rax, %rbp movq 0x18(%rbx), %rax movq %r12, 0x18(%rbx) movq %rax, %r12 movq 0x20(%rbx), %rax movq %r13, 0x20(%rbx) movq %rax, %r13 movq 0x28(%rbx), %rax movq %r14, 0x28(%rbx) movq %rax, %r14 movq 0x30(%rbx), %rax movq %r15, 0x30(%rbx) movq %rax, %r15 leaq 0x20(%rip), %rax # 0x59c04 leaq 0x34(%rip), %rcx # 0x59c1f movq %rax, 0x38(%rbx) movq 0x40(%rbx), %rax movq %rcx, 0x40(%rbx) movq 0x10(%rbx), %rcx movq %rbx, 0x10(%rbx) movq %rcx, %rbx jmpq *%rax movq (%rbx), %rsp movq 0x8(%rbx), %rbp movq 0x18(%rbx), %r12 movq 0x20(%rbx), %r13 movq 0x28(%rbx), %r14 movq 0x30(%rbx), %r15 xorl %eax, %eax jmp 0x59c24 movl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax popq %rbx popq %rbp retq nopl (%rax)
my_context_continue: push rbp mov rbp, rsp push rbx mov [rbp+var_10], rdi mov rbx, [rbp+var_10] mov rax, [rbx] mov [rbx], rsp mov rsp, rax mov rax, [rbx+8] mov [rbx+8], rbp mov rbp, rax mov rax, [rbx+18h] mov [rbx+18h], r12 mov r12, rax mov rax, [rbx+20h] mov [rbx+20h], r13 mov r13, rax mov rax, [rbx+28h] mov [rbx+28h], r14 mov r14, rax mov rax, [rbx+30h] mov [rbx+30h], r15 mov r15, rax lea rax, sub_59C04 lea rcx, loc_59C1F mov [rbx+38h], rax mov rax, [rbx+40h] mov [rbx+40h], rcx mov rcx, [rbx+10h] mov [rbx+10h], rbx mov rbx, rcx jmp rax
long long my_context_continue(_QWORD *a1) { long long v1; // r12 long long v2; // r13 long long v3; // r14 long long v4; // r15 long long (*v5)(void); // rax long long v7; // [rsp+8h] [rbp-8h] BYREF long long savedregs; // [rsp+10h] [rbp+0h] BYREF *a1 = &v7; a1[1] = &savedregs; a1[3] = v1; a1[4] = v2; a1[5] = v3; a1[6] = v4; a1[7] = sub_59C04; v5 = (long long (*)(void))a1[8]; a1[8] = &loc_59C1F; a1[2] = a1; return v5(); }
my_context_continue: PUSH RBP MOV RBP,RSP PUSH RBX MOV qword ptr [RBP + -0x10],RDI MOV RBX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBX] MOV qword ptr [RBX],RSP MOV RSP,RAX MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RBX + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RBX + 0x28] MOV qword ptr [RBX + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x30],R15 MOV R15,RAX LEA RAX,[0x159c04] LEA RCX,[0x159c1f] MOV qword ptr [RBX + 0x38],RAX MOV RAX,qword ptr [RBX + 0x40] MOV qword ptr [RBX + 0x40],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x10],RBX MOV RBX,RCX JMP RAX
void my_context_continue(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff0; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; *(int1 **)(param_1 + 0x38) = &LAB_00159c04; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_00159c1f; *(long *)(param_1 + 0x10) = param_1; /* WARNING: Could not recover jumptable at 0x00159c02. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
8,692
do_push_nil
fabiosvm[P]rak/src/vm.c
static void do_push_nil(RakVM *vm, RakChunk *chunk, uint32_t *ip, RakValue *slots, RakError *err) { rak_vm_push_nil(vm, err); if (!rak_is_ok(err)) return; dispatch(vm, chunk, ip + 1, slots, err); }
O2
c
do_push_nil: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 movq %r8, %rsi callq 0x7fd6 cmpb $0x1, (%rbx) jne 0x6e57 movzbl 0x4(%r15), %eax addq $0x4, %r15 leaq 0x7eb5(%rip), %r9 # 0xecf0 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *(%r9,%rax,8) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
do_push_nil: push r15 push r14 push r13 push r12 push rbx mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rsi mov r13, rdi mov rsi, r8 call rak_vm_push_nil_0 cmp byte ptr [rbx], 1 jnz short loc_6E57 movzx eax, byte ptr [r15+4] add r15, 4 lea r9, dispatchTable mov rdi, r13 mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8, rbx pop rbx pop r12 pop r13 pop r14 pop r15 jmp ds:(dispatchTable - 0ECF0h)[r9+rax*8] loc_6E57: pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long do_push_nil(long long a1, long long a2, long long a3, long long a4, _BYTE *a5) { long long result; // rax result = rak_vm_push_nil_0(a1, a5); if ( *a5 == 1 ) ((void ( __noreturn *)(long long, long long, long long))*(&dispatchTable + *(unsigned __int8 *)(a3 + 4)))( a1, a2, a3 + 4); return result; }
do_push_nil: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV R13,RDI MOV RSI,R8 CALL 0x00107fd6 CMP byte ptr [RBX],0x1 JNZ 0x00106e57 MOVZX EAX,byte ptr [R15 + 0x4] ADD R15,0x4 LEA R9,[0x10ecf0] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8,RBX POP RBX POP R12 POP R13 POP R14 POP R15 JMP qword ptr [R9 + RAX*0x8] LAB_00106e57: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void do_push_nil(int8 param_1,int8 param_2,long param_3,int8 param_4,char *param_5 ) { rak_vm_push_nil(param_1,param_5); if (*param_5 == '\x01') { /* WARNING: Could not recover jumptable at 0x00106e53. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(dispatchTable + (ulong)*(byte *)(param_3 + 4) * 8)) (param_1,param_2,param_3 + 4,param_4,param_5); return; } return; }
8,693
ankerl::nanobench::detail::fmt::StreamStateRestorer::restore()
BadAccessGuards/build_O3/_deps/nanobench-src/src/include/nanobench.h
void StreamStateRestorer::restore() { mStream.imbue(mLocale); mStream.precision(mPrecision); mStream.width(mWidth); mStream.fill(mFill); mStream.flags(mFmtFlags); }
O3
c
ankerl::nanobench::detail::fmt::StreamStateRestorer::restore(): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq (%rdi), %rsi movq (%rsi), %rax addq -0x18(%rax), %rsi leaq 0x8(%rdi), %rdx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x30b0 movq %r14, %rdi callq 0x3460 movq (%rbx), %rax movq 0x10(%rbx), %rdx movq (%rax), %rcx movq -0x18(%rcx), %rsi movq %rdx, 0x8(%rax,%rsi) movq -0x18(%rcx), %rdx movq 0x18(%rbx), %rsi movq %rsi, 0x10(%rax,%rdx) movq -0x18(%rcx), %rdx leaq (%rax,%rdx), %r14 movb 0x20(%rbx), %bpl cmpb $0x0, 0xe1(%rax,%rdx) jne 0x9dfd movq %r14, %rdi movl $0x20, %esi callq 0x32d0 movb $0x1, 0xe1(%r14) movq (%rbx), %rax movq (%rax), %rcx movb %bpl, 0xe0(%r14) movq -0x18(%rcx), %rcx movl 0x24(%rbx), %edx movl %edx, 0x18(%rax,%rcx) addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
_ZN6ankerl9nanobench6detail3fmt19StreamStateRestorer7restoreEv: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi mov rsi, [rdi] mov rax, [rsi] add rsi, [rax-18h] lea rdx, [rdi+8] lea r14, [rsp+28h+var_20] mov rdi, r14 call __ZNSt9basic_iosIcSt11char_traitsIcEE5imbueERKSt6locale; std::ios::imbue(std::locale const&) mov rdi, r14; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rax, [rbx] mov rdx, [rbx+10h] mov rcx, [rax] mov rsi, [rcx-18h] mov [rax+rsi+8], rdx mov rdx, [rcx-18h] mov rsi, [rbx+18h] mov [rax+rdx+10h], rsi mov rdx, [rcx-18h] lea r14, [rax+rdx] mov bpl, [rbx+20h] cmp byte ptr [rax+rdx+0E1h], 0 jnz short loc_9DFD mov rdi, r14 mov esi, 20h ; ' ' call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) mov byte ptr [r14+0E1h], 1 mov rax, [rbx] mov rcx, [rax] loc_9DFD: mov [r14+0E0h], bpl mov rcx, [rcx-18h] mov edx, [rbx+24h] mov [rax+rcx+18h], edx add rsp, 10h pop rbx pop r14 pop rbp retn
_QWORD * ankerl::nanobench::detail::fmt::StreamStateRestorer::restore( ankerl::nanobench::detail::fmt::StreamStateRestorer *this) { _QWORD *result; // rax long long v2; // rcx long long v3; // rdx char *v4; // r14 char v5; // bp _BYTE v6[32]; // [rsp+8h] [rbp-20h] BYREF std::ios::imbue(v6, *(_QWORD *)(**(_QWORD **)this - 24LL) + *(_QWORD *)this, (char *)this + 8); std::locale::~locale((std::locale *)v6); result = *(_QWORD **)this; v2 = **(_QWORD **)this; *(_QWORD *)((char *)result + *(_QWORD *)(v2 - 24) + 8) = *((_QWORD *)this + 2); *(_QWORD *)((char *)result + *(_QWORD *)(v2 - 24) + 16) = *((_QWORD *)this + 3); v3 = *(_QWORD *)(v2 - 24); v4 = (char *)result + v3; v5 = *((_BYTE *)this + 32); if ( !*((_BYTE *)result + v3 + 225) ) { std::ios::widen((char *)result + v3, 32LL); v4[225] = 1; result = *(_QWORD **)this; v2 = **(_QWORD **)this; } v4[224] = v5; *(_DWORD *)((char *)result + *(_QWORD *)(v2 - 24) + 24) = *((_DWORD *)this + 9); return result; }
restore: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RSI] ADD RSI,qword ptr [RAX + -0x18] LEA RDX,[RDI + 0x8] LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001030b0 MOV RDI,R14 CALL 0x00103460 MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RAX] MOV RSI,qword ptr [RCX + -0x18] MOV qword ptr [RAX + RSI*0x1 + 0x8],RDX MOV RDX,qword ptr [RCX + -0x18] MOV RSI,qword ptr [RBX + 0x18] MOV qword ptr [RAX + RDX*0x1 + 0x10],RSI MOV RDX,qword ptr [RCX + -0x18] LEA R14,[RAX + RDX*0x1] MOV BPL,byte ptr [RBX + 0x20] CMP byte ptr [RAX + RDX*0x1 + 0xe1],0x0 JNZ 0x00109dfd MOV RDI,R14 MOV ESI,0x20 CALL 0x001032d0 MOV byte ptr [R14 + 0xe1],0x1 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX] LAB_00109dfd: MOV byte ptr [R14 + 0xe0],BPL MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RBX + 0x24] MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX ADD RSP,0x10 POP RBX POP R14 POP RBP RET
/* ankerl::nanobench::detail::fmt::StreamStateRestorer::restore() */ void __thiscall ankerl::nanobench::detail::fmt::StreamStateRestorer::restore(StreamStateRestorer *this) { long lVar1; StreamStateRestorer SVar2; long *plVar3; long lVar4; locale local_20 [8]; std::ios::imbue(local_20); std::locale::~locale(local_20); plVar3 = *(long **)this; lVar4 = *plVar3; *(int8 *)((long)plVar3 + *(long *)(lVar4 + -0x18) + 8) = *(int8 *)(this + 0x10); *(int8 *)((long)plVar3 + *(long *)(lVar4 + -0x18) + 0x10) = *(int8 *)(this + 0x18); lVar1 = (long)plVar3 + *(long *)(lVar4 + -0x18); SVar2 = this[0x20]; if (*(char *)((long)plVar3 + *(long *)(lVar4 + -0x18) + 0xe1) == '\0') { std::ios::widen((char)lVar1); *(int1 *)(lVar1 + 0xe1) = 1; plVar3 = *(long **)this; lVar4 = *plVar3; } *(StreamStateRestorer *)(lVar1 + 0xe0) = SVar2; *(int4 *)((long)plVar3 + *(long *)(lVar4 + -0x18) + 0x18) = *(int4 *)(this + 0x24); return; }
8,694
find_collation_data_inheritance_source
eloqsql/mysys/charset.c
static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs, myf flags) { const char *beg, *end; if (cs->tailoring && !strncmp(cs->tailoring, "[import ", 8) && (end= strchr(cs->tailoring + 8, ']')) && (beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end) { char name[MY_CS_NAME_SIZE + 1]; memcpy(name, beg, end - beg); name[end - beg]= '\0'; return inheritance_source_by_id(cs, get_collation_number(name,MYF(flags))); } return NULL; }
O0
c
find_collation_data_inheritance_source: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq -0x40(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x35506 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi leaq 0x4e51c(%rip), %rsi # 0x83987 movl $0x8, %edx callq 0x25180 cmpl $0x0, %eax jne 0x35506 movq -0x40(%rbp), %rax movq 0x38(%rax), %rdi addq $0x8, %rdi movl $0x5d, %esi callq 0x25120 movq %rax, -0x58(%rbp) cmpq $0x0, %rax je 0x35506 movq -0x40(%rbp), %rax movq 0x38(%rax), %rax addq $0x8, %rax movq %rax, -0x50(%rbp) addq $0x20, %rax cmpq -0x58(%rbp), %rax jbe 0x35506 leaq -0x30(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x58(%rbp), %rdx movq -0x50(%rbp), %rax subq %rax, %rdx callq 0x25270 movq -0x58(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax movb $0x0, -0x30(%rbp,%rax) movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0x33240 movq -0x60(%rbp), %rdi movl %eax, %esi callq 0x35680 movq %rax, -0x38(%rbp) jmp 0x3550e movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x35532 movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq callq 0x25390 nopw (%rax,%rax)
find_collation_data_inheritance_source: push rbp mov rbp, rsp sub rsp, 70h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov rax, [rbp+var_40] cmp qword ptr [rax+38h], 0 jz loc_35506 mov rax, [rbp+var_40] mov rdi, [rax+38h] lea rsi, aImport; "[import " mov edx, 8 call _strncmp cmp eax, 0 jnz loc_35506 mov rax, [rbp+var_40] mov rdi, [rax+38h] add rdi, 8 mov esi, 5Dh ; ']' call _strchr mov [rbp+var_58], rax cmp rax, 0 jz short loc_35506 mov rax, [rbp+var_40] mov rax, [rax+38h] add rax, 8 mov [rbp+var_50], rax add rax, 20h ; ' ' cmp rax, [rbp+var_58] jbe short loc_35506 lea rdi, [rbp+var_30] mov rsi, [rbp+var_50] mov rdx, [rbp+var_58] mov rax, [rbp+var_50] sub rdx, rax call _memcpy mov rax, [rbp+var_58] mov rcx, [rbp+var_50] sub rax, rcx mov [rbp+rax+var_30], 0 mov rax, [rbp+var_40] mov [rbp+var_60], rax lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] call get_collation_number mov rdi, [rbp+var_60] mov esi, eax call inheritance_source_by_id mov [rbp+var_38], rax jmp short loc_3550E loc_35506: mov [rbp+var_38], 0 loc_3550E: mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_35532 mov rax, [rbp+var_68] add rsp, 70h pop rbp retn loc_35532: call ___stack_chk_fail
long long find_collation_data_inheritance_source(long long a1, long long a2) { unsigned int collation_number; // eax unsigned long long v4; // [rsp+18h] [rbp-58h] long long v5; // [rsp+20h] [rbp-50h] _BYTE v7[40]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v8; // [rsp+68h] [rbp-8h] v8 = __readfsqword(0x28u); if ( !*(_QWORD *)(a1 + 56) ) return 0LL; if ( (unsigned int)strncmp(*(_QWORD *)(a1 + 56), "[import ", 8LL) ) return 0LL; v4 = strchr(*(_QWORD *)(a1 + 56) + 8LL, 93LL); if ( !v4 ) return 0LL; v5 = *(_QWORD *)(a1 + 56) + 8LL; if ( *(_QWORD *)(a1 + 56) + 40LL <= v4 ) return 0LL; memcpy(v7, v5, v4 - v5); v7[v4 - v5] = 0; collation_number = get_collation_number((long long)v7, a2); return inheritance_source_by_id(a1, collation_number); }
find_collation_data_inheritance_source: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00135506 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] LEA RSI,[0x183987] MOV EDX,0x8 CALL 0x00125180 CMP EAX,0x0 JNZ 0x00135506 MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x8 MOV ESI,0x5d CALL 0x00125120 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JZ 0x00135506 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x8 MOV qword ptr [RBP + -0x50],RAX ADD RAX,0x20 CMP RAX,qword ptr [RBP + -0x58] JBE 0x00135506 LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x50] SUB RDX,RAX CALL 0x00125270 MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] CALL 0x00133240 MOV RDI,qword ptr [RBP + -0x60] MOV ESI,EAX CALL 0x00135680 MOV qword ptr [RBP + -0x38],RAX JMP 0x0013550e LAB_00135506: MOV qword ptr [RBP + -0x38],0x0 LAB_0013550e: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00135532 MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET LAB_00135532: CALL 0x00125390
int8 find_collation_data_inheritance_source(long param_1,int8 param_2) { int iVar1; int4 uVar2; char *pcVar3; void *__src; long in_FS_OFFSET; int8 local_40; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (*(long *)(param_1 + 0x38) != 0) { iVar1 = strncmp(*(char **)(param_1 + 0x38),"[import ",8); if (iVar1 == 0) { pcVar3 = strchr((char *)(*(long *)(param_1 + 0x38) + 8),0x5d); if ((pcVar3 != (char *)0x0) && (__src = (void *)(*(long *)(param_1 + 0x38) + 8), pcVar3 < (char *)(*(long *)(param_1 + 0x38) + 0x28))) { memcpy(local_38,__src,(long)pcVar3 - (long)__src); pcVar3[(long)(local_38 + -(long)__src)] = '\0'; uVar2 = get_collation_number(local_38,param_2); local_40 = inheritance_source_by_id(param_1,uVar2); goto LAB_0013550e; } } } local_40 = 0; LAB_0013550e: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_40; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
8,695
ident_realloc
bluesky950520[P]quickjs/quickjs.c
static __exception int ident_realloc(JSContext *ctx, char **pbuf, size_t *psize, char *static_buf) { char *buf, *new_buf; size_t size, new_size; buf = *pbuf; size = *psize; if (size >= (SIZE_MAX / 3) * 2) new_size = SIZE_MAX; else new_size = size + (size >> 1); if (buf == static_buf) { new_buf = js_malloc(ctx, new_size); if (!new_buf) return -1; memcpy(new_buf, buf, size); } else { new_buf = js_realloc(ctx, buf, new_size); if (!new_buf) return -1; } *pbuf = new_buf; *psize = new_size; return 0; }
O0
c
ident_realloc: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq %rcx, 0x20(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) movabsq $-0x5555555555555556, %rax # imm = 0xAAAAAAAAAAAAAAAA cmpq %rax, 0x8(%rsp) jb 0x85b7d movq $-0x1, (%rsp) jmp 0x85b91 movq 0x8(%rsp), %rax movq 0x8(%rsp), %rcx shrq %rcx addq %rcx, %rax movq %rax, (%rsp) movq 0x18(%rsp), %rax cmpq 0x20(%rsp), %rax jne 0x85bd8 movq 0x38(%rsp), %rdi movq (%rsp), %rsi callq 0x209f0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x85bc2 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x85c25 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0xe5a0 jmp 0x85c04 movq 0x38(%rsp), %rdi movq 0x18(%rsp), %rsi movq (%rsp), %rdx callq 0x20b20 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0x85c02 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x85c25 jmp 0x85c04 movq 0x10(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) movq (%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nop
ident_realloc: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_20], rdx mov [rsp+48h+var_28], rcx mov rax, [rsp+48h+var_18] mov rax, [rax] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_20] mov rax, [rax] mov [rsp+48h+var_40], rax mov rax, 0AAAAAAAAAAAAAAAAh cmp [rsp+48h+var_40], rax jb short loc_85B7D mov [rsp+48h+var_48], 0FFFFFFFFFFFFFFFFh jmp short loc_85B91 loc_85B7D: mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_40] shr rcx, 1 add rax, rcx mov [rsp+48h+var_48], rax loc_85B91: mov rax, [rsp+48h+var_30] cmp rax, [rsp+48h+var_28] jnz short loc_85BD8 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_48] call js_malloc mov [rsp+48h+var_38], rax cmp [rsp+48h+var_38], 0 jnz short loc_85BC2 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_85C25 loc_85BC2: mov rdi, [rsp+48h+var_38] mov rsi, [rsp+48h+var_30] mov rdx, [rsp+48h+var_40] call _memcpy jmp short loc_85C04 loc_85BD8: mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_30] mov rdx, [rsp+48h+var_48] call js_realloc mov [rsp+48h+var_38], rax cmp [rsp+48h+var_38], 0 jnz short loc_85C02 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_85C25 loc_85C02: jmp short $+2 loc_85C04: mov rcx, [rsp+48h+var_38] mov rax, [rsp+48h+var_18] mov [rax], rcx mov rcx, [rsp+48h+var_48] mov rax, [rsp+48h+var_20] mov [rax], rcx mov [rsp+48h+var_4], 0 loc_85C25: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long ident_realloc(long long a1, long long *a2, long long *a3, long long a4) { long long v5; // [rsp+0h] [rbp-48h] unsigned long long v6; // [rsp+8h] [rbp-40h] long long v7; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] v8 = *a2; v6 = *a3; if ( (unsigned long long)*a3 < 0xAAAAAAAAAAAAAAAALL ) v5 = (v6 >> 1) + v6; else v5 = -1LL; if ( v8 != a4 ) { v7 = js_realloc(a1, v8, v5); if ( !v7 ) return (unsigned int)-1; LABEL_10: *a2 = v7; *a3 = v5; return 0; } v7 = js_malloc(a1, v5); if ( v7 ) { memcpy(v7, v8, v6); goto LABEL_10; } return (unsigned int)-1; }
ident_realloc: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x20],RCX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV RAX,-0x5555555555555556 CMP qword ptr [RSP + 0x8],RAX JC 0x00185b7d MOV qword ptr [RSP],-0x1 JMP 0x00185b91 LAB_00185b7d: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x8] SHR RCX,0x1 ADD RAX,RCX MOV qword ptr [RSP],RAX LAB_00185b91: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x20] JNZ 0x00185bd8 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP] CALL 0x001209f0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x00185bc2 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x00185c25 LAB_00185bc2: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0010e5a0 JMP 0x00185c04 LAB_00185bd8: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP] CALL 0x00120b20 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x00185c02 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x00185c25 LAB_00185c02: JMP 0x00185c04 LAB_00185c04: MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x44],0x0 LAB_00185c25: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 ident_realloc(int8 param_1,int8 *param_2,ulong *param_3,void *param_4) { void *__src; ulong __n; ulong local_48; void *local_38; __src = (void *)*param_2; __n = *param_3; if (__n < 0xaaaaaaaaaaaaaaaa) { local_48 = __n + (__n >> 1); } else { local_48 = 0xffffffffffffffff; } if (__src == param_4) { local_38 = (void *)js_malloc(param_1,local_48); if (local_38 == (void *)0x0) { return 0xffffffff; } memcpy(local_38,__src,__n); } else { local_38 = (void *)js_realloc(param_1,__src,local_48); if (local_38 == (void *)0x0) { return 0xffffffff; } } *param_2 = local_38; *param_3 = local_48; return 0; }
8,696
ident_realloc
bluesky950520[P]quickjs/quickjs.c
static __exception int ident_realloc(JSContext *ctx, char **pbuf, size_t *psize, char *static_buf) { char *buf, *new_buf; size_t size, new_size; buf = *pbuf; size = *psize; if (size >= (SIZE_MAX / 3) * 2) new_size = SIZE_MAX; else new_size = size + (size >> 1); if (buf == static_buf) { new_buf = js_malloc(ctx, new_size); if (!new_buf) return -1; memcpy(new_buf, buf, size); } else { new_buf = js_realloc(ctx, buf, new_size); if (!new_buf) return -1; } *pbuf = new_buf; *psize = new_size; return 0; }
O1
c
ident_realloc: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %r12 movq (%rdx), %r13 movq %r13, %rax shrq %rax addq %r13, %rax movabsq $-0x5555555555555557, %rdx # imm = 0xAAAAAAAAAAAAAAA9 cmpq %rdx, %r13 movq $-0x1, %r15 cmovbeq %rax, %r15 cmpq %rcx, %r12 je 0x4c20d movq %r12, %rsi movq %r15, %rdx callq 0x1bfc4 movq %rax, %rbp testq %rax, %rax je 0x4c22d movq %rbp, (%r14) movq %r15, (%rbx) xorl %eax, %eax jmp 0x4c232 movq %r15, %rsi callq 0xed5d testq %rax, %rax je 0x4c22d movq %rax, %rbp movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xe5a0 jmp 0x4c203 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ident_realloc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r12, [rsi] mov r13, [rdx] mov rax, r13 shr rax, 1 add rax, r13 mov rdx, 0AAAAAAAAAAAAAAA9h cmp r13, rdx mov r15, 0FFFFFFFFFFFFFFFFh cmovbe r15, rax cmp r12, rcx jz short loc_4C20D mov rsi, r12 mov rdx, r15 call js_realloc mov rbp, rax test rax, rax jz short loc_4C22D loc_4C203: mov [r14], rbp mov [rbx], r15 xor eax, eax jmp short loc_4C232 loc_4C20D: mov rsi, r15 call js_malloc test rax, rax jz short loc_4C22D mov rbp, rax mov rdi, rax mov rsi, r12 mov rdx, r13 call _memcpy jmp short loc_4C203 loc_4C22D: mov eax, 0FFFFFFFFh loc_4C232: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ident_realloc(long long a1, long long *a2, long long *a3, long long a4) { long long v5; // r12 long long v6; // r13 long long v7; // r15 long long v8; // rbp long long v10; // rax v5 = *a2; v6 = *a3; v7 = -1LL; if ( (unsigned long long)*a3 <= 0xAAAAAAAAAAAAAAA9LL ) v7 = *a3 + ((unsigned long long)*a3 >> 1); if ( v5 == a4 ) { v10 = js_malloc(a1, v7); if ( v10 ) { v8 = v10; memcpy(v10, v5, v6); goto LABEL_5; } } else { v8 = js_realloc(a1, *a2, v7); if ( v8 ) { LABEL_5: *a2 = v8; *a3 = v7; return 0LL; } } return 0xFFFFFFFFLL; }
ident_realloc: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RSI] MOV R13,qword ptr [RDX] MOV RAX,R13 SHR RAX,0x1 ADD RAX,R13 MOV RDX,-0x5555555555555557 CMP R13,RDX MOV R15,-0x1 CMOVBE R15,RAX CMP R12,RCX JZ 0x0014c20d MOV RSI,R12 MOV RDX,R15 CALL 0x0011bfc4 MOV RBP,RAX TEST RAX,RAX JZ 0x0014c22d LAB_0014c203: MOV qword ptr [R14],RBP MOV qword ptr [RBX],R15 XOR EAX,EAX JMP 0x0014c232 LAB_0014c20d: MOV RSI,R15 CALL 0x0010ed5d TEST RAX,RAX JZ 0x0014c22d MOV RBP,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R13 CALL 0x0010e5a0 JMP 0x0014c203 LAB_0014c22d: MOV EAX,0xffffffff LAB_0014c232: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ident_realloc(int8 param_1,long *param_2,ulong *param_3,void *param_4) { void *__src; ulong __n; void *__dest; ulong uVar1; __src = (void *)*param_2; __n = *param_3; uVar1 = 0xffffffffffffffff; if (__n < 0xaaaaaaaaaaaaaaaa) { uVar1 = (__n >> 1) + __n; } if (__src == param_4) { __dest = (void *)js_malloc(param_1,uVar1); if (__dest == (void *)0x0) { return 0xffffffff; } memcpy(__dest,__src,__n); } else { __dest = (void *)js_realloc(param_1,__src,uVar1); if (__dest == (void *)0x0) { return 0xffffffff; } } *param_2 = (long)__dest; *param_3 = uVar1; return 0; }
8,697
ident_realloc
bluesky950520[P]quickjs/quickjs.c
static __exception int ident_realloc(JSContext *ctx, char **pbuf, size_t *psize, char *static_buf) { char *buf, *new_buf; size_t size, new_size; buf = *pbuf; size = *psize; if (size >= (SIZE_MAX / 3) * 2) new_size = SIZE_MAX; else new_size = size + (size >> 1); if (buf == static_buf) { new_buf = js_malloc(ctx, new_size); if (!new_buf) return -1; memcpy(new_buf, buf, size); } else { new_buf = js_realloc(ctx, buf, new_size); if (!new_buf) return -1; } *pbuf = new_buf; *psize = new_size; return 0; }
O3
c
ident_realloc: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %r12 movq (%rdx), %r13 movq %r13, %rax shrq %rax addq %r13, %rax movabsq $-0x5555555555555557, %rdx # imm = 0xAAAAAAAAAAAAAAA9 cmpq %rdx, %r13 movq $-0x1, %r15 cmovbeq %rax, %r15 cmpq %rcx, %r12 je 0x4e035 movq %r12, %rsi movq %r15, %rdx callq 0x1c884 movq %rax, %rbp testq %rax, %rax je 0x4e055 movq %rbp, (%r14) movq %r15, (%rbx) xorl %eax, %eax jmp 0x4e05a movq %r15, %rsi callq 0xed89 testq %rax, %rax je 0x4e055 movq %rax, %rbp movq %rax, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xe5a0 jmp 0x4e02b movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ident_realloc: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r12, [rsi] mov r13, [rdx] mov rax, r13 shr rax, 1 add rax, r13 mov rdx, 0AAAAAAAAAAAAAAA9h cmp r13, rdx mov r15, 0FFFFFFFFFFFFFFFFh cmovbe r15, rax cmp r12, rcx jz short loc_4E035 mov rsi, r12 mov rdx, r15 call js_realloc mov rbp, rax test rax, rax jz short loc_4E055 loc_4E02B: mov [r14], rbp mov [rbx], r15 xor eax, eax jmp short loc_4E05A loc_4E035: mov rsi, r15 call js_malloc test rax, rax jz short loc_4E055 mov rbp, rax mov rdi, rax mov rsi, r12 mov rdx, r13 call _memcpy jmp short loc_4E02B loc_4E055: mov eax, 0FFFFFFFFh loc_4E05A: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ident_realloc(long long a1, long long *a2, long long *a3, long long a4) { long long v5; // r12 long long v6; // r13 long long v7; // r15 long long v8; // rbp long long v10; // rax v5 = *a2; v6 = *a3; v7 = -1LL; if ( (unsigned long long)*a3 <= 0xAAAAAAAAAAAAAAA9LL ) v7 = *a3 + ((unsigned long long)*a3 >> 1); if ( v5 == a4 ) { v10 = js_malloc(a1, v7); if ( v10 ) { v8 = v10; memcpy(v10, v5, v6); goto LABEL_5; } } else { v8 = js_realloc(a1, *a2, v7); if ( v8 ) { LABEL_5: *a2 = v8; *a3 = v7; return 0LL; } } return 0xFFFFFFFFLL; }
ident_realloc: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RSI] MOV R13,qword ptr [RDX] MOV RAX,R13 SHR RAX,0x1 ADD RAX,R13 MOV RDX,-0x5555555555555557 CMP R13,RDX MOV R15,-0x1 CMOVBE R15,RAX CMP R12,RCX JZ 0x0014e035 MOV RSI,R12 MOV RDX,R15 CALL 0x0011c884 MOV RBP,RAX TEST RAX,RAX JZ 0x0014e055 LAB_0014e02b: MOV qword ptr [R14],RBP MOV qword ptr [RBX],R15 XOR EAX,EAX JMP 0x0014e05a LAB_0014e035: MOV RSI,R15 CALL 0x0010ed89 TEST RAX,RAX JZ 0x0014e055 MOV RBP,RAX MOV RDI,RAX MOV RSI,R12 MOV RDX,R13 CALL 0x0010e5a0 JMP 0x0014e02b LAB_0014e055: MOV EAX,0xffffffff LAB_0014e05a: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ident_realloc(int8 param_1,long *param_2,ulong *param_3,void *param_4) { void *__src; ulong __n; void *__dest; ulong uVar1; __src = (void *)*param_2; __n = *param_3; uVar1 = 0xffffffffffffffff; if (__n < 0xaaaaaaaaaaaaaaaa) { uVar1 = (__n >> 1) + __n; } if (__src == param_4) { __dest = (void *)js_malloc(param_1,uVar1); if (__dest == (void *)0x0) { return 0xffffffff; } memcpy(__dest,__src,__n); } else { __dest = (void *)js_realloc(param_1,__src,uVar1); if (__dest == (void *)0x0) { return 0xffffffff; } } *param_2 = (long)__dest; *param_3 = uVar1; return 0; }
8,698
my_coll_parser_scan_logical_position
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_logical_position(MY_COLL_RULE_PARSER *p, my_wc_t *pwc, size_t limit) { MY_COLL_RULES *rules= p->rules; MY_COLL_LEXEM *lexem= my_coll_parser_curr(p); if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first non-ignorable]"))) lexem->code= rules->uca->first_non_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last non-ignorable]"))) lexem->code= rules->uca->last_non_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first primary ignorable]"))) lexem->code= rules->uca->first_primary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last primary ignorable]"))) lexem->code= rules->uca->last_primary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first secondary ignorable]"))) lexem->code= rules->uca->first_secondary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last secondary ignorable]"))) lexem->code= rules->uca->last_secondary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first tertiary ignorable]"))) lexem->code= rules->uca->first_tertiary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last tertiary ignorable]"))) lexem->code= rules->uca->last_tertiary_ignorable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first trailing]"))) lexem->code= rules->uca->first_trailing; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last trailing]"))) lexem->code= rules->uca->last_trailing; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first variable]"))) lexem->code= rules->uca->first_variable; else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last variable]"))) lexem->code= rules->uca->last_variable; else return 0; /* Don't scan the next token */ if (!my_coll_rule_expand(pwc, limit, lexem->code)) { /* Logical position can not be in a contraction, so the above call should never fail. Let's assert in debug version and print a nice error message in production version. */ DBUG_ASSERT(0); return my_coll_parser_too_long_error(p, "Logical position"); } return my_coll_parser_scan(p); }
O0
c
my_coll_parser_scan_logical_position: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0xf0(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0xad020 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq 0x36a48(%rip), %rsi # 0xe4743 movl $0x15, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadd24 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x70(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf94 movq -0x30(%rbp), %rdi leaq 0x36a2a(%rip), %rsi # 0xe4759 movl $0x14, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadd58 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf92 movq -0x30(%rbp), %rdi leaq 0x36a0b(%rip), %rsi # 0xe476e movl $0x19, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadd8f movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x80(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf90 movq -0x30(%rbp), %rdi leaq 0x369ee(%rip), %rsi # 0xe4788 movl $0x18, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xaddc6 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x88(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf8e movq -0x30(%rbp), %rdi leaq 0x369d0(%rip), %rsi # 0xe47a1 movl $0x1b, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xaddfd movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x90(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf8c movq -0x30(%rbp), %rdi leaq 0x369b5(%rip), %rsi # 0xe47bd movl $0x1a, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xade34 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf8a movq -0x30(%rbp), %rdi leaq 0x36999(%rip), %rsi # 0xe47d8 movl $0x1a, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xade6b movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xa0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf88 movq -0x30(%rbp), %rdi leaq 0x3697d(%rip), %rsi # 0xe47f3 movl $0x19, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadea2 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xa8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf86 movq -0x30(%rbp), %rdi leaq 0x36960(%rip), %rsi # 0xe480d movl $0x10, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xaded9 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xb0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf84 movq -0x30(%rbp), %rdi leaq 0x3693a(%rip), %rsi # 0xe481e movl $0xf, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadf0d movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xb8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf82 movq -0x30(%rbp), %rdi leaq 0x36916(%rip), %rsi # 0xe482e movl $0x10, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadf41 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xc0(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf80 movq -0x30(%rbp), %rdi leaq 0x368f3(%rip), %rsi # 0xe483f movl $0xf, %edx callq 0xad7a0 cmpl $0x0, %eax jne 0xadf75 movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq 0xc8(%rax), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0xadf7e movl $0x0, -0x4(%rbp) jmp 0xadfd3 jmp 0xadf80 jmp 0xadf82 jmp 0xadf84 jmp 0xadf86 jmp 0xadf88 jmp 0xadf8a jmp 0xadf8c jmp 0xadf8e jmp 0xadf90 jmp 0xadf92 jmp 0xadf94 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movslq 0x24(%rax), %rdx callq 0xae0f0 cmpl $0x0, %eax jne 0xadfc7 jmp 0xadfb0 jmp 0xadfb2 movq -0x10(%rbp), %rdi leaq 0x36892(%rip), %rsi # 0xe484f callq 0xae160 movl %eax, -0x4(%rbp) jmp 0xadfd3 movq -0x10(%rbp), %rdi callq 0xad800 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_coll_parser_scan_logical_position: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+0F0h] mov [rbp+var_28], rax mov rdi, [rbp+var_10] call my_coll_parser_curr mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, aFirstNonIgnora; "[first non-ignorable]" mov edx, 15h call lex_cmp cmp eax, 0 jnz short loc_ADD24 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+70h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF94 loc_ADD24: mov rdi, [rbp+var_30] lea rsi, aLastNonIgnorab; "[last non-ignorable]" mov edx, 14h call lex_cmp cmp eax, 0 jnz short loc_ADD58 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+78h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF92 loc_ADD58: mov rdi, [rbp+var_30] lea rsi, aFirstPrimaryIg; "[first primary ignorable]" mov edx, 19h call lex_cmp cmp eax, 0 jnz short loc_ADD8F mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+80h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF90 loc_ADD8F: mov rdi, [rbp+var_30] lea rsi, aLastPrimaryIgn; "[last primary ignorable]" mov edx, 18h call lex_cmp cmp eax, 0 jnz short loc_ADDC6 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+88h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF8E loc_ADDC6: mov rdi, [rbp+var_30] lea rsi, aFirstSecondary; "[first secondary ignorable]" mov edx, 1Bh call lex_cmp cmp eax, 0 jnz short loc_ADDFD mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+90h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF8C loc_ADDFD: mov rdi, [rbp+var_30] lea rsi, aLastSecondaryI; "[last secondary ignorable]" mov edx, 1Ah call lex_cmp cmp eax, 0 jnz short loc_ADE34 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+98h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF8A loc_ADE34: mov rdi, [rbp+var_30] lea rsi, aFirstTertiaryI; "[first tertiary ignorable]" mov edx, 1Ah call lex_cmp cmp eax, 0 jnz short loc_ADE6B mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0A0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF88 loc_ADE6B: mov rdi, [rbp+var_30] lea rsi, aLastTertiaryIg; "[last tertiary ignorable]" mov edx, 19h call lex_cmp cmp eax, 0 jnz short loc_ADEA2 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0A8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF86 loc_ADEA2: mov rdi, [rbp+var_30] lea rsi, aFirstTrailing; "[first trailing]" mov edx, 10h call lex_cmp cmp eax, 0 jnz short loc_ADED9 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0B0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp loc_ADF84 loc_ADED9: mov rdi, [rbp+var_30] lea rsi, aLastTrailing; "[last trailing]" mov edx, 0Fh call lex_cmp cmp eax, 0 jnz short loc_ADF0D mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0B8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_ADF82 loc_ADF0D: mov rdi, [rbp+var_30] lea rsi, aFirstVariable; "[first variable]" mov edx, 10h call lex_cmp cmp eax, 0 jnz short loc_ADF41 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0C0h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_ADF80 loc_ADF41: mov rdi, [rbp+var_30] lea rsi, aLastVariable; "[last variable]" mov edx, 0Fh call lex_cmp cmp eax, 0 jnz short loc_ADF75 mov rax, [rbp+var_28] mov rax, [rax+8] mov rax, [rax+0C8h] mov ecx, eax mov rax, [rbp+var_30] mov [rax+24h], ecx jmp short loc_ADF7E loc_ADF75: mov [rbp+var_4], 0 jmp short loc_ADFD3 loc_ADF7E: jmp short $+2 loc_ADF80: jmp short $+2 loc_ADF82: jmp short $+2 loc_ADF84: jmp short $+2 loc_ADF86: jmp short $+2 loc_ADF88: jmp short $+2 loc_ADF8A: jmp short $+2 loc_ADF8C: jmp short $+2 loc_ADF8E: jmp short $+2 loc_ADF90: jmp short $+2 loc_ADF92: jmp short $+2 loc_ADF94: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movsxd rdx, dword ptr [rax+24h] call my_coll_rule_expand cmp eax, 0 jnz short loc_ADFC7 jmp short $+2 loc_ADFB0: jmp short $+2 loc_ADFB2: mov rdi, [rbp+var_10] lea rsi, aLogicalPositio; "Logical position" call my_coll_parser_too_long_error mov [rbp+var_4], eax jmp short loc_ADFD3 loc_ADFC7: mov rdi, [rbp+var_10] call my_coll_parser_scan mov [rbp+var_4], eax loc_ADFD3: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_coll_parser_scan_logical_position(long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] v5 = *(_QWORD *)(a1 + 240); v4 = my_coll_parser_curr(a1); if ( (unsigned int)lex_cmp(v4, (long long)"[first non-ignorable]", 0x15uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last non-ignorable]", 0x14uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first primary ignorable]", 0x19uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last primary ignorable]", 0x18uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first secondary ignorable]", 0x1BuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last secondary ignorable]", 0x1AuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first tertiary ignorable]", 0x1AuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last tertiary ignorable]", 0x19uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first trailing]", 0x10uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last trailing]", 0xFuLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[first variable]", 0x10uLL) ) { if ( (unsigned int)lex_cmp(v4, (long long)"[last variable]", 0xFuLL) ) return 0; *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 200LL); } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 192LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 184LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 176LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 168LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 160LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 152LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 144LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 136LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 128LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 120LL); } } else { *(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 112LL); } if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) ) return (unsigned int)my_coll_parser_scan(a1); else return (unsigned int)my_coll_parser_too_long_error(a1, "Logical position"); }
my_coll_parser_scan_logical_position: PUSH RBP MOV RBP,RSP SUB RSP,0x30 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 + 0xf0] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001ad020 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e4743] MOV EDX,0x15 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001add24 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf94 LAB_001add24: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e4759] MOV EDX,0x14 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001add58 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x78] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf92 LAB_001add58: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e476e] MOV EDX,0x19 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001add8f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf90 LAB_001add8f: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e4788] MOV EDX,0x18 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001addc6 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x88] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf8e LAB_001addc6: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e47a1] MOV EDX,0x1b CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001addfd MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x90] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf8c LAB_001addfd: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e47bd] MOV EDX,0x1a CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001ade34 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf8a LAB_001ade34: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e47d8] MOV EDX,0x1a CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001ade6b MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xa0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf88 LAB_001ade6b: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e47f3] MOV EDX,0x19 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001adea2 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xa8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf86 LAB_001adea2: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e480d] MOV EDX,0x10 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001aded9 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xb0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf84 LAB_001aded9: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e481e] MOV EDX,0xf CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001adf0d MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf82 LAB_001adf0d: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e482e] MOV EDX,0x10 CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001adf41 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf80 LAB_001adf41: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[0x1e483f] MOV EDX,0xf CALL 0x001ad7a0 CMP EAX,0x0 JNZ 0x001adf75 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0xc8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX JMP 0x001adf7e LAB_001adf75: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001adfd3 LAB_001adf7e: JMP 0x001adf80 LAB_001adf80: JMP 0x001adf82 LAB_001adf82: JMP 0x001adf84 LAB_001adf84: JMP 0x001adf86 LAB_001adf86: JMP 0x001adf88 LAB_001adf88: JMP 0x001adf8a LAB_001adf8a: JMP 0x001adf8c LAB_001adf8c: JMP 0x001adf8e LAB_001adf8e: JMP 0x001adf90 LAB_001adf90: JMP 0x001adf92 LAB_001adf92: JMP 0x001adf94 LAB_001adf94: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVSXD RDX,dword ptr [RAX + 0x24] CALL 0x001ae0f0 CMP EAX,0x0 JNZ 0x001adfc7 JMP 0x001adfb0 LAB_001adfb0: JMP 0x001adfb2 LAB_001adfb2: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x1e484f] CALL 0x001ae160 MOV dword ptr [RBP + -0x4],EAX JMP 0x001adfd3 LAB_001adfc7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001ad800 MOV dword ptr [RBP + -0x4],EAX LAB_001adfd3: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_coll_parser_scan_logical_position(long param_1,int8 param_2,int8 param_3) { long lVar1; int iVar2; long lVar3; int4 local_c; lVar1 = *(long *)(param_1 + 0xf0); lVar3 = my_coll_parser_curr(param_1); iVar2 = lex_cmp(lVar3,"[first non-ignorable]",0x15); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x70); } else { iVar2 = lex_cmp(lVar3,"[last non-ignorable]",0x14); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x78); } else { iVar2 = lex_cmp(lVar3,"[first primary ignorable]",0x19); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x80); } else { iVar2 = lex_cmp(lVar3,"[last primary ignorable]",0x18); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x88); } else { iVar2 = lex_cmp(lVar3,"[first secondary ignorable]",0x1b); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x90); } else { iVar2 = lex_cmp(lVar3,"[last secondary ignorable]",0x1a); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x98); } else { iVar2 = lex_cmp(lVar3,"[first tertiary ignorable]",0x1a); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa0); } else { iVar2 = lex_cmp(lVar3,"[last tertiary ignorable]",0x19); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa8); } else { iVar2 = lex_cmp(lVar3,"[first trailing]",0x10); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb0); } else { iVar2 = lex_cmp(lVar3,"[last trailing]",0xf); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb8); } else { iVar2 = lex_cmp(lVar3,"[first variable]",0x10); if (iVar2 == 0) { *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xc0); } else { iVar2 = lex_cmp(lVar3,"[last variable]",0xf); if (iVar2 != 0) { return 0; } *(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 200); } } } } } } } } } } } iVar2 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar3 + 0x24)); if (iVar2 == 0) { local_c = my_coll_parser_too_long_error(param_1,"Logical position"); } else { local_c = my_coll_parser_scan(param_1); } return local_c; }
8,699
inline_mysql_file_seek
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_seek( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t pos, int whence, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_seek(file, pos, whence, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_seek(file, pos, whence, flags); return result; }
O0
c
inline_mysql_file_seek: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x20c1d8(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x8, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xbb463 leaq 0x20c192(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xfad90 movq %rax, -0x38(%rbp) leaq 0x20c15b(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xbb482 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xfad90 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x90, %rsp popq %rbp retq nop
inline_mysql_file_seek_5: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 8 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_BB463 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_BB482 loc_BB463: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_seek mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_BB482: mov rax, [rbp+var_8] add rsp, 90h pop rbp retn
long long inline_mysql_file_seek_5( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] long long v9; // [rsp+58h] [rbp-38h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL); if ( !v8 ) return my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14); v9 = my_seek(v13, v12, v11, v10); ((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL); return v9; }
inline_mysql_file_seek: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x8 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001bb463 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fad90 MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001bb482 LAB_001bb463: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fad90 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001bb482: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
int8 inline_mysql_file_seek (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int8 local_40; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8); if (local_48 == 0) { local_10 = my_seek(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c); local_40 = my_seek(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,0); local_10 = local_40; } return local_10; }