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
65,700
my_numchars_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_numchars_utf16(CHARSET_INFO *cs, const char *b, const char *e) { size_t nchars= 0; for ( ; ; nchars++) { size_t charlen= my_ismbchar(cs, b, e); if (!charlen) break; b+= charlen; } return nchars; }
O3
c
my_numchars_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0xb8(%rdi), %rax callq *0xc0(%rax) xorl %r12d, %r12d cmpl $0x2, %eax jl 0x4ee7e movl %eax, %eax addq %rax, %r14 incq %r12 movq 0xb8(%r15), %rax movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jg 0x4ee5b movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_numchars_utf16: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, [rdi+0B8h] call qword ptr [rax+0C0h] xor r12d, r12d cmp eax, 2 jl short loc_4EE7E loc_4EE5B: mov eax, eax add r14, rax inc r12 mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r14 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 1 jg short loc_4EE5B loc_4EE7E: mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_numchars_utf16(long long a1, long long a2, long long a3) { int v5; // eax long long v6; // r12 v5 = (*(long long (**)(void))(*(_QWORD *)(a1 + 184) + 192LL))(); v6 = 0LL; if ( v5 >= 2 ) { do { a2 += (unsigned int)v5; ++v6; v5 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, a2, a3); } while ( v5 > 1 ); } return v6; }
my_numchars_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0xc0] XOR R12D,R12D CMP EAX,0x2 JL 0x0014ee7e LAB_0014ee5b: MOV EAX,EAX ADD R14,RAX INC R12 MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JG 0x0014ee5b LAB_0014ee7e: MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_numchars_utf16(long param_1,long param_2,int8 param_3) { uint uVar1; long lVar2; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(); lVar2 = 0; while (1 < (int)uVar1) { param_2 = param_2 + (ulong)uVar1; lVar2 = lVar2 + 1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); } return lVar2; }
65,701
common_params_get_system_info[abi:cxx11](common_params const&)
llama.cpp/common/common.cpp
std::string common_params_get_system_info(const common_params & params) { std::ostringstream os; os << "system_info: n_threads = " << params.cpuparams.n_threads; if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); #else os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); #endif return os.str(); }
O3
cpp
common_params_get_system_info[abi:cxx11](common_params const&): pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x22000 leaq 0x30141(%rip), %rsi # 0x126062 movl $0x19, %edx movq %r15, %rdi callq 0x22060 movl 0x274(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x214f0 cmpl $-0x1, 0x488(%r14) je 0xf5f84 leaq 0x3012c(%rip), %rsi # 0x12607c leaq 0x8(%rsp), %rdi movl $0x14, %edx callq 0x22060 movl 0x488(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x214f0 leaq 0x27c0e(%rip), %rsi # 0x11db85 movl $0x1, %edx movq %rax, %rdi callq 0x22060 leaq 0x30106(%rip), %rsi # 0x126091 leaq 0x8(%rsp), %rdi movl $0x3, %edx callq 0x22060 callq 0x21de0 movl %eax, %esi leaq 0x8(%rsp), %rdi callq 0x21870 movq %rax, %r14 leaq 0x316cb(%rip), %rsi # 0x127680 movl $0x3, %edx movq %rax, %rdi callq 0x22060 callq 0x21060 movq %rax, %r15 testq %rax, %rax je 0xf5fe7 movq %r15, %rdi callq 0x21660 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x22060 jmp 0xf6001 movq (%r14), %rax movq -0x18(%rax), %rax movq %r14, %rdi addq %rax, %rdi movl 0x20(%r14,%rax), %esi orl $0x1, %esi callq 0x22290 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x21640 movq 0x6ef3b(%rip), %rsi # 0x164f50 leaq 0x8(%rsp), %rdi callq 0x21c70 leaq 0x78(%rsp), %rdi callq 0x21c40 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x6ef0d(%rip), %rsi # 0x164f50 leaq 0x8(%rsp), %rdi callq 0x21c70 leaq 0x78(%rsp), %rdi callq 0x21c40 movq %rbx, %rdi callq 0x21af0
_Z29common_params_get_system_infoB5cxx11RK13common_params: push r15 push r14 push rbx sub rsp, 180h mov r14, rsi mov rbx, rdi lea r15, [rsp+198h+var_190] mov rdi, r15 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aSystemInfoNThr; "system_info: n_threads = " mov edx, 19h mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+274h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_F5F84 lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] mov edx, 14h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+488h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aCompreplyCompg_2+3Ah; ")" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_F5F84: lea rsi, asc_126091; " / " lea rdi, [rsp+198h+var_190]; this mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax lea rdi, [rsp+198h+var_190] call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, asc_12767F+1; " | " mov edx, 3 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call _llama_print_system_info mov r15, rax test rax, rax jz short loc_F5FE7 mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_F6001 loc_F5FE7: mov rax, [r14] mov rax, [rax-18h] mov rdi, r14 add rdi, rax mov esi, [r14+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_F6001: lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+198h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_70]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v2; // rax unsigned int v3; // eax _QWORD *v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // rax _BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF _BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF std::ostringstream::basic_ostringstream(v9); std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL); std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL); v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160)); std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL); v3 = std::thread::hardware_concurrency((std::thread *)v9); v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3); std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL); v5 = llama_print_system_info(); v6 = v5; if ( v5 ) { v7 = strlen(v5); std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7); } else { std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u); } std::stringbuf::str(a1, v10); std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
common_params_get_system_info[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00122000 LAB_001f5f1a: LEA RSI,[0x226062] MOV EDX,0x19 MOV RDI,R15 CALL 0x00122060 MOV ESI,dword ptr [R14 + 0x274] LEA RDI,[RSP + 0x8] CALL 0x001214f0 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x001f5f84 LEA RSI,[0x22607c] LEA RDI,[RSP + 0x8] MOV EDX,0x14 CALL 0x00122060 MOV ESI,dword ptr [R14 + 0x488] LEA RDI,[RSP + 0x8] CALL 0x001214f0 LEA RSI,[0x21db85] MOV EDX,0x1 MOV RDI,RAX CALL 0x00122060 LAB_001f5f84: LEA RSI,[0x226091] LEA RDI,[RSP + 0x8] MOV EDX,0x3 CALL 0x00122060 CALL 0x00121de0 MOV ESI,EAX LEA RDI,[RSP + 0x8] CALL 0x00121870 MOV R14,RAX LEA RSI,[0x227680] MOV EDX,0x3 MOV RDI,RAX CALL 0x00122060 CALL 0x00121060 MOV R15,RAX TEST RAX,RAX JZ 0x001f5fe7 MOV RDI,R15 CALL 0x00121660 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x00122060 JMP 0x001f6001 LAB_001f5fe7: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,R14 ADD RDI,RAX MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00122290 LAB_001f6001: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00121640 LAB_001f600e: MOV RSI,qword ptr [0x00264f50] LEA RDI,[RSP + 0x8] CALL 0x00121c70 LEA RDI,[RSP + 0x78] CALL 0x00121c40 MOV RAX,RBX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { ostream *poVar1; char *__s; size_t sVar2; long in_RSI; ostringstream local_190 [112]; ios_base local_120 [264]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 001f5f1a to 001f600d has its CatchHandler @ 001f6039 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190,"system_info: n_threads = ",0x19); std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190," (n_threads_batch = ",0x14); poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488)); std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190); std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3); __s = (char *)llama_print_system_info(); if (__s == (char *)0x0) { std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18), *(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(__s); std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2); } std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); std::ios_base::~ios_base(local_120); return param_1; }
65,702
mi_memmap_file
eloqsql/storage/myisam/mi_packrec.c
my_bool _mi_memmap_file(MI_INFO *info) { MYISAM_SHARE *share=info->s; my_bool eom; DBUG_ENTER("mi_memmap_file"); if (!info->s->file_map) { my_off_t data_file_length= share->state.state.data_file_length; if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); eom= data_file_length > myisam_mmap_size - myisam_mmap_used - MEMMAP_EXTRA_MARGIN; if (!eom) myisam_mmap_used+= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } else eom= data_file_length > myisam_mmap_size - MEMMAP_EXTRA_MARGIN; if (eom) { DBUG_PRINT("warning", ("File is too large for mmap")); DBUG_RETURN(0); } if (mysql_file_seek(info->dfile, 0L, MY_SEEK_END, MYF(0)) < share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN) { DBUG_PRINT("warning",("File isn't extended for memmap")); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } if (mi_dynmap_file(info, share->state.state.data_file_length + MEMMAP_EXTRA_MARGIN)) { if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } DBUG_RETURN(0); } } info->opt_flag|= MEMMAP_USED; info->read_record= share->read_record= _mi_read_mempack_record; share->read_rnd= _mi_read_rnd_mempack_record; DBUG_RETURN(1); }
O0
c
mi_memmap_file: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x270(%rax) jne 0xc0d98 movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x28(%rbp) leaq 0x20c409(%rip), %rax # 0x2ccfe8 cmpq $-0x1, (%rax) je 0xc0c57 leaq 0xbd189c(%rip), %rdi # 0xc92488 leaq 0x9e7ce(%rip), %rsi # 0x15f3c1 movl $0x5e5, %edx # imm = 0x5E5 callq 0xc0df0 movq -0x28(%rbp), %rax leaq 0x20c3e0(%rip), %rcx # 0x2ccfe8 movq (%rcx), %rcx leaq 0xbc8a5e(%rip), %rdx # 0xc89670 subq (%rdx), %rcx subq $0x7, %rcx cmpq %rcx, %rax seta %al andb $0x1, %al movzbl %al, %eax movb %al, -0x19(%rbp) cmpb $0x0, -0x19(%rbp) jne 0xc0c49 movq -0x28(%rbp), %rcx addq $0x7, %rcx leaq 0xbc8a34(%rip), %rax # 0xc89670 addq (%rax), %rcx leaq 0xbc8a2a(%rip), %rax # 0xc89670 movq %rcx, (%rax) leaq 0xbd1838(%rip), %rdi # 0xc92488 callq 0xc0e60 jmp 0xc0c77 movq -0x28(%rbp), %rax leaq 0x20c386(%rip), %rcx # 0x2ccfe8 movq (%rcx), %rcx subq $0x7, %rcx cmpq %rcx, %rax seta %al andb $0x1, %al movzbl %al, %eax movb %al, -0x19(%rbp) cmpb $0x0, -0x19(%rbp) je 0xc0c8c jmp 0xc0c7f jmp 0xc0c81 jmp 0xc0c83 movb $0x0, -0x1(%rbp) jmp 0xc0de5 movq -0x10(%rbp), %rax movl 0x1c0(%rax), %edx leaq 0x9e724(%rip), %rdi # 0x15f3c1 movl $0x5f3, %esi # imm = 0x5F3 xorl %eax, %eax movl %eax, %r9d movl $0x2, %r8d movq %r9, %rcx callq 0xc09f0 movq -0x18(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0x7, %rcx cmpq %rcx, %rax jae 0xc0d25 jmp 0xc0cc8 jmp 0xc0cca leaq 0x20c317(%rip), %rax # 0x2ccfe8 cmpq $-0x1, (%rax) je 0xc0d1a leaq 0xbd17aa(%rip), %rdi # 0xc92488 leaq 0x9e6dc(%rip), %rsi # 0x15f3c1 movl $0x5f9, %edx # imm = 0x5F9 callq 0xc0df0 movq -0x28(%rbp), %rax addq $0x7, %rax leaq 0xbc8972(%rip), %rcx # 0xc89670 movq (%rcx), %rcx subq %rax, %rcx leaq 0xbc8965(%rip), %rax # 0xc89670 movq %rcx, (%rax) leaq 0xbd1773(%rip), %rdi # 0xc92488 callq 0xc0e60 jmp 0xc0d1c movb $0x0, -0x1(%rbp) jmp 0xc0de5 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x40(%rax), %rsi addq $0x7, %rsi callq 0xabf70 cmpb $0x0, %al je 0xc0d96 leaq 0x20c2a3(%rip), %rax # 0x2ccfe8 cmpq $-0x1, (%rax) je 0xc0d8e leaq 0xbd1736(%rip), %rdi # 0xc92488 leaq 0x9e668(%rip), %rsi # 0x15f3c1 movl $0x605, %edx # imm = 0x605 callq 0xc0df0 movq -0x28(%rbp), %rax addq $0x7, %rax leaq 0xbc88fe(%rip), %rcx # 0xc89670 movq (%rcx), %rcx subq %rax, %rcx leaq 0xbc88f1(%rip), %rax # 0xc89670 movq %rcx, (%rax) leaq 0xbd16ff(%rip), %rdi # 0xc92488 callq 0xc0e60 jmp 0xc0d90 movb $0x0, -0x1(%rbp) jmp 0xc0de5 jmp 0xc0d98 movq -0x10(%rbp), %rax movl 0x1c8(%rax), %ecx orl $0x20, %ecx movl %ecx, 0x1c8(%rax) movq -0x18(%rbp), %rax leaq 0x10a(%rip), %rcx # 0xc0ec0 movq %rcx, 0x298(%rax) movq -0x10(%rbp), %rax leaq 0xf8(%rip), %rcx # 0xc0ec0 movq %rcx, 0x140(%rax) movq -0x18(%rbp), %rax leaq 0x1d6(%rip), %rcx # 0xc0fb0 movq %rcx, 0x2b8(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nop
_mi_memmap_file: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] cmp qword ptr [rax+270h], 0 jnz loc_C0D98 mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_28], rax lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_C0C57 lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5E5h call inline_mysql_mutex_lock_21 mov rax, [rbp+var_28] lea rcx, myisam_mmap_size mov rcx, [rcx] lea rdx, myisam_mmap_used sub rcx, [rdx] sub rcx, 7 cmp rax, rcx setnbe al and al, 1 movzx eax, al mov [rbp+var_19], al cmp [rbp+var_19], 0 jnz short loc_C0C49 mov rcx, [rbp+var_28] add rcx, 7 lea rax, myisam_mmap_used add rcx, [rax] lea rax, myisam_mmap_used mov [rax], rcx loc_C0C49: lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 jmp short loc_C0C77 loc_C0C57: mov rax, [rbp+var_28] lea rcx, myisam_mmap_size mov rcx, [rcx] sub rcx, 7 cmp rax, rcx setnbe al and al, 1 movzx eax, al mov [rbp+var_19], al loc_C0C77: cmp [rbp+var_19], 0 jz short loc_C0C8C jmp short $+2 loc_C0C7F: jmp short $+2 loc_C0C81: jmp short $+2 loc_C0C83: mov [rbp+var_1], 0 jmp loc_C0DE5 loc_C0C8C: mov rax, [rbp+var_10] mov edx, [rax+1C0h] lea rdi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 5F3h xor eax, eax mov r9d, eax mov r8d, 2 mov rcx, r9 call inline_mysql_file_seek_5 mov rcx, [rbp+var_18] mov rcx, [rcx+40h] add rcx, 7 cmp rax, rcx jnb short loc_C0D25 jmp short $+2 loc_C0CC8: jmp short $+2 loc_C0CCA: lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_C0D1A lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5F9h call inline_mysql_mutex_lock_21 mov rax, [rbp+var_28] add rax, 7 lea rcx, myisam_mmap_used mov rcx, [rcx] sub rcx, rax lea rax, myisam_mmap_used mov [rax], rcx lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 loc_C0D1A: jmp short $+2 loc_C0D1C: mov [rbp+var_1], 0 jmp loc_C0DE5 loc_C0D25: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+40h] add rsi, 7 call mi_dynmap_file cmp al, 0 jz short loc_C0D96 lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_C0D8E lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 605h call inline_mysql_mutex_lock_21 mov rax, [rbp+var_28] add rax, 7 lea rcx, myisam_mmap_used mov rcx, [rcx] sub rcx, rax lea rax, myisam_mmap_used mov [rax], rcx lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 loc_C0D8E: jmp short $+2 loc_C0D90: mov [rbp+var_1], 0 jmp short loc_C0DE5 loc_C0D96: jmp short $+2 loc_C0D98: mov rax, [rbp+var_10] mov ecx, [rax+1C8h] or ecx, 20h mov [rax+1C8h], ecx mov rax, [rbp+var_18] lea rcx, _mi_read_mempack_record mov [rax+298h], rcx mov rax, [rbp+var_10] lea rcx, _mi_read_mempack_record mov [rax+140h], rcx mov rax, [rbp+var_18] lea rcx, _mi_read_rnd_mempack_record mov [rax+2B8h], rcx mov [rbp+var_1], 1 loc_C0DE5: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mi_memmap_file(unsigned int *a1) { unsigned long long v1; // rcx unsigned long long v3; // [rsp+8h] [rbp-28h] bool v4; // [rsp+17h] [rbp-19h] _QWORD *v5; // [rsp+18h] [rbp-18h] v5 = *(_QWORD **)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) ) goto LABEL_17; v3 = v5[8]; if ( myisam_mmap_size == -1LL ) { v4 = v3 > 0xFFFFFFFFFFFFFFF8LL; } else { inline_mysql_mutex_lock_21( &THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1509LL); v1 = myisam_mmap_size - myisam_mmap_used - 7LL; v4 = v3 > v1; if ( v3 <= v1 ) myisam_mmap_used += v3 + 7; inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap); } if ( v4 ) return 0; if ( inline_mysql_file_seek_5( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x5F3u, a1[112], 0LL, 2u, 0LL) < (unsigned long long)(v5[8] + 7LL) ) { if ( myisam_mmap_size != -1LL ) { inline_mysql_mutex_lock_21( &THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1529LL); myisam_mmap_used -= v3 + 7; inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap); } return 0; } if ( !mi_dynmap_file(a1, v5[8] + 7LL) ) { LABEL_17: a1[114] |= 0x20u; v5[83] = mi_read_mempack_record; *((_QWORD *)a1 + 40) = mi_read_mempack_record; v5[87] = mi_read_rnd_mempack_record; return 1; } if ( myisam_mmap_size != -1LL ) { inline_mysql_mutex_lock_21( &THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1541LL); myisam_mmap_used -= v3 + 7; inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap); } return 0; }
_mi_memmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x270],0x0 JNZ 0x001c0d98 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x28],RAX LEA RAX,[0x3ccfe8] CMP qword ptr [RAX],-0x1 JZ 0x001c0c57 LEA RDI,[0xd92488] LEA RSI,[0x25f3c1] MOV EDX,0x5e5 CALL 0x001c0df0 MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x3ccfe8] MOV RCX,qword ptr [RCX] LEA RDX,[0xd89670] SUB RCX,qword ptr [RDX] SUB RCX,0x7 CMP RAX,RCX SETA AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x19],AL CMP byte ptr [RBP + -0x19],0x0 JNZ 0x001c0c49 MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x7 LEA RAX,[0xd89670] ADD RCX,qword ptr [RAX] LEA RAX,[0xd89670] MOV qword ptr [RAX],RCX LAB_001c0c49: LEA RDI,[0xd92488] CALL 0x001c0e60 JMP 0x001c0c77 LAB_001c0c57: MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x3ccfe8] MOV RCX,qword ptr [RCX] SUB RCX,0x7 CMP RAX,RCX SETA AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x19],AL LAB_001c0c77: CMP byte ptr [RBP + -0x19],0x0 JZ 0x001c0c8c JMP 0x001c0c7f LAB_001c0c7f: JMP 0x001c0c81 LAB_001c0c81: JMP 0x001c0c83 LAB_001c0c83: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001c0de5 LAB_001c0c8c: MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x1c0] LEA RDI,[0x25f3c1] MOV ESI,0x5f3 XOR EAX,EAX MOV R9D,EAX MOV R8D,0x2 MOV RCX,R9 CALL 0x001c09f0 MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0x7 CMP RAX,RCX JNC 0x001c0d25 JMP 0x001c0cc8 LAB_001c0cc8: JMP 0x001c0cca LAB_001c0cca: LEA RAX,[0x3ccfe8] CMP qword ptr [RAX],-0x1 JZ 0x001c0d1a LEA RDI,[0xd92488] LEA RSI,[0x25f3c1] MOV EDX,0x5f9 CALL 0x001c0df0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x7 LEA RCX,[0xd89670] MOV RCX,qword ptr [RCX] SUB RCX,RAX LEA RAX,[0xd89670] MOV qword ptr [RAX],RCX LEA RDI,[0xd92488] CALL 0x001c0e60 LAB_001c0d1a: JMP 0x001c0d1c LAB_001c0d1c: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001c0de5 LAB_001c0d25: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x40] ADD RSI,0x7 CALL 0x001abf70 CMP AL,0x0 JZ 0x001c0d96 LEA RAX,[0x3ccfe8] CMP qword ptr [RAX],-0x1 JZ 0x001c0d8e LEA RDI,[0xd92488] LEA RSI,[0x25f3c1] MOV EDX,0x605 CALL 0x001c0df0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x7 LEA RCX,[0xd89670] MOV RCX,qword ptr [RCX] SUB RCX,RAX LEA RAX,[0xd89670] MOV qword ptr [RAX],RCX LEA RDI,[0xd92488] CALL 0x001c0e60 LAB_001c0d8e: JMP 0x001c0d90 LAB_001c0d90: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001c0de5 LAB_001c0d96: JMP 0x001c0d98 LAB_001c0d98: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x1c8] OR ECX,0x20 MOV dword ptr [RAX + 0x1c8],ECX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x1c0ec0] MOV qword ptr [RAX + 0x298],RCX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x1c0ec0] MOV qword ptr [RAX + 0x140],RCX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x1c0fb0] MOV qword ptr [RAX + 0x2b8],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_001c0de5: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 _mi_memmap_file(long *param_1) { long lVar1; ulong uVar2; bool bVar3; char cVar4; ulong uVar5; lVar1 = *param_1; if (*(long *)(*param_1 + 0x270) == 0) { uVar2 = *(ulong *)(lVar1 + 0x40); if (myisam_mmap_size == -1) { bVar3 = 0xfffffffffffffff8 < uVar2; } else { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5e5); bVar3 = (myisam_mmap_size - myisam_mmap_used) - 7U < uVar2; if (!bVar3) { myisam_mmap_used = uVar2 + 7 + myisam_mmap_used; } inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } if (bVar3) { return 0; } uVar5 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5f3, (int)param_1[0x38],0,2); if (uVar5 < *(long *)(lVar1 + 0x40) + 7U) { if (myisam_mmap_size != -1) { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5f9); myisam_mmap_used = myisam_mmap_used - (uVar2 + 7); inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } return 0; } cVar4 = mi_dynmap_file(param_1,*(long *)(lVar1 + 0x40) + 7); if (cVar4 != '\0') { if (myisam_mmap_size != -1) { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x605); myisam_mmap_used = myisam_mmap_used - (uVar2 + 7); inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } return 0; } } *(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) | 0x20; *(code **)(lVar1 + 0x298) = _mi_read_mempack_record; param_1[0x28] = (long)_mi_read_mempack_record; *(code **)(lVar1 + 0x2b8) = _mi_read_rnd_mempack_record; return 1; }
65,703
my_timer_cycles
eloqsql/include/my_rdtsc.h
C_MODE_START /** A cycle timer. On clang we use __builtin_readcyclecounter(), except for AARCH64. On other compilers: On IA-32 and AMD64, we use the RDTSC instruction. On IA-64, we read the ar.itc register. On SPARC, we read the tick register. On POWER, we read the Time Base Register (which is not really a cycle count but a separate counter with less than nanosecond resolution). On IBM S/390 System z we use the STCK instruction. On ARM, we probably should use the Generic Timer, but should figure out how to ensure that it can be accessed. On AARCH64, we use the generic timer base register. We override clang implementation for aarch64 as it access a PMU register which is not guarenteed to be active. Sadly, we have nothing for the Digital Alpha, MIPS, Motorola m68k, HP PA-RISC or other non-mainstream (or obsolete) processors. TODO: consider C++11 std::chrono::high_resolution_clock. We fall back to gethrtime() where available. On the platforms that do not have a CYCLE timer, "wait" events are initialized to use NANOSECOND instead of CYCLE during performance_schema initialization (at the server startup). Linux performance monitor (see "man perf_event_open") can provide cycle counter on the platforms that do not have other kinds of cycle counters. But we don't use it so far. ARM notes --------- During tests on ARMv7 Debian, perf_even_open() based cycle counter provided too low frequency with too high overhead: MariaDB [performance_schema]> SELECT * FROM performance_timers; +-------------+-----------------+------------------+----------------+ | TIMER_NAME | TIMER_FREQUENCY | TIMER_RESOLUTION | TIMER_OVERHEAD | +-------------+-----------------+------------------+----------------+ | CYCLE | 689368159 | 1 | 970 | | NANOSECOND | 1000000000 | 1 | 308 | | MICROSECOND | 1000000 | 1 | 417 | | MILLISECOND | 1000 | 1000 | 407 | | TICK | 127 | 1 | 612 | +-------------+-----------------+------------------+----------------+ Therefore, it was decided not to use perf_even_open() on ARM (i.e. go without CYCLE and have "wait" events use NANOSECOND by default). @return the current timer value, in cycles. */ static inline ulonglong my_timer_cycles(void) { # if __has_builtin(__builtin_readcyclecounter) && !defined (__aarch64__) return __builtin_readcyclecounter(); # elif defined _M_IX86 || defined _M_X64 || defined __i386__ || defined __x86_64__ return __rdtsc(); #elif defined _M_ARM64 return _ReadStatusReg(ARM64_CNTVCT); # elif defined(__INTEL_COMPILER) && defined(__ia64__) && defined(HAVE_IA64INTRIN_H) return (ulonglong) __getReg(_IA64_REG_AR_ITC); /* (3116) */ #elif defined(__GNUC__) && defined(__ia64__) { ulonglong result; __asm __volatile__ ("mov %0=ar.itc" : "=r" (result)); return result; } #elif defined __GNUC__ && defined __powerpc__ return __builtin_ppc_get_timebase(); #elif defined(__GNUC__) && defined(__sparcv9) && defined(_LP64) { ulonglong result; __asm __volatile__ ("rd %%tick,%0" : "=r" (result)); return result; } #elif defined(__GNUC__) && defined(__sparc__) && !defined(_LP64) { union { ulonglong wholeresult; struct { ulong high; ulong low; } splitresult; } result; __asm __volatile__ ("rd %%tick,%1; srlx %1,32,%0" : "=r" (result.splitresult.high), "=r" (result.splitresult.low)); return result.wholeresult; } #elif defined(__GNUC__) && defined(__s390__) /* covers both s390 and s390x */ { ulonglong result; __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc"); return result; } #elif defined(__GNUC__) && defined (__aarch64__) { ulonglong result; __asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result)); return result; } #elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME) /* gethrtime may appear as either cycle or nanosecond counter */ return (ulonglong) gethrtime(); #else return 0; #endif }
O0
c
my_timer_cycles: pushq %rbp movq %rsp, %rbp rdtsc shlq $0x20, %rdx orq %rdx, %rax popq %rbp retq nop
my_timer_cycles: push rbp mov rbp, rsp rdtsc shl rdx, 20h or rax, rdx pop rbp retn
unsigned long long my_timer_cycles() { return __rdtsc(); }
my_timer_cycles: PUSH RBP MOV RBP,RSP RDTSC SHL RDX,0x20 OR RAX,RDX POP RBP RET
ulong my_timer_cycles(void) { ulong uVar1; int8 in_RAX; uVar1 = rdtsc(); return CONCAT44((int)((ulong)in_RAX >> 0x20),(int)uVar1) | uVar1 & 0xffffffff00000000; }
65,704
pack_dirname
eloqsql/mysys/mf_pack.c
void pack_dirname(char * to, const char *from) { int cwd_err; size_t d_length,length,UNINIT_VAR(buff_length); char * start; char buff[FN_REFLEN + 1]; DBUG_ENTER("pack_dirname"); (void) intern_filename(to,from); /* Change to intern name */ #ifdef FN_DEVCHAR if ((start=strrchr(to,FN_DEVCHAR)) != 0) /* Skip device part */ start++; else #endif start=to; if (!(cwd_err= my_getwd(buff,FN_REFLEN,MYF(0)))) { buff_length= strlen(buff); d_length= (size_t) (start-to); if ((start == to || (buff_length == d_length && !memcmp(buff,start,d_length))) && *start != FN_LIBCHAR && *start) { /* Put current dir before */ bchange((uchar*) to, d_length, (uchar*) buff, buff_length, strlen(to)+1); } } if ((d_length= cleanup_dirname(to,to)) != 0) { length=0; if (home_dir) { length= strlen(home_dir); if (home_dir[length-1] == FN_LIBCHAR) length--; /* Don't test last '/' */ } if (length > 1 && length < d_length) { /* test if /xx/yy -> ~/yy */ if (memcmp(to,home_dir,length) == 0 && to[length] == FN_LIBCHAR) { to[0]=FN_HOMELIB; /* Filename begins with ~ */ (void) strmov_overlapp(to+1,to+length); } } if (! cwd_err) { /* Test if cwd is ~/... */ if (length > 1 && length < buff_length) { if (memcmp(buff,home_dir,length) == 0 && buff[length] == FN_LIBCHAR) { buff[0]=FN_HOMELIB; (void) strmov_overlapp(buff+1,buff+length); } } if (is_prefix(to,buff)) { length= strlen(buff); if (to[length]) (void) strmov_overlapp(to,to+length); /* Remove everything before */ else { to[0]= FN_CURLIB; /* Put ./ instead of cwd */ to[1]= FN_LIBCHAR; to[2]= '\0'; } } } } DBUG_PRINT("exit",("to: '%s'",to)); DBUG_VOID_RETURN; }
O0
c
pack_dirname: pushq %rbp movq %rsp, %rbp subq $0x270, %rsp # imm = 0x270 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0x2db50 movq -0x218(%rbp), %rax movq %rax, -0x248(%rbp) leaq -0x210(%rbp), %rdi movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x2ec10 movl %eax, -0x224(%rbp) cmpl $0x0, %eax jne 0x2d917 leaq -0x210(%rbp), %rdi callq 0x24130 movq %rax, -0x240(%rbp) movq -0x248(%rbp), %rax movq -0x218(%rbp), %rcx subq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x248(%rbp), %rax cmpq -0x218(%rbp), %rax je 0x2d88b movq -0x240(%rbp), %rax cmpq -0x230(%rbp), %rax jne 0x2d915 leaq -0x210(%rbp), %rdi movq -0x248(%rbp), %rsi movq -0x230(%rbp), %rdx callq 0x24140 cmpl $0x0, %eax jne 0x2d915 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0x2d915 movq -0x248(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x2d915 movq -0x218(%rbp), %rax movq %rax, -0x268(%rbp) movq -0x230(%rbp), %rax movq %rax, -0x260(%rbp) leaq -0x210(%rbp), %rax movq %rax, -0x258(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi callq 0x24130 movq -0x268(%rbp), %rdi movq -0x260(%rbp), %rsi movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq %rax, %r8 addq $0x1, %r8 callq 0x34520 jmp 0x2d917 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi callq 0x2dc40 movq %rax, -0x230(%rbp) cmpq $0x0, %rax je 0x2db1d movq $0x0, -0x238(%rbp) leaq 0x35839b(%rip), %rax # 0x385ce8 cmpq $0x0, (%rax) je 0x2d99b leaq 0x35838e(%rip), %rax # 0x385ce8 movq (%rax), %rdi callq 0x24130 movq %rax, -0x238(%rbp) leaq 0x358378(%rip), %rax # 0x385ce8 movq (%rax), %rax movq -0x238(%rbp), %rcx subq $0x1, %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x2d999 movq -0x238(%rbp), %rax addq $-0x1, %rax movq %rax, -0x238(%rbp) jmp 0x2d99b cmpq $0x1, -0x238(%rbp) jbe 0x2da18 movq -0x238(%rbp), %rax cmpq -0x230(%rbp), %rax jae 0x2da18 movq -0x218(%rbp), %rdi leaq 0x358325(%rip), %rax # 0x385ce8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x24140 cmpl $0x0, %eax jne 0x2da16 movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax jne 0x2da16 movq -0x218(%rbp), %rax movb $0x7e, (%rax) movq -0x218(%rbp), %rdi addq $0x1, %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x78e20 jmp 0x2da18 cmpl $0x0, -0x224(%rbp) jne 0x2db1b cmpq $0x1, -0x238(%rbp) jbe 0x2da9c movq -0x238(%rbp), %rax cmpq -0x240(%rbp), %rax jae 0x2da9c leaq -0x210(%rbp), %rdi leaq 0x35829b(%rip), %rax # 0x385ce8 movq (%rax), %rsi movq -0x238(%rbp), %rdx callq 0x24140 cmpl $0x0, %eax jne 0x2da9a movq -0x238(%rbp), %rax movsbl -0x210(%rbp,%rax), %eax cmpl $0x2f, %eax jne 0x2da9a movb $0x7e, -0x210(%rbp) leaq -0x210(%rbp), %rdi addq $0x1, %rdi leaq -0x210(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x78e20 jmp 0x2da9c movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x73da0 cmpl $0x0, %eax je 0x2db19 leaq -0x210(%rbp), %rdi callq 0x24130 movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x238(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x2daf7 movq -0x218(%rbp), %rdi movq -0x218(%rbp), %rsi addq -0x238(%rbp), %rsi callq 0x78e20 jmp 0x2db17 movq -0x218(%rbp), %rax movb $0x2e, (%rax) movq -0x218(%rbp), %rax movb $0x2f, 0x1(%rax) movq -0x218(%rbp), %rax movb $0x0, 0x2(%rax) jmp 0x2db19 jmp 0x2db1b jmp 0x2db1d jmp 0x2db1f jmp 0x2db21 jmp 0x2db23 jmp 0x2db25 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2db40 addq $0x270, %rsp # imm = 0x270 popq %rbp retq callq 0x24320 nopw %cs:(%rax,%rax)
pack_dirname: push rbp mov rbp, rsp sub rsp, 270h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_240] mov [rbp+var_240], rax mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] call intern_filename mov rax, [rbp+var_218] mov [rbp+var_248], rax lea rdi, [rbp+var_210] mov esi, 200h xor eax, eax mov edx, eax call my_getwd mov [rbp+var_224], eax cmp eax, 0 jnz loc_2D917 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_240], rax mov rax, [rbp+var_248] mov rcx, [rbp+var_218] sub rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_248] cmp rax, [rbp+var_218] jz short loc_2D88B mov rax, [rbp+var_240] cmp rax, [rbp+var_230] jnz loc_2D915 lea rdi, [rbp+var_210] mov rsi, [rbp+var_248] mov rdx, [rbp+var_230] call _memcmp cmp eax, 0 jnz loc_2D915 loc_2D88B: mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_2D915 mov rax, [rbp+var_248] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_2D915 mov rax, [rbp+var_218] mov [rbp+var_268], rax mov rax, [rbp+var_230] mov [rbp+var_260], rax lea rax, [rbp+var_210] mov [rbp+var_258], rax mov rax, [rbp+var_240] mov [rbp+var_250], rax mov rdi, [rbp+var_218] call _strlen mov rdi, [rbp+var_268] mov rsi, [rbp+var_260] mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r8, rax add r8, 1 call bchange loc_2D915: jmp short $+2 loc_2D917: mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] call cleanup_dirname mov [rbp+var_230], rax cmp rax, 0 jz loc_2DB1D mov [rbp+var_238], 0 lea rax, home_dir cmp qword ptr [rax], 0 jz short loc_2D99B lea rax, home_dir mov rdi, [rax] call _strlen mov [rbp+var_238], rax lea rax, home_dir mov rax, [rax] mov rcx, [rbp+var_238] sub rcx, 1 movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_2D999 mov rax, [rbp+var_238] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_238], rax loc_2D999: jmp short $+2 loc_2D99B: cmp [rbp+var_238], 1 jbe short loc_2DA18 mov rax, [rbp+var_238] cmp rax, [rbp+var_230] jnb short loc_2DA18 mov rdi, [rbp+var_218] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_2DA16 mov rax, [rbp+var_218] mov rcx, [rbp+var_238] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jnz short loc_2DA16 mov rax, [rbp+var_218] mov byte ptr [rax], 7Eh ; '~' mov rdi, [rbp+var_218] add rdi, 1 mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp loc_2DA16: jmp short $+2 loc_2DA18: cmp [rbp+var_224], 0 jnz loc_2DB1B cmp [rbp+var_238], 1 jbe short loc_2DA9C mov rax, [rbp+var_238] cmp rax, [rbp+var_240] jnb short loc_2DA9C lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] mov rdx, [rbp+var_238] call _memcmp cmp eax, 0 jnz short loc_2DA9A mov rax, [rbp+var_238] movsx eax, [rbp+rax+var_210] cmp eax, 2Fh ; '/' jnz short loc_2DA9A mov [rbp+var_210], 7Eh ; '~' lea rdi, [rbp+var_210] add rdi, 1 lea rsi, [rbp+var_210] add rsi, [rbp+var_238] call strmov_overlapp loc_2DA9A: jmp short $+2 loc_2DA9C: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call is_prefix cmp eax, 0 jz short loc_2DB19 lea rdi, [rbp+var_210] call _strlen mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_238] cmp byte ptr [rax+rcx], 0 jz short loc_2DAF7 mov rdi, [rbp+var_218] mov rsi, [rbp+var_218] add rsi, [rbp+var_238] call strmov_overlapp jmp short loc_2DB17 loc_2DAF7: mov rax, [rbp+var_218] mov byte ptr [rax], 2Eh ; '.' mov rax, [rbp+var_218] mov byte ptr [rax+1], 2Fh ; '/' mov rax, [rbp+var_218] mov byte ptr [rax+2], 0 loc_2DB17: jmp short $+2 loc_2DB19: jmp short $+2 loc_2DB1B: jmp short $+2 loc_2DB1D: jmp short $+2 loc_2DB1F: jmp short $+2 loc_2DB21: jmp short $+2 loc_2DB23: jmp short $+2 loc_2DB25: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2DB40 add rsp, 270h pop rbp retn loc_2DB40: call ___stack_chk_fail
unsigned long long pack_dirname(_BYTE *a1, long long a2) { long long v2; // rax unsigned long long v4; // [rsp+30h] [rbp-240h] unsigned long long v5; // [rsp+38h] [rbp-238h] long long v6; // [rsp+38h] [rbp-238h] long long v7; // [rsp+40h] [rbp-230h] unsigned long long v8; // [rsp+40h] [rbp-230h] int v9; // [rsp+4Ch] [rbp-224h] _BYTE *v10; // [rsp+58h] [rbp-218h] char v11; // [rsp+60h] [rbp-210h] BYREF _BYTE v12[527]; // [rsp+61h] [rbp-20Fh] BYREF *(_QWORD *)&v12[519] = __readfsqword(0x28u); v10 = a1; intern_filename(a1, a2); v9 = my_getwd(&v11, 512LL, 0LL); if ( !v9 ) { v4 = strlen(&v11); v7 = a1 - v10; if ( (a1 == v10 || v4 == v7 && !(unsigned int)memcmp(&v11, a1, v7)) && *a1 != 47 && *a1 ) { v2 = strlen(v10); bchange(v10, v7, &v11, v4, v2 + 1); } } v8 = cleanup_dirname(v10, v10); if ( v8 ) { v5 = 0LL; if ( home_dir ) { v5 = strlen(home_dir); if ( *(_BYTE *)(home_dir + v5 - 1) == 47 ) --v5; } if ( v5 > 1 && v5 < v8 && !(unsigned int)memcmp(v10, home_dir, v5) && v10[v5] == 47 ) { *v10 = 126; strmov_overlapp(v10 + 1, &v10[v5]); } if ( !v9 ) { if ( v5 > 1 && v5 < v4 && !(unsigned int)memcmp(&v11, home_dir, v5) && v12[v5 - 1] == 47 ) { v11 = 126; strmov_overlapp(v12, &v12[v5 - 1]); } if ( (unsigned int)is_prefix(v10, &v11) ) { v6 = strlen(&v11); if ( v10[v6] ) { strmov_overlapp(v10, &v10[v6]); } else { *v10 = 46; v10[1] = 47; v10[2] = 0; } } } } return __readfsqword(0x28u); }
pack_dirname: PUSH RBP MOV RBP,RSP SUB RSP,0x270 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x240],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] CALL 0x0012db50 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x248],RAX LEA RDI,[RBP + -0x210] MOV ESI,0x200 XOR EAX,EAX MOV EDX,EAX CALL 0x0012ec10 MOV dword ptr [RBP + -0x224],EAX CMP EAX,0x0 JNZ 0x0012d917 LEA RDI,[RBP + -0x210] CALL 0x00124130 MOV qword ptr [RBP + -0x240],RAX MOV RAX,qword ptr [RBP + -0x248] MOV RCX,qword ptr [RBP + -0x218] SUB RAX,RCX MOV qword ptr [RBP + -0x230],RAX MOV RAX,qword ptr [RBP + -0x248] CMP RAX,qword ptr [RBP + -0x218] JZ 0x0012d88b MOV RAX,qword ptr [RBP + -0x240] CMP RAX,qword ptr [RBP + -0x230] JNZ 0x0012d915 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x230] CALL 0x00124140 CMP EAX,0x0 JNZ 0x0012d915 LAB_0012d88b: MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x0012d915 MOV RAX,qword ptr [RBP + -0x248] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0012d915 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x268],RAX MOV RAX,qword ptr [RBP + -0x230] MOV qword ptr [RBP + -0x260],RAX LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr [RBP + -0x240] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] CALL 0x00124130 MOV RDI,qword ptr [RBP + -0x268] MOV RSI,qword ptr [RBP + -0x260] MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R8,RAX ADD R8,0x1 CALL 0x00134520 LAB_0012d915: JMP 0x0012d917 LAB_0012d917: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] CALL 0x0012dc40 MOV qword ptr [RBP + -0x230],RAX CMP RAX,0x0 JZ 0x0012db1d MOV qword ptr [RBP + -0x238],0x0 LEA RAX,[0x485ce8] CMP qword ptr [RAX],0x0 JZ 0x0012d99b LEA RAX,[0x485ce8] MOV RDI,qword ptr [RAX] CALL 0x00124130 MOV qword ptr [RBP + -0x238],RAX LEA RAX,[0x485ce8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x238] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x0012d999 MOV RAX,qword ptr [RBP + -0x238] ADD RAX,-0x1 MOV qword ptr [RBP + -0x238],RAX LAB_0012d999: JMP 0x0012d99b LAB_0012d99b: CMP qword ptr [RBP + -0x238],0x1 JBE 0x0012da18 MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x230] JNC 0x0012da18 MOV RDI,qword ptr [RBP + -0x218] LEA RAX,[0x485ce8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00124140 CMP EAX,0x0 JNZ 0x0012da16 MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JNZ 0x0012da16 MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x7e MOV RDI,qword ptr [RBP + -0x218] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00178e20 LAB_0012da16: JMP 0x0012da18 LAB_0012da18: CMP dword ptr [RBP + -0x224],0x0 JNZ 0x0012db1b CMP qword ptr [RBP + -0x238],0x1 JBE 0x0012da9c MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x240] JNC 0x0012da9c LEA RDI,[RBP + -0x210] LEA RAX,[0x485ce8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x238] CALL 0x00124140 CMP EAX,0x0 JNZ 0x0012da9a MOV RAX,qword ptr [RBP + -0x238] MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x210] CMP EAX,0x2f JNZ 0x0012da9a MOV byte ptr [RBP + -0x210],0x7e LEA RDI,[RBP + -0x210] ADD RDI,0x1 LEA RSI,[RBP + -0x210] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00178e20 LAB_0012da9a: JMP 0x0012da9c LAB_0012da9c: MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x00173da0 CMP EAX,0x0 JZ 0x0012db19 LEA RDI,[RBP + -0x210] CALL 0x00124130 MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x238] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x0012daf7 MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x218] ADD RSI,qword ptr [RBP + -0x238] CALL 0x00178e20 JMP 0x0012db17 LAB_0012daf7: MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX],0x2e MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x1],0x2f MOV RAX,qword ptr [RBP + -0x218] MOV byte ptr [RAX + 0x2],0x0 LAB_0012db17: JMP 0x0012db19 LAB_0012db19: JMP 0x0012db1b LAB_0012db1b: JMP 0x0012db1d LAB_0012db1d: JMP 0x0012db1f LAB_0012db1f: JMP 0x0012db21 LAB_0012db21: JMP 0x0012db23 LAB_0012db23: JMP 0x0012db25 LAB_0012db25: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012db40 ADD RSP,0x270 POP RBP RET LAB_0012db40: CALL 0x00124320
/* WARNING: Removing unreachable block (ram,0x0012d854) */ /* WARNING: Removing unreachable block (ram,0x0012d868) */ void pack_dirname(char *param_1,int8 param_2) { int iVar1; int iVar2; size_t sVar3; ulong uVar4; long in_FS_OFFSET; ulong local_248; ulong local_240; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); intern_filename(param_1,param_2); iVar1 = my_getwd(local_218,0x200,0); if (((iVar1 == 0) && (local_248 = strlen(local_218), *param_1 != '/')) && (*param_1 != '\0')) { sVar3 = strlen(param_1); bchange(param_1,0,local_218,local_248,sVar3 + 1); } uVar4 = cleanup_dirname(param_1,param_1); if (uVar4 != 0) { local_240 = 0; if ((home_dir != (char *)0x0) && (local_240 = strlen(home_dir), home_dir[local_240 - 1] == '/')) { local_240 = local_240 - 1; } if (((1 < local_240) && (local_240 < uVar4)) && ((iVar2 = memcmp(param_1,home_dir,local_240), iVar2 == 0 && (param_1[local_240] == '/')))) { *param_1 = '~'; strmov_overlapp(param_1 + 1,param_1 + local_240); } if (iVar1 == 0) { if ((((1 < local_240) && (local_240 < local_248)) && (iVar1 = memcmp(local_218,home_dir,local_240), iVar1 == 0)) && (local_218[local_240] == '/')) { local_218[0] = '~'; strmov_overlapp(local_218 + 1,local_218 + local_240); } iVar1 = is_prefix(param_1,local_218); if (iVar1 != 0) { sVar3 = strlen(local_218); if (param_1[sVar3] == '\0') { *param_1 = '.'; param_1[1] = '/'; param_1[2] = '\0'; } else { strmov_overlapp(param_1,param_1 + sVar3); } } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
65,705
my_set_error
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void my_set_error(MYSQL *mysql, unsigned int error_nr, const char *sqlstate, const char *format, ...) { va_list ap; const char *errmsg; if (!format) { if (error_nr >= CR_MIN_ERROR && error_nr <= CR_MYSQL_LAST_ERROR) errmsg= ER(error_nr); else if (error_nr >= CER_MIN_ERROR && error_nr <= CR_MARIADB_LAST_ERROR) errmsg= CER(error_nr); else errmsg= ER(CR_UNKNOWN_ERROR); } mysql->net.last_errno= error_nr; ma_strmake(mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH); va_start(ap, format); vsnprintf(mysql->net.last_error, MYSQL_ERRMSG_SIZE - 1, format ? format : errmsg, ap); va_end(ap); return; }
O0
c
my_set_error: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 testb %al, %al je 0x38b4e movaps %xmm0, -0xd0(%rbp) movaps %xmm1, -0xc0(%rbp) movaps %xmm2, -0xb0(%rbp) movaps %xmm3, -0xa0(%rbp) movaps %xmm4, -0x90(%rbp) movaps %xmm5, -0x80(%rbp) movaps %xmm6, -0x70(%rbp) movaps %xmm7, -0x60(%rbp) movq %r9, -0xd8(%rbp) movq %r8, -0xe0(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x38be2 cmpl $0x7d0, -0xc(%rbp) # imm = 0x7D0 jb 0x38ba1 cmpl $0x80d, -0xc(%rbp) # imm = 0x80D ja 0x38ba1 movl -0xc(%rbp), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x1f8639(%rip), %rax # 0x2311d0 movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) jmp 0x38be0 cmpl $0x1388, -0xc(%rbp) # imm = 0x1388 jb 0x38bd0 cmpl $0x1397, -0xc(%rbp) # imm = 0x1397 ja 0x38bd0 movl -0xc(%rbp), %eax subl $0x1388, %eax # imm = 0x1388 movl %eax, %eax movl %eax, %ecx leaq 0x1f880a(%rip), %rax # 0x2313d0 movq (%rax,%rcx,8), %rax movq %rax, -0x48(%rbp) jmp 0x38bde leaq 0x1f85f9(%rip), %rax # 0x2311d0 movq (%rax), %rax movq %rax, -0x48(%rbp) jmp 0x38be0 jmp 0x38be2 movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x8(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 movq -0x18(%rbp), %rsi movl $0x5, %edx callq 0x54990 leaq -0x40(%rbp), %rax leaq -0x100(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x20, (%rax) movq -0x8(%rbp), %rax addq $0x97, %rax movq %rax, -0x108(%rbp) cmpq $0x0, -0x20(%rbp) je 0x38c51 movq -0x20(%rbp), %rax movq %rax, -0x110(%rbp) jmp 0x38c5c movq -0x48(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x108(%rbp), %rdi movq -0x110(%rbp), %rdx movl $0x1ff, %esi # imm = 0x1FF leaq -0x40(%rbp), %rcx callq 0x366c0 addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax)
my_set_error: push rbp mov rbp, rsp sub rsp, 110h test al, al jz short loc_38B4E movaps [rbp+var_D0], xmm0 movaps [rbp+var_C0], xmm1 movaps [rbp+var_B0], xmm2 movaps [rbp+var_A0], xmm3 movaps [rbp+var_90], xmm4 movaps [rbp+var_80], xmm5 movaps [rbp+var_70], xmm6 movaps [rbp+var_60], xmm7 loc_38B4E: mov [rbp+var_D8], r9 mov [rbp+var_E0], r8 mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx cmp [rbp+var_20], 0 jnz short loc_38BE2 cmp [rbp+var_C], 7D0h jb short loc_38BA1 cmp [rbp+var_C], 80Dh ja short loc_38BA1 mov eax, [rbp+var_C] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_48], rax jmp short loc_38BE0 loc_38BA1: cmp [rbp+var_C], 1388h jb short loc_38BD0 cmp [rbp+var_C], 1397h ja short loc_38BD0 mov eax, [rbp+var_C] sub eax, 1388h mov eax, eax mov ecx, eax lea rax, mariadb_client_errors mov rax, [rax+rcx*8] mov [rbp+var_48], rax jmp short loc_38BDE loc_38BD0: lea rax, client_errors mov rax, [rax] mov [rbp+var_48], rax loc_38BDE: jmp short $+2 loc_38BE0: jmp short $+2 loc_38BE2: mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+90h], ecx mov rdi, [rbp+var_8] add rdi, 297h mov rsi, [rbp+var_18] mov edx, 5 call ma_strmake lea rax, [rbp+var_40] lea rcx, [rbp+var_100] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 20h ; ' ' mov rax, [rbp+var_8] add rax, 97h mov [rbp+var_108], rax cmp [rbp+var_20], 0 jz short loc_38C51 mov rax, [rbp+var_20] mov [rbp+var_110], rax jmp short loc_38C5C loc_38C51: mov rax, [rbp+var_48] mov [rbp+var_110], rax loc_38C5C: mov rdi, [rbp+var_108] mov rdx, [rbp+var_110] mov esi, 1FFh lea rcx, [rbp+var_40] call _vsnprintf add rsp, 110h pop rbp retn
long long my_set_error(long long a1, unsigned int a2, long long a3, long long a4, ...) { long long v5; // [rsp+8h] [rbp-108h] char *v6; // [rsp+C8h] [rbp-48h] va_list va; // [rsp+D0h] [rbp-40h] BYREF long long v8; // [rsp+F0h] [rbp-20h] long long v9; // [rsp+F8h] [rbp-18h] unsigned int v10; // [rsp+104h] [rbp-Ch] long long v11; // [rsp+108h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; if ( !a4 ) { if ( v10 < 0x7D0 || v10 > 0x80D ) { if ( v10 < 0x1388 || v10 > 0x1397 ) v6 = client_errors[0]; else v6 = mariadb_client_errors[v10 - 5000]; } else { v6 = client_errors[v10 - 2000]; } } *(_DWORD *)(v11 + 144) = v10; ma_strmake(v11 + 663, v9, 5LL); va_start(va, a4); v5 = v11 + 151; if ( v8 ) return vsnprintf(v5, 511LL, v8, va); else return vsnprintf(v5, 511LL, v6, va); }
my_set_error: PUSH RBP MOV RBP,RSP SUB RSP,0x110 TEST AL,AL JZ 0x00138b4e MOVAPS xmmword ptr [RBP + -0xd0],XMM0 MOVAPS xmmword ptr [RBP + -0xc0],XMM1 MOVAPS xmmword ptr [RBP + -0xb0],XMM2 MOVAPS xmmword ptr [RBP + -0xa0],XMM3 MOVAPS xmmword ptr [RBP + -0x90],XMM4 MOVAPS xmmword ptr [RBP + -0x80],XMM5 MOVAPS xmmword ptr [RBP + -0x70],XMM6 MOVAPS xmmword ptr [RBP + -0x60],XMM7 LAB_00138b4e: MOV qword ptr [RBP + -0xd8],R9 MOV qword ptr [RBP + -0xe0],R8 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00138be2 CMP dword ptr [RBP + -0xc],0x7d0 JC 0x00138ba1 CMP dword ptr [RBP + -0xc],0x80d JA 0x00138ba1 MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x3311d0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX JMP 0x00138be0 LAB_00138ba1: CMP dword ptr [RBP + -0xc],0x1388 JC 0x00138bd0 CMP dword ptr [RBP + -0xc],0x1397 JA 0x00138bd0 MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x1388 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x3313d0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x48],RAX JMP 0x00138bde LAB_00138bd0: LEA RAX,[0x3311d0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_00138bde: JMP 0x00138be0 LAB_00138be0: JMP 0x00138be2 LAB_00138be2: MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x90],ECX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x297 MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x5 CALL 0x00154990 LEA RAX,[RBP + -0x40] LEA RCX,[RBP + -0x100] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x20 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x97 MOV qword ptr [RBP + -0x108],RAX CMP qword ptr [RBP + -0x20],0x0 JZ 0x00138c51 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x110],RAX JMP 0x00138c5c LAB_00138c51: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x110],RAX LAB_00138c5c: MOV RDI,qword ptr [RBP + -0x108] MOV RDX,qword ptr [RBP + -0x110] MOV ESI,0x1ff LEA RCX,[RBP + -0x40] CALL 0x001366c0 ADD RSP,0x110 POP RBP RET
void my_set_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long param_9,uint param_10,int8 param_11,char *param_12,int8 param_13, int8 param_14) { char in_AL; char *local_118; int1 local_108 [32]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; char *local_50; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; char *local_28; int8 local_20; uint local_14; long local_10; if (in_AL != '\0') { local_d8 = param_1; local_c8 = param_2; local_b8 = param_3; local_a8 = param_4; local_98 = param_5; local_88 = param_6; local_78 = param_7; local_68 = param_8; } if (param_12 == (char *)0x0) { if ((param_10 < 2000) || (0x80d < param_10)) { if ((param_10 < 5000) || (0x1397 < param_10)) { local_50 = client_errors; } else { local_50 = *(char **)(mariadb_client_errors + (ulong)(param_10 - 5000) * 8); } } else { local_50 = (&client_errors)[param_10 - 2000]; } } *(uint *)(param_9 + 0x90) = param_10; local_e8 = param_13; local_e0 = param_14; local_28 = param_12; local_20 = param_11; local_14 = param_10; local_10 = param_9; ma_strmake(param_9 + 0x297,param_11,5); local_38 = local_108; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; if (local_28 == (char *)0x0) { local_118 = local_50; } else { local_118 = local_28; } vsnprintf((char *)(local_10 + 0x97),0x1ff,local_118,&local_48); return; }
65,706
walk_and_copy
eloqsql/storage/myisam/ft_nlq_search.c
static int walk_and_copy(FT_SUPERDOC *from, uint32 count __attribute__((unused)), FT_DOC **to) { DBUG_ENTER("walk_and_copy"); from->doc.weight+=from->tmp_weight*from->word_ptr->weight; (*to)->dpos=from->doc.dpos; (*to)->weight=from->doc.weight; (*to)++; DBUG_RETURN(0); }
O3
c
walk_and_copy: pushq %rbp movq %rsp, %rbp movsd 0x18(%rdi), %xmm0 movq (%rdi), %rax movq 0x10(%rdi), %rcx mulsd 0x8(%rcx), %xmm0 addsd 0x8(%rdi), %xmm0 movsd %xmm0, 0x8(%rdi) movq (%rdx), %rcx movq %rax, (%rcx) movsd 0x8(%rdi), %xmm0 movq (%rdx), %rax movsd %xmm0, 0x8(%rax) addq $0x10, (%rdx) xorl %eax, %eax popq %rbp retq
walk_and_copy_0: push rbp mov rbp, rsp movsd xmm0, qword ptr [rdi+18h] mov rax, [rdi] mov rcx, [rdi+10h] mulsd xmm0, qword ptr [rcx+8] addsd xmm0, qword ptr [rdi+8] movsd qword ptr [rdi+8], xmm0 mov rcx, [rdx] mov [rcx], rax movsd xmm0, qword ptr [rdi+8] mov rax, [rdx] movsd qword ptr [rax+8], xmm0 add qword ptr [rdx], 10h xor eax, eax pop rbp retn
long long walk_and_copy_0(double *a1, long long a2, long long a3) { long long v3; // rax v3 = *(_QWORD *)a1; a1[1] = a1[3] * *(double *)(*((_QWORD *)a1 + 2) + 8LL) + a1[1]; **(_QWORD **)a3 = v3; *(double *)(*(_QWORD *)a3 + 8LL) = a1[1]; *(_QWORD *)a3 += 16LL; return 0LL; }
walk_and_copy: PUSH RBP MOV RBP,RSP MOVSD XMM0,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x10] MULSD XMM0,qword ptr [RCX + 0x8] ADDSD XMM0,qword ptr [RDI + 0x8] MOVSD qword ptr [RDI + 0x8],XMM0 MOV RCX,qword ptr [RDX] MOV qword ptr [RCX],RAX MOVSD XMM0,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDX] MOVSD qword ptr [RAX + 0x8],XMM0 ADD qword ptr [RDX],0x10 XOR EAX,EAX POP RBP RET
int8 walk_and_copy(int8 *param_1,int8 param_2,long *param_3) { param_1[1] = (double)param_1[3] * *(double *)(param_1[2] + 8) + (double)param_1[1]; *(int8 *)*param_3 = *param_1; *(int8 *)(*param_3 + 8) = param_1[1]; *param_3 = *param_3 + 0x10; return 0; }
65,707
ha_maria::zerofill(THD*, st_ha_check_opt*)
eloqsql/storage/maria/ha_maria.cc
int ha_maria::zerofill(THD * thd, HA_CHECK_OPT *check_opt) { int error; HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param); TRN *old_trn; MARIA_SHARE *share= file->s; if (!file || !param) return HA_ADMIN_INTERNAL_ERROR; unmap_file(file); old_trn= file->trn; maria_chk_init(param); param->thd= thd; param->op_name= "zerofill"; param->testflag= check_opt->flags | T_SILENT | T_ZEROFILL; param->orig_sort_buffer_length= THDVAR(thd, sort_buffer_size); param->db_name= table->s->db.str; param->table_name= table->alias.c_ptr(); error=maria_zerofill(param, file, share->open_file_name.str); /* Reset trn, that may have been set by repair */ if (old_trn && old_trn != file->trn) _ma_set_trn_for_table(file, old_trn); if (!error) { TrID create_trid= trnman_get_min_safe_trid(); mysql_mutex_lock(&share->intern_lock); share->state.changed|= STATE_NOT_MOVABLE; maria_update_state_info(param, file, UPDATE_TIME | UPDATE_OPEN_COUNT); _ma_update_state_lsns_sub(share, LSN_IMPOSSIBLE, create_trid, TRUE, TRUE); mysql_mutex_unlock(&share->intern_lock); } return error; }
O0
cpp
ha_maria::zerofill(THD*, st_ha_check_opt*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rdi addq $0x18, %rdi movl $0x20d40, %esi # imm = 0x20D40 callq 0x4a51d0 movq %rax, %rcx movq -0x50(%rbp), %rax movq %rcx, -0x30(%rbp) movq 0x4e8(%rax), %rcx movq (%rcx), %rcx movq %rcx, -0x40(%rbp) cmpq $0x0, 0x4e8(%rax) je 0xb06528 cmpq $0x0, -0x30(%rbp) jne 0xb06534 movl $0xfffffffc, -0x4(%rbp) # imm = 0xFFFFFFFC jmp 0xb066db movq -0x50(%rbp), %rax movq 0x4e8(%rax), %rdi callq 0xb05cd0 movq -0x50(%rbp), %rax movq 0x4e8(%rax), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi callq 0xb6d7c0 movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax leaq 0x2bdf93(%rip), %rcx # 0xdc450a movq %rcx, 0x28(%rax) movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, %ecx orq $0x400000, %rcx # imm = 0x400000 movabsq $0x100000000, %rax # imm = 0x100000000 orq %rax, %rcx movq -0x30(%rbp), %rax movq %rcx, 0xb10(%rax) movq 0x8f41e7(%rip), %rax # 0x13fa790 movq -0x18(%rbp), %rdi movl 0x8f41b5(%rip), %esi # 0x13fa768 callq *%rax movq %rax, %rcx movq -0x50(%rbp), %rax movq (%rcx), %rdx movq -0x30(%rbp), %rcx movq %rdx, 0xb38(%rcx) movq 0x10(%rax), %rcx movq (%rcx), %rcx movq 0x2a0(%rcx), %rdx movq -0x30(%rbp), %rcx movq %rdx, 0x18(%rcx) movq 0x10(%rax), %rdi addq $0x108, %rdi # imm = 0x108 addq $0x8, %rdi callq 0x4d8e50 movq %rax, %rdx movq -0x50(%rbp), %rax movq -0x30(%rbp), %rcx movq %rdx, 0x20(%rcx) movq -0x30(%rbp), %rdi movq 0x4e8(%rax), %rsi movq -0x40(%rbp), %rax movq 0x5e0(%rax), %rdx callq 0xb790f0 movl %eax, -0x24(%rbp) cmpq $0x0, -0x38(%rbp) je 0xb06651 movq -0x50(%rbp), %rcx movq -0x38(%rbp), %rax movq 0x4e8(%rcx), %rcx cmpq 0x8(%rcx), %rax je 0xb06651 movq -0x50(%rbp), %rax movq 0x4e8(%rax), %rdi movq -0x38(%rbp), %rsi callq 0xb05d00 cmpl $0x0, -0x24(%rbp) jne 0xb066d5 callq 0xb0f3d0 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x2c8082(%rip), %rsi # 0xdce6f4 movl $0x62e, %edx # imm = 0x62E callq 0x808120 movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x170(%rcx), %edx orl $0x100, %edx # imm = 0x100 movl %edx, 0x170(%rcx) movq -0x30(%rbp), %rdi movq 0x4e8(%rax), %rsi movl $0x11, %edx callq 0xb7f3c0 movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %eax, %eax movl %eax, %esi movl $0x1, %r8d movl %r8d, %ecx callq 0xb02400 movq -0x40(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x808380 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN8ha_maria8zerofillEP3THDP15st_ha_check_opt: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov [rbp+var_50], rax mov rdi, [rbp+var_18] add rdi, 18h; this mov esi, 20D40h; unsigned __int64 call _ZN11Query_arena5allocEm; Query_arena::alloc(ulong) mov rcx, rax mov rax, [rbp+var_50] mov [rbp+var_30], rcx mov rcx, [rax+4E8h] mov rcx, [rcx] mov [rbp+var_40], rcx cmp qword ptr [rax+4E8h], 0 jz short loc_B06528 cmp [rbp+var_30], 0 jnz short loc_B06534 loc_B06528: mov [rbp+var_4], 0FFFFFFFCh jmp loc_B066DB loc_B06534: mov rax, [rbp+var_50] mov rdi, [rax+4E8h] call _ZL10unmap_fileP16st_maria_handler; unmap_file(st_maria_handler *) mov rax, [rbp+var_50] mov rax, [rax+4E8h] mov rax, [rax+8] mov [rbp+var_38], rax mov rdi, [rbp+var_30] call maria_chk_init mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax+10h], rcx mov rax, [rbp+var_30] lea rcx, aZerofill+1; "zerofill" mov [rax+28h], rcx mov rax, [rbp+var_20] mov eax, [rax] mov ecx, eax or rcx, 400000h mov rax, 100000000h or rcx, rax mov rax, [rbp+var_30] mov [rax+0B10h], rcx mov rax, cs:qword_13FA790 mov rdi, [rbp+var_18] mov esi, cs:dword_13FA768 call rax ; qword_13FA790 mov rcx, rax mov rax, [rbp+var_50] mov rdx, [rcx] mov rcx, [rbp+var_30] mov [rcx+0B38h], rdx mov rcx, [rax+10h] mov rcx, [rcx] mov rdx, [rcx+2A0h] mov rcx, [rbp+var_30] mov [rcx+18h], rdx mov rdi, [rax+10h] add rdi, 108h add rdi, 8; this call _ZN13Binary_string5c_ptrEv; Binary_string::c_ptr(void) mov rdx, rax mov rax, [rbp+var_50] mov rcx, [rbp+var_30] mov [rcx+20h], rdx mov rdi, [rbp+var_30] mov rsi, [rax+4E8h] mov rax, [rbp+var_40] mov rdx, [rax+5E0h] call maria_zerofill mov [rbp+var_24], eax cmp [rbp+var_38], 0 jz short loc_B06651 mov rcx, [rbp+var_50] mov rax, [rbp+var_38] mov rcx, [rcx+4E8h] cmp rax, [rcx+8] jz short loc_B06651 mov rax, [rbp+var_50] mov rdi, [rax+4E8h] mov rsi, [rbp+var_38] call _ZL21_ma_set_trn_for_tableP16st_maria_handlerP17st_ma_transaction; _ma_set_trn_for_table(st_maria_handler *,st_ma_transaction *) loc_B06651: cmp [rbp+var_24], 0 jnz short loc_B066D5 call trnman_get_min_safe_trid mov [rbp+var_48], rax mov rdi, [rbp+var_40] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_117; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 62Eh call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint) mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov edx, [rcx+170h] or edx, 100h mov [rcx+170h], edx mov rdi, [rbp+var_30] mov rsi, [rax+4E8h] mov edx, 11h call maria_update_state_info mov rdi, [rbp+var_40] mov rdx, [rbp+var_48] xor eax, eax mov esi, eax mov r8d, 1 mov ecx, r8d call _ma_update_state_lsns_sub mov rdi, [rbp+var_40] add rdi, 8F0h call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *) loc_B066D5: mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_B066DB: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ha_maria::zerofill(ha_maria *this, THD *a2, st_ha_check_opt *a3) { long long min_safe_trid; // [rsp+8h] [rbp-48h] long long v5; // [rsp+10h] [rbp-40h] long long v6; // [rsp+18h] [rbp-38h] _QWORD *v7; // [rsp+20h] [rbp-30h] unsigned int v8; // [rsp+2Ch] [rbp-24h] v7 = (_QWORD *)Query_arena::alloc((THD *)((char *)a2 + 24), 134464LL); v5 = **((_QWORD **)this + 157); if ( *((_QWORD *)this + 157) && v7 ) { unmap_file(*((long long **)this + 157)); v6 = *(_QWORD *)(*((_QWORD *)this + 157) + 8LL); maria_chk_init(v7); v7[2] = a2; v7[5] = "zerofill"; v7[354] = *(unsigned int *)a3 | 0x100400000LL; v7[359] = *(_QWORD *)qword_13FA790(a2, (unsigned int)dword_13FA768); v7[3] = *(_QWORD *)(**((_QWORD **)this + 2) + 672LL); v7[4] = Binary_string::c_ptr((Binary_string *)(*((_QWORD *)this + 2) + 272LL)); v8 = maria_zerofill(v7, *((_QWORD *)this + 157), *(_QWORD *)(v5 + 1504)); if ( v6 && v6 != *(_QWORD *)(*((_QWORD *)this + 157) + 8LL) ) _ma_set_trn_for_table(*((_QWORD **)this + 157), v6); if ( !v8 ) { min_safe_trid = trnman_get_min_safe_trid(); coro_mutex_lock(v5 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ha_maria.cc", 0x62Eu); *(_DWORD *)(v5 + 368) |= 0x100u; maria_update_state_info(v7, *((_QWORD *)this + 157), 17LL); ma_update_state_lsns_sub(v5, 0LL, min_safe_trid, 1, 1); coro_mutex_unlock(v5 + 2288); } return v8; } else { return (unsigned int)-4; } }
pending: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x108] POP RBP RET
/* binlog_cache_data::pending() const */ int8 __thiscall binlog_cache_data::pending(binlog_cache_data *this) { return *(int8 *)(this + 0x108); }
65,708
ImPlot3D::NDCToPlot(ImPlot3DPoint const&)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
ImPlot3DPoint NDCToPlot(const ImPlot3DPoint& point) { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"); ImPlot3DPlot& plot = *gp.CurrentPlot; SetupLock(); ImPlot3DPoint plot_point; for (int i = 0; i < 3; i++) { ImPlot3DAxis& axis = plot.Axes[i]; float ndc_range = 0.5f * plot.BoxScale[i]; float t = ImPlot3D::ImHasFlag(axis.Flags, ImPlot3DAxisFlags_Invert) ? (ndc_range - point[i]) : (point[i] + ndc_range); t /= plot.BoxScale[i]; plot_point[i] = axis.Range.Min + t * (axis.Range.Max - axis.Range.Min); } return plot_point; }
O0
cpp
ImPlot3D::NDCToPlot(ImPlot3DPoint const&): subq $0x68, %rsp movq %rdi, 0x50(%rsp) movq 0x5bd1f8(%rip), %rax # 0x68f638 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax cmpq $0x0, 0x28(%rax) jne 0xd2465 leaq 0x5002f3(%rip), %rdi # 0x5d274b callq 0x4f7220 testb $0x1, %al jne 0xd2463 jmp 0xd2465 jmp 0xd2465 jmp 0xd2467 movq 0x48(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x40(%rsp) callq 0xd09c0 leaq 0x5c(%rsp), %rdi callq 0xd8c20 movl $0x0, 0x3c(%rsp) cmpl $0x3, 0x3c(%rsp) jge 0xd25cc movq 0x40(%rsp), %rax addq $0x78, %rax movslq 0x3c(%rsp), %rcx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rdi addq $0x1c8, %rdi # imm = 0x1C8 movslq 0x3c(%rsp), %rsi callq 0xd8b30 movss 0x4f9b51(%rip), %xmm0 # 0x5cc020 mulss (%rax), %xmm0 movss %xmm0, 0x2c(%rsp) movq 0x30(%rsp), %rax movl (%rax), %edi movl $0x80, %esi callq 0xcbc10 testb $0x1, %al jne 0xd24f0 jmp 0xd2520 movss 0x2c(%rsp), %xmm0 movss %xmm0, 0x10(%rsp) movq 0x50(%rsp), %rdi movslq 0x3c(%rsp), %rsi callq 0xd99d0 movaps %xmm0, %xmm1 movss 0x10(%rsp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, 0x14(%rsp) jmp 0xd253b movq 0x50(%rsp), %rdi movslq 0x3c(%rsp), %rsi callq 0xd99d0 addss 0x2c(%rsp), %xmm0 movss %xmm0, 0x14(%rsp) movss 0x14(%rsp), %xmm0 movss %xmm0, 0x28(%rsp) movq 0x40(%rsp), %rdi addq $0x1c8, %rdi # imm = 0x1C8 movslq 0x3c(%rsp), %rsi callq 0xd8b30 movss (%rax), %xmm1 movss 0x28(%rsp), %xmm0 divss %xmm1, %xmm0 movss %xmm0, 0x28(%rsp) movq 0x30(%rsp), %rax movss 0x8(%rax), %xmm1 movss 0x28(%rsp), %xmm0 movq 0x30(%rsp), %rax movss 0xc(%rax), %xmm2 movq 0x30(%rsp), %rax subss 0x8(%rax), %xmm2 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, 0xc(%rsp) movslq 0x3c(%rsp), %rsi leaq 0x5c(%rsp), %rdi callq 0xd8b30 movss 0xc(%rsp), %xmm0 movss %xmm0, (%rax) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0xd248c movl 0x64(%rsp), %eax movl %eax, 0x20(%rsp) movq 0x5c(%rsp), %rax movq %rax, 0x18(%rsp) movsd 0x18(%rsp), %xmm0 movss 0x20(%rsp), %xmm1 addq $0x68, %rsp retq nop
_ZN8ImPlot3D9NDCToPlotERK13ImPlot3DPoint: sub rsp, 68h mov [rsp+68h+var_18], rdi mov rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov [rsp+68h+var_20], rax mov rax, [rsp+68h+var_20] cmp qword ptr [rax+28h], 0 jnz short loc_D2465 lea rdi, aNdctoplotNeeds; "NDCToPlot() needs to be called between "... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) test al, 1 jnz short loc_D2463 jmp short loc_D2465 loc_D2463: jmp short $+2 loc_D2465: jmp short $+2 loc_D2467: mov rax, [rsp+68h+var_20] mov rax, [rax+28h] mov [rsp+68h+var_28], rax call _ZN8ImPlot3D9SetupLockEv; ImPlot3D::SetupLock(void) lea rdi, [rsp+68h+var_C]; this call _ZN13ImPlot3DPointC2Ev; ImPlot3DPoint::ImPlot3DPoint(void) mov [rsp+68h+var_2C], 0 loc_D248C: cmp [rsp+68h+var_2C], 3 jge loc_D25CC mov rax, [rsp+68h+var_28] add rax, 78h ; 'x' movsxd rcx, [rsp+68h+var_2C] imul rcx, 70h ; 'p' add rax, rcx mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_28] add rdi, 1C8h movsxd rsi, [rsp+68h+var_2C] call _ZN13ImPlot3DPointixEm; ImPlot3DPoint::operator[](ulong) movss xmm0, cs:flt_5CC020 mulss xmm0, dword ptr [rax] movss [rsp+68h+var_3C], xmm0 mov rax, [rsp+68h+var_38] mov edi, [rax] mov esi, 80h call _ZN8ImPlot3DL9ImHasFlagIi18ImPlot3DAxisFlags_EEbT_T0_; ImPlot3D::ImHasFlag<int,ImPlot3DAxisFlags_>(int,ImPlot3DAxisFlags_) test al, 1 jnz short loc_D24F0 jmp short loc_D2520 loc_D24F0: movss xmm0, [rsp+68h+var_3C] movss [rsp+68h+var_58], xmm0 mov rdi, [rsp+68h+var_18] movsxd rsi, [rsp+68h+var_2C] call _ZNK13ImPlot3DPointixEm; ImPlot3DPoint::operator[](ulong) movaps xmm1, xmm0 movss xmm0, [rsp+68h+var_58] subss xmm0, xmm1 movss [rsp+68h+var_54], xmm0 jmp short loc_D253B loc_D2520: mov rdi, [rsp+68h+var_18] movsxd rsi, [rsp+68h+var_2C] call _ZNK13ImPlot3DPointixEm; ImPlot3DPoint::operator[](ulong) addss xmm0, [rsp+68h+var_3C] movss [rsp+68h+var_54], xmm0 loc_D253B: movss xmm0, [rsp+68h+var_54] movss [rsp+68h+var_40], xmm0 mov rdi, [rsp+68h+var_28] add rdi, 1C8h movsxd rsi, [rsp+68h+var_2C] call _ZN13ImPlot3DPointixEm; ImPlot3DPoint::operator[](ulong) movss xmm1, dword ptr [rax] movss xmm0, [rsp+68h+var_40] divss xmm0, xmm1 movss [rsp+68h+var_40], xmm0 mov rax, [rsp+68h+var_38] movss xmm1, dword ptr [rax+8] movss xmm0, [rsp+68h+var_40] mov rax, [rsp+68h+var_38] movss xmm2, dword ptr [rax+0Ch] mov rax, [rsp+68h+var_38] subss xmm2, dword ptr [rax+8] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rsp+68h+var_5C], xmm0 movsxd rsi, [rsp+68h+var_2C] lea rdi, [rsp+68h+var_C] call _ZN13ImPlot3DPointixEm; ImPlot3DPoint::operator[](ulong) movss xmm0, [rsp+68h+var_5C] movss dword ptr [rax], xmm0 mov eax, [rsp+68h+var_2C] add eax, 1 mov [rsp+68h+var_2C], eax jmp loc_D248C loc_D25CC: mov eax, [rsp+68h+var_4] mov [rsp+68h+var_48], eax mov rax, [rsp+68h+var_C] mov [rsp+68h+var_50], rax movsd xmm0, [rsp+68h+var_50] movss xmm1, [rsp+68h+var_48] add rsp, 68h retn
double ImPlot3D::NDCToPlot( ImPlot3D *this, const ImPlot3DPoint *a2, long long a3, bool a4, double a5, double a6) { float v7; // [rsp+Ch] [rbp-5Ch] float v8; // [rsp+14h] [rbp-54h] float v9; // [rsp+2Ch] [rbp-3Ch] long long v10; // [rsp+30h] [rbp-38h] int i; // [rsp+3Ch] [rbp-2Ch] long long v12; // [rsp+40h] [rbp-28h] long long v13; // [rsp+48h] [rbp-20h] ImPlot3D *v14; // [rsp+50h] [rbp-18h] double v15; // [rsp+5Ch] [rbp-Ch] BYREF v14 = this; v13 = ImPlot3D::GImPlot3D; if ( !*(_QWORD *)(ImPlot3D::GImPlot3D + 40) ) { this = (ImPlot3D *)"NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"NDCToPlot() needs to be called between BeginPlot() and EndPlot()!", (const char *)a2); } v12 = *(_QWORD *)(v13 + 40); ImPlot3D::SetupLock(this, (const char *)a2, a5, a6, a3, a4); ImPlot3DPoint::ImPlot3DPoint((ImPlot3DPoint *)&v15); for ( i = 0; i < 3; ++i ) { v10 = 112LL * i + v12 + 120; v9 = 0.5 * *(float *)ImPlot3DPoint::operator[](v12 + 456, i); if ( ImPlot3D::ImHasFlag<int,ImPlot3DAxisFlags_>(*(_DWORD *)v10, 128) ) v8 = v9 - ImPlot3DPoint::operator[](v14, i); else v8 = ImPlot3DPoint::operator[](v14, i) + v9; v7 = (float)((float)(v8 / *(float *)ImPlot3DPoint::operator[](v12 + 456, i)) * (float)(*(float *)(v10 + 12) - *(float *)(v10 + 8))) + *(float *)(v10 + 8); *(float *)ImPlot3DPoint::operator[](&v15, i) = v7; } return v15; }
NDCToPlot: SUB RSP,0x68 MOV qword ptr [RSP + 0x50],RDI MOV RAX,qword ptr [0x0078f638] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x001d2465 LEA RDI,[0x6d274b] CALL 0x005f7220 TEST AL,0x1 JNZ 0x001d2463 JMP 0x001d2465 LAB_001d2463: JMP 0x001d2465 LAB_001d2465: JMP 0x001d2467 LAB_001d2467: MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x40],RAX CALL 0x001d09c0 LEA RDI,[RSP + 0x5c] CALL 0x001d8c20 MOV dword ptr [RSP + 0x3c],0x0 LAB_001d248c: CMP dword ptr [RSP + 0x3c],0x3 JGE 0x001d25cc MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x78 MOVSXD RCX,dword ptr [RSP + 0x3c] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x1c8 MOVSXD RSI,dword ptr [RSP + 0x3c] CALL 0x001d8b30 MOVSS XMM0,dword ptr [0x006cc020] MULSS XMM0,dword ptr [RAX] MOVSS dword ptr [RSP + 0x2c],XMM0 MOV RAX,qword ptr [RSP + 0x30] MOV EDI,dword ptr [RAX] MOV ESI,0x80 CALL 0x001cbc10 TEST AL,0x1 JNZ 0x001d24f0 JMP 0x001d2520 LAB_001d24f0: MOVSS XMM0,dword ptr [RSP + 0x2c] MOVSS dword ptr [RSP + 0x10],XMM0 MOV RDI,qword ptr [RSP + 0x50] MOVSXD RSI,dword ptr [RSP + 0x3c] CALL 0x001d99d0 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] SUBSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x14],XMM0 JMP 0x001d253b LAB_001d2520: MOV RDI,qword ptr [RSP + 0x50] MOVSXD RSI,dword ptr [RSP + 0x3c] CALL 0x001d99d0 ADDSS XMM0,dword ptr [RSP + 0x2c] MOVSS dword ptr [RSP + 0x14],XMM0 LAB_001d253b: MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS dword ptr [RSP + 0x28],XMM0 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x1c8 MOVSXD RSI,dword ptr [RSP + 0x3c] CALL 0x001d8b30 MOVSS XMM1,dword ptr [RAX] MOVSS XMM0,dword ptr [RSP + 0x28] DIVSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x28],XMM0 MOV RAX,qword ptr [RSP + 0x30] MOVSS XMM1,dword ptr [RAX + 0x8] MOVSS XMM0,dword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOVSS XMM2,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RSP + 0x30] SUBSS XMM2,dword ptr [RAX + 0x8] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RSP + 0xc],XMM0 MOVSXD RSI,dword ptr [RSP + 0x3c] LEA RDI,[RSP + 0x5c] CALL 0x001d8b30 MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001d248c LAB_001d25cc: MOV EAX,dword ptr [RSP + 0x64] MOV dword ptr [RSP + 0x20],EAX MOV RAX,qword ptr [RSP + 0x5c] MOV qword ptr [RSP + 0x18],RAX MOVSD XMM0,qword ptr [RSP + 0x18] MOVSS XMM1,dword ptr [RSP + 0x20] ADD RSP,0x68 RET
/* ImPlot3D::NDCToPlot(ImPlot3DPoint const&) */ int8 ImPlot3D::NDCToPlot(ImPlot3DPoint *param_1) { float fVar1; float fVar2; float fVar3; long lVar4; bool bVar5; int4 *puVar6; float *pfVar7; float fVar8; float local_54; int local_2c; int8 local_c; lVar4 = GImPlot3D; if (*(long *)(GImPlot3D + 0x28) == 0) { ImGui::ErrorLog("NDCToPlot() needs to be called between BeginPlot() and EndPlot()!"); } lVar4 = *(long *)(lVar4 + 0x28); SetupLock(); ImPlot3DPoint::ImPlot3DPoint((ImPlot3DPoint *)&local_c); for (local_2c = 0; local_2c < 3; local_2c = local_2c + 1) { puVar6 = (int4 *)(lVar4 + 0x78 + (long)local_2c * 0x70); pfVar7 = (float *)ImPlot3DPoint::operator[]((ImPlot3DPoint *)(lVar4 + 0x1c8),(long)local_2c); fVar8 = DAT_006cc020 * *pfVar7; bVar5 = ImHasFlag<int,ImPlot3DAxisFlags_>(*puVar6,0x80); if (bVar5) { local_54 = (float)ImPlot3DPoint::operator[](param_1,(long)local_2c); local_54 = fVar8 - local_54; } else { local_54 = (float)ImPlot3DPoint::operator[](param_1,(long)local_2c); local_54 = local_54 + fVar8; } pfVar7 = (float *)ImPlot3DPoint::operator[]((ImPlot3DPoint *)(lVar4 + 0x1c8),(long)local_2c); fVar8 = *pfVar7; fVar1 = (float)puVar6[2]; fVar2 = (float)puVar6[3]; fVar3 = (float)puVar6[2]; pfVar7 = (float *)ImPlot3DPoint::operator[]((ImPlot3DPoint *)&local_c,(long)local_2c); *pfVar7 = (local_54 / fVar8) * (fVar2 - fVar3) + fVar1; } return local_c; }
65,709
void minco::MINCO_op<3, 3, 1>::getEnergyPartialGradByCoeffs_line<0, 0, 1, 2>(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<double, 6, 1, 0, 6, 1> const&, int, Eigen::Matrix<double, -1, 3, 0, -1, 3>&, std::integer_sequence<int, 0, 1, 2>)
zusiliang[P]myMINCO/minco.hpp
static inline void getEnergyPartialGradByCoeffs_line(const C_Type &c, const T_Type &T, const int Ti, C_Type &gdC, int_sequence<j...>) { gdC.row((2 * Ti + 1) * s + i) = 2 * (( (double)perm<s + i, s>::val * perm<s + j, s>::val / (i + j + 1) * c.row((2 * Ti + 1) * s + j) * T_op::template get_pow_T<i + j + 1>(T, Ti) ) + ...); }
O2
cpp
void minco::MINCO_op<3, 3, 1>::getEnergyPartialGradByCoeffs_line<0, 0, 1, 2>(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<double, 6, 1, 0, 6, 1> const&, int, Eigen::Matrix<double, -1, 3, 0, -1, 3>&, std::integer_sequence<int, 0, 1, 2>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x498, %rsp # imm = 0x498 movq %rsi, %rax leaq 0x4(%rsp), %rsi movl $0x2, (%rsi) imull $0x6, %edx, %r8d leal 0x3(%r8), %edx movslq %edx, %rdx movq (%rdi), %r9 leaq (%r9,%rdx,8), %r10 movsd 0x10(%rax), %xmm0 movabsq $0x4052000000000000, %r11 # imm = 0x4052000000000000 leaq 0x38(%rsp), %rsi movq %r11, 0x18(%rsi) movq %r10, 0x20(%rsi) movq %rdi, 0x30(%rsi) movq %rdx, 0x38(%rsi) andq $0x0, 0x40(%rsi) pushq $0x1 popq %r13 movq %r13, 0x48(%rsi) movsd %xmm0, 0x60(%rsi) leal 0x4(%r8), %edx movslq %edx, %rbp leaq (%r9,%rbp,8), %r10 addl $0x5, %r8d movsd 0x18(%rax), %xmm0 movsd 0x20(%rax), %xmm1 movabsq $0x4068000000000000, %rax # imm = 0x4068000000000000 leaq 0xa8(%rsp), %rdx movq %rax, 0x20(%rdx) movq %r10, 0x28(%rdx) movq %rdi, 0x38(%rdx) movq %rbp, 0x40(%rdx) andq $0x0, 0x48(%rdx) movslq %r8d, %rax leaq (%r9,%rax,8), %r8 movq %r13, 0x50(%rdx) movsd %xmm0, 0x68(%rdx) movabsq $0x4076800000000000, %r9 # imm = 0x4076800000000000 movq %r9, 0x90(%rdx) movq %r8, 0x98(%rdx) movq %rdi, 0xa8(%rdx) movq %rax, 0xb0(%rdx) andq $0x0, 0xb8(%rdx) movq %rcx, %r14 leaq (,%rbp,8), %rbx movq %r13, 0xc0(%rdx) movsd %xmm1, 0xd8(%rdx) leaq 0x198(%rsp), %r15 movq %r15, %rdi callq 0x61e0 leaq 0x308(%rsp), %r12 movq %r12, %rdi leaq 0x4(%rsp), %rsi movq %r15, %rdx callq 0x61c1 addq (%r14), %rbx leaq 0x8(%rsp), %rdi movq %rbx, (%rdi) movq %r14, 0x10(%rdi) movq %rbp, 0x18(%rdi) andq $0x0, 0x20(%rdi) movq %r13, 0x28(%rdi) movq %r12, %rsi callq 0x62e6 addq $0x498, %rsp # imm = 0x498 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN5minco8MINCO_opILi3ELi3ELi1EE33getEnergyPartialGradByCoeffs_lineILi1EJLi0ELi1ELi2EEEEvRKN5Eigen6MatrixIdLin1ELi3ELi0ELin1ELi3EEERKNS4_IdLi6ELi1ELi0ELi6ELi1EEEiRS5_St16integer_sequenceIiJXspT0_EEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 498h mov rax, rsi lea rsi, [rsp+4C8h+var_4C4] mov dword ptr [rsi], 2 imul r8d, edx, 6 lea edx, [r8+3] movsxd rdx, edx mov r9, [rdi] lea r10, [r9+rdx*8] movsd xmm0, qword ptr [rax+10h] mov r11, 4052000000000000h lea rsi, [rsp+4C8h+var_490] mov [rsi+18h], r11 mov [rsi+20h], r10 mov [rsi+30h], rdi mov [rsi+38h], rdx and qword ptr [rsi+40h], 0 push 1 pop r13 mov [rsi+48h], r13 movsd qword ptr [rsi+60h], xmm0 lea edx, [r8+4] movsxd rbp, edx lea r10, [r9+rbp*8] add r8d, 5 movsd xmm0, qword ptr [rax+18h] movsd xmm1, qword ptr [rax+20h] mov rax, 4068000000000000h lea rdx, [rsp+4C8h+var_420] mov [rdx+20h], rax mov [rdx+28h], r10 mov [rdx+38h], rdi mov [rdx+40h], rbp and qword ptr [rdx+48h], 0 movsxd rax, r8d lea r8, [r9+rax*8] mov [rdx+50h], r13 movsd qword ptr [rdx+68h], xmm0 mov r9, 4076800000000000h mov [rdx+90h], r9 mov [rdx+98h], r8 mov [rdx+0A8h], rdi mov [rdx+0B0h], rax and qword ptr [rdx+0B8h], 0 mov r14, rcx lea rbx, ds:0[rbp*8] mov [rdx+0C0h], r13 movsd qword ptr [rdx+0D8h], xmm1 lea r15, [rsp+4C8h+var_330] mov rdi, r15 call _ZNK5Eigen10MatrixBaseINS_13CwiseBinaryOpINS_8internal17scalar_product_opIddEEKNS1_IS4_KNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEEKNS_6MatrixIdLi1ELi3ELi1ELi1ELi3EEEEEKNS_5BlockIKNS8_IdLin1ELi3ELi0ELin1ELi3EEELi1ELi3ELb0EEEEESC_EEEplINS1_INS2_13scalar_sum_opIddEEKSK_SP_EEEEKNS1_INSN_IdNS2_6traitsIT_E6ScalarEEESP_KSS_EERKNS0_ISS_EE; Eigen::MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const>>::operator+<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const>>(Eigen::MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const>> const&) lea r12, [rsp+4C8h+var_1C0] mov rdi, r12 lea rsi, [rsp+4C8h+var_4C4] mov rdx, r15 call _ZN5EigenmlIiEEKNS_13CwiseBinaryOpINS_8internal17scalar_product_opINS2_18promote_scalar_argIdT_Xsr5Eigen8internal14has_ReturnTypeINS_20ScalarBinaryOpTraitsIS5_dNS3_IS5_dEEEEEE5valueEE4typeEdEEKNS2_19plain_constant_typeINS1_INS2_13scalar_sum_opIddEEKNS1_INS3_IddEEKNS1_ISF_KNS_14CwiseNullaryOpINS2_18scalar_constant_opIdEEKNS_6MatrixIdLi1ELi3ELi1ELi1ELi3EEEEEKNS_5BlockIKNSJ_IdLin1ELi3ELi0ELin1ELi3EEELi1ELi3ELb0EEEEESN_EEKNS1_ISE_SW_SW_EEEESA_E4typeEKSZ_EERKS5_RKNS_10MatrixBaseISZ_EE add rbx, [r14] lea rdi, [rsp+4C8h+var_4C0] mov [rdi], rbx mov [rdi+10h], r14 mov [rdi+18h], rbp and qword ptr [rdi+20h], 0 mov [rdi+28h], r13 mov rsi, r12 call _ZN5Eigen8internal15call_assignmentINS_5BlockINS_6MatrixIdLin1ELi3ELi0ELin1ELi3EEELi1ELi3ELb0EEENS_13CwiseBinaryOpINS0_17scalar_product_opIddEEKNS_14CwiseNullaryOpINS0_18scalar_constant_opIdEEKNS3_IdLi1ELi3ELi1ELi1ELi3EEEEEKNS6_INS0_13scalar_sum_opIddEEKNS6_IS8_KNS6_IS8_SF_KNS2_IKS4_Li1ELi3ELb0EEEEESF_EEKNS6_ISH_SO_SO_EEEEEEEEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3>,1,3,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const> const> const>>(Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3>,1,3,false> &,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const> const> const> const&) add rsp, 498h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long minco::MINCO_op<3,3,1>::getEnergyPartialGradByCoeffs_line<1,0,1,2>( long long *a1, _QWORD *a2, int a3, _QWORD *a4) { int v4; // r8d long long v5; // rdx long long v6; // r9 long long v7; // r10 long long v8; // xmm0_8 long long v9; // rbp long long v10; // xmm0_8 long long v11; // xmm1_8 int v14; // [rsp+4h] [rbp-4C4h] BYREF _QWORD v15[50]; // [rsp+8h] [rbp-4C0h] BYREF _BYTE v16[368]; // [rsp+198h] [rbp-330h] BYREF _BYTE v17[448]; // [rsp+308h] [rbp-1C0h] BYREF v14 = 2; v4 = 6 * a3; v5 = 6 * a3 + 3; v6 = *a1; v7 = *a1 + 8 * v5; v8 = a2[2]; v15[9] = 0x4052000000000000LL; v15[10] = v7; v15[12] = a1; v15[13] = v5; v15[14] = 0LL; v15[15] = 1LL; v15[18] = v8; v9 = v4 + 4; v10 = a2[3]; v11 = a2[4]; v15[24] = 0x4068000000000000LL; v15[25] = v6 + 8 * v9; v15[27] = a1; v15[28] = v9; v15[29] = 0LL; v15[30] = 1LL; v15[33] = v10; v15[38] = 0x4076800000000000LL; v15[39] = v6 + 8LL * (v4 + 5); v15[41] = a1; v15[42] = v4 + 5; v15[43] = 0LL; v15[44] = 1LL; v15[47] = v11; Eigen::MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const>>::operator+<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const>>(v16); Eigen::operator*<int>(v17, &v14, v16); v15[0] = *a4 + 8 * v9; v15[2] = a4; v15[3] = v9; v15[4] = 0LL; v15[5] = 1LL; return Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3>,1,3,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3> const,1,3,false> const> const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3> const> const> const> const> const>>( v15, v17); }
getEnergyPartialGradByCoeffs_line<1,0,1,2>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x498 MOV RAX,RSI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x2 IMUL R8D,EDX,0x6 LEA EDX,[R8 + 0x3] MOVSXD RDX,EDX MOV R9,qword ptr [RDI] LEA R10,[R9 + RDX*0x8] MOVSD XMM0,qword ptr [RAX + 0x10] MOV R11,0x4052000000000000 LEA RSI,[RSP + 0x38] MOV qword ptr [RSI + 0x18],R11 MOV qword ptr [RSI + 0x20],R10 MOV qword ptr [RSI + 0x30],RDI MOV qword ptr [RSI + 0x38],RDX AND qword ptr [RSI + 0x40],0x0 PUSH 0x1 POP R13 MOV qword ptr [RSI + 0x48],R13 MOVSD qword ptr [RSI + 0x60],XMM0 LEA EDX,[R8 + 0x4] MOVSXD RBP,EDX LEA R10,[R9 + RBP*0x8] ADD R8D,0x5 MOVSD XMM0,qword ptr [RAX + 0x18] MOVSD XMM1,qword ptr [RAX + 0x20] MOV RAX,0x4068000000000000 LEA RDX,[RSP + 0xa8] MOV qword ptr [RDX + 0x20],RAX MOV qword ptr [RDX + 0x28],R10 MOV qword ptr [RDX + 0x38],RDI MOV qword ptr [RDX + 0x40],RBP AND qword ptr [RDX + 0x48],0x0 MOVSXD RAX,R8D LEA R8,[R9 + RAX*0x8] MOV qword ptr [RDX + 0x50],R13 MOVSD qword ptr [RDX + 0x68],XMM0 MOV R9,0x4076800000000000 MOV qword ptr [RDX + 0x90],R9 MOV qword ptr [RDX + 0x98],R8 MOV qword ptr [RDX + 0xa8],RDI MOV qword ptr [RDX + 0xb0],RAX AND qword ptr [RDX + 0xb8],0x0 MOV R14,RCX LEA RBX,[RBP*0x8] MOV qword ptr [RDX + 0xc0],R13 MOVSD qword ptr [RDX + 0xd8],XMM1 LEA R15,[RSP + 0x198] MOV RDI,R15 CALL 0x001061e0 LEA R12,[RSP + 0x308] MOV RDI,R12 LEA RSI,[RSP + 0x4] MOV RDX,R15 CALL 0x001061c1 ADD RBX,qword ptr [R14] LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBX MOV qword ptr [RDI + 0x10],R14 MOV qword ptr [RDI + 0x18],RBP AND qword ptr [RDI + 0x20],0x0 MOV qword ptr [RDI + 0x28],R13 MOV RSI,R12 CALL 0x001062e6 ADD RSP,0x498 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void minco::MINCO_op<3, 3, 1>::getEnergyPartialGradByCoeffs_line<1, 0, 1, 2>(Eigen::Matrix<double, -1, 3, 0, -1, 3> const&, Eigen::Matrix<double, 6, 1, 0, 6, 1> const&, int, Eigen::Matrix<double, -1, 3, 0, -1, 3>&, std::integer_sequence<int, 0, 1, 2>) */ void minco::MINCO_op<3,3,1>::getEnergyPartialGradByCoeffs_line<1,0,1,2> (long *param_1,long param_2,int param_3,long *param_4) { long lVar1; int local_4c4; long local_4c0 [2]; long *local_4b0; long local_4a8; int8 local_4a0; int8 local_498; MatrixBase local_490 [24]; int8 local_478; long local_470; long *local_460; long local_458; int8 local_450; int8 local_448; int8 local_430; int8 local_400; long local_3f8; long *local_3e8; long local_3e0; int8 local_3d8; int8 local_3d0; int8 local_3b8; int8 local_390; long local_388; long *local_378; long local_370; int8 local_368; int8 local_360; int8 local_348; MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::Block<Eigen::Matrix<double,_1,3,0,_1,3>const,1,3,false>const>const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const>> local_330 [368]; Eigen local_1c0 [400]; local_4c4 = 2; param_3 = param_3 * 6; local_458 = (long)(param_3 + 3); local_388 = *param_1; local_470 = local_388 + local_458 * 8; local_430 = *(int8 *)(param_2 + 0x10); local_478 = 0x4052000000000000; local_450 = 0; local_448 = 1; lVar1 = (long)(param_3 + 4); local_3f8 = local_388 + lVar1 * 8; local_3b8 = *(int8 *)(param_2 + 0x18); local_348 = *(int8 *)(param_2 + 0x20); local_400 = 0x4068000000000000; local_3d8 = 0; local_370 = (long)(param_3 + 5); local_388 = local_388 + local_370 * 8; local_3d0 = 1; local_390 = 0x4076800000000000; local_368 = 0; local_360 = 1; local_460 = param_1; local_3e8 = param_1; local_3e0 = lVar1; local_378 = param_1; Eigen:: MatrixBase<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::Block<Eigen::Matrix<double,-1,3,0,-1,3>const,1,3,false>const>const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const>> ::operator+(local_330,local_490); Eigen::operator*(local_1c0,&local_4c4,(MatrixBase *)local_330); local_4c0[0] = lVar1 * 8 + *param_4; local_4a0 = 0; local_498 = 1; local_4b0 = param_4; local_4a8 = lVar1; Eigen::internal:: call_assignment<Eigen::Block<Eigen::Matrix<double,_1,3,0,_1,3>,1,3,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::Block<Eigen::Matrix<double,_1,3,0,_1,3>const,1,3,false>const>const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const>const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::Block<Eigen::Matrix<double,_1,3,0,_1,3>const,1,3,false>const>const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const>const,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const,Eigen::Block<Eigen::Matrix<double,_1,3,0,_1,3>const,1,3,false>const>const,Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>,Eigen::Matrix<double,1,3,1,1,3>const>const>const>const>const>> ((Block *)local_4c0,(CwiseBinaryOp *)local_1c0); return; }
65,710
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O0
c
my_register_filename: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq %r8, -0x20(%rbp) cmpl $0x0, -0x8(%rbp) jl 0x80766 movl $0x1, -0x24(%rbp) movl -0x24(%rbp), %eax leaq 0x377fb0(%rip), %rcx # 0x3f8674 lock xaddl %eax, (%rcx) movl %eax, -0x28(%rbp) movl -0x8(%rbp), %eax leaq 0x1b83cb(%rip), %rcx # 0x238aa0 cmpl (%rcx), %eax jae 0x806e9 movq -0x20(%rbp), %rax andq $0x2004, %rax # imm = 0x2004 cmpq $0x0, %rax je 0x806f6 jmp 0x806eb movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x807dd leaq 0x3784a7(%rip), %rax # 0x3f8ba4 movl (%rax), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x80070 movq %rax, %rcx leaq 0x1b8392(%rip), %rax # 0x238aa8 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, (%rax) leaq 0x377f32(%rip), %rax # 0x3f8660 movq (%rax), %rcx addq $0x1, %rcx leaq 0x377f24(%rip), %rax # 0x3f8660 movq %rcx, (%rax) movl -0x14(%rbp), %ecx leaq 0x1b835f(%rip), %rax # 0x238aa8 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0x8075c jmp 0x8075e movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x807dd callq 0x28040 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x82360 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) jmp 0x8077c movq -0x20(%rbp), %rax andq $0x19, %rax cmpq $0x0, %rax je 0x807d4 callq 0x82360 cmpl $0x18, (%rax) jne 0x8079b movl $0x17, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) callq 0x82360 movl -0x44(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movl (%rax), %ecx movb $0x0, %al callq 0x7bff0 jmp 0x807d6 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_register_filename: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov [rbp+var_20], r8 cmp [rbp+var_8], 0 jl loc_80766 mov [rbp+var_24], 1 mov eax, [rbp+var_24] lea rcx, my_file_opened lock xadd [rcx], eax mov [rbp+var_28], eax mov eax, [rbp+var_8] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_806E9 mov rax, [rbp+var_20] and rax, 2004h cmp rax, 0 jz short loc_806F6 loc_806E9: jmp short $+2 loc_806EB: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp loc_807DD loc_806F6: lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_20] call my_strdup mov rcx, rax lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax], rcx lea rax, my_file_total_opened mov rcx, [rax] add rcx, 1 lea rax, my_file_total_opened mov [rax], rcx mov ecx, [rbp+var_14] lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp short $+2 loc_8075C: jmp short $+2 loc_8075E: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp short loc_807DD loc_80766: call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx jmp short $+2 loc_8077C: mov rax, [rbp+var_20] and rax, 19h cmp rax, 0 jz short loc_807D4 call _my_thread_var cmp dword ptr [rax], 18h jnz short loc_8079B mov [rbp+var_18], 17h loc_8079B: mov eax, [rbp+var_18] mov [rbp+var_44], eax mov rax, [rbp+var_20] and rax, 440h or rax, 4 mov [rbp+var_40], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax call _my_thread_var mov edi, [rbp+var_44] mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov ecx, [rax] mov al, 0 call my_error loc_807D4: jmp short $+2 loc_807D6: mov [rbp+var_4], 0FFFFFFFFh loc_807DD: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_register_filename(long long a1, const char *a2, int a3, unsigned int a4, __int16 a5) { unsigned int *v5; // rax int v7; // [rsp+24h] [rbp-2Ch] if ( (int)a1 < 0 ) { v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, a2) = v7; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var(a1, a2) == 24 ) a4 = 23; v5 = (unsigned int *)my_thread_var(a1, a2); my_error(a4, a5 & 0x440 | 4LL, a2, *v5); } return (unsigned int)-1; } else { _InterlockedExchangeAdd(my_file_opened, 1u); if ( (unsigned int)a1 >= my_file_limit || (a5 & 0x2004) != 0 ) { return (unsigned int)a1; } else { *((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, (long long)a2, a5); ++my_file_total_opened; *((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3; return (unsigned int)a1; } } }
my_register_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV qword ptr [RBP + -0x20],R8 CMP dword ptr [RBP + -0x8],0x0 JL 0x00180766 MOV dword ptr [RBP + -0x24],0x1 MOV EAX,dword ptr [RBP + -0x24] LEA RCX,[0x4f8674] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x8] LEA RCX,[0x338aa0] CMP EAX,dword ptr [RCX] JNC 0x001806e9 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x2004 CMP RAX,0x0 JZ 0x001806f6 LAB_001806e9: JMP 0x001806eb LAB_001806eb: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001807dd LAB_001806f6: LEA RAX,[0x4f8ba4] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00180070 MOV RCX,RAX LEA RAX,[0x338aa8] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX],RCX LEA RAX,[0x4f8660] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x4f8660] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] LEA RAX,[0x338aa8] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x0018075c LAB_0018075c: JMP 0x0018075e LAB_0018075e: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x001807dd LAB_00180766: CALL 0x00128040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x00182360 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX JMP 0x0018077c LAB_0018077c: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x19 CMP RAX,0x0 JZ 0x001807d4 CALL 0x00182360 CMP dword ptr [RAX],0x18 JNZ 0x0018079b MOV dword ptr [RBP + -0x18],0x17 LAB_0018079b: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX CALL 0x00182360 MOV EDI,dword ptr [RBP + -0x44] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV AL,0x0 CALL 0x0017bff0 LAB_001807d4: JMP 0x001807d6 LAB_001807d6: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001807dd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; int4 local_20; uint local_c; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); local_20 = param_4; if (*piVar3 == 0x18) { local_20 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4); } local_c = 0xffffffff; } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); local_c = param_1; if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3; } } return local_c; }
65,711
evmone::get_error_message(evmone::EOFValidationError)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/eof.cpp
std::string_view get_error_message(EOFValidationError err) noexcept { switch (err) { case EOFValidationError::success: return "success"; case EOFValidationError::invalid_prefix: return "invalid_prefix"; case EOFValidationError::eof_version_unknown: return "eof_version_unknown"; case EOFValidationError::incomplete_section_size: return "incomplete_section_size"; case EOFValidationError::incomplete_section_number: return "incomplete_section_number"; case EOFValidationError::header_terminator_missing: return "header_terminator_missing"; case EOFValidationError::type_section_missing: return "type_section_missing"; case EOFValidationError::code_section_missing: return "code_section_missing"; case EOFValidationError::data_section_missing: return "data_section_missing"; case EOFValidationError::zero_section_size: return "zero_section_size"; case EOFValidationError::section_headers_not_terminated: return "section_headers_not_terminated"; case EOFValidationError::invalid_section_bodies_size: return "invalid_section_bodies_size"; case EOFValidationError::unreachable_code_sections: return "unreachable_code_sections"; case EOFValidationError::undefined_instruction: return "undefined_instruction"; case EOFValidationError::truncated_instruction: return "truncated_instruction"; case EOFValidationError::invalid_rjump_destination: return "invalid_rjump_destination"; case EOFValidationError::too_many_code_sections: return "too_many_code_sections"; case EOFValidationError::invalid_type_section_size: return "invalid_type_section_size"; case EOFValidationError::invalid_first_section_type: return "invalid_first_section_type"; case EOFValidationError::invalid_max_stack_increase: return "invalid_max_stack_increase"; case EOFValidationError::max_stack_increase_above_limit: return "max_stack_increase_above_limit"; case EOFValidationError::inputs_outputs_num_above_limit: return "inputs_outputs_num_above_limit"; case EOFValidationError::no_terminating_instruction: return "no_terminating_instruction"; case EOFValidationError::stack_height_mismatch: return "stack_height_mismatch"; case EOFValidationError::stack_higher_than_outputs_required: return "stack_higher_than_outputs_required"; case EOFValidationError::unreachable_instructions: return "unreachable_instructions"; case EOFValidationError::stack_underflow: return "stack_underflow"; case EOFValidationError::stack_overflow: return "stack_overflow"; case EOFValidationError::invalid_code_section_index: return "invalid_code_section_index"; case EOFValidationError::invalid_dataloadn_index: return "invalid_dataloadn_index"; case EOFValidationError::jumpf_destination_incompatible_outputs: return "jumpf_destination_incompatible_outputs"; case EOFValidationError::invalid_non_returning_flag: return "invalid_non_returning_flag"; case EOFValidationError::callf_to_non_returning_function: return "callf_to_non_returning_function"; case EOFValidationError::too_many_container_sections: return "too_many_container_sections"; case EOFValidationError::invalid_container_section_index: return "invalid_container_section_index"; case EOFValidationError::eofcreate_with_truncated_container: return "eofcreate_with_truncated_container"; case EOFValidationError::toplevel_container_truncated: return "toplevel_container_truncated"; case EOFValidationError::ambiguous_container_kind: return "ambiguous_container_kind"; case EOFValidationError::incompatible_container_kind: return "incompatible_container_kind"; case EOFValidationError::container_size_above_limit: return "container_size_above_limit"; case EOFValidationError::unreferenced_subcontainer: return "unreferenced_subcontainer"; } return "<unknown>"; }
O0
cpp
evmone::get_error_message(evmone::EOFValidationError): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x14(%rbp) movl -0x14(%rbp), %eax movq %rax, -0x20(%rbp) subq $0x28, %rax ja 0x73a08 movq -0x20(%rbp), %rax leaq 0x72459(%rip), %rcx # 0xe5b10 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq -0x10(%rbp), %rdi leaq 0x72668(%rip), %rsi # 0xe5d33 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7265b(%rip), %rsi # 0xe5d3b callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72655(%rip), %rsi # 0xe5d4a callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72654(%rip), %rsi # 0xe5d5e callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72657(%rip), %rsi # 0xe5d76 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7265c(%rip), %rsi # 0xe5d90 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72661(%rip), %rsi # 0xe5daa callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72661(%rip), %rsi # 0xe5dbf callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72661(%rip), %rsi # 0xe5dd4 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72661(%rip), %rsi # 0xe5de9 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7265e(%rip), %rsi # 0xe5dfb callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72668(%rip), %rsi # 0xe5e1a callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7266f(%rip), %rsi # 0xe5e36 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72674(%rip), %rsi # 0xe5e50 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72675(%rip), %rsi # 0xe5e66 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72676(%rip), %rsi # 0xe5e7c callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7267b(%rip), %rsi # 0xe5e96 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7267d(%rip), %rsi # 0xe5ead callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72682(%rip), %rsi # 0xe5ec7 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72688(%rip), %rsi # 0xe5ee2 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7268e(%rip), %rsi # 0xe5efd callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72698(%rip), %rsi # 0xe5f1c callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726a2(%rip), %rsi # 0xe5f3b callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726a8(%rip), %rsi # 0xe5f56 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726a9(%rip), %rsi # 0xe5f6c callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726b7(%rip), %rsi # 0xe5f8f callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726bb(%rip), %rsi # 0xe5fa8 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726b6(%rip), %rsi # 0xe5fb8 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726b0(%rip), %rsi # 0xe5fc7 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726b6(%rip), %rsi # 0xe5fe2 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726b9(%rip), %rsi # 0xe5ffa callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726cb(%rip), %rsi # 0xe6021 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726d1(%rip), %rsi # 0xe603c callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726dc(%rip), %rsi # 0xe605c callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726e3(%rip), %rsi # 0xe6078 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x726f1(%rip), %rsi # 0xe6098 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72702(%rip), %rsi # 0xe60bb callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7270d(%rip), %rsi # 0xe60d8 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72714(%rip), %rsi # 0xe60f1 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7271e(%rip), %rsi # 0xe610d callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x72727(%rip), %rsi # 0xe6128 callq 0x3a3c0 jmp 0x73a18 leaq -0x10(%rbp), %rdi leaq 0x7272f(%rip), %rsi # 0xe6142 callq 0x3a3c0 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rdx addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6evmone17get_error_messageENS_18EOFValidationErrorE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_14], edi mov eax, [rbp+var_14] mov [rbp+var_20], rax sub rax, 28h; switch 41 cases ja def_736BE; jumptable 00000000000736BE default case mov rax, [rbp+var_20] lea rcx, jpt_736BE movsxd rax, ds:(jpt_736BE - 0E5B10h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_736C0: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 0 lea rsi, aSuccess; "success" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_736D5: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 1 lea rsi, aInvalidPrefix; "invalid_prefix" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_736EA: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 2 lea rsi, aEofVersionUnkn; "eof_version_unknown" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_736FF: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 3 lea rsi, aIncompleteSect; "incomplete_section_size" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73714: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 4 lea rsi, aIncompleteSect_0; "incomplete_section_number" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73729: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 5 lea rsi, aHeaderTerminat; "header_terminator_missing" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7373E: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 6 lea rsi, aTypeSectionMis; "type_section_missing" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73753: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 7 lea rsi, aCodeSectionMis; "code_section_missing" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73768: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 8 lea rsi, aDataSectionMis; "data_section_missing" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7377D: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 9 lea rsi, aZeroSectionSiz; "zero_section_size" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73792: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 10 lea rsi, aSectionHeaders; "section_headers_not_terminated" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_737A7: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 11 lea rsi, aInvalidSection; "invalid_section_bodies_size" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_737BC: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 12 lea rsi, aUnreachableCod; "unreachable_code_sections" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_737D1: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 13 lea rsi, aUndefinedInstr_0; "undefined_instruction" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_737E6: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 14 lea rsi, aTruncatedInstr; "truncated_instruction" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_737FB: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 15 lea rsi, aInvalidRjumpDe; "invalid_rjump_destination" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73810: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 16 lea rsi, aTooManyCodeSec; "too_many_code_sections" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73825: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 17 lea rsi, aInvalidTypeSec; "invalid_type_section_size" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7383A: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 18 lea rsi, aInvalidFirstSe; "invalid_first_section_type" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7384F: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 19 lea rsi, aInvalidMaxStac; "invalid_max_stack_increase" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73864: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 23 lea rsi, aMaxStackIncrea; "max_stack_increase_above_limit" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73879: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 24 lea rsi, aInputsOutputsN; "inputs_outputs_num_above_limit" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7388E: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 20 lea rsi, aNoTerminatingI; "no_terminating_instruction" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_738A3: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 21 lea rsi, aStackHeightMis; "stack_height_mismatch" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_738B8: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 22 lea rsi, aStackHigherTha; "stack_higher_than_outputs_required" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_738CD: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 25 lea rsi, aUnreachableIns; "unreachable_instructions" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_738E2: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 26 lea rsi, aStackUnderflow_0; "stack_underflow" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_738F7: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 27 lea rsi, aStackOverflow_0; "stack_overflow" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7390C: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 28 lea rsi, aInvalidCodeSec; "invalid_code_section_index" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73921: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 29 lea rsi, aInvalidDataloa; "invalid_dataloadn_index" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73936: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 30 lea rsi, aJumpfDestinati; "jumpf_destination_incompatible_outputs" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7394B: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 31 lea rsi, aInvalidNonRetu; "invalid_non_returning_flag" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73960: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 32 lea rsi, aCallfToNonRetu; "callf_to_non_returning_function" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_73975: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 33 lea rsi, aTooManyContain; "too_many_container_sections" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp loc_73A18 loc_7398A: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 34 lea rsi, aInvalidContain; "invalid_container_section_index" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_7399C: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 35 lea rsi, aEofcreateWithT; "eofcreate_with_truncated_container" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_739AE: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 36 lea rsi, aToplevelContai; "toplevel_container_truncated" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_739C0: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 37 lea rsi, aAmbiguousConta; "ambiguous_container_kind" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_739D2: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 38 lea rsi, aIncompatibleCo; "incompatible_container_kind" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_739E4: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 39 lea rsi, aContainerSizeA; "container_size_above_limit" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 loc_739F6: lea rdi, [rbp+var_10]; jumptable 00000000000736BE case 40 lea rsi, aUnreferencedSu; "unreferenced_subcontainer" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_73A18 def_736BE: lea rdi, [rbp+var_10]; jumptable 00000000000736BE default case lea rsi, aUnknown; "<unknown>" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) loc_73A18: mov rax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 20h pop rbp retn
long long evmone::get_error_message(int a1) { long long v2; // [rsp+10h] [rbp-10h] BYREF switch ( a1 ) { case 0: std::string_view::basic_string_view(&v2, (long long)"success"); break; case 1: std::string_view::basic_string_view(&v2, (long long)"invalid_prefix"); break; case 2: std::string_view::basic_string_view(&v2, (long long)"eof_version_unknown"); break; case 3: std::string_view::basic_string_view(&v2, (long long)"incomplete_section_size"); break; case 4: std::string_view::basic_string_view(&v2, (long long)"incomplete_section_number"); break; case 5: std::string_view::basic_string_view(&v2, (long long)"header_terminator_missing"); break; case 6: std::string_view::basic_string_view(&v2, (long long)"type_section_missing"); break; case 7: std::string_view::basic_string_view(&v2, (long long)"code_section_missing"); break; case 8: std::string_view::basic_string_view(&v2, (long long)"data_section_missing"); break; case 9: std::string_view::basic_string_view(&v2, (long long)"zero_section_size"); break; case 10: std::string_view::basic_string_view(&v2, (long long)"section_headers_not_terminated"); break; case 11: std::string_view::basic_string_view(&v2, (long long)"invalid_section_bodies_size"); break; case 12: std::string_view::basic_string_view(&v2, (long long)"unreachable_code_sections"); break; case 13: std::string_view::basic_string_view(&v2, (long long)"undefined_instruction"); break; case 14: std::string_view::basic_string_view(&v2, (long long)"truncated_instruction"); break; case 15: std::string_view::basic_string_view(&v2, (long long)"invalid_rjump_destination"); break; case 16: std::string_view::basic_string_view(&v2, (long long)"too_many_code_sections"); break; case 17: std::string_view::basic_string_view(&v2, (long long)"invalid_type_section_size"); break; case 18: std::string_view::basic_string_view(&v2, (long long)"invalid_first_section_type"); break; case 19: std::string_view::basic_string_view(&v2, (long long)"invalid_max_stack_increase"); break; case 20: std::string_view::basic_string_view(&v2, (long long)"no_terminating_instruction"); break; case 21: std::string_view::basic_string_view(&v2, (long long)"stack_height_mismatch"); break; case 22: std::string_view::basic_string_view(&v2, (long long)"stack_higher_than_outputs_required"); break; case 23: std::string_view::basic_string_view(&v2, (long long)"max_stack_increase_above_limit"); break; case 24: std::string_view::basic_string_view(&v2, (long long)"inputs_outputs_num_above_limit"); break; case 25: std::string_view::basic_string_view(&v2, (long long)"unreachable_instructions"); break; case 26: std::string_view::basic_string_view(&v2, (long long)"stack_underflow"); break; case 27: std::string_view::basic_string_view(&v2, (long long)"stack_overflow"); break; case 28: std::string_view::basic_string_view(&v2, (long long)"invalid_code_section_index"); break; case 29: std::string_view::basic_string_view(&v2, (long long)"invalid_dataloadn_index"); break; case 30: std::string_view::basic_string_view(&v2, (long long)"jumpf_destination_incompatible_outputs"); break; case 31: std::string_view::basic_string_view(&v2, (long long)"invalid_non_returning_flag"); break; case 32: std::string_view::basic_string_view(&v2, (long long)"callf_to_non_returning_function"); break; case 33: std::string_view::basic_string_view(&v2, (long long)"too_many_container_sections"); break; case 34: std::string_view::basic_string_view(&v2, (long long)"invalid_container_section_index"); break; case 35: std::string_view::basic_string_view(&v2, (long long)"eofcreate_with_truncated_container"); break; case 36: std::string_view::basic_string_view(&v2, (long long)"toplevel_container_truncated"); break; case 37: std::string_view::basic_string_view(&v2, (long long)"ambiguous_container_kind"); break; case 38: std::string_view::basic_string_view(&v2, (long long)"incompatible_container_kind"); break; case 39: std::string_view::basic_string_view(&v2, (long long)"container_size_above_limit"); break; case 40: std::string_view::basic_string_view(&v2, (long long)"unreferenced_subcontainer"); break; default: std::string_view::basic_string_view(&v2, (long long)"<unknown>"); break; } return v2; }
get_error_message: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x14],EDI MOV EAX,dword ptr [RBP + -0x14] MOV qword ptr [RBP + -0x20],RAX SUB RAX,0x28 JA 0x00173a08 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x1e5b10] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d33] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d3b] CALL 0x0013a3c0 JMP 0x00173a18 caseD_2: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d4a] CALL 0x0013a3c0 JMP 0x00173a18 caseD_3: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d5e] CALL 0x0013a3c0 JMP 0x00173a18 caseD_4: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d76] CALL 0x0013a3c0 JMP 0x00173a18 caseD_5: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5d90] CALL 0x0013a3c0 JMP 0x00173a18 caseD_6: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5daa] CALL 0x0013a3c0 JMP 0x00173a18 caseD_7: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5dbf] CALL 0x0013a3c0 JMP 0x00173a18 caseD_8: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5dd4] CALL 0x0013a3c0 JMP 0x00173a18 caseD_9: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5de9] CALL 0x0013a3c0 JMP 0x00173a18 caseD_a: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5dfb] CALL 0x0013a3c0 JMP 0x00173a18 caseD_b: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e1a] CALL 0x0013a3c0 JMP 0x00173a18 caseD_c: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e36] CALL 0x0013a3c0 JMP 0x00173a18 caseD_d: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e50] CALL 0x0013a3c0 JMP 0x00173a18 caseD_e: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e66] CALL 0x0013a3c0 JMP 0x00173a18 caseD_f: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e7c] CALL 0x0013a3c0 JMP 0x00173a18 caseD_10: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5e96] CALL 0x0013a3c0 JMP 0x00173a18 caseD_11: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5ead] CALL 0x0013a3c0 JMP 0x00173a18 caseD_12: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5ec7] CALL 0x0013a3c0 JMP 0x00173a18 caseD_13: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5ee2] CALL 0x0013a3c0 JMP 0x00173a18 caseD_17: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5efd] CALL 0x0013a3c0 JMP 0x00173a18 caseD_18: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5f1c] CALL 0x0013a3c0 JMP 0x00173a18 caseD_14: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5f3b] CALL 0x0013a3c0 JMP 0x00173a18 caseD_15: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5f56] CALL 0x0013a3c0 JMP 0x00173a18 caseD_16: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5f6c] CALL 0x0013a3c0 JMP 0x00173a18 caseD_19: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5f8f] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1a: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5fa8] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1b: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5fb8] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1c: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5fc7] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1d: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5fe2] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1e: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e5ffa] CALL 0x0013a3c0 JMP 0x00173a18 caseD_1f: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e6021] CALL 0x0013a3c0 JMP 0x00173a18 caseD_20: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e603c] CALL 0x0013a3c0 JMP 0x00173a18 caseD_21: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e605c] CALL 0x0013a3c0 JMP 0x00173a18 caseD_22: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e6078] CALL 0x0013a3c0 JMP 0x00173a18 caseD_23: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e6098] CALL 0x0013a3c0 JMP 0x00173a18 caseD_24: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e60bb] CALL 0x0013a3c0 JMP 0x00173a18 caseD_25: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e60d8] CALL 0x0013a3c0 JMP 0x00173a18 caseD_26: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e60f1] CALL 0x0013a3c0 JMP 0x00173a18 caseD_27: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e610d] CALL 0x0013a3c0 JMP 0x00173a18 caseD_28: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e6128] CALL 0x0013a3c0 JMP 0x00173a18 default: LEA RDI,[RBP + -0x10] LEA RSI,[0x1e6142] CALL 0x0013a3c0 LAB_00173a18: MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
/* evmone::get_error_message(evmone::EOFValidationError) */ int1 [16] evmone::get_error_message(int4 param_1) { int1 auVar1 [16]; basic_string_view<char,std::char_traits<char>> local_18 [16]; switch(param_1) { case 0: std::basic_string_view<char,std::char_traits<char>>::basic_string_view(local_18,"success"); break; case 1: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_prefix"); break; case 2: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"eof_version_unknown"); break; case 3: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"incomplete_section_size"); break; case 4: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"incomplete_section_number"); break; case 5: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"header_terminator_missing"); break; case 6: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"type_section_missing"); break; case 7: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"code_section_missing"); break; case 8: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"data_section_missing"); break; case 9: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"zero_section_size"); break; case 10: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"section_headers_not_terminated"); break; case 0xb: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_section_bodies_size"); break; case 0xc: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"unreachable_code_sections"); break; case 0xd: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"int_instruction"); break; case 0xe: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"truncated_instruction"); break; case 0xf: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_rjump_destination"); break; case 0x10: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"too_many_code_sections"); break; case 0x11: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_type_section_size"); break; case 0x12: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_first_section_type"); break; case 0x13: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_max_stack_increase"); break; case 0x14: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"no_terminating_instruction"); break; case 0x15: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"stack_height_mismatch"); break; case 0x16: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"stack_higher_than_outputs_required"); break; case 0x17: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"max_stack_increase_above_limit"); break; case 0x18: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"inputs_outputs_num_above_limit"); break; case 0x19: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"unreachable_instructions"); break; case 0x1a: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"stack_underflow"); break; case 0x1b: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"stack_overflow"); break; case 0x1c: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_code_section_index"); break; case 0x1d: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_dataloadn_index"); break; case 0x1e: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"jumpf_destination_incompatible_outputs"); break; case 0x1f: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_non_returning_flag"); break; case 0x20: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"callf_to_non_returning_function"); break; case 0x21: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"too_many_container_sections"); break; case 0x22: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"invalid_container_section_index"); break; case 0x23: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"eofcreate_with_truncated_container"); break; case 0x24: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"toplevel_container_truncated"); break; case 0x25: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"ambiguous_container_kind"); break; case 0x26: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"incompatible_container_kind"); break; case 0x27: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"container_size_above_limit"); break; case 0x28: std::basic_string_view<char,std::char_traits<char>>::basic_string_view (local_18,"unreferenced_subcontainer"); break; default: std::basic_string_view<char,std::char_traits<char>>::basic_string_view(local_18,"<unknown>"); } auVar1[0] = local_18[0]; auVar1[1] = local_18[1]; auVar1[2] = local_18[2]; auVar1[3] = local_18[3]; auVar1[4] = local_18[4]; auVar1[5] = local_18[5]; auVar1[6] = local_18[6]; auVar1[7] = local_18[7]; auVar1[8] = local_18[8]; auVar1[9] = local_18[9]; auVar1[10] = local_18[10]; auVar1[0xb] = local_18[0xb]; auVar1[0xc] = local_18[0xc]; auVar1[0xd] = local_18[0xd]; auVar1[0xe] = local_18[0xe]; auVar1[0xf] = local_18[0xf]; return auVar1; }
65,712
yoyo::Message::formatMsg[abi:cxx11]()
isyoCode[P]yoyologger/test/../src/logger.hpp
std::string formatMsg() noexcept { std::string str; str += "["; str += getCurrentTime(); str += "]"; str += "["; str += LevelFlag[static_cast<int>(_levle)]; str += "]"; str += "["; str += _loction._fileName; str += ":"; str += _loction._Function; str += ":"; str += std::to_string(_loction._Line); str += ":"; str += _sMsg; str += "]"; return str; }
O1
cpp
yoyo::Message::formatMsg[abi:cxx11](): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq 0x12eb(%rip), %rsi # 0x723a callq 0x4992 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x6116 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x5226 leaq 0x18(%rsp), %r12 movq -0x10(%r12), %rdi cmpq %r12, %rdi je 0x5f8f movq 0x18(%rsp), %rsi incq %rsi callq 0x3290 leaq 0x12a6(%rip), %rsi # 0x723c movq %rbx, %rdi callq 0x4992 leaq 0x1295(%rip), %rsi # 0x723a movq %rbx, %rdi callq 0x4992 movslq (%r14), %rax shlq $0x4, %rax leaq 0x4cd5(%rip), %rcx # 0xac90 movq (%rax,%rcx), %rdx movq 0x8(%rax,%rcx), %rsi movq %rbx, %rdi callq 0x630e leaq 0x1269(%rip), %rsi # 0x723c movq %rbx, %rdi callq 0x4992 leaq 0x1258(%rip), %rsi # 0x723a movq %rbx, %rdi callq 0x4992 movq 0x38(%r14), %rsi movq 0x40(%r14), %rdx movq %rbx, %rdi callq 0x5226 leaq 0x123d(%rip), %rsi # 0x723e movq %rbx, %rdi callq 0x4992 movq 0x58(%r14), %rsi movq 0x60(%r14), %rdx movq %rbx, %rdi callq 0x5226 leaq 0x121e(%rip), %rsi # 0x723e movq %rbx, %rdi callq 0x4992 movq 0x28(%r14), %r15 movl $0x1, %esi cmpq $0xa, %r15 jb 0x6086 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r15, %rcx cmpq $0x63, %rcx jbe 0x607f cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x6084 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x6086 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x6049 addl $-0x3, %esi jmp 0x6086 addl $-0x2, %esi jmp 0x6086 decl %esi movl %esi, %esi leaq 0x8(%rsp), %rdi movq %r12, (%rdi) xorl %edx, %edx callq 0x62a0 movq 0x8(%rsp), %rdi movl 0x10(%rsp), %esi movq %r15, %rdx callq 0x6224 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x5226 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x60d1 movq 0x18(%rsp), %rsi incq %rsi callq 0x3290 leaq 0x1166(%rip), %rsi # 0x723e movq %rbx, %rdi callq 0x4992 movq 0x8(%r14), %rsi movq 0x10(%r14), %rdx movq %rbx, %rdi callq 0x5226 leaq 0x1145(%rip), %rsi # 0x723c movq %rbx, %rdi callq 0x4992 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rdi callq 0x3ecd
_ZN4yoyo7Message9formatMsgB5cxx11Ev: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, asc_7238+2; "[]:" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+48h+var_40] mov rdi, r15 mov rsi, r14 call _ZN4yoyo7Message14getCurrentTimeB5cxx11Ev; yoyo::Message::getCurrentTime(void) mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r12, [rsp+48h+var_30] mov rdi, [r12-10h]; void * cmp rdi, r12 jz short loc_5F8F mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5F8F: lea rsi, asc_7238+4; "]:" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, asc_7238+2; "[]:" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) movsxd rax, dword ptr [r14] shl rax, 4 lea rcx, _ZN4yoyo7Message9LevelFlagE; yoyo::Message::LevelFlag mov rdx, [rax+rcx] mov rsi, [rax+rcx+8] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) lea rsi, asc_7238+4; "]:" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, asc_7238+2; "[]:" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14+38h] mov rdx, [r14+40h] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rsi, asc_7238+6; ":" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14+58h] mov rdx, [r14+60h] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rsi, asc_7238+6; ":" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov r15, [r14+28h] mov esi, 1 cmp r15, 0Ah jb short loc_6086 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r15 loc_6049: cmp rcx, 63h ; 'c' jbe short loc_607F cmp rcx, 3E7h jbe short loc_6084 cmp rcx, 2710h jb short loc_6086 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_6049 add esi, 0FFFFFFFDh jmp short loc_6086 loc_607F: add esi, 0FFFFFFFEh jmp short loc_6086 loc_6084: dec esi loc_6086: mov esi, esi lea rdi, [rsp+48h+var_40] mov [rdi], r12 xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+48h+var_40] mov esi, dword ptr [rsp+48h+var_38] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r12 jz short loc_60D1 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_60D1: lea rsi, asc_7238+6; ":" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r14+8] mov rdx, [r14+10h] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rsi, asc_7238+4; "]:" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rax, rbx add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
long long yoyo::Message::formatMsg[abi:cxx11](long long a1, int *a2) { unsigned long long v3; // r15 unsigned int v4; // esi unsigned long long v5; // rcx bool v6; // cc void *v8; // [rsp+8h] [rbp-40h] BYREF long long v9; // [rsp+10h] [rbp-38h] _QWORD v10[6]; // [rsp+18h] [rbp-30h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::append(a1, (long long)&asc_7238[1]); yoyo::Message::getCurrentTime[abi:cxx11](&v8, a2); std::string::_M_append((_QWORD *)a1, v8, v9); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); std::string::append(a1, (long long)&asc_7238[2]); std::string::append(a1, (long long)&asc_7238[1]); std::string::append( a1, *((_QWORD *)&yoyo::Message::LevelFlag + 2 * *a2 + 1), *((_QWORD *)&yoyo::Message::LevelFlag + 2 * *a2)); std::string::append(a1, (long long)&asc_7238[2]); std::string::append(a1, (long long)&asc_7238[1]); std::string::_M_append((_QWORD *)a1, *((_BYTE **)a2 + 7), *((_QWORD *)a2 + 8)); std::string::append(a1, (long long)&asc_7238[3]); std::string::_M_append((_QWORD *)a1, *((_BYTE **)a2 + 11), *((_QWORD *)a2 + 12)); std::string::append(a1, (long long)&asc_7238[3]); v3 = *((_QWORD *)a2 + 5); v4 = 1; if ( v3 >= 0xA ) { v4 = 4; v5 = *((_QWORD *)a2 + 5); while ( 1 ) { if ( v5 <= 0x63 ) { v4 -= 2; goto LABEL_12; } if ( v5 <= 0x3E7 ) break; if ( v5 < 0x2710 ) goto LABEL_12; v4 += 4; v6 = v5 <= 0x1869F; v5 /= 0x2710uLL; if ( v6 ) { v4 -= 3; goto LABEL_12; } } --v4; } LABEL_12: v8 = v10; std::string::_M_construct(&v8, v4, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v8, (unsigned int)v9, v3); std::string::_M_append((_QWORD *)a1, v8, v9); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); std::string::append(a1, (long long)&asc_7238[3]); std::string::_M_append((_QWORD *)a1, *((_BYTE **)a2 + 1), *((_QWORD *)a2 + 2)); std::string::append(a1, (long long)&asc_7238[2]); return a1; }
formatMsg[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_00105f48: LEA RSI,[0x10723a] CALL 0x00104992 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x00106116 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00105226 LEA R12,[RSP + 0x18] MOV RDI,qword ptr [R12 + -0x10] CMP RDI,R12 JZ 0x00105f8f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00103290 LAB_00105f8f: LEA RSI,[0x10723c] MOV RDI,RBX CALL 0x00104992 LEA RSI,[0x10723a] MOV RDI,RBX CALL 0x00104992 MOVSXD RAX,dword ptr [R14] SHL RAX,0x4 LEA RCX,[0x10ac90] MOV RDX,qword ptr [RAX + RCX*0x1] MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8] MOV RDI,RBX CALL 0x0010630e LEA RSI,[0x10723c] MOV RDI,RBX CALL 0x00104992 LEA RSI,[0x10723a] MOV RDI,RBX CALL 0x00104992 MOV RSI,qword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV RDI,RBX CALL 0x00105226 LEA RSI,[0x10723e] MOV RDI,RBX CALL 0x00104992 MOV RSI,qword ptr [R14 + 0x58] MOV RDX,qword ptr [R14 + 0x60] MOV RDI,RBX CALL 0x00105226 LEA RSI,[0x10723e] MOV RDI,RBX CALL 0x00104992 MOV R15,qword ptr [R14 + 0x28] MOV ESI,0x1 CMP R15,0xa JC 0x00106086 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R15 LAB_00106049: CMP RCX,0x63 JBE 0x0010607f CMP RCX,0x3e7 JBE 0x00106084 CMP RCX,0x2710 JC 0x00106086 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x00106049 ADD ESI,-0x3 JMP 0x00106086 LAB_0010607f: ADD ESI,-0x2 JMP 0x00106086 LAB_00106084: DEC ESI LAB_00106086: MOV ESI,ESI LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R12 XOR EDX,EDX CALL 0x001062a0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x10] MOV RDX,R15 CALL 0x00106224 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RDI,RBX CALL 0x00105226 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x001060d1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00103290 LAB_001060d1: LEA RSI,[0x10723e] MOV RDI,RBX CALL 0x00104992 MOV RSI,qword ptr [R14 + 0x8] MOV RDX,qword ptr [R14 + 0x10] MOV RDI,RBX CALL 0x00105226 LEA RSI,[0x10723c] MOV RDI,RBX CALL 0x00104992 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* yoyo::Message::formatMsg[abi:cxx11]() */ void yoyo::Message::formatMsg_abi_cxx11_(void) { ulong uVar1; bool bVar2; uint uVar3; ulong uVar4; uint uVar5; int *in_RSI; string *in_RDI; long *local_40; uint local_38; int4 uStack_34; long local_30 [2]; *(string **)in_RDI = in_RDI + 0x10; *(int8 *)(in_RDI + 8) = 0; in_RDI[0x10] = (string)0x0; /* try { // try from 00105f48 to 001060fe has its CatchHandler @ 0010610e */ std::__cxx11::string::append(in_RDI,"["); getCurrentTime_abi_cxx11_(); std::__cxx11::string::_M_append(in_RDI,(char *)local_40,CONCAT44(uStack_34,local_38)); if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } std::__cxx11::string::append(in_RDI,"]"); std::__cxx11::string::append(in_RDI,"["); std::__cxx11::string::append (in_RDI,*(char **)(LevelFlag + (long)*in_RSI * 0x10 + 8), *(ulong *)(LevelFlag + (long)*in_RSI * 0x10)); std::__cxx11::string::append(in_RDI,"]"); std::__cxx11::string::append(in_RDI,"["); std::__cxx11::string::_M_append(in_RDI,*(char **)(in_RSI + 0xe),*(ulong *)(in_RSI + 0x10)); std::__cxx11::string::append(in_RDI,":"); std::__cxx11::string::_M_append(in_RDI,*(char **)(in_RSI + 0x16),*(ulong *)(in_RSI + 0x18)); std::__cxx11::string::append(in_RDI,":"); uVar1 = *(ulong *)(in_RSI + 10); uVar5 = 1; if (9 < uVar1) { uVar4 = uVar1; uVar3 = 4; do { uVar5 = uVar3; if (uVar4 < 100) { uVar5 = uVar5 - 2; goto LAB_00106086; } if (uVar4 < 1000) { uVar5 = uVar5 - 1; goto LAB_00106086; } if (uVar4 < 10000) goto LAB_00106086; bVar2 = 99999 < uVar4; uVar4 = uVar4 / 10000; uVar3 = uVar5 + 4; } while (bVar2); uVar5 = uVar5 + 1; } LAB_00106086: local_40 = local_30; std::__cxx11::string::_M_construct((string *)&local_40,(ulong)uVar5,'\0'); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,uVar1); std::__cxx11::string::_M_append(in_RDI,(char *)local_40,CONCAT44(uStack_34,local_38)); if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } std::__cxx11::string::append(in_RDI,":"); std::__cxx11::string::_M_append(in_RDI,*(char **)(in_RSI + 2),*(ulong *)(in_RSI + 4)); std::__cxx11::string::append(in_RDI,"]"); return; }
65,713
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
static std::string strip(const std::string & s) { auto start = s.find_first_not_of(" \t\n\r"); if (start == std::string::npos) return ""; auto end = s.find_last_not_of(" \t\n\r"); return s.substr(start, end - start + 1); }
O3
cpp
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx leaq 0x77f59(%rip), %rsi # 0xf2a06 movl $0x4, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x1c110 cmpq $-0x1, %rax je 0x7aafa movq %rax, %r15 leaq 0x77f3a(%rip), %rsi # 0xf2a06 movl $0x4, %ecx movq %r14, %rdi movq $-0x1, %rdx callq 0x1c040 subq %r15, %rax leaq 0x1(%rax), %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx popq %rbx popq %r14 popq %r15 jmp 0x1ba80 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x732a4(%rip), %rdx # 0xeddac movq %rbx, %rdi movq %rdx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x22b0c
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi lea rsi, asc_F2A06; " \t\n\r" mov ecx, 4 mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_7AAFA mov r15, rax lea rsi, asc_F2A06; " \t\n\r" mov ecx, 4 mov rdi, r14 mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcmm; std::string::find_last_not_of(char const*,ulong,ulong) sub rax, r15 lea rcx, [rax+1] mov rdi, rbx mov rsi, r14 mov rdx, r15 pop rbx pop r14 pop r15 jmp __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) loc_7AAFA: lea rax, [rbx+10h] mov [rbx], rax lea rdx, aErrorWhileHand_0+34h; "" mov rdi, rbx mov rsi, rdx pop rbx pop r14 pop r15 jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
long long minja::strip(_QWORD *a1, long long a2) { long long first_not_of; // rax long long v3; // r15 long long last_not_of; // rax first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL, 4LL); if ( first_not_of == -1 ) { *a1 = a1 + 2; return std::string::_M_construct<char const*>((long long)a1, "", (long long)""); } else { v3 = first_not_of; last_not_of = std::string::find_last_not_of(a2, " \t\n\r", -1LL, 4LL); return std::string::substr(a1, a2, v3, last_not_of - v3 + 1); } }
strip: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x1f2a06] MOV ECX,0x4 MOV RDI,R14 XOR EDX,EDX CALL 0x0011c110 CMP RAX,-0x1 JZ 0x0017aafa MOV R15,RAX LEA RSI,[0x1f2a06] MOV ECX,0x4 MOV RDI,R14 MOV RDX,-0x1 CALL 0x0011c040 SUB RAX,R15 LEA RCX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 POP RBX POP R14 POP R15 JMP 0x0011ba80 LAB_0017aafa: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x1eddac] MOV RDI,RBX MOV RSI,RDX POP RBX POP R14 POP R15 JMP 0x00122b0c
/* minja::strip(std::__cxx11::string const&) */ void __thiscall minja::strip(minja *this,string *param_1) { long lVar1; lVar1 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1f2a06,0); if (lVar1 != -1) { std::__cxx11::string::find_last_not_of((char *)param_1,0x1f2a06,0xffffffffffffffff); std::__cxx11::string::substr((ulong)this,(ulong)param_1); return; } *(minja **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,""); return; }
65,714
nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int)
ng-log[P]ng-log/src/vlog_is_on.cc
bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default, const char* fname, int32 verbose_level) { std::lock_guard<std::mutex> l(vmodule_mutex); bool read_vmodule_flag = inited_vmodule; if (!read_vmodule_flag) { VLOG2Initializer(); } // protect the errno global in case someone writes: // VLOG(..) << "The last error was " << strerror(errno) int old_errno = errno; // site_default normally points to FLAGS_v int32* site_flag_value = level_default; // Get basename for file const char* base = strrchr(fname, '/'); #ifdef _WIN32 if (!base) { base = strrchr(fname, '\\'); } #endif base = base ? (base + 1) : fname; const char* base_end = strchr(base, '.'); size_t base_length = base_end ? static_cast<size_t>(base_end - base) : strlen(base); // Trim out trailing "-inl" if any if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) { base_length -= 4; } // TODO: Trim out _unittest suffix? Perhaps it is better to have // the extra control and just leave it there. // find target in vector of modules, replace site_flag_value with // a module-specific verbose level, if any. for (const VModuleInfo* info = vmodule_list; info != nullptr; info = info->next) { if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(), base, base_length)) { site_flag_value = &info->vlog_level; // value at info->vlog_level is now what controls // the VLOG at the caller site forever break; } } // Cache the vlog value pointer if --vmodule flag has been parsed. ANNOTATE_BENIGN_RACE(site_flag, "*site_flag may be written by several threads," " but the value will be the same"); if (read_vmodule_flag) { site_flag->level = site_flag_value; // If VLOG flag has been cached to the default site pointer, // we want to add to the cached list in order to invalidate in case // SetVModule is called afterwards with new modules. // The performance penalty here is neglible, because InitializeVLOG3 is // called once per site. if (site_flag_value == level_default && !site_flag->base_name) { site_flag->base_name = base; site_flag->base_len = base_length; site_flag->next = cached_site_list; cached_site_list = site_flag; } } // restore the errno in case something recoverable went wrong during // the initialization of the VLOG mechanism (see above note "protect the..") errno = old_errno; return *site_flag_value >= verbose_level; }
O2
cpp
nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %r12 leaq 0x219bd(%rip), %rdi # 0x3ec80 callq 0x1af84 movb 0x219aa(%rip), %al # 0x3ec78 movb %al, 0x7(%rsp) testb %al, %al jne 0x1d3f2 movq %r14, 0x10(%rsp) movq %r13, 0x18(%rsp) movq %r12, 0x20(%rsp) movl %ebp, 0x8(%rsp) movb $0x0, 0x21984(%rip) # 0x3ec78 leaq 0x102ad(%rip), %rax # 0x2d5a8 movq (%rax), %rax movq (%rax), %r14 leaq 0x28(%rsp), %r13 xorl %ebp, %ebp xorl %r12d, %r12d movq %r14, %rdi pushq $0x3d popq %rsi callq 0x71b0 testq %rax, %rax je 0x1d3be movq %rax, %r15 leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x9338 movq %r15, %rdi leaq 0x2d2e(%rip), %rsi # 0x20072 leaq 0xc(%rsp), %rdx xorl %eax, %eax callq 0x7550 cmpl $0x1, %eax jne 0x1d38e pushq $0x30 popq %rdi callq 0x8a60 movq %rax, %rbx addq $0x10, %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq %rbx, %rdi movq %r13, %rsi callq 0x72f0 movl 0xc(%rsp), %eax movl %eax, 0x20(%rbx) testq %rbp, %rbp je 0x1d393 movq %rbx, 0x28(%r12) jmp 0x1d396 movq %r12, %rbx jmp 0x1d396 movq %rbx, %rbp movq %r15, %rdi pushq $0x2c popq %rsi callq 0x71b0 movq %rax, %r15 leaq 0x1(%rax), %r14 movq %r13, %rdi callq 0x7af8 movq %rbx, %r12 testq %r15, %r15 jne 0x1d30b jmp 0x1d3c1 movq %r12, %rbx testq %rbp, %rbp je 0x1d3d8 movq 0x2187b(%rip), %rax # 0x3ec48 movq %rax, 0x28(%rbx) movq %rbp, 0x21870(%rip) # 0x3ec48 movb $0x1, 0x21899(%rip) # 0x3ec78 movl 0x8(%rsp), %ebp movq 0x20(%rsp), %r12 movq 0x18(%rsp), %r13 movq 0x10(%rsp), %r14 pushq $0x2f popq %rsi movq %r14, %rdi callq 0x7620 leaq 0x1(%rax), %rbx testq %rax, %rax cmoveq %r14, %rbx pushq $0x2e popq %rsi movq %rbx, %rdi callq 0x71b0 testq %rax, %rax je 0x1d420 movq %rax, %r14 subq %rbx, %r14 jmp 0x1d42b movq %rbx, %rdi callq 0x7230 movq %rax, %r14 cmpq $0x4, %r14 jb 0x1d442 leaq -0x4(%r14), %rax cmpl $0x6c6e692d, -0x4(%rbx,%r14) # imm = 0x6C6E692D cmoveq %rax, %r14 leaq 0x217ff(%rip), %r15 # 0x3ec48 movq (%r15), %r15 testq %r15, %r15 je 0x1d46d movq (%r15), %rdi movq 0x8(%r15), %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x1d044 testb %al, %al jne 0x1d472 addq $0x28, %r15 jmp 0x1d449 movq %r13, %r15 jmp 0x1d476 addq $0x20, %r15 cmpb $0x0, 0x7(%rsp) je 0x1d4ab movq %r15, (%r12) cmpq %r13, %r15 jne 0x1d4ab cmpq $0x0, 0x8(%r12) jne 0x1d4ab movq %rbx, 0x8(%r12) movq %r14, 0x10(%r12) movq 0x217b1(%rip), %rax # 0x3ec50 movq %rax, 0x18(%r12) movq %r12, 0x217a5(%rip) # 0x3ec50 cmpl %ebp, (%r15) setge %bl leaq 0x217c8(%rip), %rdi # 0x3ec80 callq 0x7440 movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x7af8 jmp 0x1d4e0 movq %rax, %rbx leaq 0x21799(%rip), %rdi # 0x3ec80 callq 0x7440 movq %rbx, %rdi callq 0x79c0
_ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14, rdx mov r13, rsi mov r12, rdi lea rdi, _ZN5nglogL13vmodule_mutexE; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule mov [rsp+78h+var_71], al test al, al jnz loc_1D3F2 mov [rsp+78h+var_68], r14 mov [rsp+78h+var_60], r13 mov [rsp+78h+var_58], r12 mov [rsp+78h+var_70], ebp mov cs:_ZN5nglogL14inited_vmoduleE, 0; nglog::inited_vmodule lea rax, _ZN3fLS13FLAGS_vmoduleB5cxx11E; fLS::FLAGS_vmodule mov rax, [rax] mov r14, [rax] lea r13, [rsp+78h+var_50] xor ebp, ebp xor r12d, r12d loc_1D30B: mov rdi, r14 push 3Dh ; '=' pop rsi call _strchr test rax, rax jz loc_1D3BE mov r15, rax lea rax, [rsp+78h+var_40] mov [rsp+78h+var_50], rax mov rdi, r13 mov rsi, r14 mov rdx, r15 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 rdi, r15 lea rsi, aD_0; "=%d" lea rdx, [rsp+78h+var_6C] xor eax, eax call ___isoc99_sscanf cmp eax, 1 jnz short loc_1D38E push 30h ; '0' pop rdi; unsigned __int64 call _Znwm; operator new(ulong) mov rbx, rax add rax, 10h mov [rbx], rax and qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov eax, [rsp+78h+var_6C] mov [rbx+20h], eax test rbp, rbp jz short loc_1D393 mov [r12+28h], rbx jmp short loc_1D396 loc_1D38E: mov rbx, r12 jmp short loc_1D396 loc_1D393: mov rbp, rbx loc_1D396: mov rdi, r15 push 2Ch ; ',' pop rsi call _strchr mov r15, rax lea r14, [rax+1] mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r12, rbx test r15, r15 jnz loc_1D30B jmp short loc_1D3C1 loc_1D3BE: mov rbx, r12 loc_1D3C1: test rbp, rbp jz short loc_1D3D8 mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list mov [rbx+28h], rax mov cs:_ZN5nglogL12vmodule_listE, rbp; nglog::vmodule_list loc_1D3D8: mov cs:_ZN5nglogL14inited_vmoduleE, 1; nglog::inited_vmodule mov ebp, [rsp+78h+var_70] mov r12, [rsp+78h+var_58] mov r13, [rsp+78h+var_60] mov r14, [rsp+78h+var_68] loc_1D3F2: push 2Fh ; '/' pop rsi mov rdi, r14 call _strrchr lea rbx, [rax+1] test rax, rax cmovz rbx, r14 push 2Eh ; '.' pop rsi mov rdi, rbx call _strchr test rax, rax jz short loc_1D420 mov r14, rax sub r14, rbx jmp short loc_1D42B loc_1D420: mov rdi, rbx call _strlen mov r14, rax loc_1D42B: cmp r14, 4 jb short loc_1D442 lea rax, [r14-4] cmp dword ptr [rbx+r14-4], 6C6E692Dh cmovz r14, rax loc_1D442: lea r15, _ZN5nglogL12vmodule_listE; nglog::vmodule_list loc_1D449: mov r15, [r15] test r15, r15 jz short loc_1D46D mov rdi, [r15]; this mov rsi, [r15+8]; char * mov rdx, rbx; unsigned __int64 mov rcx, r14; char * call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong) test al, al jnz short loc_1D472 add r15, 28h ; '(' jmp short loc_1D449 loc_1D46D: mov r15, r13 jmp short loc_1D476 loc_1D472: add r15, 20h ; ' ' loc_1D476: cmp [rsp+78h+var_71], 0 jz short loc_1D4AB mov [r12], r15 cmp r15, r13 jnz short loc_1D4AB cmp qword ptr [r12+8], 0 jnz short loc_1D4AB mov [r12+8], rbx mov [r12+10h], r14 mov rax, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list mov [r12+18h], rax mov cs:_ZN5nglogL16cached_site_listE, r12; nglog::cached_site_list loc_1D4AB: cmp [r15], ebp setnl bl lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex call _pthread_mutex_unlock mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_1D4E0 mov rbx, rax loc_1D4E0: lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4) { _DWORD *v6; // r13 _QWORD *v7; // r12 _BYTE *v8; // r14 long long v9; // rbp long long v10; // r12 long long v11; // rax long long v12; // r15 long long v13; // rbx long long v14; // r15 long long v15; // rax long long v16; // rbx long long v17; // rax unsigned long long v18; // r8 const char *v19; // r14 long long *i; // r15 long long v21; // r15 _DWORD *v22; // r15 char v24; // [rsp+7h] [rbp-71h] int v25; // [rsp+8h] [rbp-70h] int v26; // [rsp+Ch] [rbp-6Ch] BYREF long long v27; // [rsp+10h] [rbp-68h] _DWORD *v28; // [rsp+18h] [rbp-60h] _QWORD *v29; // [rsp+20h] [rbp-58h] _QWORD v30[2]; // [rsp+28h] [rbp-50h] BYREF char v31; // [rsp+38h] [rbp-40h] BYREF v6 = a2; v7 = a1; std::mutex::lock((std::mutex *)&nglog::vmodule_mutex); v24 = nglog::inited_vmodule; if ( !nglog::inited_vmodule ) { v27 = a3; v28 = a2; v29 = a1; v25 = a4; nglog::inited_vmodule = 0; v8 = (_BYTE *)fLS::FLAGS_vmodule_buf[abi:cxx11]; v9 = 0LL; v10 = 0LL; while ( 1 ) { v11 = strchr(v8, 61LL); if ( !v11 ) break; v12 = v11; v30[0] = &v31; std::string::_M_construct<char const*>((long long)v30, v8, v11); if ( (unsigned int)__isoc99_sscanf(v12, "=%d", &v26) == 1 ) { v13 = operator new(48LL); *(_QWORD *)v13 = v13 + 16; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; std::string::_M_assign(v13, v30); *(_DWORD *)(v13 + 32) = v26; if ( v9 ) *(_QWORD *)(v10 + 40) = v13; else v9 = v13; } else { v13 = v10; } v14 = strchr(v12, 44LL); v8 = (_BYTE *)(v14 + 1); std::string::~string(v30); v10 = v13; if ( !v14 ) goto LABEL_12; } v13 = v10; LABEL_12: if ( v9 ) { *(_QWORD *)(v13 + 40) = nglog::vmodule_list; nglog::vmodule_list = v9; } nglog::inited_vmodule = 1; a4 = v25; v7 = v29; v6 = v28; a3 = v27; } v15 = strrchr(a3, 47LL); v16 = v15 + 1; if ( !v15 ) v16 = a3; v17 = strchr(v16, 46LL); if ( v17 ) v19 = (const char *)(v17 - v16); else v19 = (const char *)strlen(v16); if ( (unsigned long long)v19 >= 4 && *(_DWORD *)&v19[v16 - 4] == 1819175213 ) v19 -= 4; for ( i = &nglog::vmodule_list; ; i = (long long *)(v21 + 40) ) { v21 = *i; if ( !v21 ) { v22 = v6; goto LABEL_29; } if ( nglog::tools::SafeFNMatch_(*(nglog::tools **)v21, *(const char **)(v21 + 8), v16, v19, v18) ) break; } v22 = (_DWORD *)(v21 + 32); LABEL_29: if ( v24 ) { *v7 = v22; if ( v22 == v6 && !v7[1] ) { v7[1] = v16; v7[2] = v19; v7[3] = nglog::cached_site_list; nglog::cached_site_list = (long long)v7; } } LOBYTE(v16) = *v22 >= a4; pthread_mutex_unlock(&nglog::vmodule_mutex); return (unsigned int)v16; }
InitializeVLOG3: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14,RDX MOV R13,RSI MOV R12,RDI LEA RDI,[0x13ec80] CALL 0x0011af84 MOV AL,byte ptr [0x0013ec78] MOV byte ptr [RSP + 0x7],AL TEST AL,AL JNZ 0x0011d3f2 MOV qword ptr [RSP + 0x10],R14 MOV qword ptr [RSP + 0x18],R13 MOV qword ptr [RSP + 0x20],R12 MOV dword ptr [RSP + 0x8],EBP MOV byte ptr [0x0013ec78],0x0 LEA RAX,[0x12d5a8] MOV RAX,qword ptr [RAX] MOV R14,qword ptr [RAX] LEA R13,[RSP + 0x28] XOR EBP,EBP XOR R12D,R12D LAB_0011d30b: MOV RDI,R14 PUSH 0x3d POP RSI CALL 0x001071b0 TEST RAX,RAX JZ 0x0011d3be MOV R15,RAX LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_0011d32c: MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 CALL 0x00109338 MOV RDI,R15 LEA RSI,[0x120072] LEA RDX,[RSP + 0xc] XOR EAX,EAX CALL 0x00107550 CMP EAX,0x1 JNZ 0x0011d38e LAB_0011d355: PUSH 0x30 POP RDI CALL 0x00108a60 MOV RBX,RAX ADD RAX,0x10 MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 MOV RDI,RBX MOV RSI,R13 CALL 0x001072f0 LAB_0011d37b: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RBX + 0x20],EAX TEST RBP,RBP JZ 0x0011d393 MOV qword ptr [R12 + 0x28],RBX JMP 0x0011d396 LAB_0011d38e: MOV RBX,R12 JMP 0x0011d396 LAB_0011d393: MOV RBP,RBX LAB_0011d396: MOV RDI,R15 PUSH 0x2c POP RSI CALL 0x001071b0 MOV R15,RAX LEA R14,[RAX + 0x1] MOV RDI,R13 CALL 0x00107af8 MOV R12,RBX TEST R15,R15 JNZ 0x0011d30b JMP 0x0011d3c1 LAB_0011d3be: MOV RBX,R12 LAB_0011d3c1: TEST RBP,RBP JZ 0x0011d3d8 MOV RAX,qword ptr [0x0013ec48] MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [0x0013ec48],RBP LAB_0011d3d8: MOV byte ptr [0x0013ec78],0x1 MOV EBP,dword ptr [RSP + 0x8] MOV R12,qword ptr [RSP + 0x20] MOV R13,qword ptr [RSP + 0x18] MOV R14,qword ptr [RSP + 0x10] LAB_0011d3f2: PUSH 0x2f POP RSI MOV RDI,R14 CALL 0x00107620 LEA RBX,[RAX + 0x1] TEST RAX,RAX CMOVZ RBX,R14 PUSH 0x2e POP RSI MOV RDI,RBX CALL 0x001071b0 TEST RAX,RAX JZ 0x0011d420 MOV R14,RAX SUB R14,RBX JMP 0x0011d42b LAB_0011d420: MOV RDI,RBX CALL 0x00107230 MOV R14,RAX LAB_0011d42b: CMP R14,0x4 JC 0x0011d442 LEA RAX,[R14 + -0x4] CMP dword ptr [RBX + R14*0x1 + -0x4],0x6c6e692d CMOVZ R14,RAX LAB_0011d442: LEA R15,[0x13ec48] LAB_0011d449: MOV R15,qword ptr [R15] TEST R15,R15 JZ 0x0011d46d MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] MOV RDX,RBX MOV RCX,R14 CALL 0x0011d044 TEST AL,AL JNZ 0x0011d472 ADD R15,0x28 JMP 0x0011d449 LAB_0011d46d: MOV R15,R13 JMP 0x0011d476 LAB_0011d472: ADD R15,0x20 LAB_0011d476: CMP byte ptr [RSP + 0x7],0x0 JZ 0x0011d4ab MOV qword ptr [R12],R15 CMP R15,R13 JNZ 0x0011d4ab CMP qword ptr [R12 + 0x8],0x0 JNZ 0x0011d4ab MOV qword ptr [R12 + 0x8],RBX MOV qword ptr [R12 + 0x10],R14 MOV RAX,qword ptr [0x0013ec50] MOV qword ptr [R12 + 0x18],RAX MOV qword ptr [0x0013ec50],R12 LAB_0011d4ab: CMP dword ptr [R15],EBP SETGE BL LEA RDI,[0x13ec80] CALL 0x00107440 MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */ ulong nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4) { int8 *puVar1; char cVar2; char cVar3; int iVar4; char *pcVar5; string *psVar6; char *pcVar7; string *psVar8; string *psVar9; string *psVar10; ulong uVar11; long *plVar12; int *piVar13; int4 local_6c; char *local_68; int *local_60; SiteFlag *local_58; int1 *local_50 [2]; int1 local_40 [16]; std::mutex::lock((mutex *)vmodule_mutex); cVar2 = inited_vmodule; if (inited_vmodule == '\0') { inited_vmodule = 0; pcVar7 = *(char **)fLS::FLAGS_vmodule_abi_cxx11_; psVar8 = (string *)0x0; psVar10 = (string *)0x0; local_68 = param_3; local_60 = param_2; local_58 = param_1; do { pcVar5 = strchr(pcVar7,0x3d); psVar6 = psVar10; psVar9 = psVar8; if (pcVar5 == (char *)0x0) break; local_50[0] = local_40; /* try { // try from 0011d32c to 0011d339 has its CatchHandler @ 0011d4dd */ std::__cxx11::string::_M_construct<char_const*>((string *)local_50,pcVar7,pcVar5); iVar4 = __isoc99_sscanf(pcVar5,&DAT_00120072,&local_6c); if (iVar4 == 1) { /* try { // try from 0011d355 to 0011d37a has its CatchHandler @ 0011d4ce */ psVar6 = (string *)operator_new(0x30); *(string **)psVar6 = psVar6 + 0x10; *(int8 *)(psVar6 + 8) = 0; psVar6[0x10] = (string)0x0; std::__cxx11::string::_M_assign(psVar6); *(int4 *)(psVar6 + 0x20) = local_6c; psVar9 = psVar6; if (psVar8 != (string *)0x0) { *(string **)(psVar10 + 0x28) = psVar6; psVar9 = psVar8; } } pcVar5 = strchr(pcVar5,0x2c); pcVar7 = pcVar5 + 1; std::__cxx11::string::~string((string *)local_50); psVar8 = psVar9; psVar10 = psVar6; } while (pcVar5 != (char *)0x0); if (psVar9 != (string *)0x0) { *(string **)(psVar6 + 0x28) = vmodule_list; vmodule_list = psVar9; } inited_vmodule = '\x01'; param_1 = local_58; param_2 = local_60; param_3 = local_68; } pcVar5 = strrchr(param_3,0x2f); pcVar7 = pcVar5 + 1; if (pcVar5 == (char *)0x0) { pcVar7 = param_3; } pcVar5 = strchr(pcVar7,0x2e); if (pcVar5 == (char *)0x0) { uVar11 = strlen(pcVar7); } else { uVar11 = (long)pcVar5 - (long)pcVar7; } if ((3 < uVar11) && (*(int *)(pcVar7 + (uVar11 - 4)) == 0x6c6e692d)) { uVar11 = uVar11 - 4; } plVar12 = (long *)&vmodule_list; do { puVar1 = (int8 *)*plVar12; piVar13 = param_2; if (puVar1 == (int8 *)0x0) { LAB_0011d476: if (((cVar2 != '\0') && (*(int **)param_1 = piVar13, piVar13 == param_2)) && (*(long *)(param_1 + 8) == 0)) { *(char **)(param_1 + 8) = pcVar7; *(ulong *)(param_1 + 0x10) = uVar11; *(SiteFlag **)(param_1 + 0x18) = cached_site_list; cached_site_list = param_1; } iVar4 = *piVar13; pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex); return CONCAT71((int7)((ulong)pcVar7 >> 8),param_4 <= iVar4) & 0xffffffff; } cVar3 = tools::SafeFNMatch_((char *)*puVar1,puVar1[1],pcVar7,uVar11); if (cVar3 != '\0') { piVar13 = (int *)(puVar1 + 4); goto LAB_0011d476; } plVar12 = puVar1 + 5; } while( true ); }
65,715
my_wc_mb_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_wc_mb_euc_jp(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_eucjp[wc])) /* JIS-X-0208 */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */ { 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_euc_jp: 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 0x6586d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x65855 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x65995 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x65995 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0x65883 movl $0x0, -0x4(%rbp) jmp 0x65995 movq -0x18(%rbp), %rcx leaq 0x2bc732(%rip), %rax # 0x321fc0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x658df movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x658b4 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x65995 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 0x65995 movq -0x18(%rbp), %rcx leaq 0x2dc6d6(%rip), %rax # 0x341fc0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x65940 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x65910 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x65995 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 0x65995 cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61 jb 0x6598e cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F ja 0x6598e movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x6596b movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x65995 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 0x65995 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_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_18] cmp eax, 80h jge short loc_6586D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_65855 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_65995 loc_65855: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_65995 loc_6586D: cmp [rbp+var_18], 0FFFFh jbe short loc_65883 mov [rbp+var_4], 0 jmp loc_65995 loc_65883: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0208_eucjp movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_658DF mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_658B4 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_65995 loc_658B4: 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_65995 loc_658DF: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0212_eucjp movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_65940 mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_65910 mov [rbp+var_4], 0FFFFFF99h jmp loc_65995 loc_65910: 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_65995 loc_65940: cmp [rbp+var_18], 0FF61h jb short loc_6598E cmp [rbp+var_18], 0FF9Fh ja short loc_6598E mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_6596B mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_65995 loc_6596B: 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_65995 loc_6598E: mov [rbp+var_4], 0 loc_65995: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_euc_jp(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_eucjp[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_eucjp[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_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 + -0x18] CMP EAX,0x80 JGE 0x0016586d MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00165855 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00165995 LAB_00165855: 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 0x00165995 LAB_0016586d: CMP qword ptr [RBP + -0x18],0xffff JBE 0x00165883 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00165995 LAB_00165883: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x421fc0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x001658df MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001658b4 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00165995 LAB_001658b4: 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 0x00165995 LAB_001658df: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x441fc0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x00165940 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00165910 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00165995 LAB_00165910: 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 0x00165995 LAB_00165940: CMP qword ptr [RBP + -0x18],0xff61 JC 0x0016598e CMP qword ptr [RBP + -0x18],0xff9f JA 0x0016598e MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0016596b MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00165995 LAB_0016596b: 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 0x00165995 LAB_0016598e: MOV dword ptr [RBP + -0x4],0x0 LAB_00165995: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_euc_jp(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_eucjp + param_2 * 2); if (sVar1 == 0) { sVar1 = *(short *)(unicode_to_jisx0212_eucjp + 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; }
65,716
my_wc_mb_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_wc_mb_euc_jp(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_eucjp[wc])) /* JIS-X-0208 */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */ { 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; }
O3
c
my_wc_mb_euc_jp: cmpl $0x7f, %esi jg 0x4e4d6 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4e50b movb %sil, (%rdx) movl $0x1, %eax retq xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x4e50b leaq 0x246be8(%rip), %rdi # 0x2950d0 movzwl (%rdi,%rsi,2), %edi testw %di, %di je 0x4e50c leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0x4e50b rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx leaq 0x266bb8(%rip), %rdi # 0x2b50d0 movzwl (%rdi,%rsi,2), %ebx testw %bx, %bx je 0x4e53f leaq 0x3(%rdx), %rsi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rsi ja 0x4e56a movb $-0x71, (%rdx) movb %bh, 0x1(%rdx) movb %bl, 0x2(%rdx) movl $0x3, %eax jmp 0x4e56a leaq -0xff61(%rsi), %rdi cmpq $0x3e, %rdi ja 0x4e56a leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x4e56a movb $-0x72, (%rdx) addb $0x40, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax popq %rbx popq %rbp retq
my_wc_mb_euc_jp: cmp esi, 7Fh jg short loc_4E4D6 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_4E50B mov [rdx], sil mov eax, 1 retn loc_4E4D6: xor eax, eax cmp rsi, 0FFFFh ja short locret_4E50B lea rdi, unicode_to_jisx0208_eucjp movzx edi, word ptr [rdi+rsi*2] test di, di jz short loc_4E50C lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short locret_4E50B rol di, 8 mov [rdx], di mov eax, 2 locret_4E50B: retn loc_4E50C: push rbp mov rbp, rsp push rbx lea rdi, unicode_to_jisx0212_eucjp movzx ebx, word ptr [rdi+rsi*2] test bx, bx jz short loc_4E53F lea rsi, [rdx+3] mov eax, 0FFFFFF99h cmp rsi, rcx ja short loc_4E56A mov byte ptr [rdx], 8Fh mov [rdx+1], bh mov [rdx+2], bl mov eax, 3 jmp short loc_4E56A loc_4E53F: lea rdi, [rsi-0FF61h] cmp rdi, 3Eh ; '>' ja short loc_4E56A lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_4E56A mov byte ptr [rdx], 8Eh add sil, 40h ; '@' mov [rdx+1], sil mov eax, 2 loc_4E56A: pop rbx pop rbp retn
long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { long long result; // rax __int16 v5; // di __int16 v6; // bx if ( (int)a2 > 127 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjp[a2]; if ( v5 ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { v6 = unicode_to_jisx0212_eucjp[a2]; if ( v6 ) { result = 4294967193LL; if ( a3 + 3 <= a4 ) { *(_BYTE *)a3 = -113; *(_BYTE *)(a3 + 1) = HIBYTE(v6); *(_BYTE *)(a3 + 2) = v6; return 3LL; } } else if ( a2 - 65377 <= 0x3E ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_BYTE *)a3 = -114; *(_BYTE *)(a3 + 1) = a2 + 64; return 2LL; } } } } } else { result = 4294967195LL; if ( a3 < a4 ) { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_jp: CMP ESI,0x7f JG 0x0014e4d6 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014e50b MOV byte ptr [RDX],SIL MOV EAX,0x1 RET LAB_0014e4d6: XOR EAX,EAX CMP RSI,0xffff JA 0x0014e50b LEA RDI,[0x3950d0] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST DI,DI JZ 0x0014e50c LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x0014e50b ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_0014e50b: RET LAB_0014e50c: PUSH RBP MOV RBP,RSP PUSH RBX LEA RDI,[0x3b50d0] MOVZX EBX,word ptr [RDI + RSI*0x2] TEST BX,BX JZ 0x0014e53f LEA RSI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RSI,RCX JA 0x0014e56a MOV byte ptr [RDX],0x8f MOV byte ptr [RDX + 0x1],BH MOV byte ptr [RDX + 0x2],BL MOV EAX,0x3 JMP 0x0014e56a LAB_0014e53f: LEA RDI,[RSI + -0xff61] CMP RDI,0x3e JA 0x0014e56a LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0014e56a MOV byte ptr [RDX],0x8e ADD SIL,0x40 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 LAB_0014e56a: POP RBX POP RBP RET
int8 my_wc_mb_euc_jp(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; short sVar2; int8 uVar3; if ((int)param_2 < 0x80) { uVar3 = 0xffffff9b; if (param_3 < param_4) { *(char *)param_3 = (char)param_2; return 1; } } else { uVar3 = 0; if (param_2 < 0x10000) { uVar1 = *(ushort *)(unicode_to_jisx0208_eucjp + param_2 * 2); if (uVar1 == 0) { sVar2 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2); if (sVar2 == 0) { if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) { *(char *)param_3 = -0x72; *(char *)((long)param_3 + 1) = (char)param_2 + '@'; uVar3 = 2; } } else { uVar3 = 0xffffff99; if ((ushort *)((long)param_3 + 3) <= param_4) { *(char *)param_3 = -0x71; *(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8); *(char *)(param_3 + 1) = (char)sVar2; uVar3 = 3; } } return uVar3; } uVar3 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar3 = 2; } } } return uVar3; }
65,717
trnman_collect_transactions
eloqsql/storage/maria/trnman.c
my_bool trnman_collect_transactions(LEX_STRING *str_act, LEX_STRING *str_com, LSN *min_rec_lsn, LSN *min_first_undo_lsn) { my_bool error; TRN *trn; char *ptr; uint stored_transactions= 0; LSN minimum_rec_lsn= LSN_MAX, minimum_first_undo_lsn= LSN_MAX; DBUG_ENTER("trnman_collect_transactions"); DBUG_ASSERT((NULL == str_act->str) && (NULL == str_com->str)); /* validate the use of read_non_atomic() in general: */ compile_time_assert((sizeof(LSN) == 8) && (sizeof(LSN_WITH_FLAGS) == 8)); mysql_mutex_lock(&LOCK_trn_list); str_act->length= 2 + /* number of active transactions */ LSN_STORE_SIZE + /* minimum of their rec_lsn */ TRANSID_SIZE + /* current TrID generator value */ (2 + /* short id */ 6 + /* long id */ LSN_STORE_SIZE + /* undo_lsn */ #ifdef MARIA_VERSIONING /* not enabled yet */ LSN_STORE_SIZE + /* undo_purge_lsn */ #endif LSN_STORE_SIZE /* first_undo_lsn */ ) * trnman_active_transactions; str_com->length= 4 + /* number of committed transactions */ (6 + /* long id */ #ifdef MARIA_VERSIONING /* not enabled yet */ LSN_STORE_SIZE + /* undo_purge_lsn */ #endif LSN_STORE_SIZE /* first_undo_lsn */ ) * trnman_committed_transactions; if ((NULL == (str_act->str= my_malloc(PSI_INSTRUMENT_ME, str_act->length, MYF(MY_WME)))) || (NULL == (str_com->str= my_malloc(PSI_INSTRUMENT_ME, str_com->length, MYF(MY_WME))))) goto err; /* First, the active transactions */ ptr= str_act->str + 2 + LSN_STORE_SIZE; transid_store(ptr, global_trid_generator); ptr+= TRANSID_SIZE; for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next) { uint sid; LSN rec_lsn, undo_lsn, first_undo_lsn; mysql_mutex_lock(&trn->state_lock); sid= trn->short_id; mysql_mutex_unlock(&trn->state_lock); if (sid == 0) { /* Not even inited, has done nothing. Or it is the dummy_transaction_object, which does only non-transactional immediate-sync operations (CREATE/DROP/RENAME/REPAIR TABLE), and so can be forgotten for Checkpoint. */ continue; } /* needed for low-water mark calculation */ if (((rec_lsn= lsn_read_non_atomic(trn->rec_lsn)) > 0) && (cmp_translog_addr(rec_lsn, minimum_rec_lsn) < 0)) minimum_rec_lsn= rec_lsn; /* If trn has not logged LOGREC_LONG_TRANSACTION_ID, this trn will be discovered when seeing that log record which is for sure located after checkpoint_start_log_horizon. */ if ((LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn) & TRANSACTION_LOGGED_LONG_ID) == 0) continue; /* On the other hand, if undo_lsn is LSN_IMPOSSIBLE, trn may later log records; so we must include trn in the checkpoint now, because we cannot count on LOGREC_LONG_TRANSACTION_ID (as we are already past it). */ undo_lsn= trn->undo_lsn; stored_transactions++; int2store(ptr, sid); ptr+= 2; int6store(ptr, trn->trid); ptr+= 6; lsn_store(ptr, undo_lsn); /* needed for rollback */ ptr+= LSN_STORE_SIZE; /* needed for low-water mark calculation */ if (((first_undo_lsn= lsn_read_non_atomic(trn->first_undo_lsn)) > 0) && (cmp_translog_addr(first_undo_lsn, minimum_first_undo_lsn) < 0)) minimum_first_undo_lsn= first_undo_lsn; lsn_store(ptr, first_undo_lsn); ptr+= LSN_STORE_SIZE; #ifdef MARIA_VERSIONING /* not enabled yet */ /* to know where purging should start (last delete of this trn) */ lsn_store(ptr, trn->undo_purge_lsn); ptr+= LSN_STORE_SIZE; #endif /** @todo RECOVERY: add a comment explaining why we can dirtily read some vars, inspired by the text of "assumption 8" in WL#3072 */ } str_act->length= ptr - str_act->str; /* as we maybe over-estimated */ ptr= str_act->str; DBUG_PRINT("info",("collected %u active transactions", (uint)stored_transactions)); int2store(ptr, stored_transactions); ptr+= 2; /* this LSN influences how REDOs for any page can be ignored by Recovery */ lsn_store(ptr, minimum_rec_lsn); /* one day there will also be a list of prepared transactions */ /* do the same for committed ones */ ptr= str_com->str; int4store(ptr, trnman_committed_transactions); ptr+= 4; DBUG_PRINT("info",("collected %u committed transactions", (uint)trnman_committed_transactions)); for (trn= committed_list_min.next; trn != &committed_list_max; trn= trn->next) { LSN first_undo_lsn; int6store(ptr, trn->trid); ptr+= 6; #ifdef MARIA_VERSIONING /* not enabled yet */ lsn_store(ptr, trn->undo_purge_lsn); ptr+= LSN_STORE_SIZE; #endif first_undo_lsn= LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn); if (cmp_translog_addr(first_undo_lsn, minimum_first_undo_lsn) < 0) minimum_first_undo_lsn= first_undo_lsn; lsn_store(ptr, first_undo_lsn); ptr+= LSN_STORE_SIZE; } /* TODO: if we see there exists no transaction (active and committed) we can tell the lock-free structures to do some freeing (my_free()). */ error= 0; *min_rec_lsn= minimum_rec_lsn; *min_first_undo_lsn= minimum_first_undo_lsn; goto end; err: error= 1; end: mysql_mutex_unlock(&LOCK_trn_list); DBUG_RETURN(error); }
O3
c
trnman_collect_transactions: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 cmpq $0x0, 0x3b6370(%rip) # 0x3fd560 jne 0x4751d leaq 0x3b6323(%rip), %rdi # 0x3fd520 callq 0x29220 movl 0x3b6230(%rip), %eax # 0x3fd438 leal (%rax,%rax,4), %ecx leal (%rax,%rcx,4), %ecx addl %ecx, %eax addl $0xf, %eax movq %rax, 0x8(%r12) movl 0x3b621e(%rip), %eax # 0x3fd43c leal (%rax,%rax,2), %ecx leal 0x4(%rax,%rcx,4), %eax movq %rax, 0x8(%r15) movq 0x8(%r12), %rsi movl $0x10, %edx xorl %edi, %edi callq 0x9fdb1 movq %rax, (%r12) movb $0x1, %r13b testq %rax, %rax je 0x474f3 movq 0x8(%r15), %rsi movl $0x10, %edx xorl %edi, %edi callq 0x9fdb1 movq %rax, (%r15) testq %rax, %rax je 0x474f3 movq %r15, -0x50(%rbp) movq %r14, -0x40(%rbp) movq %rbx, -0x58(%rbp) movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF movq %r12, -0x48(%rbp) movq (%r12), %rdx movq 0x3b61c5(%rip), %rax # 0x3fd450 movl %eax, 0x9(%rdx) shrq $0x20, %rax movw %ax, 0xd(%rdx) addq $0xf, %rdx movq %rdx, -0x38(%rbp) movq 0x3b5f3b(%rip), %r12 # 0x3fd1e0 leaq 0x3b5f7c(%rip), %rax # 0x3fd228 cmpq %rax, %r12 je 0x47414 movl $0x0, -0x2c(%rbp) movq %rcx, %rbx movq %rcx, %r14 leaq 0x10(%r12), %r13 cmpq $0x0, 0x50(%r12) jne 0x473e6 movq %r13, %rdi callq 0x29220 movzwl 0xac(%r12), %r15d movq 0x50(%r12), %rdi testq %rdi, %rdi jne 0x473ff movq %r13, %rdi callq 0x291e0 testw %r15w, %r15w je 0x473c9 movq 0x90(%r12), %rcx movabsq $0xffffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFFF andq %rsi, %rcx cmpq %r14, %rcx movq %r14, %rax cmovlq %rcx, %rax testq %rcx, %rcx cmoveq %r14, %rax cmpq $0x0, 0xa0(%r12) jns 0x473cc movq 0x98(%r12), %rcx incl -0x2c(%rbp) movq -0x38(%rbp), %rdi movw %r15w, (%rdi) movl 0x78(%r12), %edx movl %edx, 0x2(%rdi) movzwl 0x7c(%r12), %edx movw %dx, 0x6(%rdi) movq %rcx, %rdx shrq $0x20, %rdx movb %dl, 0x8(%rdi) movq %rcx, %rdx shrq $0x28, %rdx movb %dl, 0x9(%rdi) movq %rcx, %rdx shrq $0x30, %rdx movb %dl, 0xa(%rdi) movl %ecx, 0xb(%rdi) movq 0xa0(%r12), %rcx movq %rcx, %rdx andq %rsi, %rdx cmpq %rbx, %rdx movq %rbx, %rsi cmovlq %rdx, %rsi testq %rdx, %rdx cmovneq %rsi, %rbx movq %rcx, %rdx shrq $0x20, %rdx movb %dl, 0xf(%rdi) movq %rcx, %rdx shrq $0x28, %rdx movb %dl, 0x10(%rdi) movq %rcx, %rdx shrq $0x30, %rdx movb %dl, 0x11(%rdi) movl %ecx, 0x12(%rdi) addq $0x16, %rdi movq %rdi, -0x38(%rbp) jmp 0x473cc movq %r14, %rax movq 0x68(%r12), %r12 movq %rax, %r14 leaq 0x3b5e4d(%rip), %rcx # 0x3fd228 cmpq %rcx, %r12 jne 0x472c2 jmp 0x47421 movq %r13, %rdi leaq 0x925bd(%rip), %rsi # 0xd99ad movl $0x2e0, %edx # imm = 0x2E0 callq 0x2eb8f jmp 0x472db leaq 0x33ec0a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x472f2 movl $0x0, -0x2c(%rbp) movq %rcx, %rbx movq %rcx, %rax movq -0x48(%rbp), %rdx movq (%rdx), %rcx movq -0x38(%rbp), %rsi subq %rcx, %rsi movq %rsi, 0x8(%rdx) movl -0x2c(%rbp), %edx movw %dx, (%rcx) movq %rax, %rdx shrq $0x20, %rdx movb %dl, 0x2(%rcx) movq %rax, %rdx shrq $0x28, %rdx movb %dl, 0x3(%rcx) movq %rax, %rdx shrq $0x30, %rdx movb %dl, 0x4(%rcx) movl %eax, 0x5(%rcx) movq -0x50(%rbp), %rcx movq (%rcx), %rcx movl 0x3b5fd5(%rip), %edx # 0x3fd43c movl %edx, (%rcx) movq 0x3b5f80(%rip), %rdx # 0x3fd3f0 leaq 0x3b5e61(%rip), %rsi # 0x3fd2d8 cmpq %rsi, %rdx je 0x474e2 addq $0x4, %rcx movq -0x40(%rbp), %r9 movabsq $0xffffffffffffff, %r10 # imm = 0xFFFFFFFFFFFFFF movl 0x78(%rdx), %edi movl %edi, (%rcx) movzwl 0x7c(%rdx), %edi movw %di, 0x4(%rcx) movq 0xa0(%rdx), %rdi movq %rdi, %r8 andq %r10, %r8 cmpq %rbx, %r8 cmovlq %r8, %rbx movq %rdi, %r8 shrq $0x20, %r8 movb %r8b, 0x6(%rcx) movq %rdi, %r8 shrq $0x28, %r8 movb %r8b, 0x7(%rcx) movq %rdi, %r8 shrq $0x30, %r8 movb %r8b, 0x8(%rcx) movl %edi, 0x9(%rcx) addq $0xd, %rcx movq 0x68(%rdx), %rdx cmpq %rsi, %rdx jne 0x4748e jmp 0x474e6 movq -0x40(%rbp), %r9 movq %rax, (%r9) movq -0x58(%rbp), %rax movq %rbx, (%rax) xorl %r13d, %r13d movq 0x3b6066(%rip), %rdi # 0x3fd560 testq %rdi, %rdi jne 0x47527 leaq 0x3b601a(%rip), %rdi # 0x3fd520 callq 0x291e0 movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a597 jmp 0x47202 leaq 0x33eae2(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x474ff
trnman_collect_transactions: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rcx mov r14, rdx mov r15, rsi mov r12, rdi cmp cs:qword_3FD560, 0 jnz loc_4751D lea rdi, LOCK_trn_list call _pthread_mutex_lock loc_47202: mov eax, cs:trnman_active_transactions lea ecx, [rax+rax*4] lea ecx, [rax+rcx*4] add eax, ecx add eax, 0Fh mov [r12+8], rax mov eax, cs:trnman_committed_transactions lea ecx, [rax+rax*2] lea eax, [rax+rcx*4+4] mov [r15+8], rax mov rsi, [r12+8] mov edx, 10h xor edi, edi call my_malloc mov [r12], rax mov r13b, 1 test rax, rax jz loc_474F3 mov rsi, [r15+8] mov edx, 10h xor edi, edi call my_malloc mov [r15], rax test rax, rax jz loc_474F3 mov [rbp+var_50], r15 mov [rbp+var_40], r14 mov [rbp+var_58], rbx mov rcx, 0FFFFFFFFFFFFFFh mov [rbp+var_48], r12 mov rdx, [r12] mov rax, cs:global_trid_generator mov [rdx+9], eax shr rax, 20h mov [rdx+0Dh], ax add rdx, 0Fh mov [rbp+var_38], rdx mov r12, cs:qword_3FD1E0 lea rax, active_list_max cmp r12, rax jz loc_47414 mov [rbp+var_2C], 0 mov rbx, rcx mov r14, rcx loc_472C2: lea r13, [r12+10h] cmp qword ptr [r12+50h], 0 jnz loc_473E6 mov rdi, r13 call _pthread_mutex_lock loc_472DB: movzx r15d, word ptr [r12+0ACh] mov rdi, [r12+50h] test rdi, rdi jnz loc_473FF loc_472F2: mov rdi, r13 call _pthread_mutex_unlock test r15w, r15w jz loc_473C9 mov rcx, [r12+90h] mov rsi, 0FFFFFFFFFFFFFFh and rcx, rsi cmp rcx, r14 mov rax, r14 cmovl rax, rcx test rcx, rcx cmovz rax, r14 cmp qword ptr [r12+0A0h], 0 jns loc_473CC mov rcx, [r12+98h] inc [rbp+var_2C] mov rdi, [rbp+var_38] mov [rdi], r15w mov edx, [r12+78h] mov [rdi+2], edx movzx edx, word ptr [r12+7Ch] mov [rdi+6], dx mov rdx, rcx shr rdx, 20h mov [rdi+8], dl mov rdx, rcx shr rdx, 28h mov [rdi+9], dl mov rdx, rcx shr rdx, 30h mov [rdi+0Ah], dl mov [rdi+0Bh], ecx mov rcx, [r12+0A0h] mov rdx, rcx and rdx, rsi cmp rdx, rbx mov rsi, rbx cmovl rsi, rdx test rdx, rdx cmovnz rbx, rsi mov rdx, rcx shr rdx, 20h mov [rdi+0Fh], dl mov rdx, rcx shr rdx, 28h mov [rdi+10h], dl mov rdx, rcx shr rdx, 30h mov [rdi+11h], dl mov [rdi+12h], ecx add rdi, 16h mov [rbp+var_38], rdi jmp short loc_473CC loc_473C9: mov rax, r14 loc_473CC: mov r12, [r12+68h] mov r14, rax lea rcx, active_list_max cmp r12, rcx jnz loc_472C2 jmp short loc_47421 loc_473E6: mov rdi, r13 lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 2E0h call psi_mutex_lock jmp loc_472DB loc_473FF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_472F2 loc_47414: mov [rbp+var_2C], 0 mov rbx, rcx mov rax, rcx loc_47421: mov rdx, [rbp+var_48] mov rcx, [rdx] mov rsi, [rbp+var_38] sub rsi, rcx mov [rdx+8], rsi mov edx, [rbp+var_2C] mov [rcx], dx mov rdx, rax shr rdx, 20h mov [rcx+2], dl mov rdx, rax shr rdx, 28h mov [rcx+3], dl mov rdx, rax shr rdx, 30h mov [rcx+4], dl mov [rcx+5], eax mov rcx, [rbp+var_50] mov rcx, [rcx] mov edx, cs:trnman_committed_transactions mov [rcx], edx mov rdx, cs:qword_3FD3F0 lea rsi, committed_list_max cmp rdx, rsi jz short loc_474E2 add rcx, 4 mov r9, [rbp+var_40] mov r10, 0FFFFFFFFFFFFFFh loc_4748E: mov edi, [rdx+78h] mov [rcx], edi movzx edi, word ptr [rdx+7Ch] mov [rcx+4], di mov rdi, [rdx+0A0h] mov r8, rdi and r8, r10 cmp r8, rbx cmovl rbx, r8 mov r8, rdi shr r8, 20h mov [rcx+6], r8b mov r8, rdi shr r8, 28h mov [rcx+7], r8b mov r8, rdi shr r8, 30h mov [rcx+8], r8b mov [rcx+9], edi add rcx, 0Dh mov rdx, [rdx+68h] cmp rdx, rsi jnz short loc_4748E jmp short loc_474E6 loc_474E2: mov r9, [rbp+var_40] loc_474E6: mov [r9], rax mov rax, [rbp+var_58] mov [rax], rbx xor r13d, r13d loc_474F3: mov rdi, cs:qword_3FD560 test rdi, rdi jnz short loc_47527 loc_474FF: lea rdi, LOCK_trn_list call _pthread_mutex_unlock mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4751D: call trnman_collect_transactions_cold_1 jmp loc_47202 loc_47527: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_474FF
long long trnman_collect_transactions(long long *a1, long long *a2, long long *a3, long long *a4) { unsigned int v4; // r13d long long v7; // rax long long v8; // rax long long v9; // rdx __int16 v10; // rax^4 long long v11; // r12 long long v12; // rbx long long v13; // r14 __int16 v14; // r15 long long v15; // rcx long long v16; // rax long long v17; // rcx long long v18; // rcx long long v19; // rsi long long v20; // rcx _DWORD *v21; // rcx long long v22; // rdx _DWORD *v23; // rcx long long *v24; // r9 long long v25; // rdi long long *v27; // [rsp+8h] [rbp-58h] long long *v29; // [rsp+20h] [rbp-40h] long long v30; // [rsp+28h] [rbp-38h] __int16 v31; // [rsp+34h] [rbp-2Ch] if ( qword_3FD560 ) trnman_collect_transactions_cold_1(); else pthread_mutex_lock(&LOCK_trn_list); a1[1] = (unsigned int)(22 * trnman_active_transactions + 15); a2[1] = (unsigned int)(13 * trnman_committed_transactions + 4); v7 = my_malloc(0LL, a1[1], 16LL); *a1 = v7; LOBYTE(v4) = 1; if ( v7 ) { v8 = my_malloc(0LL, a2[1], 16LL); *a2 = v8; if ( v8 ) { v29 = a3; v27 = a4; v9 = *a1; v10 = WORD2(global_trid_generator); *(_DWORD *)(v9 + 9) = global_trid_generator; *(_WORD *)(v9 + 13) = v10; v30 = v9 + 15; v11 = qword_3FD1E0; if ( (_UNKNOWN *)qword_3FD1E0 == &active_list_max ) { v31 = 0; v12 = 0xFFFFFFFFFFFFFFLL; v16 = 0xFFFFFFFFFFFFFFLL; } else { v31 = 0; v12 = 0xFFFFFFFFFFFFFFLL; v13 = 0xFFFFFFFFFFFFFFLL; do { if ( *(_QWORD *)(v11 + 80) ) psi_mutex_lock(v11 + 16, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x2E0u); else pthread_mutex_lock(v11 + 16); v14 = *(_WORD *)(v11 + 172); if ( *(_QWORD *)(v11 + 80) ) PSI_server[44](); pthread_mutex_unlock(v11 + 16); if ( v14 ) { v15 = *(_QWORD *)(v11 + 144) & 0xFFFFFFFFFFFFFFLL; v16 = v13; if ( v15 < v13 ) v16 = *(_QWORD *)(v11 + 144) & 0xFFFFFFFFFFFFFFLL; if ( !v15 ) v16 = v13; if ( *(long long *)(v11 + 160) < 0 ) { v17 = *(_QWORD *)(v11 + 152); ++v31; *(_WORD *)v30 = v14; *(_DWORD *)(v30 + 2) = *(_DWORD *)(v11 + 120); *(_WORD *)(v30 + 6) = *(_WORD *)(v11 + 124); *(_BYTE *)(v30 + 8) = BYTE4(v17); *(_BYTE *)(v30 + 9) = BYTE5(v17); *(_BYTE *)(v30 + 10) = BYTE6(v17); *(_DWORD *)(v30 + 11) = v17; v18 = *(_QWORD *)(v11 + 160); v19 = v12; if ( (v18 & 0xFFFFFFFFFFFFFFLL) < v12 ) v19 = *(_QWORD *)(v11 + 160) & 0xFFFFFFFFFFFFFFLL; if ( (v18 & 0xFFFFFFFFFFFFFFLL) != 0 ) v12 = v19; *(_BYTE *)(v30 + 15) = BYTE4(v18); *(_BYTE *)(v30 + 16) = BYTE5(v18); *(_BYTE *)(v30 + 17) = BYTE6(v18); *(_DWORD *)(v30 + 18) = v18; v30 += 22LL; } } else { v16 = v13; } v11 = *(_QWORD *)(v11 + 104); v13 = v16; } while ( (_UNKNOWN *)v11 != &active_list_max ); } v20 = *a1; a1[1] = v30 - *a1; *(_WORD *)v20 = v31; *(_BYTE *)(v20 + 2) = BYTE4(v16); *(_BYTE *)(v20 + 3) = BYTE5(v16); *(_BYTE *)(v20 + 4) = BYTE6(v16); *(_DWORD *)(v20 + 5) = v16; v21 = (_DWORD *)*a2; *(_DWORD *)*a2 = trnman_committed_transactions; v22 = qword_3FD3F0; if ( (_UNKNOWN *)qword_3FD3F0 == &committed_list_max ) { v24 = v29; } else { v23 = v21 + 1; v24 = v29; do { *v23 = *(_DWORD *)(v22 + 120); *((_WORD *)v23 + 2) = *(_WORD *)(v22 + 124); v25 = *(_QWORD *)(v22 + 160); if ( (v25 & 0xFFFFFFFFFFFFFFLL) < v12 ) v12 = *(_QWORD *)(v22 + 160) & 0xFFFFFFFFFFFFFFLL; *((_BYTE *)v23 + 6) = BYTE4(v25); *((_BYTE *)v23 + 7) = BYTE5(v25); *((_BYTE *)v23 + 8) = BYTE6(v25); *(_DWORD *)((char *)v23 + 9) = v25; v23 = (_DWORD *)((char *)v23 + 13); v22 = *(_QWORD *)(v22 + 104); } while ( (_UNKNOWN *)v22 != &committed_list_max ); } *v24 = v16; *v27 = v12; v4 = 0; } } if ( qword_3FD560 ) PSI_server[44](); pthread_mutex_unlock(&LOCK_trn_list); return v4; }
trnman_collect_transactions: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI CMP qword ptr [0x004fd560],0x0 JNZ 0x0014751d LEA RDI,[0x4fd520] CALL 0x00129220 LAB_00147202: MOV EAX,dword ptr [0x004fd438] LEA ECX,[RAX + RAX*0x4] LEA ECX,[RAX + RCX*0x4] ADD EAX,ECX ADD EAX,0xf MOV qword ptr [R12 + 0x8],RAX MOV EAX,dword ptr [0x004fd43c] LEA ECX,[RAX + RAX*0x2] LEA EAX,[RAX + RCX*0x4 + 0x4] MOV qword ptr [R15 + 0x8],RAX MOV RSI,qword ptr [R12 + 0x8] MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fdb1 MOV qword ptr [R12],RAX MOV R13B,0x1 TEST RAX,RAX JZ 0x001474f3 MOV RSI,qword ptr [R15 + 0x8] MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fdb1 MOV qword ptr [R15],RAX TEST RAX,RAX JZ 0x001474f3 MOV qword ptr [RBP + -0x50],R15 MOV qword ptr [RBP + -0x40],R14 MOV qword ptr [RBP + -0x58],RBX MOV RCX,0xffffffffffffff MOV qword ptr [RBP + -0x48],R12 MOV RDX,qword ptr [R12] MOV RAX,qword ptr [0x004fd450] MOV dword ptr [RDX + 0x9],EAX SHR RAX,0x20 MOV word ptr [RDX + 0xd],AX ADD RDX,0xf MOV qword ptr [RBP + -0x38],RDX MOV R12,qword ptr [0x004fd1e0] LEA RAX,[0x4fd228] CMP R12,RAX JZ 0x00147414 MOV dword ptr [RBP + -0x2c],0x0 MOV RBX,RCX MOV R14,RCX LAB_001472c2: LEA R13,[R12 + 0x10] CMP qword ptr [R12 + 0x50],0x0 JNZ 0x001473e6 MOV RDI,R13 CALL 0x00129220 LAB_001472db: MOVZX R15D,word ptr [R12 + 0xac] MOV RDI,qword ptr [R12 + 0x50] TEST RDI,RDI JNZ 0x001473ff LAB_001472f2: MOV RDI,R13 CALL 0x001291e0 TEST R15W,R15W JZ 0x001473c9 MOV RCX,qword ptr [R12 + 0x90] MOV RSI,0xffffffffffffff AND RCX,RSI CMP RCX,R14 MOV RAX,R14 CMOVL RAX,RCX TEST RCX,RCX CMOVZ RAX,R14 CMP qword ptr [R12 + 0xa0],0x0 JNS 0x001473cc MOV RCX,qword ptr [R12 + 0x98] INC dword ptr [RBP + -0x2c] MOV RDI,qword ptr [RBP + -0x38] MOV word ptr [RDI],R15W MOV EDX,dword ptr [R12 + 0x78] MOV dword ptr [RDI + 0x2],EDX MOVZX EDX,word ptr [R12 + 0x7c] MOV word ptr [RDI + 0x6],DX MOV RDX,RCX SHR RDX,0x20 MOV byte ptr [RDI + 0x8],DL MOV RDX,RCX SHR RDX,0x28 MOV byte ptr [RDI + 0x9],DL MOV RDX,RCX SHR RDX,0x30 MOV byte ptr [RDI + 0xa],DL MOV dword ptr [RDI + 0xb],ECX MOV RCX,qword ptr [R12 + 0xa0] MOV RDX,RCX AND RDX,RSI CMP RDX,RBX MOV RSI,RBX CMOVL RSI,RDX TEST RDX,RDX CMOVNZ RBX,RSI MOV RDX,RCX SHR RDX,0x20 MOV byte ptr [RDI + 0xf],DL MOV RDX,RCX SHR RDX,0x28 MOV byte ptr [RDI + 0x10],DL MOV RDX,RCX SHR RDX,0x30 MOV byte ptr [RDI + 0x11],DL MOV dword ptr [RDI + 0x12],ECX ADD RDI,0x16 MOV qword ptr [RBP + -0x38],RDI JMP 0x001473cc LAB_001473c9: MOV RAX,R14 LAB_001473cc: MOV R12,qword ptr [R12 + 0x68] MOV R14,RAX LEA RCX,[0x4fd228] CMP R12,RCX JNZ 0x001472c2 JMP 0x00147421 LAB_001473e6: MOV RDI,R13 LEA RSI,[0x1d99ad] MOV EDX,0x2e0 CALL 0x0012eb8f JMP 0x001472db LAB_001473ff: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001472f2 LAB_00147414: MOV dword ptr [RBP + -0x2c],0x0 MOV RBX,RCX MOV RAX,RCX LAB_00147421: MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RDX] MOV RSI,qword ptr [RBP + -0x38] SUB RSI,RCX MOV qword ptr [RDX + 0x8],RSI MOV EDX,dword ptr [RBP + -0x2c] MOV word ptr [RCX],DX MOV RDX,RAX SHR RDX,0x20 MOV byte ptr [RCX + 0x2],DL MOV RDX,RAX SHR RDX,0x28 MOV byte ptr [RCX + 0x3],DL MOV RDX,RAX SHR RDX,0x30 MOV byte ptr [RCX + 0x4],DL MOV dword ptr [RCX + 0x5],EAX MOV RCX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [0x004fd43c] MOV dword ptr [RCX],EDX MOV RDX,qword ptr [0x004fd3f0] LEA RSI,[0x4fd2d8] CMP RDX,RSI JZ 0x001474e2 ADD RCX,0x4 MOV R9,qword ptr [RBP + -0x40] MOV R10,0xffffffffffffff LAB_0014748e: MOV EDI,dword ptr [RDX + 0x78] MOV dword ptr [RCX],EDI MOVZX EDI,word ptr [RDX + 0x7c] MOV word ptr [RCX + 0x4],DI MOV RDI,qword ptr [RDX + 0xa0] MOV R8,RDI AND R8,R10 CMP R8,RBX CMOVL RBX,R8 MOV R8,RDI SHR R8,0x20 MOV byte ptr [RCX + 0x6],R8B MOV R8,RDI SHR R8,0x28 MOV byte ptr [RCX + 0x7],R8B MOV R8,RDI SHR R8,0x30 MOV byte ptr [RCX + 0x8],R8B MOV dword ptr [RCX + 0x9],EDI ADD RCX,0xd MOV RDX,qword ptr [RDX + 0x68] CMP RDX,RSI JNZ 0x0014748e JMP 0x001474e6 LAB_001474e2: MOV R9,qword ptr [RBP + -0x40] LAB_001474e6: MOV qword ptr [R9],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RBX XOR R13D,R13D LAB_001474f3: MOV RDI,qword ptr [0x004fd560] TEST RDI,RDI JNZ 0x00147527 LAB_001474ff: LEA RDI,[0x4fd520] CALL 0x001291e0 MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014751d: CALL 0x0012a597 JMP 0x00147202 LAB_00147527: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001474ff
ulong trnman_collect_transactions(long *param_1,long *param_2,ulong *param_3,ulong *param_4) { pthread_mutex_t *__mutex; short sVar1; int8 uVar2; short *psVar3; long lVar4; ulong uVar5; ulong uVar6; int *piVar7; ulong uVar8; int1 *puVar9; ulong uVar10; int8 unaff_R13; ulong uVar11; short *local_40; short local_34; if (LOCK_trn_list._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list); } else { trnman_collect_transactions_cold_1(); } param_1[1] = (ulong)(trnman_active_transactions * 0x16 + 0xf); param_2[1] = (ulong)(trnman_committed_transactions * 0xd + 4); lVar4 = my_malloc(0,param_1[1],0x10); *param_1 = lVar4; uVar11 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (lVar4 != 0) { lVar4 = my_malloc(0,param_2[1],0x10); *param_2 = lVar4; uVar2 = global_trid_generator; if (lVar4 != 0) { lVar4 = *param_1; *(int *)(lVar4 + 9) = (int)global_trid_generator; *(short *)(lVar4 + 0xd) = (short)((ulong)uVar2 >> 0x20); local_40 = (short *)(lVar4 + 0xf); if ((int1 *)active_list_min._104_8_ == active_list_max) { local_34 = 0; uVar10 = 0xffffffffffffff; uVar11 = 0xffffffffffffff; } else { local_34 = 0; uVar10 = 0xffffffffffffff; uVar11 = 0xffffffffffffff; puVar9 = (int1 *)active_list_min._104_8_; do { __mutex = (pthread_mutex_t *)(puVar9 + 0x10); if (*(long *)(puVar9 + 0x50) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c" ,0x2e0); } sVar1 = *(short *)(puVar9 + 0xac); if (*(long *)(puVar9 + 0x50) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (sVar1 != 0) { uVar6 = *(ulong *)(puVar9 + 0x90) & 0xffffffffffffff; uVar5 = uVar11; if (uVar6 < uVar11) { uVar5 = uVar6; } if (uVar6 == 0) { uVar5 = uVar11; } uVar11 = uVar5; if (*(long *)(puVar9 + 0xa0) < 0) { uVar2 = *(int8 *)(puVar9 + 0x98); local_34 = local_34 + 1; *local_40 = sVar1; *(int4 *)(local_40 + 1) = *(int4 *)(puVar9 + 0x78); local_40[3] = *(short *)(puVar9 + 0x7c); *(char *)(local_40 + 4) = (char)((ulong)uVar2 >> 0x20); *(char *)((long)local_40 + 9) = (char)((ulong)uVar2 >> 0x28); *(char *)(local_40 + 5) = (char)((ulong)uVar2 >> 0x30); *(int *)((long)local_40 + 0xb) = (int)uVar2; uVar5 = *(ulong *)(puVar9 + 0xa0); uVar8 = uVar5 & 0xffffffffffffff; uVar6 = uVar10; if (uVar8 < uVar10) { uVar6 = uVar8; } if (uVar8 != 0) { uVar10 = uVar6; } *(char *)((long)local_40 + 0xf) = (char)(uVar5 >> 0x20); *(char *)(local_40 + 8) = (char)(uVar5 >> 0x28); *(char *)((long)local_40 + 0x11) = (char)(uVar5 >> 0x30); *(int *)(local_40 + 9) = (int)uVar5; local_40 = local_40 + 0xb; } } puVar9 = *(int1 **)(puVar9 + 0x68); } while (puVar9 != active_list_max); } psVar3 = (short *)*param_1; param_1[1] = (long)local_40 - (long)psVar3; *psVar3 = local_34; *(char *)(psVar3 + 1) = (char)(uVar11 >> 0x20); *(char *)((long)psVar3 + 3) = (char)(uVar11 >> 0x28); *(char *)(psVar3 + 2) = (char)(uVar11 >> 0x30); *(int *)((long)psVar3 + 5) = (int)uVar11; piVar7 = (int *)*param_2; *piVar7 = trnman_committed_transactions; if ((int1 *)committed_list_min._104_8_ != committed_list_max) { piVar7 = piVar7 + 1; puVar9 = (int1 *)committed_list_min._104_8_; do { *piVar7 = *(int *)(puVar9 + 0x78); *(int2 *)(piVar7 + 1) = *(int2 *)(puVar9 + 0x7c); uVar5 = *(ulong *)(puVar9 + 0xa0); if ((uVar5 & 0xffffffffffffff) < uVar10) { uVar10 = uVar5 & 0xffffffffffffff; } *(char *)((long)piVar7 + 6) = (char)(uVar5 >> 0x20); *(char *)((long)piVar7 + 7) = (char)(uVar5 >> 0x28); *(char *)(piVar7 + 2) = (char)(uVar5 >> 0x30); *(int *)((long)piVar7 + 9) = (int)uVar5; piVar7 = (int *)((long)piVar7 + 0xd); puVar9 = *(int1 **)(puVar9 + 0x68); } while (puVar9 != committed_list_max); } *param_3 = uVar11; *param_4 = uVar10; uVar11 = 0; } } if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list); return uVar11 & 0xffffffff; }
65,718
File_buffer::load_binary_file_by_name(char const*)
eloqsql/client/mariadb-conv.cc
bool File_buffer::load_binary_file_by_name(const char *filename) { MY_STAT sbuf; File fd; if (!my_stat(filename, &sbuf, MYF(0))) { fprintf(stderr, "my_stat failed for '%s'\n", filename); return true; } if (!MY_S_ISREG(sbuf.st_mode)) { fprintf(stderr, "'%s' is not a regular file\n", filename); return true; } if ((size_t) sbuf.st_size > UINT_MAX32) { fprintf(stderr, "File '%s' is too large\n", filename); return true; } if (alloc((uint32) sbuf.st_size)) { fprintf(stderr, "Failed to allocate read buffer\n"); return true; } if ((fd= my_open(filename, O_RDONLY, MYF(0))) == -1) { fprintf(stderr, "Could not open '%s'\n", filename); return true; } size_t nbytes= my_read(fd, (uchar*) Ptr, (size_t)sbuf.st_size, MYF(0)); my_close(fd, MYF(0)); length((uint32) nbytes); return false; }
O0
cpp
File_buffer::load_binary_file_by_name(char const*): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x18(%rbp), %rdi leaq -0xa8(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x36cc0 cmpq $0x0, %rax jne 0x2599d movq 0x1bb661(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x63690(%rip), %rsi # 0x8901d movb $0x0, %al callq 0x254a0 movb $0x1, -0x1(%rbp) jmp 0x25ac9 movl -0x90(%rbp), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0x8000, %eax # imm = 0x8000 je 0x259d4 movq 0x1bb62a(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x63672(%rip), %rsi # 0x89036 movb $0x0, %al callq 0x254a0 movb $0x1, -0x1(%rbp) jmp 0x25ac9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x78(%rbp) jbe 0x25a04 movq 0x1bb5fa(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x6365e(%rip), %rsi # 0x89052 movb $0x0, %al callq 0x254a0 movb $0x1, -0x1(%rbp) jmp 0x25ac9 movq -0xc0(%rbp), %rdi movq -0x78(%rbp), %rax movl %eax, %eax movl %eax, %esi callq 0x26250 testb $0x1, %al jne 0x25a1e jmp 0x25a3f movq 0x1bb5bb(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi leaq 0x6363b(%rip), %rsi # 0x8906a movb $0x0, %al callq 0x254a0 movb $0x1, -0x1(%rbp) jmp 0x25ac9 movq -0x18(%rbp), %rdi xorl %esi, %esi xorl %eax, %eax movl %eax, %edx callq 0x37790 movl %eax, -0xac(%rbp) cmpl $-0x1, %eax jne 0x25a7b movq 0x1bb580(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x6361c(%rip), %rsi # 0x8908a movb $0x0, %al callq 0x254a0 movb $0x1, -0x1(%rbp) jmp 0x25ac9 movq -0xc0(%rbp), %rax movl -0xac(%rbp), %edi movq (%rax), %rsi movq -0x78(%rbp), %rdx xorl %eax, %eax movl %eax, %ecx callq 0x37fa0 movq %rax, -0xb8(%rbp) movl -0xac(%rbp), %edi xorl %eax, %eax movl %eax, %esi callq 0x37a20 movq -0xc0(%rbp), %rdi movq -0xb8(%rbp), %rax movl %eax, %eax movl %eax, %esi callq 0x262b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0xc0, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN11File_buffer24load_binary_file_by_nameEPKc: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_C0], rax mov rdi, [rbp+var_18] lea rsi, [rbp+var_A8] xor eax, eax mov edx, eax call my_stat cmp rax, 0 jnz short loc_2599D mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aMyStatFailedFo; "my_stat failed for '%s'\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp loc_25AC9 loc_2599D: mov eax, [rbp+var_90] and eax, 0F000h cmp eax, 8000h jz short loc_259D4 mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aSIsNotARegular; "'%s' is not a regular file\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp loc_25AC9 loc_259D4: mov eax, 0FFFFFFFFh cmp [rbp+var_78], rax jbe short loc_25A04 mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aFileSIsTooLarg; "File '%s' is too large\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp loc_25AC9 loc_25A04: mov rdi, [rbp+var_C0]; this mov rax, [rbp+var_78] mov eax, eax mov esi, eax; unsigned __int64 call _ZN13Binary_string5allocEm; Binary_string::alloc(ulong) test al, 1 jnz short loc_25A1E jmp short loc_25A3F loc_25A1E: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aFailedToAlloca; "Failed to allocate read buffer\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp loc_25AC9 loc_25A3F: mov rdi, [rbp+var_18] xor esi, esi xor eax, eax mov edx, eax call my_open mov [rbp+var_AC], eax cmp eax, 0FFFFFFFFh jnz short loc_25A7B mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aCouldNotOpenS; "Could not open '%s'\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_25AC9 loc_25A7B: mov rax, [rbp+var_C0] mov edi, [rbp+var_AC] mov rsi, [rax] mov rdx, [rbp+var_78] xor eax, eax mov ecx, eax call my_read mov [rbp+var_B8], rax mov edi, [rbp+var_AC] xor eax, eax mov esi, eax call my_close mov rdi, [rbp+var_C0]; this mov rax, [rbp+var_B8] mov eax, eax mov esi, eax; unsigned __int64 call _ZN13Binary_string6lengthEm; Binary_string::length(ulong) mov [rbp+var_1], 0 loc_25AC9: mov al, [rbp+var_1] and al, 1 add rsp, 0C0h pop rbp retn
char File_buffer::load_binary_file_by_name(File_buffer *this, const char *a2) { unsigned int v3; // [rsp+8h] [rbp-B8h] unsigned int v4; // [rsp+14h] [rbp-ACh] _BYTE v5[24]; // [rsp+18h] [rbp-A8h] BYREF int v6; // [rsp+30h] [rbp-90h] unsigned long long v7; // [rsp+48h] [rbp-78h] const char *v8; // [rsp+A8h] [rbp-18h] File_buffer *v9; // [rsp+B0h] [rbp-10h] v9 = this; v8 = a2; if ( my_stat(a2, v5, 0LL) ) { if ( (v6 & 0xF000) == 0x8000 ) { if ( v7 <= 0xFFFFFFFF ) { if ( (Binary_string::alloc(this, (unsigned int)v7) & 1) != 0 ) { fprintf(stderr, "Failed to allocate read buffer\n"); return 1; } else { v4 = my_open(v8, 0LL, 0LL); if ( v4 == -1 ) { fprintf(stderr, "Could not open '%s'\n", v8); return 1; } else { v3 = my_read(v4, *(_QWORD *)this, v7, 0LL); my_close(v4, 0LL); Binary_string::length(this, v3); return 0; } } } else { fprintf(stderr, "File '%s' is too large\n", v8); return 1; } } else { fprintf(stderr, "'%s' is not a regular file\n", v8); return 1; } } else { fprintf(stderr, "my_stat failed for '%s'\n", v8); return 1; } }
load_binary_file_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0xa8] XOR EAX,EAX MOV EDX,EAX CALL 0x00136cc0 CMP RAX,0x0 JNZ 0x0012599d MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x18901d] MOV AL,0x0 CALL 0x001254a0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00125ac9 LAB_0012599d: MOV EAX,dword ptr [RBP + -0x90] AND EAX,0xf000 CMP EAX,0x8000 JZ 0x001259d4 MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x189036] MOV AL,0x0 CALL 0x001254a0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00125ac9 LAB_001259d4: MOV EAX,0xffffffff CMP qword ptr [RBP + -0x78],RAX JBE 0x00125a04 MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x189052] MOV AL,0x0 CALL 0x001254a0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00125ac9 LAB_00125a04: MOV RDI,qword ptr [RBP + -0xc0] MOV RAX,qword ptr [RBP + -0x78] MOV EAX,EAX MOV ESI,EAX CALL 0x00126250 TEST AL,0x1 JNZ 0x00125a1e JMP 0x00125a3f LAB_00125a1e: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x18906a] MOV AL,0x0 CALL 0x001254a0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00125ac9 LAB_00125a3f: MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI XOR EAX,EAX MOV EDX,EAX CALL 0x00137790 MOV dword ptr [RBP + -0xac],EAX CMP EAX,-0x1 JNZ 0x00125a7b MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x18908a] MOV AL,0x0 CALL 0x001254a0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00125ac9 LAB_00125a7b: MOV RAX,qword ptr [RBP + -0xc0] MOV EDI,dword ptr [RBP + -0xac] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x78] XOR EAX,EAX MOV ECX,EAX CALL 0x00137fa0 MOV qword ptr [RBP + -0xb8],RAX MOV EDI,dword ptr [RBP + -0xac] XOR EAX,EAX MOV ESI,EAX CALL 0x00137a20 MOV RDI,qword ptr [RBP + -0xc0] MOV RAX,qword ptr [RBP + -0xb8] MOV EAX,EAX MOV ESI,EAX CALL 0x001262b0 MOV byte ptr [RBP + -0x1],0x0 LAB_00125ac9: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0xc0 POP RBP RET
/* File_buffer::load_binary_file_by_name(char const*) */ int1 __thiscall File_buffer::load_binary_file_by_name(File_buffer *this,char *param_1) { int iVar1; long lVar2; ulong uVar3; int1 local_b0 [24]; uint local_98; ulong local_80; char *local_20; File_buffer *local_18; int1 local_9; local_20 = param_1; local_18 = this; lVar2 = my_stat(param_1,local_b0,0); if (lVar2 == 0) { fprintf(*(FILE **)PTR_stderr_002e0fe0,"my_stat failed for \'%s\'\n",local_20); local_9 = 1; } else if ((local_98 & 0xf000) == 0x8000) { if (local_80 < 0x100000000) { uVar3 = Binary_string::alloc((Binary_string *)this,local_80 & 0xffffffff); if ((uVar3 & 1) == 0) { iVar1 = my_open(local_20,0,0); if (iVar1 == -1) { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Could not open \'%s\'\n",local_20); local_9 = 1; } else { uVar3 = my_read(iVar1,*(int8 *)this,local_80,0); my_close(iVar1,0); Binary_string::length((Binary_string *)this,uVar3 & 0xffffffff); local_9 = 0; } } else { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Failed to allocate read buffer\n"); local_9 = 1; } } else { fprintf(*(FILE **)PTR_stderr_002e0fe0,"File \'%s\' is too large\n",local_20); local_9 = 1; } } else { fprintf(*(FILE **)PTR_stderr_002e0fe0,"\'%s\' is not a regular file\n",local_20); local_9 = 1; } return local_9; }
65,719
nglog::LogMessage::SendToSink()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->sink_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); data_->sink_->send( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); } }
O2
cpp
nglog::LogMessage::SendToSink(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0xbf81 movq 0x76c0(%rax), %r9 testq %r9, %r9 je 0xbf00 cmpb $0xa, 0x3(%r9,%rax) je 0xbf3d leaq 0x149f3(%rip), %rsi # 0x208fa leaq 0x14a33(%rip), %rcx # 0x20941 leaq 0x14a40(%rip), %r8 # 0x20955 leaq 0x14f4f(%rip), %r9 # 0x20e6b pushq $0x3 popq %rdi movl $0x76b, %edx # imm = 0x76B xorl %eax, %eax callq 0x1d004 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %r9 movq 0x76d8(%rax), %rdx movq 0x76d0(%rax), %rcx movl 0x7698(%rax), %esi movl 0x769c(%rax), %r8d addq $0x10, %rbx movq 0x76b8(%rax), %r10 addq %r10, %rax addq $0x4, %rax notq %r10 addq %r9, %r10 movq (%rdi), %r11 movq %rbx, %r9 pushq %r10 pushq %rax callq *0x10(%r11) addq $0x10, %rsp popq %rbx retq nop
_ZN5nglog10LogMessage10SendToSinkEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz loc_BF81 mov r9, [rax+76C0h] test r9, r9 jz short loc_BF00 cmp byte ptr [r9+rax+3], 0Ah jz short loc_BF3D loc_BF00: lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_20E69+2; "" push 3 pop rdi mov edx, 76Bh xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov r9, [rax+76C0h] loc_BF3D: mov rdx, [rax+76D8h] mov rcx, [rax+76D0h] mov esi, [rax+7698h] mov r8d, [rax+769Ch] add rbx, 10h mov r10, [rax+76B8h] add rax, r10 add rax, 4 not r10 add r10, r9 mov r11, [rdi] mov r9, rbx push r10 push rax call qword ptr [r11+10h] add rsp, 10h loc_BF81: pop rbx retn
long long nglog::LogMessage::SendToSink(nglog::LogMessage *this) { long long result; // rax long long v3; // rdi long long v4; // r9 result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); if ( v3 ) { v4 = *(_QWORD *)(result + 30400); if ( !v4 || *(_BYTE *)(v4 + result + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1899LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); v4 = *(_QWORD *)(result + 30400); } return (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, char *, long long, long long))(*(_QWORD *)v3 + 16LL))( v3, *(unsigned int *)(result + 30360), *(_QWORD *)(result + 30424), *(_QWORD *)(result + 30416), *(unsigned int *)(result + 30364), (char *)this + 16, *(_QWORD *)(result + 30392) + result + 4, v4 + ~*(_QWORD *)(result + 30392)); } return result; }
SendToSink: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x0010bf81 MOV R9,qword ptr [RAX + 0x76c0] TEST R9,R9 JZ 0x0010bf00 CMP byte ptr [R9 + RAX*0x1 + 0x3],0xa JZ 0x0010bf3d LAB_0010bf00: LEA RSI,[0x1208fa] LEA RCX,[0x120941] LEA R8,[0x120955] LEA R9,[0x120e6b] PUSH 0x3 POP RDI MOV EDX,0x76b XOR EAX,EAX CALL 0x0011d004 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV R9,qword ptr [RAX + 0x76c0] LAB_0010bf3d: MOV RDX,qword ptr [RAX + 0x76d8] MOV RCX,qword ptr [RAX + 0x76d0] MOV ESI,dword ptr [RAX + 0x7698] MOV R8D,dword ptr [RAX + 0x769c] ADD RBX,0x10 MOV R10,qword ptr [RAX + 0x76b8] ADD RAX,R10 ADD RAX,0x4 NOT R10 ADD R10,R9 MOV R11,qword ptr [RDI] MOV R9,RBX PUSH R10 PUSH RAX CALL qword ptr [R11 + 0x10] ADD RSP,0x10 LAB_0010bf81: POP RBX RET
/* nglog::LogMessage::SendToSink() */ void __thiscall nglog::LogMessage::SendToSink(LogMessage *this) { long lVar1; long *plVar2; long lVar3; lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); if (plVar2 != (long *)0x0) { lVar3 = *(long *)(lVar1 + 0x76c0); if ((lVar3 == 0) || (*(char *)(lVar3 + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x76b, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_00120e6b); lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); lVar3 = *(long *)(lVar1 + 0x76c0); } (**(code **)(*plVar2 + 0x10)) (plVar2,*(int4 *)(lVar1 + 0x7698),*(int8 *)(lVar1 + 0x76d8), *(int8 *)(lVar1 + 0x76d0),*(int4 *)(lVar1 + 0x769c),this + 0x10, lVar1 + *(ulong *)(lVar1 + 0x76b8) + 4,~*(ulong *)(lVar1 + 0x76b8) + lVar3); } return; }
65,720
psi_rwlock_trywrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line); int result= rw_trywrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_trywrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1cfe26(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x3, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0xfebe0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0xfb4d3 leaq 0x1cfde0(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x1b8(%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_rwlock_trywrlock: 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+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 3 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_trywrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_FB4D3 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_FB4D3: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_trywrlock(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[54])( v6, *(_QWORD *)(a1 + 144), 3LL, a2, a3); v4 = my_rw_trywrlock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4); return v4; }
psi_rwlock_trywrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x3 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001febe0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001fb4d3 LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_001fb4d3: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3); uVar1 = my_rw_trywrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
65,721
unitsCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUnits*, void*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lefdiff/diffLefRW.cpp
int unitsCB(lefrCallbackType_e c, lefiUnits* unit, lefiUserData ud) { checkType(c); if (ud != userData) dataError(); if (unit->hasDatabase()) fprintf(fout, "UNITS DATABASE %s %g\n", unit->databaseName(), chkNum(unit->databaseNumber())); if (unit->hasCapacitance()) fprintf(fout, "UNITS CAPACITANCE PICOFARADS %g\n", chkNum(unit->capacitance())); if (unit->hasResistance()) fprintf(fout, "UNITS RESISTANCE OHMS %g\n", chkNum(unit->resistance())); if (unit->hasPower()) fprintf(fout, "UNITS POWER MILLIWATTS %g\n", chkNum(unit->power())); if (unit->hasCurrent()) fprintf(fout, "UNITS CURRENT MILLIAMPS %g\n", chkNum(unit->current())); if (unit->hasVoltage()) fprintf(fout, "UNITS VOLTAGE VOLTS %g\n", chkNum(unit->voltage())); if (unit->hasFrequency()) fprintf(fout, "UNITS FREQUENCY MEGAHERTZ %g\n", chkNum(unit->frequency())); return 0; }
O0
cpp
unitsCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUnits*, void*): subq $0x58, %rsp movl %edi, 0x54(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movl 0x54(%rsp), %edi callq 0x25a0 movq 0x40(%rsp), %rax cmpq 0x93a59(%rip), %rax # 0xa2560 je 0xeb0e callq 0x2580 movq 0x48(%rsp), %rdi callq 0x4a440 cmpl $0x0, %eax je 0xeb5f movq 0x93a2c(%rip), %rax # 0xa2550 movq %rax, 0x30(%rsp) movq 0x48(%rsp), %rdi callq 0x4a4c0 movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rdi callq 0x4a4d0 callq 0x25d0 movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rdx leaq 0x6830e(%rip), %rsi # 0x76e66 movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a450 cmpl $0x0, %eax je 0xeb9c movq 0x939db(%rip), %rax # 0xa2550 movq %rax, 0x28(%rsp) movq 0x48(%rsp), %rdi callq 0x4a4e0 callq 0x25d0 movq 0x28(%rsp), %rdi leaq 0x682e7(%rip), %rsi # 0x76e7c movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a460 cmpl $0x0, %eax je 0xebd9 movq 0x9399e(%rip), %rax # 0xa2550 movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rdi callq 0x4a4f0 callq 0x25d0 movq 0x20(%rsp), %rdi leaq 0x682cb(%rip), %rsi # 0x76e9d movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a470 cmpl $0x0, %eax je 0xec16 movq 0x93961(%rip), %rax # 0xa2550 movq %rax, 0x18(%rsp) movq 0x48(%rsp), %rdi callq 0x4a500 callq 0x25d0 movq 0x18(%rsp), %rdi leaq 0x682a8(%rip), %rsi # 0x76eb7 movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a480 cmpl $0x0, %eax je 0xec53 movq 0x93924(%rip), %rax # 0xa2550 movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rdi callq 0x4a510 callq 0x25d0 movq 0x10(%rsp), %rdi leaq 0x68286(%rip), %rsi # 0x76ed2 movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a490 cmpl $0x0, %eax je 0xec90 movq 0x938e7(%rip), %rax # 0xa2550 movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rdi callq 0x4a530 callq 0x25d0 movq 0x8(%rsp), %rdi leaq 0x68265(%rip), %rsi # 0x76eee movb $0x1, %al callq 0x2350 movq 0x48(%rsp), %rdi callq 0x4a4a0 cmpl $0x0, %eax je 0xeccb movq 0x938aa(%rip), %rax # 0xa2550 movq %rax, (%rsp) movq 0x48(%rsp), %rdi callq 0x4a540 callq 0x25d0 movq (%rsp), %rdi leaq 0x68242(%rip), %rsi # 0x76f06 movb $0x1, %al callq 0x2350 xorl %eax, %eax addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_Z7unitsCBN12LefDefParser18lefrCallbackType_eEPNS_9lefiUnitsEPv: sub rsp, 58h mov [rsp+58h+var_4], edi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov edi, [rsp+58h+var_4] call _Z9checkTypeN12LefDefParser18lefrCallbackType_eE; checkType(LefDefParser::lefrCallbackType_e) mov rax, [rsp+58h+var_18] cmp rax, cs:userData jz short loc_EB0E call _Z9dataErrorv; dataError(void) loc_EB0E: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits11hasDatabaseEv; LefDefParser::lefiUnits::hasDatabase(void) cmp eax, 0 jz short loc_EB5F mov rax, cs:fout mov [rsp+58h+var_28], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits12databaseNameEv; LefDefParser::lefiUnits::databaseName(void) mov [rsp+58h+var_20], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits14databaseNumberEv; LefDefParser::lefiUnits::databaseNumber(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_28] mov rdx, [rsp+58h+var_20] lea rsi, aUnitsDatabaseS; "UNITS DATABASE %s %g\n" mov al, 1 call _fprintf loc_EB5F: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits14hasCapacitanceEv; LefDefParser::lefiUnits::hasCapacitance(void) cmp eax, 0 jz short loc_EB9C mov rax, cs:fout mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits11capacitanceEv; LefDefParser::lefiUnits::capacitance(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_30] lea rsi, aUnitsCapacitan; "UNITS CAPACITANCE PICOFARADS %g\n" mov al, 1 call _fprintf loc_EB9C: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits13hasResistanceEv; LefDefParser::lefiUnits::hasResistance(void) cmp eax, 0 jz short loc_EBD9 mov rax, cs:fout mov [rsp+58h+var_38], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits10resistanceEv; LefDefParser::lefiUnits::resistance(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_38] lea rsi, aUnitsResistanc; "UNITS RESISTANCE OHMS %g\n" mov al, 1 call _fprintf loc_EBD9: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits8hasPowerEv; LefDefParser::lefiUnits::hasPower(void) cmp eax, 0 jz short loc_EC16 mov rax, cs:fout mov [rsp+58h+var_40], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits5powerEv; LefDefParser::lefiUnits::power(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_40] lea rsi, aUnitsPowerMill; "UNITS POWER MILLIWATTS %g\n" mov al, 1 call _fprintf loc_EC16: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits10hasCurrentEv; LefDefParser::lefiUnits::hasCurrent(void) cmp eax, 0 jz short loc_EC53 mov rax, cs:fout mov [rsp+58h+var_48], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits7currentEv; LefDefParser::lefiUnits::current(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_48] lea rsi, aUnitsCurrentMi; "UNITS CURRENT MILLIAMPS %g\n" mov al, 1 call _fprintf loc_EC53: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits10hasVoltageEv; LefDefParser::lefiUnits::hasVoltage(void) cmp eax, 0 jz short loc_EC90 mov rax, cs:fout mov [rsp+58h+var_50], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits7voltageEv; LefDefParser::lefiUnits::voltage(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_50] lea rsi, aUnitsVoltageVo; "UNITS VOLTAGE VOLTS %g\n" mov al, 1 call _fprintf loc_EC90: mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits12hasFrequencyEv; LefDefParser::lefiUnits::hasFrequency(void) cmp eax, 0 jz short loc_ECCB mov rax, cs:fout mov [rsp+58h+var_58], rax mov rdi, [rsp+58h+var_10]; this call _ZNK12LefDefParser9lefiUnits9frequencyEv; LefDefParser::lefiUnits::frequency(void) call _Z6chkNumd; chkNum(double) mov rdi, [rsp+58h+var_58] lea rsi, aUnitsFrequency; "UNITS FREQUENCY MEGAHERTZ %g\n" mov al, 1 call _fprintf loc_ECCB: xor eax, eax add rsp, 58h retn
long long unitsCB(unsigned int a1, LefDefParser::lefiUnits *a2, long long a3, double a4) { double v4; // xmm0_8 long long v6; // [rsp+0h] [rbp-58h] long long v7; // [rsp+8h] [rbp-50h] long long v8; // [rsp+10h] [rbp-48h] long long v9; // [rsp+18h] [rbp-40h] long long v10; // [rsp+20h] [rbp-38h] long long v11; // [rsp+28h] [rbp-30h] long long v12; // [rsp+30h] [rbp-28h] const char *v13; // [rsp+38h] [rbp-20h] checkType(a1); if ( a3 != userData ) dataError(); if ( (unsigned int)LefDefParser::lefiUnits::hasDatabase(a2) ) { v12 = fout; v13 = (const char *)LefDefParser::lefiUnits::databaseName(a2); LefDefParser::lefiUnits::databaseNumber(a2); a4 = chkNum(a4); fprintf(v12, "UNITS DATABASE %s %g\n", v13, a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasCapacitance(a2) ) { v11 = fout; LefDefParser::lefiUnits::capacitance(a2); a4 = chkNum(a4); fprintf(v11, "UNITS CAPACITANCE PICOFARADS %g\n", a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasResistance(a2) ) { v10 = fout; LefDefParser::lefiUnits::resistance(a2); a4 = chkNum(a4); fprintf(v10, "UNITS RESISTANCE OHMS %g\n", a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasPower(a2) ) { v9 = fout; LefDefParser::lefiUnits::power(a2); a4 = chkNum(a4); fprintf(v9, "UNITS POWER MILLIWATTS %g\n", a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasCurrent(a2) ) { v8 = fout; LefDefParser::lefiUnits::current(a2); a4 = chkNum(a4); fprintf(v8, "UNITS CURRENT MILLIAMPS %g\n", a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasVoltage(a2) ) { v7 = fout; LefDefParser::lefiUnits::voltage(a2); a4 = chkNum(a4); fprintf(v7, "UNITS VOLTAGE VOLTS %g\n", a4); } if ( (unsigned int)LefDefParser::lefiUnits::hasFrequency(a2) ) { v6 = fout; LefDefParser::lefiUnits::frequency(a2); v4 = chkNum(a4); fprintf(v6, "UNITS FREQUENCY MEGAHERTZ %g\n", v4); } return 0LL; }
unitsCB: SUB RSP,0x58 MOV dword ptr [RSP + 0x54],EDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV EDI,dword ptr [RSP + 0x54] CALL 0x001025a0 MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [0x001a2560] JZ 0x0010eb0e CALL 0x00102580 LAB_0010eb0e: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a440 CMP EAX,0x0 JZ 0x0010eb5f MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a4c0 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a4d0 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LEA RSI,[0x176e66] MOV AL,0x1 CALL 0x00102350 LAB_0010eb5f: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a450 CMP EAX,0x0 JZ 0x0010eb9c MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a4e0 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x176e7c] MOV AL,0x1 CALL 0x00102350 LAB_0010eb9c: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a460 CMP EAX,0x0 JZ 0x0010ebd9 MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a4f0 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x176e9d] MOV AL,0x1 CALL 0x00102350 LAB_0010ebd9: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a470 CMP EAX,0x0 JZ 0x0010ec16 MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a500 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x176eb7] MOV AL,0x1 CALL 0x00102350 LAB_0010ec16: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a480 CMP EAX,0x0 JZ 0x0010ec53 MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a510 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x176ed2] MOV AL,0x1 CALL 0x00102350 LAB_0010ec53: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a490 CMP EAX,0x0 JZ 0x0010ec90 MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a530 CALL 0x001025d0 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x176eee] MOV AL,0x1 CALL 0x00102350 LAB_0010ec90: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a4a0 CMP EAX,0x0 JZ 0x0010eccb MOV RAX,qword ptr [0x001a2550] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0014a540 CALL 0x001025d0 MOV RDI,qword ptr [RSP] LEA RSI,[0x176f06] MOV AL,0x1 CALL 0x00102350 LAB_0010eccb: XOR EAX,EAX ADD RSP,0x58 RET
/* unitsCB(LefDefParser::lefrCallbackType_e, LefDefParser::lefiUnits*, void*) */ int8 unitsCB(int4 param_1,lefiUnits *param_2,long param_3) { FILE *pFVar1; int iVar2; int8 uVar3; double dVar4; checkType(param_1); if (param_3 != userData) { dataError(); } iVar2 = LefDefParser::lefiUnits::hasDatabase(param_2); pFVar1 = fout; if (iVar2 != 0) { uVar3 = LefDefParser::lefiUnits::databaseName(param_2); dVar4 = (double)LefDefParser::lefiUnits::databaseNumber(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS DATABASE %s %g\n",uVar3); } iVar2 = LefDefParser::lefiUnits::hasCapacitance(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::capacitance(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS CAPACITANCE PICOFARADS %g\n"); } iVar2 = LefDefParser::lefiUnits::hasResistance(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::resistance(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS RESISTANCE OHMS %g\n"); } iVar2 = LefDefParser::lefiUnits::hasPower(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::power(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS POWER MILLIWATTS %g\n"); } iVar2 = LefDefParser::lefiUnits::hasCurrent(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::current(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS CURRENT MILLIAMPS %g\n"); } iVar2 = LefDefParser::lefiUnits::hasVoltage(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::voltage(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS VOLTAGE VOLTS %g\n"); } iVar2 = LefDefParser::lefiUnits::hasFrequency(param_2); pFVar1 = fout; if (iVar2 != 0) { dVar4 = (double)LefDefParser::lefiUnits::frequency(param_2); chkNum(dVar4); fprintf(pFVar1,"UNITS FREQUENCY MEGAHERTZ %g\n"); } return 0; }
65,722
calc_record_size
eloqsql/storage/maria/ma_blockrec.c
static void calc_record_size(MARIA_HA *info, const uchar *record, MARIA_ROW *row) { MARIA_SHARE *share= info->s; uchar *field_length_data; MARIA_COLUMNDEF *column, *end_column; uint *null_field_lengths= row->null_field_lengths; ulong *blob_lengths= row->blob_lengths; DBUG_ENTER("calc_record_size"); row->normal_length= row->char_length= row->varchar_length= row->blob_length= row->extents_count= 0; /* Create empty bitmap and calculate length of each varlength/char field */ bzero(row->empty_bits, share->base.pack_bytes); field_length_data= row->field_lengths; for (column= share->columndef + share->base.fixed_not_null_fields, end_column= share->columndef + share->base.fields; column < end_column; column++, null_field_lengths++) { if ((record[column->null_pos] & column->null_bit)) { if (column->type != FIELD_BLOB) *null_field_lengths= 0; else *blob_lengths++= 0; continue; } switch (column->type) { case FIELD_CHECK: case FIELD_NORMAL: /* Fixed length field */ case FIELD_ZERO: DBUG_ASSERT(column->empty_bit == 0); /* fall through */ case FIELD_SKIP_PRESPACE: /* Not packed */ row->normal_length+= column->length; *null_field_lengths= column->length; break; case FIELD_SKIP_ZERO: /* Fixed length field */ if (memcmp(record+ column->offset, maria_zero_string, column->length) == 0) { row->empty_bits[column->empty_pos] |= column->empty_bit; *null_field_lengths= 0; } else { row->normal_length+= column->length; *null_field_lengths= column->length; } break; case FIELD_SKIP_ENDSPACE: /* CHAR */ { const uchar *pos, *end; for (pos= record + column->offset, end= pos + column->length; end > pos && end[-1] == ' '; end--) ; if (pos == end) /* If empty string */ { row->empty_bits[column->empty_pos]|= column->empty_bit; *null_field_lengths= 0; } else { uint length= (uint) (end - pos); if (column->length <= 255) *field_length_data++= (uchar) length; else { int2store(field_length_data, length); field_length_data+= 2; } row->char_length+= length; *null_field_lengths= length; } break; } case FIELD_VARCHAR: { uint length, field_length_data_length; const uchar *field_pos= record + column->offset; /* 256 is correct as this includes the length uchar */ field_length_data[0]= field_pos[0]; if (column->length <= 256) { length= (uint) (uchar) *field_pos; field_length_data_length= 1; } else { length= uint2korr(field_pos); field_length_data[1]= field_pos[1]; field_length_data_length= 2; } *null_field_lengths= length; if (!length) { row->empty_bits[column->empty_pos]|= column->empty_bit; break; } row->varchar_length+= length; *null_field_lengths= length; field_length_data+= field_length_data_length; break; } case FIELD_BLOB: { const uchar *field_pos= record + column->offset; uint size_length= column->length - portable_sizeof_char_ptr; ulong blob_length= _ma_calc_blob_length(size_length, field_pos); *blob_lengths++= blob_length; if (!blob_length) row->empty_bits[column->empty_pos]|= column->empty_bit; else { row->blob_length+= blob_length; memcpy(field_length_data, field_pos, size_length); field_length_data+= size_length; } break; } default: DBUG_ASSERT(0); } } row->field_lengths_length= (uint) (field_length_data - row->field_lengths); /* - info->row_base_length is base information we must have on a page in first extent: - flag byte (1) + is_nulls_extended (0 | 1) + null_bytes + pack_bytes + table_checksum (0 | 1) - row->min_length is minimum amount of data we must store on a page. bitmap code will ensure we get at list this much + total number of extents and one extent information - fixed_not_null_fields_length is length of fixed length fields that can't be compacted - head_length is the amount of data for the head page (ie, all fields except blobs) */ row->min_length= (info->row_base_length + (share->base.max_field_lengths ? size_to_store_key_length(row->field_lengths_length) : 0)); row->head_length= (row->min_length + share->base.fixed_not_null_fields_length + row->field_lengths_length + row->normal_length + row->char_length + row->varchar_length); row->total_length= (row->head_length + row->blob_length); if (row->total_length < share->base.min_block_length) row->total_length= share->base.min_block_length; DBUG_PRINT("exit", ("head_length: %lu total_length: %lu", (ulong) row->head_length, (ulong) row->total_length)); DBUG_VOID_RETURN; }
O3
c
calc_record_size: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r13 movq %rsi, %r15 movq %rdi, -0x68(%rbp) movq (%rdi), %rbx movq 0x48(%rdx), %rdi movq 0x58(%rdx), %r14 movq 0x60(%rdx), %r12 movl $0x0, 0xac(%rdx) xorps %xmm0, %xmm0 movups %xmm0, 0x70(%rdx) movups %xmm0, 0x80(%rdx) movl 0x3f4(%rbx), %edx xorl %esi, %esi callq 0x2a2e0 movq 0x50(%r13), %rsi movl 0x3c8(%rbx), %ecx movl 0x3cc(%rbx), %eax cmpl %ecx, %eax jae 0x35246 leaq 0x70(%r13), %r9 movq %rbx, -0x60(%rbp) movq 0x588(%rbx), %rdx imulq $0x38, %rcx, %r10 addq %rdx, %r10 imulq $0x38, %rax, %rbx addq %rdx, %rbx leaq 0xcfd7a(%rip), %r11 # 0x104d78 movq %r9, -0x48(%rbp) movq %r10, -0x40(%rbp) movq %r13, -0x58(%rbp) movq %r15, -0x50(%rbp) movzwl 0xe(%rbx), %ecx movb 0x12(%rbx), %dl movl (%rbx), %eax testb %dl, (%r15,%rcx) je 0x35033 cmpl $0x4, %eax jne 0x3505a movq $0x0, (%r12) addq $0x8, %r12 jmp 0x3522b cmpl $0x9, %eax ja 0x3522b movl %eax, %eax movslq (%r11,%rax,4), %rax addq %r11, %rax jmpq *%rax movzwl 0x8(%rbx), %eax addq %rax, (%r9) movzwl 0x8(%rbx), %eax movl %eax, (%r14) jmp 0x3522b movl $0x0, (%r14) jmp 0x3522b movq %r12, -0x30(%rbp) movq %rsi, -0x38(%rbp) movl 0x4(%rbx), %edi addq %r15, %rdi movzwl 0x8(%rbx), %r12d leaq 0x3f0260(%rip), %rsi # 0x4252e0 movq %r12, %rdx callq 0x2a5d0 testl %eax, %eax je 0x351a6 movq -0x48(%rbp), %r9 addq %r12, (%r9) movzwl 0x8(%rbx), %eax movl %eax, (%r14) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 jmp 0x351e7 movq %rsi, -0x38(%rbp) movl 0x4(%rbx), %r13d addq %r15, %r13 movzwl 0x8(%rbx), %r15d addl $-0x8, %r15d movl %r15d, %edi movq %r13, %rsi callq 0x691c3 movq %rax, (%r12) addq $0x8, %r12 movq %r12, -0x30(%rbp) testq %rax, %rax je 0x351c5 movq -0x58(%rbp), %rcx addq %rax, 0x88(%rcx) movl %r15d, %r15d movq -0x38(%rbp), %r12 movq %r12, %rdi movq %r13, %rsi movq %rcx, %r13 movq %r15, %rdx callq 0x2a0b0 movq %r12, %rsi addq %r15, %rsi jmp 0x351db movl 0x4(%rbx), %eax movb (%r15,%rax), %cl movb %cl, (%rsi) cmpw $0x100, 0x8(%rbx) # imm = 0x100 ja 0x3517e movzbl (%r15,%rax), %eax movl $0x1, %ecx jmp 0x3518b movq %rsi, %r8 movl 0x4(%rbx), %eax addq %r15, %rax movzwl 0x8(%rbx), %ecx movq %rax, %rsi xorl %edi, %edi movq %rdi, %rdx leaq (%rsi,%rcx), %rdi cmpq %rax, %rdi jbe 0x35157 leaq 0x1(%rdx), %rdi cmpb $0x20, -0x1(%rsi,%rcx) leaq -0x1(%rsi), %rsi je 0x3513c movq %rcx, %rax subq %rdx, %rax je 0x35204 cmpl $0xff, %ecx movq %r8, %rsi ja 0x35219 subl %edx, %ecx movb %cl, (%rsi) incq %rsi jmp 0x35222 movzwl (%r15,%rax), %eax movb %ah, 0x1(%rsi) movl $0x2, %ecx movl %eax, (%r14) testl %eax, %eax je 0x351f4 movl %eax, %edx addq %rdx, 0x80(%r13) movl %eax, (%r14) addq %rcx, %rsi jmp 0x3522b movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) movl $0x0, (%r14) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 jmp 0x351e3 movb 0x13(%rbx), %al movq -0x58(%rbp), %r13 movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) movq -0x38(%rbp), %rsi movq -0x30(%rbp), %r12 movq -0x50(%rbp), %r15 movq -0x48(%rbp), %r9 movq -0x40(%rbp), %r10 leaq 0xcfb86(%rip), %r11 # 0x104d78 jmp 0x3522b movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) jmp 0x3522b movb 0x13(%rbx), %al movq 0x48(%r13), %rcx movzwl 0x10(%rbx), %edx orb %al, (%rcx,%rdx) xorl %eax, %eax movq %r8, %rsi jmp 0x35228 subl %edx, %ecx movw %cx, (%rsi) addq $0x2, %rsi movl %eax, %ecx addq %rcx, 0x78(%r13) movl %eax, (%r14) addq $0x38, %rbx addq $0x4, %r14 cmpq %r10, %rbx jb 0x3500e movq 0x50(%r13), %rax movq -0x60(%rbp), %rbx jmp 0x35249 movq %rsi, %rax subq %rax, %rsi movl %esi, 0xa8(%r13) xorl %eax, %eax cmpl $0xff, %esi setae %al xorl %ecx, %ecx cmpl $0x0, 0x3d4(%rbx) leaq 0x1(%rax,%rax), %rax cmovneq %rax, %rcx movq -0x68(%rbp), %rax addq 0x610(%rax), %rcx movq %rcx, 0x68(%r13) movl 0x3d0(%rbx), %eax addq %rsi, %rax addq 0x70(%r13), %rax addq %rcx, %rax addq 0x78(%r13), %rax addq 0x80(%r13), %rax movl %eax, 0xa0(%r13) movl %eax, %eax addq 0x88(%r13), %rax movq %rax, 0x90(%r13) movq 0x3b8(%rbx), %rcx cmpq %rcx, %rax cmovbeq %rcx, %rax movq %rax, 0x90(%r13) addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
calc_record_size: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rdx mov r15, rsi mov [rbp+var_68], rdi mov rbx, [rdi] mov rdi, [rdx+48h] mov r14, [rdx+58h] mov r12, [rdx+60h] mov dword ptr [rdx+0ACh], 0 xorps xmm0, xmm0 movups xmmword ptr [rdx+70h], xmm0 movups xmmword ptr [rdx+80h], xmm0 mov edx, [rbx+3F4h] xor esi, esi call _memset mov rsi, [r13+50h] mov ecx, [rbx+3C8h] mov eax, [rbx+3CCh] cmp eax, ecx jnb loc_35246 lea r9, [r13+70h] mov [rbp+var_60], rbx mov rdx, [rbx+588h] imul r10, rcx, 38h ; '8' add r10, rdx imul rbx, rax, 38h ; '8' add rbx, rdx lea r11, jpt_35045 mov [rbp+var_48], r9 mov [rbp+var_40], r10 mov [rbp+var_58], r13 mov [rbp+var_50], r15 loc_3500E: movzx ecx, word ptr [rbx+0Eh] mov dl, [rbx+12h] mov eax, [rbx] test [r15+rcx], dl jz short loc_35033 cmp eax, 4 jnz short loc_3505A mov qword ptr [r12], 0 add r12, 8 jmp def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_35033: cmp eax, 9; switch 10 cases ja def_35045; jumptable 0000000000035045 default case, cases 5,6 mov eax, eax movsxd rax, ds:(jpt_35045 - 104D78h)[r11+rax*4] add rax, r11 jmp rax; switch jump loc_35047: movzx eax, word ptr [rbx+8]; jumptable 0000000000035045 cases 0,2,7,9 add [r9], rax movzx eax, word ptr [rbx+8] mov [r14], eax jmp def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_3505A: mov dword ptr [r14], 0 jmp def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_35066: mov [rbp+var_30], r12; jumptable 0000000000035045 case 3 mov [rbp+var_38], rsi mov edi, [rbx+4] add rdi, r15 movzx r12d, word ptr [rbx+8] lea rsi, maria_zero_string mov rdx, r12 call _bcmp test eax, eax jz loc_351A6 mov r9, [rbp+var_48] add [r9], r12 movzx eax, word ptr [rbx+8] mov [r14], eax mov rsi, [rbp+var_38] mov r12, [rbp+var_30] jmp loc_351E7 loc_350AB: mov [rbp+var_38], rsi; jumptable 0000000000035045 case 4 mov r13d, [rbx+4] add r13, r15 movzx r15d, word ptr [rbx+8] add r15d, 0FFFFFFF8h mov edi, r15d mov rsi, r13 call _ma_calc_blob_length mov [r12], rax add r12, 8 mov [rbp+var_30], r12 test rax, rax jz loc_351C5 mov rcx, [rbp+var_58] add [rcx+88h], rax mov r15d, r15d mov r12, [rbp+var_38] mov rdi, r12 mov rsi, r13 mov r13, rcx mov rdx, r15 call _memcpy mov rsi, r12 add rsi, r15 jmp loc_351DB loc_3510D: mov eax, [rbx+4]; jumptable 0000000000035045 case 8 mov cl, [r15+rax] mov [rsi], cl cmp word ptr [rbx+8], 100h ja short loc_3517E movzx eax, byte ptr [r15+rax] mov ecx, 1 jmp short loc_3518B loc_3512A: mov r8, rsi; jumptable 0000000000035045 case 1 mov eax, [rbx+4] add rax, r15 movzx ecx, word ptr [rbx+8] mov rsi, rax xor edi, edi loc_3513C: mov rdx, rdi lea rdi, [rsi+rcx] cmp rdi, rax jbe short loc_35157 lea rdi, [rdx+1] cmp byte ptr [rsi+rcx-1], 20h ; ' ' lea rsi, [rsi-1] jz short loc_3513C loc_35157: mov rax, rcx sub rax, rdx jz loc_35204 cmp ecx, 0FFh mov rsi, r8 ja loc_35219 sub ecx, edx mov [rsi], cl inc rsi jmp loc_35222 loc_3517E: movzx eax, word ptr [r15+rax] mov [rsi+1], ah mov ecx, 2 loc_3518B: mov [r14], eax test eax, eax jz short loc_351F4 mov edx, eax add [r13+80h], rdx mov [r14], eax add rsi, rcx jmp def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_351A6: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al mov dword ptr [r14], 0 mov rsi, [rbp+var_38] mov r12, [rbp+var_30] jmp short loc_351E3 loc_351C5: mov al, [rbx+13h] mov r13, [rbp+var_58] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al mov rsi, [rbp+var_38] loc_351DB: mov r12, [rbp+var_30] mov r15, [rbp+var_50] loc_351E3: mov r9, [rbp+var_48] loc_351E7: mov r10, [rbp+var_40] lea r11, jpt_35045 jmp short def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_351F4: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al jmp short def_35045; jumptable 0000000000035045 default case, cases 5,6 loc_35204: mov al, [rbx+13h] mov rcx, [r13+48h] movzx edx, word ptr [rbx+10h] or [rcx+rdx], al xor eax, eax mov rsi, r8 jmp short loc_35228 loc_35219: sub ecx, edx mov [rsi], cx add rsi, 2 loc_35222: mov ecx, eax add [r13+78h], rcx loc_35228: mov [r14], eax def_35045: add rbx, 38h ; '8'; jumptable 0000000000035045 default case, cases 5,6 add r14, 4 cmp rbx, r10 jb loc_3500E mov rax, [r13+50h] mov rbx, [rbp+var_60] jmp short loc_35249 loc_35246: mov rax, rsi loc_35249: sub rsi, rax mov [r13+0A8h], esi xor eax, eax cmp esi, 0FFh setnb al xor ecx, ecx cmp dword ptr [rbx+3D4h], 0 lea rax, [rax+rax+1] cmovnz rcx, rax mov rax, [rbp+var_68] add rcx, [rax+610h] mov [r13+68h], rcx mov eax, [rbx+3D0h] add rax, rsi add rax, [r13+70h] add rax, rcx add rax, [r13+78h] add rax, [r13+80h] mov [r13+0A0h], eax mov eax, eax add rax, [r13+88h] mov [r13+90h], rax mov rcx, [rbx+3B8h] cmp rax, rcx cmovbe rax, rcx mov [r13+90h], rax add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long calc_record_size(long long *a1, long long a2, long long a3) { long long v3; // r13 long long v5; // rbx long long v6; // rdi unsigned int *v7; // r14 long long *v8; // r12 _BYTE *v9; // rsi long long v10; // rcx long long v11; // rax _QWORD *v12; // r9 long long v13; // rdx unsigned long long v14; // r10 int *v15; // rbx int v16; // eax long long v17; // r12 long long v18; // r13 unsigned int v19; // r15d long long v20; // rax long long v21; // rsi long long v22; // rax unsigned int v23; // eax long long v24; // rcx _WORD *v25; // r8 long long v26; // rcx long long v27; // rsi long long v28; // rdi long long v29; // rdx bool v30; // zf unsigned int v31; // eax long long v32; // rax _BYTE *v33; // rsi long long v34; // rcx long long v35; // rcx _BYTE *v36; // rax unsigned long long result; // rax long long v39; // [rsp+10h] [rbp-60h] long long v40; // [rsp+18h] [rbp-58h] long long v41; // [rsp+20h] [rbp-50h] _QWORD *v42; // [rsp+28h] [rbp-48h] unsigned long long v43; // [rsp+30h] [rbp-40h] _BYTE *v44; // [rsp+38h] [rbp-38h] long long *v45; // [rsp+40h] [rbp-30h] v3 = a3; v5 = *a1; v6 = *(_QWORD *)(a3 + 72); v7 = *(unsigned int **)(a3 + 88); v8 = *(long long **)(a3 + 96); *(_DWORD *)(a3 + 172) = 0; *(_OWORD *)(a3 + 112) = 0LL; *(_OWORD *)(a3 + 128) = 0LL; memset(v6, 0LL, *(unsigned int *)(v5 + 1012)); v9 = *(_BYTE **)(v3 + 80); v10 = *(unsigned int *)(v5 + 968); v11 = *(unsigned int *)(v5 + 972); if ( (unsigned int)v11 >= (unsigned int)v10 ) { v32 = *(_QWORD *)(v3 + 80); } else { v12 = (_QWORD *)(v3 + 112); v39 = v5; v13 = *(_QWORD *)(v5 + 1416); v14 = v13 + 56 * v10; v15 = (int *)(v13 + 56 * v11); v42 = (_QWORD *)(v3 + 112); v43 = v14; v40 = v3; v41 = a2; do { v16 = *v15; if ( (*((_BYTE *)v15 + 18) & *(_BYTE *)(a2 + *((unsigned __int16 *)v15 + 7))) != 0 ) { if ( v16 == 4 ) *v8++ = 0LL; else *v7 = 0; } else { switch ( v16 ) { case 0: case 2: case 7: case 9: *v12 += *((unsigned __int16 *)v15 + 4); *v7 = *((unsigned __int16 *)v15 + 4); break; case 1: v25 = v9; v26 = *((unsigned __int16 *)v15 + 4); v27 = a2 + (unsigned int)v15[1]; v28 = 0LL; do { v29 = v28; if ( v27 + v26 <= a2 + (unsigned long long)(unsigned int)v15[1] ) break; ++v28; v30 = *(_BYTE *)(v27 + v26 - 1) == 32; --v27; } while ( v30 ); v31 = v26 - v29; if ( v26 == v29 ) { *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); v31 = 0; v9 = v25; } else { if ( (unsigned int)v26 > 0xFF ) { *v25 = v26 - v29; v9 = v25 + 1; } else { *(_BYTE *)v25 = v26 - v29; v9 = (char *)v25 + 1; } *(_QWORD *)(v3 + 120) += v31; } *v7 = v31; break; case 3: v45 = v8; v17 = *((unsigned __int16 *)v15 + 4); if ( (unsigned int)bcmp(a2 + (unsigned int)v15[1], &maria_zero_string, v17) ) { v12 = v42; *v42 += v17; *v7 = *((unsigned __int16 *)v15 + 4); v8 = v45; goto LABEL_28; } *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); *v7 = 0; v8 = v45; goto LABEL_27; case 4: v44 = v9; v18 = a2 + (unsigned int)v15[1]; v19 = *((unsigned __int16 *)v15 + 4) - 8; v20 = ma_calc_blob_length(v19, v18); *v8 = v20; if ( v20 ) { *(_QWORD *)(v40 + 136) += v20; v21 = v18; v3 = v40; memcpy(v44, v21, v19); v9 = &v44[v19]; } else { v3 = v40; *(_BYTE *)(*(_QWORD *)(v40 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); } ++v8; a2 = v41; LABEL_27: v12 = v42; LABEL_28: v14 = v43; break; case 8: v22 = (unsigned int)v15[1]; *v9 = *(_BYTE *)(a2 + v22); if ( *((_WORD *)v15 + 4) > 0x100u ) { v23 = *(unsigned __int16 *)(a2 + v22); v9[1] = BYTE1(v23); v24 = 2LL; } else { v23 = *(unsigned __int8 *)(a2 + v22); v24 = 1LL; } *v7 = v23; if ( v23 ) { *(_QWORD *)(v3 + 128) += v23; *v7 = v23; v9 += v24; } else { *(_BYTE *)(*(_QWORD *)(v3 + 72) + *((unsigned __int16 *)v15 + 8)) |= *((_BYTE *)v15 + 19); } break; default: break; } } v15 += 14; ++v7; } while ( (unsigned long long)v15 < v14 ); v32 = *(_QWORD *)(v3 + 80); v5 = v39; } v33 = &v9[-v32]; *(_DWORD *)(v3 + 168) = (_DWORD)v33; v34 = 0LL; if ( *(_DWORD *)(v5 + 980) ) v34 = 2LL * ((unsigned int)v33 >= 0xFF) + 1; v35 = a1[194] + v34; *(_QWORD *)(v3 + 104) = v35; v36 = &v33[*(unsigned int *)(v5 + 976) + *(_QWORD *)(v3 + 112) + v35 + *(_QWORD *)(v3 + 120) + *(_QWORD *)(v3 + 128)]; *(_DWORD *)(v3 + 160) = (_DWORD)v36; result = *(_QWORD *)(v3 + 136) + (unsigned int)v36; *(_QWORD *)(v3 + 144) = result; if ( result <= *(_QWORD *)(v5 + 952) ) result = *(_QWORD *)(v5 + 952); *(_QWORD *)(v3 + 144) = result; return result; }
calc_record_size: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RDX MOV R15,RSI MOV qword ptr [RBP + -0x68],RDI MOV RBX,qword ptr [RDI] MOV RDI,qword ptr [RDX + 0x48] MOV R14,qword ptr [RDX + 0x58] MOV R12,qword ptr [RDX + 0x60] MOV dword ptr [RDX + 0xac],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDX + 0x70],XMM0 MOVUPS xmmword ptr [RDX + 0x80],XMM0 MOV EDX,dword ptr [RBX + 0x3f4] XOR ESI,ESI CALL 0x0012a2e0 MOV RSI,qword ptr [R13 + 0x50] MOV ECX,dword ptr [RBX + 0x3c8] MOV EAX,dword ptr [RBX + 0x3cc] CMP EAX,ECX JNC 0x00135246 LEA R9,[R13 + 0x70] MOV qword ptr [RBP + -0x60],RBX MOV RDX,qword ptr [RBX + 0x588] IMUL R10,RCX,0x38 ADD R10,RDX IMUL RBX,RAX,0x38 ADD RBX,RDX LEA R11,[0x204d78] MOV qword ptr [RBP + -0x48],R9 MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x58],R13 MOV qword ptr [RBP + -0x50],R15 LAB_0013500e: MOVZX ECX,word ptr [RBX + 0xe] MOV DL,byte ptr [RBX + 0x12] MOV EAX,dword ptr [RBX] TEST byte ptr [R15 + RCX*0x1],DL JZ 0x00135033 CMP EAX,0x4 JNZ 0x0013505a MOV qword ptr [R12],0x0 ADD R12,0x8 JMP 0x0013522b LAB_00135033: CMP EAX,0x9 JA 0x0013522b MOV EAX,EAX MOVSXD RAX,dword ptr [R11 + RAX*0x4] ADD RAX,R11 switchD: JMP RAX caseD_0: MOVZX EAX,word ptr [RBX + 0x8] ADD qword ptr [R9],RAX MOVZX EAX,word ptr [RBX + 0x8] MOV dword ptr [R14],EAX JMP 0x0013522b LAB_0013505a: MOV dword ptr [R14],0x0 JMP 0x0013522b caseD_3: MOV qword ptr [RBP + -0x30],R12 MOV qword ptr [RBP + -0x38],RSI MOV EDI,dword ptr [RBX + 0x4] ADD RDI,R15 MOVZX R12D,word ptr [RBX + 0x8] LEA RSI,[0x5252e0] MOV RDX,R12 CALL 0x0012a5d0 TEST EAX,EAX JZ 0x001351a6 MOV R9,qword ptr [RBP + -0x48] ADD qword ptr [R9],R12 MOVZX EAX,word ptr [RBX + 0x8] MOV dword ptr [R14],EAX MOV RSI,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] JMP 0x001351e7 caseD_4: MOV qword ptr [RBP + -0x38],RSI MOV R13D,dword ptr [RBX + 0x4] ADD R13,R15 MOVZX R15D,word ptr [RBX + 0x8] ADD R15D,-0x8 MOV EDI,R15D MOV RSI,R13 CALL 0x001691c3 MOV qword ptr [R12],RAX ADD R12,0x8 MOV qword ptr [RBP + -0x30],R12 TEST RAX,RAX JZ 0x001351c5 MOV RCX,qword ptr [RBP + -0x58] ADD qword ptr [RCX + 0x88],RAX MOV R15D,R15D MOV R12,qword ptr [RBP + -0x38] MOV RDI,R12 MOV RSI,R13 MOV R13,RCX MOV RDX,R15 CALL 0x0012a0b0 MOV RSI,R12 ADD RSI,R15 JMP 0x001351db caseD_8: MOV EAX,dword ptr [RBX + 0x4] MOV CL,byte ptr [R15 + RAX*0x1] MOV byte ptr [RSI],CL CMP word ptr [RBX + 0x8],0x100 JA 0x0013517e MOVZX EAX,byte ptr [R15 + RAX*0x1] MOV ECX,0x1 JMP 0x0013518b caseD_1: MOV R8,RSI MOV EAX,dword ptr [RBX + 0x4] ADD RAX,R15 MOVZX ECX,word ptr [RBX + 0x8] MOV RSI,RAX XOR EDI,EDI LAB_0013513c: MOV RDX,RDI LEA RDI,[RSI + RCX*0x1] CMP RDI,RAX JBE 0x00135157 LEA RDI,[RDX + 0x1] CMP byte ptr [RSI + RCX*0x1 + -0x1],0x20 LEA RSI,[RSI + -0x1] JZ 0x0013513c LAB_00135157: MOV RAX,RCX SUB RAX,RDX JZ 0x00135204 CMP ECX,0xff MOV RSI,R8 JA 0x00135219 SUB ECX,EDX MOV byte ptr [RSI],CL INC RSI JMP 0x00135222 LAB_0013517e: MOVZX EAX,word ptr [R15 + RAX*0x1] MOV byte ptr [RSI + 0x1],AH MOV ECX,0x2 LAB_0013518b: MOV dword ptr [R14],EAX TEST EAX,EAX JZ 0x001351f4 MOV EDX,EAX ADD qword ptr [R13 + 0x80],RDX MOV dword ptr [R14],EAX ADD RSI,RCX JMP 0x0013522b LAB_001351a6: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL MOV dword ptr [R14],0x0 MOV RSI,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] JMP 0x001351e3 LAB_001351c5: MOV AL,byte ptr [RBX + 0x13] MOV R13,qword ptr [RBP + -0x58] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL MOV RSI,qword ptr [RBP + -0x38] LAB_001351db: MOV R12,qword ptr [RBP + -0x30] MOV R15,qword ptr [RBP + -0x50] LAB_001351e3: MOV R9,qword ptr [RBP + -0x48] LAB_001351e7: MOV R10,qword ptr [RBP + -0x40] LEA R11,[0x204d78] JMP 0x0013522b LAB_001351f4: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL JMP 0x0013522b LAB_00135204: MOV AL,byte ptr [RBX + 0x13] MOV RCX,qword ptr [R13 + 0x48] MOVZX EDX,word ptr [RBX + 0x10] OR byte ptr [RCX + RDX*0x1],AL XOR EAX,EAX MOV RSI,R8 JMP 0x00135228 LAB_00135219: SUB ECX,EDX MOV word ptr [RSI],CX ADD RSI,0x2 LAB_00135222: MOV ECX,EAX ADD qword ptr [R13 + 0x78],RCX LAB_00135228: MOV dword ptr [R14],EAX caseD_5: ADD RBX,0x38 ADD R14,0x4 CMP RBX,R10 JC 0x0013500e MOV RAX,qword ptr [R13 + 0x50] MOV RBX,qword ptr [RBP + -0x60] JMP 0x00135249 LAB_00135246: MOV RAX,RSI LAB_00135249: SUB RSI,RAX MOV dword ptr [R13 + 0xa8],ESI XOR EAX,EAX CMP ESI,0xff SETNC AL XOR ECX,ECX CMP dword ptr [RBX + 0x3d4],0x0 LEA RAX,[RAX + RAX*0x1 + 0x1] CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x68] ADD RCX,qword ptr [RAX + 0x610] MOV qword ptr [R13 + 0x68],RCX MOV EAX,dword ptr [RBX + 0x3d0] ADD RAX,RSI ADD RAX,qword ptr [R13 + 0x70] ADD RAX,RCX ADD RAX,qword ptr [R13 + 0x78] ADD RAX,qword ptr [R13 + 0x80] MOV dword ptr [R13 + 0xa0],EAX MOV EAX,EAX ADD RAX,qword ptr [R13 + 0x88] MOV qword ptr [R13 + 0x90],RAX MOV RCX,qword ptr [RBX + 0x3b8] CMP RAX,RCX CMOVBE RAX,RCX MOV qword ptr [R13 + 0x90],RAX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void calc_record_size(long *param_1,long param_2,long param_3) { long *plVar1; byte *pbVar2; long lVar3; ushort uVar4; long lVar5; int iVar6; uint uVar7; ulong uVar8; short *psVar9; ulong uVar10; long lVar11; long lVar12; int *piVar13; uint uVar14; short *__dest; long lVar15; long *plVar16; uint *puVar17; uint uVar18; lVar5 = *param_1; puVar17 = *(uint **)(param_3 + 0x58); plVar16 = *(long **)(param_3 + 0x60); *(int4 *)(param_3 + 0xac) = 0; *(int8 *)(param_3 + 0x70) = 0; *(int8 *)(param_3 + 0x78) = 0; *(int8 *)(param_3 + 0x80) = 0; *(int8 *)(param_3 + 0x88) = 0; memset(*(void **)(param_3 + 0x48),0,(ulong)*(uint *)(lVar5 + 0x3f4)); psVar9 = *(short **)(param_3 + 0x50); uVar14 = *(uint *)(lVar5 + 0x3c8); __dest = psVar9; if (*(uint *)(lVar5 + 0x3cc) < uVar14) { plVar1 = (long *)(param_3 + 0x70); lVar12 = *(long *)(lVar5 + 0x588); piVar13 = (int *)((ulong)*(uint *)(lVar5 + 0x3cc) * 0x38 + lVar12); do { if ((*(byte *)(param_2 + (ulong)*(ushort *)((long)piVar13 + 0xe)) & *(byte *)((long)piVar13 + 0x12)) == 0) { switch(*piVar13) { case 0: case 2: case 7: case 9: *plVar1 = *plVar1 + (ulong)*(ushort *)(piVar13 + 2); *puVar17 = (uint)*(ushort *)(piVar13 + 2); break; case 1: uVar4 = *(ushort *)(piVar13 + 2); uVar8 = (ulong)uVar4; uVar10 = (ulong)(uint)piVar13[1] + param_2; lVar11 = 0; do { lVar15 = lVar11; if (uVar10 + uVar8 <= (ulong)(uint)piVar13[1] + param_2) break; lVar3 = uVar10 - 1; uVar10 = uVar10 - 1; lVar11 = lVar15 + 1; } while (*(char *)(lVar3 + uVar8) == ' '); uVar8 = uVar8 - lVar15; if (uVar8 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); uVar8 = 0; } else { if (uVar4 < 0x100) { *(char *)__dest = (char)uVar4 - (char)lVar15; __dest = (short *)((long)__dest + 1); } else { *__dest = uVar4 - (short)lVar15; __dest = __dest + 1; } *(long *)(param_3 + 0x78) = *(long *)(param_3 + 0x78) + (uVar8 & 0xffffffff); } *puVar17 = (uint)uVar8; break; case 3: uVar4 = *(ushort *)(piVar13 + 2); iVar6 = bcmp((void *)((ulong)(uint)piVar13[1] + param_2),maria_zero_string,(ulong)uVar4); if (iVar6 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); *puVar17 = 0; } else { *plVar1 = *plVar1 + (ulong)uVar4; *puVar17 = (uint)*(ushort *)(piVar13 + 2); } break; case 4: uVar7 = piVar13[1]; uVar18 = *(ushort *)(piVar13 + 2) - 8; lVar11 = _ma_calc_blob_length(uVar18,(void *)((ulong)uVar7 + param_2)); *plVar16 = lVar11; plVar16 = plVar16 + 1; if (lVar11 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); } else { *(long *)(param_3 + 0x88) = *(long *)(param_3 + 0x88) + lVar11; memcpy(__dest,(void *)((ulong)uVar7 + param_2),(ulong)uVar18); __dest = (short *)((long)__dest + (ulong)uVar18); } break; case 8: uVar10 = (ulong)(uint)piVar13[1]; *(char *)__dest = *(char *)(param_2 + uVar10); if (*(ushort *)(piVar13 + 2) < 0x101) { uVar7 = (uint)*(byte *)(param_2 + uVar10); lVar11 = 1; } else { uVar7 = (uint)*(ushort *)(param_2 + uVar10); *(char *)((long)__dest + 1) = (char)(*(ushort *)(param_2 + uVar10) >> 8); lVar11 = 2; } *puVar17 = uVar7; if (uVar7 == 0) { pbVar2 = (byte *)(*(long *)(param_3 + 0x48) + (ulong)*(ushort *)(piVar13 + 4)); *pbVar2 = *pbVar2 | *(byte *)((long)piVar13 + 0x13); } else { *(long *)(param_3 + 0x80) = *(long *)(param_3 + 0x80) + (ulong)uVar7; *puVar17 = uVar7; __dest = (short *)((long)__dest + lVar11); } } } else if (*piVar13 == 4) { *plVar16 = 0; plVar16 = plVar16 + 1; } else { *puVar17 = 0; } piVar13 = piVar13 + 0xe; puVar17 = puVar17 + 1; } while (piVar13 < (int *)((ulong)uVar14 * 0x38 + lVar12)); psVar9 = *(short **)(param_3 + 0x50); } uVar14 = (int)__dest - (int)psVar9; *(uint *)(param_3 + 0xa8) = uVar14; lVar12 = 0; if (*(int *)(lVar5 + 0x3d4) != 0) { lVar12 = (ulong)(0xfe < uVar14) * 2 + 1; } lVar11 = param_1[0xc2]; *(long *)(param_3 + 0x68) = lVar12 + lVar11; uVar14 = *(int *)(lVar5 + 0x3d0) + uVar14 + (int)*(int8 *)(param_3 + 0x70) + (int)(lVar12 + lVar11) + (int)*(int8 *)(param_3 + 0x78) + (int)*(int8 *)(param_3 + 0x80); *(uint *)(param_3 + 0xa0) = uVar14; uVar10 = (ulong)uVar14 + *(long *)(param_3 + 0x88); *(ulong *)(param_3 + 0x90) = uVar10; if (uVar10 <= *(ulong *)(lVar5 + 0x3b8)) { uVar10 = *(ulong *)(lVar5 + 0x3b8); } *(ulong *)(param_3 + 0x90) = uVar10; return; }
65,723
from_hex
bluesky950520[P]quickjs/cutils.h
static inline int from_hex(int c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'A' && c <= 'F') return c - 'A' + 10; else if (c >= 'a' && c <= 'f') return c - 'a' + 10; else return -1; }
O0
c
from_hex: movl %edi, -0x8(%rsp) cmpl $0x30, -0x8(%rsp) jl 0x85adf cmpl $0x39, -0x8(%rsp) jg 0x85adf movl -0x8(%rsp), %eax subl $0x30, %eax movl %eax, -0x4(%rsp) jmp 0x85b23 cmpl $0x41, -0x8(%rsp) jl 0x85afd cmpl $0x46, -0x8(%rsp) jg 0x85afd movl -0x8(%rsp), %eax subl $0x41, %eax addl $0xa, %eax movl %eax, -0x4(%rsp) jmp 0x85b23 cmpl $0x61, -0x8(%rsp) jl 0x85b1b cmpl $0x66, -0x8(%rsp) jg 0x85b1b movl -0x8(%rsp), %eax subl $0x61, %eax addl $0xa, %eax movl %eax, -0x4(%rsp) jmp 0x85b23 movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF movl -0x4(%rsp), %eax retq nopl (%rax,%rax)
from_hex: mov [rsp+var_8], edi cmp [rsp+var_8], 30h ; '0' jl short loc_85ADF cmp [rsp+var_8], 39h ; '9' jg short loc_85ADF mov eax, [rsp+var_8] sub eax, 30h ; '0' mov [rsp+var_4], eax jmp short loc_85B23 loc_85ADF: cmp [rsp+var_8], 41h ; 'A' jl short loc_85AFD cmp [rsp+var_8], 46h ; 'F' jg short loc_85AFD mov eax, [rsp+var_8] sub eax, 41h ; 'A' add eax, 0Ah mov [rsp+var_4], eax jmp short loc_85B23 loc_85AFD: cmp [rsp+var_8], 61h ; 'a' jl short loc_85B1B cmp [rsp+var_8], 66h ; 'f' jg short loc_85B1B mov eax, [rsp+var_8] sub eax, 61h ; 'a' add eax, 0Ah mov [rsp+var_4], eax jmp short loc_85B23 loc_85B1B: mov [rsp+var_4], 0FFFFFFFFh loc_85B23: mov eax, [rsp+var_4] retn
long long from_hex(int a1) { if ( a1 < 48 || a1 > 57 ) { if ( a1 < 65 || a1 > 70 ) { if ( a1 < 97 || a1 > 102 ) return (unsigned int)-1; else return (unsigned int)(a1 - 97 + 10); } else { return (unsigned int)(a1 - 65 + 10); } } else { return (unsigned int)(a1 - 48); } }
from_hex: MOV dword ptr [RSP + -0x8],EDI CMP dword ptr [RSP + -0x8],0x30 JL 0x00185adf CMP dword ptr [RSP + -0x8],0x39 JG 0x00185adf MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x30 MOV dword ptr [RSP + -0x4],EAX JMP 0x00185b23 LAB_00185adf: CMP dword ptr [RSP + -0x8],0x41 JL 0x00185afd CMP dword ptr [RSP + -0x8],0x46 JG 0x00185afd MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x41 ADD EAX,0xa MOV dword ptr [RSP + -0x4],EAX JMP 0x00185b23 LAB_00185afd: CMP dword ptr [RSP + -0x8],0x61 JL 0x00185b1b CMP dword ptr [RSP + -0x8],0x66 JG 0x00185b1b MOV EAX,dword ptr [RSP + -0x8] SUB EAX,0x61 ADD EAX,0xa MOV dword ptr [RSP + -0x4],EAX JMP 0x00185b23 LAB_00185b1b: MOV dword ptr [RSP + -0x4],0xffffffff LAB_00185b23: MOV EAX,dword ptr [RSP + -0x4] RET
int from_hex(int param_1) { int4 local_4; if ((param_1 < 0x30) || (0x39 < param_1)) { if ((param_1 < 0x41) || (0x46 < param_1)) { if ((param_1 < 0x61) || (0x66 < param_1)) { local_4 = -1; } else { local_4 = param_1 + -0x57; } } else { local_4 = param_1 + -0x37; } } else { local_4 = param_1 + -0x30; } return local_4; }
65,724
from_hex
bluesky950520[P]quickjs/cutils.h
static inline int from_hex(int c) { if (c >= '0' && c <= '9') return c - '0'; else if (c >= 'A' && c <= 'F') return c - 'A' + 10; else if (c >= 'a' && c <= 'f') return c - 'a' + 10; else return -1; }
O2
c
from_hex: leal -0x30(%rdi), %eax cmpl $0xa, %eax jb 0x7b010 leal -0x41(%rdi), %eax cmpl $0x5, %eax ja 0x7b001 addl $-0x37, %edi movl %edi, %eax retq leal -0x61(%rdi), %eax addl $-0x57, %edi cmpl $0x6, %eax pushq $-0x1 popq %rax cmovbl %edi, %eax retq
from_hex_0: lea eax, [rdi-30h] cmp eax, 0Ah jb short locret_7B010 lea eax, [rdi-41h] cmp eax, 5 ja short loc_7B001 add edi, 0FFFFFFC9h mov eax, edi retn loc_7B001: lea eax, [rdi-61h] add edi, 0FFFFFFA9h cmp eax, 6 push 0FFFFFFFFFFFFFFFFh pop rax cmovb eax, edi locret_7B010: retn
long long from_hex_0(int a1) { long long result; // rax unsigned int v2; // eax unsigned int v3; // edi bool v4; // cf result = (unsigned int)(a1 - 48); if ( (unsigned int)result >= 0xA ) { if ( (unsigned int)(a1 - 65) > 5 ) { v2 = a1 - 97; v3 = a1 - 87; v4 = v2 < 6; result = -1LL; if ( v4 ) return v3; } else { return (unsigned int)(a1 - 55); } } return result; }
from_hex: LEA EAX,[RDI + -0x30] CMP EAX,0xa JC 0x0017b010 LEA EAX,[RDI + -0x41] CMP EAX,0x5 JA 0x0017b001 ADD EDI,-0x37 MOV EAX,EDI RET LAB_0017b001: LEA EAX,[RDI + -0x61] ADD EDI,-0x57 CMP EAX,0x6 PUSH -0x1 POP RAX CMOVC EAX,EDI LAB_0017b010: RET
uint from_hex(int param_1) { uint uVar1; uVar1 = param_1 - 0x30U; if (9 < param_1 - 0x30U) { if (param_1 - 0x41U < 6) { return param_1 - 0x37; } uVar1 = 0xffffffff; if (param_1 - 0x61U < 6) { uVar1 = param_1 - 0x57; } } return uVar1; }
65,725
mthd_my_send_cmd
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int mthd_my_send_cmd(MYSQL *mysql,enum enum_server_command command, const char *arg, size_t length, my_bool skip_check, void *opt_arg) { NET *net= &mysql->net; int result= -1; if (mysql->net.pvio == 0) { /* Do reconnect if possible */ if (mariadb_reconnect(mysql)) return(1); } if (mysql->status != MYSQL_STATUS_READY || mysql->server_status & SERVER_MORE_RESULTS_EXIST) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); goto end; } if (IS_CONNHDLR_ACTIVE(mysql)) { result= mysql->extension->conn_hdlr->plugin->set_connection(mysql, command, arg, length, skip_check, opt_arg); if (result== -1) return(result); } CLEAR_CLIENT_ERROR(mysql); if (command == COM_QUERY || command == COM_STMT_PREPARE) { if ((mysql->options.client_flag & CLIENT_LOCAL_FILES) && mysql->options.extension && mysql->extension->auto_local_infile == WAIT_FOR_QUERY && arg && (*arg == 'l' || *arg == 'L')) { if (strncasecmp(arg, "load", 4) == 0) mysql->extension->auto_local_infile= ACCEPT_FILE_REQUEST; } } mysql->info=0; mysql->affected_rows= ~(unsigned long long) 0; ma_net_clear(net); /* Clear receive buffer */ if (!arg) arg=""; if (net->extension->multi_status== COM_MULTI_ENABLED) { return net_add_multi_command(net, command, (const uchar *)arg, length); } if (ma_net_write_command(net,(uchar) command,arg, length ? length : (ulong) strlen(arg), 0)) { if (net->last_errno == ER_NET_PACKET_TOO_LARGE) { my_set_error(mysql, CR_NET_PACKET_TOO_LARGE, SQLSTATE_UNKNOWN, 0); goto end; } end_server(mysql); if (mariadb_reconnect(mysql)) goto end; if (ma_net_write_command(net,(uchar) command,arg, length ? length : (ulong) strlen(arg), 0)) { my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0); goto end; } } result=0; if (net->extension->multi_status > COM_MULTI_OFF) skip_check= 1; if (!skip_check) { result= ((mysql->packet_length=ma_net_safe_read(mysql)) == packet_error ? 1 : 0); } end: return(result); }
O3
c
mthd_my_send_cmd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movq %rdi, %rbx cmpq $0x0, (%rdi) je 0x44951 cmpl $0x0, 0x488(%rbx) jne 0x448f7 testb $0x8, 0x380(%rbx) jne 0x448f7 movq 0x4f0(%rbx), %rax movl $0xffffffff, %r13d # imm = 0xFFFFFFFF testq %rax, %rax movq %rcx, -0x30(%rbp) je 0x447ff movq (%rax), %rax testq %rax, %rax je 0x447ff movq (%rax), %rax movl %r8d, %r14d movsbl %r14b, %r8d movq %rbx, %rdi movl %esi, %r13d movq %r12, %rdx callq *0x70(%rax) movl %r13d, %esi movl %r14d, %r8d movl %eax, %r13d cmpl $-0x1, %eax je 0x44949 movl %r8d, -0x34(%rbp) movl $0x0, 0x90(%rbx) movl $0x30303030, 0x297(%rbx) # imm = 0x30303030 movw $0x30, 0x29b(%rbx) movb $0x0, 0x97(%rbx) movq 0x2a0(%rbx), %rax testq %rax, %rax je 0x4483a movl $0x0, 0x4(%rax) cmpl $0x16, %esi je 0x44844 cmpl $0x3, %esi jne 0x4489a testb $-0x80, 0x3a8(%rbx) je 0x4489a cmpq $0x0, 0x480(%rbx) je 0x4489a testq %r12, %r12 je 0x4489a movq 0x4f0(%rbx), %r14 cmpb $0x1, 0x78(%r14) jne 0x4489a movzbl (%r12), %eax orl $0x20, %eax cmpl $0x6c, %eax jne 0x4489a movl %esi, %r15d leaq 0x5fd02(%rip), %rsi # 0xa4583 movl $0x4, %edx movq %r12, %rdi callq 0x37a10 movl %r15d, %esi testl %eax, %eax jne 0x4489a movb $0x2, 0x78(%r14) movl %esi, %r14d movq $0x0, 0x2e0(%rbx) movq $-0x1, 0x338(%rbx) movq %rbx, %rdi callq 0x5ffa0 testq %r12, %r12 leaq 0x5d2b2(%rip), %rdx # 0xa1b77 cmovneq %r12, %rdx movq 0x2a0(%rbx), %rax cmpl $0x2, (%rax) jne 0x44999 movzbl %r14b, %esi movq %rbx, %rdi movq -0x30(%rbp), %rcx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x60942 movl $0x7de, 0x90(%rbx) # imm = 0x7DE leaq 0x297(%rbx), %rdi leaq 0x308c71(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 xorl %r14d, %r14d movb %r14b, 0x29c(%rbx) leaq 0x97(%rbx), %rdi leaq 0x308c5c(%rip), %rax # 0x34d590 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37130 movb %r14b, 0x296(%rbx) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x44987 movq %rbx, %rdi movl %r8d, %r14d movq %rcx, %r13 movq %r12, -0x40(%rbp) movl %esi, %r12d movq %r9, %r15 callq 0x44a98 movq %r15, %r9 movl %r12d, %esi movq -0x40(%rbp), %r12 movq %r13, %rcx movl %r14d, %r8d movl $0x1, %r14d testb %al, %al je 0x4479f movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x30(%rbp), %rax movq %rax, %rcx testq %rax, %rax movl %r14d, %esi movq %rdx, %r12 jne 0x449bc movq %rdx, %rdi callq 0x37410 movq %r12, %rdx movl %r14d, %esi movq %rax, %rcx movzbl %sil, %r15d xorl %r14d, %r14d movq %rbx, %rdi movl %r15d, %esi xorl %r8d, %r8d callq 0x60421 testl %eax, %eax je 0x44a5b cmpl $0x481, 0x90(%rbx) # imm = 0x481 jne 0x44a02 leaq 0x308b94(%rip), %rax # 0x34d580 movq (%rax), %rdx movq %rbx, %rdi movl $0x7e4, %esi # imm = 0x7E4 xorl %ecx, %ecx xorl %eax, %eax callq 0x4459d jmp 0x44a16 movq %rbx, %rdi callq 0x4456a movq %rbx, %rdi callq 0x44a98 testb %al, %al je 0x44a1e movl %r13d, %r14d jmp 0x44987 movq -0x30(%rbp), %rcx testq %rcx, %rcx jne 0x44a32 movq %r12, %rdi callq 0x37410 movq %rax, %rcx movq %rbx, %rdi movl %r15d, %esi movq %r12, %rdx xorl %r8d, %r8d callq 0x60421 testl %eax, %eax je 0x44a5b leaq 0x308b32(%rip), %rax # 0x34d580 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d6, %esi # imm = 0x7D6 jmp 0x449f7 cmpb $0x0, -0x34(%rbp) jne 0x44987 movq 0x2a0(%rbx), %rax cmpl $0x0, (%rax) jne 0x44987 movq %rbx, %rdi callq 0x44303 movq %rax, 0x358(%rbx) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF xorl %r14d, %r14d cmpq %rcx, %rax sete %r14b jmp 0x44987
mthd_my_send_cmd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov rbx, rdi cmp qword ptr [rdi], 0 jz loc_44951 loc_4479F: cmp dword ptr [rbx+488h], 0 jnz loc_448F7 test byte ptr [rbx+380h], 8 jnz loc_448F7 mov rax, [rbx+4F0h] mov r13d, 0FFFFFFFFh test rax, rax mov [rbp+var_30], rcx jz short loc_447FF mov rax, [rax] test rax, rax jz short loc_447FF mov rax, [rax] mov r14d, r8d movsx r8d, r14b mov rdi, rbx mov r13d, esi mov rdx, r12 call qword ptr [rax+70h] mov esi, r13d mov r8d, r14d mov r13d, eax cmp eax, 0FFFFFFFFh jz loc_44949 loc_447FF: mov [rbp+var_34], r8d mov dword ptr [rbx+90h], 0 mov dword ptr [rbx+297h], 30303030h mov word ptr [rbx+29Bh], 30h ; '0' mov byte ptr [rbx+97h], 0 mov rax, [rbx+2A0h] test rax, rax jz short loc_4483A mov dword ptr [rax+4], 0 loc_4483A: cmp esi, 16h jz short loc_44844 cmp esi, 3 jnz short loc_4489A loc_44844: test byte ptr [rbx+3A8h], 80h jz short loc_4489A cmp qword ptr [rbx+480h], 0 jz short loc_4489A test r12, r12 jz short loc_4489A mov r14, [rbx+4F0h] cmp byte ptr [r14+78h], 1 jnz short loc_4489A movzx eax, byte ptr [r12] or eax, 20h cmp eax, 6Ch ; 'l' jnz short loc_4489A mov r15d, esi lea rsi, aLoad; "load" mov edx, 4 mov rdi, r12 call _strncasecmp mov esi, r15d test eax, eax jnz short loc_4489A mov byte ptr [r14+78h], 2 loc_4489A: mov r14d, esi mov qword ptr [rbx+2E0h], 0 mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh mov rdi, rbx call ma_net_clear test r12, r12 lea rdx, asc_A1B75+2; "" cmovnz rdx, r12 mov rax, [rbx+2A0h] cmp dword ptr [rax], 2 jnz loc_44999 movzx esi, r14b mov rdi, rbx mov rcx, [rbp+var_30] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp net_add_multi_command loc_448F7: mov dword ptr [rbx+90h], 7DEh lea rdi, [rbx+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+29Ch], r14b lea rdi, [rbx+97h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov [rbx+296h], r14b loc_44949: mov r14d, 0FFFFFFFFh jmp short loc_44987 loc_44951: mov rdi, rbx mov r14d, r8d mov r13, rcx mov [rbp+var_40], r12 mov r12d, esi mov r15, r9 call mariadb_reconnect mov r9, r15 mov esi, r12d mov r12, [rbp+var_40] mov rcx, r13 mov r8d, r14d mov r14d, 1 test al, al jz loc_4479F loc_44987: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44999: mov rax, [rbp+var_30] mov rcx, rax test rax, rax mov esi, r14d mov r12, rdx jnz short loc_449BC mov rdi, rdx call _strlen mov rdx, r12 mov esi, r14d mov rcx, rax loc_449BC: movzx r15d, sil xor r14d, r14d mov rdi, rbx mov esi, r15d xor r8d, r8d call ma_net_write_command test eax, eax jz loc_44A5B cmp dword ptr [rbx+90h], 481h jnz short loc_44A02 lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7E4h loc_449F7: xor ecx, ecx xor eax, eax call my_set_error jmp short loc_44A16 loc_44A02: mov rdi, rbx call end_server mov rdi, rbx call mariadb_reconnect test al, al jz short loc_44A1E loc_44A16: mov r14d, r13d jmp loc_44987 loc_44A1E: mov rcx, [rbp+var_30] test rcx, rcx jnz short loc_44A32 mov rdi, r12 call _strlen mov rcx, rax loc_44A32: mov rdi, rbx mov esi, r15d mov rdx, r12 xor r8d, r8d call ma_net_write_command test eax, eax jz short loc_44A5B lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D6h jmp short loc_449F7 loc_44A5B: cmp byte ptr [rbp+var_34], 0 jnz loc_44987 mov rax, [rbx+2A0h] cmp dword ptr [rax], 0 jnz loc_44987 mov rdi, rbx call ma_net_safe_read mov [rbx+358h], rax mov ecx, 0FFFFFFFFh xor r14d, r14d cmp rax, rcx setz r14b jmp loc_44987
long long mthd_my_send_cmd(long long a1, long long a2, char *a3, long long a4, char a5) { char *v5; // r12 long long *v6; // rax unsigned int v7; // r13d long long v8; // rax char v9; // r14 unsigned int v10; // eax long long v11; // rax long long v12; // r14 char *v13; // rdx unsigned int v15; // r14d char v16; // r14 long long v17; // r13 char v18; // al long long v19; // rcx char *v20; // r12 long long v21; // rax long long v22; // rdx long long v23; // rcx unsigned long long v24; // r8 int v25; // r9d char *v26; // rdx int v27; // esi long long v28; // rcx unsigned long long v29; // rax char v31; // [rsp+Ch] [rbp-34h] long long v32; // [rsp+10h] [rbp-30h] v5 = a3; if ( !*(_QWORD *)a1 ) { v16 = a5; v17 = a4; v18 = mariadb_reconnect(a1); a2 = (unsigned int)a2; v5 = a3; a4 = v17; a5 = v16; v15 = 1; if ( v18 ) return v15; } if ( *(_DWORD *)(a1 + 1160) || (*(_BYTE *)(a1 + 896) & 8) != 0 ) { *(_DWORD *)(a1 + 144) = 2014; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[14], 511LL); *(_BYTE *)(a1 + 662) = 0; } else { v6 = *(long long **)(a1 + 1264); v7 = -1; v32 = a4; if ( !v6 || (v8 = *v6) == 0 || (v9 = a5, v10 = (*(long long ( **)(long long, long long, char *, long long, _QWORD))(*(_QWORD *)v8 + 112LL))( a1, a2, v5, a4, (unsigned int)a5), a5 = v9, v7 = v10, v10 != -1) ) { v31 = a5; *(_DWORD *)(a1 + 144) = 0; strcpy((char *)(a1 + 663), "00000"); *(_BYTE *)(a1 + 151) = 0; v11 = *(_QWORD *)(a1 + 672); if ( v11 ) *(_DWORD *)(v11 + 4) = 0; if ( ((_DWORD)a2 == 22 || (_DWORD)a2 == 3) && *(char *)(a1 + 936) < 0 ) { if ( *(_QWORD *)(a1 + 1152) ) { if ( v5 ) { v12 = *(_QWORD *)(a1 + 1264); if ( *(_BYTE *)(v12 + 120) == 1 && ((unsigned __int8)*v5 | 0x20) == 0x6C && !(unsigned int)strncasecmp(v5, "load", 4LL) ) { *(_BYTE *)(v12 + 120) = 2; } } } } *(_QWORD *)(a1 + 736) = 0LL; *(_QWORD *)(a1 + 824) = -1LL; ma_net_clear(a1); v13 = ""; if ( v5 ) v13 = v5; if ( **(_DWORD **)(a1 + 672) == 2 ) return net_add_multi_command(a1, (unsigned __int8)a2, v13, v32); v19 = v32; v20 = v13; if ( !v32 ) { v21 = strlen(v13); v13 = v20; v19 = v21; } v15 = 0; a2 = (unsigned __int8)a2; if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v13, v19, 0LL) ) { if ( *(_DWORD *)(a1 + 144) == 1153 ) { v26 = SQLSTATE_UNKNOWN; v27 = 2020; LABEL_31: my_set_error(a1, v27, (long long)v26, 0LL); return v7; } end_server((long long *)a1); if ( (unsigned __int8)mariadb_reconnect(a1) ) return v7; v28 = v32; if ( !v32 ) v28 = strlen(v20); a2 = (unsigned __int8)a2; if ( (unsigned int)ma_net_write_command(a1, (unsigned __int8)a2, v20, v28, 0LL) ) { v26 = SQLSTATE_UNKNOWN; v27 = 2006; goto LABEL_31; } } if ( !v31 && !**(_DWORD **)(a1 + 672) ) { v29 = ma_net_safe_read(a1, a2, v22, v23, v24, v25); *(_QWORD *)(a1 + 856) = v29; return v29 == 0xFFFFFFFF; } return v15; } } return (unsigned int)-1; }
mthd_my_send_cmd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV RBX,RDI CMP qword ptr [RDI],0x0 JZ 0x00144951 LAB_0014479f: CMP dword ptr [RBX + 0x488],0x0 JNZ 0x001448f7 TEST byte ptr [RBX + 0x380],0x8 JNZ 0x001448f7 MOV RAX,qword ptr [RBX + 0x4f0] MOV R13D,0xffffffff TEST RAX,RAX MOV qword ptr [RBP + -0x30],RCX JZ 0x001447ff MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001447ff MOV RAX,qword ptr [RAX] MOV R14D,R8D MOVSX R8D,R14B MOV RDI,RBX MOV R13D,ESI MOV RDX,R12 CALL qword ptr [RAX + 0x70] MOV ESI,R13D MOV R8D,R14D MOV R13D,EAX CMP EAX,-0x1 JZ 0x00144949 LAB_001447ff: MOV dword ptr [RBP + -0x34],R8D MOV dword ptr [RBX + 0x90],0x0 MOV dword ptr [RBX + 0x297],0x30303030 MOV word ptr [RBX + 0x29b],0x30 MOV byte ptr [RBX + 0x97],0x0 MOV RAX,qword ptr [RBX + 0x2a0] TEST RAX,RAX JZ 0x0014483a MOV dword ptr [RAX + 0x4],0x0 LAB_0014483a: CMP ESI,0x16 JZ 0x00144844 CMP ESI,0x3 JNZ 0x0014489a LAB_00144844: TEST byte ptr [RBX + 0x3a8],0x80 JZ 0x0014489a CMP qword ptr [RBX + 0x480],0x0 JZ 0x0014489a TEST R12,R12 JZ 0x0014489a MOV R14,qword ptr [RBX + 0x4f0] CMP byte ptr [R14 + 0x78],0x1 JNZ 0x0014489a MOVZX EAX,byte ptr [R12] OR EAX,0x20 CMP EAX,0x6c JNZ 0x0014489a MOV R15D,ESI LEA RSI,[0x1a4583] MOV EDX,0x4 MOV RDI,R12 CALL 0x00137a10 MOV ESI,R15D TEST EAX,EAX JNZ 0x0014489a MOV byte ptr [R14 + 0x78],0x2 LAB_0014489a: MOV R14D,ESI MOV qword ptr [RBX + 0x2e0],0x0 MOV qword ptr [RBX + 0x338],-0x1 MOV RDI,RBX CALL 0x0015ffa0 TEST R12,R12 LEA RDX,[0x1a1b77] CMOVNZ RDX,R12 MOV RAX,qword ptr [RBX + 0x2a0] CMP dword ptr [RAX],0x2 JNZ 0x00144999 MOVZX ESI,R14B MOV RDI,RBX MOV RCX,qword ptr [RBP + -0x30] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00160942 LAB_001448f7: MOV dword ptr [RBX + 0x90],0x7de LEA RDI,[RBX + 0x297] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 XOR R14D,R14D MOV byte ptr [RBX + 0x29c],R14B LEA RDI,[RBX + 0x97] LEA RAX,[0x44d590] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00137130 MOV byte ptr [RBX + 0x296],R14B LAB_00144949: MOV R14D,0xffffffff JMP 0x00144987 LAB_00144951: MOV RDI,RBX MOV R14D,R8D MOV R13,RCX MOV qword ptr [RBP + -0x40],R12 MOV R12D,ESI MOV R15,R9 CALL 0x00144a98 MOV R9,R15 MOV ESI,R12D MOV R12,qword ptr [RBP + -0x40] MOV RCX,R13 MOV R8D,R14D MOV R14D,0x1 TEST AL,AL JZ 0x0014479f LAB_00144987: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144999: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,RAX TEST RAX,RAX MOV ESI,R14D MOV R12,RDX JNZ 0x001449bc MOV RDI,RDX CALL 0x00137410 MOV RDX,R12 MOV ESI,R14D MOV RCX,RAX LAB_001449bc: MOVZX R15D,SIL XOR R14D,R14D MOV RDI,RBX MOV ESI,R15D XOR R8D,R8D CALL 0x00160421 TEST EAX,EAX JZ 0x00144a5b CMP dword ptr [RBX + 0x90],0x481 JNZ 0x00144a02 LEA RAX,[0x44d580] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7e4 LAB_001449f7: XOR ECX,ECX XOR EAX,EAX CALL 0x0014459d JMP 0x00144a16 LAB_00144a02: MOV RDI,RBX CALL 0x0014456a MOV RDI,RBX CALL 0x00144a98 TEST AL,AL JZ 0x00144a1e LAB_00144a16: MOV R14D,R13D JMP 0x00144987 LAB_00144a1e: MOV RCX,qword ptr [RBP + -0x30] TEST RCX,RCX JNZ 0x00144a32 MOV RDI,R12 CALL 0x00137410 MOV RCX,RAX LAB_00144a32: MOV RDI,RBX MOV ESI,R15D MOV RDX,R12 XOR R8D,R8D CALL 0x00160421 TEST EAX,EAX JZ 0x00144a5b LEA RAX,[0x44d580] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d6 JMP 0x001449f7 LAB_00144a5b: CMP byte ptr [RBP + -0x34],0x0 JNZ 0x00144987 MOV RAX,qword ptr [RBX + 0x2a0] CMP dword ptr [RAX],0x0 JNZ 0x00144987 MOV RDI,RBX CALL 0x00144303 MOV qword ptr [RBX + 0x358],RAX MOV ECX,0xffffffff XOR R14D,R14D CMP RAX,RCX SETZ R14B JMP 0x00144987
ulong mthd_my_send_cmd(long *param_1,ulong param_2,byte *param_3,size_t param_4,char param_5, int8 param_6) { long *plVar1; char cVar2; uint uVar3; int iVar4; ulong uVar5; size_t sVar6; long lVar7; byte *__s; int8 uVar8; if (*param_1 == 0) { param_2 = param_2 & 0xffffffff; cVar2 = mariadb_reconnect(param_1); if (cVar2 != '\0') { return 1; } } if (((int)param_1[0x91] != 0) || ((*(byte *)(param_1 + 0x70) & 8) != 0)) { *(int4 *)(param_1 + 0x12) = 0x7de; strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)((long)param_1 + 0x29c) = 0; strncpy((char *)((long)param_1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0044d600,0x1ff); *(int1 *)((long)param_1 + 0x296) = 0; return 0xffffffff; } uVar3 = 0xffffffff; uVar5 = param_2; if (((long *)param_1[0x9e] != (long *)0x0) && (plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) { uVar5 = param_2 & 0xffffffff; uVar3 = (**(code **)(*plVar1 + 0x70))(param_1,param_2,param_3,param_4,(int)param_5,param_6); if (uVar3 == 0xffffffff) { return 0xffffffff; } } *(int4 *)(param_1 + 0x12) = 0; *(int4 *)((long)param_1 + 0x297) = 0x30303030; *(int2 *)((long)param_1 + 0x29b) = 0x30; *(int1 *)((long)param_1 + 0x97) = 0; if (param_1[0x54] != 0) { *(int4 *)(param_1[0x54] + 4) = 0; } if (((((int)uVar5 == 0x16) || ((int)uVar5 == 3)) && ((*(byte *)(param_1 + 0x75) & 0x80) != 0)) && (((param_1[0x90] != 0 && (param_3 != (byte *)0x0)) && ((lVar7 = param_1[0x9e], *(char *)(lVar7 + 0x78) == '\x01' && ((*param_3 | 0x20) == 0x6c)))))) { uVar5 = uVar5 & 0xffffffff; iVar4 = strncasecmp((char *)param_3,"load",4); if (iVar4 == 0) { *(int1 *)(lVar7 + 0x78) = 2; } } param_1[0x5c] = 0; param_1[0x67] = -1; ma_net_clear(param_1); __s = &DAT_001a1b77; if (param_3 != (byte *)0x0) { __s = param_3; } if (*(int *)param_1[0x54] == 2) { uVar5 = net_add_multi_command(param_1,uVar5 & 0xff,__s,param_4); return uVar5; } sVar6 = param_4; if (param_4 == 0) { sVar6 = strlen((char *)__s); } iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,sVar6,0); if (iVar4 == 0) { LAB_00144a5b: if (param_5 != '\0') { return 0; } if (*(int *)param_1[0x54] == 0) { lVar7 = ma_net_safe_read(param_1); param_1[0x6b] = lVar7; return (ulong)(lVar7 == 0xffffffff); } return 0; } if ((int)param_1[0x12] == 0x481) { uVar8 = 0x7e4; } else { end_server(param_1); cVar2 = mariadb_reconnect(param_1); if (cVar2 != '\0') goto LAB_00144a16; if (param_4 == 0) { param_4 = strlen((char *)__s); } iVar4 = ma_net_write_command(param_1,uVar5 & 0xff,__s,param_4,0); if (iVar4 == 0) goto LAB_00144a5b; uVar8 = 0x7d6; } my_set_error(param_1,uVar8,SQLSTATE_UNKNOWN,0); LAB_00144a16: return (ulong)uVar3; }
65,726
Trie::Node::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, Trie::Node*)
BirdUp9000[P]ct9/src/../include/ct9/Trie.h
inline void Trie::Node::insert(const std::string& text, const size_t index, Node* root) { if (index == text.size()) { end_of_word = true; return; } // Mark as end of word if a non-alphabetic character is encountered if (isalpha(text[index]) == 0) { end_of_word = true; root->insert(text, index + 1, root); } else { // Create a new node if the current character is not found if (!children.contains(text[index])) { children[text[index]] = new Node(); } children[text[index]]->insert(text, index + 1, root); } }
O2
c
Trie::Node::insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, Trie::Node*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 pushq $0x38 popq %r12 cmpq 0x8(%r15), %r14 je 0x2c2e movq (%r15), %rbp movsbl (%rbp,%r14), %edi callq 0x22b0 testl %eax, %eax je 0x2c1e addq %r14, %rbp movq %r13, %rdi movq %rbp, %rsi callq 0x2c42 testb %al, %al jne 0x2c0b movq %r12, %rdi callq 0x21d0 movq %rax, %rbp addq $0x8, %rax andl $0x0, 0x8(%rbp) andq $0x0, 0x10(%rbp) movq %rax, 0x18(%rbp) movq %rax, 0x20(%rbp) andq $0x0, 0x28(%rbp) movb $0x0, 0x30(%rbp) movq (%r15), %rsi addq %r14, %rsi movq %r13, %rdi callq 0x2c58 movq %rbp, (%rax) movq (%r15), %rsi addq %r14, %rsi movq %r13, %rdi callq 0x2c58 movq (%rax), %r13 jmp 0x2c26 movb $0x1, 0x30(%r13) movq %rbx, %r13 incq %r14 jmp 0x2ba3 movb $0x1, 0x30(%r13) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN4Trie4Node6insertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPS0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi push 38h ; '8' pop r12 loc_2BA3: cmp r14, [r15+8] jz loc_2C2E mov rbp, [r15] movsx edi, byte ptr [rbp+r14+0] call _isalpha test eax, eax jz short loc_2C1E add rbp, r14 mov rdi, r13 mov rsi, rbp call _ZNKSt3mapIcPN4Trie4NodeESt4lessIcESaISt4pairIKcS2_EEE8containsERS6_; std::map<char,Trie::Node *>::contains(char const&) test al, al jnz short loc_2C0B mov rdi, r12; unsigned __int64 call __Znwm; operator new(ulong) mov rbp, rax add rax, 8 and dword ptr [rbp+8], 0 and qword ptr [rbp+10h], 0 mov [rbp+18h], rax mov [rbp+20h], rax and qword ptr [rbp+28h], 0 mov byte ptr [rbp+30h], 0 mov rsi, [r15] add rsi, r14 mov rdi, r13 call _ZNSt3mapIcPN4Trie4NodeESt4lessIcESaISt4pairIKcS2_EEEixERS6_; std::map<char,Trie::Node *>::operator[](char const&) mov [rax], rbp loc_2C0B: mov rsi, [r15] add rsi, r14 mov rdi, r13 call _ZNSt3mapIcPN4Trie4NodeESt4lessIcESaISt4pairIKcS2_EEEixERS6_; std::map<char,Trie::Node *>::operator[](char const&) mov r13, [rax] jmp short loc_2C26 loc_2C1E: mov byte ptr [r13+30h], 1 mov r13, rbx loc_2C26: inc r14 jmp loc_2BA3 loc_2C2E: mov byte ptr [r13+30h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long * Trie::Node::insert(long long a1, long long *a2, long long a3, long long a4) { long long v7; // rbp long long *result; // rax long long v9; // rbp while ( a3 != a2[1] ) { v7 = *a2; result = (long long *)isalpha((unsigned int)*(char *)(*a2 + a3)); if ( (_DWORD)result ) { if ( !(unsigned __int8)std::map<char,Trie::Node *>::contains(a1, a3 + v7) ) { v9 = operator new(0x38uLL); *(_DWORD *)(v9 + 8) = 0; *(_QWORD *)(v9 + 16) = 0LL; *(_QWORD *)(v9 + 24) = v9 + 8; *(_QWORD *)(v9 + 32) = v9 + 8; *(_QWORD *)(v9 + 40) = 0LL; *(_BYTE *)(v9 + 48) = 0; *(_QWORD *)std::map<char,Trie::Node *>::operator[](a1, a3 + *a2) = v9; } result = (long long *)std::map<char,Trie::Node *>::operator[](a1, a3 + *a2); a1 = *result; } else { *(_BYTE *)(a1 + 48) = 1; a1 = a4; } ++a3; } *(_BYTE *)(a1 + 48) = 1; return result; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI PUSH 0x38 POP R12 LAB_00102ba3: CMP R14,qword ptr [R15 + 0x8] JZ 0x00102c2e MOV RBP,qword ptr [R15] MOVSX EDI,byte ptr [RBP + R14*0x1] CALL 0x001022b0 TEST EAX,EAX JZ 0x00102c1e ADD RBP,R14 MOV RDI,R13 MOV RSI,RBP CALL 0x00102c42 TEST AL,AL JNZ 0x00102c0b MOV RDI,R12 CALL 0x001021d0 MOV RBP,RAX ADD RAX,0x8 AND dword ptr [RBP + 0x8],0x0 AND qword ptr [RBP + 0x10],0x0 MOV qword ptr [RBP + 0x18],RAX MOV qword ptr [RBP + 0x20],RAX AND qword ptr [RBP + 0x28],0x0 MOV byte ptr [RBP + 0x30],0x0 MOV RSI,qword ptr [R15] ADD RSI,R14 MOV RDI,R13 CALL 0x00102c58 MOV qword ptr [RAX],RBP LAB_00102c0b: MOV RSI,qword ptr [R15] ADD RSI,R14 MOV RDI,R13 CALL 0x00102c58 MOV R13,qword ptr [RAX] JMP 0x00102c26 LAB_00102c1e: MOV byte ptr [R13 + 0x30],0x1 MOV R13,RBX LAB_00102c26: INC R14 JMP 0x00102ba3 LAB_00102c2e: MOV byte ptr [R13 + 0x30],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Trie::Node::insert(std::__cxx11::string const&, unsigned long, Trie::Node*) */ void __thiscall Trie::Node::insert(Node *this,string *param_1,ulong param_2,Node *param_3) { long lVar1; char cVar2; int iVar3; void *pvVar4; int8 *puVar5; for (; param_2 != *(ulong *)(param_1 + 8); param_2 = param_2 + 1) { lVar1 = *(long *)param_1; iVar3 = isalpha((int)*(char *)(lVar1 + param_2)); if (iVar3 == 0) { ((map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> *) this)[0x30] = (map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> )0x1; this = param_3; } else { cVar2 = std:: map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> ::contains((map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> *)this,(char *)(lVar1 + param_2)); if (cVar2 == '\0') { pvVar4 = operator_new(0x38); *(int4 *)((long)pvVar4 + 8) = 0; *(int8 *)((long)pvVar4 + 0x10) = 0; *(long *)((long)pvVar4 + 0x18) = (long)pvVar4 + 8; *(long *)((long)pvVar4 + 0x20) = (long)pvVar4 + 8; *(int8 *)((long)pvVar4 + 0x28) = 0; *(int1 *)((long)pvVar4 + 0x30) = 0; puVar5 = (int8 *) std:: map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> ::operator[]((map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> *)this,(char *)(*(long *)param_1 + param_2)); *puVar5 = pvVar4; } puVar5 = (int8 *) std:: map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> ::operator[]((map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> *)this,(char *)(*(long *)param_1 + param_2)); this = (Node *)*puVar5; } } ((map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>> *)this) [0x30] = (map<char,Trie::Node*,std::less<char>,std::allocator<std::pair<char_const,Trie::Node*>>>) 0x1; return; }
65,727
ac_psr_and
alca/libalca/parser.c
ac_expr *ac_psr_and(ac_parser *parser) { ac_expr *expr = ac_psr_or(parser); if (!expr) return NULL; while (MATCH(parser, TOKEN_AND)) { ac_token *op = ac_psr_previous_token(parser); ac_expr *right = ac_psr_or(parser); if (!right) { ac_expr_free_expression(expr); return NULL; } expr = ac_expr_new_binary(expr, op, right); } return expr; }
O0
c
ac_psr_and: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x7310 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0xab7a movq $0x0, -0x8(%rbp) jmp 0xabe9 jmp 0xab7c movq -0x10(%rbp), %rdi movl $0x2d, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movb $0x0, %al callq 0x7700 cmpl $0x0, %eax je 0xabe1 movq -0x10(%rbp), %rdi callq 0x7370 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x7310 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0xabca movq -0x18(%rbp), %rdi callq 0x7430 movq $0x0, -0x8(%rbp) jmp 0xabe9 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x7680 movq %rax, -0x18(%rbp) jmp 0xab7c movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ac_psr_and: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call _ac_psr_or mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_AB7A mov [rbp+var_8], 0 jmp short loc_ABE9 loc_AB7A: jmp short $+2 loc_AB7C: mov rdi, [rbp+var_10] mov esi, 2Dh ; '-' mov edx, 0FFFFFFFFh mov al, 0 call _ac_psr_match cmp eax, 0 jz short loc_ABE1 mov rdi, [rbp+var_10] call _ac_psr_previous_token mov [rbp+var_20], rax mov rdi, [rbp+var_10] call _ac_psr_or mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_ABCA mov rdi, [rbp+var_18] call _ac_expr_free_expression mov [rbp+var_8], 0 jmp short loc_ABE9 loc_ABCA: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call _ac_expr_new_binary mov [rbp+var_18], rax jmp short loc_AB7C loc_ABE1: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_ABE9: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ac_psr_and( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 char v26; // [rsp+0h] [rbp-30h] long long v27; // [rsp+8h] [rbp-28h] long long v28; // [rsp+10h] [rbp-20h] long long v29; // [rsp+18h] [rbp-18h] v29 = ac_psr_or(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( !v29 ) return 0LL; while ( (unsigned int)ac_psr_match(a1, 45LL, 0xFFFFFFFFLL, v14, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14, v26) ) { v28 = ac_psr_previous_token(a1); v27 = ac_psr_or(a1, 45LL, v19, v20, v21, v22, a7, a8, a9, a10, v23, v24, a13, a14); if ( !v27 ) { ac_expr_free_expression(v29); return 0LL; } v29 = ac_expr_new_binary(v29, v28, v27); } return v29; }
ac_psr_and: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107310 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0010ab7a MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010abe9 LAB_0010ab7a: JMP 0x0010ab7c LAB_0010ab7c: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2d MOV EDX,0xffffffff MOV AL,0x0 CALL 0x00107700 CMP EAX,0x0 JZ 0x0010abe1 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107370 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107310 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x0010abca MOV RDI,qword ptr [RBP + -0x18] CALL 0x00107430 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010abe9 LAB_0010abca: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x00107680 MOV qword ptr [RBP + -0x18],RAX JMP 0x0010ab7c LAB_0010abe1: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0010abe9: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long ac_psr_and(int8 param_1) { int iVar1; int8 uVar2; long lVar3; long local_20; long local_10; local_20 = ac_psr_or(param_1); if (local_20 == 0) { local_10 = 0; } else { while (iVar1 = ac_psr_match(param_1,0x2d,0xffffffff), iVar1 != 0) { uVar2 = ac_psr_previous_token(param_1); lVar3 = ac_psr_or(param_1); if (lVar3 == 0) { ac_expr_free_expression(local_20); return 0; } local_20 = ac_expr_new_binary(local_20,uVar2,lVar3); } local_10 = local_20; } return local_10; }
65,728
rapidcsv::Document::UpdateRowNames()
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
void UpdateRowNames() { mRowNames.clear(); if ((mLabelParams.mRowNameIdx >= 0) && (static_cast<int>(mData.size()) > (mLabelParams.mColumnNameIdx + 1))) { size_t i = 0; for (auto& dataRow : mData) { if (static_cast<int>(dataRow.size()) > mLabelParams.mRowNameIdx) { mRowNames[dataRow[static_cast<size_t>(mLabelParams.mRowNameIdx)]] = i++; } } } }
O1
c
rapidcsv::Document::UpdateRowNames(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xb0(%rdi), %r14 movq %r14, %rdi callq 0x1de24 cmpl $0x0, 0x24(%rbx) js 0x1e1ff movq 0x70(%rbx), %r15 movq 0x68(%rbx), %r12 movq %r15, %rax subq %r12, %rax sete %cl shrq $0x3, %rax movl 0x20(%rbx), %edx imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB incl %edx cmpl %eax, %edx setge %al orb %cl, %al jne 0x1e1ff xorl %r13d, %r13d movq (%r12), %rsi movq 0x8(%r12), %rcx subq %rsi, %rcx shrq $0x5, %rcx movslq 0x24(%rbx), %rax cmpl %ecx, %eax jge 0x1e1f6 leaq 0x1(%r13), %rbp shlq $0x5, %rax addq %rax, %rsi movq %r14, %rdi callq 0x1eb76 movq %r13, (%rax) movq %rbp, %r13 addq $0x18, %r12 cmpq %r15, %r12 jne 0x1e1c5 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8rapidcsv8Document14UpdateRowNamesEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r14, [rdi+0B0h] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE5clearEv; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::clear(void) cmp dword ptr [rbx+24h], 0 js short loc_1E1FF mov r15, [rbx+70h] mov r12, [rbx+68h] mov rax, r15 sub rax, r12 setz cl shr rax, 3 mov edx, [rbx+20h] imul eax, 0AAAAAAABh inc edx cmp edx, eax setnl al or al, cl jnz short loc_1E1FF xor r13d, r13d loc_1E1C5: mov rsi, [r12] mov rcx, [r12+8] sub rcx, rsi shr rcx, 5 movsxd rax, dword ptr [rbx+24h] cmp eax, ecx jge short loc_1E1F6 lea rbp, [r13+1] shl rax, 5 add rsi, rax mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r13 mov r13, rbp loc_1E1F6: add r12, 18h cmp r12, r15 jnz short loc_1E1C5 loc_1E1FF: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rapidcsv::Document::UpdateRowNames(rapidcsv::Document *this) { long long result; // rax char *v2; // r15 char *v3; // r12 long long v4; // r13 result = (long long)std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::clear((_QWORD *)this + 22); if ( *((int *)this + 9) >= 0 ) { v2 = (char *)*((_QWORD *)this + 14); v3 = (char *)*((_QWORD *)this + 13); result = -1431655765 * (unsigned int)((unsigned long long)(v2 - v3) >> 3); LOBYTE(result) = v2 == v3 || *((_DWORD *)this + 8) + 1 >= (int)result; if ( !(_BYTE)result ) { v4 = 0LL; do { result = *((int *)this + 9); if ( (int)result < (int)((*((_QWORD *)v3 + 1) - *(_QWORD *)v3) >> 5) ) { result = std::map<std::string,unsigned long>::operator[]((char *)this + 176, 32 * result + *(_QWORD *)v3); *(_QWORD *)result = v4++; } v3 += 24; } while ( v3 != v2 ); } } return result; }
UpdateRowNames: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0xb0] MOV RDI,R14 CALL 0x0011de24 CMP dword ptr [RBX + 0x24],0x0 JS 0x0011e1ff MOV R15,qword ptr [RBX + 0x70] MOV R12,qword ptr [RBX + 0x68] MOV RAX,R15 SUB RAX,R12 SETZ CL SHR RAX,0x3 MOV EDX,dword ptr [RBX + 0x20] IMUL EAX,EAX,-0x55555555 INC EDX CMP EDX,EAX SETGE AL OR AL,CL JNZ 0x0011e1ff XOR R13D,R13D LAB_0011e1c5: MOV RSI,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] SUB RCX,RSI SHR RCX,0x5 MOVSXD RAX,dword ptr [RBX + 0x24] CMP EAX,ECX JGE 0x0011e1f6 LEA RBP,[R13 + 0x1] SHL RAX,0x5 ADD RSI,RAX MOV RDI,R14 CALL 0x0011eb76 MOV qword ptr [RAX],R13 MOV R13,RBP LAB_0011e1f6: ADD R12,0x18 CMP R12,R15 JNZ 0x0011e1c5 LAB_0011e1ff: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* rapidcsv::Document::UpdateRowNames() */ void __thiscall rapidcsv::Document::UpdateRowNames(Document *this) { long *plVar1; int iVar2; ulong uVar3; long *plVar4; long *plVar5; long lVar6; long lVar7; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::clear((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(this + 0xb0)); if (-1 < *(int *)(this + 0x24)) { plVar1 = *(long **)(this + 0x70); plVar5 = *(long **)(this + 0x68); uVar3 = (long)plVar1 - (long)plVar5; iVar2 = (int)(uVar3 >> 3); if (SBORROW4(*(int *)(this + 0x20) + 1,iVar2 * -0x55555555) != *(int *)(this + 0x20) + 1 + iVar2 * 0x55555555 < 0 && uVar3 != 0) { lVar6 = 0; do { lVar7 = lVar6; if (*(int *)(this + 0x24) < (int)((ulong)(plVar5[1] - *plVar5) >> 5)) { lVar7 = lVar6 + 1; plVar4 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[]((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(this + 0xb0), (string *)(*plVar5 + (long)*(int *)(this + 0x24) * 0x20)); *plVar4 = lVar6; } plVar5 = plVar5 + 3; lVar6 = lVar7; } while (plVar5 != plVar1); } } return; }
65,729
rapidcsv::Document::UpdateRowNames()
Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h
void UpdateRowNames() { mRowNames.clear(); if ((mLabelParams.mRowNameIdx >= 0) && (static_cast<int>(mData.size()) > (mLabelParams.mColumnNameIdx + 1))) { size_t i = 0; for (auto& dataRow : mData) { if (static_cast<int>(dataRow.size()) > mLabelParams.mRowNameIdx) { mRowNames[dataRow[static_cast<size_t>(mLabelParams.mRowNameIdx)]] = i++; } } } }
O2
c
rapidcsv::Document::UpdateRowNames(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0xb0(%rdi), %r14 movq %r14, %rdi callq 0x18dba cmpl $0x0, 0x24(%rbx) js 0x19231 movq 0x70(%rbx), %r15 movq 0x68(%rbx), %r12 movq %r15, %rax subq %r12, %rax pushq $0x18 popq %rcx cqto idivq %rcx movl 0x20(%rbx), %ecx incl %ecx cmpl %eax, %ecx jge 0x19231 xorl %r13d, %r13d cmpq %r15, %r12 je 0x19231 movq (%r12), %rsi movq 0x8(%r12), %rcx subq %rsi, %rcx shrq $0x5, %rcx movslq 0x24(%rbx), %rax cmpl %ecx, %eax jge 0x1922b leaq 0x1(%r13), %rbp shlq $0x5, %rax addq %rax, %rsi movq %r14, %rdi callq 0x19b7a movq %r13, (%rax) movq %rbp, %r13 addq $0x18, %r12 jmp 0x191f5 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8rapidcsv8Document14UpdateRowNamesEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r14, [rdi+0B0h] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE5clearEv; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::clear(void) cmp dword ptr [rbx+24h], 0 js short loc_19231 mov r15, [rbx+70h] mov r12, [rbx+68h] mov rax, r15 sub rax, r12 push 18h pop rcx cqo idiv rcx mov ecx, [rbx+20h] inc ecx cmp ecx, eax jge short loc_19231 xor r13d, r13d loc_191F5: cmp r12, r15 jz short loc_19231 mov rsi, [r12] mov rcx, [r12+8] sub rcx, rsi shr rcx, 5 movsxd rax, dword ptr [rbx+24h] cmp eax, ecx jge short loc_1922B lea rbp, [r13+1] shl rax, 5 add rsi, rax mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r13 mov r13, rbp loc_1922B: add r12, 18h jmp short loc_191F5 loc_19231: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long rapidcsv::Document::UpdateRowNames(rapidcsv::Document *this) { long long result; // rax char *v2; // r15 char *v3; // r12 long long v4; // rdx long long v5; // r13 result = (long long)std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::clear((_QWORD *)this + 22); if ( *((int *)this + 9) >= 0 ) { v2 = (char *)*((_QWORD *)this + 14); v3 = (char *)*((_QWORD *)this + 13); result = (v2 - v3) / 24; v4 = (v2 - v3) % 24; if ( *((_DWORD *)this + 8) + 1 < (int)result ) { v5 = 0LL; while ( v3 != v2 ) { result = *((int *)this + 9); if ( (int)result < (int)((*((_QWORD *)v3 + 1) - *(_QWORD *)v3) >> 5) ) { result = std::map<std::string,unsigned long>::operator[]((char *)this + 176, 32 * result + *(_QWORD *)v3, v4); *(_QWORD *)result = v5++; } v3 += 24; } } } return result; }
UpdateRowNames: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RDI + 0xb0] MOV RDI,R14 CALL 0x00118dba CMP dword ptr [RBX + 0x24],0x0 JS 0x00119231 MOV R15,qword ptr [RBX + 0x70] MOV R12,qword ptr [RBX + 0x68] MOV RAX,R15 SUB RAX,R12 PUSH 0x18 POP RCX CQO IDIV RCX MOV ECX,dword ptr [RBX + 0x20] INC ECX CMP ECX,EAX JGE 0x00119231 XOR R13D,R13D LAB_001191f5: CMP R12,R15 JZ 0x00119231 MOV RSI,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] SUB RCX,RSI SHR RCX,0x5 MOVSXD RAX,dword ptr [RBX + 0x24] CMP EAX,ECX JGE 0x0011922b LEA RBP,[R13 + 0x1] SHL RAX,0x5 ADD RSI,RAX MOV RDI,R14 CALL 0x00119b7a MOV qword ptr [RAX],R13 MOV R13,RBP LAB_0011922b: ADD R12,0x18 JMP 0x001191f5 LAB_00119231: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* rapidcsv::Document::UpdateRowNames() */ void __thiscall rapidcsv::Document::UpdateRowNames(Document *this) { long *plVar1; long *plVar2; long *plVar3; long lVar4; long lVar5; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::clear((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(this + 0xb0)); if (-1 < *(int *)(this + 0x24)) { plVar1 = *(long **)(this + 0x70); plVar3 = *(long **)(this + 0x68); if (*(int *)(this + 0x20) + 1 < (int)(((long)plVar1 - (long)plVar3) / 0x18)) { lVar4 = 0; for (; plVar3 != plVar1; plVar3 = plVar3 + 3) { lVar5 = lVar4; if (*(int *)(this + 0x24) < (int)((ulong)(plVar3[1] - *plVar3) >> 5)) { lVar5 = lVar4 + 1; plVar2 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[]((map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)(this + 0xb0), (string *)(*plVar3 + (long)*(int *)(this + 0x24) * 0x20)); *plVar2 = lVar4; } lVar4 = lVar5; } } } return; }
65,730
my_getcputime
eloqsql/mysys/my_getsystime.c
ulonglong my_getcputime() { #ifdef CLOCK_THREAD_CPUTIME_ID struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #elif defined(__NR_clock_gettime) struct timespec tp; if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #endif /* CLOCK_THREAD_CPUTIME_ID */ return 0; }
O0
c
my_getcputime: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x3, %edi leaq -0x18(%rbp), %rsi callq 0x262d0 cmpl $0x0, %eax je 0x5cc95 movq $0x0, -0x8(%rbp) jmp 0x5ccbd imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x20(%rbp), %rax addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_getcputime: push rbp mov rbp, rsp sub rsp, 20h mov edi, 3 lea rsi, [rbp+var_18] call _clock_gettime cmp eax, 0 jz short loc_5CC95 mov [rbp+var_8], 0 jmp short loc_5CCBD loc_5CC95: imul rax, [rbp+var_18], 989680h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_20] add rax, rcx mov [rbp+var_8], rax loc_5CCBD: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
unsigned long long my_getcputime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] if ( (unsigned int)clock_gettime(3LL, &v1) ) return 0LL; else return v2 / 0x64 + 10000000 * v1; }
my_getcputime: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV EDI,0x3 LEA RSI,[RBP + -0x18] CALL 0x001262d0 CMP EAX,0x0 JZ 0x0015cc95 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015ccbd LAB_0015cc95: IMUL RAX,qword ptr [RBP + -0x18],0x989680 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0015ccbd: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long my_getcputime(void) { int iVar1; timespec local_20; long local_10; iVar1 = clock_gettime(3,&local_20); if (iVar1 == 0) { local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100; } else { local_10 = 0; } return local_10; }
65,731
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const
monkey531[P]llama/common/minja.hpp
bool peekSymbols(const std::vector<std::string> & symbols) const { for (const auto & symbol : symbols) { if (std::distance(it, end) >= (int64_t) symbol.size() && std::string(it, it + symbol.size()) == symbol) { return true; } } return false; }
O2
cpp
minja::Parser::peekSymbols(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rsi), %rbx movq 0x8(%rsi), %r12 leaq 0x18(%rsp), %r13 leaq 0x8(%rsp), %r15 cmpq %r12, %rbx je 0x7152f movq 0x18(%r14), %rax movq 0x20(%r14), %rsi subq %rsi, %rax movq 0x8(%rbx), %rdx cmpq %rdx, %rax jl 0x71529 addq %rsi, %rdx movq %r13, 0x8(%rsp) movq %r15, %rdi callq 0x5e288 movq %r15, %rdi movq %rbx, %rsi callq 0x46506 movl %eax, %ebp movq %r15, %rdi callq 0x25298 testb %bpl, %bpl jne 0x7152f addq $0x20, %rbx jmp 0x714e6 cmpq %r12, %rbx setne %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 r14, rdi mov rbx, [rsi] mov r12, [rsi+8] lea r13, [rsp+58h+var_40] lea r15, [rsp+58h+var_50] loc_714E6: cmp rbx, r12 jz short loc_7152F mov rax, [r14+18h] mov rsi, [r14+20h] sub rax, rsi mov rdx, [rbx+8] cmp rax, rdx jl short loc_71529 add rdx, rsi mov [rsp+58h+var_50], r13 mov rdi, r15 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 rdi, r15 mov rsi, rbx call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ mov ebp, eax mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7152F loc_71529: add rbx, 20h ; ' ' jmp short loc_714E6 loc_7152F: cmp rbx, r12 setnz al add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool minja::Parser::peekSymbols(long long a1, long long a2) { _QWORD *v2; // rbx _QWORD *v3; // r12 _BYTE *v4; // rsi long long v5; // rdx bool v6; // bp _QWORD v8[2]; // [rsp+8h] [rbp-50h] BYREF char v9; // [rsp+18h] [rbp-40h] BYREF v2 = *(_QWORD **)a2; v3 = *(_QWORD **)(a2 + 8); while ( v2 != v3 ) { v4 = *(_BYTE **)(a1 + 32); v5 = v2[1]; if ( *(_QWORD *)(a1 + 24) - (_QWORD)v4 >= v5 ) { v8[0] = &v9; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>( (long long)v8, v4, (long long)&v4[v5]); v6 = std::operator==<char>(v8, v2); std::string::~string(v8); if ( v6 ) break; } v2 += 4; } return v2 != v3; }
peekSymbols: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RBX,qword ptr [RSI] MOV R12,qword ptr [RSI + 0x8] LEA R13,[RSP + 0x18] LEA R15,[RSP + 0x8] LAB_001714e6: CMP RBX,R12 JZ 0x0017152f MOV RAX,qword ptr [R14 + 0x18] MOV RSI,qword ptr [R14 + 0x20] SUB RAX,RSI MOV RDX,qword ptr [RBX + 0x8] CMP RAX,RDX JL 0x00171529 ADD RDX,RSI MOV qword ptr [RSP + 0x8],R13 MOV RDI,R15 CALL 0x0015e288 MOV RDI,R15 MOV RSI,RBX CALL 0x00146506 MOV EBP,EAX MOV RDI,R15 CALL 0x00125298 TEST BPL,BPL JNZ 0x0017152f LAB_00171529: ADD RBX,0x20 JMP 0x001714e6 LAB_0017152f: CMP RBX,R12 SETNZ AL 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 */ bool __thiscall minja::Parser::peekSymbols(Parser *this,vector *param_1) { string *psVar1; long lVar2; char cVar3; string *psVar4; int1 *local_50 [2]; int1 local_40 [16]; psVar1 = *(string **)(param_1 + 8); for (psVar4 = *(string **)param_1; psVar4 != psVar1; psVar4 = psVar4 + 0x20) { lVar2 = *(long *)(this + 0x20); if (*(long *)(psVar4 + 8) <= *(long *)(this + 0x18) - lVar2) { local_50[0] = local_40; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> ((string *)local_50,lVar2,*(long *)(psVar4 + 8) + lVar2); cVar3 = std::operator==((string *)local_50,psVar4); std::__cxx11::string::~string((string *)local_50); if (cVar3 != '\0') break; } } return psVar4 != psVar1; }
65,732
my_strtoll10
eloqsql/strings/my_strtoll10.c
longlong my_strtoll10(const char *nptr, char **endptr, int *error) { const char *s, *end, *start, *n_end, *true_end; char *dummy; uchar c; unsigned long i, j, k; ulonglong li; int negative; ulong cutoff, cutoff2, cutoff3; s= nptr; /* If fixed length string */ if (endptr) { end= *endptr; /* Skip leading spaces */ for ( ; s < end && my_isspace(&my_charset_latin1, *s) ; ) s++; if (s == end) goto no_conv; } else { endptr= &dummy; /* Easier end test */ /* Skip leading spaces */ for ( ; ; s++) { if (!*s) goto no_conv; if (!my_isspace(&my_charset_latin1, *s)) break; } /* This number must be big to guard against a lot of pre-zeros */ end= s+65535; /* Can't be longer than this */ } /* Check for a sign. */ negative= 0; if (*s == '-') { *error= -1; /* Mark as negative number */ negative= 1; if (++s == end) goto no_conv; cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; cutoff3= MAX_NEGATIVE_NUMBER % 100; } else { *error= 0; if (*s == '+') { if (++s == end) goto no_conv; } cutoff= ULONGLONG_MAX / LFACTOR2; cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; cutoff3= ULONGLONG_MAX % 100; } /* Handle case where we have a lot of pre-zero */ if (*s == '0') { i= 0; do { if (++s == end) goto end_i; /* Return 0 */ } while (*s == '0'); n_end= s+ INIT_CNT; } else { /* Read first digit to check that it's a valid number */ if ((c= (*s-'0')) > 9) goto no_conv; i= c; n_end= ++s+ INIT_CNT-1; } /* Handle first 9 digits and store them in i */ if (n_end > end) n_end= end; for (; s != n_end ; s++) { if ((c= (*s-'0')) > 9) goto end_i; i= i*10+c; } if (s == end) goto end_i; /* Handle next 9 digits and store them in j */ j= 0; start= s; /* Used to know how much to shift i */ n_end= true_end= s + INIT_CNT; if (n_end > end) n_end= end; do { if ((c= (*s-'0')) > 9) goto end_i_and_j; j= j*10+c; } while (++s != n_end); if (s == end) { if (s != true_end) goto end_i_and_j; goto end3; } if ((c= (*s-'0')) > 9) goto end3; /* Handle the next 1 or 2 digits and store them in k */ k=c; if (++s == end || (c= (*s-'0')) > 9) goto end4; k= k*10+c; *endptr= (char*) ++s; /* number string should have ended here */ if (s != end && (c= (*s-'0')) <= 9) goto overflow; /* Check that we didn't get an overflow with the last digit */ if (i > cutoff || (i == cutoff && (j > cutoff2 || (j == cutoff2 && k > cutoff3)))) goto overflow; li=i*LFACTOR2+ (ulonglong) j*100 + k; return (longlong) li; overflow: /* *endptr is set here */ *error= MY_ERRNO_ERANGE; return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; end_i: *endptr= (char*) s; return (negative ? ((longlong) -(long) i) : (longlong) i); end_i_and_j: li= (ulonglong) i * lfactor[(uint) (s-start)] + j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end3: li=(ulonglong) i*LFACTOR+ (ulonglong) j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end4: li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; *endptr= (char*) s; if (negative) { if (li > MAX_NEGATIVE_NUMBER) goto overflow; return -((longlong) li); } return (longlong) li; no_conv: /* There was no number to convert. */ *error= MY_ERRNO_EDOM; *endptr= (char *) nptr; return 0; }
O3
c
my_strtoll10: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rsi, %rsi je 0x58d56 movq (%rsi), %r8 movq %rdi, %rax cmpq %rdi, %r8 jbe 0x58d46 leaq 0x2bca48(%rip), %rax # 0x315770 movq 0x40(%rax), %rcx movq %rdi, %rax movzbl (%rax), %r9d testb $0x8, 0x1(%rcx,%r9) je 0x58d46 incq %rax cmpq %r8, %rax jne 0x58d2f movq %r8, %rax cmpq %r8, %rax je 0x58e34 movb (%rax), %cl movq %r8, %rbx jmp 0x58da2 movb (%rdi), %cl leaq -0x30(%rbp), %rsi testb %cl, %cl je 0x58e34 leaq 0x2bca05(%rip), %rax # 0x315770 movq 0x40(%rax), %r8 leaq 0xffff(%rdi), %rbx movq %rdi, %rax movzbl %cl, %r9d testb $0x8, 0x1(%r8,%r9) je 0x58d97 movb 0x1(%rax), %cl incq %rax incq %rbx testb %cl, %cl jne 0x58d79 jmp 0x58e34 leaq 0xffff(%rax), %r8 leaq -0x30(%rbp), %rsi cmpb $0x2d, %cl jne 0x58dc9 movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF incq %rax cmpq %r8, %rax je 0x58e34 movl $0x8, %r9d movl $0x15f797ae, %r10d # imm = 0x15F797AE movl $0x57f5ff8, %r11d # imm = 0x57F5FF8 jmp 0x58df2 movl $0x0, (%rdx) movb (%rax), %r14b cmpb $0x2b, %r14b jne 0x58df7 incq %rax cmpq %r8, %rax je 0x58e34 movl $0xf, %r9d movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C movl $0xafebff0, %r11d # imm = 0xAFEBFF0 movb (%rax), %r14b jmp 0x58e09 movl $0xf, %r9d movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C movl $0xafebff0, %r11d # imm = 0xAFEBFF0 cmpb $0x30, %r14b jne 0x58e2a xorl %edi, %edi incq %rax cmpq %r8, %rax je 0x58f39 cmpb $0x30, (%rax) je 0x58e11 leaq 0x9(%rax), %rbx xorl %edi, %edi jmp 0x58e52 addb $-0x30, %r14b cmpb $0x9, %r14b jbe 0x58e44 movl $0x21, (%rdx) movq %rdi, (%rsi) xorl %eax, %eax jmp 0x58f49 movzbl %r14b, %edi movq %rax, %rbx incq %rax addq $0x9, %rbx cmpq %r8, %rbx cmovaq %r8, %rbx cmpq %rbx, %rax je 0x58e80 movb (%rax), %r14b addb $-0x30, %r14b cmpb $0x9, %r14b ja 0x58f36 leaq (%rdi,%rdi,4), %rdi movzbl %r14b, %r14d leaq (%r14,%rdi,2), %rdi incq %rax jmp 0x58e59 cmpq %r8, %rax je 0x58f36 leaq 0x9(%rax), %r12 cmpq %r8, %r12 cmovaq %r8, %r12 leaq 0x1(%rax), %r14 movl $0x9, %r13d xorl %ebx, %ebx movb -0x1(%r14), %r15b addb $-0x30, %r15b cmpb $0x9, %r15b ja 0x58f54 leaq (%rbx,%rbx,4), %rbx movzbl %r15b, %r15d leaq (%r15,%rbx,2), %rbx leaq 0x1(%r14), %r15 decq %r13 cmpq %r12, %r14 movq %r15, %r14 jne 0x58ea0 leaq -0x1(%r15), %r14 cmpq %r8, %r12 je 0x58f79 movb (%r14), %al addb $-0x30, %al cmpb $0x9, %al ja 0x58f7e movzbl %al, %r14d cmpq %r8, %r15 je 0x58efd movb (%r15), %al addb $-0x30, %al cmpb $0x9, %al jbe 0x58f9a movabsq $0x2540be400, %rax # imm = 0x2540BE400 imulq %rax, %rdi leaq (%rbx,%rbx,4), %rax leaq (%rdi,%rax,2), %rax addq %r14, %rax movq %r15, (%rsi) cmpb $0x2d, %cl jne 0x58f49 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 cmpq %rsi, %rax ja 0x58fd5 negq %rax jmp 0x58f49 movq %rax, %rbx movq %rdi, %rax negq %rax cmpb $0x2d, %cl movq %rbx, (%rsi) cmovneq %rdi, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq decq %r14 movl %r14d, %edx subl %eax, %edx leaq 0x28009d(%rip), %rax # 0x2d9000 imulq (%rax,%rdx,8), %rdi addq %rbx, %rdi movq %rdi, %rax negq %rax cmpb $0x2d, %cl movq %r14, (%rsi) jmp 0x58f45 testq %r13, %r13 jne 0x58f57 imulq $0x3b9aca00, %rdi, %rax # imm = 0x3B9ACA00 addq %rax, %rbx movq %rbx, %rax negq %rax cmpb $0x2d, %cl movq %r14, (%rsi) cmovneq %rbx, %rax jmp 0x58f49 leaq 0x1(%r15), %r12 movq %r12, (%rsi) cmpq %r8, %r12 je 0x58fb4 movb 0x1(%r15), %sil addb $-0x30, %sil cmpb $0xa, %sil jb 0x58fd5 cmpq %r11, %rdi ja 0x58fd5 leaq (%r14,%r14,4), %rsi movzbl %al, %eax leaq (%rax,%rsi,2), %rsi cmpq %r11, %rdi jne 0x58ff0 cmpq %r10, %rbx ja 0x58fd5 jne 0x58ff0 cmpl %r9d, %esi jbe 0x58ff0 xorl %eax, %eax cmpb $0x2d, %cl setne %al movl $0x22, (%rdx) negq %rax btsq $0x3f, %rax jmp 0x58f49 movabsq $0x174876e800, %rax # imm = 0x174876E800 imulq %rax, %rdi imulq $0x64, %rbx, %rax addq %rdi, %rax addq %rsi, %rax jmp 0x58f49 nopl (%rax)
my_strtoll10: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx test rsi, rsi jz short loc_58D56 mov r8, [rsi] mov rax, rdi cmp r8, rdi jbe short loc_58D46 lea rax, my_charset_latin1 mov rcx, [rax+40h] mov rax, rdi loc_58D2F: movzx r9d, byte ptr [rax] test byte ptr [rcx+r9+1], 8 jz short loc_58D46 inc rax cmp rax, r8 jnz short loc_58D2F mov rax, r8 loc_58D46: cmp rax, r8 jz loc_58E34 mov cl, [rax] mov rbx, r8 jmp short loc_58DA2 loc_58D56: mov cl, [rdi] lea rsi, [rbp+var_30] test cl, cl jz loc_58E34 lea rax, my_charset_latin1 mov r8, [rax+40h] lea rbx, [rdi+0FFFFh] mov rax, rdi loc_58D79: movzx r9d, cl test byte ptr [r8+r9+1], 8 jz short loc_58D97 mov cl, [rax+1] inc rax inc rbx test cl, cl jnz short loc_58D79 jmp loc_58E34 loc_58D97: lea r8, [rax+0FFFFh] lea rsi, [rbp+var_30] loc_58DA2: cmp cl, 2Dh ; '-' jnz short loc_58DC9 mov dword ptr [rdx], 0FFFFFFFFh inc rax cmp rax, r8 jz short loc_58E34 mov r9d, 8 mov r10d, 15F797AEh mov r11d, 57F5FF8h jmp short loc_58DF2 loc_58DC9: mov dword ptr [rdx], 0 mov r14b, [rax] cmp r14b, 2Bh ; '+' jnz short loc_58DF7 inc rax cmp rax, r8 jz short loc_58E34 mov r9d, 0Fh mov r10d, 2BEF2F5Ch mov r11d, 0AFEBFF0h loc_58DF2: mov r14b, [rax] jmp short loc_58E09 loc_58DF7: mov r9d, 0Fh mov r10d, 2BEF2F5Ch mov r11d, 0AFEBFF0h loc_58E09: cmp r14b, 30h ; '0' jnz short loc_58E2A xor edi, edi loc_58E11: inc rax cmp rax, r8 jz loc_58F39 cmp byte ptr [rax], 30h ; '0' jz short loc_58E11 lea rbx, [rax+9] xor edi, edi jmp short loc_58E52 loc_58E2A: add r14b, 0D0h cmp r14b, 9 jbe short loc_58E44 loc_58E34: mov dword ptr [rdx], 21h ; '!' mov [rsi], rdi xor eax, eax jmp loc_58F49 loc_58E44: movzx edi, r14b mov rbx, rax inc rax add rbx, 9 loc_58E52: cmp rbx, r8 cmova rbx, r8 loc_58E59: cmp rax, rbx jz short loc_58E80 mov r14b, [rax] add r14b, 0D0h cmp r14b, 9 ja loc_58F36 lea rdi, [rdi+rdi*4] movzx r14d, r14b lea rdi, [r14+rdi*2] inc rax jmp short loc_58E59 loc_58E80: cmp rax, r8 jz loc_58F36 lea r12, [rax+9] cmp r12, r8 cmova r12, r8 lea r14, [rax+1] mov r13d, 9 xor ebx, ebx loc_58EA0: mov r15b, [r14-1] add r15b, 0D0h cmp r15b, 9 ja loc_58F54 lea rbx, [rbx+rbx*4] movzx r15d, r15b lea rbx, [r15+rbx*2] lea r15, [r14+1] dec r13 cmp r14, r12 mov r14, r15 jnz short loc_58EA0 lea r14, [r15-1] cmp r12, r8 jz loc_58F79 mov al, [r14] add al, 0D0h cmp al, 9 ja loc_58F7E movzx r14d, al cmp r15, r8 jz short loc_58EFD mov al, [r15] add al, 0D0h cmp al, 9 jbe loc_58F9A loc_58EFD: mov rax, 2540BE400h imul rdi, rax lea rax, [rbx+rbx*4] lea rax, [rdi+rax*2] add rax, r14 mov [rsi], r15 cmp cl, 2Dh ; '-' jnz short loc_58F49 mov rsi, 8000000000000000h cmp rax, rsi ja loc_58FD5 neg rax jmp short loc_58F49 loc_58F36: mov rbx, rax loc_58F39: mov rax, rdi neg rax cmp cl, 2Dh ; '-' mov [rsi], rbx loc_58F45: cmovnz rax, rdi loc_58F49: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_58F54: dec r14 loc_58F57: mov edx, r14d sub edx, eax lea rax, lfactor_0 imul rdi, [rax+rdx*8] add rdi, rbx mov rax, rdi neg rax cmp cl, 2Dh ; '-' mov [rsi], r14 jmp short loc_58F45 loc_58F79: test r13, r13 jnz short loc_58F57 loc_58F7E: imul rax, rdi, 3B9ACA00h add rbx, rax mov rax, rbx neg rax cmp cl, 2Dh ; '-' mov [rsi], r14 cmovnz rax, rbx jmp short loc_58F49 loc_58F9A: lea r12, [r15+1] mov [rsi], r12 cmp r12, r8 jz short loc_58FB4 mov sil, [r15+1] add sil, 0D0h cmp sil, 0Ah jb short loc_58FD5 loc_58FB4: cmp rdi, r11 ja short loc_58FD5 lea rsi, [r14+r14*4] movzx eax, al lea rsi, [rax+rsi*2] cmp rdi, r11 jnz short loc_58FF0 cmp rbx, r10 ja short loc_58FD5 jnz short loc_58FF0 cmp esi, r9d jbe short loc_58FF0 loc_58FD5: xor eax, eax cmp cl, 2Dh ; '-' setnz al mov dword ptr [rdx], 22h ; '"' neg rax bts rax, 3Fh ; '?' jmp loc_58F49 loc_58FF0: mov rax, 174876E800h imul rdi, rax imul rax, rbx, 64h ; 'd' add rax, rdi add rax, rsi jmp loc_58F49
unsigned long long my_strtoll10(unsigned __int8 *a1, unsigned long long *a2, _DWORD *a3) { unsigned long long v3; // r8 unsigned __int8 *v4; // rax unsigned __int8 v5; // cl _BYTE *v6; // rbx unsigned int v7; // r9d unsigned long long v8; // r10 unsigned long long v9; // r11 unsigned __int8 v10; // r14 unsigned long long v11; // rdi unsigned __int8 *v12; // rbx unsigned __int8 v13; // r14 unsigned long long result; // rax unsigned __int8 *v15; // rbx unsigned __int8 v16; // r14 unsigned __int8 *v17; // r12 unsigned __int8 *v18; // r14 long long v19; // r13 unsigned long long v20; // rbx unsigned __int8 v21; // r15 _BYTE *v22; // r15 unsigned __int8 *v23; // r14 unsigned __int8 v24; // al long long v25; // r14 unsigned __int8 v26; // al bool v27; // zf unsigned long long v28; // rbx long long v29; // rsi _BYTE v30[48]; // [rsp+0h] [rbp-30h] BYREF if ( a2 ) { v3 = *a2; v4 = a1; if ( *a2 > (unsigned long long)a1 ) { v4 = a1; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *v4 + 1LL) & 8) != 0 ) { if ( ++v4 == (unsigned __int8 *)v3 ) { v4 = (unsigned __int8 *)*a2; break; } } } if ( v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v5 = *v4; v6 = (_BYTE *)*a2; } else { v5 = *a1; a2 = (unsigned long long *)v30; if ( !*a1 ) goto LABEL_29; v6 = a1 + 0xFFFF; v4 = a1; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v5 + 1LL) & 8) != 0 ) { v5 = *++v4; ++v6; if ( !v5 ) goto LABEL_29; } v3 = (unsigned long long)(v4 + 0xFFFF); a2 = (unsigned long long *)v30; } if ( v5 == 45 ) { *a3 = -1; if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v7 = 8; v8 = 368547758LL; v9 = 92233720LL; goto LABEL_21; } *a3 = 0; v10 = *v4; if ( *v4 == 43 ) { if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v7 = 15; v8 = 737095516LL; v9 = 184467440LL; LABEL_21: v10 = *v4; goto LABEL_23; } v7 = 15; v8 = 737095516LL; v9 = 184467440LL; LABEL_23: if ( v10 != 48 ) { v13 = v10 - 48; if ( v13 <= 9u ) { v11 = v13; v15 = v4++; v12 = v15 + 9; goto LABEL_31; } LABEL_29: *a3 = 33; *a2 = (unsigned long long)a1; return 0LL; } v11 = 0LL; do { if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_50; } while ( *v4 == 48 ); v12 = v4 + 9; v11 = 0LL; LABEL_31: if ( (unsigned long long)v12 > v3 ) v12 = (unsigned __int8 *)v3; while ( v4 != v12 ) { v16 = *v4 - 48; if ( v16 > 9u ) goto LABEL_49; v11 = v16 + 10 * v11; ++v4; } if ( v4 == (unsigned __int8 *)v3 ) { LABEL_49: v6 = v4; LABEL_50: result = -(long long)v11; v27 = v5 == 45; *a2 = (unsigned long long)v6; LABEL_51: if ( !v27 ) return v11; return result; } v17 = v4 + 9; if ( (unsigned long long)(v4 + 9) > v3 ) v17 = (unsigned __int8 *)v3; v18 = v4 + 1; v19 = 9LL; v20 = 0LL; do { v21 = *(v18 - 1) - 48; if ( v21 > 9u ) { v23 = v18 - 1; goto LABEL_55; } v20 = v21 + 10 * v20; v22 = v18 + 1; --v19; v27 = v18++ == v17; } while ( !v27 ); v23 = v22 - 1; if ( v17 == (unsigned __int8 *)v3 ) { if ( !v19 ) { LABEL_57: v28 = 1000000000 * v11 + v20; result = -(long long)v28; *a2 = (unsigned long long)v23; if ( v5 != 45 ) return v28; return result; } LABEL_55: v11 = v20 + lfactor_0[(int)v23 - (int)v4] * v11; result = -(long long)v11; v27 = v5 == 45; *a2 = (unsigned long long)v23; goto LABEL_51; } v24 = *v23 - 48; if ( v24 > 9u ) goto LABEL_57; v25 = v24; if ( v22 == (_BYTE *)v3 || (v26 = *v22 - 48, v26 > 9u) ) { result = v25 + 10000000000LL * v11 + 10 * v20; *a2 = (unsigned long long)v22; if ( v5 != 45 ) return result; if ( result <= 0x8000000000000000LL ) return -(long long)result; LABEL_67: *a3 = 34; return -(long long)(v5 != 45) | 0x8000000000000000LL; } else { *a2 = (unsigned long long)(v22 + 1); if ( v22 + 1 != (_BYTE *)v3 && (unsigned __int8)(v22[1] - 48) < 0xAu ) goto LABEL_67; if ( v11 > v9 ) goto LABEL_67; v29 = v26 + 10 * v25; if ( v11 == v9 && (v20 > v8 || v20 == v8 && (unsigned int)v29 > v7) ) goto LABEL_67; return v29 + 100000000000LL * v11 + 100 * v20; } }
my_strtoll10: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RSI,RSI JZ 0x00158d56 MOV R8,qword ptr [RSI] MOV RAX,RDI CMP R8,RDI JBE 0x00158d46 LEA RAX,[0x415770] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,RDI LAB_00158d2f: MOVZX R9D,byte ptr [RAX] TEST byte ptr [RCX + R9*0x1 + 0x1],0x8 JZ 0x00158d46 INC RAX CMP RAX,R8 JNZ 0x00158d2f MOV RAX,R8 LAB_00158d46: CMP RAX,R8 JZ 0x00158e34 MOV CL,byte ptr [RAX] MOV RBX,R8 JMP 0x00158da2 LAB_00158d56: MOV CL,byte ptr [RDI] LEA RSI,[RBP + -0x30] TEST CL,CL JZ 0x00158e34 LEA RAX,[0x415770] MOV R8,qword ptr [RAX + 0x40] LEA RBX,[RDI + 0xffff] MOV RAX,RDI LAB_00158d79: MOVZX R9D,CL TEST byte ptr [R8 + R9*0x1 + 0x1],0x8 JZ 0x00158d97 MOV CL,byte ptr [RAX + 0x1] INC RAX INC RBX TEST CL,CL JNZ 0x00158d79 JMP 0x00158e34 LAB_00158d97: LEA R8,[RAX + 0xffff] LEA RSI,[RBP + -0x30] LAB_00158da2: CMP CL,0x2d JNZ 0x00158dc9 MOV dword ptr [RDX],0xffffffff INC RAX CMP RAX,R8 JZ 0x00158e34 MOV R9D,0x8 MOV R10D,0x15f797ae MOV R11D,0x57f5ff8 JMP 0x00158df2 LAB_00158dc9: MOV dword ptr [RDX],0x0 MOV R14B,byte ptr [RAX] CMP R14B,0x2b JNZ 0x00158df7 INC RAX CMP RAX,R8 JZ 0x00158e34 MOV R9D,0xf MOV R10D,0x2bef2f5c MOV R11D,0xafebff0 LAB_00158df2: MOV R14B,byte ptr [RAX] JMP 0x00158e09 LAB_00158df7: MOV R9D,0xf MOV R10D,0x2bef2f5c MOV R11D,0xafebff0 LAB_00158e09: CMP R14B,0x30 JNZ 0x00158e2a XOR EDI,EDI LAB_00158e11: INC RAX CMP RAX,R8 JZ 0x00158f39 CMP byte ptr [RAX],0x30 JZ 0x00158e11 LEA RBX,[RAX + 0x9] XOR EDI,EDI JMP 0x00158e52 LAB_00158e2a: ADD R14B,0xd0 CMP R14B,0x9 JBE 0x00158e44 LAB_00158e34: MOV dword ptr [RDX],0x21 MOV qword ptr [RSI],RDI XOR EAX,EAX JMP 0x00158f49 LAB_00158e44: MOVZX EDI,R14B MOV RBX,RAX INC RAX ADD RBX,0x9 LAB_00158e52: CMP RBX,R8 CMOVA RBX,R8 LAB_00158e59: CMP RAX,RBX JZ 0x00158e80 MOV R14B,byte ptr [RAX] ADD R14B,0xd0 CMP R14B,0x9 JA 0x00158f36 LEA RDI,[RDI + RDI*0x4] MOVZX R14D,R14B LEA RDI,[R14 + RDI*0x2] INC RAX JMP 0x00158e59 LAB_00158e80: CMP RAX,R8 JZ 0x00158f36 LEA R12,[RAX + 0x9] CMP R12,R8 CMOVA R12,R8 LEA R14,[RAX + 0x1] MOV R13D,0x9 XOR EBX,EBX LAB_00158ea0: MOV R15B,byte ptr [R14 + -0x1] ADD R15B,0xd0 CMP R15B,0x9 JA 0x00158f54 LEA RBX,[RBX + RBX*0x4] MOVZX R15D,R15B LEA RBX,[R15 + RBX*0x2] LEA R15,[R14 + 0x1] DEC R13 CMP R14,R12 MOV R14,R15 JNZ 0x00158ea0 LEA R14,[R15 + -0x1] CMP R12,R8 JZ 0x00158f79 MOV AL,byte ptr [R14] ADD AL,0xd0 CMP AL,0x9 JA 0x00158f7e MOVZX R14D,AL CMP R15,R8 JZ 0x00158efd MOV AL,byte ptr [R15] ADD AL,0xd0 CMP AL,0x9 JBE 0x00158f9a LAB_00158efd: MOV RAX,0x2540be400 IMUL RDI,RAX LEA RAX,[RBX + RBX*0x4] LEA RAX,[RDI + RAX*0x2] ADD RAX,R14 MOV qword ptr [RSI],R15 CMP CL,0x2d JNZ 0x00158f49 MOV RSI,-0x8000000000000000 CMP RAX,RSI JA 0x00158fd5 NEG RAX JMP 0x00158f49 LAB_00158f36: MOV RBX,RAX LAB_00158f39: MOV RAX,RDI NEG RAX CMP CL,0x2d MOV qword ptr [RSI],RBX LAB_00158f45: CMOVNZ RAX,RDI LAB_00158f49: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00158f54: DEC R14 LAB_00158f57: MOV EDX,R14D SUB EDX,EAX LEA RAX,[0x3d9000] IMUL RDI,qword ptr [RAX + RDX*0x8] ADD RDI,RBX MOV RAX,RDI NEG RAX CMP CL,0x2d MOV qword ptr [RSI],R14 JMP 0x00158f45 LAB_00158f79: TEST R13,R13 JNZ 0x00158f57 LAB_00158f7e: IMUL RAX,RDI,0x3b9aca00 ADD RBX,RAX MOV RAX,RBX NEG RAX CMP CL,0x2d MOV qword ptr [RSI],R14 CMOVNZ RAX,RBX JMP 0x00158f49 LAB_00158f9a: LEA R12,[R15 + 0x1] MOV qword ptr [RSI],R12 CMP R12,R8 JZ 0x00158fb4 MOV SIL,byte ptr [R15 + 0x1] ADD SIL,0xd0 CMP SIL,0xa JC 0x00158fd5 LAB_00158fb4: CMP RDI,R11 JA 0x00158fd5 LEA RSI,[R14 + R14*0x4] MOVZX EAX,AL LEA RSI,[RAX + RSI*0x2] CMP RDI,R11 JNZ 0x00158ff0 CMP RBX,R10 JA 0x00158fd5 JNZ 0x00158ff0 CMP ESI,R9D JBE 0x00158ff0 LAB_00158fd5: XOR EAX,EAX CMP CL,0x2d SETNZ AL MOV dword ptr [RDX],0x22 NEG RAX BTS RAX,0x3f JMP 0x00158f49 LAB_00158ff0: MOV RAX,0x174876e800 IMUL RDI,RAX IMUL RAX,RBX,0x64 ADD RAX,RDI ADD RAX,RSI JMP 0x00158f49
ulong my_strtoll10(byte *param_1,ulong *param_2,int4 *param_3) { byte bVar1; byte bVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; byte bVar6; byte *pbVar7; ulong uVar8; ulong uVar9; uint uVar10; ulong uVar11; ulong uVar12; long lVar13; byte *pbVar14; ulong local_38; pbVar4 = param_1; if (param_2 == (ulong *)0x0) { bVar6 = *param_1; param_2 = &local_38; if (bVar6 != 0) { pbVar7 = param_1 + 0xffff; do { if ((PTR_ctype_latin1_004157b0[(ulong)bVar6 + 1] & 8) == 0) { pbVar3 = pbVar4 + 0xffff; param_2 = &local_38; goto LAB_00158da2; } bVar6 = pbVar4[1]; pbVar4 = pbVar4 + 1; pbVar7 = pbVar7 + 1; } while (bVar6 != 0); } goto LAB_00158e34; } pbVar7 = (byte *)*param_2; pbVar3 = param_1; if (param_1 < pbVar7) { do { pbVar4 = pbVar3; if ((PTR_ctype_latin1_004157b0[(ulong)*pbVar3 + 1] & 8) == 0) break; pbVar3 = pbVar3 + 1; pbVar4 = pbVar7; } while (pbVar3 != pbVar7); } if (pbVar4 == pbVar7) goto LAB_00158e34; bVar6 = *pbVar4; pbVar3 = pbVar7; LAB_00158da2: if (bVar6 == 0x2d) { *param_3 = 0xffffffff; if (pbVar4 + 1 == pbVar3) goto LAB_00158e34; uVar10 = 8; uVar11 = 0x15f797ae; uVar12 = 0x57f5ff8; LAB_00158df2: pbVar4 = pbVar4 + 1; bVar2 = *pbVar4; } else { *param_3 = 0; bVar2 = *pbVar4; if (bVar2 == 0x2b) { if (pbVar4 + 1 == pbVar3) goto LAB_00158e34; uVar10 = 0xf; uVar11 = 0x2bef2f5c; uVar12 = 0xafebff0; goto LAB_00158df2; } uVar10 = 0xf; uVar11 = 0x2bef2f5c; uVar12 = 0xafebff0; } if (bVar2 == 0x30) { uVar9 = 0; do { pbVar14 = pbVar4; pbVar5 = pbVar14 + 1; if (pbVar5 == pbVar3) goto LAB_00158f39; pbVar4 = pbVar5; } while (*pbVar5 == 0x30); pbVar14 = pbVar14 + 10; uVar9 = 0; } else { if (9 < (byte)(bVar2 - 0x30)) { LAB_00158e34: *param_3 = 0x21; *param_2 = (ulong)param_1; return 0; } uVar9 = (ulong)(byte)(bVar2 - 0x30); pbVar5 = pbVar4 + 1; pbVar14 = pbVar4 + 9; } if (pbVar3 < pbVar14) { pbVar14 = pbVar3; } for (; pbVar7 = pbVar5, pbVar5 != pbVar14; pbVar5 = pbVar5 + 1) { if (9 < (byte)(*pbVar5 - 0x30)) goto LAB_00158f39; uVar9 = (ulong)(byte)(*pbVar5 - 0x30) + uVar9 * 10; } if (pbVar5 != pbVar3) { pbVar4 = pbVar5 + 9; if (pbVar3 < pbVar5 + 9) { pbVar4 = pbVar3; } lVar13 = 9; uVar8 = 0; pbVar7 = pbVar5 + 1; do { pbVar14 = pbVar7; if (9 < (byte)(pbVar14[-1] - 0x30)) { pbVar14 = pbVar14 + -1; goto LAB_00158f57; } uVar8 = (ulong)(byte)(pbVar14[-1] - 0x30) + uVar8 * 10; pbVar7 = pbVar14 + 1; lVar13 = lVar13 + -1; } while (pbVar14 != pbVar4); if (pbVar4 == pbVar3) { if (lVar13 != 0) { LAB_00158f57: uVar9 = uVar9 * (&lfactor)[(uint)((int)pbVar14 - (int)pbVar5)] + uVar8; *param_2 = (ulong)pbVar14; goto LAB_00158f45; } } else { bVar2 = *pbVar14 - 0x30; if (bVar2 < 10) { if ((pbVar7 == pbVar3) || (bVar1 = *pbVar7, 9 < (byte)(bVar1 - 0x30))) { uVar11 = uVar9 * 10000000000 + uVar8 * 10 + (ulong)bVar2; *param_2 = (ulong)pbVar7; if (bVar6 != 0x2d) { return uVar11; } if (uVar11 < 0x8000000000000001) { return -uVar11; } } else { *param_2 = (ulong)(pbVar14 + 2); if ((((pbVar14 + 2 == pbVar3) || (9 < (byte)(pbVar14[2] - 0x30))) && (uVar9 <= uVar12)) && ((lVar13 = (ulong)(byte)(bVar1 - 0x30) + (ulong)bVar2 * 10, uVar9 != uVar12 || ((uVar8 <= uVar11 && ((uVar8 != uVar11 || ((uint)lVar13 <= uVar10)))))))) { return uVar8 * 100 + uVar9 * 100000000000 + lVar13; } } *param_3 = 0x22; return -(ulong)(bVar6 != 0x2d) | 0x8000000000000000; } } uVar8 = uVar8 + uVar9 * 1000000000; *param_2 = (ulong)pbVar14; if (bVar6 == 0x2d) { return -uVar8; } return uVar8; } LAB_00158f39: *param_2 = (ulong)pbVar7; LAB_00158f45: if (bVar6 == 0x2d) { return -uVar9; } return uVar9; }
65,733
google::protobuf::ServiceDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
uint8_t* ServiceDescriptorProto::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ServiceDescriptorProto) uint32_t cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.ServiceDescriptorProto.name"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name(), target); } // repeated .google.protobuf.MethodDescriptorProto method = 2; for (unsigned i = 0, n = static_cast<unsigned>(this->_internal_method_size()); i < n; i++) { const auto& repfield = this->_internal_method(i); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); } // optional .google.protobuf.ServiceOptions options = 3; if (cached_has_bits & 0x00000002u) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(3, _Internal::options(this), _Internal::options(this).GetCachedSize(), target, stream); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ServiceDescriptorProto) return target; }
O0
cpp
google::protobuf::ServiceDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const: subq $0xa8, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x0, 0x44(%rsp) addq $0x10, %rax movq %rax, 0x90(%rsp) movl $0x0, 0x8c(%rsp) movq 0x90(%rsp), %rax movslq 0x8c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xba163 movq 0x28(%rsp), %rdi callq 0x88b20 movq %rax, %rdi callq 0x174a0 movq 0x28(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0x88b20 movq %rax, %rdi callq 0x14810 movq 0x18(%rsp), %rdi movl %eax, %esi movl $0x1, %edx leaq 0x136b8c(%rip), %rcx # 0x1f0cba callq 0xd5100 movq 0x28(%rsp), %rdi movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) callq 0x88b20 movq 0x20(%rsp), %rdi movq %rax, %rdx movq 0x50(%rsp), %rcx movl $0x1, %esi callq 0xd5120 movq %rax, 0x50(%rsp) movq 0x28(%rsp), %rdi movl $0x0, 0x40(%rsp) callq 0x88b50 movl %eax, 0x3c(%rsp) movl 0x40(%rsp), %eax cmpl 0x3c(%rsp), %eax jae 0xba1d7 movq 0x28(%rsp), %rdi movl 0x40(%rsp), %esi callq 0x88b70 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x30(%rsp), %rdi callq 0xd8a60 movq 0x10(%rsp), %rsi movl %eax, %edx movq 0x50(%rsp), %rcx movq 0x48(%rsp), %r8 movl $0x2, %edi callq 0x1d88f0 movq %rax, 0x50(%rsp) movl 0x40(%rsp), %eax addl $0x1, %eax movl %eax, 0x40(%rsp) jmp 0xba179 movl 0x44(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xba224 movq 0x28(%rsp), %rdi callq 0xb9690 movq 0x28(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xb9690 movq %rax, %rdi callq 0xd8a80 movq 0x8(%rsp), %rsi movl %eax, %edx movq 0x50(%rsp), %rcx movq 0x48(%rsp), %r8 movl $0x3, %edi callq 0x1d88f0 movq %rax, 0x50(%rsp) movq 0x28(%rsp), %rax addq $0x8, %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xba2de movq 0x28(%rsp), %rax addq $0x8, %rax movq %rax, 0x70(%rsp) leaq 0xa8883(%rip), %rax # 0x162af0 movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rax movq %rax, (%rsp) movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x98(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xba2bc movq (%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0x78(%rsp) jmp 0xba2c5 callq *0x68(%rsp) movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x1672d0 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax addq $0xa8, %rsp retq nopl (%rax,%rax)
_ZNK6google8protobuf22ServiceDescriptorProto18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE: sub rsp, 0A8h mov [rsp+0A8h+var_50], rdi mov [rsp+0A8h+var_58], rsi mov [rsp+0A8h+var_60], rdx mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_80], rax mov [rsp+0A8h+var_64], 0 add rax, 10h mov [rsp+0A8h+var_18], rax mov [rsp+0A8h+var_1C], 0 mov rax, [rsp+0A8h+var_18] movsxd rcx, [rsp+0A8h+var_1C] mov eax, [rax+rcx*4] mov [rsp+0A8h+var_64], eax mov eax, [rsp+0A8h+var_64] and eax, 1 cmp eax, 0 jz short loc_BA163 mov rdi, [rsp+0A8h+var_80] call _ZNK6google8protobuf22ServiceDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::ServiceDescriptorProto::_internal_name(void) mov rdi, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void) mov rdi, [rsp+0A8h+var_80] mov [rsp+0A8h+var_90], rax call _ZNK6google8protobuf22ServiceDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::ServiceDescriptorProto::_internal_name(void) mov rdi, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+0A8h+var_90] mov esi, eax mov edx, 1 lea rcx, aGoogleProtobuf_42; "google.protobuf.ServiceDescriptorProto."... call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*) mov rdi, [rsp+0A8h+var_80] mov rax, [rsp+0A8h+var_60] mov [rsp+0A8h+var_88], rax call _ZNK6google8protobuf22ServiceDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::ServiceDescriptorProto::_internal_name(void) mov rdi, [rsp+0A8h+var_88] mov rdx, rax mov rcx, [rsp+0A8h+var_58] mov esi, (offset dword_0+1); google::protobuf::ServiceDescriptorProto * call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov [rsp+0A8h+var_58], rax loc_BA163: mov rdi, [rsp+0A8h+var_80]; this mov [rsp+0A8h+var_68], 0 call _ZNK6google8protobuf22ServiceDescriptorProto21_internal_method_sizeEv; google::protobuf::ServiceDescriptorProto::_internal_method_size(void) mov [rsp+0A8h+var_6C], eax loc_BA179: mov eax, [rsp+0A8h+var_68] cmp eax, [rsp+0A8h+var_6C] jnb short loc_BA1D7 mov rdi, [rsp+0A8h+var_80]; this mov esi, [rsp+0A8h+var_68]; int call _ZNK6google8protobuf22ServiceDescriptorProto16_internal_methodEi; google::protobuf::ServiceDescriptorProto::_internal_method(int) mov [rsp+0A8h+var_78], rax mov rax, [rsp+0A8h+var_78] mov qword ptr [rsp+0A8h+var_98], rax mov rdi, [rsp+0A8h+var_78]; this call _ZNK6google8protobuf21MethodDescriptorProto13GetCachedSizeEv; google::protobuf::MethodDescriptorProto::GetCachedSize(void) mov rsi, qword ptr [rsp+0A8h+var_98]; int mov edx, eax; google::protobuf::MessageLite * mov rcx, [rsp+0A8h+var_58]; int mov r8, [rsp+0A8h+var_60]; unsigned __int8 * mov edi, (offset dword_0+2); this call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+0A8h+var_58], rax mov eax, [rsp+0A8h+var_68] add eax, 1 mov [rsp+0A8h+var_68], eax jmp short loc_BA179 loc_BA1D7: mov eax, [rsp+0A8h+var_64] and eax, 2 cmp eax, 0 jz short loc_BA224 mov rdi, [rsp+0A8h+var_80]; this call _ZN6google8protobuf22ServiceDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::ServiceDescriptorProto::_Internal::options(google::protobuf::ServiceDescriptorProto const*) mov rdi, [rsp+0A8h+var_80]; this mov qword ptr [rsp+0A8h+var_A0], rax call _ZN6google8protobuf22ServiceDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::ServiceDescriptorProto::_Internal::options(google::protobuf::ServiceDescriptorProto const*) mov rdi, rax; this call _ZNK6google8protobuf14ServiceOptions13GetCachedSizeEv; google::protobuf::ServiceOptions::GetCachedSize(void) mov rsi, qword ptr [rsp+0A8h+var_A0]; int mov edx, eax; google::protobuf::MessageLite * mov rcx, [rsp+0A8h+var_58]; int mov r8, [rsp+0A8h+var_60]; unsigned __int8 * mov edi, (offset dword_0+3); this call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+0A8h+var_58], rax loc_BA224: mov rax, [rsp+0A8h+var_80] add rax, 8 mov [rsp+0A8h+var_48], rax mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_8], rax mov rax, [rsp+0A8h+var_8] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_BA2DE mov rax, [rsp+0A8h+var_80] add rax, 8 mov [rsp+0A8h+var_38], rax lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void) mov [rsp+0A8h+var_40], rax mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_A8], rax mov [rsp+0A8h+var_28], rax mov rax, [rsp+0A8h+var_28] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_10] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_BA2BC mov rdi, [rsp+0A8h+var_A8] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+0A8h+var_30], rax jmp short loc_BA2C5 loc_BA2BC: call [rsp+0A8h+var_40] mov [rsp+0A8h+var_30], rax loc_BA2C5: mov rdi, [rsp+0A8h+var_30]; this mov rsi, [rsp+0A8h+var_58]; google::protobuf::UnknownFieldSet * mov rdx, [rsp+0A8h+var_60]; unsigned __int8 * call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+0A8h+var_58], rax loc_BA2DE: mov rax, [rsp+0A8h+var_58] add rsp, 0A8h retn
google::protobuf::UnknownFieldSet * google::protobuf::ServiceDescriptorProto::_InternalSerialize( google::protobuf::ServiceDescriptorProto *this, const google::protobuf::ServiceDescriptorProto *a2, google::protobuf::io::EpsCopyOutputStream *a3) { unsigned long long v3; // rax unsigned long long v4; // rax unsigned int v5; // eax unsigned long long v6; // rax unsigned int CachedSize; // eax google::protobuf::io::EpsCopyOutputStream *v8; // r9 google::protobuf::ServiceOptions *v9; // rax unsigned int v10; // eax google::protobuf::io::EpsCopyOutputStream *v11; // r9 google::protobuf::io::EpsCopyOutputStream *v12; // rcx int v14; // [rsp+8h] [rbp-A0h] google::protobuf::MethodDescriptorProto *v15; // [rsp+10h] [rbp-98h] long long v16; // [rsp+18h] [rbp-90h] unsigned int v17; // [rsp+3Ch] [rbp-6Ch] unsigned int v18; // [rsp+40h] [rbp-68h] int v19; // [rsp+44h] [rbp-64h] google::protobuf::UnknownFieldSet *v21; // [rsp+50h] [rbp-58h] google::protobuf::internal::WireFormat *v22; // [rsp+78h] [rbp-30h] v21 = a2; v19 = *((_DWORD *)this + 4); if ( (v19 & 1) != 0 ) { v3 = google::protobuf::ServiceDescriptorProto::_internal_name[abi:cxx11]((long long)this); v16 = std::string::data(v3); v4 = google::protobuf::ServiceDescriptorProto::_internal_name[abi:cxx11]((long long)this); v5 = std::string::length(v4); google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( v16, v5, 1LL, "google.protobuf.ServiceDescriptorProto.name"); v6 = google::protobuf::ServiceDescriptorProto::_internal_name[abi:cxx11]((long long)this); a2 = (const google::protobuf::ServiceDescriptorProto *)((char *)&dword_0 + 1); v21 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased( a3, (char *)&dword_0 + 1, v6, v21); } v18 = 0; v17 = google::protobuf::ServiceDescriptorProto::_internal_method_size(this); while ( v18 < v17 ) { v15 = (google::protobuf::MethodDescriptorProto *)google::protobuf::ServiceDescriptorProto::_internal_method( this, v18); CachedSize = google::protobuf::MethodDescriptorProto::GetCachedSize(v15); a2 = v15; v21 = (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage( (google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 2), (int)v15, (const google::protobuf::MessageLite *)CachedSize, (int)v21, (unsigned __int8 *)a3, v8); ++v18; } if ( (v19 & 2) != 0 ) { v14 = google::protobuf::ServiceDescriptorProto::_Internal::options(this, a2); v9 = (google::protobuf::ServiceOptions *)google::protobuf::ServiceDescriptorProto::_Internal::options(this, a2); v10 = google::protobuf::ServiceOptions::GetCachedSize(v9); v21 = (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage( (google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 3), v14, (const google::protobuf::MessageLite *)v10, (int)v21, (unsigned __int8 *)a3, v11); } if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) { v22 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1) + 8); return (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray( v22, v21, (unsigned __int8 *)a3, v12); } return v21; }
_InternalSerialize: SUB RSP,0xa8 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x28],RAX MOV dword ptr [RSP + 0x44],0x0 ADD RAX,0x10 MOV qword ptr [RSP + 0x90],RAX MOV dword ptr [RSP + 0x8c],0x0 MOV RAX,qword ptr [RSP + 0x90] MOVSXD RCX,dword ptr [RSP + 0x8c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x44],EAX MOV EAX,dword ptr [RSP + 0x44] AND EAX,0x1 CMP EAX,0x0 JZ 0x001ba163 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00188b20 MOV RDI,RAX CALL 0x001174a0 MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX CALL 0x00188b20 MOV RDI,RAX CALL 0x00114810 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,EAX MOV EDX,0x1 LEA RCX,[0x2f0cba] CALL 0x001d5100 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX CALL 0x00188b20 MOV RDI,qword ptr [RSP + 0x20] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0x50] MOV ESI,0x1 CALL 0x001d5120 MOV qword ptr [RSP + 0x50],RAX LAB_001ba163: MOV RDI,qword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x40],0x0 CALL 0x00188b50 MOV dword ptr [RSP + 0x3c],EAX LAB_001ba179: MOV EAX,dword ptr [RSP + 0x40] CMP EAX,dword ptr [RSP + 0x3c] JNC 0x001ba1d7 MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x40] CALL 0x00188b70 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x001d8a60 MOV RSI,qword ptr [RSP + 0x10] MOV EDX,EAX MOV RCX,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x48] MOV EDI,0x2 CALL 0x002d88f0 MOV qword ptr [RSP + 0x50],RAX MOV EAX,dword ptr [RSP + 0x40] ADD EAX,0x1 MOV dword ptr [RSP + 0x40],EAX JMP 0x001ba179 LAB_001ba1d7: MOV EAX,dword ptr [RSP + 0x44] AND EAX,0x2 CMP EAX,0x0 JZ 0x001ba224 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001b9690 MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RAX CALL 0x001b9690 MOV RDI,RAX CALL 0x001d8a80 MOV RSI,qword ptr [RSP + 0x8] MOV EDX,EAX MOV RCX,qword ptr [RSP + 0x50] MOV R8,qword ptr [RSP + 0x48] MOV EDI,0x3 CALL 0x002d88f0 MOV qword ptr [RSP + 0x50],RAX LAB_001ba224: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x8 MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001ba2de MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x8 MOV qword ptr [RSP + 0x70],RAX LEA RAX,[0x262af0] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001ba2bc MOV RDI,qword ptr [RSP] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0x78],RAX JMP 0x001ba2c5 LAB_001ba2bc: CALL qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x78],RAX LAB_001ba2c5: MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x48] CALL 0x002672d0 MOV qword ptr [RSP + 0x50],RAX LAB_001ba2de: MOV RAX,qword ptr [RSP + 0x50] ADD RSP,0xa8 RET
/* google::protobuf::ServiceDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const */ uchar * __thiscall google::protobuf::ServiceDescriptorProto::_InternalSerialize (ServiceDescriptorProto *this,uchar *param_1,EpsCopyOutputStream *param_2) { uint uVar1; int4 uVar2; uint uVar3; int iVar4; string *psVar5; int8 uVar6; MethodDescriptorProto *this_00; MessageLite *pMVar7; ServiceOptions *this_01; uint local_68; uchar *local_58; UnknownFieldSet *local_30; uVar1 = *(uint *)(this + 0x10); local_58 = param_1; if ((uVar1 & 1) != 0) { psVar5 = (string *)_internal_name_abi_cxx11_(this); uVar6 = std::__cxx11::string::data(psVar5); psVar5 = (string *)_internal_name_abi_cxx11_(this); uVar2 = std::__cxx11::string::length(psVar5); internal::WireFormat::VerifyUTF8StringNamedField (uVar6,uVar2,1,"google.protobuf.ServiceDescriptorProto.name"); psVar5 = (string *)_internal_name_abi_cxx11_(this); local_58 = (uchar *)io::EpsCopyOutputStream::WriteStringMaybeAliased(param_2,1,psVar5,param_1); } local_68 = 0; uVar3 = _internal_method_size(this); for (; local_68 < uVar3; local_68 = local_68 + 1) { this_00 = (MethodDescriptorProto *)_internal_method(this,local_68); iVar4 = MethodDescriptorProto::GetCachedSize(this_00); local_58 = (uchar *)internal::WireFormatLite::InternalWriteMessage (2,(MessageLite *)this_00,iVar4,local_58,param_2); } if ((uVar1 & 2) != 0) { pMVar7 = (MessageLite *)_Internal::options(this); this_01 = (ServiceOptions *)_Internal::options(this); iVar4 = ServiceOptions::GetCachedSize(this_01); local_58 = (uchar *)internal::WireFormatLite::InternalWriteMessage (3,pMVar7,iVar4,local_58,param_2); } if ((*(ulong *)(this + 8) & 1) != 0) { if ((*(ulong *)(this + 8) & 1) == 0) { local_30 = (UnknownFieldSet *)UnknownFieldSet::default_instance(); } else { local_30 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> ((InternalMetadata *)(this + 8)); local_30 = (UnknownFieldSet *)((Container *)local_30 + 8); } local_58 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray (local_30,local_58,param_2); } return local_58; }
65,734
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>)
llama.cpp/common/json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> 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>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x690d7 movq %rdx, %r15 movq %rdi, %rbx movq %r14, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x18(%rdi) callq 0x64944 movzbl (%r14), %eax leal -0x3(%rax), %ecx cmpl $0x6, %ecx jae 0x69044 cmpq $0x0, 0x18(%r15) jne 0x6913a cmpl $0x8, %eax je 0x69065 cmpl $0x3, %eax jne 0x69098 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax leaq 0x10(%rdi), %rcx cmpq %rcx, %rax je 0x6903d movq (%rcx), %rsi incq %rsi movq %rax, %rdi callq 0x1d160 movq (%r15), %rdi movl $0x20, %esi jmp 0x6908c cmpl $0x1, %eax je 0x690b9 cmpl $0x2, %eax jne 0x6919a movq 0x8(%r14), %rdi movq 0x10(%r15), %rsi callq 0x69724 movq %rax, 0x10(%rbx) jmp 0x690a9 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi movq (%rdi), %rax testq %rax, %rax je 0x69087 movq 0x10(%rdi), %rsi subq %rax, %rsi movq %rax, %rdi callq 0x1d160 movq (%r15), %rdi movl $0x28, %esi callq 0x1d160 movq $0x0, (%r15) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x60b38 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rbx, %r12 addq $0x8, %r12 movq 0x8(%r14), %rdi movq 0x8(%r15), %rsi leaq 0x30(%rsi), %rdx callq 0x69246 movq %rax, (%r12) jmp 0x690a9 movl $0x20, %edi callq 0x1d520 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x61bc1(%rip), %rsi # 0xcacb5 leaq 0x61bdd(%rip), %rdx # 0xcacd8 leaq 0x8(%rsp), %rdi callq 0x237c2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x6230c xorl %ebp, %ebp leaq 0x9fd5a(%rip), %rsi # 0x108e80 leaq -0x3fe0f(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 jmp 0x691f8 movl $0x20, %edi callq 0x1d520 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x61b82(%rip), %rsi # 0xcacd9 leaq 0x61b90(%rip), %rdx # 0xcacee leaq 0x8(%rsp), %rdi callq 0x237c2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0x6230c xorl %ebp, %ebp leaq 0x9fcf7(%rip), %rsi # 0x108e80 leaq -0x3fe72(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 jmp 0x691f8 movl $0x20, %edi callq 0x1d520 movq %rax, %rbx movq %r14, %rdi callq 0x607fe leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x61b31(%rip), %rsi # 0xcacef leaq 0x8(%rsp), %rdi callq 0x2ca5a movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x61958 xorl %ebp, %ebp leaq 0x9fcd7(%rip), %rsi # 0x108ec0 leaq -0x3fed2(%rip), %rdx # 0x2931e movq %rbx, %rdi callq 0x1d890 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x6921e jmp 0x6922b jmp 0x69232 jmp 0x69211 jmp 0x69232 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x6922b movq 0x18(%rsp), %rsi incq %rsi callq 0x1d160 testb %bpl, %bpl jne 0x69235 jmp 0x6923d movq %rax, %r14 movq %rbx, %rdi callq 0x1dc90 movq %r14, %rdi callq 0x1d8e0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; __int64 push r15; int push r14; void * push r12; int push rbx; __int64 sub rsp, 30h mov r14, rsi cmp [rdx], rsi jnz loc_690D7 mov r15, rdx mov rbx, rdi mov [rdi], r14 xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov rax, 8000000000000000h mov [rdi+18h], rax call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::set_end(void) movzx eax, byte ptr [r14] lea ecx, [rax-3] cmp ecx, 6 jnb short loc_69044 cmp qword ptr [r15+18h], 0 jnz loc_6913A cmp eax, 8 jz short loc_69065 cmp eax, 3 jnz loc_69098 lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] lea rcx, [rdi+10h] cmp rax, rcx jz short loc_6903D mov rsi, [rcx] inc rsi; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15] loc_6903D: mov esi, 20h ; ' ' jmp short loc_6908C loc_69044: cmp eax, 1 jz short loc_690B9 cmp eax, 2 jnz loc_6919A mov rdi, [r14+8] mov rsi, [r15+10h] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; 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>>::_M_erase(__gnu_cxx::__normal_iterator<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::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>>>) mov [rbx+10h], rax jmp short loc_690A9 loc_69065: lea r15, [r14+8] mov rdi, [r14+8] mov rax, [rdi] test rax, rax jz short loc_69087 mov rsi, [rdi+10h] sub rsi, rax; unsigned __int64 mov rdi, rax; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, [r15]; void * loc_69087: mov esi, 28h ; '('; unsigned __int64 loc_6908C: call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [r15], 0 loc_69098: mov byte ptr [r14], 0 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) loc_690A9: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_690B9: mov r12, rbx add r12, 8 mov rdi, [r14+8] mov rsi, [r15+8] lea rdx, [rsi+30h] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; 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>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<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>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<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 [r12], rax jmp short loc_690A9 loc_690D7: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" lea rdi, [rsp+58h+var_50] 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 bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_691F8 loc_6913A: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorOutOfR; "iterator out of range" lea rdx, aIteratorOutOfR+15h; "" lea rdi, [rsp+58h+var_50] 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 bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CDh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_691F8 loc_6919A: 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+58h+var_30] mov [rdx], rax lea rsi, aCannotUseErase; "cannot use erase() with " lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 133h; 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 loc_691F8: mov r14, rax lea rax, [rsp+58h+var_40] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_6921E jmp short loc_6922B jmp short loc_69232 jmp short loc_69211 jmp short loc_69232 loc_69211: mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_6922B loc_6921E: mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6922B: test bpl, bpl jnz short loc_69235 jmp short loc_6923D loc_69232: mov r14, rax loc_69235: mov rdi, rbx; void * call ___cxa_free_exception loc_6923D: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( long long a1, unsigned __int8 *a2, unsigned __int8 **a3) { int v6; // eax long long *v7; // r15 long long v8; // rdi unsigned long long v9; // rsi nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v12; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v13; // rbx void *v14[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v15[2]; // [rsp+18h] [rbp-40h] BYREF const char *v16; // [rsp+28h] [rbp-30h] BYREF if ( *a3 != a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v14[0] = v15; std::string::_M_construct<char const*>((long long)v14, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 202, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::set_end((unsigned __int8 **)a1); v6 = *a2; if ( (unsigned int)(v6 - 3) < 6 ) { if ( a3[3] ) { v12 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v14[0] = v15; std::string::_M_construct<char const*>((long long)v14, "iterator out of range", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v12, 205, v14); __cxa_throw( v12, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( v6 == 8 ) { v7 = (long long *)(a2 + 8); v8 = *((_QWORD *)a2 + 1); if ( *(_QWORD *)v8 ) { operator delete(*(void **)v8, *(_QWORD *)(v8 + 16) - *(_QWORD *)v8); v8 = *v7; } v9 = 40LL; } else { if ( v6 != 3 ) { LABEL_16: *a2 = 0; 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 *)a2); return a1; } v7 = (long long *)(a2 + 8); v8 = *((_QWORD *)a2 + 1); if ( *(_QWORD *)v8 != v8 + 16 ) { operator delete(*(void **)v8, *(_QWORD *)(v8 + 16) + 1LL); v8 = *v7; } v9 = 32LL; } operator delete((void *)v8, v9); *v7 = 0LL; goto LABEL_16; } if ( v6 == 1 ) { *(_QWORD *)(a1 + 8) = 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>>>>::erase( *((_QWORD *)a2 + 1), a3[1], a3[1] + 48); } else { if ( v6 != 2 ) { v13 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v16 = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>( (long long)v14, (long long)"cannot use erase() with ", &v16); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v13, 307, v14); __cxa_throw( v13, (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); } *(_QWORD *)(a1 + 16) = 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>>::_M_erase( *((_QWORD *)a2 + 1), a3[2]); } return a1; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x001690d7 MOV R15,RDX MOV RBX,RDI MOV qword ptr [RDI],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV RAX,-0x8000000000000000 MOV qword ptr [RDI + 0x18],RAX CALL 0x00164944 MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3] CMP ECX,0x6 JNC 0x00169044 CMP qword ptr [R15 + 0x18],0x0 JNZ 0x0016913a CMP EAX,0x8 JZ 0x00169065 CMP EAX,0x3 JNZ 0x00169098 LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] LEA RCX,[RDI + 0x10] CMP RAX,RCX JZ 0x0016903d MOV RSI,qword ptr [RCX] INC RSI MOV RDI,RAX CALL 0x0011d160 MOV RDI,qword ptr [R15] LAB_0016903d: MOV ESI,0x20 JMP 0x0016908c LAB_00169044: CMP EAX,0x1 JZ 0x001690b9 CMP EAX,0x2 JNZ 0x0016919a MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x10] CALL 0x00169724 MOV qword ptr [RBX + 0x10],RAX JMP 0x001690a9 LAB_00169065: LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00169087 MOV RSI,qword ptr [RDI + 0x10] SUB RSI,RAX MOV RDI,RAX CALL 0x0011d160 MOV RDI,qword ptr [R15] LAB_00169087: MOV ESI,0x28 LAB_0016908c: CALL 0x0011d160 MOV qword ptr [R15],0x0 LAB_00169098: MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00160b38 LAB_001690a9: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001690b9: MOV R12,RBX ADD R12,0x8 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x8] LEA RDX,[RSI + 0x30] CALL 0x00169246 MOV qword ptr [R12],RAX JMP 0x001690a9 LAB_001690d7: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001690ed: LEA RSI,[0x1cacb5] LEA RDX,[0x1cacd8] LEA RDI,[RSP + 0x8] CALL 0x001237c2 MOV BPL,0x1 LAB_00169108: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0016230c XOR EBP,EBP LEA RSI,[0x208e80] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890 LAB_0016913a: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_00169150: LEA RSI,[0x1cacd9] LEA RDX,[0x1cacee] LEA RDI,[RSP + 0x8] CALL 0x001237c2 MOV BPL,0x1 LAB_0016916b: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x0016230c XOR EBP,EBP LEA RSI,[0x208e80] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890 LAB_0016919a: MOV EDI,0x20 CALL 0x0011d520 MOV RBX,RAX MOV RDI,R14 CALL 0x001607fe LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_001691b7: LEA RSI,[0x1cacef] LEA RDI,[RSP + 0x8] CALL 0x0012ca5a MOV BPL,0x1 LAB_001691cb: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x00161958 XOR EBP,EBP LEA RSI,[0x208ec0] LEA RDX,[0x12931e] MOV RDI,RBX CALL 0x0011d890
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *param_1, 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> *param_2,long *param_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> bVar1; void *pvVar2; int8 uVar3; ulong uVar4; int8 *puVar5; int1 *local_50 [2]; int1 local_40 [16]; char *local_30; if ((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> *)*param_3 != param_2) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 001690ed to 00169104 has its CatchHandler @ 00169232 */ std::__cxx11::string::_M_construct<char_const*> (local_50,"iterator does not fit current value",""); /* try { // try from 00169108 to 00169134 has its CatchHandler @ 00169211 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xca,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *(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> **)param_1 = param_2; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0x8000000000000000; nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::set_end(param_1); bVar1 = *param_2; if (5 < (byte)bVar1 - 3) { if (bVar1 == (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) { uVar3 = 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>>>> ::erase(*(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>>>> **)(param_2 + 8),param_3[1],param_3[1] + 0x30); *(int8 *)(param_1 + 8) = uVar3; return param_1; } if (bVar1 == (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> )0x2) { uVar3 = 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>>> ::_M_erase(*(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>>> **)(param_2 + 8),param_3[2]); *(int8 *)(param_1 + 0x10) = uVar3; return param_1; } uVar3 = __cxa_allocate_exception(0x20); local_30 = (char *)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> ::type_name(param_2); /* try { // try from 001691b7 to 001691c7 has its CatchHandler @ 0016920b */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> ((detail *)local_50,"cannot use erase() with ",&local_30); /* try { // try from 001691cb to 001691f7 has its CatchHandler @ 001691f8 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x133,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (param_3[3] != 0) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 00169150 to 00169167 has its CatchHandler @ 0016920f */ std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range",""); /* try { // try from 0016916b to 00169197 has its CatchHandler @ 0016920d */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xcd,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (bVar1 == (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> )0x8) { puVar5 = *(int8 **)(param_2 + 8); pvVar2 = (void *)*puVar5; if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,puVar5[2] - (long)pvVar2); puVar5 = *(int8 **)(param_2 + 8); } uVar4 = 0x28; } else { if (bVar1 != (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> )0x3) goto LAB_00169098; puVar5 = *(int8 **)(param_2 + 8); if ((long *)*puVar5 != puVar5 + 2) { operator_delete((long *)*puVar5,puVar5[2] + 1); puVar5 = *(int8 **)(param_2 + 8); } uVar4 = 0x20; } operator_delete(puVar5,uVar4); *(int8 *)(param_2 + 8) = 0; LAB_00169098: *param_2 = (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; 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> ::assert_invariant(SUB81(param_2,0)); return param_1; }
65,735
mi_unmap_file
eloqsql/storage/myisam/mi_packrec.c
void _mi_unmap_file(MI_INFO *info) { DBUG_ASSERT(info->s->options & HA_OPTION_COMPRESS_RECORD); (void) my_munmap((char*) info->s->file_map, info->s->mmaped_length); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= info->s->mmaped_length; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } }
O0
c
mi_unmap_file: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xbf08e movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rsi callq 0x2a4b0 leaq 0x20b4a2(%rip), %rax # 0x2ca558 cmpq $-0x1, (%rax) je 0xbf105 leaq 0xbcf435(%rip), %rdi # 0xc8e4f8 leaq 0x9de3d(%rip), %rsi # 0x15cf07 movl $0x61b, %edx # imm = 0x61B callq 0xbed50 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rax leaq 0xbc65f7(%rip), %rcx # 0xc856e0 movq (%rcx), %rcx subq %rax, %rcx leaq 0xbc65ea(%rip), %rax # 0xc856e0 movq %rcx, (%rax) leaq 0xbcf3f8(%rip), %rdi # 0xc8e4f8 callq 0xbedc0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_mi_unmap_file: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_BF08E: mov rax, [rbp+var_8] mov rax, [rax] mov rdi, [rax+270h] mov rax, [rbp+var_8] mov rax, [rax] mov rsi, [rax+4D0h] call _munmap lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_BF105 lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 61Bh call inline_mysql_mutex_lock_21 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+4D0h] lea rcx, myisam_mmap_used mov rcx, [rcx] sub rcx, rax lea rax, myisam_mmap_used mov [rax], rcx lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 loc_BF105: add rsp, 10h pop rbp retn
_QWORD * mi_unmap_file(long long a1) { _QWORD *result; // rax munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL)); result = &myisam_mmap_size; if ( myisam_mmap_size != -1LL ) { inline_mysql_mutex_lock_21( (long long)&THR_LOCK_myisam_mmap, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x61Bu); myisam_mmap_used -= *(_QWORD *)(*(_QWORD *)a1 + 1232LL); return (_QWORD *)inline_mysql_mutex_unlock_22((long long)&THR_LOCK_myisam_mmap); } return result; }
_mi_unmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001bf08e LAB_001bf08e: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x4d0] CALL 0x0012a4b0 LEA RAX,[0x3ca558] CMP qword ptr [RAX],-0x1 JZ 0x001bf105 LEA RDI,[0xd8e4f8] LEA RSI,[0x25cf07] MOV EDX,0x61b CALL 0x001bed50 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x4d0] LEA RCX,[0xd856e0] MOV RCX,qword ptr [RCX] SUB RCX,RAX LEA RAX,[0xd856e0] MOV qword ptr [RAX],RCX LEA RDI,[0xd8e4f8] CALL 0x001bedc0 LAB_001bf105: ADD RSP,0x10 POP RBP RET
void _mi_unmap_file(long *param_1) { munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0)); if (myisam_mmap_size != -1) { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x61b); myisam_mmap_used = myisam_mmap_used - *(long *)(*param_1 + 0x4d0); inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } return; }
65,736
glfwPlatformTerminate
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_init.c
void _glfwPlatformTerminate(void) { if (_glfw.x11.helperWindowHandle) { if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) == _glfw.x11.helperWindowHandle) { _glfwPushSelectionToManagerX11(); } XDestroyWindow(_glfw.x11.display, _glfw.x11.helperWindowHandle); _glfw.x11.helperWindowHandle = None; } if (_glfw.x11.hiddenCursorHandle) { XFreeCursor(_glfw.x11.display, _glfw.x11.hiddenCursorHandle); _glfw.x11.hiddenCursorHandle = (Cursor) 0; } free(_glfw.x11.primarySelectionString); free(_glfw.x11.clipboardString); if (_glfw.x11.im) { XCloseIM(_glfw.x11.im); _glfw.x11.im = NULL; } if (_glfw.x11.display) { XCloseDisplay(_glfw.x11.display); _glfw.x11.display = NULL; } if (_glfw.x11.x11xcb.handle) { _glfw_dlclose(_glfw.x11.x11xcb.handle); _glfw.x11.x11xcb.handle = NULL; } if (_glfw.x11.xcursor.handle) { _glfw_dlclose(_glfw.x11.xcursor.handle); _glfw.x11.xcursor.handle = NULL; } if (_glfw.x11.randr.handle) { _glfw_dlclose(_glfw.x11.randr.handle); _glfw.x11.randr.handle = NULL; } if (_glfw.x11.xinerama.handle) { _glfw_dlclose(_glfw.x11.xinerama.handle); _glfw.x11.xinerama.handle = NULL; } if (_glfw.x11.xrender.handle) { _glfw_dlclose(_glfw.x11.xrender.handle); _glfw.x11.xrender.handle = NULL; } if (_glfw.x11.vidmode.handle) { _glfw_dlclose(_glfw.x11.vidmode.handle); _glfw.x11.vidmode.handle = NULL; } if (_glfw.x11.xi.handle) { _glfw_dlclose(_glfw.x11.xi.handle); _glfw.x11.xi.handle = NULL; } // NOTE: These need to be unloaded after XCloseDisplay, as they register // cleanup callbacks that get called by that function _glfwTerminateEGL(); _glfwTerminateGLX(); #if defined(__linux__) _glfwTerminateJoysticksLinux(); #endif }
O3
c
glfwPlatformTerminate: pushq %rbx leaq 0x87fc4(%rip), %rbx # 0xa8638 cmpq $0x0, 0x1fee0(%rbx) je 0x206c0 movq 0x1fec0(%rbx), %rdi movq 0x20528(%rbx), %rsi callq 0xcfd0 movq 0x1fee0(%rbx), %rsi cmpq %rsi, %rax jne 0x206a9 callq 0x21814 movq 0x1fee0(%rbx), %rsi movq 0x1fec0(%rbx), %rdi callq 0xcd70 movq $0x0, 0x1fee0(%rbx) movq 0x1fee8(%rbx), %rsi testq %rsi, %rsi je 0x206e3 movq 0x1fec0(%rbx), %rdi callq 0xc930 movq $0x0, 0x1fee8(%rbx) movq 0x1ff08(%rbx), %rdi callq 0xca50 movq 0x1ff10(%rbx), %rdi callq 0xca50 movq 0x1fef8(%rbx), %rdi testq %rdi, %rdi je 0x20717 callq 0xc910 movq $0x0, 0x1fef8(%rbx) movq 0x1fec0(%rbx), %rdi testq %rdi, %rdi je 0x20733 callq 0xcff0 movq $0x0, 0x1fec0(%rbx) movq 0x206b8(%rbx), %rdi testq %rdi, %rdi je 0x2074f callq 0xc670 movq $0x0, 0x206b8(%rbx) movq 0x20668(%rbx), %rdi testq %rdi, %rdi je 0x2076b callq 0xc670 movq $0x0, 0x20668(%rbx) movq 0x20578(%rbx), %rdi testq %rdi, %rdi je 0x20787 callq 0xc670 movq $0x0, 0x20578(%rbx) movq 0x20690(%rbx), %rdi testq %rdi, %rdi je 0x207a3 callq 0xc670 movq $0x0, 0x20690(%rbx) movq 0x20740(%rbx), %rdi testq %rdi, %rdi je 0x207bf callq 0xc670 movq $0x0, 0x20740(%rbx) movq 0x206d0(%rbx), %rdi testq %rdi, %rdi je 0x207db callq 0xc670 movq $0x0, 0x206d0(%rbx) movq 0x20708(%rbx), %rdi testq %rdi, %rdi je 0x207f7 callq 0xc670 movq $0x0, 0x20708(%rbx) callq 0x27469 callq 0x265d5 popq %rbx jmp 0x28d00
_glfwPlatformTerminate: push rbx lea rbx, _glfw cmp qword ptr [rbx+1FEE0h], 0 jz short loc_206C0 mov rdi, [rbx+1FEC0h] mov rsi, [rbx+20528h] call _XGetSelectionOwner mov rsi, [rbx+1FEE0h] loc_20698: cmp rax, rsi jnz short loc_206A9 call _glfwPushSelectionToManagerX11 mov rsi, [rbx+1FEE0h] loc_206A9: mov rdi, [rbx+1FEC0h] loc_206B0: call _XDestroyWindow mov qword ptr [rbx+1FEE0h], 0 loc_206C0: mov rsi, [rbx+1FEE8h] test rsi, rsi jz short loc_206E3 mov rdi, [rbx+1FEC0h] call _XFreeCursor loc_206D8: mov qword ptr [rbx+1FEE8h], 0 loc_206E3: mov rdi, [rbx+1FF08h] call _free mov rdi, qword ptr ds:loc_1FF10[rbx] call _free mov rdi, [rbx+1FEF8h] test rdi, rdi jz short loc_20717 call _XCloseIM mov qword ptr [rbx+1FEF8h], 0 loc_20717: mov rdi, [rbx+1FEC0h] test rdi, rdi jz short loc_20733 call _XCloseDisplay loc_20728: mov qword ptr [rbx+1FEC0h], 0 loc_20733: mov rdi, [rbx+206B8h] test rdi, rdi jz short loc_2074F call _dlclose mov qword ptr [rbx+206B8h], 0 loc_2074F: mov rdi, [rbx+20668h] test rdi, rdi jz short loc_2076B call _dlclose loc_20760: mov qword ptr [rbx+20668h], 0 loc_2076B: mov rdi, qword ptr ds:loc_20578[rbx] test rdi, rdi jz short loc_20787 call _dlclose loc_2077C: mov qword ptr ds:loc_20578[rbx], 0 loc_20787: mov rdi, [rbx+20690h] test rdi, rdi jz short loc_207A3 call _dlclose loc_20798: mov qword ptr [rbx+20690h], 0 loc_207A3: mov rdi, [rbx+20740h] test rdi, rdi jz short loc_207BF call _dlclose mov qword ptr [rbx+20740h], 0 loc_207BF: mov rdi, [rbx+206D0h] test rdi, rdi jz short loc_207DB call _dlclose loc_207D0: mov qword ptr [rbx+206D0h], 0 loc_207DB: mov rdi, [rbx+20708h] test rdi, rdi jz short loc_207F7 call _dlclose mov qword ptr [rbx+20708h], 0 loc_207F7: call _glfwTerminateEGL call _glfwTerminateGLX pop rbx jmp _glfwTerminateJoysticksLinux
long long glfwPlatformTerminate() { long long v0; // rax long long v1; // rsi long long v2; // rdi long long v3; // rdi long long v4; // rdi long long v5; // rdi long long v6; // rdi long long v7; // rdi long long v8; // rdi long long v9; // rdi if ( *(_QWORD *)&glfw[32696] ) { v0 = XGetSelectionOwner(*(_QWORD *)&glfw[32688], *(_QWORD *)&glfw[33098]); v1 = *(_QWORD *)&glfw[32696]; if ( v0 == v1 ) { glfwPushSelectionToManagerX11(); v1 = *(_QWORD *)&glfw[32696]; } XDestroyWindow(*(_QWORD *)&glfw[32688], v1); *(_QWORD *)&glfw[32696] = 0LL; } if ( *(_QWORD *)&glfw[32698] ) { XFreeCursor(*(_QWORD *)&glfw[32688]); *(_QWORD *)&glfw[32698] = 0LL; } free(*(_QWORD *)&glfw[32706]); free(*(_QWORD *)((char *)&loc_1FF10 + (_QWORD)glfw)); v2 = *(_QWORD *)&glfw[32702]; if ( v2 ) { XCloseIM(v2); *(_QWORD *)&glfw[32702] = 0LL; } if ( *(_QWORD *)&glfw[32688] ) { XCloseDisplay(); *(_QWORD *)&glfw[32688] = 0LL; } v3 = *(_QWORD *)&glfw[33198]; if ( v3 ) { dlclose(v3); *(_QWORD *)&glfw[33198] = 0LL; } v4 = *(_QWORD *)&glfw[33178]; if ( v4 ) { dlclose(v4); *(_QWORD *)&glfw[33178] = 0LL; } v5 = *(_QWORD *)((char *)&loc_20578 + (_QWORD)glfw); if ( v5 ) { dlclose(v5); *(_QWORD *)((char *)&loc_20578 + (_QWORD)glfw) = 0LL; } v6 = *(_QWORD *)&glfw[33188]; if ( v6 ) { dlclose(v6); *(_QWORD *)&glfw[33188] = 0LL; } v7 = *(_QWORD *)&glfw[33232]; if ( v7 ) { dlclose(v7); *(_QWORD *)&glfw[33232] = 0LL; } v8 = *(_QWORD *)&glfw[33204]; if ( v8 ) { dlclose(v8); *(_QWORD *)&glfw[33204] = 0LL; } v9 = *(_QWORD *)&glfw[33218]; if ( v9 ) { dlclose(v9); *(_QWORD *)&glfw[33218] = 0LL; } glfwTerminateEGL(); glfwTerminateGLX(); return glfwTerminateJoysticksLinux(); }
_glfwPlatformTerminate: PUSH RBX LEA RBX,[0x1a8638] CMP qword ptr [RBX + 0x1fee0],0x0 JZ 0x001206c0 MOV RDI,qword ptr [RBX + 0x1fec0] MOV RSI,qword ptr [RBX + 0x20528] CALL 0x0010cfd0 MOV RSI,qword ptr [RBX + 0x1fee0] CMP RAX,RSI JNZ 0x001206a9 CALL 0x00121814 MOV RSI,qword ptr [RBX + 0x1fee0] LAB_001206a9: MOV RDI,qword ptr [RBX + 0x1fec0] CALL 0x0010cd70 MOV qword ptr [RBX + 0x1fee0],0x0 LAB_001206c0: MOV RSI,qword ptr [RBX + 0x1fee8] TEST RSI,RSI JZ 0x001206e3 MOV RDI,qword ptr [RBX + 0x1fec0] CALL 0x0010c930 MOV qword ptr [RBX + 0x1fee8],0x0 LAB_001206e3: MOV RDI,qword ptr [RBX + 0x1ff08] CALL 0x0010ca50 MOV RDI,qword ptr [RBX + 0x1ff10] CALL 0x0010ca50 MOV RDI,qword ptr [RBX + 0x1fef8] TEST RDI,RDI JZ 0x00120717 CALL 0x0010c910 MOV qword ptr [RBX + 0x1fef8],0x0 LAB_00120717: MOV RDI,qword ptr [RBX + 0x1fec0] TEST RDI,RDI JZ 0x00120733 CALL 0x0010cff0 MOV qword ptr [RBX + 0x1fec0],0x0 LAB_00120733: MOV RDI,qword ptr [RBX + 0x206b8] TEST RDI,RDI JZ 0x0012074f CALL 0x0010c670 MOV qword ptr [RBX + 0x206b8],0x0 LAB_0012074f: MOV RDI,qword ptr [RBX + 0x20668] TEST RDI,RDI JZ 0x0012076b CALL 0x0010c670 MOV qword ptr [RBX + 0x20668],0x0 LAB_0012076b: MOV RDI,qword ptr [RBX + 0x20578] TEST RDI,RDI JZ 0x00120787 CALL 0x0010c670 MOV qword ptr [RBX + 0x20578],0x0 LAB_00120787: MOV RDI,qword ptr [RBX + 0x20690] TEST RDI,RDI JZ 0x001207a3 CALL 0x0010c670 MOV qword ptr [RBX + 0x20690],0x0 LAB_001207a3: MOV RDI,qword ptr [RBX + 0x20740] TEST RDI,RDI JZ 0x001207bf CALL 0x0010c670 MOV qword ptr [RBX + 0x20740],0x0 LAB_001207bf: MOV RDI,qword ptr [RBX + 0x206d0] TEST RDI,RDI JZ 0x001207db CALL 0x0010c670 MOV qword ptr [RBX + 0x206d0],0x0 LAB_001207db: MOV RDI,qword ptr [RBX + 0x20708] TEST RDI,RDI JZ 0x001207f7 CALL 0x0010c670 MOV qword ptr [RBX + 0x20708],0x0 LAB_001207f7: CALL 0x00127469 CALL 0x001265d5 POP RBX JMP 0x00128d00
void _glfwPlatformTerminate(void) { long lVar1; if (DAT_001c8518 != 0) { lVar1 = XGetSelectionOwner(DAT_001c84f8,DAT_001c8b60); if (lVar1 == DAT_001c8518) { _glfwPushSelectionToManagerX11(); } XDestroyWindow(DAT_001c84f8,DAT_001c8518); DAT_001c8518 = 0; } if (DAT_001c8520 != 0) { XFreeCursor(DAT_001c84f8); DAT_001c8520 = 0; } free(DAT_001c8540); free(DAT_001c8548); if (DAT_001c8530 != 0) { XCloseIM(); DAT_001c8530 = 0; } if (DAT_001c84f8 != 0) { XCloseDisplay(); DAT_001c84f8 = 0; } if (DAT_001c8cf0 != 0) { dlclose(); DAT_001c8cf0 = 0; } if (DAT_001c8ca0 != 0) { dlclose(); DAT_001c8ca0 = 0; } if (DAT_001c8bb0 != 0) { dlclose(); DAT_001c8bb0 = 0; } if (DAT_001c8cc8 != 0) { dlclose(); DAT_001c8cc8 = 0; } if (DAT_001c8d78 != 0) { dlclose(); DAT_001c8d78 = 0; } if (DAT_001c8d08 != 0) { dlclose(); DAT_001c8d08 = 0; } if (DAT_001c8d40 != 0) { dlclose(); DAT_001c8d40 = 0; } _glfwTerminateEGL(); _glfwTerminateGLX(); _glfwTerminateJoysticksLinux(); return; }
65,737
SDL::OpenGL1Texture::OpenGL1Texture(SDL_Renderer*, SDL::Vec2i const&, int, unsigned char*)
SDL3Lite/source/Renders/OpenGL1/OpenGL1Texture.cpp
OpenGL1Texture::OpenGL1Texture(SDL_Renderer* render, const Vec2i& size, int bpp, uint8_t* pixels) : _render(render), _texture(0), _size(size) { GLint format = BppToFormat(bpp); int sz = SelectTextureSize(_size); _quad = Vec2i(sz, sz); _texture = CreateTexture(_quad.x, _quad.y, format); CopyTexture(_texture, Vec2i(0, 0), _size, pixels, bpp); }
O3
cpp
SDL::OpenGL1Texture::OpenGL1Texture(SDL_Renderer*, SDL::Vec2i const&, int, unsigned char*): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x212c0 movq 0x10(%rsp), %rdi movq 0x17d69(%rip), %rax # 0x43aa0 addq $0x10, %rax movq %rax, (%rdi) movq 0x58(%rsp), %rax movq %rax, 0x8(%rdi) movl $0x0, 0x10(%rdi) movq 0x50(%rsp), %rax movq (%rax), %rax movq %rax, 0x14(%rdi) addq $0x1c, %rdi callq 0x21a70 jmp 0x2bd65 movl 0x4c(%rsp), %edi callq 0x217f0 movl %eax, 0xc(%rsp) jmp 0x2bd74 movq 0x10(%rsp), %rdi movl 0xc(%rsp), %eax movl %eax, 0x30(%rsp) addq $0x14, %rdi callq 0x21280 movl %eax, 0x8(%rsp) jmp 0x2bd90 movl 0x8(%rsp), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %edx leaq 0x24(%rsp), %rdi movl %edx, %esi callq 0x21920 jmp 0x2bdaa movq 0x10(%rsp), %rdi addq $0x1c, %rdi leaq 0x24(%rsp), %rsi callq 0x212f0 jmp 0x2bdbf movq 0x10(%rsp), %rax movl 0x1c(%rax), %edi movl 0x20(%rax), %esi movl 0x30(%rsp), %edx callq 0x220f0 movl %eax, 0x4(%rsp) jmp 0x2bdd9 movq 0x10(%rsp), %rax movl 0x4(%rsp), %ecx movl %ecx, 0x10(%rax) movl 0x10(%rax), %eax movl %eax, (%rsp) leaq 0x1c(%rsp), %rdi xorl %edx, %edx movl %edx, %esi callq 0x21920 jmp 0x2bdfb movl (%rsp), %edi movq 0x10(%rsp), %rdx addq $0x14, %rdx movq 0x40(%rsp), %rcx movl 0x4c(%rsp), %r8d leaq 0x1c(%rsp), %rsi callq 0x21510 jmp 0x2be1d addq $0x68, %rsp retq movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) callq 0x216d0 movq 0x38(%rsp), %rdi callq 0x22300 nopw %cs:(%rax,%rax)
_ZN3SDL14OpenGL1TextureC2EP12SDL_RendererRKNS_5Vec2iEiPh: sub rsp, 68h; Alternative name is 'SDL::OpenGL1Texture::OpenGL1Texture(SDL_Renderer *, SDL::Vec2i const&, int, unsigned char *)' mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_1C+4], rdx mov dword ptr [rsp+68h+var_1C], ecx mov [rsp+68h+var_28], r8 mov rdi, [rsp+68h+var_8]; this mov [rsp+68h+var_58], rdi call __ZN11SDL_TextureC2Ev; SDL_Texture::SDL_Texture(void) mov rdi, [rsp+68h+var_58] mov rax, cs:_ZTVN3SDL14OpenGL1TextureE_ptr add rax, 10h mov [rdi], rax mov rax, [rsp+68h+var_10] mov [rdi+8], rax mov dword ptr [rdi+10h], 0 mov rax, [rsp+68h+var_1C+4] mov rax, [rax] mov [rdi+14h], rax add rdi, 1Ch; this call __ZN3SDL5Vec2iC2Ev; SDL::Vec2i::Vec2i(void) jmp short $+2 loc_2BD65: mov edi, dword ptr [rsp+68h+var_1C]; this call __ZN3SDL11BppToFormatEi; SDL::BppToFormat(int) mov [rsp+68h+var_5C], eax jmp short $+2 loc_2BD74: mov rdi, [rsp+68h+var_58] mov eax, [rsp+68h+var_5C] mov [rsp+68h+var_38], eax add rdi, 14h; this call __ZN3SDL17SelectTextureSizeERKNS_5Vec2iE; SDL::SelectTextureSize(SDL::Vec2i const&) mov [rsp+68h+var_60], eax jmp short $+2 loc_2BD90: mov eax, [rsp+68h+var_60] mov [rsp+68h+var_3C], eax mov edx, [rsp+68h+var_3C]; int lea rdi, [rsp+68h+var_44]; this mov esi, edx; int call __ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) jmp short $+2 loc_2BDAA: mov rdi, [rsp+68h+var_58] add rdi, 1Ch lea rsi, [rsp+68h+var_44] call __ZN3SDL5Vec2iaSERKS0_; SDL::Vec2i::operator=(SDL::Vec2i const&) jmp short $+2 loc_2BDBF: mov rax, [rsp+68h+var_58] mov edi, [rax+1Ch]; this mov esi, [rax+20h]; int mov edx, [rsp+68h+var_38]; int call __ZN3SDL13CreateTextureEiii; SDL::CreateTexture(int,int,int) mov dword ptr [rsp+68h+var_68+4], eax jmp short $+2 loc_2BDD9: mov rax, [rsp+68h+var_58] mov ecx, dword ptr [rsp+68h+var_68+4] mov [rax+10h], ecx mov eax, [rax+10h] mov dword ptr [rsp+68h+var_68], eax lea rdi, [rsp+68h+var_4C]; this xor edx, edx; int mov esi, edx; int call __ZN3SDL5Vec2iC2Eii; SDL::Vec2i::Vec2i(int,int) jmp short $+2 loc_2BDFB: mov edi, dword ptr [rsp+68h+var_68]; this mov rdx, [rsp+68h+var_58] add rdx, 14h; SDL::Vec2i * mov rcx, [rsp+68h+var_28]; SDL::Vec2i * mov r8d, dword ptr [rsp+68h+var_1C]; unsigned __int8 * lea rsi, [rsp+68h+var_4C]; unsigned int call __ZN3SDL11CopyTextureEjRKNS_5Vec2iES2_Phi; SDL::CopyTexture(uint,SDL::Vec2i const&,SDL::Vec2i const&,uchar *,int) jmp short $+2 loc_2BE1D: add rsp, 68h retn mov rdi, [rsp+arg_8]; this mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax call __ZN11SDL_TextureD2Ev; SDL_Texture::~SDL_Texture() mov rdi, [rsp+arg_30] call __Unwind_Resume
long long SDL::OpenGL1Texture::OpenGL1Texture( SDL::OpenGL1Texture *this, SDL_Renderer *a2, const SDL::Vec2i *a3, int a4, SDL::Vec2i *a5) { int v5; // ecx int v6; // r9d unsigned int v8; // [rsp+0h] [rbp-68h] unsigned int v9; // [rsp+1Ch] [rbp-4Ch] BYREF _BYTE v10[8]; // [rsp+24h] [rbp-44h] BYREF int v11; // [rsp+2Ch] [rbp-3Ch] int v12; // [rsp+30h] [rbp-38h] SDL::Vec2i *v13; // [rsp+40h] [rbp-28h] _DWORD v14[3]; // [rsp+4Ch] [rbp-1Ch] SDL_Renderer *v15; // [rsp+58h] [rbp-10h] SDL_Texture *v16; // [rsp+60h] [rbp-8h] v16 = this; v15 = a2; *(_QWORD *)&v14[1] = a3; v14[0] = a4; v13 = a5; SDL_Texture::SDL_Texture(this); *(_QWORD *)this = &`vtable for'SDL::OpenGL1Texture + 2; *((_QWORD *)this + 1) = v15; *((_DWORD *)this + 4) = 0; *(_QWORD *)((char *)this + 20) = **(_QWORD **)&v14[1]; SDL::Vec2i::Vec2i((SDL::OpenGL1Texture *)((char *)this + 28)); v12 = SDL::BppToFormat((SDL *)v14[0], (int)a2); v11 = SDL::SelectTextureSize((SDL::OpenGL1Texture *)((char *)this + 20), a2); SDL::Vec2i::Vec2i((SDL::Vec2i *)v10, v11, v11); SDL::Vec2i::operator=((char *)this + 28, v10); *((_DWORD *)this + 4) = SDL::CreateTexture((SDL *)*((unsigned int *)this + 7), *((_DWORD *)this + 8), v12, v5); v8 = *((_DWORD *)this + 4); SDL::Vec2i::Vec2i((SDL::Vec2i *)&v9, 0, 0); return SDL::CopyTexture( (SDL *)v8, (unsigned int)&v9, (SDL::OpenGL1Texture *)((char *)this + 20), v13, (unsigned __int8 *)v14[0], v6); }
OpenGL1Texture: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RDI CALL 0x001212c0 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [0x00143aa0] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RDI + 0x8],RAX MOV dword ptr [RDI + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0x14],RAX ADD RDI,0x1c LAB_0012bd5e: CALL 0x00121a70 JMP 0x0012bd65 LAB_0012bd65: MOV EDI,dword ptr [RSP + 0x4c] CALL 0x001217f0 MOV dword ptr [RSP + 0xc],EAX JMP 0x0012bd74 LAB_0012bd74: MOV RDI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x30],EAX ADD RDI,0x14 CALL 0x00121280 MOV dword ptr [RSP + 0x8],EAX JMP 0x0012bd90 LAB_0012bd90: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x2c],EAX MOV EDX,dword ptr [RSP + 0x2c] LEA RDI,[RSP + 0x24] MOV ESI,EDX CALL 0x00121920 JMP 0x0012bdaa LAB_0012bdaa: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x1c LEA RSI,[RSP + 0x24] CALL 0x001212f0 JMP 0x0012bdbf LAB_0012bdbf: MOV RAX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RAX + 0x1c] MOV ESI,dword ptr [RAX + 0x20] MOV EDX,dword ptr [RSP + 0x30] CALL 0x001220f0 MOV dword ptr [RSP + 0x4],EAX JMP 0x0012bdd9 LAB_0012bdd9: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x4] MOV dword ptr [RAX + 0x10],ECX MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RSP],EAX LEA RDI,[RSP + 0x1c] XOR EDX,EDX MOV ESI,EDX CALL 0x00121920 JMP 0x0012bdfb LAB_0012bdfb: MOV EDI,dword ptr [RSP] MOV RDX,qword ptr [RSP + 0x10] ADD RDX,0x14 MOV RCX,qword ptr [RSP + 0x40] MOV R8D,dword ptr [RSP + 0x4c] LEA RSI,[RSP + 0x1c] CALL 0x00121510 LAB_0012be1b: JMP 0x0012be1d LAB_0012be1d: ADD RSP,0x68 RET
/* SDL::OpenGL1Texture::OpenGL1Texture(SDL_Renderer*, SDL::Vec2i const&, int, unsigned char*) */ void __thiscall SDL::OpenGL1Texture::OpenGL1Texture (OpenGL1Texture *this,SDL_Renderer *param_1,Vec2i *param_2,int param_3,uchar *param_4) { uint uVar1; int4 uVar2; Vec2i local_4c [8]; Vec2i local_44 [8]; int local_3c; int local_38; uchar *local_28; int local_1c; Vec2i *local_18; SDL_Renderer *local_10; OpenGL1Texture *local_8; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; SDL_Texture::SDL_Texture((SDL_Texture *)this); *(int **)this = PTR_vtable_00143aa0 + 0x10; *(SDL_Renderer **)(this + 8) = local_10; *(int4 *)(this + 0x10) = 0; *(int8 *)(this + 0x14) = *(int8 *)local_18; /* try { // try from 0012bd5e to 0012be1a has its CatchHandler @ 0012be22 */ Vec2i::Vec2i((Vec2i *)(this + 0x1c)); local_38 = BppToFormat(local_1c); local_3c = SelectTextureSize((Vec2i *)(this + 0x14)); Vec2i::Vec2i(local_44,local_3c,local_3c); Vec2i::operator=((Vec2i *)(this + 0x1c),local_44); uVar2 = CreateTexture(*(int *)(this + 0x1c),*(int *)(this + 0x20),local_38); *(int4 *)(this + 0x10) = uVar2; uVar1 = *(uint *)(this + 0x10); Vec2i::Vec2i(local_4c,0,0); CopyTexture(uVar1,local_4c,(Vec2i *)(this + 0x14),local_28,local_1c); return; }
65,738
fill_nearly_sorted
davidesantangelo[P]vsort/tests/test_performance.c
static void fill_nearly_sorted(int *arr, int n, double disorder_ratio) { fill_sorted(arr, n); int swaps = (int)(n * disorder_ratio); for (int i = 0; i < swaps; i++) { int idx1 = rand() % n; int idx2 = rand() % n; int temp = arr[idx1]; arr[idx1] = arr[idx2]; arr[idx2] = temp; } }
O0
c
fill_nearly_sorted: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movsd %xmm0, -0x18(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x1630 cvtsi2sdl -0xc(%rbp), %xmm0 mulsd -0x18(%rbp), %xmm0 cvttsd2si %xmm0, %eax movl %eax, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x1745 callq 0x1180 cltd idivl -0xc(%rbp) movl %edx, -0x24(%rbp) callq 0x1180 cltd idivl -0xc(%rbp) movl %edx, -0x28(%rbp) movq -0x8(%rbp), %rax movslq -0x24(%rbp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x2c(%rbp) movq -0x8(%rbp), %rax movslq -0x28(%rbp), %rcx movl (%rax,%rcx,4), %edx movq -0x8(%rbp), %rax movslq -0x24(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x2c(%rbp), %edx movq -0x8(%rbp), %rax movslq -0x28(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x16e8 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
fill_nearly_sorted: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi movsd [rbp+var_18], xmm0 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] call fill_sorted cvtsi2sd xmm0, [rbp+var_C] mulsd xmm0, [rbp+var_18] cvttsd2si eax, xmm0 mov [rbp+var_1C], eax mov [rbp+var_20], 0 loc_16E8: mov eax, [rbp+var_20] cmp eax, [rbp+var_1C] jge short loc_1745 call _rand cdq idiv [rbp+var_C] mov [rbp+var_24], edx call _rand cdq idiv [rbp+var_C] mov [rbp+var_28], edx mov rax, [rbp+var_8] movsxd rcx, [rbp+var_24] mov eax, [rax+rcx*4] mov [rbp+var_2C], eax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_28] mov edx, [rax+rcx*4] mov rax, [rbp+var_8] movsxd rcx, [rbp+var_24] mov [rax+rcx*4], edx mov edx, [rbp+var_2C] mov rax, [rbp+var_8] movsxd rcx, [rbp+var_28] mov [rax+rcx*4], edx mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_16E8 loc_1745: add rsp, 30h pop rbp retn
long long fill_nearly_sorted(long long a1, int a2, double a3) { long long result; // rax int v4; // [rsp+4h] [rbp-2Ch] int v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+Ch] [rbp-24h] int i; // [rsp+10h] [rbp-20h] fill_sorted(a1, a2); for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= (int)((double)a2 * a3) ) break; v6 = (int)rand() % a2; v5 = (int)rand() % a2; v4 = *(_DWORD *)(a1 + 4LL * v6); *(_DWORD *)(a1 + 4LL * v6) = *(_DWORD *)(a1 + 4LL * v5); *(_DWORD *)(a1 + 4LL * v5) = v4; } return result; }
fill_nearly_sorted: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOVSD qword ptr [RBP + -0x18],XMM0 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] CALL 0x00101630 CVTSI2SD XMM0,dword ptr [RBP + -0xc] MULSD XMM0,qword ptr [RBP + -0x18] CVTTSD2SI EAX,XMM0 MOV dword ptr [RBP + -0x1c],EAX MOV dword ptr [RBP + -0x20],0x0 LAB_001016e8: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x00101745 CALL 0x00101180 CDQ IDIV dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x24],EDX CALL 0x00101180 CDQ IDIV dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x28],EDX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x28] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x24] MOV dword ptr [RAX + RCX*0x4],EDX MOV EDX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x28] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001016e8 LAB_00101745: ADD RSP,0x30 POP RBP RET
void fill_nearly_sorted(double param_1,long param_2,int param_3) { int4 uVar1; int iVar2; int iVar3; int4 local_28; fill_sorted(param_2,param_3); for (local_28 = 0; local_28 < (int)((double)param_3 * param_1); local_28 = local_28 + 1) { iVar2 = rand(); iVar3 = rand(); uVar1 = *(int4 *)(param_2 + (long)(iVar2 % param_3) * 4); *(int4 *)(param_2 + (long)(iVar2 % param_3) * 4) = *(int4 *)(param_2 + (long)(iVar3 % param_3) * 4); *(int4 *)(param_2 + (long)(iVar3 % param_3) * 4) = uVar1; } return; }
65,739
ma_mmap_pread
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_mmap_pread(MARIA_HA *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("maria_read with mmap %d\n", info->dfile.file)); if (info->s->lock_key_trees) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(Buffer, info->s->file_map + offset, Count); if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags); } }
O0
c
ma_mmap_pread: 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) jmp 0x4a60e movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a63d movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 leaq 0x1101c3(%rip), %rsi # 0x15a7f6 movl $0x84, %edx callq 0x4a710 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xa00(%rax), %rax movq -0x28(%rbp), %rcx addq -0x20(%rbp), %rcx cmpq %rcx, %rax jb 0x4a6a4 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x5f0(%rax), %rsi addq -0x28(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x2a0c0 movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a69a movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 callq 0x4a780 movq $0x0, -0x8(%rbp) jmp 0x4a6fa movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a6c7 movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 callq 0x4a780 movq -0x10(%rbp), %rax movl 0x480(%rax), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x30(%rbp), %rax leaq 0x11010e(%rip), %rdi # 0x15a7f6 movl $0x98, %esi movq %rax, (%rsp) callq 0x4a7f0 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_mmap_pread: 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 jmp short $+2 loc_4A60E: mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A63D mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 84h call inline_mysql_rwlock_rdlock_0 loc_4A63D: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+0A00h] mov rcx, [rbp+var_28] add rcx, [rbp+var_20] cmp rax, rcx jb short loc_4A6A4 mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+5F0h] add rsi, [rbp+var_28] mov rdx, [rbp+var_20] call _memcpy mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A69A mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h call inline_mysql_rwlock_unlock_1 loc_4A69A: mov [rbp+var_8], 0 jmp short loc_4A6FA loc_4A6A4: mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A6C7 mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h call inline_mysql_rwlock_unlock_1 loc_4A6C7: mov rax, [rbp+var_10] mov edx, [rax+480h] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_28] mov rax, [rbp+var_30] lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 98h mov [rsp+40h+var_40], rax call inline_mysql_file_pread_0 mov [rbp+var_8], rax loc_4A6FA: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_mmap_pread(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_rdlock_0( *(_QWORD *)a1 + 2936LL, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 132LL); if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) < (unsigned long long)(a3 + a4) ) { if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_unlock_1(*(_QWORD *)a1 + 2936LL); return inline_mysql_file_pread_0( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 152, a1[288], a2, a3, a4, a5); } else { memcpy(a2, a4 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL), a3); if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_unlock_1(*(_QWORD *)a1 + 2936LL); return 0LL; } }
_ma_mmap_pread: 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 JMP 0x0014a60e LAB_0014a60e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a63d MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 LEA RSI,[0x25a7f6] MOV EDX,0x84 CALL 0x0014a710 LAB_0014a63d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xa00] MOV RCX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JC 0x0014a6a4 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x5f0] ADD RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0012a0c0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a69a MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 CALL 0x0014a780 LAB_0014a69a: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014a6fa LAB_0014a6a4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a6c7 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 CALL 0x0014a780 LAB_0014a6c7: MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] LEA RDI,[0x25a7f6] MOV ESI,0x98 MOV qword ptr [RSP],RAX CALL 0x0014a7f0 MOV qword ptr [RBP + -0x8],RAX LAB_0014a6fa: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 _ma_mmap_pread(long *param_1,void *param_2,size_t param_3,long param_4,int8 param_5) { int8 local_10; if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_rdlock (*param_1 + 0xb78,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c" ,0x84); } if (*(ulong *)(*param_1 + 0xa00) < param_4 + param_3) { if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_unlock(*param_1 + 0xb78); } local_10 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x98, (int)param_1[0x90],param_2,param_3,param_4,param_5); } else { memcpy(param_2,(void *)(*(long *)(*param_1 + 0x5f0) + param_4),param_3); if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_unlock(*param_1 + 0xb78); } local_10 = 0; } return local_10; }
65,740
google::protobuf::io::FileInputStream::~FileInputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.h
class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL : public ZeroCopyInputStream { public: // Creates a stream that reads from the given Unix file descriptor. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit FileInputStream(int file_descriptor, int block_size = -1); // Flushes any buffers and closes the underlying file. Returns false if // an error occurs during the process; use GetErrno() to examine the error. // Even if an error occurs, the file descriptor is closed when this returns. bool Close(); // By default, the file descriptor is not closed when the stream is // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: // This leaves no way for the caller to detect if close() fails. If // detecting close() errors is important to you, you should arrange // to close the descriptor yourself. void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } // If an I/O error has occurred on this file descriptor, this is the // errno from that error. Otherwise, this is zero. Once an error // occurs, the stream is broken and all subsequent operations will // fail. int GetErrno() const { return copying_input_.GetErrno(); } // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream PROTOBUF_FUTURE_FINAL : public CopyingInputStream { public: CopyingFileInputStream(int file_descriptor); ~CopyingFileInputStream() override; bool Close(); void SetCloseOnDelete(bool value) { close_on_delete_ = value; } int GetErrno() const { return errno_; } // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; int Skip(int count) override; private: // The file descriptor. const int file_; bool close_on_delete_; bool is_closed_; // The errno of the I/O error, if one has occurred. Otherwise, zero. int errno_; // Did we try to seek once and fail? If so, we assume this file descriptor // doesn't support seeking and won't try again. bool previous_seek_failed_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); }
O0
c
google::protobuf::io::FileInputStream::~FileInputStream(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x176870 movq 0x8(%rsp), %rdi callq 0x8fb70 addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN6google8protobuf2io15FileInputStreamD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN6google8protobuf2io15FileInputStreamD2Ev; google::protobuf::io::FileInputStream::~FileInputStream() mov rdi, [rsp+18h+var_10]; void * call __ZdlPv; operator delete(void *) add rsp, 18h retn
void google::protobuf::io::FileInputStream::~FileInputStream(google::protobuf::io::FileInputStream *this) { google::protobuf::io::FileInputStream::~FileInputStream(this); operator delete(this); }
65,741
google::protobuf::io::FileInputStream::~FileInputStream()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.h
class PROTOBUF_EXPORT FileInputStream PROTOBUF_FUTURE_FINAL : public ZeroCopyInputStream { public: // Creates a stream that reads from the given Unix file descriptor. // If a block_size is given, it specifies the number of bytes that // should be read and returned with each call to Next(). Otherwise, // a reasonable default is used. explicit FileInputStream(int file_descriptor, int block_size = -1); // Flushes any buffers and closes the underlying file. Returns false if // an error occurs during the process; use GetErrno() to examine the error. // Even if an error occurs, the file descriptor is closed when this returns. bool Close(); // By default, the file descriptor is not closed when the stream is // destroyed. Call SetCloseOnDelete(true) to change that. WARNING: // This leaves no way for the caller to detect if close() fails. If // detecting close() errors is important to you, you should arrange // to close the descriptor yourself. void SetCloseOnDelete(bool value) { copying_input_.SetCloseOnDelete(value); } // If an I/O error has occurred on this file descriptor, this is the // errno from that error. Otherwise, this is zero. Once an error // occurs, the stream is broken and all subsequent operations will // fail. int GetErrno() const { return copying_input_.GetErrno(); } // implements ZeroCopyInputStream ---------------------------------- bool Next(const void** data, int* size) override; void BackUp(int count) override; bool Skip(int count) override; int64_t ByteCount() const override; private: class PROTOBUF_EXPORT CopyingFileInputStream PROTOBUF_FUTURE_FINAL : public CopyingInputStream { public: CopyingFileInputStream(int file_descriptor); ~CopyingFileInputStream() override; bool Close(); void SetCloseOnDelete(bool value) { close_on_delete_ = value; } int GetErrno() const { return errno_; } // implements CopyingInputStream --------------------------------- int Read(void* buffer, int size) override; int Skip(int count) override; private: // The file descriptor. const int file_; bool close_on_delete_; bool is_closed_; // The errno of the I/O error, if one has occurred. Otherwise, zero. int errno_; // Did we try to seek once and fail? If so, we assume this file descriptor // doesn't support seeking and won't try again. bool previous_seek_failed_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(CopyingFileInputStream); }
O3
c
google::protobuf::io::FileInputStream::~FileInputStream(): pushq %rbx movq %rdi, %rbx leaq 0x14f849(%rip), %rax # 0x20bee8 movq %rax, (%rdi) addq $0x20, %rdi callq 0x7ad70 leaq 0x8(%rbx), %rdi callq 0xbbe6c movq %rbx, %rdi popq %rbx jmp 0x2d160 nop
_ZN6google8protobuf2io15FileInputStreamD0Ev: push rbx mov rbx, rdi lea rax, off_20BEE8 mov [rdi], rax add rdi, 20h ; ' '; this call _ZN6google8protobuf2io25CopyingInputStreamAdaptorD2Ev; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor() lea rdi, [rbx+8]; this call _ZN6google8protobuf2io15FileInputStream22CopyingFileInputStreamD2Ev; google::protobuf::io::FileInputStream::CopyingFileInputStream::~CopyingFileInputStream() mov rdi, rbx; void * pop rbx jmp __ZdlPv; operator delete(void *)
void google::protobuf::io::FileInputStream::~FileInputStream( google::protobuf::io::FileInputStream *this, int a2) { *(_QWORD *)this = off_20BEE8; google::protobuf::io::CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor((google::protobuf::io::FileInputStream *)((char *)this + 32)); google::protobuf::io::FileInputStream::CopyingFileInputStream::~CopyingFileInputStream( (google::protobuf::io::FileInputStream *)((char *)this + 8), a2); operator delete(this); }
~FileInputStream: PUSH RBX MOV RBX,RDI LEA RAX,[0x30bee8] MOV qword ptr [RDI],RAX ADD RDI,0x20 CALL 0x0017ad70 LEA RDI,[RBX + 0x8] CALL 0x001bbe6c MOV RDI,RBX POP RBX JMP 0x0012d160
/* google::protobuf::io::FileInputStream::~FileInputStream() */ void __thiscall google::protobuf::io::FileInputStream::~FileInputStream(FileInputStream *this) { *(int ***)this = &PTR__FileInputStream_0030bee8; CopyingInputStreamAdaptor::~CopyingInputStreamAdaptor((CopyingInputStreamAdaptor *)(this + 0x20)); CopyingFileInputStream::~CopyingFileInputStream((CopyingFileInputStream *)(this + 8)); operator_delete(this); return; }
65,742
SchemaConverter::SchemaConverter(std::function<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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
SchemaConverter( const std::function<json(const std::string &)> & fetch_json, bool dotall, bool compact_spaces) : _fetch_json(fetch_json), _dotall(dotall) { _rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE; }
O2
cpp
SchemaConverter::SchemaConverter(std::function<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> (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx callq 0x98acc movb %r14b, 0x20(%rbx) leaq 0x30(%rbx), %rax andl $0x0, 0x30(%rbx) andq $0x0, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) andq $0x0, 0x50(%rbx) leaq 0x28(%rbx), %r14 leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) pushq $0x1 popq %rax movq %rax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x78(%rbx) movups %xmm0, 0x80(%rbx) leaq 0xc0(%rbx), %rdx movq %rdx, 0x90(%rbx) movq %rax, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movl %ecx, 0xb0(%rbx) movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xe8(%rbx) testl %ebp, %ebp je 0x984f5 leaq 0x2c43c(%rip), %rsi # 0xc4920 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30aea jmp 0x98506 leaq 0x74dd4(%rip), %rsi # 0x10d2d0 leaq 0x8(%rsp), %rdi callq 0x24c50 leaq 0x2c636(%rip), %rsi # 0xc4b43 leaq 0x28(%rsp), %rdi leaq 0x6(%rsp), %rdx callq 0x30aea leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x98b12 leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x244e0 leaq 0x28(%rsp), %rdi callq 0x25298 leaq 0x8(%rsp), %rdi callq 0x25298 testb %bpl, %bpl addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0x98573 movq %rax, %r15 jmp 0x9857d movq %rax, %r15 leaq 0x28(%rsp), %rdi callq 0x25298 leaq 0x8(%rsp), %rdi callq 0x25298 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 testb %bpl, %bpl leaq 0xe0(%rbx), %rdi leaq 0xc8(%rbx), %rbp callq 0x30b26 movq %rbp, %rdi callq 0x30b26 movq %r13, %rdi callq 0x682c8 movq %r12, %rdi callq 0x98f60 movq %r14, %rdi callq 0x9901e movq %rbx, %rdi callq 0x53a4e movq %r15, %rdi callq 0x25010
_ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14d, edx mov rbx, rdi call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)>::function(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&) mov [rbx+20h], r14b lea rax, [rbx+30h] and dword ptr [rbx+30h], 0 and qword ptr [rbx+38h], 0 mov [rbx+40h], rax mov [rbx+48h], rax and qword ptr [rbx+50h], 0 lea r14, [rbx+28h] lea rax, [rbx+88h] mov [rbx+58h], rax push 1 pop rax mov [rbx+60h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov ecx, 3F800000h mov [rbx+78h], ecx movups xmmword ptr [rbx+80h], xmm0 lea rdx, [rbx+0C0h] mov [rbx+90h], rdx mov [rbx+98h], rax movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], ecx movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0E8h], xmm0 test ebp, ebp jz short loc_984F5 lea rsi, asc_C4920; "\" \"?" lea rdi, [rsp+78h+var_70] lea rdx, [rsp+78h+var_71] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_98506 loc_984F5: lea rsi, _ZL10SPACE_RULEB5cxx11; SPACE_RULE lea rdi, [rsp+78h+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) loc_98506: lea rsi, aSpace+7; "space" lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_72] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, [rsp+78h+var_50] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_70] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rdi, [rsp+78h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+78h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_98573 mov r15, rax jmp short loc_9857D mov r15, rax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_98573: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_9857D: lea r12, [rbx+58h] lea r13, [rbx+90h] test bpl, bpl lea rdi, [rbx+0E0h] lea rbp, [rbx+0C8h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, r12 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, rbx; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r15 call __Unwind_Resume
void SchemaConverter::SchemaConverter(long long a1, long long a2, char a3, int a4) { long long v6; // rax _QWORD v7[4]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[10]; // [rsp+28h] [rbp-50h] BYREF std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&)>::function(); *(_BYTE *)(a1 + 32) = a3; *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = 0LL; *(_QWORD *)(a1 + 64) = a1 + 48; *(_QWORD *)(a1 + 72) = a1 + 48; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 192; *(_QWORD *)(a1 + 152) = 1LL; *(_OWORD *)(a1 + 160) = 0LL; *(_DWORD *)(a1 + 176) = 1065353216; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 232) = 0LL; if ( a4 ) std::string::basic_string<std::allocator<char>>(v7, (long long)"\" \"?"); else std::string::basic_string(v7, &SPACE_RULE[abi:cxx11]); std::string::basic_string<std::allocator<char>>(v8, (long long)"space"); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v8); std::string::_M_assign(v6, v7); std::string::~string(v8); std::string::~string(v7); }
SchemaConverter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI CALL 0x00198acc MOV byte ptr [RBX + 0x20],R14B LEA RAX,[RBX + 0x30] AND dword ptr [RBX + 0x30],0x0 AND qword ptr [RBX + 0x38],0x0 MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX AND qword ptr [RBX + 0x50],0x0 LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX PUSH 0x1 POP RAX MOV qword ptr [RBX + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RBX + 0x78],ECX MOVUPS xmmword ptr [RBX + 0x80],XMM0 LEA RDX,[RBX + 0xc0] MOV qword ptr [RBX + 0x90],RDX MOV qword ptr [RBX + 0x98],RAX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV dword ptr [RBX + 0xb0],ECX MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xe8],XMM0 TEST EBP,EBP JZ 0x001984f5 LAB_001984dd: LEA RSI,[0x1c4920] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00130aea JMP 0x00198506 LAB_001984f5: LEA RSI,[0x20d2d0] LEA RDI,[RSP + 0x8] CALL 0x00124c50 LAB_00198506: LEA RSI,[0x1c4b43] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x6] CALL 0x00130aea LAB_0019851c: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x00198b12 LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x001244e0 LAB_00198536: LEA RDI,[RSP + 0x28] CALL 0x00125298 LEA RDI,[RSP + 0x8] CALL 0x00125298 TEST BPL,BPL ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> (std::__cxx11::string const&)> const&, bool, bool) */ void __thiscall SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3) { string *psVar1; int7 in_register_00000009; allocator local_72; allocator local_71; string local_70 [32]; string local_50 [32]; std:: function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&)> ::function((function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&)> *)this,param_1); this[0x20] = (SchemaConverter)param_2; *(int4 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(SchemaConverter **)(this + 0x40) = this + 0x30; *(SchemaConverter **)(this + 0x48) = this + 0x30; *(int8 *)(this + 0x50) = 0; *(SchemaConverter **)(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; *(SchemaConverter **)(this + 0x90) = this + 0xc0; *(int8 *)(this + 0x98) = 1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0x3f800000; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::string(local_70,(string *)SPACE_RULE_abi_cxx11_); } else { /* try { // try from 001984dd to 00198505 has its CatchHandler @ 00198561 */ std::__cxx11::string::string<std::allocator<char>>(local_70,"\" \"?",&local_71); } /* try { // try from 00198506 to 0019851b has its CatchHandler @ 0019855c */ std::__cxx11::string::string<std::allocator<char>>(local_50,"space",&local_72); /* try { // try from 0019851c to 00198535 has its CatchHandler @ 00198566 */ 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 + 0x28),local_50); std::__cxx11::string::_M_assign(psVar1); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string(local_70); return; }
65,743
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom()
monkey531[P]llama/common/json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom(): pushq %rbx movq %rdi, %rbx callq 0x65fcc cmpl $0xef, %eax jne 0x65711 movq %rbx, %rdi callq 0x65fcc cmpl $0xbb, %eax jne 0x6571d movq %rbx, %rdi callq 0x65fcc cmpl $0xbf, %eax sete %al jmp 0x6571f movq %rbx, %rdi callq 0x66042 movb $0x1, %al jmp 0x6571f xorl %eax, %eax popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: push rbx mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0EFh jnz short loc_65711 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BBh jnz short loc_6571D mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BFh setz al jmp short loc_6571F loc_65711: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov al, 1 jmp short loc_6571F loc_6571D: xor eax, eax loc_6571F: pop rbx retn
bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( long long a1) { if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get)() == 239 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); return 1; }
skip_bom: PUSH RBX MOV RBX,RDI CALL 0x00165fcc CMP EAX,0xef JNZ 0x00165711 MOV RDI,RBX CALL 0x00165fcc CMP EAX,0xbb JNZ 0x0016571d MOV RDI,RBX CALL 0x00165fcc CMP EAX,0xbf SETZ AL JMP 0x0016571f LAB_00165711: MOV RDI,RBX CALL 0x00166042 MOV AL,0x1 JMP 0x0016571f LAB_0016571d: XOR EAX,EAX LAB_0016571f: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::skip_bom() */ bool __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; bool bVar2; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); if (iVar1 == 0xbb) { iVar1 = get(this); bVar2 = iVar1 == 0xbf; } else { bVar2 = false; } } else { unget(this); bVar2 = true; } return bVar2; }
65,744
ma_set_share_data_file_length
eloqsql/storage/maria/ma_state.c
void _ma_set_share_data_file_length(MARIA_SHARE *share, ulonglong new_length) { if (!share->internal_table) mysql_mutex_lock(&share->intern_lock); if (share->state.state.data_file_length < new_length) { share->state.state.data_file_length= new_length; if (new_length >= share->base.max_data_file_length) { /* Give an error on next insert */ share->state.changed|= STATE_DATA_FILE_FULL; } } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); }
O3
c
ma_set_share_data_file_length: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx cmpb $0x0, 0x7e2(%rdi) jne 0x44028 leaq 0x8f0(%rbx), %rdi cmpq $0x0, 0x930(%rbx) jne 0x4406f callq 0x29210 cmpq %r14, 0x40(%rbx) jae 0x44042 movq %r14, 0x40(%rbx) cmpq %r14, 0x368(%rbx) ja 0x44042 orb $0x10, 0x171(%rbx) cmpb $0x0, 0x7e2(%rbx) je 0x44050 popq %rbx popq %r14 popq %rbp retq movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x44082 movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x291d0 leaq 0x9679a(%rip), %rsi # 0xda810 movl $0x313, %edx # imm = 0x313 callq 0x2ebaf jmp 0x44028 leaq 0x341f87(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x44063
_ma_set_share_data_file_length: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi cmp byte ptr [rdi+7E2h], 0 jnz short loc_44028 lea rdi, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz short loc_4406F call _pthread_mutex_lock loc_44028: cmp [rbx+40h], r14 jnb short loc_44042 mov [rbx+40h], r14 cmp [rbx+368h], r14 ja short loc_44042 or byte ptr [rbx+171h], 10h loc_44042: cmp byte ptr [rbx+7E2h], 0 jz short loc_44050 pop rbx pop r14 pop rbp retn loc_44050: mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz short loc_44082 loc_44063: mov rdi, rbx pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_4406F: lea rsi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 313h call psi_mutex_lock jmp short loc_44028 loc_44082: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_44063
long long ma_set_share_data_file_length(long long a1, unsigned long long a2) { long long v3; // rdi long long result; // rax long long v5; // rdi long long v6; // rbx if ( !*(_BYTE *)(a1 + 2018) ) { v3 = a1 + 2288; if ( *(_QWORD *)(a1 + 2352) ) result = psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x313u); else result = pthread_mutex_lock(v3); } if ( *(_QWORD *)(a1 + 64) < a2 ) { *(_QWORD *)(a1 + 64) = a2; if ( *(_QWORD *)(a1 + 872) <= a2 ) *(_BYTE *)(a1 + 369) |= 0x10u; } if ( !*(_BYTE *)(a1 + 2018) ) { v5 = *(_QWORD *)(a1 + 2352); v6 = a1 + 2288; if ( v5 ) PSI_server[44](); return pthread_mutex_unlock(v6); } return result; }
_ma_set_share_data_file_length: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CMP byte ptr [RDI + 0x7e2],0x0 JNZ 0x00144028 LEA RDI,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x0014406f CALL 0x00129210 LAB_00144028: CMP qword ptr [RBX + 0x40],R14 JNC 0x00144042 MOV qword ptr [RBX + 0x40],R14 CMP qword ptr [RBX + 0x368],R14 JA 0x00144042 OR byte ptr [RBX + 0x171],0x10 LAB_00144042: CMP byte ptr [RBX + 0x7e2],0x0 JZ 0x00144050 POP RBX POP R14 POP RBP RET LAB_00144050: MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x00144082 LAB_00144063: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001291d0 LAB_0014406f: LEA RSI,[0x1da810] MOV EDX,0x313 CALL 0x0012ebaf JMP 0x00144028 LAB_00144082: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00144063
void _ma_set_share_data_file_length(long param_1,ulong param_2) { if (*(char *)(param_1 + 0x7e2) == '\0') { if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0)); } else { psi_mutex_lock((pthread_mutex_t *)(param_1 + 0x8f0), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x313); } } if ((*(ulong *)(param_1 + 0x40) < param_2) && (*(ulong *)(param_1 + 0x40) = param_2, *(ulong *)(param_1 + 0x368) <= param_2)) { *(byte *)(param_1 + 0x171) = *(byte *)(param_1 + 0x171) | 0x10; } if (*(char *)(param_1 + 0x7e2) != '\0') { return; } if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x8f0)); return; }
65,745
free_root
eloqsql/mysys/my_alloc.c
void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) /* There is no point in using mark_blocks_free when using valgrind as it will not reclaim any memory */ if (MyFlags & MY_MARK_BLOCKS_FREE) { mark_blocks_free(root); DBUG_VOID_RETURN; } #endif if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for (next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) my_free(old); } for (next=root->free ; next ;) { old=next; next= next->next; if (old != root->pre_alloc) my_free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(root->pre_alloc); root->free->next=0; } root->block_num= 4; root->first_block_usage= 0; DBUG_VOID_RETURN; }
O0
c
free_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x33af2 movq -0x10(%rbp), %rax andq $0x2, %rax cmpq $0x0, %rax je 0x33b0e movq -0x8(%rbp), %rdi callq 0x33c30 jmp 0x33c1d movq -0x10(%rbp), %rax andq $0x1, %rax cmpq $0x0, %rax jne 0x33b28 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x33b67 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x33b65 movq -0x20(%rbp), %rdi callq 0x2f350 jmp 0x33b34 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x33ba5 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x33ba3 movq -0x20(%rbp), %rdi callq 0x2f350 jmp 0x33b72 movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x33c05 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) jmp 0x33bf3 jmp 0x33bf5 jmp 0x33bf7 movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movl $0x4, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x2c(%rax) jmp 0x33c1d addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
free_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_33AF2: mov rax, [rbp+var_10] and rax, 2 cmp rax, 0 jz short loc_33B0E mov rdi, [rbp+var_8] call mark_blocks_free jmp loc_33C1D loc_33B0E: mov rax, [rbp+var_10] and rax, 1 cmp rax, 0 jnz short loc_33B28 mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_33B28: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_33B34: cmp [rbp+var_18], 0 jz short loc_33B67 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_33B65 mov rdi, [rbp+var_20] call my_free loc_33B65: jmp short loc_33B34 loc_33B67: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_33B72: cmp [rbp+var_18], 0 jz short loc_33BA5 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_33BA3 mov rdi, [rbp+var_20] call my_free loc_33BA3: jmp short loc_33B72 loc_33BA5: mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_33C05 mov rax, [rbp+var_8] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx jmp short $+2 loc_33BF3: jmp short $+2 loc_33BF5: jmp short $+2 loc_33BF7: mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_33C05: mov rax, [rbp+var_8] mov dword ptr [rax+28h], 4 mov rax, [rbp+var_8] mov dword ptr [rax+2Ch], 0 jmp short $+2 loc_33C1D: add rsp, 20h pop rbp retn
long long free_root(long long a1, char a2) { long long result; // rax long long v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+0h] [rbp-20h] _QWORD *v5; // [rsp+8h] [rbp-18h] _QWORD *v6; // [rsp+8h] [rbp-18h] if ( (a2 & 2) != 0 ) return mark_blocks_free(a1); if ( (a2 & 1) == 0 ) *(_QWORD *)(a1 + 16) = 0LL; v5 = *(_QWORD **)(a1 + 8); while ( v5 ) { v3 = (long long)v5; v5 = (_QWORD *)*v5; if ( v3 != *(_QWORD *)(a1 + 16) ) my_free(v3); } v6 = *(_QWORD **)a1; while ( v6 ) { v4 = (long long)v6; v6 = (_QWORD *)*v6; if ( v4 != *(_QWORD *)(a1 + 16) ) my_free(v4); } *(_QWORD *)a1 = 0LL; *(_QWORD *)(a1 + 8) = 0LL; if ( *(_QWORD *)(a1 + 16) ) { *(_QWORD *)a1 = *(_QWORD *)(a1 + 16); *(_QWORD *)(*(_QWORD *)a1 + 8LL) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 16LL) - 24LL; **(_QWORD **)a1 = 0LL; } *(_DWORD *)(a1 + 40) = 4; result = a1; *(_DWORD *)(a1 + 44) = 0; return result; }
free_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00133af2 LAB_00133af2: MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x2 CMP RAX,0x0 JZ 0x00133b0e MOV RDI,qword ptr [RBP + -0x8] CALL 0x00133c30 JMP 0x00133c1d LAB_00133b0e: MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x1 CMP RAX,0x0 JNZ 0x00133b28 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_00133b28: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_00133b34: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00133b67 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00133b65 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012f350 LAB_00133b65: JMP 0x00133b34 LAB_00133b67: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_00133b72: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00133ba5 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00133ba3 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0012f350 LAB_00133ba3: JMP 0x00133b72 LAB_00133ba5: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00133c05 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX JMP 0x00133bf3 LAB_00133bf3: JMP 0x00133bf5 LAB_00133bf5: JMP 0x00133bf7 LAB_00133bf7: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_00133c05: MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],0x0 JMP 0x00133c1d LAB_00133c1d: ADD RSP,0x20 POP RBP RET
void free_root(long *param_1,ulong param_2) { int8 *puVar1; int8 *local_20; if ((param_2 & 2) == 0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar1 = (int8 *)param_1[1]; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { my_free(local_20); } } puVar1 = (int8 *)*param_1; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { my_free(local_20); } } *param_1 = 0; param_1[1] = 0; if (param_1[2] != 0) { *param_1 = param_1[2]; *(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18; *(int8 *)*param_1 = 0; } *(int4 *)(param_1 + 5) = 4; *(int4 *)((long)param_1 + 0x2c) = 0; } else { mark_blocks_free(param_1); } return; }
65,746
free_root
eloqsql/mysys/my_alloc.c
void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); DBUG_PRINT("enter",("root: %p flags: %lu", root, MyFlags)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) /* There is no point in using mark_blocks_free when using valgrind as it will not reclaim any memory */ if (MyFlags & MY_MARK_BLOCKS_FREE) { mark_blocks_free(root); DBUG_VOID_RETURN; } #endif if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for (next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) my_free(old); } for (next=root->free ; next ;) { old=next; next= next->next; if (old != root->pre_alloc) my_free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); TRASH_MEM(root->pre_alloc); root->free->next=0; } root->block_num= 4; root->first_block_usage= 0; DBUG_VOID_RETURN; }
O3
c
free_root: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx testb $0x2, %sil jne 0x2da48 testb $0x1, %sil jne 0x2d9e1 movq $0x0, 0x10(%rbx) movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x2da00 movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x2d9f8 callq 0x2b2fa movq %r14, %rdi testq %r14, %r14 jne 0x2d9ea movq (%rbx), %rdi testq %rdi, %rdi je 0x2da1e movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x2da16 callq 0x2b2fa movq %r14, %rdi testq %r14, %r14 jne 0x2da08 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq 0x10(%rbx), %rax testq %rax, %rax je 0x2da92 movq %rax, (%rbx) movq 0x10(%rax), %rcx addq $-0x18, %rcx movq %rcx, 0x8(%rax) movq (%rbx), %rax movq $0x0, (%rax) jmp 0x2da92 movq (%rbx), %rax movq %rbx, %rcx testq %rax, %rax je 0x2da67 movq %rax, %rcx movq (%rax), %rax movq 0x10(%rcx), %rdx addq $-0x18, %rdx movq %rdx, 0x8(%rcx) jmp 0x2da4e movq 0x8(%rbx), %rax movq %rax, (%rcx) testq %rax, %rax je 0x2da8a movq (%rax), %rcx movq 0x10(%rax), %rdx addq $-0x18, %rdx movq %rdx, 0x8(%rax) movq %rcx, %rax testq %rcx, %rcx jne 0x2da73 movq $0x0, 0x8(%rbx) movq $0x4, 0x28(%rbx) popq %rbx popq %r14 popq %rbp retq
free_root: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi test sil, 2 jnz short loc_2DA48 test sil, 1 jnz short loc_2D9E1 mov qword ptr [rbx+10h], 0 loc_2D9E1: mov rdi, [rbx+8] test rdi, rdi jz short loc_2DA00 loc_2D9EA: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_2D9F8 call my_free loc_2D9F8: mov rdi, r14 test r14, r14 jnz short loc_2D9EA loc_2DA00: mov rdi, [rbx] test rdi, rdi jz short loc_2DA1E loc_2DA08: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_2DA16 call my_free loc_2DA16: mov rdi, r14 test r14, r14 jnz short loc_2DA08 loc_2DA1E: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rax, [rbx+10h] test rax, rax jz short loc_2DA92 mov [rbx], rax mov rcx, [rax+10h] add rcx, 0FFFFFFFFFFFFFFE8h mov [rax+8], rcx mov rax, [rbx] mov qword ptr [rax], 0 jmp short loc_2DA92 loc_2DA48: mov rax, [rbx] mov rcx, rbx loc_2DA4E: test rax, rax jz short loc_2DA67 mov rcx, rax mov rax, [rax] mov rdx, [rcx+10h] add rdx, 0FFFFFFFFFFFFFFE8h mov [rcx+8], rdx jmp short loc_2DA4E loc_2DA67: mov rax, [rbx+8] mov [rcx], rax test rax, rax jz short loc_2DA8A loc_2DA73: mov rcx, [rax] mov rdx, [rax+10h] add rdx, 0FFFFFFFFFFFFFFE8h mov [rax+8], rdx mov rax, rcx test rcx, rcx jnz short loc_2DA73 loc_2DA8A: mov qword ptr [rbx+8], 0 loc_2DA92: mov qword ptr [rbx+28h], 4 pop rbx pop r14 pop rbp retn
_QWORD * free_root(_QWORD *a1, char a2) { _QWORD *v3; // rdi _QWORD *v4; // r14 _QWORD *v5; // rdi _QWORD *v6; // r14 _QWORD *result; // rax _QWORD *v8; // rax _QWORD *v9; // rcx _QWORD *v10; // rcx if ( (a2 & 2) != 0 ) { v8 = (_QWORD *)*a1; v9 = a1; while ( v8 ) { v9 = v8; v8 = (_QWORD *)*v8; v9[1] = v9[2] - 24LL; } result = (_QWORD *)a1[1]; *v9 = result; if ( result ) { do { v10 = (_QWORD *)*result; result[1] = result[2] - 24LL; result = v10; } while ( v10 ); } a1[1] = 0LL; } else { if ( (a2 & 1) == 0 ) a1[2] = 0LL; v3 = (_QWORD *)a1[1]; if ( v3 ) { do { v4 = (_QWORD *)*v3; if ( v3 != (_QWORD *)a1[2] ) my_free((long long)v3); v3 = v4; } while ( v4 ); } v5 = (_QWORD *)*a1; if ( *a1 ) { do { v6 = (_QWORD *)*v5; if ( v5 != (_QWORD *)a1[2] ) my_free((long long)v5); v5 = v6; } while ( v6 ); } *(_OWORD *)a1 = 0LL; result = (_QWORD *)a1[2]; if ( result ) { *a1 = result; result[1] = result[2] - 24LL; result = (_QWORD *)*a1; *(_QWORD *)*a1 = 0LL; } } a1[5] = 4LL; return result; }
free_root: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI TEST SIL,0x2 JNZ 0x0012da48 TEST SIL,0x1 JNZ 0x0012d9e1 MOV qword ptr [RBX + 0x10],0x0 LAB_0012d9e1: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0012da00 LAB_0012d9ea: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0012d9f8 CALL 0x0012b2fa LAB_0012d9f8: MOV RDI,R14 TEST R14,R14 JNZ 0x0012d9ea LAB_0012da00: MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0012da1e LAB_0012da08: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0012da16 CALL 0x0012b2fa LAB_0012da16: MOV RDI,R14 TEST R14,R14 JNZ 0x0012da08 LAB_0012da1e: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x0012da92 MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RAX + 0x10] ADD RCX,-0x18 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBX] MOV qword ptr [RAX],0x0 JMP 0x0012da92 LAB_0012da48: MOV RAX,qword ptr [RBX] MOV RCX,RBX LAB_0012da4e: TEST RAX,RAX JZ 0x0012da67 MOV RCX,RAX MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RCX + 0x10] ADD RDX,-0x18 MOV qword ptr [RCX + 0x8],RDX JMP 0x0012da4e LAB_0012da67: MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RCX],RAX TEST RAX,RAX JZ 0x0012da8a LAB_0012da73: MOV RCX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x10] ADD RDX,-0x18 MOV qword ptr [RAX + 0x8],RDX MOV RAX,RCX TEST RCX,RCX JNZ 0x0012da73 LAB_0012da8a: MOV qword ptr [RBX + 0x8],0x0 LAB_0012da92: MOV qword ptr [RBX + 0x28],0x4 POP RBX POP R14 POP RBP RET
void free_root(long *param_1,byte param_2) { int8 *puVar1; long lVar2; int8 *puVar3; long *plVar4; long *plVar5; long *plVar6; bool bVar7; if ((param_2 & 2) == 0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar3 = (int8 *)param_1[1]; while (puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; bVar7 = puVar3 != (int8 *)param_1[2]; puVar3 = puVar1; if (bVar7) { my_free(); } } puVar3 = (int8 *)*param_1; while (puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; bVar7 = puVar3 != (int8 *)param_1[2]; puVar3 = puVar1; if (bVar7) { my_free(); } } *param_1 = 0; param_1[1] = 0; lVar2 = param_1[2]; if (lVar2 != 0) { *param_1 = lVar2; *(long *)(lVar2 + 8) = *(long *)(lVar2 + 0x10) + -0x18; *(int8 *)*param_1 = 0; } } else { plVar4 = (long *)*param_1; plVar6 = param_1; while (plVar5 = plVar4, plVar5 != (long *)0x0) { plVar5[1] = plVar5[2] + -0x18; plVar4 = (long *)*plVar5; plVar6 = plVar5; } puVar3 = (int8 *)param_1[1]; *plVar6 = (long)puVar3; while (puVar3 != (int8 *)0x0) { puVar3[1] = puVar3[2] + -0x18; puVar3 = (int8 *)*puVar3; } param_1[1] = 0; } param_1[5] = 4; return; }
65,747
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
monkey531[P]llama/common/json.hpp
inline cached_power get_cached_power_for_binary_exponent(int e) { // Now // // alpha <= e_c + e + q <= gamma (1) // ==> f_c * 2^alpha <= c * 2^e * 2^q // // and since the c's are normalized, 2^(q-1) <= f_c, // // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) // ==> 2^(alpha - e - 1) <= c // // If c were an exact power of ten, i.e. c = 10^k, one may determine k as // // k = ceil( log_10( 2^(alpha - e - 1) ) ) // = ceil( (alpha - e - 1) * log_10(2) ) // // From the paper: // "In theory the result of the procedure could be wrong since c is rounded, // and the computation itself is approximated [...]. In practice, however, // this simple function is sufficient." // // For IEEE double precision floating-point numbers converted into // normalized diyfp's w = f * 2^e, with q = 64, // // e >= -1022 (min IEEE exponent) // -52 (p - 1) // -52 (p - 1, possibly normalize denormal IEEE numbers) // -11 (normalize the diyfp) // = -1137 // // and // // e <= +1023 (max IEEE exponent) // -52 (p - 1) // -11 (normalize the diyfp) // = 960 // // This binary exponent range [-1137,960] results in a decimal exponent // range [-307,324]. One does not need to store a cached power for each // k in this range. For each such k it suffices to find a cached power // such that the exponent of the product lies in [alpha,gamma]. // This implies that the difference of the decimal exponents of adjacent // table entries must be less than or equal to // // floor( (gamma - alpha) * log_10(2) ) = 8. // // (A smaller distance gamma-alpha would require a larger table.) // NB: // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. constexpr int kCachedPowersMinDecExp = -300; constexpr int kCachedPowersDecStep = 8; static constexpr std::array<cached_power, 79> kCachedPowers = { { { 0xAB70FE17C79AC6CA, -1060, -300 }, { 0xFF77B1FCBEBCDC4F, -1034, -292 }, { 0xBE5691EF416BD60C, -1007, -284 }, { 0x8DD01FAD907FFC3C, -980, -276 }, { 0xD3515C2831559A83, -954, -268 }, { 0x9D71AC8FADA6C9B5, -927, -260 }, { 0xEA9C227723EE8BCB, -901, -252 }, { 0xAECC49914078536D, -874, -244 }, { 0x823C12795DB6CE57, -847, -236 }, { 0xC21094364DFB5637, -821, -228 }, { 0x9096EA6F3848984F, -794, -220 }, { 0xD77485CB25823AC7, -768, -212 }, { 0xA086CFCD97BF97F4, -741, -204 }, { 0xEF340A98172AACE5, -715, -196 }, { 0xB23867FB2A35B28E, -688, -188 }, { 0x84C8D4DFD2C63F3B, -661, -180 }, { 0xC5DD44271AD3CDBA, -635, -172 }, { 0x936B9FCEBB25C996, -608, -164 }, { 0xDBAC6C247D62A584, -582, -156 }, { 0xA3AB66580D5FDAF6, -555, -148 }, { 0xF3E2F893DEC3F126, -529, -140 }, { 0xB5B5ADA8AAFF80B8, -502, -132 }, { 0x87625F056C7C4A8B, -475, -124 }, { 0xC9BCFF6034C13053, -449, -116 }, { 0x964E858C91BA2655, -422, -108 }, { 0xDFF9772470297EBD, -396, -100 }, { 0xA6DFBD9FB8E5B88F, -369, -92 }, { 0xF8A95FCF88747D94, -343, -84 }, { 0xB94470938FA89BCF, -316, -76 }, { 0x8A08F0F8BF0F156B, -289, -68 }, { 0xCDB02555653131B6, -263, -60 }, { 0x993FE2C6D07B7FAC, -236, -52 }, { 0xE45C10C42A2B3B06, -210, -44 }, { 0xAA242499697392D3, -183, -36 }, { 0xFD87B5F28300CA0E, -157, -28 }, { 0xBCE5086492111AEB, -130, -20 }, { 0x8CBCCC096F5088CC, -103, -12 }, { 0xD1B71758E219652C, -77, -4 }, { 0x9C40000000000000, -50, 4 }, { 0xE8D4A51000000000, -24, 12 }, { 0xAD78EBC5AC620000, 3, 20 }, { 0x813F3978F8940984, 30, 28 }, { 0xC097CE7BC90715B3, 56, 36 }, { 0x8F7E32CE7BEA5C70, 83, 44 }, { 0xD5D238A4ABE98068, 109, 52 }, { 0x9F4F2726179A2245, 136, 60 }, { 0xED63A231D4C4FB27, 162, 68 }, { 0xB0DE65388CC8ADA8, 189, 76 }, { 0x83C7088E1AAB65DB, 216, 84 }, { 0xC45D1DF942711D9A, 242, 92 }, { 0x924D692CA61BE758, 269, 100 }, { 0xDA01EE641A708DEA, 295, 108 }, { 0xA26DA3999AEF774A, 322, 116 }, { 0xF209787BB47D6B85, 348, 124 }, { 0xB454E4A179DD1877, 375, 132 }, { 0x865B86925B9BC5C2, 402, 140 }, { 0xC83553C5C8965D3D, 428, 148 }, { 0x952AB45CFA97A0B3, 455, 156 }, { 0xDE469FBD99A05FE3, 481, 164 }, { 0xA59BC234DB398C25, 508, 172 }, { 0xF6C69A72A3989F5C, 534, 180 }, { 0xB7DCBF5354E9BECE, 561, 188 }, { 0x88FCF317F22241E2, 588, 196 }, { 0xCC20CE9BD35C78A5, 614, 204 }, { 0x98165AF37B2153DF, 641, 212 }, { 0xE2A0B5DC971F303A, 667, 220 }, { 0xA8D9D1535CE3B396, 694, 228 }, { 0xFB9B7CD9A4A7443C, 720, 236 }, { 0xBB764C4CA7A44410, 747, 244 }, { 0x8BAB8EEFB6409C1A, 774, 252 }, { 0xD01FEF10A657842C, 800, 260 }, { 0x9B10A4E5E9913129, 827, 268 }, { 0xE7109BFBA19C0C9D, 853, 276 }, { 0xAC2820D9623BF429, 880, 284 }, { 0x80444B5E7AA7CF85, 907, 292 }, { 0xBF21E44003ACDD2D, 933, 300 }, { 0x8E679C2F5E44FF8F, 960, 308 }, { 0xD433179D9C8CB841, 986, 316 }, { 0x9E19DB92B4E31BA9, 1013, 324 }, } }; // This computation gives exactly the same results for k as // k = ceil((kAlpha - e - 1) * 0.30102999566398114) // for |e| <= 1500, but doesn't require floating-point operations. // NB: log_10(2) ~= 78913 / 2^18 JSON_ASSERT(e >= -1500); JSON_ASSERT(e <= 1500); const int f = kAlpha - e - 1; const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0); const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep; JSON_ASSERT(index >= 0); JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size()); const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)]; JSON_ASSERT(kAlpha <= cached.e + e + 64); JSON_ASSERT(kGamma >= cached.e + e + 64); return cached; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int): pushq %rax cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23 jle 0xb853e cmpl $0x5dd, %edi # imm = 0x5DD jge 0xb855d xorl %eax, %eax movl %edi, %ecx subl $-0x3d, %ecx setl %al negl %ecx imull $0x13441, %ecx, %ecx # imm = 0x13441 leal 0x3ffff(%rcx), %edx testl %ecx, %ecx cmovnsl %ecx, %edx sarl $0x12, %edx addl %edx, %eax cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5 jle 0xb8579 leal 0x133(%rax), %ecx addl $0x13a, %eax # imm = 0x13A testw %cx, %cx cmovnsl %ecx, %eax cwtl shrl $0x3, %eax cmpw $0x4f, %ax jae 0xb8595 movzwl %ax, %eax shll $0x4, %eax leaq 0x3b7f9(%rip), %rcx # 0xf3d18 movq 0x8(%rcx,%rax), %rdx addl %edx, %edi cmpl $-0x7d, %edi jle 0xb85b1 cmpl $-0x5f, %edi jge 0xb85cd movq (%rcx,%rax), %rax popq %rcx retq leaq 0x33a44(%rip), %rdi # 0xebf89 leaq 0x2dcd0(%rip), %rdx # 0xe621c leaq 0x39224(%rip), %rcx # 0xf1777 movl $0x43e4, %esi # imm = 0x43E4 jmp 0xb85e7 leaq 0x33a25(%rip), %rdi # 0xebf89 leaq 0x2dcb1(%rip), %rdx # 0xe621c leaq 0x39210(%rip), %rcx # 0xf1782 movl $0x43e5, %esi # imm = 0x43E5 jmp 0xb85e7 leaq 0x33a09(%rip), %rdi # 0xebf89 leaq 0x2dc95(%rip), %rdx # 0xe621c leaq 0x391fe(%rip), %rcx # 0xf178c movl $0x43ea, %esi # imm = 0x43EA jmp 0xb85e7 leaq 0x339ed(%rip), %rdi # 0xebf89 leaq 0x2dc79(%rip), %rdx # 0xe621c leaq 0x391ed(%rip), %rcx # 0xf1797 movl $0x43eb, %esi # imm = 0x43EB jmp 0xb85e7 leaq 0x339d1(%rip), %rdi # 0xebf89 leaq 0x2dc5d(%rip), %rdx # 0xe621c leaq 0x39208(%rip), %rcx # 0xf17ce movl $0x43ee, %esi # imm = 0x43EE jmp 0xb85e7 leaq 0x339b5(%rip), %rdi # 0xebf89 leaq 0x2dc41(%rip), %rdx # 0xe621c leaq 0x39208(%rip), %rcx # 0xf17ea movl $0x43ef, %esi # imm = 0x43EF xorl %eax, %eax callq 0x1aea0
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi: push rax cmp edi, 0FFFFFA23h jle loc_B853E cmp edi, 5DDh jge loc_B855D xor eax, eax mov ecx, edi sub ecx, 0FFFFFFC3h setl al neg ecx imul ecx, 13441h lea edx, [rcx+3FFFFh] test ecx, ecx cmovns edx, ecx sar edx, 12h add eax, edx cmp eax, 0FFFFFEC5h jle loc_B8579 lea ecx, [rax+133h] add eax, 13Ah test cx, cx cmovns eax, ecx cwde shr eax, 3 cmp ax, 4Fh ; 'O' jnb loc_B8595 movzx eax, ax shl eax, 4 lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers mov rdx, [rcx+rax+8] add edi, edx cmp edi, 0FFFFFF83h jle loc_B85B1 cmp edi, 0FFFFFFA1h jge loc_B85CD mov rax, [rcx+rax] pop rcx retn loc_B853E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500; "e >= -1500" mov esi, 43E4h jmp loc_B85E7 loc_B855D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aE1500_0; "e <= 1500" mov esi, 43E5h jmp short loc_B85E7 loc_B8579: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIndex0; "index >= 0" mov esi, 43EAh jmp short loc_B85E7 loc_B8595: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"... mov esi, 43EBh jmp short loc_B85E7 loc_B85B1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64" mov esi, 43EEh jmp short loc_B85E7 loc_B85CD: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64" mov esi, 43EFh loc_B85E7: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this) { int v1; // eax __int16 v2; // cx __int16 v3; // ax unsigned int v4; // eax long long v5; // rax int v6; // edi long long v8; // rsi if ( (int)this <= -1501 ) { v8 = 17380LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17380LL, "GGML_ASSERT(%s) failed", "e >= -1500"); } else if ( (int)this >= 1501 ) { v8 = 17381LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17381LL, "GGML_ASSERT(%s) failed", "e <= 1500"); } else { v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61); if ( v1 <= -315 ) { v8 = 17386LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17386LL, "GGML_ASSERT(%s) failed", "index >= 0"); } else { v2 = v1 + 307; v3 = v1 + 314; if ( v2 >= 0 ) v3 = v2; v4 = (unsigned int)v3 >> 3; if ( (unsigned __int16)v4 >= 0x4Fu ) { v8 = 17387LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17387LL, "GGML_ASSERT(%s) failed", "static_cast<std::size_t>(index) < kCachedPowers.size()"); } else { v5 = 16 * (unsigned int)(unsigned __int16)v4; v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v5 + 8) + (_DWORD)this; if ( v6 <= -125 ) { v8 = 17390LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17390LL, "GGML_ASSERT(%s) failed", "kAlpha <= cached.e + e + 64"); } else { if ( v6 < -95 ) return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers + v5); v8 = 17391LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17391LL, "GGML_ASSERT(%s) failed", "kGamma >= cached.e + e + 64"); } } } } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v8); }
get_cached_power_for_binary_exponent: PUSH RAX CMP EDI,0xfffffa23 JLE 0x001b853e CMP EDI,0x5dd JGE 0x001b855d XOR EAX,EAX MOV ECX,EDI SUB ECX,-0x3d SETL AL NEG ECX IMUL ECX,ECX,0x13441 LEA EDX,[RCX + 0x3ffff] TEST ECX,ECX CMOVNS EDX,ECX SAR EDX,0x12 ADD EAX,EDX CMP EAX,0xfffffec5 JLE 0x001b8579 LEA ECX,[RAX + 0x133] ADD EAX,0x13a TEST CX,CX CMOVNS EAX,ECX CWDE SHR EAX,0x3 CMP AX,0x4f JNC 0x001b8595 MOVZX EAX,AX SHL EAX,0x4 LEA RCX,[0x1f3d18] MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8] ADD EDI,EDX CMP EDI,-0x7d JLE 0x001b85b1 CMP EDI,-0x5f JGE 0x001b85cd MOV RAX,qword ptr [RCX + RAX*0x1] POP RCX RET LAB_001b853e: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f1777] MOV ESI,0x43e4 JMP 0x001b85e7 LAB_001b855d: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f1782] MOV ESI,0x43e5 JMP 0x001b85e7 LAB_001b8579: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f178c] MOV ESI,0x43ea JMP 0x001b85e7 LAB_001b8595: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f1797] MOV ESI,0x43eb JMP 0x001b85e7 LAB_001b85b1: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f17ce] MOV ESI,0x43ee JMP 0x001b85e7 LAB_001b85cd: LEA RDI,[0x1ebf89] LEA RDX,[0x1e621c] LEA RCX,[0x1f17ea] MOV ESI,0x43ef LAB_001b85e7: XOR EAX,EAX CALL 0x0011aea0
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */ int8 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1) { short sVar1; int iVar2; ulong uVar3; short sVar4; int iVar5; char *pcVar6; int8 uVar7; if (param_1 < -0x5dc) { pcVar6 = "e >= -1500"; uVar7 = 0x43e4; } else if (param_1 < 0x5dd) { iVar5 = (param_1 + 0x3d) * -0x13441; iVar2 = iVar5 + 0x3ffff; if (-1 < iVar5) { iVar2 = iVar5; } iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12); if (iVar2 < -0x13a) { pcVar6 = "index >= 0"; uVar7 = 0x43ea; } else { sVar1 = (short)iVar2; sVar4 = sVar1 + 0x133; sVar1 = sVar1 + 0x13a; if (-1 < sVar4) { sVar1 = sVar4; } if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) { uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4); iVar2 = param_1 + (int)*(int8 *) (get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3 + 8); if (iVar2 < -0x7c) { pcVar6 = "kAlpha <= cached.e + e + 64"; uVar7 = 0x43ee; } else { if (iVar2 < -0x5f) { return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3) ; } pcVar6 = "kGamma >= cached.e + e + 64"; uVar7 = 0x43ef; } } else { pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()"; uVar7 = 0x43eb; } } } else { pcVar6 = "e <= 1500"; uVar7 = 0x43e5; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar7, "GGML_ASSERT(%s) failed",pcVar6); }
65,748
Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::enforceOk() const
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.hpp
void enforceOk() const override { // Errors shouldn't reach this point, but if they do // the actual error message will be in m_errorMessage assert( m_type != ResultType::LogicError ); assert( m_type != ResultType::RuntimeError ); if ( m_type != ResultType::Ok ) std::abort(); }
O3
cpp
Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::enforceOk() const: cmpl $0x0, 0x8(%rdi) jne 0x7bd6f retq pushq %rax callq 0x17850 nop
_ZNK5Catch5Clara6Detail11BasicResultINS1_10ParseStateEE9enforceOkEv: cmp dword ptr [rdi+8], 0 jnz short loc_7BD6F retn loc_7BD6F: push rax call _abort
void Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::enforceOk(long long a1) { if ( *(_DWORD *)(a1 + 8) ) abort(a1); }
enforceOk: CMP dword ptr [RDI + 0x8],0x0 JNZ 0x0017bd6f RET LAB_0017bd6f: PUSH RAX CALL 0x00117850
/* Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::enforceOk() const */ void __thiscall Catch::Clara::Detail::BasicResult<Catch::Clara::Detail::ParseState>::enforceOk (BasicResult<Catch::Clara::Detail::ParseState> *this) { if (*(int *)(this + 8) == 0) { return; } /* WARNING: Subroutine does not return */ abort(); }
65,749
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long)
monkey531[P]llama/common/json.hpp
inline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta, std::uint64_t rest, std::uint64_t ten_k) { JSON_ASSERT(len >= 1); JSON_ASSERT(dist <= delta); JSON_ASSERT(rest <= delta); JSON_ASSERT(ten_k > 0); // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // ten_k // <------> // <---- rest ----> // --------------[------------------+----+--------------]-------------- // w V // = buf * 10^k // // ten_k represents a unit-in-the-last-place in the decimal representation // stored in buf. // Decrement buf by ten_k while this takes buf closer to w. // The tests are written in this order to avoid overflow in unsigned // integer arithmetic. while (rest < dist && delta - rest >= ten_k && (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) { JSON_ASSERT(buf[len - 1] != '0'); buf[len - 1]--; rest += ten_k; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long): pushq %rax testl %esi, %esi jle 0x495d1 cmpq %rcx, %rdx ja 0x495ed subq %r8, %rcx jb 0x49609 testq %r9, %r9 je 0x49625 movl %esi, %eax movq %r9, %rsi subq %rdx, %rsi movq %rdx, %r10 subq %r8, %r10 cmpq %rdx, %r8 jae 0x495ae subq %r9, %rcx jb 0x495ae leaq (%r8,%r9), %r11 cmpq %rdx, %r11 jb 0x49593 addq %rsi, %r8 cmpq %r8, %r10 jbe 0x495ae movb -0x1(%rdi,%rax), %r8b cmpb $0x30, %r8b je 0x495b0 decb %r8b movb %r8b, -0x1(%rdi,%rax) subq %r9, %r10 movq %r11, %r8 jmp 0x49578 popq %rax retq leaq 0x4f1a6(%rip), %rdi # 0x9875d leaq 0x4cb79(%rip), %rdx # 0x96137 leaq 0x4fafb(%rip), %rcx # 0x990c0 movl $0x444d, %esi # imm = 0x444D xorl %eax, %eax callq 0x20b40 leaq 0x4f185(%rip), %rdi # 0x9875d leaq 0x4cb58(%rip), %rdx # 0x96137 leaq 0x4faab(%rip), %rcx # 0x99091 movl $0x4431, %esi # imm = 0x4431 jmp 0x495ca leaq 0x4f169(%rip), %rdi # 0x9875d leaq 0x4cb3c(%rip), %rdx # 0x96137 leaq 0x4fa98(%rip), %rcx # 0x9909a movl $0x4432, %esi # imm = 0x4432 jmp 0x495ca leaq 0x4f14d(%rip), %rdi # 0x9875d leaq 0x4cb20(%rip), %rdx # 0x96137 leaq 0x4fa8a(%rip), %rcx # 0x990a8 movl $0x4433, %esi # imm = 0x4433 jmp 0x495ca leaq 0x4f131(%rip), %rdi # 0x9875d leaq 0x4cb04(%rip), %rdx # 0x96137 leaq 0x4fa7c(%rip), %rcx # 0x990b6 movl $0x4434, %esi # imm = 0x4434 jmp 0x495ca
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm: push rax test esi, esi jle loc_495D1 cmp rdx, rcx ja loc_495ED sub rcx, r8 jb loc_49609 test r9, r9 jz loc_49625 mov eax, esi mov rsi, r9 sub rsi, rdx mov r10, rdx sub r10, r8 loc_49578: cmp r8, rdx jnb short loc_495AE sub rcx, r9 jb short loc_495AE lea r11, [r8+r9] cmp r11, rdx jb short loc_49593 add r8, rsi cmp r10, r8 jbe short loc_495AE loc_49593: mov r8b, [rdi+rax-1] cmp r8b, 30h ; '0' jz short loc_495B0 dec r8b mov [rdi+rax-1], r8b sub r10, r9 mov r8, r11 jmp short loc_49578 loc_495AE: pop rax retn loc_495B0: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aBufLen10; "buf[len - 1] != '0'" mov esi, 444Dh loc_495CA: xor eax, eax call _ggml_abort loc_495D1: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aLen1; "len >= 1" mov esi, 4431h jmp short loc_495CA loc_495ED: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDistDelta; "dist <= delta" mov esi, 4432h jmp short loc_495CA loc_49609: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRestDelta; "rest <= delta" mov esi, 4433h jmp short loc_495CA loc_49625: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTenK0; "ten_k > 0" mov esi, 4434h jmp short loc_495CA
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, char *a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, unsigned long long a6) { bool v6; // cf unsigned long long v7; // rcx unsigned long long v8; // r10 unsigned long long v9; // r11 char v10; // r8 if ( (int)a2 <= 0 ) { while ( 1 ) LABEL_14: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17457LL, "GGML_ASSERT(%s) failed", "len >= 1"); } if ( a3 > a4 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17458LL, "GGML_ASSERT(%s) failed", "dist <= delta"); goto LABEL_14; } v6 = a4 < a5; v7 = a4 - a5; if ( v6 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17459LL, "GGML_ASSERT(%s) failed", "rest <= delta"); goto LABEL_14; } if ( !a6 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17460LL, "GGML_ASSERT(%s) failed", "ten_k > 0"); goto LABEL_14; } v8 = a3 - a5; while ( a5 < a3 ) { v6 = v7 < a6; v7 -= a6; if ( v6 ) break; v9 = a5 + a6; if ( a5 + a6 >= a3 && v8 <= a6 - a3 + a5 ) break; v10 = *((_BYTE *)this + (unsigned int)a2 - 1); if ( v10 == 48 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17485LL, "GGML_ASSERT(%s) failed", "buf[len - 1] != '0'"); goto LABEL_14; } *((_BYTE *)this + (unsigned int)a2 - 1) = v10 - 1; v8 -= a6; a5 = v9; } }
grisu2_round: PUSH RAX TEST ESI,ESI JLE 0x001495d1 CMP RDX,RCX JA 0x001495ed SUB RCX,R8 JC 0x00149609 TEST R9,R9 JZ 0x00149625 MOV EAX,ESI MOV RSI,R9 SUB RSI,RDX MOV R10,RDX SUB R10,R8 LAB_00149578: CMP R8,RDX JNC 0x001495ae SUB RCX,R9 JC 0x001495ae LEA R11,[R8 + R9*0x1] CMP R11,RDX JC 0x00149593 ADD R8,RSI CMP R10,R8 JBE 0x001495ae LAB_00149593: MOV R8B,byte ptr [RDI + RAX*0x1 + -0x1] CMP R8B,0x30 JZ 0x001495b0 DEC R8B MOV byte ptr [RDI + RAX*0x1 + -0x1],R8B SUB R10,R9 MOV R8,R11 JMP 0x00149578 LAB_001495ae: POP RAX RET LAB_001495b0: LEA RDI,[0x19875d] LEA RDX,[0x196137] LEA RCX,[0x1990c0] MOV ESI,0x444d LAB_001495ca: XOR EAX,EAX CALL 0x00120b40 LAB_001495d1: LEA RDI,[0x19875d] LEA RDX,[0x196137] LEA RCX,[0x199091] MOV ESI,0x4431 JMP 0x001495ca LAB_001495ed: LEA RDI,[0x19875d] LEA RDX,[0x196137] LEA RCX,[0x19909a] MOV ESI,0x4432 JMP 0x001495ca LAB_00149609: LEA RDI,[0x19875d] LEA RDX,[0x196137] LEA RCX,[0x1990a8] MOV ESI,0x4433 JMP 0x001495ca LAB_00149625: LEA RDI,[0x19875d] LEA RDX,[0x196137] LEA RCX,[0x1990b6] MOV ESI,0x4434 JMP 0x001495ca
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char*, int, unsigned long, unsigned long, unsigned long, unsigned long) */ int8 nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round (char *param_1,int param_2,ulong param_3,ulong param_4,ulong param_5,ulong param_6) { int8 in_RAX; ulong uVar1; char *pcVar2; int8 uVar3; ulong uVar4; bool bVar5; if (param_2 < 1) { pcVar2 = "len >= 1"; uVar3 = 0x4431; } else if (param_4 < param_3) { pcVar2 = "dist <= delta"; uVar3 = 0x4432; } else { uVar1 = param_4 - param_5; if (param_4 < param_5) { pcVar2 = "rest <= delta"; uVar3 = 0x4433; } else if (param_6 == 0) { pcVar2 = "ten_k > 0"; uVar3 = 0x4434; } else { uVar4 = param_3 - param_5; while( true ) { if (((param_3 <= param_5) || (bVar5 = uVar1 < param_6, uVar1 = uVar1 - param_6, bVar5)) || ((param_3 <= param_5 + param_6 && (uVar4 <= param_5 + (param_6 - param_3))))) { return in_RAX; } if (param_1[(ulong)(uint)param_2 - 1] == '0') break; param_1[(ulong)(uint)param_2 - 1] = param_1[(ulong)(uint)param_2 - 1] + -1; uVar4 = uVar4 - param_6; param_5 = param_5 + param_6; } pcVar2 = "buf[len - 1] != \'0\'"; uVar3 = 0x444d; } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
65,750
my_strnxfrm_simple_internal
eloqsql/strings/ctype-simple.c
size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs, uchar *dst, size_t dstlen, uint *nweights, const uchar *src, size_t srclen) { const uchar *map= cs->sort_order; uchar *d0= dst; uint frmlen; if ((frmlen= (uint)MY_MIN(dstlen, *nweights)) > srclen) frmlen= (uint)srclen; if (dst != src) { const uchar *end; for (end= src + frmlen; src < end;) *dst++= map[*src++]; } else { const uchar *end; for (end= dst + frmlen; dst < end; dst++) *dst= map[(uchar) *dst]; } *nweights-= frmlen; return dst - d0; }
O3
c
my_strnxfrm_simple_internal: pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi movl (%rcx), %eax cmpq %rdx, %rax cmovbel %eax, %edx cmpq %r9, %rdx cmovbel %edx, %r9d movq %rsi, %rax cmpq %r8, %rsi je 0x3880d testq %r9, %r9 je 0x3882c leaq (%r8,%r9), %rdx movq %rsi, %rax movzbl (%r8), %r10d incq %r8 movb (%rdi,%r10), %r10b movb %r10b, (%rax) incq %rax cmpq %rdx, %r8 jb 0x387f5 jmp 0x3882c testq %r9, %r9 je 0x3882c leaq (%rsi,%r9), %rdx movq %rsi, %rax movzbl (%rax), %r8d movb (%rdi,%r8), %r8b movb %r8b, (%rax) incq %rax cmpq %rdx, %rax jb 0x38819 subl %r9d, (%rcx) subq %rsi, %rax popq %rbp retq
my_strnxfrm_simple_internal: push rbp mov rbp, rsp mov rdi, [rdi+58h] mov eax, [rcx] cmp rax, rdx cmovbe edx, eax cmp rdx, r9 cmovbe r9d, edx mov rax, rsi cmp rsi, r8 jz short loc_3880D test r9, r9 jz short loc_3882C lea rdx, [r8+r9] mov rax, rsi loc_387F5: movzx r10d, byte ptr [r8] inc r8 mov r10b, [rdi+r10] mov [rax], r10b inc rax cmp r8, rdx jb short loc_387F5 jmp short loc_3882C loc_3880D: test r9, r9 jz short loc_3882C lea rdx, [rsi+r9] mov rax, rsi loc_38819: movzx r8d, byte ptr [rax] mov r8b, [rdi+r8] mov [rax], r8b inc rax cmp rax, rdx jb short loc_38819 loc_3882C: sub [rcx], r9d sub rax, rsi pop rbp retn
_BYTE * my_strnxfrm_simple_internal( long long a1, unsigned __int8 *a2, unsigned long long a3, _DWORD *a4, unsigned __int8 *a5, unsigned long long a6) { long long v6; // rdi unsigned long long v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rdx long long v10; // r10 v6 = *(_QWORD *)(a1 + 88); v7 = (unsigned int)*a4; if ( v7 <= a3 ) a3 = (unsigned int)v7; if ( a3 <= a6 ) a6 = (unsigned int)a3; v8 = a2; if ( a2 == a5 ) { if ( a6 ) { v8 = a2; do { *v8 = *(_BYTE *)(v6 + *v8); ++v8; } while ( v8 < &a2[a6] ); } } else if ( a6 ) { v9 = &a5[a6]; v8 = a2; do { v10 = *a5++; *v8++ = *(_BYTE *)(v6 + v10); } while ( a5 < v9 ); } *a4 -= a6; return (_BYTE *)(v8 - a2); }
my_strnxfrm_simple_internal: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] MOV EAX,dword ptr [RCX] CMP RAX,RDX CMOVBE EDX,EAX CMP RDX,R9 CMOVBE R9D,EDX MOV RAX,RSI CMP RSI,R8 JZ 0x0013880d TEST R9,R9 JZ 0x0013882c LEA RDX,[R8 + R9*0x1] MOV RAX,RSI LAB_001387f5: MOVZX R10D,byte ptr [R8] INC R8 MOV R10B,byte ptr [RDI + R10*0x1] MOV byte ptr [RAX],R10B INC RAX CMP R8,RDX JC 0x001387f5 JMP 0x0013882c LAB_0013880d: TEST R9,R9 JZ 0x0013882c LEA RDX,[RSI + R9*0x1] MOV RAX,RSI LAB_00138819: MOVZX R8D,byte ptr [RAX] MOV R8B,byte ptr [RDI + R8*0x1] MOV byte ptr [RAX],R8B INC RAX CMP RAX,RDX JC 0x00138819 LAB_0013882c: SUB dword ptr [RCX],R9D SUB RAX,RSI POP RBP RET
long my_strnxfrm_simple_internal (long param_1,byte *param_2,ulong param_3,uint *param_4,byte *param_5,ulong param_6) { byte *pbVar1; byte bVar2; long lVar3; byte *pbVar4; ulong uVar5; ulong uVar6; lVar3 = *(long *)(param_1 + 0x58); uVar5 = param_3 & 0xffffffff; if (*param_4 <= param_3) { uVar5 = (ulong)*param_4; } uVar6 = param_6 & 0xffffffff; if (uVar5 <= param_6) { uVar6 = uVar5; } pbVar4 = param_2; if (param_2 == param_5) { if (uVar6 != 0) { do { *pbVar4 = *(byte *)(lVar3 + (ulong)*pbVar4); pbVar4 = pbVar4 + 1; } while (pbVar4 < param_2 + uVar6); } } else if (uVar6 != 0) { pbVar1 = param_5 + uVar6; do { bVar2 = *param_5; param_5 = param_5 + 1; *pbVar4 = *(byte *)(lVar3 + (ulong)bVar2); pbVar4 = pbVar4 + 1; } while (param_5 < pbVar1); } *param_4 = *param_4 - (int)uVar6; return (long)pbVar4 - (long)param_2; }
65,751
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 auto write_float(OutputIt out, T value, format_specs<Char> specs, locale_ref loc) -> OutputIt { float_specs fspecs = parse_float_type_spec(specs); fspecs.sign = specs.sign; if (detail::signbit(value)) { // value < 0 is false for NaN so use signbit. fspecs.sign = sign::minus; value = -value; } else if (fspecs.sign == sign::minus) { fspecs.sign = sign::none; } if (!detail::isfinite(value)) return write_nonfinite(out, detail::isnan(value), specs, fspecs); if (specs.align == align::numeric && fspecs.sign) { auto it = reserve(out, 1); *it++ = detail::sign<Char>(fspecs.sign); out = base_iterator(out, it); fspecs.sign = sign::none; if (specs.width != 0) --specs.width; } memory_buffer buffer; if (fspecs.format == float_format::hex) { if (fspecs.sign) buffer.push_back(detail::sign<char>(fspecs.sign)); format_hexfloat(convert_float(value), specs.precision, fspecs, buffer); return write_bytes<align::right>(out, {buffer.data(), buffer.size()}, specs); } int precision = specs.precision >= 0 || specs.type == presentation_type::none ? specs.precision : 6; if (fspecs.format == float_format::exp) { if (precision == max_value<int>()) throw_format_error("number is too big"); else ++precision; } else if (fspecs.format != float_format::fixed && precision == 0) { precision = 1; } if (const_check(std::is_same<T, float>())) fspecs.binary32 = true; int exp = format_float(convert_float(value), precision, fspecs, buffer); fspecs.precision = precision; auto f = big_decimal_fp{buffer.data(), static_cast<int>(buffer.size()), exp}; return write_float(out, f, specs, fspecs, loc); }
O3
c
fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x268, %rsp # imm = 0x268 movq %rcx, %r15 movq %rdi, %r14 fldt 0x2a0(%rsp) fld %st(0) fstpt 0x24(%rsp) fstpt 0x30(%rsp) movswq 0x38(%rsp), %rbp leaq 0x10(%rsp), %r13 movq %rsi, (%r13) movq %rdx, 0x8(%r13) movq %r13, %rdi callq 0x469bd movq %rax, %r12 movq %rax, %rbx shrq $0x20, %rbx movzwl 0x9(%r13), %eax andl $0xffff00ff, %ebx # imm = 0xFFFF00FF testq %rbp, %rbp js 0x467d4 movl %eax, %ecx andl $0x70, %ecx shll $0x4, %ecx xorl %edx, %edx cmpl $0x100, %ecx # imm = 0x100 cmovnel %ecx, %edx orl %edx, %ebx fldt 0x24(%rsp) jmp 0x467e0 orl $0x100, %ebx # imm = 0x100 fldt 0x24(%rsp) fchs andl $0xf, %eax cmpw $0x4, %ax jne 0x46846 movl %ebx, %eax andl $0xff00, %eax # imm = 0xFF00 je 0x46846 movzbl %bh, %eax leaq 0x3e1f2(%rip), %rcx # 0x849ee movb (%rax,%rcx), %bpl movq 0x10(%r14), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%r14) jae 0x46826 movq (%r14), %rax movq %r14, %rdi fstpt 0x24(%rsp) callq *(%rax) fldt 0x24(%rsp) movq 0x10(%r14), %rax leaq 0x1(%rax), %rsi movq 0x8(%r14), %rcx movq %rsi, 0x10(%r14) movb %bpl, (%rcx,%rax) andl $0xffff00ff, %ebx # imm = 0xFFFF00FF movl 0x10(%rsp), %eax testl %eax, %eax je 0x46846 decl %eax movl %eax, 0x10(%rsp) leaq 0x70(%rsp), %r13 movq $0x0, -0x10(%r13) leaq 0x6c30e(%rip), %rax # 0xb2b68 addq $0x10, %rax movq %rax, -0x20(%r13) movq %r13, -0x18(%r13) movq $0x1f4, -0x8(%r13) # imm = 0x1F4 cmpb $0x3, %bl jne 0x468db testl $0xff00, %ebx # imm = 0xFF00 je 0x46895 movzbl %bh, %eax leaq 0x3e169(%rip), %rcx # 0x849ee movb (%rax,%rcx), %al movq $0x1, 0x60(%rsp) movb %al, 0x70(%rsp) movl 0x14(%rsp), %edi shlq $0x20, %rbx movl %r12d, %esi orq %rbx, %rsi fstpt (%rsp) leaq 0x50(%rsp), %rdx callq 0x46a5a movq 0x58(%rsp), %rax movq 0x60(%rsp), %rcx leaq 0x40(%rsp), %r8 movq %rax, (%r8) movq %rcx, 0x8(%r8) leaq 0x10(%rsp), %rsi movq %r14, %rdi movq %rcx, %rdx callq 0x47035 jmp 0x4695e cmpb $0x0, 0x18(%rsp) movl 0x14(%rsp), %eax movl $0x6, %ebp cmovel %eax, %ebp testl %eax, %eax cmovnsl %eax, %ebp cmpb $0x1, %bl jne 0x46906 cmpl $0x7fffffff, %ebp # imm = 0x7FFFFFFF je 0x4698a incl %ebp jmp 0x46916 testl %ebp, %ebp movl $0x1, %eax cmovnel %ebp, %eax cmpb $0x2, %bl cmovnel %eax, %ebp shlq $0x20, %rbx movl %r12d, %esi orq %rbx, %rsi fstpt (%rsp) leaq 0x50(%rsp), %rdx movl %ebp, %edi callq 0x46dc1 movq 0x58(%rsp), %rcx leaq 0x40(%rsp), %rsi movq %rcx, (%rsi) movl 0x60(%rsp), %ecx movl %ecx, 0x8(%rsi) movl %eax, 0xc(%rsi) movl %ebp, %eax orq %rax, %rbx leaq 0x10(%rsp), %rdx movq %r14, %rdi movq %rbx, %rcx movq %r15, %r8 callq 0x482c8 movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r13, %rdi je 0x46975 movq 0x68(%rsp), %rsi callq 0x11120 movq %rbx, %rax addq $0x268, %rsp # imm = 0x268 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq fstp %st(0) leaq 0x3d86d(%rip), %rdi # 0x84200 callq 0x40276 jmp 0x4699e jmp 0x4699e jmp 0x4699e movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r13, %rdi je 0x469b5 movq 0x68(%rsp), %rsi callq 0x11120 movq %rbx, %rdi callq 0x11760
_ZN3fmt3v106detail11write_floatIcNS0_8appenderEeEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 268h mov r15, rcx mov r14, rdi fld [rsp+298h+arg_0] fld st fstp tbyte ptr [rsp+298h+var_274] fstp tbyte ptr [rsp+298h+var_268]; int movsx rbp, word ptr [rsp+38h] lea r13, [rsp+298h+var_288] mov [r13+0], rsi mov [r13+8], rdx mov rdi, r13 call _ZN3fmt3v106detail21parse_float_type_specIcEENS1_11float_specsERKNS0_12format_specsIT_EE; fmt::v10::detail::parse_float_type_spec<char>(fmt::v10::format_specs<char> const&) mov r12, rax mov rbx, rax shr rbx, 20h movzx eax, word ptr [r13+9] and ebx, 0FFFF00FFh test rbp, rbp js short loc_467D4 mov ecx, eax and ecx, 70h shl ecx, 4 xor edx, edx cmp ecx, 100h cmovnz edx, ecx or ebx, edx fld tbyte ptr [rsp+298h+var_274] jmp short loc_467E0 loc_467D4: or ebx, 100h fld tbyte ptr [rsp+298h+var_274] fchs loc_467E0: and eax, 0Fh cmp ax, 4 jnz short loc_46846 mov eax, ebx and eax, 0FF00h jz short loc_46846 movzx eax, bh lea rcx, byte_849EE mov bpl, [rax+rcx] mov rax, [r14+10h] lea rsi, [rax+1] cmp [r14+18h], rsi jnb short loc_46826 mov rax, [r14] mov rdi, r14 fstp tbyte ptr [rsp+298h+var_274]; char call qword ptr [rax] fld tbyte ptr [rsp+298h+var_274] mov rax, [r14+10h] lea rsi, [rax+1]; char * loc_46826: mov rcx, [r14+8] mov [r14+10h], rsi mov [rcx+rax], bpl and ebx, 0FFFF00FFh mov eax, [rsp+298h+var_288] test eax, eax jz short loc_46846 dec eax mov [rsp+298h+var_288], eax; int loc_46846: lea r13, [rsp+298h+var_228] mov qword ptr [r13-10h], 0 lea rax, _ZTVN3fmt3v1019basic_memory_bufferIcLm500ESaIcEEE; `vtable for'fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>> add rax, 10h mov [r13-20h], rax mov [r13-18h], r13 mov qword ptr [r13-8], 1F4h cmp bl, 3 jnz short loc_468DB test ebx, 0FF00h jz short loc_46895 movzx eax, bh lea rcx, byte_849EE mov al, [rax+rcx] mov [rsp+298h+var_238], 1 mov [rsp+298h+var_228], al loc_46895: mov edi, [rsp+298h+var_284] shl rbx, 20h mov esi, r12d or rsi, rbx fstp tbyte ptr [rsp+298h+var_298] lea rdx, [rsp+298h+var_248] call _ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE mov rax, [rsp+298h+var_240] mov rcx, [rsp+298h+var_238] lea r8, [rsp+298h+var_258] mov [r8], rax mov [r8+8], rcx lea rsi, [rsp+298h+var_288] mov rdi, r14 mov rdx, rcx call _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_11write_bytesILS4_2EcS5_EET1_S7_NS0_17basic_string_viewIcEERKNS0_12format_specsIT0_EEEUlS5_E_EESB_SB_RKNSA_IS7_EEmmOT2_; fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>(char,fmt::v10::format_specs<fmt::v10::appender> const&,ulong,ulong,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &) jmp loc_4695E loc_468DB: cmp [rsp+298h+var_280], 0 mov eax, [rsp+298h+var_284] mov ebp, 6 cmovz ebp, eax test eax, eax cmovns ebp, eax cmp bl, 1 jnz short loc_46906 cmp ebp, 7FFFFFFFh jz loc_4698A inc ebp jmp short loc_46916 loc_46906: test ebp, ebp mov eax, 1 cmovnz eax, ebp cmp bl, 2 cmovnz ebp, eax loc_46916: shl rbx, 20h mov esi, r12d or rsi, rbx fstp tbyte ptr [rsp+298h+var_298]; int lea rdx, [rsp+298h+var_248] mov edi, ebp call _ZN3fmt3v106detail12format_floatIeEEiT_iNS1_11float_specsERNS1_6bufferIcEE; fmt::v10::detail::format_float<long double>(long double,int,fmt::v10::detail::float_specs,fmt::v10::detail::buffer<char> &) mov rcx, [rsp+298h+var_240] lea rsi, [rsp+298h+var_258] mov [rsi], rcx mov ecx, dword ptr [rsp+298h+var_238] mov [rsi+8], ecx mov [rsi+0Ch], eax mov eax, ebp or rbx, rax lea rdx, [rsp+298h+var_288] mov rdi, r14; int mov rcx, rbx mov r8, r15 call _ZN3fmt3v106detail14do_write_floatINS0_8appenderENS1_14big_decimal_fpEcNS1_14digit_groupingIcEEEET_S7_RKT0_RKNS0_12format_specsIT1_EENS1_11float_specsENS1_10locale_refE; fmt::v10::detail::do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>>(fmt::v10::appender,fmt::v10::detail::big_decimal_fp const&,fmt::v10::format_specs<char> const&,fmt::v10::detail::float_specs,fmt::v10::detail::locale_ref) loc_4695E: mov rbx, rax mov rdi, [rsp+298h+var_240]; void * cmp rdi, r13 jz short loc_46975 mov rsi, [rsp+298h+var_230]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_46975: mov rax, rbx add rsp, 268h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4698A: fstp st lea rdi, aNumberIsTooBig; "number is too big" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) jmp short loc_4699E jmp short loc_4699E jmp short $+2 loc_4699E: mov rbx, rax mov rdi, [rsp+298h+var_240]; void * cmp rdi, r13 jz short loc_469B5 mov rsi, [rsp+298h+var_230]; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_469B5: mov rdi, rbx call __Unwind_Resume
long long fmt::v10::detail::write_float<char,fmt::v10::appender,long double>( long long a1, const char *a2, long long a3, long double a4) { long long v7; // rbp _BYTE *v8; // rcx int v9; // r8d int v10; // r9d long long v11; // r12 __int16 v12; // dx __int16 v13; // bx long double v14; // fst7 char v15; // bp long long v16; // rax void ( **v17)(long long); // rax char v18; // al long long v19; // rax int v20; // ebp long long v21; // rbx long double v23; // [rsp+0h] [rbp-298h] int v24; // [rsp+0h] [rbp-298h] int v25; // [rsp+8h] [rbp-290h] const char *v26; // [rsp+10h] [rbp-288h] BYREF long long v27; // [rsp+18h] [rbp-280h] int v28; // [rsp+20h] [rbp-278h] _BYTE v29[28]; // [rsp+24h] [rbp-274h] void *v30; // [rsp+40h] [rbp-258h] long long v31; // [rsp+48h] [rbp-250h] long long *v32; // [rsp+50h] [rbp-248h] BYREF void *v33; // [rsp+58h] [rbp-240h] long long v34; // [rsp+60h] [rbp-238h] unsigned long long v35; // [rsp+68h] [rbp-230h] int v36[8]; // [rsp+70h] [rbp-228h] BYREF char v37; // [rsp+90h] [rbp-208h] *(long double *)v29 = a4; *(long double *)&v29[12] = a4; v7 = *(__int16 *)&v29[20]; v26 = a2; v27 = a3; v11 = fmt::v10::detail::parse_float_type_spec<char>(&v26); if ( v7 < 0 ) { v13 = BYTE4(v11) | 0x100; v14 = -*(long double *)v29; } else { LODWORD(v8) = 16 * (BYTE1(v27) & 0x70); v12 = 0; if ( (_DWORD)v8 != 256 ) v12 = 16 * (BYTE1(v27) & 0x70); v13 = v12 | BYTE4(v11); v14 = *(long double *)v29; } if ( (BYTE1(v27) & 0xF) == 4 && (v13 & 0xFF00) != 0 ) { v15 = byte_849EE[HIBYTE(v13)]; v16 = *(_QWORD *)(a1 + 16); a2 = (const char *)(v16 + 1); if ( *(_QWORD *)(a1 + 24) < (unsigned long long)(v16 + 1) ) { v17 = *(void ( ***)(long long))a1; *(long double *)v29 = v14; (*v17)(a1); v14 = *(long double *)v29; v16 = *(_QWORD *)(a1 + 16); a2 = (const char *)(v16 + 1); } v8 = *(_BYTE **)(a1 + 8); *(_QWORD *)(a1 + 16) = a2; v8[v16] = v15; v13 = (unsigned __int8)v13; if ( (_DWORD)v26 ) LODWORD(v26) = (_DWORD)v26 - 1; } v34 = 0LL; v32 = &`vtable for'fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>> + 2; v33 = v36; v35 = 500LL; if ( (_BYTE)v13 == 3 ) { if ( (v13 & 0xFF00) != 0 ) { v8 = byte_849EE; v18 = byte_849EE[HIBYTE(v13)]; v34 = 1LL; LOBYTE(v36[0]) = v18; } ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE( HIDWORD(v26), v11, (unsigned int)&v32, (_DWORD)v8, v9, v10, *(long long *)&v14, WORD4(*(unsigned __int128 *)&v14)); v30 = v33; v31 = v34; v19 = fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1} &>( a1, &v26, v34); } else { v20 = 6; if ( !(_BYTE)v27 ) v20 = HIDWORD(v26); if ( SHIDWORD(v26) >= 0 ) v20 = HIDWORD(v26); if ( (_BYTE)v13 == 1 && v20 == 0x7FFFFFFF ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", a2); v23 = v14; fmt::v10::detail::format_float<long double>(*(_TBYTE *)&v23); v19 = fmt::v10::detail::do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>>( a1, v24, v25, (int)v26, v27, v28, v29[4], *(int *)&v29[12], *(int *)&v29[20], (int)v33, v34, (int)v32, (int)v33, v34, v35, v36[0], v36[2], v36[4], v36[6], v37); } v21 = v19; if ( v33 != v36 ) operator delete(v33, v35); return v21; }
write_float<char,fmt::v10::appender,long_double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x268 MOV R15,RCX MOV R14,RDI FLD tword ptr [RSP + 0x2a0] FLD ST0 FSTP tword ptr [RSP + 0x24] FSTP tword ptr [RSP + 0x30] MOVSX RBP,word ptr [RSP + 0x38] LEA R13,[RSP + 0x10] MOV qword ptr [R13],RSI MOV qword ptr [R13 + 0x8],RDX MOV RDI,R13 CALL 0x001469bd MOV R12,RAX MOV RBX,RAX SHR RBX,0x20 MOVZX EAX,word ptr [R13 + 0x9] AND EBX,0xffff00ff TEST RBP,RBP JS 0x001467d4 MOV ECX,EAX AND ECX,0x70 SHL ECX,0x4 XOR EDX,EDX CMP ECX,0x100 CMOVNZ EDX,ECX OR EBX,EDX FLD tword ptr [RSP + 0x24] JMP 0x001467e0 LAB_001467d4: OR EBX,0x100 FLD tword ptr [RSP + 0x24] FCHS LAB_001467e0: AND EAX,0xf CMP AX,0x4 JNZ 0x00146846 MOV EAX,EBX AND EAX,0xff00 JZ 0x00146846 MOVZX EAX,BH LEA RCX,[0x1849ee] MOV BPL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [R14 + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [R14 + 0x18],RSI JNC 0x00146826 MOV RAX,qword ptr [R14] MOV RDI,R14 FSTP tword ptr [RSP + 0x24] CALL qword ptr [RAX] FLD tword ptr [RSP + 0x24] MOV RAX,qword ptr [R14 + 0x10] LEA RSI,[RAX + 0x1] LAB_00146826: MOV RCX,qword ptr [R14 + 0x8] MOV qword ptr [R14 + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],BPL AND EBX,0xffff00ff MOV EAX,dword ptr [RSP + 0x10] TEST EAX,EAX JZ 0x00146846 DEC EAX MOV dword ptr [RSP + 0x10],EAX LAB_00146846: LEA R13,[RSP + 0x70] MOV qword ptr [R13 + -0x10],0x0 LEA RAX,[0x1b2b68] ADD RAX,0x10 MOV qword ptr [R13 + -0x20],RAX MOV qword ptr [R13 + -0x18],R13 MOV qword ptr [R13 + -0x8],0x1f4 CMP BL,0x3 JNZ 0x001468db TEST EBX,0xff00 JZ 0x00146895 MOVZX EAX,BH LEA RCX,[0x1849ee] MOV AL,byte ptr [RAX + RCX*0x1] MOV qword ptr [RSP + 0x60],0x1 MOV byte ptr [RSP + 0x70],AL LAB_00146895: MOV EDI,dword ptr [RSP + 0x14] SHL RBX,0x20 MOV ESI,R12D OR RSI,RBX LAB_001468a3: FSTP tword ptr [RSP] LEA RDX,[RSP + 0x50] CALL 0x00146a5a MOV RAX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x60] LEA R8,[RSP + 0x40] MOV qword ptr [R8],RAX MOV qword ptr [R8 + 0x8],RCX LEA RSI,[RSP + 0x10] MOV RDI,R14 MOV RDX,RCX CALL 0x00147035 JMP 0x0014695e LAB_001468db: CMP byte ptr [RSP + 0x18],0x0 MOV EAX,dword ptr [RSP + 0x14] MOV EBP,0x6 CMOVZ EBP,EAX TEST EAX,EAX CMOVNS EBP,EAX CMP BL,0x1 JNZ 0x00146906 CMP EBP,0x7fffffff JZ 0x0014698a INC EBP JMP 0x00146916 LAB_00146906: TEST EBP,EBP MOV EAX,0x1 CMOVNZ EAX,EBP CMP BL,0x2 CMOVNZ EBP,EAX LAB_00146916: SHL RBX,0x20 MOV ESI,R12D OR RSI,RBX LAB_00146920: FSTP tword ptr [RSP] LEA RDX,[RSP + 0x50] MOV EDI,EBP CALL 0x00146dc1 MOV RCX,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],RCX MOV ECX,dword ptr [RSP + 0x60] MOV dword ptr [RSI + 0x8],ECX MOV dword ptr [RSI + 0xc],EAX MOV EAX,EBP OR RBX,RAX LAB_0014694b: LEA RDX,[RSP + 0x10] MOV RDI,R14 MOV RCX,RBX MOV R8,R15 CALL 0x001482c8 LAB_0014695e: MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x58] CMP RDI,R13 JZ 0x00146975 MOV RSI,qword ptr [RSP + 0x68] CALL 0x00111120 LAB_00146975: MOV RAX,RBX ADD RSP,0x268 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014698a: FSTP ST0 LAB_0014698c: LEA RDI,[0x184200] CALL 0x00140276
/* fmt::v10::appender fmt::v10::detail::write_float<char, fmt::v10::appender, long double>(fmt::v10::appender, long double, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref) */ int8 fmt::v10::detail::write_float<char,fmt::v10::appender,long_double> (int8 *param_1,long param_2,int8 param_3,int8 param_4,int8 param_5 ,int8 param_6,longdouble param_7) { int1 uVar1; unkbyte10 Var2; int2 uVar3; uint uVar4; int iVar5; ulong uVar6; long lVar7; int8 uVar8; char cVar9; uint uVar10; ulong uVar11; bool bVar12; longdouble lVar13; int8 local_288; int8 local_280; longdouble local_274; int1 local_268 [16]; int1 *local_258; ulong local_250; int **local_248; int1 *local_240; ulong local_238; ulong local_230; int1 local_228 [504]; local_274 = param_7; local_268._0_10_ = param_7; Var2 = local_268._0_10_; local_268._8_2_ = (int2)((unkuint10)param_7 >> 0x40); uVar3 = local_268._8_2_; local_288 = param_2; local_280 = param_3; local_268._0_10_ = Var2; uVar6 = parse_float_type_spec<char>((format_specs *)&local_288); uVar10 = (uint)(uVar6 >> 0x20) & 0xffff00ff; if ((short)uVar3 < 0) { uVar10 = uVar10 | 0x100; lVar13 = -local_274; } else { uVar4 = 0; if ((local_280._1_2_ & 0x70) != 0x10) { uVar4 = (local_280._1_2_ & 0x70) << 4; } uVar10 = uVar10 | uVar4; lVar13 = local_274; } uVar11 = (ulong)uVar10; if (((local_280._1_2_ & 0xf) == 4) && ((uVar10 & 0xff00) != 0)) { uVar1 = (&DAT_001849ee)[(ulong)(uVar10 >> 8) & 0xff]; lVar7 = param_1[2]; uVar11 = lVar7 + 1; if ((ulong)param_1[3] < uVar11) { local_274 = lVar13; (**(code **)*param_1)(param_1); lVar7 = param_1[2]; uVar11 = lVar7 + 1; lVar13 = local_274; } param_1[2] = uVar11; *(int1 *)(param_1[1] + lVar7) = uVar1; uVar11 = (ulong)(uVar10 & 0xffff00ff); if ((int)local_288 != 0) { local_288 = CONCAT44(local_288._4_4_,(int)local_288 + -1); } } local_238 = 0; local_248 = &PTR_grow_001b2b78; local_230 = 500; cVar9 = (char)uVar11; local_240 = local_228; if (cVar9 == '\x03') { bVar12 = (uVar11 & 0xff00) != 0; if (bVar12) { local_228[0] = (&DAT_001849ee)[uVar11 >> 8 & 0xff]; } local_238 = (ulong)bVar12; /* try { // try from 001468a3 to 001468d5 has its CatchHandler @ 0014699e */ _ZN3fmt3v106detail15format_hexfloatIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEvS4_iNS1_11float_specsERNS1_6bufferIcEE (local_288._4_4_,uVar6 & 0xffffffff | uVar11 << 0x20,&local_248); local_258 = local_240; local_250 = local_238; uVar8 = write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_bytes<(fmt::v10::align::type)2,char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_&> (param_1,&local_288,local_238); } else { uVar10 = 6; if ((char)local_280 == '\0') { uVar10 = local_288._4_4_; } if (-1 < local_288) { uVar10 = local_288._4_4_; } if (cVar9 == '\x01') { if (uVar10 == 0x7fffffff) { /* try { // try from 0014698c to 00146997 has its CatchHandler @ 00146998 */ /* WARNING: Subroutine does not return */ throw_format_error("number is too big"); } uVar10 = uVar10 + 1; } else { uVar4 = 1; if (uVar10 != 0) { uVar4 = uVar10; } if (cVar9 != '\x02') { uVar10 = uVar4; } } /* try { // try from 00146920 to 0014692e has its CatchHandler @ 0014699c */ iVar5 = format_float<long_double>(uVar10,uVar6 & 0xffffffff | uVar11 << 0x20,&local_248); local_258 = local_240; local_250 = CONCAT44(iVar5,(int)local_238); /* try { // try from 0014694b to 0014695d has its CatchHandler @ 0014699a */ uVar8 = do_write_float<fmt::v10::appender,fmt::v10::detail::big_decimal_fp,char,fmt::v10::detail::digit_grouping<char>> (param_1,&local_258,&local_288,uVar11 << 0x20 | (ulong)uVar10,param_4,param_6, lVar13); } if (local_240 != local_228) { operator_delete(local_240,local_230); } return uVar8; }
65,752
my_strcasecmp_utf8mb3
eloqsql/strings/ctype-utf8.c
static int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t) { MY_UNICASE_INFO *uni_plane= cs->caseinfo; while (s[0] && t[0]) { my_wc_t s_wc,t_wc; if ((uchar) s[0] < 128) { /* s[0] is between 0 and 127. It represents a single byte character. Convert it into weight according to collation. */ s_wc= my_unicase_default_page00[(uchar) s[0]].tolower; s++; } else { int res; /* Scan a multibyte character. In the future it is worth to write a special version of my_utf8mb3_uni() for 0-terminated strings which will not take in account length. Now we call the regular version of my_utf8mb3_uni() with s+3 in the last argument. s+3 is enough to scan any multibyte sequence. Calling the regular version of my_utf8mb3_uni is safe for 0-terminated strings: we will never lose the end of the string: If we have 0 character in the middle of a multibyte sequence, then my_utf8mb3_uni will always return a negative number, so the loop with finish. */ res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3); /* In the case of wrong multibyte sequence we will call strcmp() for byte-to-byte comparison. */ if (res <= 0) return strcmp(s, t); s+= res; /* Convert Unicode code into weight according to collation */ my_tolower_utf8mb3(uni_plane, &s_wc); } /* Do the same for the second string */ if ((uchar) t[0] < 128) { /* Convert single byte character into weight */ t_wc= my_unicase_default_page00[(uchar) t[0]].tolower; t++; } else { int res=my_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3); if (res <= 0) return strcmp(s, t); t+= res; /* Convert code into weight */ my_tolower_utf8mb3(uni_plane, &t_wc); } /* Now we have two weights, let's compare them */ if ( s_wc != t_wc ) return ((int) s_wc) - ((int) t_wc); } return ((int)(uchar)s[0]) - ((int) (uchar) t[0]); }
O0
c
my_strcasecmp_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x41(%rbp) je 0xfc041 movq -0x20(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0xfc04d jmp 0xfc186 movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0xfc087 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x324f05(%rip), %rax # 0x420f70 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0xfc0dc movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x18(%rbp), %rcx addq $0x3, %rcx leaq -0x30(%rbp), %rsi callq 0xfa6d0 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jg 0xfc0be movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x3b990 movl %eax, -0x4(%rbp) jmp 0xfc199 movl -0x3c(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xfb9a0 movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0xfc116 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x324e76(%rip), %rax # 0x420f70 imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xfc168 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x20(%rbp), %rcx addq $0x3, %rcx leaq -0x38(%rbp), %rsi callq 0xfa6d0 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0xfc14a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x3b990 movl %eax, -0x4(%rbp) jmp 0xfc199 movl -0x40(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0xfb9a0 movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0xfc181 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx subl %ecx, %eax movl %eax, -0x4(%rbp) jmp 0xfc199 jmp 0xfc020 movq -0x18(%rbp), %rax movzbl (%rax), %eax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx subl %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strcasecmp_utf8mb3: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+78h] mov [rbp+var_28], rax loc_FC020: mov rax, [rbp+var_18] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_41], al jz short loc_FC041 mov rax, [rbp+var_20] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_41], al loc_FC041: mov al, [rbp+var_41] test al, 1 jnz short loc_FC04D jmp loc_FC186 loc_FC04D: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_FC087 mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_30], rax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_FC0DC loc_FC087: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_18] add rcx, 3 lea rsi, [rbp+var_30] call my_utf8mb3_uni mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jg short loc_FC0BE mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp loc_FC199 loc_FC0BE: mov ecx, [rbp+var_3C] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_30] call my_tolower_utf8mb3 loc_FC0DC: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_FC116 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_unicase_default_page00 imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_FC168 loc_FC116: mov rdi, [rbp+var_10] mov rdx, [rbp+var_20] mov rcx, [rbp+var_20] add rcx, 3 lea rsi, [rbp+var_38] call my_utf8mb3_uni mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_FC14A mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call _strcmp mov [rbp+var_4], eax jmp short loc_FC199 loc_FC14A: mov ecx, [rbp+var_40] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_28] lea rsi, [rbp+var_38] call my_tolower_utf8mb3 loc_FC168: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_FC181 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] sub eax, ecx mov [rbp+var_4], eax jmp short loc_FC199 loc_FC181: jmp loc_FC020 loc_FC186: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] sub eax, ecx mov [rbp+var_4], eax loc_FC199: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_strcasecmp_utf8mb3(long long a1, _BYTE *a2, _BYTE *a3, long long a4, long long a5, long long a6) { bool v7; // [rsp+Fh] [rbp-41h] int v8; // [rsp+10h] [rbp-40h] int v9; // [rsp+14h] [rbp-3Ch] long long v10; // [rsp+18h] [rbp-38h] BYREF long long v11; // [rsp+20h] [rbp-30h] BYREF long long v12; // [rsp+28h] [rbp-28h] _BYTE *v13; // [rsp+30h] [rbp-20h] _BYTE *v14; // [rsp+38h] [rbp-18h] long long v15; // [rsp+40h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( *v14 ) v7 = *v13 != 0; if ( !v7 ) break; if ( (unsigned __int8)*v14 >= 0x80u ) { v9 = my_utf8mb3_uni(v15, (long long)&v11, (long long)v14, (long long)(v14 + 3), a5, a6); if ( v9 <= 0 ) return (unsigned int)strcmp(v14, v13); v14 += v9; my_tolower_utf8mb3(v12, &v11); } else { v11 = my_unicase_default_page00[3 * (unsigned __int8)*v14++ + 1]; } if ( (unsigned __int8)*v13 >= 0x80u ) { v8 = my_utf8mb3_uni(v15, (long long)&v10, (long long)v13, (long long)(v13 + 3), a5, a6); if ( v8 <= 0 ) return (unsigned int)strcmp(v14, v13); v13 += v8; my_tolower_utf8mb3(v12, &v10); } else { v10 = my_unicase_default_page00[3 * (unsigned __int8)*v13++ + 1]; } if ( v11 != v10 ) return (unsigned int)(v11 - v10); } return (unsigned int)((unsigned __int8)*v14 - (unsigned __int8)*v13); }
my_strcasecmp_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x50 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 + 0x78] MOV qword ptr [RBP + -0x28],RAX LAB_001fc020: MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x001fc041 MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_001fc041: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x001fc04d JMP 0x001fc186 LAB_001fc04d: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x001fc087 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x520f70] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001fc0dc LAB_001fc087: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x3 LEA RSI,[RBP + -0x30] CALL 0x001fa6d0 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JG 0x001fc0be MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0013b990 MOV dword ptr [RBP + -0x4],EAX JMP 0x001fc199 LAB_001fc0be: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x001fb9a0 LAB_001fc0dc: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x001fc116 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x520f70] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001fc168 LAB_001fc116: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x3 LEA RSI,[RBP + -0x38] CALL 0x001fa6d0 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x001fc14a MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0013b990 MOV dword ptr [RBP + -0x4],EAX JMP 0x001fc199 LAB_001fc14a: MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x38] CALL 0x001fb9a0 LAB_001fc168: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x001fc181 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001fc199 LAB_001fc181: JMP 0x001fc020 LAB_001fc186: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] SUB EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001fc199: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3) { int iVar1; bool bVar2; ulong local_40; ulong local_38; int8 local_30; byte *local_28; byte *local_20; long local_18; local_30 = *(int8 *)(param_1 + 0x78); local_28 = param_3; local_20 = param_2; local_18 = param_1; do { bVar2 = false; if (*local_20 != 0) { bVar2 = *local_28 != 0; } if (!bVar2) { return (uint)*local_20 - (uint)*local_28; } if (*local_20 < 0x80) { local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4); local_20 = local_20 + 1; } else { iVar1 = my_utf8mb3_uni(local_18,&local_38,local_20,local_20 + 3); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_20 = local_20 + iVar1; my_tolower_utf8mb3(local_30,&local_38); } if (*local_28 < 0x80) { local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4); local_28 = local_28 + 1; } else { iVar1 = my_utf8mb3_uni(local_18,&local_40,local_28,local_28 + 3); if (iVar1 < 1) { iVar1 = strcmp((char *)local_20,(char *)local_28); return iVar1; } local_28 = local_28 + iVar1; my_tolower_utf8mb3(local_30,&local_40); } } while (local_38 == local_40); return (int)local_38 - (int)local_40; }
65,753
maria_enable_indexes
eloqsql/storage/maria/ma_open.c
int maria_enable_indexes(MARIA_HA *info) { int error= 0; MARIA_SHARE *share= info->s; DBUG_ENTER("maria_enable_indexes"); if ((share->state.state.data_file_length != (share->data_file_type == BLOCK_RECORD ? share->block_size : 0)) || (share->state.state.key_file_length != share->base.keystart)) { DBUG_PRINT("error", ("data_file_length: %lu key_file_length: %lu", (ulong) share->state.state.data_file_length, (ulong) share->state.state.key_file_length)); _ma_set_fatal_error(info, HA_ERR_CRASHED); error= HA_ERR_CRASHED; } else maria_set_all_keys_active(share->state.key_map, share->base.keys); DBUG_RETURN(error); }
O0
c
maria_enable_indexes: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpl $0x3, 0x7d0(%rax) jne 0x6a216 movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x24(%rbp) jmp 0x6a21d xorl %eax, %eax movl %eax, -0x24(%rbp) jmp 0x6a21d movq -0x20(%rbp), %rax movl -0x24(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jne 0x6a240 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rcx cmpq 0x360(%rcx), %rax je 0x6a25b jmp 0x6a242 jmp 0x6a244 movq -0x8(%rbp), %rdi movl $0x7e, %esi callq 0x34c30 movl $0x7e, -0xc(%rbp) jmp 0x6a2a2 movq -0x18(%rbp), %rax cmpl $0x40, 0x3e8(%rax) jae 0x6a286 movq -0x18(%rbp), %rax movl 0x3e8(%rax), %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax subq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6a293 movq $-0x1, %rax movq %rax, -0x30(%rbp) jmp 0x6a293 movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x140(%rax) jmp 0x6a2a4 movl -0xc(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_enable_indexes: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_20], rax mov rax, [rbp+var_18] cmp dword ptr [rax+7D0h], 3 jnz short loc_6A216 mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_24], eax jmp short loc_6A21D loc_6A216: xor eax, eax mov [rbp+var_24], eax jmp short $+2 loc_6A21D: mov rax, [rbp+var_20] mov ecx, [rbp+var_24] mov ecx, ecx cmp rax, rcx jnz short loc_6A240 mov rax, [rbp+var_18] mov rax, [rax+38h] mov rcx, [rbp+var_18] cmp rax, [rcx+360h] jz short loc_6A25B loc_6A240: jmp short $+2 loc_6A242: jmp short $+2 loc_6A244: mov rdi, [rbp+var_8] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov [rbp+var_C], 7Eh ; '~' jmp short loc_6A2A2 loc_6A25B: mov rax, [rbp+var_18] cmp dword ptr [rax+3E8h], 40h ; '@' jnb short loc_6A286 mov rax, [rbp+var_18] mov eax, [rax+3E8h] mov ecx, eax mov eax, 1 shl rax, cl sub rax, 1 mov [rbp+var_30], rax jmp short loc_6A293 loc_6A286: mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rax jmp short $+2 loc_6A293: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax+140h], rcx loc_6A2A2: jmp short $+2 loc_6A2A4: mov eax, [rbp+var_C] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long maria_enable_indexes(_DWORD *a1, long long a2, long long a3, long long a4, long long a5, int a6) { long long v6; // rcx long long v8; // [rsp+10h] [rbp-30h] unsigned int v9; // [rsp+1Ch] [rbp-24h] long long v10; // [rsp+28h] [rbp-18h] unsigned int v11; // [rsp+34h] [rbp-Ch] v11 = 0; v10 = *(_QWORD *)a1; if ( *(_DWORD *)(*(_QWORD *)a1 + 2000LL) == 3 ) v9 = *(_DWORD *)(v10 + 1980); else v9 = 0; v6 = v9; if ( *(_QWORD *)(*(_QWORD *)a1 + 64LL) == v9 && (v6 = *(_QWORD *)a1, *(_QWORD *)(v10 + 56) == *(_QWORD *)(v10 + 864)) ) { if ( *(_DWORD *)(v10 + 1000) >= 0x40u ) v8 = -1LL; else v8 = (1LL << *(_DWORD *)(v10 + 1000)) - 1; *(_QWORD *)(v10 + 320) = v8; } else { ma_set_fatal_error(a1, 126, a3, v6, a5, a6); return 126; } return v11; }
maria_enable_indexes: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x7d0],0x3 JNZ 0x0016a216 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x24],EAX JMP 0x0016a21d LAB_0016a216: XOR EAX,EAX MOV dword ptr [RBP + -0x24],EAX JMP 0x0016a21d LAB_0016a21d: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV ECX,ECX CMP RAX,RCX JNZ 0x0016a240 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x360] JZ 0x0016a25b LAB_0016a240: JMP 0x0016a242 LAB_0016a242: JMP 0x0016a244 LAB_0016a244: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x7e CALL 0x00134c30 MOV dword ptr [RBP + -0xc],0x7e JMP 0x0016a2a2 LAB_0016a25b: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x3e8],0x40 JNC 0x0016a286 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x3e8] MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL SUB RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016a293 LAB_0016a286: MOV RAX,-0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0016a293 LAB_0016a293: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x140],RCX LAB_0016a2a2: JMP 0x0016a2a4 LAB_0016a2a4: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int4 maria_enable_indexes(long *param_1) { long lVar1; int8 local_38; int4 local_2c; int4 local_14; local_14 = 0; lVar1 = *param_1; if (*(int *)(lVar1 + 2000) == 3) { local_2c = *(uint *)(lVar1 + 0x7bc); } else { local_2c = 0; } if ((*(ulong *)(lVar1 + 0x40) == (ulong)local_2c) && (*(long *)(lVar1 + 0x38) == *(long *)(lVar1 + 0x360))) { if (*(uint *)(lVar1 + 1000) < 0x40) { local_38 = (1L << ((byte)*(int4 *)(lVar1 + 1000) & 0x3f)) + -1; } else { local_38 = -1; } *(long *)(lVar1 + 0x140) = local_38; } else { _ma_set_fatal_error(param_1,0x7e); local_14 = 0x7e; } return local_14; }
65,754
my_os_charset_to_mysql_charset
eloqsql/mysys/charset.c
static const char* my_os_charset_to_mysql_charset(const char* csname) { const MY_CSET_OS_NAME* csp; for (csp = charsets; csp->os_name; csp++) { if (!strcasecmp(csp->os_name, csname)) { switch (csp->param) { case my_cs_exact: return csp->my_name; case my_cs_approx: /* Maybe we should print a warning eventually: character set correspondence is not exact. */ return csp->my_name; default: return NULL; } } } return NULL; }
O0
c
my_os_charset_to_mysql_charset: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x1a3bdd(%rip), %rax # 0x1db7e0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x37c76 movq -0x18(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi callq 0x25390 cmpl $0x0, %eax jne 0x37c66 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x1c(%rbp) testl %eax, %eax je 0x37c40 jmp 0x37c36 movl -0x1c(%rbp), %eax subl $0x1, %eax je 0x37c4e jmp 0x37c5c movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x37c7e movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) jmp 0x37c7e movq $0x0, -0x8(%rbp) jmp 0x37c7e jmp 0x37c68 movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x18(%rbp) jmp 0x37c07 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_os_charset_to_mysql_charset: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, charsets mov [rbp+var_18], rax loc_37C07: mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_37C76 mov rax, [rbp+var_18] mov rdi, [rax] mov rsi, [rbp+var_10] call _strcasecmp cmp eax, 0 jnz short loc_37C66 mov rax, [rbp+var_18] mov eax, [rax+10h] mov [rbp+var_1C], eax test eax, eax jz short loc_37C40 jmp short $+2 loc_37C36: mov eax, [rbp+var_1C] sub eax, 1 jz short loc_37C4E jmp short loc_37C5C loc_37C40: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_37C7E loc_37C4E: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_8], rax jmp short loc_37C7E loc_37C5C: mov [rbp+var_8], 0 jmp short loc_37C7E loc_37C66: jmp short $+2 loc_37C68: mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_18], rax jmp short loc_37C07 loc_37C76: mov [rbp+var_8], 0 loc_37C7E: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
char * my_os_charset_to_mysql_charset(long long a1) { int v2; // [rsp+4h] [rbp-1Ch] char **i; // [rsp+8h] [rbp-18h] for ( i = charsets; ; i += 3 ) { if ( !*i ) return 0LL; if ( !(unsigned int)strcasecmp(*i, a1) ) break; } v2 = *((_DWORD *)i + 4); if ( !v2 ) return i[1]; if ( v2 == 1 ) return i[1]; return 0LL; }
my_os_charset_to_mysql_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x2db7e0] MOV qword ptr [RBP + -0x18],RAX LAB_00137c07: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x00137c76 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00125390 CMP EAX,0x0 JNZ 0x00137c66 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x1c],EAX TEST EAX,EAX JZ 0x00137c40 JMP 0x00137c36 LAB_00137c36: MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1 JZ 0x00137c4e JMP 0x00137c5c LAB_00137c40: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00137c7e LAB_00137c4e: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x00137c7e LAB_00137c5c: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00137c7e LAB_00137c66: JMP 0x00137c68 LAB_00137c68: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x18],RAX JMP 0x00137c07 LAB_00137c76: MOV qword ptr [RBP + -0x8],0x0 LAB_00137c7e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * my_os_charset_to_mysql_charset(char *param_1) { int iVar1; int **local_20; local_20 = &charsets; while( true ) { if (*local_20 == (int *)0x0) { return (int *)0x0; } iVar1 = strcasecmp(*local_20,param_1); if (iVar1 == 0) break; local_20 = local_20 + 3; } if (*(int *)(local_20 + 2) != 0) { if (*(int *)(local_20 + 2) != 1) { return (int *)0x0; } return local_20[1]; } return local_20[1]; }
65,755
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
std::vector<std::string> string_split<std::string>(const std::string & input, char separator) { std::vector<std::string> parts; size_t begin_pos = 0; size_t separator_pos = input.find(separator); while (separator_pos != std::string::npos) { std::string part = input.substr(begin_pos, separator_pos - begin_pos); parts.emplace_back(part); begin_pos = separator_pos + 1; separator_pos = input.find(separator, begin_pos); } parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos)); return parts; }
O2
c
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(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 $0x28, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) xorl %r13d, %r13d movq %rsi, %rdi movl %edx, %esi xorl %edx, %edx callq 0x23ba0 movq %rax, %r15 leaq 0x8(%rsp), %r12 movsbl %bpl, %eax movl %eax, 0x4(%rsp) cmpq $-0x1, %r15 je 0x359d9 movq %r15, %rcx subq %r13, %rcx movq %r12, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x23970 movq %rbx, %rbp movq %rbx, %rdi movq %r12, %rsi callq 0x3adb2 incq %r15 movq %r14, %rdi movl 0x4(%rsp), %esi movq %r15, %rdx callq 0x23ba0 movq %rax, %rbx movq %r12, %rdi callq 0x24218 movq %r15, %r13 movq %rbx, %r15 movq %rbp, %rbx jmp 0x35989 movq %r13, %rcx notq %rcx leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx callq 0x23970 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x3adee leaq 0x8(%rsp), %rdi callq 0x24218 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rbp jmp 0x35a27 jmp 0x35a1f movq %rbx, %rbp movq %rax, %r14 jmp 0x35a34 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x24218 movq %rbp, %rdi callq 0x279bc movq %r14, %rdi callq 0x23fd0
_ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 xor r13d, r13d mov rdi, rsi mov esi, edx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r15, rax lea r12, [rsp+58h+var_50] movsx eax, bpl mov [rsp+58h+var_54], eax loc_35989: cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_359D9 mov rcx, r15 sub rcx, r13 mov rdi, r12 mov rsi, r14 mov rdx, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rbp, rbx mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&) inc r15 mov rdi, r14 mov esi, [rsp+58h+var_54] mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov rbx, rax mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r13, r15 mov r15, rbx mov rbx, rbp jmp short loc_35989 loc_359D9: mov rcx, r13 not rcx lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, rbx jmp short loc_35A27 jmp short $+2 loc_35A1F: mov rbp, rbx mov r14, rax jmp short loc_35A34 loc_35A27: mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_35A34: mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split<std::string>(long long a1, long long a2, unsigned int a3) { char v3; // bp long long v4; // rbx long long v5; // r13 long long v6; // r15 long long v7; // rbp long long v8; // r15 long long v9; // rbx unsigned int v11; // [rsp+4h] [rbp-54h] _BYTE v12[80]; // [rsp+8h] [rbp-50h] BYREF v3 = a3; v4 = a1; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v5 = 0LL; v6 = std::string::find(a2, a3, 0LL); v11 = v3; while ( v6 != -1 ) { std::string::substr(v12, a2, v5, v6 - v5); v7 = v4; std::vector<std::string>::emplace_back<std::string&>(v4, v12); v8 = v6 + 1; v9 = std::string::find(a2, v11, v8); std::string::~string(v12); v5 = v8; v6 = v9; v4 = v7; } std::string::substr(v12, a2, v5, ~v5); std::vector<std::string>::emplace_back<std::string>(v4, v12); std::string::~string(v12); return v4; }
string_split<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 XOR R13D,R13D MOV RDI,RSI MOV ESI,EDX XOR EDX,EDX CALL 0x00123ba0 MOV R15,RAX LEA R12,[RSP + 0x8] MOVSX EAX,BPL MOV dword ptr [RSP + 0x4],EAX LAB_00135989: CMP R15,-0x1 JZ 0x001359d9 MOV RCX,R15 SUB RCX,R13 LAB_00135995: MOV RDI,R12 MOV RSI,R14 MOV RDX,R13 CALL 0x00123970 LAB_001359a3: MOV RBP,RBX MOV RDI,RBX MOV RSI,R12 CALL 0x0013adb2 INC R15 MOV RDI,R14 MOV ESI,dword ptr [RSP + 0x4] MOV RDX,R15 CALL 0x00123ba0 MOV RBX,RAX MOV RDI,R12 CALL 0x00124218 MOV R13,R15 MOV R15,RBX MOV RBX,RBP JMP 0x00135989 LAB_001359d9: MOV RCX,R13 NOT RCX LAB_001359df: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 CALL 0x00123970 LAB_001359ef: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0013adee LAB_001359fc: LEA RDI,[RSP + 0x8] CALL 0x00124218 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */ string * string_split<std::__cxx11::string>(string *param_1,char param_2) { long lVar1; uint in_EDX; int7 in_register_00000031; string local_50 [32]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX); while (lVar1 != -1) { /* try { // try from 00135995 to 001359a2 has its CatchHandler @ 00135a1f */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 001359a3 to 001359b0 has its CatchHandler @ 00135a27 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string&> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50 ); lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX); std::__cxx11::string::~string(local_50); } /* try { // try from 001359df to 001359ee has its CatchHandler @ 00135a1d */ std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2)); /* try { // try from 001359ef to 001359fb has its CatchHandler @ 00135a18 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,local_50); std::__cxx11::string::~string(local_50); return param_1; }
65,756
my_well_formed_char_length_8bit
eloqsql/strings/ctype-simple.c
size_t my_well_formed_char_length_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *start, const char *end, size_t nchars, MY_STRCOPY_STATUS *status) { size_t nbytes= (size_t) (end - start); size_t res= MY_MIN(nbytes, nchars); status->m_well_formed_error_pos= NULL; status->m_source_end_pos= start + res; return res; }
O0
c
my_well_formed_char_length_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x4537b movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x45383 movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax popq %rbp retq nopl (%rax)
my_well_formed_char_length_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jnb short loc_4537B mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_45383 loc_4537B: mov rax, [rbp+var_20] mov [rbp+var_40], rax loc_45383: mov rax, [rbp+var_40] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_38] pop rbp retn
unsigned long long my_well_formed_char_length_8bit( long long a1, long long a2, long long a3, unsigned long long a4, _QWORD *a5) { unsigned long long v6; // [rsp+0h] [rbp-40h] if ( a3 - a2 >= a4 ) v6 = a4; else v6 = a3 - a2; a5[1] = 0LL; *a5 = v6 + a2; return v6; }
my_well_formed_char_length_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0014537b MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x00145383 LAB_0014537b: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX LAB_00145383: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] POP RBP RET
ulong my_well_formed_char_length_8bit (int8 param_1,long param_2,long param_3,ulong param_4,long *param_5) { ulong local_48; local_48 = param_4; if ((ulong)(param_3 - param_2) < param_4) { local_48 = param_3 - param_2; } param_5[1] = 0; *param_5 = param_2 + local_48; return local_48; }
65,757
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle( void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) { auto pc0 = reinterpret_cast<uintptr_t>(pc); uint64_t start_address = 0; uint64_t base_address = 0; FileDescriptor object_fd; if (out_size < 1) { return false; } out[0] = '\0'; SafeAppendString("(", out, out_size); if (g_symbolize_open_object_file_callback) { object_fd.reset(g_symbolize_open_object_file_callback( pc0, start_address, base_address, out + 1, out_size - 1)); } else { object_fd = OpenObjectFileContainingPcAndGetStartAddress( pc0, start_address, base_address, out + 1, out_size - 1); } # if defined(PRINT_UNSYMBOLIZED_STACK_TRACES) { # else // Check whether a file name was returned. if (!object_fd) { # endif if (out[1]) { // The object file containing PC was determined successfully however the // object file was not opened successfully. This is still considered // success because the object file name and offset are known and tools // like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } // Failed to determine the object file containing PC. Bail out. return false; } int elf_type = FileGetElfType(object_fd.get()); if (elf_type == -1) { return false; } if (g_symbolize_callback) { // Run the call back if it's installed. // Note: relocation (and much of the rest of this code) will be // wrong for prelinked shared libraries and PIE executables. uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0; int num_bytes_written = g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation); if (num_bytes_written > 0) { out += static_cast<size_t>(num_bytes_written); out_size -= static_cast<size_t>(num_bytes_written); } } if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size, base_address)) { if (out[1] && !g_symbolize_callback) { // The object file containing PC was opened successfully however the // symbol was not found. The object may have been stripped. This is still // considered success because the object file name and offset are known // and tools like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } return false; } // Symbolization succeeded. Now we try to demangle the symbol. DemangleInplace(out, out_size); return true; } }
O1
cpp
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp xorl %r13d, %r13d movq %r13, 0x18(%rsp) movq %r13, 0x10(%rsp) testq %rdx, %rdx je 0x21536 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movb $0x0, (%rsi) leaq 0x2573(%rip), %rdi # 0x23a7d callq 0x217b6 movq 0x20582(%rip), %rax # 0x41a98 testq %rax, %rax je 0x21540 leaq 0x1(%r15), %rcx leaq -0x1(%r14), %r8 leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %r12, %rdi callq *%rax movl %eax, %ebx jmp 0x21563 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x21766 leaq 0x1(%r15), %r8 leaq -0x1(%r14), %r9 leaq 0x28(%rsp), %rdi leaq 0x18(%rsp), %rdx leaq 0x10(%rsp), %rcx movq %r12, %rsi callq 0x217f3 movl 0x28(%rsp), %ebx cmpl $-0x1, %ebx je 0x216fe leaq 0x28(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi xorl %ecx, %ecx callq 0x2141c cmpq $0x40, %rax sete %al cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F sete %cl andb %al, %cl je 0x2170d movq 0x204f0(%rip), %rax # 0x41a90 testq %rax, %rax je 0x215dd xorl %r8d, %r8d cmpw $0x3, 0x38(%rsp) movl $0x0, %edx jne 0x215ba movq 0x18(%rsp), %rdx testb %cl, %cl cmovneq %rdx, %r8 movl %ebx, %edi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq *%rax xorl %ecx, %ecx testl %eax, %eax movl %eax, %eax cmovgq %rax, %rcx subq %rcx, %r14 addq %rcx, %r15 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi xorl %ecx, %ecx callq 0x2141c cmpq $0x40, %rax jne 0x21712 movq 0x50(%rsp), %rbp movzwl 0x64(%rsp), %r13d leaq 0x68(%rsp), %r8 movl %ebx, %edi movl %r13d, %esi movq %rbp, %rdx movl $0x2, %ecx callq 0x21df8 testb %al, %al je 0x21680 movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %rbp, %rcx leaq 0xa8(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi callq 0x2141c cmpq $0x40, %rax jne 0x21712 leaq 0x68(%rsp), %rax movq %rax, (%rsp) leaq 0xa8(%rsp), %r9 movq %r12, %rdi movl %ebx, %esi movq %r15, %rdx movq %r14, %rcx movq 0x20(%rsp), %r8 callq 0x21f17 testb %al, %al jne 0x216ee leaq 0x68(%rsp), %rax movl %ebx, %edi movl %r13d, %esi movq %rax, %r13 movq %rbp, %rdx movl $0xb, %ecx movq %rax, %r8 callq 0x21df8 testb %al, %al je 0x21712 movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %rbp, %rcx leaq 0xa8(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi callq 0x2141c cmpq $0x40, %rax jne 0x21712 movq %r13, (%rsp) leaq 0xa8(%rsp), %r9 movq %r12, %rdi movl %ebx, %esi movq %r15, %rdx movq %r14, %rcx movq 0x20(%rsp), %r8 callq 0x21f17 testb %al, %al je 0x21712 movb $0x1, %r13b movq %r15, %rdi movq %r14, %rsi callq 0x21d02 jmp 0x21766 cmpb $0x0, 0x1(%r15) je 0x2170d movb $0x0, -0x1(%r15,%r14) jmp 0x2172c xorl %r13d, %r13d jmp 0x21766 xorl %r13d, %r13d cmpb $0x0, 0x1(%r15) je 0x21766 cmpq $0x0, 0x2036c(%rip) # 0x41a90 jne 0x21766 movb $0x0, -0x1(%r14,%r15) leaq 0x3990(%rip), %rdi # 0x250c3 movq %r15, %rsi movq %r14, %rdx callq 0x217b6 subq 0x10(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x21c7b leaq 0x25ed(%rip), %rdi # 0x23d45 movq %r15, %rsi movq %r14, %rdx callq 0x217b6 movb $0x1, %r13b cmpl $-0x1, %ebx je 0x21772 movl %ebx, %edi callq 0x7a40 movl %r13d, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x21797 jmp 0x2178b movq %rax, %r14 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x2179a jmp 0x217ae movq %rax, %r14 cmpl $-0x1, %ebx je 0x217a6 movl %ebx, %edi callq 0x7a40 movq %r14, %rdi callq 0x7990 movq %rax, %rdi callq 0x9fcd
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h xor r13d, r13d mov [rsp+118h+var_100], r13 mov [rsp+118h+var_108], r13 test rdx, rdx jz short loc_21536 mov r14, rdx mov r15, rsi mov r12, rdi mov byte ptr [rsi], 0 lea rdi, asc_23A7C+1; this call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback test rax, rax jz short loc_21540 lea rcx, [r15+1] lea r8, [r14-1] lea rsi, [rsp+118h+var_100] lea rdx, [rsp+118h+var_108] mov rdi, r12 call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback mov ebx, eax jmp short loc_21563 loc_21536: mov ebx, 0FFFFFFFFh jmp loc_21766 loc_21540: lea r8, [r15+1]; char * lea r9, [r14-1]; unsigned __int64 lea rdi, [rsp+118h+var_F0]; this lea rdx, [rsp+118h+var_100]; unsigned __int64 * lea rcx, [rsp+118h+var_108]; unsigned __int64 * mov rsi, r12; unsigned __int64 call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong) mov ebx, [rsp+118h+var_F0] loc_21563: cmp ebx, 0FFFFFFFFh jz loc_216FE lea rsi, [rsp+118h+var_F0]; int mov edx, offset dword_40; void * mov edi, ebx; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' setz al cmp [rsp+118h+var_F0], 464C457Fh setz cl and cl, al jz loc_2170D mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback test rax, rax jz short loc_215DD xor r8d, r8d cmp [rsp+118h+var_E0], 3 mov edx, 0 jnz short loc_215BA mov rdx, [rsp+118h+var_100] loc_215BA: test cl, cl cmovnz r8, rdx mov edi, ebx mov rsi, r12 mov rdx, r15 mov rcx, r14 call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback xor ecx, ecx test eax, eax mov eax, eax cmovg rcx, rax sub r14, rcx add r15, rcx loc_215DD: mov rax, [rsp+118h+var_108] mov [rsp+118h+var_F8], rax lea rsi, [rsp+118h+var_F0]; int mov edx, offset dword_40; void * mov edi, ebx; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_21712 mov rbp, [rsp+118h+var_C8] movzx r13d, [rsp+118h+var_B4] lea r8, [rsp+118h+var_B0] mov edi, ebx; this mov esi, r13d mov rdx, rbp mov ecx, 2 call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_21680 mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, rbp; unsigned __int64 lea rsi, [rsp+118h+var_70]; int mov edx, offset dword_40; void * mov edi, ebx; this call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_21712 lea rax, [rsp+118h+var_B0] mov [rsp+118h+var_118], rax lea r9, [rsp+118h+var_70] mov rdi, r12 mov esi, ebx mov rdx, r15 mov rcx, r14 mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jnz short loc_216EE loc_21680: lea rax, [rsp+118h+var_B0] mov edi, ebx; this mov esi, r13d mov r13, rax mov rdx, rbp mov ecx, 0Bh mov r8, rax call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_21712 mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, rbp; unsigned __int64 lea rsi, [rsp+118h+var_70]; int mov edx, offset dword_40; void * mov edi, ebx; this call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz short loc_21712 mov [rsp+118h+var_118], r13 lea r9, [rsp+118h+var_70] mov rdi, r12 mov esi, ebx mov rdx, r15 mov rcx, r14 mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jz short loc_21712 loc_216EE: mov r13b, 1 mov rdi, r15; this mov rsi, r14; char * call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong) jmp short loc_21766 loc_216FE: cmp byte ptr [r15+1], 0 jz short loc_2170D mov byte ptr [r15+r14-1], 0 jmp short loc_2172C loc_2170D: xor r13d, r13d jmp short loc_21766 loc_21712: xor r13d, r13d cmp byte ptr [r15+1], 0 jz short loc_21766 cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback jnz short loc_21766 mov byte ptr [r14+r15-1], 0 loc_2172C: lea rdi, a0x_0; "+0x" mov rsi, r15; char * mov rdx, r14; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) sub r12, [rsp+118h+var_108] mov rdi, r12; this mov rsi, r15; unsigned __int64 mov rdx, r14; char * call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong) lea rdi, aVoidNglogAnony+86h; this mov rsi, r15; char * mov rdx, r14; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov r13b, 1 loc_21766: cmp ebx, 0FFFFFFFFh jz short loc_21772 mov edi, ebx call _close loc_21772: mov eax, r13d add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_21797 jmp short $+2 loc_2178B: mov r14, rax mov ebx, 0FFFFFFFFh jmp short loc_2179A jmp short loc_217AE loc_21797: mov r14, rax loc_2179A: cmp ebx, 0FFFFFFFFh jz short loc_217A6 mov edi, ebx call _close loc_217A6: mov rdi, r14 call __Unwind_Resume loc_217AE: mov rdi, rax call __clang_call_terminate
long long nglog::tools::SymbolizeAndDemangle( unsigned long long a1, nglog::tools::_anonymous_namespace_ *this, char *a3, unsigned long long a4) { _BYTE *v4; // r13 char *v5; // r14 nglog::tools::_anonymous_namespace_ *v6; // r15 unsigned long long v7; // rcx unsigned int v8; // ebx unsigned long long v9; // rax unsigned long long v10; // rdx int v11; // eax long long v12; // rcx long long v13; // rbp unsigned long long v14; // rdx unsigned long long v15; // rcx unsigned long long v16; // rcx unsigned long long v18; // [rsp+10h] [rbp-108h] BYREF unsigned long long v19; // [rsp+18h] [rbp-100h] BYREF unsigned long long v20; // [rsp+20h] [rbp-F8h] int v21[4]; // [rsp+28h] [rbp-F0h] BYREF __int16 v22; // [rsp+38h] [rbp-E0h] long long v23; // [rsp+50h] [rbp-C8h] unsigned __int16 v24; // [rsp+64h] [rbp-B4h] _BYTE v25[40]; // [rsp+68h] [rbp-B0h] BYREF unsigned int v26; // [rsp+90h] [rbp-88h] int v27[28]; // [rsp+A8h] [rbp-70h] BYREF LODWORD(v4) = 0; v19 = 0LL; v18 = 0LL; if ( !a3 ) { v8 = -1; goto LABEL_29; } v5 = a3; v6 = this; *(_BYTE *)this = 0; nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4); if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback ) { v8 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback( a1, &v19, &v18, (char *)this + 1, v5 - 1); } else { nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( (nglog::tools *)v21, a1, &v19, &v18, (char *)this + 1, (unsigned long long)(v5 - 1)); v8 = v21[0]; } if ( v8 == -1 ) { if ( *((_BYTE *)this + 1) ) { v5[(_QWORD)this - 1] = 0; LABEL_28: nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v6, v5, v7); nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - v18), (unsigned long long)v6, v5, v15); nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v6, v5, v16); LOBYTE(v4) = 1; goto LABEL_29; } LABEL_24: LODWORD(v4) = 0; goto LABEL_29; } v9 = nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL); if ( v9 != 64 || v21[0] != 1179403647 ) goto LABEL_24; if ( nglog::tools::`anonymous namespace'::g_symbolize_callback ) { v10 = 0LL; if ( v22 == 3 ) v10 = v19; v11 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v8, a1, this, v5, v10); v12 = 0LL; if ( v11 > 0 ) v12 = (unsigned int)v11; v5 -= v12; v6 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v12); } v20 = v18; if ( nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL) == 64 ) { v13 = v23; LODWORD(v4) = v24; if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) ) { if ( nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) != 64 ) goto LABEL_25; if ( (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) ) { LABEL_21: LOBYTE(v4) = 1; nglog::tools::`anonymous namespace'::DemangleInplace(v6, v5, v14); goto LABEL_29; } } v4 = v25; if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) && nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) == 64 && (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) ) { goto LABEL_21; } } LABEL_25: LODWORD(v4) = 0; if ( *((_BYTE *)v6 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback ) { *((_BYTE *)v6 + (_QWORD)v5 - 1) = 0; goto LABEL_28; } LABEL_29: if ( v8 != -1 ) close(v8); return (unsigned int)v4; }
SymbolizeAndDemangle: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 XOR R13D,R13D MOV qword ptr [RSP + 0x18],R13 MOV qword ptr [RSP + 0x10],R13 TEST RDX,RDX JZ 0x00121536 MOV R14,RDX MOV R15,RSI MOV R12,RDI MOV byte ptr [RSI],0x0 LEA RDI,[0x123a7d] CALL 0x001217b6 MOV RAX,qword ptr [0x00141a98] TEST RAX,RAX JZ 0x00121540 LEA RCX,[R15 + 0x1] LEA R8,[R14 + -0x1] LAB_00121523: LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,R12 CALL RAX MOV EBX,EAX JMP 0x00121563 LAB_00121536: MOV EBX,0xffffffff JMP 0x00121766 LAB_00121540: LEA R8,[R15 + 0x1] LEA R9,[R14 + -0x1] LAB_00121548: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x18] LEA RCX,[RSP + 0x10] MOV RSI,R12 CALL 0x001217f3 MOV EBX,dword ptr [RSP + 0x28] LAB_00121563: CMP EBX,-0x1 JZ 0x001216fe LAB_0012156c: LEA RSI,[RSP + 0x28] MOV EDX,0x40 MOV EDI,EBX XOR ECX,ECX CALL 0x0012141c CMP RAX,0x40 SETZ AL CMP dword ptr [RSP + 0x28],0x464c457f SETZ CL AND CL,AL JZ 0x0012170d MOV RAX,qword ptr [0x00141a90] TEST RAX,RAX JZ 0x001215dd XOR R8D,R8D CMP word ptr [RSP + 0x38],0x3 MOV EDX,0x0 JNZ 0x001215ba MOV RDX,qword ptr [RSP + 0x18] LAB_001215ba: TEST CL,CL CMOVNZ R8,RDX LAB_001215c0: MOV EDI,EBX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL RAX XOR ECX,ECX TEST EAX,EAX MOV EAX,EAX CMOVG RCX,RAX SUB R14,RCX ADD R15,RCX LAB_001215dd: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX LAB_001215e7: LEA RSI,[RSP + 0x28] MOV EDX,0x40 MOV EDI,EBX XOR ECX,ECX CALL 0x0012141c CMP RAX,0x40 JNZ 0x00121712 MOV RBP,qword ptr [RSP + 0x50] MOVZX R13D,word ptr [RSP + 0x64] LEA R8,[RSP + 0x68] MOV EDI,EBX MOV ESI,R13D MOV RDX,RBP MOV ECX,0x2 CALL 0x00121df8 TEST AL,AL JZ 0x00121680 MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,RBP LEA RSI,[RSP + 0xa8] MOV EDX,0x40 MOV EDI,EBX CALL 0x0012141c CMP RAX,0x40 JNZ 0x00121712 LEA RAX,[RSP + 0x68] MOV qword ptr [RSP],RAX LEA R9,[RSP + 0xa8] MOV RDI,R12 MOV ESI,EBX MOV RDX,R15 MOV RCX,R14 MOV R8,qword ptr [RSP + 0x20] CALL 0x00121f17 TEST AL,AL JNZ 0x001216ee LAB_00121680: LEA RAX,[RSP + 0x68] MOV EDI,EBX MOV ESI,R13D MOV R13,RAX MOV RDX,RBP MOV ECX,0xb MOV R8,RAX CALL 0x00121df8 TEST AL,AL JZ 0x00121712 MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,RBP LEA RSI,[RSP + 0xa8] MOV EDX,0x40 MOV EDI,EBX CALL 0x0012141c CMP RAX,0x40 JNZ 0x00121712 MOV qword ptr [RSP],R13 LEA R9,[RSP + 0xa8] MOV RDI,R12 MOV ESI,EBX MOV RDX,R15 MOV RCX,R14 MOV R8,qword ptr [RSP + 0x20] CALL 0x00121f17 TEST AL,AL JZ 0x00121712 LAB_001216ee: MOV R13B,0x1 MOV RDI,R15 MOV RSI,R14 CALL 0x00121d02 JMP 0x00121766 LAB_001216fe: CMP byte ptr [R15 + 0x1],0x0 JZ 0x0012170d MOV byte ptr [R15 + R14*0x1 + -0x1],0x0 JMP 0x0012172c LAB_0012170d: XOR R13D,R13D JMP 0x00121766 LAB_00121712: XOR R13D,R13D CMP byte ptr [R15 + 0x1],0x0 JZ 0x00121766 CMP qword ptr [0x00141a90],0x0 JNZ 0x00121766 MOV byte ptr [R14 + R15*0x1 + -0x1],0x0 LAB_0012172c: LEA RDI,[0x1250c3] MOV RSI,R15 MOV RDX,R14 CALL 0x001217b6 SUB R12,qword ptr [RSP + 0x10] MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x00121c7b LEA RDI,[0x123d45] MOV RSI,R15 MOV RDX,R14 CALL 0x001217b6 MOV R13B,0x1 LAB_00121766: CMP EBX,-0x1 JZ 0x00121772 LAB_0012176b: MOV EDI,EBX CALL 0x00107a40 LAB_00121772: MOV EAX,R13D ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions) */ ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3) { char cVar1; int __fd; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; Elf64_Shdr *pEVar6; ulong local_108; ulong local_100; ulong local_f8; int local_f0 [4]; short local_e0; ulong local_c8; ushort local_b4; Elf64_Shdr local_b0; Elf64_Shdr local_70; uVar5 = 0; local_100 = 0; local_108 = 0; if (param_3 == 0) { __fd = -1; goto LAB_00121766; } *param_2 = '\0'; SafeAppendString("(",param_2,param_3); if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) { /* try { // try from 00121548 to 0012155e has its CatchHandler @ 00121789 */ OpenObjectFileContainingPcAndGetStartAddress ((tools *)local_f0,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); __fd = local_f0[0]; } else { /* try { // try from 00121523 to 00121531 has its CatchHandler @ 0012178b */ __fd = (*(anonymous_namespace)::g_symbolize_open_object_file_callback) (param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); } if (__fd == -1) { if (param_2[1] == '\0') goto LAB_0012170d; param_2[param_3 - 1] = '\0'; } else { /* try { // try from 0012156c to 0012157e has its CatchHandler @ 00121797 */ lVar3 = ReadFromOffset(__fd,local_f0,0x40,0); if (local_f0[0] != 0x464c457f || lVar3 != 0x40) { LAB_0012170d: uVar5 = 0; goto LAB_00121766; } if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) { uVar5 = 0; if (local_e0 == 3) { uVar5 = local_100; } uVar4 = 0; if (local_f0[0] == 0x464c457f && lVar3 == 0x40) { uVar4 = uVar5; } /* try { // try from 001215c0 to 001215cc has its CatchHandler @ 00121787 */ uVar2 = (*(anonymous_namespace)::g_symbolize_callback)(__fd,param_1,param_2,param_3,uVar4); uVar5 = 0; if (0 < (int)uVar2) { uVar5 = (ulong)uVar2; } param_3 = param_3 - uVar5; param_2 = param_2 + uVar5; } local_f8 = local_108; /* try { // try from 001215e7 to 001216fb has its CatchHandler @ 00121797 */ lVar3 = ReadFromOffset(__fd,local_f0,0x40,0); if (lVar3 == 0x40) { pEVar6 = (Elf64_Shdr *)(ulong)local_b4; cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,2,&local_b0); if (cVar1 == '\0') { LAB_00121680: pEVar6 = &local_b0; cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,0xb,pEVar6); if (cVar1 != '\0') { lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8); if (lVar3 == 0x40) { cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,pEVar6); if (cVar1 != '\0') goto LAB_001216ee; } } } else { lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8); if (lVar3 == 0x40) { cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,&local_b0); if (cVar1 == '\0') goto LAB_00121680; LAB_001216ee: uVar5 = CONCAT71((int7)((ulong)pEVar6 >> 8),1); (anonymous_namespace)::DemangleInplace(param_2,param_3); goto LAB_00121766; } } } uVar5 = 0; if ((param_2[1] == '\0') || ((anonymous_namespace)::g_symbolize_callback != (code *)0x0)) goto LAB_00121766; param_2[param_3 - 1] = '\0'; } SafeAppendString("+0x",param_2,param_3); SafeAppendHexNumber(param_1 - local_108,param_2,param_3); SafeAppendString(")",param_2,param_3); uVar5 = 1; LAB_00121766: if (__fd != -1) { /* try { // try from 0012176b to 00121771 has its CatchHandler @ 00121795 */ close(__fd); } return uVar5 & 0xffffffff; }
65,758
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle( void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) { auto pc0 = reinterpret_cast<uintptr_t>(pc); uint64_t start_address = 0; uint64_t base_address = 0; FileDescriptor object_fd; if (out_size < 1) { return false; } out[0] = '\0'; SafeAppendString("(", out, out_size); if (g_symbolize_open_object_file_callback) { object_fd.reset(g_symbolize_open_object_file_callback( pc0, start_address, base_address, out + 1, out_size - 1)); } else { object_fd = OpenObjectFileContainingPcAndGetStartAddress( pc0, start_address, base_address, out + 1, out_size - 1); } # if defined(PRINT_UNSYMBOLIZED_STACK_TRACES) { # else // Check whether a file name was returned. if (!object_fd) { # endif if (out[1]) { // The object file containing PC was determined successfully however the // object file was not opened successfully. This is still considered // success because the object file name and offset are known and tools // like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } // Failed to determine the object file containing PC. Bail out. return false; } int elf_type = FileGetElfType(object_fd.get()); if (elf_type == -1) { return false; } if (g_symbolize_callback) { // Run the call back if it's installed. // Note: relocation (and much of the rest of this code) will be // wrong for prelinked shared libraries and PIE executables. uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0; int num_bytes_written = g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation); if (num_bytes_written > 0) { out += static_cast<size_t>(num_bytes_written); out_size -= static_cast<size_t>(num_bytes_written); } } if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size, base_address)) { if (out[1] && !g_symbolize_callback) { // The object file containing PC was opened successfully however the // symbol was not found. The object may have been stripped. This is still // considered success because the object file name and offset are known // and tools like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } return false; } // Symbolization succeeded. Now we try to demangle the symbol. DemangleInplace(out, out_size); return true; } }
O2
cpp
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp andq $0x0, 0x18(%rsp) andq $0x0, 0x10(%rsp) orl $-0x1, 0xc(%rsp) testq %rdx, %rdx je 0x1caf5 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movb $0x0, (%rsi) leaq 0x2049(%rip), %rdi # 0x1ea65 callq 0x1ccbc movq 0x220d0(%rip), %rax # 0x3eaf8 testq %rax, %rax je 0x1ca59 leaq 0x1(%r14), %rcx leaq -0x1(%rbx), %r8 leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %r15, %rdi callq *%rax movl %eax, %ebp leaq 0xc(%rsp), %r12 movq %r12, %rdi callq 0x1b7c6 movl %ebp, (%r12) jmp 0x1caa3 leaq 0x1(%r14), %r8 leaq -0x1(%rbx), %r9 leaq 0x28(%rsp), %rdi leaq 0x18(%rsp), %rdx leaq 0x10(%rsp), %rcx movq %r15, %rsi callq 0x1ccf9 leaq 0x28(%rsp), %r12 movl (%r12), %ebp orl $-0x1, (%r12) leaq 0xc(%rsp), %r13 movq %r13, %rdi callq 0x1b7c6 movl %ebp, (%r13) movq %r12, %rdi callq 0x1b7c6 movl (%r13), %ebp cmpl $-0x1, %ebp je 0x1cae3 leaq 0x28(%rsp), %rsi pushq $0x40 popq %rdx movl %ebp, %edi xorl %ecx, %ecx callq 0x1c91a cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F sete %cl testb %cl, %al je 0x1caf5 movq 0x22021(%rip), %rax # 0x3eaf0 testq %rax, %rax je 0x1cb1b cmpw $0x3, 0x38(%rsp) jne 0x1cafc movq 0x18(%rsp), %r8 jmp 0x1caff cmpb $0x0, 0x1(%r14) je 0x1caf5 movb $0x0, -0x1(%r14,%rbx) jmp 0x1cc49 xorl %ebp, %ebp jmp 0x1cc83 xorl %r8d, %r8d movl 0xc(%rsp), %edi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq *%rax xorl %ecx, %ecx testl %eax, %eax cmovgl %eax, %ecx subq %rcx, %rbx addq %rcx, %r14 movl 0xc(%rsp), %ebp movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rsi pushq $0x40 popq %rdx movl %ebp, %edi xorl %ecx, %ecx callq 0x1c91a testb %al, %al je 0x1cc30 movq 0x50(%rsp), %r13 movzwl 0x64(%rsp), %r12d pushq $0x2 popq %rcx leaq 0x68(%rsp), %r8 movl %ebp, %edi movl %r12d, %esi movq %r13, %rdx callq 0x1d2ac testb %al, %al je 0x1cbb8 movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %r13, %rcx leaq 0xa8(%rsp), %rsi pushq $0x40 popq %rdx movl %ebp, %edi callq 0x1c91a testb %al, %al je 0x1cc30 leaq 0x68(%rsp), %rax movq %rax, (%rsp) leaq 0xa8(%rsp), %r9 movq %r15, %rdi movl %ebp, %esi movq %r14, %rdx movq %rbx, %rcx movq 0x20(%rsp), %r8 callq 0x1d38a testb %al, %al jne 0x1cc20 pushq $0xb popq %rcx leaq 0x68(%rsp), %rax movl %ebp, %edi movl %r12d, %esi movq %rax, %r12 movq %r13, %rdx movq %rax, %r8 callq 0x1d2ac testb %al, %al je 0x1cc30 movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %r13, %rcx leaq 0xa8(%rsp), %rsi pushq $0x40 popq %rdx movl %ebp, %edi callq 0x1c91a testb %al, %al je 0x1cc30 movq %r12, (%rsp) leaq 0xa8(%rsp), %r9 movq %r15, %rdi movl %ebp, %esi movq %r14, %rdx movq %rbx, %rcx movq 0x20(%rsp), %r8 callq 0x1d38a testb %al, %al je 0x1cc30 movb $0x1, %bpl movq %r14, %rdi movq %rbx, %rsi callq 0x1d1d0 jmp 0x1cc83 xorl %ebp, %ebp cmpb $0x0, 0x1(%r14) je 0x1cc83 cmpq $0x0, 0x21eaf(%rip) # 0x3eaf0 jne 0x1cc83 movb $0x0, -0x1(%rbx,%r14) leaq 0x3463(%rip), %rdi # 0x200b3 movq %r14, %rsi movq %rbx, %rdx callq 0x1ccbc subq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d156 leaq 0x20b8(%rip), %rdi # 0x1ed2d movq %r14, %rsi movq %rbx, %rdx callq 0x1ccbc movb $0x1, %bpl leaq 0xc(%rsp), %rdi callq 0x1b7c6 movl %ebp, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1cca7 jmp 0x1cca7 jmp 0x1cca7 movq %rax, %rbx leaq 0xc(%rsp), %rdi callq 0x1b7c6 movq %rbx, %rdi callq 0x7a20
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h and [rsp+118h+var_100], 0 and [rsp+118h+var_10C+4], 0 or dword ptr [rsp+118h+var_10C], 0FFFFFFFFh test rdx, rdx jz loc_1CAF5 mov rbx, rdx mov r14, rsi mov r15, rdi mov byte ptr [rsi], 0 lea rdi, asc_1EA64+1; this call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback test rax, rax jz short loc_1CA59 lea rcx, [r14+1] lea r8, [rbx-1] lea rsi, [rsp+118h+var_100] lea rdx, [rsp+118h+var_10C+4] mov rdi, r15 call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback mov ebp, eax lea r12, [rsp+118h+var_10C] mov rdi, r12; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov [r12], ebp jmp short loc_1CAA3 loc_1CA59: lea r8, [r14+1]; char * lea r9, [rbx-1]; unsigned __int64 lea rdi, [rsp+118h+var_F0]; this lea rdx, [rsp+118h+var_100]; unsigned __int64 * lea rcx, [rsp+118h+var_10C+4]; unsigned __int64 * mov rsi, r15; unsigned __int64 call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong) lea r12, [rsp+118h+var_F0] mov ebp, [r12] or dword ptr [r12], 0FFFFFFFFh lea r13, [rsp+118h+var_10C] mov rdi, r13; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov [r13+0], ebp mov rdi, r12; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov ebp, [r13+0] loc_1CAA3: cmp ebp, 0FFFFFFFFh jz short loc_1CAE3 lea rsi, [rsp+118h+var_F0]; int push 40h ; '@' pop rdx; void * mov edi, ebp; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) cmp [rsp+118h+var_F0], 464C457Fh setz cl test al, cl jz short loc_1CAF5 mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback test rax, rax jz short loc_1CB1B cmp [rsp+118h+var_E0], 3 jnz short loc_1CAFC mov r8, [rsp+118h+var_100] jmp short loc_1CAFF loc_1CAE3: cmp byte ptr [r14+1], 0 jz short loc_1CAF5 mov byte ptr [r14+rbx-1], 0 jmp loc_1CC49 loc_1CAF5: xor ebp, ebp jmp loc_1CC83 loc_1CAFC: xor r8d, r8d loc_1CAFF: mov edi, dword ptr [rsp+118h+var_10C] mov rsi, r15 mov rdx, r14 mov rcx, rbx call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback xor ecx, ecx test eax, eax cmovg ecx, eax sub rbx, rcx add r14, rcx loc_1CB1B: mov ebp, dword ptr [rsp+118h+var_10C] mov rax, [rsp+118h+var_10C+4] mov [rsp+118h+var_F8], rax lea rsi, [rsp+118h+var_F0]; int push 40h ; '@' pop rdx; void * mov edi, ebp; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz loc_1CC30 mov r13, [rsp+118h+var_C8] movzx r12d, [rsp+118h+var_B4] push 2 pop rcx lea r8, [rsp+118h+var_B0] mov edi, ebp mov esi, r12d mov rdx, r13 call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_1CBB8 mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, r13; unsigned __int64 lea rsi, [rsp+118h+var_70]; int push 40h ; '@' pop rdx; void * mov edi, ebp; this call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz loc_1CC30 lea rax, [rsp+118h+var_B0] mov [rsp+118h+var_118], rax lea r9, [rsp+118h+var_70] mov rdi, r15 mov esi, ebp mov rdx, r14 mov rcx, rbx mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jnz short loc_1CC20 loc_1CBB8: push 0Bh pop rcx lea rax, [rsp+118h+var_B0] mov edi, ebp mov esi, r12d mov r12, rax mov rdx, r13 mov r8, rax call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_1CC30 mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, r13; unsigned __int64 lea rsi, [rsp+118h+var_70]; int push 40h ; '@' pop rdx; void * mov edi, ebp; this call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz short loc_1CC30 mov [rsp+118h+var_118], r12 lea r9, [rsp+118h+var_70] mov rdi, r15 mov esi, ebp mov rdx, r14 mov rcx, rbx mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jz short loc_1CC30 loc_1CC20: mov bpl, 1 mov rdi, r14; this mov rsi, rbx; char * call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong) jmp short loc_1CC83 loc_1CC30: xor ebp, ebp cmp byte ptr [r14+1], 0 jz short loc_1CC83 cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback jnz short loc_1CC83 mov byte ptr [rbx+r14-1], 0 loc_1CC49: lea rdi, a0x_0; "+0x" mov rsi, r14; char * mov rdx, rbx; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) sub r15, [rsp+118h+var_10C+4] mov rdi, r15; this mov rsi, r14; unsigned __int64 mov rdx, rbx; char * call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong) lea rdi, aVoidNglogAnony+86h; this mov rsi, r14; char * mov rdx, rbx; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov bpl, 1 loc_1CC83: lea rdi, [rsp+118h+var_10C]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov eax, ebp add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1CCA7 jmp short loc_1CCA7 jmp short $+2 loc_1CCA7: mov rbx, rax lea rdi, [rsp+arg_4]; this call _ZN5nglog5tools14FileDescriptor10safe_closeEv; nglog::tools::FileDescriptor::safe_close(void) mov rdi, rbx call __Unwind_Resume
long long nglog::tools::SymbolizeAndDemangle( unsigned long long a1, nglog::tools::_anonymous_namespace_ *this, char *a3, unsigned long long a4) { char *v4; // rbx nglog::tools::_anonymous_namespace_ *v5; // r14 unsigned int v6; // ebp unsigned long long v7; // rcx unsigned long long v8; // r8 int v9; // ebp bool v10; // al unsigned long long v11; // r8 unsigned long long v12; // r8 int v13; // eax long long v14; // rcx long long v15; // r13 unsigned int v16; // r12d unsigned long long v17; // r8 unsigned long long v18; // rdx unsigned long long v19; // r8 unsigned long long v20; // rcx unsigned long long v21; // rcx _DWORD v23[3]; // [rsp+Ch] [rbp-10Ch] BYREF unsigned long long v24; // [rsp+18h] [rbp-100h] BYREF long long v25; // [rsp+20h] [rbp-F8h] int v26[4]; // [rsp+28h] [rbp-F0h] BYREF __int16 v27; // [rsp+38h] [rbp-E0h] long long v28; // [rsp+50h] [rbp-C8h] unsigned __int16 v29; // [rsp+64h] [rbp-B4h] _BYTE v30[40]; // [rsp+68h] [rbp-B0h] BYREF unsigned int v31; // [rsp+90h] [rbp-88h] int v32[28]; // [rsp+A8h] [rbp-70h] BYREF v24 = 0LL; *(_QWORD *)&v23[1] = 0LL; v23[0] = -1; if ( !a3 ) goto LABEL_12; v4 = a3; v5 = this; *(_BYTE *)this = 0; nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4); if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback ) { v6 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback( a1, &v24, &v23[1], (char *)this + 1, v4 - 1); nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23); v23[0] = v6; } else { nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( (nglog::tools *)v26, a1, &v24, (unsigned long long *)&v23[1], (char *)this + 1, (unsigned long long)(v4 - 1)); v9 = v26[0]; v26[0] = -1; nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23); v23[0] = v9; nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v26); v6 = v23[0]; } if ( v6 == -1 ) { if ( *((_BYTE *)this + 1) ) { v4[(_QWORD)this - 1] = 0; LABEL_28: nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v5, v4, v7); nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - *(_QWORD *)&v23[1]), (unsigned long long)v5, v4, v20); nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v5, v4, v21); LOBYTE(v6) = 1; goto LABEL_29; } goto LABEL_12; } v10 = nglog::tools::ReadFromOffsetExact((nglog::tools *)v6, (int)v26, &dword_40, 0LL, v8); if ( v26[0] != 1179403647 || !v10 ) { LABEL_12: v6 = 0; goto LABEL_29; } if ( nglog::tools::`anonymous namespace'::g_symbolize_callback ) { if ( v27 == 3 ) v12 = v24; else v12 = 0LL; v13 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v23[0], a1, this, v4, v12); v14 = 0LL; if ( v13 > 0 ) v14 = (unsigned int)v13; v4 -= v14; v5 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v14); } v6 = v23[0]; v25 = *(_QWORD *)&v23[1]; if ( nglog::tools::ReadFromOffsetExact((nglog::tools *)v23[0], (int)v26, &dword_40, 0LL, v11) ) { v15 = v28; v16 = v29; if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType(v6, v29, v28, 2LL, v30) ) { if ( !nglog::tools::ReadFromOffsetExact( (nglog::tools *)v6, (int)v32, &dword_40, v15 + ((unsigned long long)v31 << 6), v17) ) goto LABEL_25; if ( (unsigned __int8)nglog::tools::FindSymbol(a1, v6, v5, v4, v25, v32, v30) ) { LABEL_24: LOBYTE(v6) = 1; nglog::tools::`anonymous namespace'::DemangleInplace(v5, v4, v18); goto LABEL_29; } } if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType(v6, v16, v15, 11LL, v30) && nglog::tools::ReadFromOffsetExact( (nglog::tools *)v6, (int)v32, &dword_40, v15 + ((unsigned long long)v31 << 6), v19) && (unsigned __int8)nglog::tools::FindSymbol(a1, v6, v5, v4, v25, v32, v30) ) { goto LABEL_24; } } LABEL_25: v6 = 0; if ( *((_BYTE *)v5 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback ) { *((_BYTE *)v5 + (_QWORD)v4 - 1) = 0; goto LABEL_28; } LABEL_29: nglog::tools::FileDescriptor::safe_close((nglog::tools::FileDescriptor *)v23); return v6; }
SymbolizeAndDemangle: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 AND qword ptr [RSP + 0x18],0x0 AND qword ptr [RSP + 0x10],0x0 OR dword ptr [RSP + 0xc],0xffffffff TEST RDX,RDX JZ 0x0011caf5 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV byte ptr [RSI],0x0 LEA RDI,[0x11ea65] CALL 0x0011ccbc MOV RAX,qword ptr [0x0013eaf8] TEST RAX,RAX JZ 0x0011ca59 LEA RCX,[R14 + 0x1] LEA R8,[RBX + -0x1] LAB_0011ca35: LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,R15 CALL RAX MOV EBP,EAX LEA R12,[RSP + 0xc] MOV RDI,R12 CALL 0x0011b7c6 MOV dword ptr [R12],EBP JMP 0x0011caa3 LAB_0011ca59: LEA R8,[R14 + 0x1] LEA R9,[RBX + -0x1] LAB_0011ca61: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x18] LEA RCX,[RSP + 0x10] MOV RSI,R15 CALL 0x0011ccf9 LEA R12,[RSP + 0x28] MOV EBP,dword ptr [R12] OR dword ptr [R12],0xffffffff LEA R13,[RSP + 0xc] MOV RDI,R13 CALL 0x0011b7c6 MOV dword ptr [R13],EBP MOV RDI,R12 CALL 0x0011b7c6 MOV EBP,dword ptr [R13] LAB_0011caa3: CMP EBP,-0x1 JZ 0x0011cae3 LAB_0011caa8: LEA RSI,[RSP + 0x28] PUSH 0x40 POP RDX MOV EDI,EBP XOR ECX,ECX CALL 0x0011c91a CMP dword ptr [RSP + 0x28],0x464c457f SETZ CL TEST AL,CL JZ 0x0011caf5 MOV RAX,qword ptr [0x0013eaf0] TEST RAX,RAX JZ 0x0011cb1b CMP word ptr [RSP + 0x38],0x3 JNZ 0x0011cafc MOV R8,qword ptr [RSP + 0x18] JMP 0x0011caff LAB_0011cae3: CMP byte ptr [R14 + 0x1],0x0 JZ 0x0011caf5 MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0 JMP 0x0011cc49 LAB_0011caf5: XOR EBP,EBP JMP 0x0011cc83 LAB_0011cafc: XOR R8D,R8D LAB_0011caff: MOV EDI,dword ptr [RSP + 0xc] LAB_0011cb03: MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL RAX XOR ECX,ECX TEST EAX,EAX CMOVG ECX,EAX SUB RBX,RCX ADD R14,RCX LAB_0011cb1b: MOV EBP,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX LAB_0011cb29: LEA RSI,[RSP + 0x28] PUSH 0x40 POP RDX MOV EDI,EBP XOR ECX,ECX CALL 0x0011c91a TEST AL,AL JZ 0x0011cc30 MOV R13,qword ptr [RSP + 0x50] MOVZX R12D,word ptr [RSP + 0x64] PUSH 0x2 POP RCX LEA R8,[RSP + 0x68] MOV EDI,EBP MOV ESI,R12D MOV RDX,R13 CALL 0x0011d2ac TEST AL,AL JZ 0x0011cbb8 MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,R13 LEA RSI,[RSP + 0xa8] PUSH 0x40 POP RDX MOV EDI,EBP CALL 0x0011c91a TEST AL,AL JZ 0x0011cc30 LEA RAX,[RSP + 0x68] MOV qword ptr [RSP],RAX LEA R9,[RSP + 0xa8] MOV RDI,R15 MOV ESI,EBP MOV RDX,R14 MOV RCX,RBX MOV R8,qword ptr [RSP + 0x20] CALL 0x0011d38a TEST AL,AL JNZ 0x0011cc20 LAB_0011cbb8: PUSH 0xb POP RCX LEA RAX,[RSP + 0x68] MOV EDI,EBP MOV ESI,R12D MOV R12,RAX MOV RDX,R13 MOV R8,RAX CALL 0x0011d2ac TEST AL,AL JZ 0x0011cc30 MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,R13 LEA RSI,[RSP + 0xa8] PUSH 0x40 POP RDX MOV EDI,EBP CALL 0x0011c91a TEST AL,AL JZ 0x0011cc30 MOV qword ptr [RSP],R12 LEA R9,[RSP + 0xa8] MOV RDI,R15 MOV ESI,EBP MOV RDX,R14 MOV RCX,RBX MOV R8,qword ptr [RSP + 0x20] CALL 0x0011d38a TEST AL,AL JZ 0x0011cc30 LAB_0011cc20: MOV BPL,0x1 MOV RDI,R14 MOV RSI,RBX CALL 0x0011d1d0 LAB_0011cc2e: JMP 0x0011cc83 LAB_0011cc30: XOR EBP,EBP CMP byte ptr [R14 + 0x1],0x0 JZ 0x0011cc83 CMP qword ptr [0x0013eaf0],0x0 JNZ 0x0011cc83 MOV byte ptr [RBX + R14*0x1 + -0x1],0x0 LAB_0011cc49: LEA RDI,[0x1200b3] MOV RSI,R14 MOV RDX,RBX CALL 0x0011ccbc SUB R15,qword ptr [RSP + 0x10] MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011d156 LEA RDI,[0x11ed2d] MOV RSI,R14 MOV RDX,RBX CALL 0x0011ccbc MOV BPL,0x1 LAB_0011cc83: LEA RDI,[RSP + 0xc] CALL 0x0011b7c6 MOV EAX,EBP ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions) */ ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3) { byte bVar1; char cVar2; uint uVar3; ulong uVar4; uint local_10c; ulong local_108; ulong local_100; ulong local_f8; uint local_f0 [4]; short local_e0; ulong local_c8; ushort local_b4; Elf64_Shdr local_b0; Elf64_Shdr local_70; local_100 = 0; local_108 = 0; local_10c = 0xffffffff; if (param_3 == 0) { LAB_0011caf5: uVar4 = 0; } else { *param_2 = '\0'; SafeAppendString("(",param_2,param_3); if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) { /* try { // try from 0011ca61 to 0011ca77 has its CatchHandler @ 0011cca3 */ OpenObjectFileContainingPcAndGetStartAddress ((tools *)local_f0,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); uVar3 = local_f0[0]; local_f0[0] = 0xffffffff; FileDescriptor::safe_close((FileDescriptor *)&local_10c); local_10c = uVar3; FileDescriptor::safe_close((FileDescriptor *)local_f0); } else { /* try { // try from 0011ca35 to 0011ca43 has its CatchHandler @ 0011cca5 */ uVar3 = (*(anonymous_namespace)::g_symbolize_open_object_file_callback) (param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); FileDescriptor::safe_close((FileDescriptor *)&local_10c); local_10c = uVar3; } uVar4 = (ulong)local_10c; if (local_10c == 0xffffffff) { if (param_2[1] == '\0') goto LAB_0011caf5; param_2[param_3 - 1] = '\0'; } else { /* try { // try from 0011caa8 to 0011cab8 has its CatchHandler @ 0011cca7 */ bVar1 = ReadFromOffsetExact(local_10c,local_f0,0x40,0); if ((bVar1 & local_f0[0] == 0x464c457f) == 0) goto LAB_0011caf5; if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) { uVar4 = local_100; if (local_e0 != 3) { uVar4 = 0; } /* try { // try from 0011cb03 to 0011cb0d has its CatchHandler @ 0011cca1 */ uVar3 = (*(anonymous_namespace)::g_symbolize_callback) (local_10c,param_1,param_2,param_3,uVar4); uVar4 = 0; if (0 < (int)uVar3) { uVar4 = (ulong)uVar3; } param_3 = param_3 - uVar4; param_2 = param_2 + uVar4; } uVar3 = local_10c; local_f8 = local_108; /* try { // try from 0011cb29 to 0011cc2d has its CatchHandler @ 0011cca7 */ cVar2 = ReadFromOffsetExact(local_10c,local_f0,0x40,0); if (cVar2 != '\0') { cVar2 = GetSectionHeaderByType(uVar3,local_b4,local_c8,2,&local_b0); if (cVar2 == '\0') { LAB_0011cbb8: cVar2 = GetSectionHeaderByType(uVar3,local_b4,local_c8,0xb,&local_b0); if (((cVar2 != '\0') && (cVar2 = ReadFromOffsetExact(uVar3,&local_70,0x40, (ulong)local_b0.sh_link * 0x40 + local_c8), cVar2 != '\0' )) && (cVar2 = FindSymbol(param_1,uVar3,param_2,param_3,local_f8,&local_70,&local_b0), cVar2 != '\0')) { LAB_0011cc20: uVar4 = CONCAT71((uint7)(uint3)(uVar3 >> 8),1); (anonymous_namespace)::DemangleInplace(param_2,param_3); goto LAB_0011cc83; } } else { cVar2 = ReadFromOffsetExact(uVar3,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8 ); if (cVar2 != '\0') { cVar2 = FindSymbol(param_1,uVar3,param_2,param_3,local_f8,&local_70,&local_b0); if (cVar2 == '\0') goto LAB_0011cbb8; goto LAB_0011cc20; } } } uVar4 = 0; if ((param_2[1] == '\0') || ((anonymous_namespace)::g_symbolize_callback != (code *)0x0)) goto LAB_0011cc83; param_2[param_3 - 1] = '\0'; } SafeAppendString("+0x",param_2,param_3); SafeAppendHexNumber(param_1 - local_108,param_2,param_3); SafeAppendString(")",param_2,param_3); uVar4 = CONCAT71((int7)(uVar4 >> 8),1); } LAB_0011cc83: FileDescriptor::safe_close((FileDescriptor *)&local_10c); return uVar4; }
65,759
start_timer
eloqsql/unittest/mytap/tap.c
static ulong start_timer(void) { #if defined(_WIN32) return clock(); #else struct tms tms_tmp; return times(&tms_tmp); #endif }
O0
c
start_timer: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp leaq -0x20(%rbp), %rdi callq 0x25590 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
start_timer: push rbp mov rbp, rsp sub rsp, 20h lea rdi, [rbp+var_20] call _times add rsp, 20h pop rbp retn
long long start_timer() { _BYTE v1[32]; // [rsp+0h] [rbp-20h] BYREF return times(v1); }
start_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x20 LEA RDI,[RBP + -0x20] CALL 0x00125590 ADD RSP,0x20 POP RBP RET
void start_timer(void) { tms local_28; times(&local_28); return; }
65,760
host_hash_get_key(unsigned char const*, unsigned long*, char)
eloqsql/storage/perfschema/pfs_host.cc
C_MODE_START static uchar *host_hash_get_key(const uchar *entry, size_t *length, my_bool) { const PFS_host * const *typed_entry; const PFS_host *host; const void *result; typed_entry= reinterpret_cast<const PFS_host* const *> (entry); assert(typed_entry != NULL); host= *typed_entry; assert(host != NULL); *length= host->m_key.m_key_length; result= host->m_key.m_hash_key; return const_cast<uchar*> (reinterpret_cast<const uchar*> (result)); }
O0
cpp
host_hash_get_key(unsigned char const*, unsigned long*, char): pushq %rbp movq %rsp, %rbp 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), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl 0x8e4(%rax), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax addq $0x7e4, %rax # imm = 0x7E4 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
_ZL17host_hash_get_keyPKhPmc: push rbp mov rbp, rsp 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 rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov eax, [rax+8E4h] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_28] add rax, 7E4h mov [rbp+var_30], rax mov rax, [rbp+var_30] pop rbp retn
long long host_hash_get_key(const unsigned __int8 *a1, unsigned long long *a2) { long long v3; // [rsp+8h] [rbp-28h] v3 = *(_QWORD *)a1; *a2 = *(unsigned int *)(*(_QWORD *)a1 + 2276LL); return v3 + 2020; }
host_hash_get_key: PUSH RBP MOV RBP,RSP 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 RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x8e4] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x7e4 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] POP RBP RET
/* host_hash_get_key(unsigned char const*, unsigned long*, char) */ long host_hash_get_key(uchar *param_1,ulong *param_2,char param_3) { long lVar1; lVar1 = *(long *)param_1; *param_2 = (ulong)*(uint *)(lVar1 + 0x8e4); return lVar1 + 0x7e4; }
65,761
translog_scanner_eol
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_eol(TRANSLOG_SCANNER_DATA *scanner) { DBUG_ENTER("translog_scanner_eol"); DBUG_PRINT("enter", ("Horizon: " LSN_FMT " Current: (%u, 0x%x+0x%x=0x%x)", LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->page_addr), (uint) scanner->page_offset, (uint) (LSN_OFFSET(scanner->page_addr) + scanner->page_offset))); if (scanner->horizon > (scanner->page_addr + scanner->page_offset)) { DBUG_PRINT("info", ("Horizon is not reached")); DBUG_RETURN(0); } if (scanner->fixed_horizon) { DBUG_PRINT("info", ("Horizon is fixed and reached")); DBUG_RETURN(1); } scanner->horizon= translog_get_horizon(); DBUG_PRINT("info", ("Horizon is re-read, EOL: %d", scanner->horizon <= (scanner->page_addr + scanner->page_offset))); DBUG_RETURN(scanner->horizon <= (scanner->page_addr + scanner->page_offset)); }
O3
c
translog_scanner_eol: movl 0x2028(%rdi), %eax addq 0x2000(%rdi), %rax cmpq %rax, 0x2008(%rdi) jle 0x6ef54 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movb $0x1, %al cmpb $0x0, 0x202c(%rdi) jne 0x6ef87 callq 0x6adbc movq %rax, 0x2008(%rbx) movl 0x2028(%rbx), %ecx addq 0x2000(%rbx), %rcx cmpq %rcx, %rax setle %al addq $0x8, %rsp popq %rbx popq %rbp retq
translog_scanner_eol: mov eax, [rdi+2028h] add rax, [rdi+2000h] cmp [rdi+2008h], rax jle short loc_6EF54 xor eax, eax retn loc_6EF54: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov al, 1 cmp byte ptr [rdi+202Ch], 0 jnz short loc_6EF87 call translog_get_horizon mov [rbx+2008h], rax mov ecx, [rbx+2028h] add rcx, [rbx+2000h] cmp rax, rcx setle al loc_6EF87: add rsp, 8 pop rbx pop rbp retn
bool translog_scanner_eol(long long a1) { bool result; // al long long horizon; // rax if ( *(_QWORD *)(a1 + 8200) > (signed long long)(*(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232)) ) return 0; result = 1; if ( !*(_BYTE *)(a1 + 8236) ) { horizon = translog_get_horizon(); *(_QWORD *)(a1 + 8200) = horizon; return horizon <= *(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232); } return result; }
translog_scanner_eol: MOV EAX,dword ptr [RDI + 0x2028] ADD RAX,qword ptr [RDI + 0x2000] CMP qword ptr [RDI + 0x2008],RAX JLE 0x0016ef54 XOR EAX,EAX RET LAB_0016ef54: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,0x1 CMP byte ptr [RDI + 0x202c],0x0 JNZ 0x0016ef87 CALL 0x0016adbc MOV qword ptr [RBX + 0x2008],RAX MOV ECX,dword ptr [RBX + 0x2028] ADD RCX,qword ptr [RBX + 0x2000] CMP RAX,RCX SETLE AL LAB_0016ef87: ADD RSP,0x8 POP RBX POP RBP RET
bool translog_scanner_eol(long param_1) { bool bVar1; long lVar2; if ((long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)) < *(long *)(param_1 + 0x2008)) { return false; } bVar1 = true; if (*(char *)(param_1 + 0x202c) == '\0') { lVar2 = translog_get_horizon(); *(long *)(param_1 + 0x2008) = lVar2; bVar1 = lVar2 <= (long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)); } return bVar1; }
65,762
add_rpc_devices(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
monkey531[P]llama/common/arg.cpp
static void add_rpc_devices(std::string servers) { auto rpc_servers = string_split<std::string>(servers, ','); if (rpc_servers.empty()) { throw std::invalid_argument("no RPC servers specified"); } ggml_backend_reg_t rpc_reg = ggml_backend_reg_by_name("RPC"); if (!rpc_reg) { throw std::invalid_argument("failed to find RPC backend"); } typedef ggml_backend_dev_t (*ggml_backend_rpc_add_device_t)(const char * endpoint); ggml_backend_rpc_add_device_t ggml_backend_rpc_add_device_fn = (ggml_backend_rpc_add_device_t) ggml_backend_reg_get_proc_address(rpc_reg, "ggml_backend_rpc_add_device"); if (!ggml_backend_rpc_add_device_fn) { throw std::invalid_argument("failed to find RPC device add function"); } for (const auto & server : rpc_servers) { ggml_backend_dev_t dev = ggml_backend_rpc_add_device_fn(server.c_str()); if (dev) { ggml_backend_device_register(dev); } else { throw std::invalid_argument("failed to register RPC device"); } } }
O0
cpp
add_rpc_devices(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): subq $0xa8, %rsp movq %rdi, %rsi movq %rsi, 0xa0(%rsp) leaq 0x88(%rsp), %rdi movl $0x2c, %edx callq 0x88ca0 leaq 0x88(%rsp), %rdi callq 0x93260 testb $0x1, %al jne 0x8cb87 jmp 0x8cbfd movl $0x10, %edi callq 0x5b740 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x38(%rsp) leaq 0x187db7(%rip), %rsi # 0x21495a callq 0x5b340 jmp 0x8cbaa movq 0x38(%rsp), %rdi movq 0x21e372(%rip), %rsi # 0x2aaf28 movq 0x21e363(%rip), %rdx # 0x2aaf20 callq 0x5bc30 jmp 0x8ce3a movq 0x38(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) callq 0x5c130 jmp 0x8ce20 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x8ce20 leaq 0x183deb(%rip), %rdi # 0x2109ef callq 0x5c080 movq %rax, 0x30(%rsp) jmp 0x8cc10 movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) cmpq $0x0, 0x70(%rsp) jne 0x8cc82 movl $0x10, %edi callq 0x5b740 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x28(%rsp) leaq 0x187d35(%rip), %rsi # 0x214973 callq 0x5b340 jmp 0x8cc45 movq 0x28(%rsp), %rdi movq 0x21e2d7(%rip), %rsi # 0x2aaf28 movq 0x21e2c8(%rip), %rdx # 0x2aaf20 callq 0x5bc30 jmp 0x8ce3a movq 0x28(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) callq 0x5c130 jmp 0x8ce20 movq 0x70(%rsp), %rdi leaq 0x187d00(%rip), %rsi # 0x21498e callq 0x5b450 movq %rax, 0x20(%rsp) jmp 0x8cc9a movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) jne 0x8cd0c movl $0x10, %edi callq 0x5b740 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x18(%rsp) leaq 0x187ce2(%rip), %rsi # 0x2149aa callq 0x5b340 jmp 0x8cccf movq 0x18(%rsp), %rdi movq 0x21e24d(%rip), %rsi # 0x2aaf28 movq 0x21e23e(%rip), %rdx # 0x2aaf20 callq 0x5bc30 jmp 0x8ce3a movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) callq 0x5c130 jmp 0x8ce20 leaq 0x88(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rdi callq 0x932e0 movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi callq 0x93310 movq %rax, 0x50(%rsp) leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x98590 testb $0x1, %al jne 0x8cd4f jmp 0x8ce0b leaq 0x58(%rsp), %rdi callq 0x985d0 movq %rax, 0x48(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x48(%rsp), %rdi callq 0x5b1d0 movq %rax, %rdi movq 0x8(%rsp), %rax callq *%rax movq %rax, 0x10(%rsp) jmp 0x8cd83 movq 0x10(%rsp), %rax movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) je 0x8cda3 movq 0x40(%rsp), %rdi callq 0x5c1f0 jmp 0x8cda1 jmp 0x8cdfa movl $0x10, %edi callq 0x5b740 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0x187c13(%rip), %rsi # 0x2149d1 callq 0x5b340 jmp 0x8cdc5 movq (%rsp), %rdi movq 0x21e158(%rip), %rsi # 0x2aaf28 movq 0x21e149(%rip), %rdx # 0x2aaf20 callq 0x5bc30 jmp 0x8ce3a movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) callq 0x5c130 jmp 0x8ce20 jmp 0x8cdfc leaq 0x58(%rsp), %rdi callq 0x985e0 jmp 0x8cd37 leaq 0x88(%rsp), %rdi callq 0x63aa0 addq $0xa8, %rsp retq leaq 0x88(%rsp), %rdi callq 0x63aa0 movq 0x80(%rsp), %rdi callq 0x5bd10 nopw (%rax,%rax)
_ZL15add_rpc_devicesNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0A8h mov rsi, rdi mov [rsp+0A8h+var_8], rsi lea rdi, [rsp+0A8h+var_20] mov edx, 2Ch ; ',' call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char) lea rdi, [rsp+0A8h+var_20] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_8CB87 jmp short loc_8CBFD loc_8CB87: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0A8h+var_70], rax lea rsi, aNoRpcServersSp; "no RPC servers specified" call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*) jmp short $+2 loc_8CBAA: mov rdi, [rsp+0A8h+var_70]; void * mov rsi, cs:_ZTISt16invalid_argument_ptr; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_8CE3A mov rdi, [rsp+arg_30]; void * mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax call ___cxa_free_exception jmp loc_8CE20 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp loc_8CE20 loc_8CBFD: lea rdi, aLlamaArgRpc+0Ah; "RPC" call _ggml_backend_reg_by_name mov [rsp+0A8h+var_78], rax jmp short $+2 loc_8CC10: mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_38], rax cmp [rsp+0A8h+var_38], 0 jnz short loc_8CC82 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0A8h+var_80], rax lea rsi, aFailedToFindRp; "failed to find RPC backend" call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*) jmp short $+2 loc_8CC45: mov rdi, [rsp+0A8h+var_80]; void * mov rsi, cs:_ZTISt16invalid_argument_ptr; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_8CE3A mov rdi, [rsp+arg_20]; void * mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax call ___cxa_free_exception jmp loc_8CE20 loc_8CC82: mov rdi, [rsp+0A8h+var_38] lea rsi, aGgmlBackendRpc; "ggml_backend_rpc_add_device" call _ggml_backend_reg_get_proc_address mov [rsp+0A8h+var_88], rax jmp short $+2 loc_8CC9A: mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_40], rax cmp [rsp+0A8h+var_40], 0 jnz short loc_8CD0C mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0A8h+var_90], rax lea rsi, aFailedToFindRp_0; "failed to find RPC device add function" call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*) jmp short $+2 loc_8CCCF: mov rdi, [rsp+0A8h+var_90]; void * mov rsi, cs:_ZTISt16invalid_argument_ptr; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_8CE3A mov rdi, [rsp+arg_10]; void * mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax call ___cxa_free_exception jmp loc_8CE20 loc_8CD0C: lea rax, [rsp+0A8h+var_20] mov [rsp+0A8h+var_48], rax mov rdi, [rsp+0A8h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_48] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+0A8h+var_58], rax loc_8CD37: lea rdi, [rsp+0A8h+var_50] lea rsi, [rsp+0A8h+var_58] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_8CD4F jmp loc_8CE0B loc_8CD4F: lea rdi, [rsp+0A8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rsp+0A8h+var_60], rax mov rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_A0], rax mov rdi, [rsp+0A8h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, rax mov rax, [rsp+0A8h+var_A0] call rax mov [rsp+0A8h+var_98], rax jmp short $+2 loc_8CD83: mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_68], rax cmp [rsp+0A8h+var_68], 0 jz short loc_8CDA3 mov rdi, [rsp+0A8h+var_68] call _ggml_backend_device_register jmp short $+2 loc_8CDA1: jmp short loc_8CDFA loc_8CDA3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0A8h+var_A8], rax lea rsi, aFailedToRegist; "failed to register RPC device" call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*) jmp short $+2 loc_8CDC5: mov rdi, [rsp+0A8h+var_A8]; void * mov rsi, cs:_ZTISt16invalid_argument_ptr; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp short loc_8CE3A mov rdi, [rsp+0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax call ___cxa_free_exception jmp short loc_8CE20 loc_8CDFA: jmp short $+2 loc_8CDFC: lea rdi, [rsp+0A8h+var_50] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_8CD37 loc_8CE0B: lea rdi, [rsp+0A8h+var_20] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 0A8h retn loc_8CE20: lea rdi, [rsp+arg_80] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+arg_78] call __Unwind_Resume loc_8CE3A: nop word ptr [rax+rax+00h]
long long add_rpc_devices(long long a1) { long long v1; // rax std::invalid_argument *v3; // [rsp+0h] [rbp-A8h] long long ( *v4)(long long); // [rsp+8h] [rbp-A0h] std::invalid_argument *v5; // [rsp+18h] [rbp-90h] std::invalid_argument *v6; // [rsp+28h] [rbp-80h] std::invalid_argument *exception; // [rsp+38h] [rbp-70h] long long v8; // [rsp+40h] [rbp-68h] long long v9; // [rsp+48h] [rbp-60h] long long v10; // [rsp+50h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+58h] [rbp-50h] BYREF long long proc_address; // [rsp+68h] [rbp-40h] long long v13; // [rsp+70h] [rbp-38h] long long v14[4]; // [rsp+88h] [rbp-20h] BYREF v14[3] = a1; string_split<std::string>((long long)v14, a1, 44); if ( (std::vector<std::string>::empty(v14) & 1) != 0 ) { exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(exception, "no RPC servers specified"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } v13 = ggml_backend_reg_by_name("RPC"); if ( !v13 ) { v6 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v6, "failed to find RPC backend"); __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } proc_address = ggml_backend_reg_get_proc_address(v13, "ggml_backend_rpc_add_device"); if ( !proc_address ) { v5 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v5, "failed to find RPC device add function"); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } v11[1] = v14; v11[0] = std::vector<std::string>::begin(v14); v10 = std::vector<std::string>::end(v14); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v11, &v10) & 1) != 0 ) { v9 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v11); v4 = (long long ( *)(long long))proc_address; v1 = std::string::c_str(v9); v8 = v4(v1); if ( !v8 ) { v3 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(v3, "failed to register RPC device"); __cxa_throw( v3, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } ggml_backend_device_register(v8); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v11); } return std::vector<std::string>::~vector(v14); }
add_rpc_devices: SUB RSP,0xa8 MOV RSI,RDI MOV qword ptr [RSP + 0xa0],RSI LEA RDI,[RSP + 0x88] MOV EDX,0x2c CALL 0x00188ca0 LEA RDI,[RSP + 0x88] CALL 0x00193260 TEST AL,0x1 JNZ 0x0018cb87 JMP 0x0018cbfd LAB_0018cb87: MOV EDI,0x10 CALL 0x0015b740 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX LAB_0018cb9c: LEA RSI,[0x31495a] CALL 0x0015b340 JMP 0x0018cbaa LAB_0018cbaa: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [0x003aaf28] MOV RDX,qword ptr [0x003aaf20] CALL 0x0015bc30 LAB_0018cbfd: LEA RDI,[0x3109ef] CALL 0x0015c080 LAB_0018cc09: MOV qword ptr [RSP + 0x30],RAX JMP 0x0018cc10 LAB_0018cc10: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],RAX CMP qword ptr [RSP + 0x70],0x0 JNZ 0x0018cc82 MOV EDI,0x10 CALL 0x0015b740 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX LAB_0018cc37: LEA RSI,[0x314973] CALL 0x0015b340 JMP 0x0018cc45 LAB_0018cc45: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [0x003aaf28] MOV RDX,qword ptr [0x003aaf20] CALL 0x0015bc30 LAB_0018cc82: MOV RDI,qword ptr [RSP + 0x70] LAB_0018cc87: LEA RSI,[0x31498e] CALL 0x0015b450 LAB_0018cc93: MOV qword ptr [RSP + 0x20],RAX JMP 0x0018cc9a LAB_0018cc9a: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JNZ 0x0018cd0c MOV EDI,0x10 CALL 0x0015b740 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX LAB_0018ccc1: LEA RSI,[0x3149aa] CALL 0x0015b340 JMP 0x0018cccf LAB_0018cccf: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [0x003aaf28] MOV RDX,qword ptr [0x003aaf20] CALL 0x0015bc30 LAB_0018cd0c: LEA RAX,[RSP + 0x88] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x001932e0 MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00193310 MOV qword ptr [RSP + 0x50],RAX LAB_0018cd37: LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x50] CALL 0x00198590 TEST AL,0x1 JNZ 0x0018cd4f JMP 0x0018ce0b LAB_0018cd4f: LEA RDI,[RSP + 0x58] CALL 0x001985d0 MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0015b1d0 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x8] LAB_0018cd7a: CALL RAX MOV qword ptr [RSP + 0x10],RAX JMP 0x0018cd83 LAB_0018cd83: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JZ 0x0018cda3 MOV RDI,qword ptr [RSP + 0x40] CALL 0x0015c1f0 LAB_0018cd9f: JMP 0x0018cda1 LAB_0018cda1: JMP 0x0018cdfa LAB_0018cda3: MOV EDI,0x10 CALL 0x0015b740 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP],RAX LAB_0018cdb7: LEA RSI,[0x3149d1] CALL 0x0015b340 JMP 0x0018cdc5 LAB_0018cdc5: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [0x003aaf28] MOV RDX,qword ptr [0x003aaf20] CALL 0x0015bc30 LAB_0018cdfa: JMP 0x0018cdfc LAB_0018cdfc: LEA RDI,[RSP + 0x58] CALL 0x001985e0 JMP 0x0018cd37 LAB_0018ce0b: LEA RDI,[RSP + 0x88] CALL 0x00163aa0 ADD RSP,0xa8 RET
/* add_rpc_devices(std::__cxx11::string) */ void add_rpc_devices(int8 param_1) { code *pcVar1; bool bVar2; ulong uVar3; invalid_argument *piVar4; int8 uVar5; long lVar6; int8 local_58; int8 local_50; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_48; code *local_40; long local_38; string local_20 [24]; int8 local_8; local_8 = param_1; string_split<std::__cxx11::string>(local_20,(char)param_1); uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20); if ((uVar3 & 1) != 0) { piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0018cb9c to 0018cba7 has its CatchHandler @ 0018cbc7 */ std::invalid_argument::invalid_argument(piVar4,"no RPC servers specified"); /* try { // try from 0018cbaa to 0018cbc1 has its CatchHandler @ 0018cbe7 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_003aaf28,PTR__invalid_argument_003aaf20); } /* try { // try from 0018cbfd to 0018cc08 has its CatchHandler @ 0018cbe7 */ local_38 = ggml_backend_reg_by_name("RPC"); if (local_38 == 0) { piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0018cc37 to 0018cc42 has its CatchHandler @ 0018cc62 */ std::invalid_argument::invalid_argument(piVar4,"failed to find RPC backend"); /* try { // try from 0018cc45 to 0018cc5c has its CatchHandler @ 0018cbe7 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_003aaf28,PTR__invalid_argument_003aaf20); } /* try { // try from 0018cc87 to 0018cc92 has its CatchHandler @ 0018cbe7 */ local_40 = (code *)ggml_backend_reg_get_proc_address(local_38,"ggml_backend_rpc_add_device"); if (local_40 == (code *)0x0) { piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0018ccc1 to 0018cccc has its CatchHandler @ 0018ccec */ std::invalid_argument::invalid_argument(piVar4,"failed to find RPC device add function"); /* try { // try from 0018cccf to 0018cce6 has its CatchHandler @ 0018cbe7 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_003aaf28,PTR__invalid_argument_003aaf20); } local_48 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20; local_50 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_48) ; local_58 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_48); while( true ) { bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_50,(__normal_iterator *)&local_58); if (!bVar2) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20); return; } __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_50); pcVar1 = local_40; uVar5 = std::__cxx11::string::c_str(); /* try { // try from 0018cd7a to 0018cd9e has its CatchHandler @ 0018cbe7 */ lVar6 = (*pcVar1)(uVar5); if (lVar6 == 0) break; ggml_backend_device_register(lVar6); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_50); } piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0018cdb7 to 0018cdc2 has its CatchHandler @ 0018cdde */ std::invalid_argument::invalid_argument(piVar4,"failed to register RPC device"); /* try { // try from 0018cdc5 to 0018cddb has its CatchHandler @ 0018cbe7 */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar4,PTR_typeinfo_003aaf28,PTR__invalid_argument_003aaf20); }
65,763
fs_get_cache_directory[abi:cxx11]()
monkey531[P]llama/common/common.cpp
std::string fs_get_cache_directory() { std::string cache_directory = ""; auto ensure_trailing_slash = [](std::string p) { // Make sure to add trailing slash if (p.back() != DIRECTORY_SEPARATOR) { p += DIRECTORY_SEPARATOR; } return p; }; if (getenv("LLAMA_CACHE")) { cache_directory = std::getenv("LLAMA_CACHE"); } else { #ifdef __linux__ if (std::getenv("XDG_CACHE_HOME")) { cache_directory = std::getenv("XDG_CACHE_HOME"); } else { cache_directory = std::getenv("HOME") + std::string("/.cache/"); } #elif defined(__APPLE__) cache_directory = std::getenv("HOME") + std::string("/Library/Caches/"); #elif defined(_WIN32) cache_directory = std::getenv("LOCALAPPDATA"); #endif // __linux__ cache_directory = ensure_trailing_slash(cache_directory); cache_directory += "llama.cpp"; } return ensure_trailing_slash(cache_directory); }
O2
cpp
fs_get_cache_directory[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0xb0, %rsp movq %rdi, %rbx leaq 0x5ae98(%rip), %rsi # 0xafd39 leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x2724a leaq 0x5e0b5(%rip), %rdi # 0xb2f6c callq 0x23af0 testq %rax, %rax je 0x54ed3 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x24140 jmp 0x54fab leaq 0x5e09e(%rip), %rdi # 0xb2f78 callq 0x23af0 testq %rax, %rax je 0x54ef3 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x24140 jmp 0x54f57 leaq 0x5e088(%rip), %rdi # 0xb2f82 callq 0x23af0 movq %rax, %r14 leaq 0x5e07e(%rip), %rsi # 0xb2f87 leaq 0x90(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x2724a leaq 0x30(%rsp), %rdi leaq 0x90(%rsp), %rdx movq %r14, %rsi callq 0x2730b leaq 0x10(%rsp), %rdi leaq 0x30(%rsp), %r14 movq %r14, %rsi callq 0x23b10 movq %r14, %rdi callq 0x24218 leaq 0x90(%rsp), %rdi callq 0x24218 leaq 0x70(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x23c40 leaq 0x30(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x5502a leaq 0x10(%rsp), %r14 leaq 0x30(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x23b10 movq %r15, %rdi callq 0x24218 leaq 0x70(%rsp), %rdi callq 0x24218 leaq 0x5dfed(%rip), %rsi # 0xb2f90 movq %r14, %rdi callq 0x24130 leaq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x23c40 leaq 0x50(%rsp), %rsi movq %rbx, %rdi callq 0x5502a leaq 0x50(%rsp), %rdi callq 0x24218 leaq 0x10(%rsp), %rdi callq 0x24218 movq %rbx, %rax addq $0xb0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x90(%rsp), %rdi jmp 0x5500e jmp 0x55015 movq %rax, %rbx leaq 0x70(%rsp), %rdi jmp 0x5500e jmp 0x55015 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x24218 jmp 0x55018 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x24218 movq %rbx, %rdi callq 0x23fd0
_Z22fs_get_cache_directoryB5cxx11v: push r15 push r14 push rbx sub rsp, 0B0h mov rbx, rdi lea rsi, aErrorWhileHand_0+34h; "" lea rdi, [rsp+0C8h+var_B8] lea rdx, [rsp+0C8h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, aLlamaCache; "LLAMA_CACHE" call _getenv test rax, rax jz short loc_54ED3 lea rdi, [rsp+0C8h+var_B8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp loc_54FAB loc_54ED3: lea rdi, aXdgCacheHome; "XDG_CACHE_HOME" call _getenv test rax, rax jz short loc_54EF3 lea rdi, [rsp+0C8h+var_B8] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp short loc_54F57 loc_54EF3: lea rdi, aXdgCacheHome+0Ah; "HOME" call _getenv mov r14, rax lea rsi, aCache; "/.cache/" lea rdi, [rsp+0C8h+var_38] lea rdx, [rsp+0C8h+var_B9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0C8h+var_98] lea rdx, [rsp+0C8h+var_38] mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+0C8h+var_B8] lea r14, [rsp+0C8h+var_98] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_54F57: lea rdi, [rsp+0C8h+var_58] lea rsi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_58] call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string) lea r14, [rsp+0C8h+var_B8] lea r15, [rsp+0C8h+var_98] mov rdi, r14 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aLlamaCpp; "llama.cpp" mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_54FAB: lea rdi, [rsp+0C8h+var_78] lea rsi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rsi, [rsp+0C8h+var_78] mov rdi, rbx call _ZZ22fs_get_cache_directoryB5cxx11vENK3$_0clENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_directory(void)::$_0::operator()(std::string) lea rdi, [rsp+0C8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 0B0h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_88] jmp short loc_5500E jmp short loc_55015 mov rbx, rax lea rdi, [rsp+arg_68] jmp short loc_5500E jmp short loc_55015 mov rbx, rax lea rdi, [rsp+arg_48]; void * loc_5500E: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_55018 loc_55015: mov rbx, rax loc_55018: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long fs_get_cache_directory[abi:cxx11](long long a1) { long long v1; // rax long long v2; // rax long long v3; // r14 _QWORD v5[4]; // [rsp+10h] [rbp-B8h] BYREF _BYTE v6[32]; // [rsp+30h] [rbp-98h] BYREF _BYTE v7[32]; // [rsp+50h] [rbp-78h] BYREF _BYTE v8[32]; // [rsp+70h] [rbp-58h] BYREF _QWORD v9[7]; // [rsp+90h] [rbp-38h] BYREF std::string::basic_string<std::allocator<char>>(v5, (long long)""); v1 = getenv("LLAMA_CACHE"); if ( v1 ) { std::string::assign(v5, v1); } else { v2 = getenv("XDG_CACHE_HOME"); if ( v2 ) { std::string::assign(v5, v2); } else { v3 = getenv("HOME"); std::string::basic_string<std::allocator<char>>(v9, (long long)"/.cache/"); std::operator+<char>((long long)v6, v3, (long long)v9); std::string::operator=(v5, v6); std::string::~string(v6); std::string::~string(v9); } std::string::basic_string(v8, v5); fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(v6, v8); std::string::operator=(v5, v6); std::string::~string(v6); std::string::~string(v8); std::string::append(v5, "llama.cpp"); } std::string::basic_string(v7, v5); fs_get_cache_directory[abi:cxx11](void)::$_0::operator()(a1, v7); std::string::~string(v7); std::string::~string(v5); return a1; }
fs_get_cache_directory[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xb0 MOV RBX,RDI LEA RSI,[0x1afd39] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x30] CALL 0x0012724a LEA RDI,[0x1b2f6c] CALL 0x00123af0 TEST RAX,RAX JZ 0x00154ed3 LAB_00154ec1: LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00124140 JMP 0x00154fab LAB_00154ed3: LEA RDI,[0x1b2f78] CALL 0x00123af0 TEST RAX,RAX JZ 0x00154ef3 LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x00124140 JMP 0x00154f57 LAB_00154ef3: LEA RDI,[0x1b2f82] CALL 0x00123af0 MOV R14,RAX LAB_00154f02: LEA RSI,[0x1b2f87] LEA RDI,[RSP + 0x90] LEA RDX,[RSP + 0xf] CALL 0x0012724a LAB_00154f1b: LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x90] MOV RSI,R14 CALL 0x0012730b LEA RDI,[RSP + 0x10] LEA R14,[RSP + 0x30] MOV RSI,R14 CALL 0x00123b10 MOV RDI,R14 CALL 0x00124218 LEA RDI,[RSP + 0x90] CALL 0x00124218 LAB_00154f57: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x10] CALL 0x00123c40 LAB_00154f66: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x70] CALL 0x0015502a LEA R14,[RSP + 0x10] LEA R15,[RSP + 0x30] MOV RDI,R14 MOV RSI,R15 CALL 0x00123b10 MOV RDI,R15 CALL 0x00124218 LEA RDI,[RSP + 0x70] CALL 0x00124218 LAB_00154f9c: LEA RSI,[0x1b2f90] MOV RDI,R14 CALL 0x00124130 LAB_00154fab: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x10] CALL 0x00123c40 LAB_00154fba: LEA RSI,[RSP + 0x50] MOV RDI,RBX CALL 0x0015502a LAB_00154fc7: LEA RDI,[RSP + 0x50] CALL 0x00124218 LEA RDI,[RSP + 0x10] CALL 0x00124218 MOV RAX,RBX ADD RSP,0xb0 POP RBX POP R14 POP R15 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* fs_get_cache_directory[abi:cxx11]() */ void fs_get_cache_directory_abi_cxx11_(void) { char *pcVar1; string *psVar2; allocator local_b9; string local_b8 [32]; allocator local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; std::__cxx11::string::string<std::allocator<char>>(local_b8,"",local_98); pcVar1 = getenv("LLAMA_CACHE"); if (pcVar1 == (char *)0x0) { pcVar1 = getenv("XDG_CACHE_HOME"); if (pcVar1 == (char *)0x0) { psVar2 = (string *)getenv("HOME"); /* try { // try from 00154f02 to 00154f1a has its CatchHandler @ 00154ff8 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"/.cache/",&local_b9); /* try { // try from 00154f1b to 00154f2f has its CatchHandler @ 00154feb */ std::operator+((char *)local_98,psVar2); std::__cxx11::string::operator=(local_b8,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_38); } else { std::__cxx11::string::assign((char *)local_b8); } /* try { // try from 00154f57 to 00154f65 has its CatchHandler @ 00155004 */ std::__cxx11::string::string(local_58,local_b8); /* try { // try from 00154f66 to 00154f74 has its CatchHandler @ 00154ffa */ fs_get_cache_directory[abi:cxx11]()::$_0::operator()((__0 *)local_98,local_58); std::__cxx11::string::operator=(local_b8,(string *)local_98); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string(local_58); /* try { // try from 00154f9c to 00154fb9 has its CatchHandler @ 00155015 */ std::__cxx11::string::append((char *)local_b8); } else { /* try { // try from 00154ec1 to 00154ef0 has its CatchHandler @ 00155015 */ std::__cxx11::string::assign((char *)local_b8); } std::__cxx11::string::string(local_78,local_b8); /* try { // try from 00154fba to 00154fc6 has its CatchHandler @ 00155006 */ fs_get_cache_directory[abi:cxx11]()::$_0::operator()(); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_b8); return; }
65,764
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 0xb990fb(%rip), %rax # 0xc5b5d8 movq (%rax), %rax movb (%rdi), %cl cmpb $0x7e, %cl jne 0xc24f9 cmpb $0x2f, 0x1(%rdi) jne 0xc24f9 movq %rax, %rdi testq %rax, %rax jne 0xc24e0 xorl %eax, %eax jmp 0xc2501 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_C24E0: mov cl, [rdi] cmp cl, 7Eh ; '~' jnz short loc_C24F9 cmp byte ptr [rdi+1], 2Fh ; '/' jnz short loc_C24F9 mov rdi, rax test rax, rax jnz short loc_C24E0 xor eax, eax jmp short loc_C2501 loc_C24F9: xor eax, eax cmp cl, 2Fh ; '/' setz al loc_C2501: 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,[0xd5b5d8] MOV RAX,qword ptr [RAX] LAB_001c24e0: MOV CL,byte ptr [RDI] CMP CL,0x7e JNZ 0x001c24f9 CMP byte ptr [RDI + 0x1],0x2f JNZ 0x001c24f9 MOV RDI,RAX TEST RAX,RAX JNZ 0x001c24e0 XOR EAX,EAX JMP 0x001c2501 LAB_001c24f9: XOR EAX,EAX CMP CL,0x2f SETZ AL LAB_001c2501: 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 == '/'; }
65,765
action_a_mult
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/parts/engine.c
int32_t action_a_mult (PENGINE_T instance, uint32_t parm, uint32_t flags) { int32_t value ; if (flags & (PART_ACTION_FLAG_VALIDATE)) { return parts_valadate_int (instance, parm, flags, INT_MIN, INT_MAX) ; } value = parts_get_int (instance, parm, flags, INT_MIN, INT_MAX) ; int32_t acc = 0 ; engine_get_variable (instance, ENGINE_VARIABLE_ACCUMULATOR, &acc) ; acc *= value ; engine_set_variable (instance, ENGINE_VARIABLE_ACCUMULATOR, acc) ; return acc ; }
O0
c
action_a_mult: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x758c movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl $0x80000000, %ecx # imm = 0x80000000 movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF callq 0x91b0 movl %eax, -0x4(%rbp) jmp 0x75dd movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x18(%rbp), %edx movl $0x80000000, %ecx # imm = 0x80000000 movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF callq 0x92f0 movl %eax, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x10(%rbp), %rdi xorl %esi, %esi leaq -0x20(%rbp), %rdx callq 0x13470 movl -0x1c(%rbp), %eax imull -0x20(%rbp), %eax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rdi movl -0x20(%rbp), %edx xorl %esi, %esi callq 0x13550 movl -0x20(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
action_a_mult: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_758C mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, 80000000h mov r8d, 7FFFFFFFh call parts_valadate_int mov [rbp+var_4], eax jmp short loc_75DD loc_758C: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_18] mov ecx, 80000000h mov r8d, 7FFFFFFFh call parts_get_int mov [rbp+var_1C], eax mov [rbp+var_20], 0 mov rdi, [rbp+var_10] xor esi, esi lea rdx, [rbp+var_20] call engine_get_variable mov eax, [rbp+var_1C] imul eax, [rbp+var_20] mov [rbp+var_20], eax mov rdi, [rbp+var_10] mov edx, [rbp+var_20] xor esi, esi call engine_set_variable mov eax, [rbp+var_20] mov [rbp+var_4], eax loc_75DD: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long action_a_mult(long long a1, unsigned int a2, unsigned int a3) { unsigned int v4; // [rsp+0h] [rbp-20h] BYREF int v5; // [rsp+4h] [rbp-1Ch] unsigned int v6; // [rsp+8h] [rbp-18h] unsigned int v7; // [rsp+Ch] [rbp-14h] long long v8; // [rsp+10h] [rbp-10h] v8 = a1; v7 = a2; v6 = a3; if ( (a3 & 1) != 0 ) { return (unsigned int)parts_valadate_int(v8, v7, v6, 0x80000000LL, 0x7FFFFFFFLL); } else { v5 = parts_get_int(v8, v7, v6, 0x80000000LL, 0x7FFFFFFFLL); v4 = 0; engine_get_variable(v8, 0LL, &v4); v4 *= v5; engine_set_variable(v8, 0LL, v4); return v4; } }
action_a_mult: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x0010758c MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,0x80000000 MOV R8D,0x7fffffff CALL 0x001091b0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001075dd LAB_0010758c: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,0x80000000 MOV R8D,0x7fffffff CALL 0x001092f0 MOV dword ptr [RBP + -0x1c],EAX MOV dword ptr [RBP + -0x20],0x0 MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI LEA RDX,[RBP + -0x20] CALL 0x00113470 MOV EAX,dword ptr [RBP + -0x1c] IMUL EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x20],EAX MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x00113550 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x4],EAX LAB_001075dd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int action_a_mult(int8 param_1,int4 param_2,uint param_3) { int local_28; int local_24; uint local_20; int4 local_1c; int8 local_18; int local_c; local_20 = param_3; local_1c = param_2; local_18 = param_1; if ((param_3 & 1) == 0) { local_24 = parts_get_int(param_1,param_2,param_3,0x80000000,0x7fffffff); local_28 = 0; engine_get_variable(local_18,0,&local_28); local_28 = local_24 * local_28; engine_set_variable(local_18,0,local_28); local_c = local_28; } else { local_c = parts_valadate_int(param_1,param_2,param_3,0x80000000,0x7fffffff); } return local_c; }
65,766
ssz_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_gindex(const ssz_def_t* def, int num_elements, ...) { if (!def || num_elements <= 0) return 0; gindex_t gindex = 1; va_list args; va_start(args, num_elements); for (int i = 0; i < num_elements; i++) { uint64_t leafes = 0; uint64_t idx = 0; if (def->type == SSZ_TYPE_CONTAINER) { const char* path_element = va_arg(args, const char*); for (int i = 0; i < def->def.container.len; i++) { if (strcmp(def->def.container.elements[i].name, path_element) == 0) { idx = i; leafes = def->def.container.len; def = def->def.container.elements + i; break; } } } else if (def->type == SSZ_TYPE_LIST) { leafes = is_basic_type(def->def.vector.type) ? ((def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5) * 2 : def->def.vector.len * 2; idx = (uint64_t) va_arg(args, int); } if (leafes == 0) { va_end(args); return 0; } uint32_t max_depth = log2_ceil(leafes); gindex = ssz_add_gindex(gindex, (((gindex_t) 1) << max_depth) + idx); } va_end(args); return gindex; }
O0
c
ssz_gindex: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 testb %al, %al je 0xa1744 movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %r9, -0xf8(%rbp) movq %r8, -0x100(%rbp) movq %rcx, -0x108(%rbp) movq %rdx, -0x110(%rbp) movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) cmpq $0x0, -0x10(%rbp) je 0xa1774 cmpl $0x0, -0x14(%rbp) jg 0xa1781 movq $0x0, -0x8(%rbp) jmp 0xa19f7 movq $0x1, -0x20(%rbp) leaq -0x40(%rbp), %rax leaq -0x120(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax cmpl -0x14(%rbp), %eax jge 0xa19eb movq $0x0, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x10(%rbp), %rax cmpl $0x2, 0x8(%rax) jne 0xa18b9 leaq -0x40(%rbp), %rax movq %rax, -0x130(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x124(%rbp) cmpl $0x28, %eax ja 0xa1819 movq -0x130(%rbp), %rcx movl -0x124(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x138(%rbp) jmp 0xa1836 movq -0x130(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x138(%rbp) movq -0x138(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0xa18b4 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movslq -0x64(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq (%rax), %rdi movq -0x60(%rbp), %rsi callq 0x233f0 cmpl $0x0, %eax jne 0xa18a7 movslq -0x64(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movl 0x18(%rax), %eax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movslq -0x64(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xa18b4 jmp 0xa18a9 movl -0x64(%rbp), %eax addl $0x1, %eax movl %eax, -0x64(%rbp) jmp 0xa184b jmp 0xa199c movq -0x10(%rbp), %rax cmpl $0x4, 0x8(%rax) jne 0xa199a movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0xa1a10 testb $0x1, %al jne 0xa18da jmp 0xa1917 movq -0x10(%rbp), %rax movl 0x18(%rax), %eax movq %rax, -0x148(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0x9f6c0 movq %rax, %rcx movq -0x148(%rbp), %rax imulq %rcx, %rax addq $0x1f, %rax shrq $0x5, %rax shlq %rax movq %rax, -0x140(%rbp) jmp 0xa1929 movq -0x10(%rbp), %rax movl 0x18(%rax), %eax shll %eax movl %eax, %eax movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax movq %rax, -0x50(%rbp) leaq -0x40(%rbp), %rax movq %rax, -0x158(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x14c(%rbp) cmpl $0x28, %eax ja 0xa196f movq -0x158(%rbp), %rcx movl -0x14c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x160(%rbp) jmp 0xa198c movq -0x158(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x160(%rbp) movq -0x160(%rbp), %rax movslq (%rax), %rax movq %rax, -0x58(%rbp) jmp 0xa199c cmpq $0x0, -0x50(%rbp) jne 0xa19b1 leaq -0x40(%rbp), %rax movq $0x0, -0x8(%rbp) jmp 0xa19f7 movq -0x50(%rbp), %rax movl %eax, %edi callq 0xa1a50 movl %eax, -0x68(%rbp) movq -0x20(%rbp), %rdi movl -0x68(%rbp), %eax movl %eax, %ecx movl $0x1, %esi shlq %cl, %rsi addq -0x58(%rbp), %rsi callq 0xa1ab0 movq %rax, -0x20(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0xa17b4 leaq -0x40(%rbp), %rax movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x160, %rsp # imm = 0x160 popq %rbp retq nopw %cs:(%rax,%rax)
ssz_gindex: push rbp mov rbp, rsp sub rsp, 160h test al, al jz short loc_A1744 movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_A1744: mov [rbp+var_F8], r9 mov [rbp+var_100], r8 mov [rbp+var_108], rcx mov [rbp+var_110], rdx mov [rbp+var_10], rdi mov [rbp+var_14], esi cmp [rbp+var_10], 0 jz short loc_A1774 cmp [rbp+var_14], 0 jg short loc_A1781 loc_A1774: mov [rbp+var_8], 0 jmp loc_A19F7 loc_A1781: mov [rbp+var_20], 1 lea rax, [rbp+var_40] lea rcx, [rbp+var_120] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov [rbp+var_44], 0 loc_A17B4: mov eax, [rbp+var_44] cmp eax, [rbp+var_14] jge loc_A19EB mov [rbp+var_50], 0 mov [rbp+var_58], 0 mov rax, [rbp+var_10] cmp dword ptr [rax+8], 2 jnz loc_A18B9 lea rax, [rbp+var_40] mov [rbp+var_130], rax mov eax, [rbp+var_40] mov [rbp+var_124], eax cmp eax, 28h ; '(' ja short loc_A1819 mov rcx, [rbp+var_130] mov edx, [rbp+var_124] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_138], rax jmp short loc_A1836 loc_A1819: mov rcx, [rbp+var_130] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_138], rax loc_A1836: mov rax, [rbp+var_138] mov rax, [rax] mov [rbp+var_60], rax mov [rbp+var_64], 0 loc_A184B: mov eax, [rbp+var_64] mov rcx, [rbp+var_10] cmp eax, [rcx+18h] jnb short loc_A18B4 mov rax, [rbp+var_10] mov rax, [rax+10h] movsxd rcx, [rbp+var_64] shl rcx, 5 add rax, rcx mov rdi, [rax] mov rsi, [rbp+var_60] call _strcmp cmp eax, 0 jnz short loc_A18A7 movsxd rax, [rbp+var_64] mov [rbp+var_58], rax mov rax, [rbp+var_10] mov eax, [rax+18h] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax+10h] movsxd rcx, [rbp+var_64] shl rcx, 5 add rax, rcx mov [rbp+var_10], rax jmp short loc_A18B4 loc_A18A7: jmp short $+2 loc_A18A9: mov eax, [rbp+var_64] add eax, 1 mov [rbp+var_64], eax jmp short loc_A184B loc_A18B4: jmp loc_A199C loc_A18B9: mov rax, [rbp+var_10] cmp dword ptr [rax+8], 4 jnz loc_A199A mov rax, [rbp+var_10] mov rdi, [rax+10h] call is_basic_type test al, 1 jnz short loc_A18DA jmp short loc_A1917 loc_A18DA: mov rax, [rbp+var_10] mov eax, [rax+18h] mov [rbp+var_148], rax mov rax, [rbp+var_10] mov rdi, [rax+10h] call ssz_fixed_length mov rcx, rax mov rax, [rbp+var_148] imul rax, rcx add rax, 1Fh shr rax, 5 shl rax, 1 mov [rbp+var_140], rax jmp short loc_A1929 loc_A1917: mov rax, [rbp+var_10] mov eax, [rax+18h] shl eax, 1 mov eax, eax mov [rbp+var_140], rax loc_A1929: mov rax, [rbp+var_140] mov [rbp+var_50], rax lea rax, [rbp+var_40] mov [rbp+var_158], rax mov eax, [rbp+var_40] mov [rbp+var_14C], eax cmp eax, 28h ; '(' ja short loc_A196F mov rcx, [rbp+var_158] mov edx, [rbp+var_14C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_160], rax jmp short loc_A198C loc_A196F: mov rcx, [rbp+var_158] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_160], rax loc_A198C: mov rax, [rbp+var_160] movsxd rax, dword ptr [rax] mov [rbp+var_58], rax loc_A199A: jmp short $+2 loc_A199C: cmp [rbp+var_50], 0 jnz short loc_A19B1 lea rax, [rbp+var_40] mov [rbp+var_8], 0 jmp short loc_A19F7 loc_A19B1: mov rax, [rbp+var_50] mov edi, eax call log2_ceil mov [rbp+var_68], eax mov rdi, [rbp+var_20] mov eax, [rbp+var_68] mov ecx, eax mov esi, 1 shl rsi, cl add rsi, [rbp+var_58] call ssz_add_gindex mov [rbp+var_20], rax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp loc_A17B4 loc_A19EB: lea rax, [rbp+var_40] mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_A19F7: mov rax, [rbp+var_8] add rsp, 160h pop rbp retn
long long ssz_gindex(long long a1, int a2, ...) { long long *overflow_arg_area; // rax char *v3; // rdx int *v4; // rax long long v6; // [rsp+18h] [rbp-148h] unsigned long long v7; // [rsp+20h] [rbp-140h] char v8; // [rsp+F8h] [rbp-68h] unsigned int j; // [rsp+FCh] [rbp-64h] long long v10; // [rsp+100h] [rbp-60h] long long v11; // [rsp+108h] [rbp-58h] unsigned long long v12; // [rsp+110h] [rbp-50h] int i; // [rsp+11Ch] [rbp-44h] va_list va; // [rsp+120h] [rbp-40h] BYREF long long v15; // [rsp+140h] [rbp-20h] int v16; // [rsp+14Ch] [rbp-14h] long long v17; // [rsp+150h] [rbp-10h] v17 = a1; v16 = a2; if ( !a1 || v16 <= 0 ) return 0LL; v15 = 1LL; va_start(va, a2); for ( i = 0; i < v16; ++i ) { v12 = 0LL; v11 = 0LL; if ( *(_DWORD *)(v17 + 8) == 2 ) { if ( va[0].gp_offset > 0x28 ) { overflow_arg_area = (long long *)va[0].overflow_arg_area; v3 = (char *)va[0].overflow_arg_area + 8; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { overflow_arg_area = (long long *)((char *)va[0].reg_save_area + (int)va[0].gp_offset); v3 = (char *)(va[0].gp_offset + 8); va[0].gp_offset += 8; } v10 = *overflow_arg_area; for ( j = 0; j < *(_DWORD *)(v17 + 24); ++j ) { if ( !(unsigned int)strcmp(*(_QWORD *)(32LL * (int)j + *(_QWORD *)(v17 + 16)), v10, v3) ) { v11 = (int)j; v12 = *(unsigned int *)(v17 + 24); v17 = 32LL * (int)j + *(_QWORD *)(v17 + 16); break; } } } else if ( *(_DWORD *)(v17 + 8) == 4 ) { if ( (is_basic_type(*(_QWORD *)(v17 + 16)) & 1) != 0 ) { v6 = *(unsigned int *)(v17 + 24); v7 = 2 * ((unsigned long long)(ssz_fixed_length(*(_DWORD **)(v17 + 16)) * v6 + 31) >> 5); } else { v7 = (unsigned int)(2 * *(_DWORD *)(v17 + 24)); } v12 = v7; if ( va[0].gp_offset > 0x28 ) { v4 = (int *)va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { v4 = (int *)((char *)va[0].reg_save_area + (int)va[0].gp_offset); va[0].gp_offset += 8; } v11 = *v4; } if ( !v12 ) return 0LL; v8 = log2_ceil((unsigned int)v12); v15 = ssz_add_gindex(v15, v11 + (1LL << v8)); } return v15; }
ssz_gindex: PUSH RBP MOV RBP,RSP SUB RSP,0x160 TEST AL,AL JZ 0x001a1744 MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_001a1744: MOV qword ptr [RBP + -0xf8],R9 MOV qword ptr [RBP + -0x100],R8 MOV qword ptr [RBP + -0x108],RCX MOV qword ptr [RBP + -0x110],RDX MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI CMP qword ptr [RBP + -0x10],0x0 JZ 0x001a1774 CMP dword ptr [RBP + -0x14],0x0 JG 0x001a1781 LAB_001a1774: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a19f7 LAB_001a1781: MOV qword ptr [RBP + -0x20],0x1 LEA RAX,[RBP + -0x40] LEA RCX,[RBP + -0x120] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV dword ptr [RBP + -0x44],0x0 LAB_001a17b4: MOV EAX,dword ptr [RBP + -0x44] CMP EAX,dword ptr [RBP + -0x14] JGE 0x001a19eb MOV qword ptr [RBP + -0x50],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x2 JNZ 0x001a18b9 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x130],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x124],EAX CMP EAX,0x28 JA 0x001a1819 MOV RCX,qword ptr [RBP + -0x130] MOV EDX,dword ptr [RBP + -0x124] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x138],RAX JMP 0x001a1836 LAB_001a1819: MOV RCX,qword ptr [RBP + -0x130] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x138],RAX LAB_001a1836: MOV RAX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x64],0x0 LAB_001a184b: MOV EAX,dword ptr [RBP + -0x64] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x18] JNC 0x001a18b4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x64] SHL RCX,0x5 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x60] CALL 0x001233f0 CMP EAX,0x0 JNZ 0x001a18a7 MOVSXD RAX,dword ptr [RBP + -0x64] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RBP + -0x64] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001a18b4 LAB_001a18a7: JMP 0x001a18a9 LAB_001a18a9: MOV EAX,dword ptr [RBP + -0x64] ADD EAX,0x1 MOV dword ptr [RBP + -0x64],EAX JMP 0x001a184b LAB_001a18b4: JMP 0x001a199c LAB_001a18b9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x001a199a MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001a1a10 TEST AL,0x1 JNZ 0x001a18da JMP 0x001a1917 LAB_001a18da: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0019f6c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x148] IMUL RAX,RCX ADD RAX,0x1f SHR RAX,0x5 SHL RAX,0x1 MOV qword ptr [RBP + -0x140],RAX JMP 0x001a1929 LAB_001a1917: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] SHL EAX,0x1 MOV EAX,EAX MOV qword ptr [RBP + -0x140],RAX LAB_001a1929: MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x158],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x14c],EAX CMP EAX,0x28 JA 0x001a196f MOV RCX,qword ptr [RBP + -0x158] MOV EDX,dword ptr [RBP + -0x14c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x160],RAX JMP 0x001a198c LAB_001a196f: MOV RCX,qword ptr [RBP + -0x158] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x160],RAX LAB_001a198c: MOV RAX,qword ptr [RBP + -0x160] MOVSXD RAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001a199a: JMP 0x001a199c LAB_001a199c: CMP qword ptr [RBP + -0x50],0x0 JNZ 0x001a19b1 LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a19f7 LAB_001a19b1: MOV RAX,qword ptr [RBP + -0x50] MOV EDI,EAX CALL 0x001a1a50 MOV dword ptr [RBP + -0x68],EAX MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x68] MOV ECX,EAX MOV ESI,0x1 SHL RSI,CL ADD RSI,qword ptr [RBP + -0x58] CALL 0x001a1ab0 MOV qword ptr [RBP + -0x20],RAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x001a17b4 LAB_001a19eb: LEA RAX,[RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_001a19f7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x160 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int8 ssz_gindex(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,long param_9, int param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { uint uVar1; char in_AL; int iVar2; ulong uVar3; long lVar4; int *local_168; ulong local_148; int *local_140; int1 local_128 [16]; int8 local_118; int8 local_110; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int4 local_70; uint local_6c; char *local_68; long local_60; ulong local_58; int local_4c; uint local_48; int4 local_44; int *local_40; int1 *local_38; int8 local_28; int local_1c; long local_18; int8 local_10; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } if ((param_9 == 0) || (param_10 < 1)) { local_10 = 0; } else { local_28 = 1; local_38 = local_128; local_40 = (int *)&stack0x00000008; local_44 = 0x30; local_48 = 0x10; local_118 = param_11; local_110 = param_12; local_108 = param_13; local_100 = param_14; local_1c = param_10; local_18 = param_9; for (local_4c = 0; local_4c < local_1c; local_4c = local_4c + 1) { local_58 = 0; local_60 = 0; if (*(int *)(local_18 + 8) == 2) { if (local_48 < 0x29) { local_140 = (int *)(local_38 + (int)local_48); local_48 = local_48 + 8; } else { local_140 = local_40; local_40 = local_40 + 2; } local_68 = *(char **)local_140; for (local_6c = 0; local_6c < *(uint *)(local_18 + 0x18); local_6c = local_6c + 1) { iVar2 = strcmp(*(char **)(*(long *)(local_18 + 0x10) + (long)(int)local_6c * 0x20), local_68); if (iVar2 == 0) { local_60 = (long)(int)local_6c; local_58 = (ulong)*(uint *)(local_18 + 0x18); local_18 = *(long *)(local_18 + 0x10) + (long)(int)local_6c * 0x20; break; } } } else if (*(int *)(local_18 + 8) == 4) { uVar3 = is_basic_type(*(int8 *)(local_18 + 0x10)); if ((uVar3 & 1) == 0) { local_148 = (ulong)(uint)(*(int *)(local_18 + 0x18) << 1); } else { uVar1 = *(uint *)(local_18 + 0x18); lVar4 = ssz_fixed_length(*(int8 *)(local_18 + 0x10)); local_148 = ((ulong)uVar1 * lVar4 + 0x1f >> 5) << 1; } local_58 = local_148; if (local_48 < 0x29) { local_168 = (int *)(local_38 + (int)local_48); local_48 = local_48 + 8; } else { local_168 = local_40; local_40 = local_40 + 2; } local_60 = (long)*local_168; } if (local_58 == 0) { return 0; } local_70 = log2_ceil(local_58 & 0xffffffff); local_28 = ssz_add_gindex(local_28,(1L << ((byte)local_70 & 0x3f)) + local_60); } local_10 = local_28; } return local_10; }
65,767
ssz_gindex
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
gindex_t ssz_gindex(const ssz_def_t* def, int num_elements, ...) { if (!def || num_elements <= 0) return 0; gindex_t gindex = 1; va_list args; va_start(args, num_elements); for (int i = 0; i < num_elements; i++) { uint64_t leafes = 0; uint64_t idx = 0; if (def->type == SSZ_TYPE_CONTAINER) { const char* path_element = va_arg(args, const char*); for (int i = 0; i < def->def.container.len; i++) { if (strcmp(def->def.container.elements[i].name, path_element) == 0) { idx = i; leafes = def->def.container.len; def = def->def.container.elements + i; break; } } } else if (def->type == SSZ_TYPE_LIST) { leafes = is_basic_type(def->def.vector.type) ? ((def->def.vector.len * ssz_fixed_length(def->def.vector.type) + 31) >> 5) * 2 : def->def.vector.len * 2; idx = (uint64_t) va_arg(args, int); } if (leafes == 0) { va_end(args); return 0; } uint32_t max_depth = log2_ceil(leafes); gindex = ssz_add_gindex(gindex, (((gindex_t) 1) << max_depth) + idx); } va_end(args); return gindex; }
O3
c
ssz_gindex: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rdx, 0x30(%rsp) movq %rcx, 0x38(%rsp) movq %r8, 0x40(%rsp) movq %r9, 0x48(%rsp) testb %al, %al je 0x5504c 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) testq %rdi, %rdi sete %al testl %esi, %esi setle %cl orb %al, %cl je 0x55073 xorl %r15d, %r15d movq %r15, %rax addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %esi, %r13d movq %rdi, %r14 leaq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x110(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) movl $0x1, %r15d xorl %ebp, %ebp movl %esi, 0x1c(%rsp) movl 0x8(%r14), %eax cmpl $0x4, %eax je 0x550d1 cmpl $0x2, %eax jne 0x5505b movl (%rsp), %ecx cmpq $0x28, %rcx ja 0x55105 movq %rcx, %rax addq 0x10(%rsp), %rax addl $0x8, %ecx movl %ecx, (%rsp) jmp 0x55113 movq 0x10(%r14), %rdi movl 0x8(%rdi), %eax cmpl $0x8, %eax ja 0x55150 movl $0x103, %ecx # imm = 0x103 btl %eax, %ecx jae 0x55150 movl 0x18(%r14), %ebx callq 0x53d08 movq %rax, %r12 imulq %rbx, %r12 addq $0x1f, %r12 shrq $0x4, %r12 andq $-0x2, %r12 jmp 0x55157 movq 0x8(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movl 0x18(%r14), %r12d testq %r12, %r12 je 0x5505b movq (%rax), %r13 movq 0x10(%r14), %r14 xorl %ebx, %ebx movq (%r14), %rdi movq %r13, %rsi callq 0x223d0 testl %eax, %eax je 0x55149 incq %rbx addq $0x20, %r14 cmpq %rbx, %r12 jne 0x55129 jmp 0x5505b movl 0x1c(%rsp), %r13d jmp 0x5518a movl 0x18(%r14), %r12d addl %r12d, %r12d movl (%rsp), %ecx cmpq $0x28, %rcx ja 0x55170 movq %rcx, %rax addq 0x10(%rsp), %rax addl $0x8, %ecx movl %ecx, (%rsp) jmp 0x5517e movq 0x8(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) testq %r12, %r12 je 0x5505b movslq (%rax), %rbx cmpl $0x2, %r12d jae 0x55194 xorl %ecx, %ecx jmp 0x551ab bsrl %r12d, %eax movl %eax, %ecx xorl $-0x20, %ecx leal -0x1(%r12), %edx addl $0x21, %ecx testl %edx, %r12d cmovel %eax, %ecx movl $0x1, %esi shlq %cl, %rsi addq %rbx, %rsi movq %r15, %rdi callq 0x551d1 movq %rax, %r15 incl %ebp cmpl %r13d, %ebp jne 0x550aa jmp 0x5505e
ssz_gindex: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov [rsp+108h+var_D8], rdx mov [rsp+108h+var_D0], rcx mov [rsp+108h+var_C8], r8 mov [rsp+108h+var_C0], r9 test al, al jz short loc_5504C movaps [rsp+108h+var_B8], xmm0 movaps [rsp+108h+var_A8], xmm1 movaps [rsp+108h+var_98], xmm2 movaps [rsp+108h+var_88], xmm3 movaps [rsp+108h+var_78], xmm4 movaps [rsp+108h+var_68], xmm5 movaps [rsp+108h+var_58], xmm6 movaps [rsp+108h+var_48], xmm7 loc_5504C: test rdi, rdi setz al test esi, esi setle cl or cl, al jz short loc_55073 loc_5505B: xor r15d, r15d loc_5505E: mov rax, r15 add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55073: mov r13d, esi mov r14, rdi lea rax, [rsp+108h+var_E8] mov [rsp+108h+var_F8], rax lea rax, [rsp+108h+arg_0] mov [rsp+108h+var_100], rax mov rax, 3000000010h mov [rsp+108h+var_108], rax mov r15d, 1 xor ebp, ebp mov [rsp+108h+var_EC], esi loc_550AA: mov eax, [r14+8] cmp eax, 4 jz short loc_550D1 cmp eax, 2 jnz short loc_5505B mov ecx, dword ptr [rsp+108h+var_108] cmp rcx, 28h ; '(' ja short loc_55105 mov rax, rcx add rax, [rsp+108h+var_F8] add ecx, 8 mov dword ptr [rsp+108h+var_108], ecx jmp short loc_55113 loc_550D1: mov rdi, [r14+10h] mov eax, [rdi+8] cmp eax, 8 ja short loc_55150 mov ecx, 103h bt ecx, eax jnb short loc_55150 mov ebx, [r14+18h] call ssz_fixed_length mov r12, rax imul r12, rbx add r12, 1Fh shr r12, 4 and r12, 0FFFFFFFFFFFFFFFEh jmp short loc_55157 loc_55105: mov rax, [rsp+108h+var_100] lea rcx, [rax+8] mov [rsp+108h+var_100], rcx loc_55113: mov r12d, [r14+18h] test r12, r12 jz loc_5505B mov r13, [rax] mov r14, [r14+10h] xor ebx, ebx loc_55129: mov rdi, [r14] mov rsi, r13 call _strcmp test eax, eax jz short loc_55149 inc rbx add r14, 20h ; ' ' cmp r12, rbx jnz short loc_55129 jmp loc_5505B loc_55149: mov r13d, [rsp+108h+var_EC] jmp short loc_5518A loc_55150: mov r12d, [r14+18h] add r12d, r12d loc_55157: mov ecx, dword ptr [rsp+108h+var_108] cmp rcx, 28h ; '(' ja short loc_55170 mov rax, rcx add rax, [rsp+108h+var_F8] add ecx, 8 mov dword ptr [rsp+108h+var_108], ecx jmp short loc_5517E loc_55170: mov rax, [rsp+108h+var_100] lea rcx, [rax+8] mov [rsp+108h+var_100], rcx loc_5517E: test r12, r12 jz loc_5505B movsxd rbx, dword ptr [rax] loc_5518A: cmp r12d, 2 jnb short loc_55194 xor ecx, ecx jmp short loc_551AB loc_55194: bsr eax, r12d mov ecx, eax xor ecx, 0FFFFFFE0h lea edx, [r12-1] add ecx, 21h ; '!' test r12d, edx cmovz ecx, eax loc_551AB: mov esi, 1 shl rsi, cl add rsi, rbx mov rdi, r15 call ssz_add_gindex mov r15, rax inc ebp cmp ebp, r13d jnz loc_550AA jmp loc_5505E
long long ssz_gindex(long long a1, int a2, ...) { long long v2; // r15 int v4; // r13d long long v5; // r14 int v6; // ebp int v7; // eax long long *v8; // rax long long v9; // rdi unsigned int v10; // eax int v11; // ecx long long v12; // rbx unsigned long long v13; // r12 long long v14; // kr00_8 long long v15; // r13 long long v16; // rbx long long *v17; // rax long long v18; // kr08_8 char v19; // cl int v20; // eax va_list va; // [rsp+0h] [rbp-108h] BYREF if ( a1 != 0 && a2 > 0 ) { v4 = a2; v5 = a1; va_start(va, a2); v2 = 1LL; v6 = 0; while ( 1 ) { v7 = *(_DWORD *)(v5 + 8); if ( v7 == 4 ) { v9 = *(_QWORD *)(v5 + 16); v10 = *(_DWORD *)(v9 + 8); if ( v10 <= 8 && (v11 = 259, _bittest(&v11, v10)) ) { v12 = *(unsigned int *)(v5 + 24); v13 = ((unsigned long long)(v12 * ssz_fixed_length(v9) + 31) >> 4) & 0xFFFFFFFFFFFFFFFELL; } else { v13 = (unsigned int)(2 * *(_DWORD *)(v5 + 24)); } if ( va[0].gp_offset > 0x28uLL ) { v18 = va_arg(va, _QWORD); v17 = &v18; } else { v17 = (long long *)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } if ( !v13 ) return 0LL; v16 = *(int *)v17; } else { if ( v7 != 2 ) return 0LL; if ( va[0].gp_offset > 0x28uLL ) { v14 = va_arg(va, _QWORD); v8 = &v14; } else { v8 = (long long *)((char *)va[0].reg_save_area + va[0].gp_offset); va[0].gp_offset += 8; } v13 = *(unsigned int *)(v5 + 24); if ( !*(_DWORD *)(v5 + 24) ) return 0LL; v15 = *v8; v5 = *(_QWORD *)(v5 + 16); v16 = 0LL; while ( (unsigned int)strcmp(*(_QWORD *)v5, v15) ) { ++v16; v5 += 32LL; if ( v13 == v16 ) return 0LL; } v4 = a2; } if ( (unsigned int)v13 >= 2 ) { _BitScanReverse((unsigned int *)&v20, v13); v19 = (v20 ^ 0xE0) + 33; if ( (((_DWORD)v13 - 1) & (unsigned int)v13) == 0 ) v19 = v20; } else { v19 = 0; } v2 = ssz_add_gindex(v2, v16 + (1LL << v19)); if ( ++v6 == v4 ) return v2; } } return 0LL; }
ssz_gindex: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],R8 MOV qword ptr [RSP + 0x48],R9 TEST AL,AL JZ 0x0015504c 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_0015504c: TEST RDI,RDI SETZ AL TEST ESI,ESI SETLE CL OR CL,AL JZ 0x00155073 LAB_0015505b: XOR R15D,R15D LAB_0015505e: MOV RAX,R15 ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155073: MOV R13D,ESI MOV R14,RDI LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSP + 0x110] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX MOV R15D,0x1 XOR EBP,EBP MOV dword ptr [RSP + 0x1c],ESI LAB_001550aa: MOV EAX,dword ptr [R14 + 0x8] CMP EAX,0x4 JZ 0x001550d1 CMP EAX,0x2 JNZ 0x0015505b MOV ECX,dword ptr [RSP] CMP RCX,0x28 JA 0x00155105 MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x10] ADD ECX,0x8 MOV dword ptr [RSP],ECX JMP 0x00155113 LAB_001550d1: MOV RDI,qword ptr [R14 + 0x10] MOV EAX,dword ptr [RDI + 0x8] CMP EAX,0x8 JA 0x00155150 MOV ECX,0x103 BT ECX,EAX JNC 0x00155150 MOV EBX,dword ptr [R14 + 0x18] CALL 0x00153d08 MOV R12,RAX IMUL R12,RBX ADD R12,0x1f SHR R12,0x4 AND R12,-0x2 JMP 0x00155157 LAB_00155105: MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX LAB_00155113: MOV R12D,dword ptr [R14 + 0x18] TEST R12,R12 JZ 0x0015505b MOV R13,qword ptr [RAX] MOV R14,qword ptr [R14 + 0x10] XOR EBX,EBX LAB_00155129: MOV RDI,qword ptr [R14] MOV RSI,R13 CALL 0x001223d0 TEST EAX,EAX JZ 0x00155149 INC RBX ADD R14,0x20 CMP R12,RBX JNZ 0x00155129 JMP 0x0015505b LAB_00155149: MOV R13D,dword ptr [RSP + 0x1c] JMP 0x0015518a LAB_00155150: MOV R12D,dword ptr [R14 + 0x18] ADD R12D,R12D LAB_00155157: MOV ECX,dword ptr [RSP] CMP RCX,0x28 JA 0x00155170 MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x10] ADD ECX,0x8 MOV dword ptr [RSP],ECX JMP 0x0015517e LAB_00155170: MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX LAB_0015517e: TEST R12,R12 JZ 0x0015505b MOVSXD RBX,dword ptr [RAX] LAB_0015518a: CMP R12D,0x2 JNC 0x00155194 XOR ECX,ECX JMP 0x001551ab LAB_00155194: BSR EAX,R12D MOV ECX,EAX XOR ECX,0xffffffe0 LEA EDX,[R12 + -0x1] ADD ECX,0x21 TEST R12D,EDX CMOVZ ECX,EAX LAB_001551ab: MOV ESI,0x1 SHL RSI,CL ADD RSI,RBX MOV RDI,R15 CALL 0x001551d1 MOV R15,RAX INC EBP CMP EBP,R13D JNZ 0x001550aa JMP 0x0015505e
int8 ssz_gindex(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 *param_9,int param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char *__s2; char in_AL; int iVar1; long lVar2; int *piVar3; byte bVar4; uint uVar5; ulong uVar6; int iVar7; uint uVar8; ulong uVar9; int8 uVar10; int *local_100; int local_e8 [4]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } if (param_10 < 1 || param_9 == (int8 *)0x0) { LAB_0015505b: uVar10 = 0; } else { local_100 = (int *)&stack0x00000008; uVar5 = 0x10; uVar10 = 1; iVar7 = 0; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; do { if (*(int *)(param_9 + 1) == 4) { if ((*(uint *)(param_9[2] + 8) < 9) && ((0x103U >> (*(uint *)(param_9[2] + 8) & 0x1f) & 1) != 0)) { uVar8 = *(uint *)(param_9 + 3); lVar2 = ssz_fixed_length(); uVar9 = lVar2 * (ulong)uVar8 + 0x1f >> 4 & 0xfffffffffffffffe; } else { uVar9 = (ulong)(uint)(*(int *)(param_9 + 3) * 2); } uVar6 = (ulong)uVar5; if (uVar6 < 0x29) { uVar5 = uVar5 + 8; piVar3 = (int *)((long)local_e8 + uVar6); } else { piVar3 = local_100; local_100 = local_100 + 2; } if (uVar9 == 0) goto LAB_0015505b; uVar6 = (ulong)*piVar3; } else { if (*(int *)(param_9 + 1) != 2) goto LAB_0015505b; uVar9 = (ulong)uVar5; if (uVar9 < 0x29) { uVar5 = uVar5 + 8; piVar3 = (int *)((long)local_e8 + uVar9); } else { piVar3 = local_100; local_100 = local_100 + 2; } uVar9 = (ulong)*(uint *)(param_9 + 3); if (uVar9 == 0) goto LAB_0015505b; __s2 = *(char **)piVar3; param_9 = (int8 *)param_9[2]; uVar6 = 0; while (iVar1 = strcmp((char *)*param_9,__s2), iVar1 != 0) { uVar6 = uVar6 + 1; param_9 = param_9 + 4; if (uVar9 == uVar6) goto LAB_0015505b; } } uVar8 = (uint)uVar9; if (uVar8 < 2) { bVar4 = 0; } else { iVar1 = 0x1f; if (uVar8 != 0) { for (; uVar8 >> iVar1 == 0; iVar1 = iVar1 + -1) { } } bVar4 = ((byte)iVar1 ^ 0xe0) + 0x21; if ((uVar8 & uVar8 - 1) == 0) { bVar4 = (byte)iVar1; } } uVar10 = ssz_add_gindex(uVar10,(1L << (bVar4 & 0x3f)) + uVar6); iVar7 = iVar7 + 1; } while (iVar7 != param_10); } return uVar10; }
65,768
ggml_conv_2d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_2d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int s1, int p0, int p1, int d0, int d1) { struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, s1, p0, p1, d0, d1, true); // [N, OH, OW, IC * KH * KW] struct ggml_tensor * result = ggml_mul_mat(ctx, ggml_reshape_2d(ctx, im2col, im2col->ne[0], im2col->ne[3] * im2col->ne[2] * im2col->ne[1]), // [N, OH, OW, IC * KH * KW] => [N*OH*OW, IC * KH * KW] ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1] * a->ne[2]), a->ne[3])); // [OC,IC, KH, KW] => [OC, IC * KH * KW] result = ggml_reshape_4d(ctx, result, im2col->ne[1], im2col->ne[2], a->ne[3], im2col->ne[3]); // [N, OC, OH, OW] return result; }
O0
c
ggml_conv_2d: subq $0x68, %rsp movl 0x80(%rsp), %eax movl 0x78(%rsp), %eax movl 0x70(%rsp), %eax movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movl %r8d, 0x48(%rsp) movl %r9d, 0x44(%rsp) movq 0x60(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x50(%rsp), %rdx movl 0x4c(%rsp), %ecx movl 0x48(%rsp), %r8d movl 0x44(%rsp), %r9d movl 0x70(%rsp), %r11d movl 0x78(%rsp), %r10d movl 0x80(%rsp), %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0x1252e0 movq %rax, 0x38(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x60(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x38(%rsp), %rax movq 0x10(%rax), %rdx movq 0x38(%rsp), %rax movq 0x28(%rax), %rcx movq 0x38(%rsp), %rax imulq 0x20(%rax), %rcx movq 0x38(%rsp), %rax imulq 0x18(%rax), %rcx callq 0x1229c0 movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x58(%rsp), %rax movq 0x10(%rax), %rdx movq 0x58(%rsp), %rax imulq 0x18(%rax), %rdx movq 0x58(%rsp), %rax imulq 0x20(%rax), %rdx movq 0x58(%rsp), %rax movq 0x28(%rax), %rcx callq 0x1229c0 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq %rax, %rdx callq 0x1211e0 movq %rax, 0x30(%rsp) movq 0x60(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rax movq 0x18(%rax), %rdx movq 0x38(%rsp), %rax movq 0x20(%rax), %rcx movq 0x58(%rsp), %rax movq 0x28(%rax), %r8 movq 0x38(%rsp), %rax movq 0x28(%rax), %r9 callq 0x122d20 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x68, %rsp retq nop
ggml_conv_2d: sub rsp, 68h mov eax, [rsp+68h+arg_10] mov eax, [rsp+68h+arg_8] mov eax, [rsp+68h+arg_0] mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_1C], ecx mov [rsp+68h+var_20], r8d mov [rsp+68h+var_24], r9d mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_10] mov rdx, [rsp+68h+var_18] mov ecx, [rsp+68h+var_1C] mov r8d, [rsp+68h+var_20] mov r9d, [rsp+68h+var_24] mov r11d, [rsp+68h+arg_0] mov r10d, [rsp+68h+arg_8] mov eax, [rsp+68h+arg_10] mov [rsp+68h+var_68], r11d mov [rsp+68h+var_60], r10d mov [rsp+68h+var_58], eax mov [rsp+68h+var_50], 1 call ggml_im2col mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_8] mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_30] mov rax, [rsp+68h+var_30] mov rdx, [rax+10h] mov rax, [rsp+68h+var_30] mov rcx, [rax+28h] mov rax, [rsp+68h+var_30] imul rcx, [rax+20h] mov rax, [rsp+68h+var_30] imul rcx, [rax+18h] call ggml_reshape_2d mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_10] mov rax, [rsp+68h+var_10] mov rdx, [rax+10h] mov rax, [rsp+68h+var_10] imul rdx, [rax+18h] mov rax, [rsp+68h+var_10] imul rdx, [rax+20h] mov rax, [rsp+68h+var_10] mov rcx, [rax+28h] call ggml_reshape_2d mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, rax call ggml_mul_mat mov [rsp+68h+var_38], rax mov rdi, [rsp+68h+var_8] mov rsi, [rsp+68h+var_38] mov rax, [rsp+68h+var_30] mov rdx, [rax+18h] mov rax, [rsp+68h+var_30] mov rcx, [rax+20h] mov rax, [rsp+68h+var_10] mov r8, [rax+28h] mov rax, [rsp+68h+var_30] mov r9, [rax+28h] call ggml_reshape_4d mov [rsp+68h+var_38], rax mov rax, [rsp+68h+var_38] add rsp, 68h retn
_QWORD * ggml_conv_2d( long long a1, unsigned int *a2, _QWORD *a3, unsigned int a4, unsigned int a5, unsigned int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15, unsigned int a16, unsigned int a17) { double v17; // xmm4_8 double v18; // xmm5_8 double v19; // xmm4_8 double v20; // xmm5_8 _QWORD *v21; // rax unsigned int *v22; // rax double v23; // xmm4_8 double v24; // xmm5_8 _QWORD *v26; // [rsp+28h] [rbp-40h] unsigned int *v27; // [rsp+38h] [rbp-30h] v27 = ggml_im2col(a1, a2, a3, a4, a5, a6, a15, a16, a17, 1); v26 = ggml_reshape_2d( a1, v27, *((_QWORD *)v27 + 2), *((_QWORD *)v27 + 3) * *((_QWORD *)v27 + 4) * *((_QWORD *)v27 + 5), a7, a8, a9, a10, v17, v18, a13, a14); v21 = ggml_reshape_2d( a1, a2, *((_QWORD *)a2 + 4) * *((_QWORD *)a2 + 3) * *((_QWORD *)a2 + 2), *((_QWORD *)a2 + 5), a7, a8, a9, a10, v19, v20, a13, a14); v22 = (unsigned int *)ggml_mul_mat(a1, (long long)v26, v21); return ggml_reshape_4d( a1, v22, *((_QWORD *)v27 + 3), *((_QWORD *)v27 + 4), *((_QWORD *)a2 + 5), *((_QWORD *)v27 + 5), a7, a8, a9, a10, v23, v24, a13, a14); }
65,769
ggml_conv_2d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_2d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int s1, int p0, int p1, int d0, int d1) { struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, s1, p0, p1, d0, d1, true); // [N, OH, OW, IC * KH * KW] struct ggml_tensor * result = ggml_mul_mat(ctx, ggml_reshape_2d(ctx, im2col, im2col->ne[0], im2col->ne[3] * im2col->ne[2] * im2col->ne[1]), // [N, OH, OW, IC * KH * KW] => [N*OH*OW, IC * KH * KW] ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1] * a->ne[2]), a->ne[3])); // [OC,IC, KH, KW] => [OC, IC * KH * KW] result = ggml_reshape_4d(ctx, result, im2col->ne[1], im2col->ne[2], a->ne[3], im2col->ne[3]); // [N, OC, OH, OW] return result; }
O1
c
ggml_conv_2d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x30(%rsp), %eax movl 0x38(%rsp), %r10d movl 0x40(%rsp), %r11d pushq $0x1 pushq %r11 pushq %r10 pushq %rax callq 0x9417d addq $0x20, %rsp movq %rax, %r15 movq 0x10(%rax), %rdx movq 0x20(%rax), %rcx imulq 0x28(%rax), %rcx imulq 0x18(%rax), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x92eaa movq %rax, %r12 movq 0x18(%r14), %rdx movq 0x28(%r14), %rcx imulq 0x10(%r14), %rdx imulq 0x20(%r14), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x92eaa movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x92319 movq 0x18(%r15), %rdx movq 0x20(%r15), %rcx movq 0x28(%r14), %r8 movq 0x28(%r15), %r9 movq %rbx, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x93083
ggml_conv_2d: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov eax, [rsp+28h+arg_0] mov r10d, [rsp+28h+arg_8] mov r11d, [rsp+28h+arg_10] push 1 push r11 push r10 push rax call ggml_im2col add rsp, 20h mov r15, rax mov rdx, [rax+10h] mov rcx, [rax+20h] imul rcx, [rax+28h] imul rcx, [rax+18h] mov rdi, rbx mov rsi, rax call ggml_reshape_2d mov r12, rax mov rdx, [r14+18h] mov rcx, [r14+28h] imul rdx, [r14+10h] imul rdx, [r14+20h] mov rdi, rbx mov rsi, r14 call ggml_reshape_2d mov rdi, rbx mov rsi, r12 mov rdx, rax call ggml_mul_mat mov rdx, [r15+18h] mov rcx, [r15+20h] mov r8, [r14+28h] mov r9, [r15+28h] mov rdi, rbx mov rsi, rax add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ggml_reshape_4d
long long ggml_conv_2d( long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15, int a16, int a17) { _QWORD *v17; // r15 double v18; // xmm4_8 double v19; // xmm5_8 _QWORD *v20; // r12 double v21; // xmm4_8 double v22; // xmm5_8 _QWORD *v23; // rax _QWORD *v24; // rax double v25; // xmm4_8 double v26; // xmm5_8 v17 = (_QWORD *)ggml_im2col(a1, a2, a3, a4, a5, a6, a7, a8, a15, a16, a17, 1u); v20 = (_QWORD *)ggml_reshape_2d(a1, v17, v17[2], v17[3] * v17[5] * v17[4], a7, a8, a9, a10, v18, v19, a13, a14); v23 = (_QWORD *)ggml_reshape_2d(a1, a2, a2[4] * a2[2] * a2[3], a2[5], a7, a8, a9, a10, v21, v22, a13, a14); v24 = ggml_mul_mat(a1, v20, v23); return ggml_reshape_4d(a1, v24, v17[3], v17[4], a2[5], v17[5], a7, a8, a9, a10, v25, v26, a13, a14); }
65,770
ggml_conv_2d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_2d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int s1, int p0, int p1, int d0, int d1) { struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, s1, p0, p1, d0, d1, true); // [N, OH, OW, IC * KH * KW] struct ggml_tensor * result = ggml_mul_mat(ctx, ggml_reshape_2d(ctx, im2col, im2col->ne[0], im2col->ne[3] * im2col->ne[2] * im2col->ne[1]), // [N, OH, OW, IC * KH * KW] => [N*OH*OW, IC * KH * KW] ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1] * a->ne[2]), a->ne[3])); // [OC,IC, KH, KW] => [OC, IC * KH * KW] result = ggml_reshape_4d(ctx, result, im2col->ne[1], im2col->ne[2], a->ne[3], im2col->ne[3]); // [N, OC, OH, OW] return result; }
O2
c
ggml_conv_2d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x30(%rsp), %eax movl 0x38(%rsp), %r10d movl 0x40(%rsp), %r11d pushq $0x1 pushq %r11 pushq %r10 pushq %rax callq 0x6d546 addq $0x20, %rsp movq %rax, %r15 movq 0x10(%rax), %rdx movq 0x20(%rax), %rcx imulq 0x28(%rax), %rcx imulq 0x18(%rax), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x6bcdb movq %rax, %r12 movq 0x18(%r14), %rdx movq 0x28(%r14), %rcx imulq 0x10(%r14), %rdx imulq 0x20(%r14), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x6bcdb movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x6ae99 movq 0x18(%r15), %rdx movq 0x20(%r15), %rcx movq 0x28(%r14), %r8 movq 0x28(%r15), %r9 movq %rbx, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x6bf70
ggml_conv_2d: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov eax, [rsp+28h+arg_0] mov r10d, [rsp+28h+arg_8] mov r11d, [rsp+28h+arg_10] push 1 push r11 push r10 push rax call ggml_im2col add rsp, 20h mov r15, rax mov rdx, [rax+10h] mov rcx, [rax+20h] imul rcx, [rax+28h] imul rcx, [rax+18h] mov rdi, rbx mov rsi, rax call ggml_reshape_2d mov r12, rax mov rdx, [r14+18h] mov rcx, [r14+28h] imul rdx, [r14+10h] imul rdx, [r14+20h] mov rdi, rbx mov rsi, r14 call ggml_reshape_2d mov rdi, rbx mov rsi, r12 mov rdx, rax call ggml_mul_mat mov rdx, [r15+18h] mov rcx, [r15+20h] mov r8, [r14+28h] mov r9, [r15+28h] mov rdi, rbx mov rsi, rax add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ggml_reshape_4d
long long ggml_conv_2d( long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15, int a16, int a17) { _QWORD *v17; // r15 double v18; // xmm4_8 double v19; // xmm5_8 _QWORD *v20; // r12 double v21; // xmm4_8 double v22; // xmm5_8 long long v23; // rax unsigned int *v24; // rax double v25; // xmm4_8 double v26; // xmm5_8 v17 = (_QWORD *)ggml_im2col(a1, a2, a3, a4, a5, a6, a15, a16, a17, 1u); v20 = (_QWORD *)ggml_reshape_2d(a1, v17, v17[2], v17[3] * v17[5] * v17[4], a7, a8, a9, a10, v18, v19, a13, a14); v23 = ggml_reshape_2d(a1, a2, a2[4] * a2[2] * a2[3], a2[5], a7, a8, a9, a10, v21, v22, a13, a14); v24 = ggml_mul_mat(a1, v20, v23); return ggml_reshape_4d(a1, v24, v17[3], v17[4], a2[5], v17[5], a7, a8, a9, a10, v25, v26, a13, a14); }
ggml_conv_2d: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV EAX,dword ptr [RSP + 0x30] MOV R10D,dword ptr [RSP + 0x38] MOV R11D,dword ptr [RSP + 0x40] PUSH 0x1 PUSH R11 PUSH R10 PUSH RAX CALL 0x0016d546 ADD RSP,0x20 MOV R15,RAX MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x20] IMUL RCX,qword ptr [RAX + 0x28] IMUL RCX,qword ptr [RAX + 0x18] MOV RDI,RBX MOV RSI,RAX CALL 0x0016bcdb MOV R12,RAX MOV RDX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [R14 + 0x28] IMUL RDX,qword ptr [R14 + 0x10] IMUL RDX,qword ptr [R14 + 0x20] MOV RDI,RBX MOV RSI,R14 CALL 0x0016bcdb MOV RDI,RBX MOV RSI,R12 MOV RDX,RAX CALL 0x0016ae99 MOV RDX,qword ptr [R15 + 0x18] MOV RCX,qword ptr [R15 + 0x20] MOV R8,qword ptr [R14 + 0x28] MOV R9,qword ptr [R15 + 0x28] MOV RDI,RBX MOV RSI,RAX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0016bf70
void ggml_conv_2d(int8 param_1,long param_2) { long lVar1; int8 uVar2; int8 uVar3; lVar1 = ggml_im2col(); uVar2 = ggml_reshape_2d(param_1,lVar1,*(int8 *)(lVar1 + 0x10), *(long *)(lVar1 + 0x20) * *(long *)(lVar1 + 0x28) * *(long *)(lVar1 + 0x18)); uVar3 = ggml_reshape_2d(param_1,param_2, *(long *)(param_2 + 0x18) * *(long *)(param_2 + 0x10) * *(long *)(param_2 + 0x20),*(int8 *)(param_2 + 0x28)); uVar2 = ggml_mul_mat(param_1,uVar2,uVar3); ggml_reshape_4d(param_1,uVar2,*(int8 *)(lVar1 + 0x18),*(int8 *)(lVar1 + 0x20), *(int8 *)(param_2 + 0x28),*(int8 *)(lVar1 + 0x28)); return; }
65,771
ggml_conv_2d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_conv_2d( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, int s0, int s1, int p0, int p1, int d0, int d1) { struct ggml_tensor * im2col = ggml_im2col(ctx, a, b, s0, s1, p0, p1, d0, d1, true); // [N, OH, OW, IC * KH * KW] struct ggml_tensor * result = ggml_mul_mat(ctx, ggml_reshape_2d(ctx, im2col, im2col->ne[0], im2col->ne[3] * im2col->ne[2] * im2col->ne[1]), // [N, OH, OW, IC * KH * KW] => [N*OH*OW, IC * KH * KW] ggml_reshape_2d(ctx, a, (a->ne[0] * a->ne[1] * a->ne[2]), a->ne[3])); // [OC,IC, KH, KW] => [OC, IC * KH * KW] result = ggml_reshape_4d(ctx, result, im2col->ne[1], im2col->ne[2], a->ne[3], im2col->ne[3]); // [N, OC, OH, OW] return result; }
O3
c
ggml_conv_2d: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x30(%rsp), %eax movl 0x38(%rsp), %r10d movl 0x40(%rsp), %r11d pushq $0x1 pushq %r11 pushq %r10 pushq %rax callq 0x92fd6 addq $0x20, %rsp movq %rax, %r15 movq 0x10(%rax), %rdx movq 0x20(%rax), %rcx imulq 0x28(%rax), %rcx imulq 0x18(%rax), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x91d16 movq %rax, %r12 movq 0x18(%r14), %rdx movq 0x28(%r14), %rcx imulq 0x10(%r14), %rdx imulq 0x20(%r14), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x91d16 movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x91177 movq 0x18(%r15), %rdx movq 0x20(%r15), %rcx movq 0x28(%r14), %r8 movq 0x28(%r15), %r9 movq %rbx, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x91eef
ggml_conv_2d: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov eax, [rsp+28h+arg_0] mov r10d, [rsp+28h+arg_8] mov r11d, [rsp+28h+arg_10] push 1 push r11 push r10 push rax call ggml_im2col add rsp, 20h mov r15, rax mov rdx, [rax+10h] mov rcx, [rax+20h] imul rcx, [rax+28h] imul rcx, [rax+18h] mov rdi, rbx mov rsi, rax call ggml_reshape_2d mov r12, rax mov rdx, [r14+18h] mov rcx, [r14+28h] imul rdx, [r14+10h] imul rdx, [r14+20h] mov rdi, rbx mov rsi, r14 call ggml_reshape_2d mov rdi, rbx mov rsi, r12 mov rdx, rax call ggml_mul_mat mov rdx, [r15+18h] mov rcx, [r15+20h] mov r8, [r14+28h] mov r9, [r15+28h] mov rdi, rbx mov rsi, rax add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp ggml_reshape_4d
long long ggml_conv_2d( long long a1, _QWORD *a2, _QWORD *a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15, int a16, int a17) { _QWORD *v17; // r15 double v18; // xmm4_8 double v19; // xmm5_8 _QWORD *v20; // r12 double v21; // xmm4_8 double v22; // xmm5_8 _QWORD *v23; // rax _QWORD *v24; // rax double v25; // xmm4_8 double v26; // xmm5_8 v17 = (_QWORD *)ggml_im2col(a1, a2, a3, a4, a5, a6, a7, a8, a15, a16, a17, 1u); v20 = (_QWORD *)ggml_reshape_2d(a1, v17, v17[2], v17[3] * v17[5] * v17[4], a7, a8, a9, a10, v18, v19, a13, a14); v23 = (_QWORD *)ggml_reshape_2d(a1, a2, a2[4] * a2[2] * a2[3], a2[5], a7, a8, a9, a10, v21, v22, a13, a14); v24 = ggml_mul_mat(a1, v20, v23, a7, a8); return ggml_reshape_4d(a1, v24, v17[3], v17[4], a2[5], v17[5], a7, a8, a9, a10, v25, v26, a13, a14); }
65,772
js_loadScript
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_loadScript(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint8_t *buf; const char *filename; JSValue ret; size_t buf_len; filename = JS_ToCString(ctx, argv[0]); if (!filename) return JS_EXCEPTION; buf = js_load_file(ctx, &buf_len, filename); if (!buf) { JS_ThrowReferenceError(ctx, "could not load '%s'", filename); JS_FreeCString(ctx, filename); return JS_EXCEPTION; } ret = JS_Eval(ctx, (char *)buf, buf_len, filename, JS_EVAL_TYPE_GLOBAL); js_free(ctx, buf); JS_FreeCString(ctx, filename); return ret; }
O0
c
js_loadScript: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movl %ecx, 0x5c(%rsp) movq %r8, 0x50(%rsp) movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x1aad0 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) jne 0x1b1db movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1b2b2 movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rdx leaq 0x28(%rsp), %rsi callq 0x161c0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x1b243 movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rdx leaq 0xf4de3(%rip), %rsi # 0x10fff0 movb $0x0, %al callq 0x336e0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x30140 movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1b2b2 movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x40(%rsp), %rcx xorl %r8d, %r8d callq 0x50ff0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x280a0 movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x30140 movq 0x30(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nopw (%rax,%rax)
js_loadScript: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_28], rdi mov [rsp+88h+var_2C], ecx mov [rsp+88h+var_38], r8 mov rdi, [rsp+88h+var_28] mov rax, [rsp+88h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString_0 mov [rsp+88h+var_48], rax cmp [rsp+88h+var_48], 0 jnz short loc_1B1DB mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp loc_1B2B2 loc_1B1DB: mov rdi, [rsp+88h+var_28] mov rdx, [rsp+88h+var_48] lea rsi, [rsp+88h+var_60] call js_load_file mov [rsp+88h+var_40], rax cmp [rsp+88h+var_40], 0 jnz short loc_1B243 mov rdi, [rsp+88h+var_28] mov rdx, [rsp+88h+var_48] lea rsi, aCouldNotLoadS; "could not load '%s'" mov al, 0 call JS_ThrowReferenceError mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_48] call JS_FreeCString mov dword ptr [rsp+88h+var_10], 0 mov [rsp+88h+var_8], 6 jmp short loc_1B2B2 loc_1B243: mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_40] mov rdx, [rsp+88h+var_60] mov rcx, [rsp+88h+var_48] xor r8d, r8d call JS_Eval mov [rsp+88h+var_80], rax mov [rsp+88h+var_78], rdx mov rax, [rsp+88h+var_80] mov [rsp+88h+var_58], rax mov rax, [rsp+88h+var_78] mov [rsp+88h+var_50], rax mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_40] call js_free mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_48] call JS_FreeCString mov rax, [rsp+88h+var_58] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_50] mov [rsp+88h+var_8], rax loc_1B2B2: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
long long js_loadScript(long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6) { int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rdx long long v11; // [rsp+28h] [rbp-60h] BYREF long long v12; // [rsp+30h] [rbp-58h] long long v13; // [rsp+38h] [rbp-50h] long long v14; // [rsp+40h] [rbp-48h] long long v15; // [rsp+48h] [rbp-40h] long long *v16; // [rsp+50h] [rbp-38h] int v17; // [rsp+5Ch] [rbp-2Ch] long long v18; // [rsp+60h] [rbp-28h] long long v19; // [rsp+68h] [rbp-20h] long long v20; // [rsp+70h] [rbp-18h] long long v21; // [rsp+78h] [rbp-10h] long long v22; // [rsp+80h] [rbp-8h] v19 = a2; v20 = a3; v18 = a1; v17 = a4; v16 = a5; v14 = JS_ToCString_0(a1, *a5, a5[1], a4, (long long)a5, a6); if ( v14 ) { v15 = js_load_file(v18, &v11, v14); if ( v15 ) { v12 = JS_Eval(v18, v15, v11, v14, 0LL); v13 = v9; js_free(v18, v15); JS_FreeCString(v18, v14); v21 = v12; v22 = v13; } else { JS_ThrowReferenceError(v18, (unsigned int)"could not load '%s'", v14, v6, v7, v8); JS_FreeCString(v18, v14); LODWORD(v21) = 0; v22 = 6LL; } } else { LODWORD(v21) = 0; v22 = 6LL; } return v21; }
js_loadScript: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV dword ptr [RSP + 0x5c],ECX MOV qword ptr [RSP + 0x50],R8 MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0011aad0 MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x0011b1db MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011b2b2 LAB_0011b1db: MOV RDI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x40] LEA RSI,[RSP + 0x28] CALL 0x001161c0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x0011b243 MOV RDI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x40] LEA RSI,[0x20fff0] MOV AL,0x0 CALL 0x001336e0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00130140 MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011b2b2 LAB_0011b243: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x40] XOR R8D,R8D CALL 0x00150ff0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001280a0 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00130140 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x80],RAX LAB_0011b2b2: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_loadScript(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int8 local_60; int1 local_58 [16]; long local_48; long local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_48 = JS_ToCString(param_1,*param_5,param_5[1]); if (local_48 == 0) { local_10 = 0; local_8 = 6; } else { local_40 = js_load_file(local_28,&local_60,local_48); if (local_40 == 0) { JS_ThrowReferenceError(local_28,"could not load \'%s\'",local_48); JS_FreeCString(local_28,local_48); local_10 = 0; local_8 = 6; } else { local_58 = JS_Eval(local_28,local_40,local_60,local_48,0); js_free(local_28,local_40); JS_FreeCString(local_28,local_48); local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } } auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
65,773
js_loadScript
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_loadScript(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { uint8_t *buf; const char *filename; JSValue ret; size_t buf_len; filename = JS_ToCString(ctx, argv[0]); if (!filename) return JS_EXCEPTION; buf = js_load_file(ctx, &buf_len, filename); if (!buf) { JS_ThrowReferenceError(ctx, "could not load '%s'", filename); JS_FreeCString(ctx, filename); return JS_EXCEPTION; } ret = JS_Eval(ctx, (char *)buf, buf_len, filename, JS_EVAL_TYPE_GLOBAL); js_free(ctx, buf); JS_FreeCString(ctx, filename); return ret; }
O2
c
js_loadScript: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x1561c pushq $0x6 popq %rbx testq %rax, %rax je 0x159c9 movq %rax, %r15 leaq 0x8(%rsp), %rsi movq %r14, %rdi movq %rax, %rdx callq 0x132bc testq %rax, %rax je 0x159ce movq %rax, %r12 movq 0x8(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi movq %r15, %rcx xorl %r8d, %r8d callq 0x2d5b9 movq %rax, %r13 movq %rdx, %rbx movq %r14, %rdi movq %r12, %rsi callq 0x1ae1e movq %r14, %rdi movq %r15, %rsi callq 0x1ec07 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %r13, %rax movl %r13d, %r12d jmp 0x159f2 xorl %r12d, %r12d jmp 0x159f0 leaq 0x7050f(%rip), %rsi # 0x85ee4 xorl %r12d, %r12d movq %r14, %rdi movq %r15, %rdx xorl %eax, %eax callq 0x2028f movq %r14, %rdi movq %r15, %rsi callq 0x1ec07 xorl %eax, %eax orq %rax, %r12 movq %r12, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_loadScript: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString_0 push 6 pop rbx test rax, rax jz short loc_159C9 mov r15, rax lea rsi, [rsp+38h+var_30] mov rdi, r14 mov rdx, rax call js_load_file test rax, rax jz short loc_159CE mov r12, rax mov rdx, [rsp+38h+var_30] mov rdi, r14 mov rsi, rax mov rcx, r15 xor r8d, r8d call JS_Eval mov r13, rax mov rbx, rdx mov rdi, r14 mov rsi, r12 call js_free mov rdi, r14 mov rsi, r15 call JS_FreeCString mov rax, 0FFFFFFFF00000000h and rax, r13 mov r12d, r13d jmp short loc_159F2 loc_159C9: xor r12d, r12d jmp short loc_159F0 loc_159CE: lea rsi, aCouldNotLoadS; "could not load '%s'" xor r12d, r12d mov rdi, r14 mov rdx, r15 xor eax, eax call JS_ThrowReferenceError mov rdi, r14 mov rsi, r15 call JS_FreeCString loc_159F0: xor eax, eax loc_159F2: or r12, rax mov rax, r12 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
unsigned long long js_loadScript(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v5; // rax long long v6; // r15 long long file; // rax int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // r12 long long v12; // r13 unsigned long long v13; // rax long long v14; // r12 long long v16[6]; // [rsp+8h] [rbp-30h] BYREF v5 = JS_ToCString_0(a1, *a5, a5[1]); if ( !v5 ) { v14 = 0LL; LABEL_6: v13 = 0LL; return v13 | v14; } v6 = v5; file = js_load_file(a1, v16, v5); if ( !file ) { v14 = 0LL; JS_ThrowReferenceError(a1, (unsigned int)"could not load '%s'", v6, v8, v9, v10); JS_FreeCString(a1, v6); goto LABEL_6; } v11 = file; v12 = JS_Eval(a1, file, v16[0], v6, 0LL); js_free(a1, v11); JS_FreeCString(a1, v6); v13 = v12 & 0xFFFFFFFF00000000LL; v14 = (unsigned int)v12; return v13 | v14; }
js_loadScript: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x0011561c PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x001159c9 MOV R15,RAX LEA RSI,[RSP + 0x8] MOV RDI,R14 MOV RDX,RAX CALL 0x001132bc TEST RAX,RAX JZ 0x001159ce MOV R12,RAX MOV RDX,qword ptr [RSP + 0x8] MOV RDI,R14 MOV RSI,RAX MOV RCX,R15 XOR R8D,R8D CALL 0x0012d5b9 MOV R13,RAX MOV RBX,RDX MOV RDI,R14 MOV RSI,R12 CALL 0x0011ae1e MOV RDI,R14 MOV RSI,R15 CALL 0x0011ec07 MOV RAX,-0x100000000 AND RAX,R13 MOV R12D,R13D JMP 0x001159f2 LAB_001159c9: XOR R12D,R12D JMP 0x001159f0 LAB_001159ce: LEA RSI,[0x185ee4] XOR R12D,R12D MOV RDI,R14 MOV RDX,R15 XOR EAX,EAX CALL 0x0012028f MOV RDI,R14 MOV RSI,R15 CALL 0x0011ec07 LAB_001159f0: XOR EAX,EAX LAB_001159f2: OR R12,RAX MOV RAX,R12 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_loadScript(int8 param_1) { long lVar1; long lVar2; ulong uVar3; int8 uVar4; int8 *in_R8; ulong uVar5; int1 auVar6 [16]; int8 local_30; lVar1 = JS_ToCString(param_1,*in_R8,in_R8[1]); uVar4 = 6; if (lVar1 != 0) { lVar2 = js_load_file(param_1,&local_30,lVar1); if (lVar2 != 0) { auVar6 = JS_Eval(param_1,lVar2,local_30,lVar1,0); uVar4 = auVar6._8_8_; js_free(param_1,lVar2); JS_FreeCString(param_1,lVar1); uVar3 = auVar6._0_8_ & 0xffffffff00000000; uVar5 = auVar6._0_8_ & 0xffffffff; goto LAB_001159f2; } JS_ThrowReferenceError(param_1,"could not load \'%s\'",lVar1); JS_FreeCString(param_1,lVar1); } uVar5 = 0; uVar3 = 0; LAB_001159f2: auVar6._8_8_ = uVar4; auVar6._0_8_ = uVar5 | uVar3; return auVar6; }
65,774
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O3
c
skip: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movl %edi, %ebx movq %rdx, -0x140(%rbp) movq %rcx, -0x138(%rbp) movq %r8, -0x130(%rbp) movq %r9, -0x128(%rbp) testb %al, %al je 0x90f1f movaps %xmm0, -0x120(%rbp) movaps %xmm1, -0x110(%rbp) movaps %xmm2, -0x100(%rbp) movaps %xmm3, -0xf0(%rbp) movaps %xmm4, -0xe0(%rbp) movaps %xmm5, -0xd0(%rbp) movaps %xmm6, -0xc0(%rbp) movaps %xmm7, -0xb0(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi je 0x90f7d movq %rsi, %r10 cmpb $0x0, (%rsi) je 0x90f7d leaq -0x150(%rbp), %rax leaq -0xa0(%rbp), %r9 movq %rax, 0x10(%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r9) leaq -0x80(%rbp), %rdi movl $0x50, %esi movl $0x50, %ecx movl $0x1, %edx movq %r10, %r8 callq 0x291a0 jmp 0x90f81 movb $0x0, -0x80(%rbp) testl %ebx, %ebx jle 0x91011 incl %ebx movq 0x2f2016(%rip), %r15 # 0x382fa8 leaq 0x49e44(%rip), %r12 # 0xdaddd leaq -0x80(%rbp), %r13 leaq 0x4dced(%rip), %r14 # 0xdec91 xorps %xmm0, %xmm0 movaps %xmm0, -0xa0(%rbp) movq $0x0, -0x90(%rbp) movl $0x1, %edi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0x90d65 movq (%r15), %rdi movl $0x1, %esi leaq 0x49e6e(%rip), %rdx # 0xdae49 movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x293f0 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x293f0 decl %ebx cmpl $0x1, %ebx ja 0x90fa4 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x91032 addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
skip: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov ebx, edi mov [rbp+var_140], rdx mov [rbp+var_138], rcx mov [rbp+var_130], r8 mov [rbp+var_128], r9 test al, al jz short loc_90F1F movaps [rbp+var_120], xmm0 movaps [rbp+var_110], xmm1 movaps [rbp+var_100], xmm2 movaps [rbp+var_F0], xmm3 movaps [rbp+var_E0], xmm4 movaps [rbp+var_D0], xmm5 movaps [rbp+var_C0], xmm6 movaps [rbp+var_B0], xmm7 loc_90F1F: mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jz short loc_90F7D mov r10, rsi cmp byte ptr [rsi], 0 jz short loc_90F7D lea rax, [rbp+var_150] lea r9, [rbp+var_A0] mov [r9+10h], rax lea rax, [rbp+arg_0] mov [r9+8], rax mov rax, 3000000010h mov [r9], rax lea rdi, [rbp+var_80] mov esi, 50h ; 'P' mov ecx, 50h ; 'P' mov edx, 1 mov r8, r10 call ___vsnprintf_chk jmp short loc_90F81 loc_90F7D: mov [rbp+var_80], 0 loc_90F81: test ebx, ebx jle loc_91011 inc ebx mov r15, cs:stdout_ptr lea r12, aSkip; "skip" lea r13, [rbp+var_80] lea r14, asc_DEC8E+3; "\n" loc_90FA4: xorps xmm0, xmm0 movaps [rbp+var_A0], xmm0 mov [rbp+var_90], 0 mov edi, 1 xor esi, esi lea rdx, [rbp+var_A0] call vemit_tap mov rdi, [r15] mov esi, 1 lea rdx, aSS; " # %s %s" mov rcx, r12 mov r8, r13 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush mov rdi, [r15] mov esi, 1 mov rdx, r14 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush dec ebx cmp ebx, 1 ja short loc_90FA4 loc_91011: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_91032 add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_91032: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { unsigned int v2; // ebx va_list va; // [rsp+B0h] [rbp-A0h] BYREF char v5[80]; // [rsp+D0h] [rbp-80h] BYREF unsigned long long v6; // [rsp+120h] [rbp-30h] v6 = __readfsqword(0x28u); if ( a2 && *a2 ) { va_start(va, a2); __vsnprintf_chk(v5, 80LL, 1LL, 80LL, a2, va); } else { v5[0] = 0; } if ( a1 > 0 ) { v2 = a1 + 1; do { memset(va, 0, sizeof(va)); vemit_tap(1, 0LL, (long long)va); __fprintf_chk(stdout, 1LL, " # %s %s", "skip", v5); fflush(stdout); __fprintf_chk(stdout, 1LL, "\n"); fflush(stdout); --v2; } while ( v2 > 1 ); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV EBX,EDI MOV qword ptr [RBP + -0x140],RDX MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],R8 MOV qword ptr [RBP + -0x128],R9 TEST AL,AL JZ 0x00190f1f MOVAPS xmmword ptr [RBP + -0x120],XMM0 MOVAPS xmmword ptr [RBP + -0x110],XMM1 MOVAPS xmmword ptr [RBP + -0x100],XMM2 MOVAPS xmmword ptr [RBP + -0xf0],XMM3 MOVAPS xmmword ptr [RBP + -0xe0],XMM4 MOVAPS xmmword ptr [RBP + -0xd0],XMM5 MOVAPS xmmword ptr [RBP + -0xc0],XMM6 MOVAPS xmmword ptr [RBP + -0xb0],XMM7 LAB_00190f1f: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JZ 0x00190f7d MOV R10,RSI CMP byte ptr [RSI],0x0 JZ 0x00190f7d LEA RAX,[RBP + -0x150] LEA R9,[RBP + -0xa0] MOV qword ptr [R9 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R9],RAX LEA RDI,[RBP + -0x80] MOV ESI,0x50 MOV ECX,0x50 MOV EDX,0x1 MOV R8,R10 CALL 0x001291a0 JMP 0x00190f81 LAB_00190f7d: MOV byte ptr [RBP + -0x80],0x0 LAB_00190f81: TEST EBX,EBX JLE 0x00191011 INC EBX MOV R15,qword ptr [0x00482fa8] LEA R12,[0x1daddd] LEA R13,[RBP + -0x80] LEA R14,[0x1dec91] LAB_00190fa4: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV qword ptr [RBP + -0x90],0x0 MOV EDI,0x1 XOR ESI,ESI LEA RDX,[RBP + -0xa0] CALL 0x00190d65 MOV RDI,qword ptr [R15] MOV ESI,0x1 LEA RDX,[0x1dae49] MOV RCX,R12 MOV R8,R13 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x001293f0 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x001293f0 DEC EBX CMP EBX,0x1 JA 0x00190fa4 LAB_00191011: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00191032 ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00191032: CALL 0x00129260
void skip(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; uint uVar2; long in_FS_OFFSET; int1 local_158 [16]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; int4 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int1 *puStack_a0; int1 *local_98; int1 local_88 [80]; long local_38; if (in_AL != '\0') { local_128 = param_1; local_118 = param_2; local_108 = param_3; local_f8 = param_4; local_e8 = param_5; local_d8 = param_6; local_c8 = param_7; local_b8 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_148 = param_11; local_140 = param_12; local_138 = param_13; local_130 = param_14; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_88[0] = 0; } else { local_98 = local_158; puStack_a0 = &stack0x00000008; local_a8 = 0x3000000010; __vsnprintf_chk(local_88,0x50,1,0x50,param_10); } puVar1 = PTR_stdout_00482fa8; if (0 < param_9) { uVar2 = param_9 + 1; do { local_a8 = 0; puStack_a0 = (int1 *)0x0; local_98 = (int1 *)0x0; vemit_tap(1,0,&local_a8); __fprintf_chk(*(int8 *)puVar1,1," # %s %s",&DAT_001daddd,local_88); fflush(*(FILE **)puVar1); __fprintf_chk(*(int8 *)puVar1,1,&DAT_001dec91); fflush(*(FILE **)puVar1); uVar2 = uVar2 - 1; } while (1 < uVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
65,775
ma_dynstr_realloc
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size) { if (!additional_size) return(FALSE); if (str->length + additional_size > str->max_length) { str->max_length=((str->length + additional_size+str->alloc_increment-1)/ str->alloc_increment)*str->alloc_increment; if (!(str->str=(char*) realloc(str->str,str->max_length))) return(TRUE); } return(FALSE); }
O3
c
ma_dynstr_realloc: testq %rsi, %rsi je 0x24cf3 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx addq 0x8(%rdi), %rsi cmpq 0x10(%rdi), %rsi jbe 0x24cea movq (%rbx), %rdi movq 0x18(%rbx), %rcx addq %rcx, %rsi decq %rsi movq %rsi, %rax xorl %edx, %edx divq %rcx subq %rdx, %rsi movq %rsi, 0x10(%rbx) callq 0x13730 movq %rax, (%rbx) testq %rax, %rax je 0x24cf6 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq xorl %eax, %eax retq movb $0x1, %al jmp 0x24cec
ma_dynstr_realloc: test rsi, rsi jz short loc_24CF3 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi add rsi, [rdi+8] cmp rsi, [rdi+10h] jbe short loc_24CEA mov rdi, [rbx] mov rcx, [rbx+18h] add rsi, rcx dec rsi mov rax, rsi xor edx, edx div rcx sub rsi, rdx mov [rbx+10h], rsi call _realloc mov [rbx], rax test rax, rax jz short loc_24CF6 loc_24CEA: xor eax, eax loc_24CEC: add rsp, 8 pop rbx pop rbp retn loc_24CF3: xor eax, eax retn loc_24CF6: mov al, 1 jmp short loc_24CEC
_BOOL8 ma_dynstr_realloc(long long *a1, long long a2) { unsigned long long v3; // rsi long long v4; // rdi unsigned long long v5; // rsi long long v6; // rax _BOOL8 result; // rax if ( !a2 ) return 0LL; v3 = a1[1] + a2; result = 0; if ( v3 > a1[2] ) { v4 = *a1; v5 = a1[3] + v3 - 1 - (a1[3] + v3 - 1) % a1[3]; a1[2] = v5; v6 = realloc(v4, v5); *a1 = v6; if ( !v6 ) return 1; } return result; }
ma_dynstr_realloc: TEST RSI,RSI JZ 0x00124cf3 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI ADD RSI,qword ptr [RDI + 0x8] CMP RSI,qword ptr [RDI + 0x10] JBE 0x00124cea MOV RDI,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x18] ADD RSI,RCX DEC RSI MOV RAX,RSI XOR EDX,EDX DIV RCX SUB RSI,RDX MOV qword ptr [RBX + 0x10],RSI CALL 0x00113730 MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00124cf6 LAB_00124cea: XOR EAX,EAX LAB_00124cec: ADD RSP,0x8 POP RBX POP RBP RET LAB_00124cf3: XOR EAX,EAX RET LAB_00124cf6: MOV AL,0x1 JMP 0x00124cec
int8 ma_dynstr_realloc(int8 *param_1,long param_2) { void *pvVar1; ulong uVar2; size_t __size; if (param_2 == 0) { return 0; } if ((ulong)param_1[2] < (ulong)(param_2 + param_1[1])) { uVar2 = (param_2 + param_1[1] + param_1[3]) - 1; __size = uVar2 - uVar2 % (ulong)param_1[3]; param_1[2] = __size; pvVar1 = realloc((void *)*param_1,__size); *param_1 = pvVar1; if (pvVar1 == (void *)0x0) { return 1; } } return 0; }
65,776
build_envp
bluesky950520[P]quickjs/quickjs-libc.c
static char **build_envp(JSContext *ctx, JSValue obj) { uint32_t len, i; JSPropertyEnum *tab; char **envp, *pair; const char *key, *str; JSValue val; size_t key_len, str_len; if (JS_GetOwnPropertyNames(ctx, &tab, &len, obj, JS_GPN_STRING_MASK | JS_GPN_ENUM_ONLY) < 0) return NULL; envp = js_mallocz(ctx, sizeof(envp[0]) * ((size_t)len + 1)); if (!envp) goto fail; for(i = 0; i < len; i++) { val = JS_GetProperty(ctx, obj, tab[i].atom); if (JS_IsException(val)) goto fail; str = JS_ToCString(ctx, val); JS_FreeValue(ctx, val); if (!str) goto fail; key = JS_AtomToCString(ctx, tab[i].atom); if (!key) { JS_FreeCString(ctx, str); goto fail; } key_len = strlen(key); str_len = strlen(str); pair = js_malloc(ctx, key_len + str_len + 2); if (!pair) { JS_FreeCString(ctx, key); JS_FreeCString(ctx, str); goto fail; } memcpy(pair, key, key_len); pair[key_len] = '='; memcpy(pair + key_len + 1, str, str_len); pair[key_len + 1 + str_len] = '\0'; envp[i] = pair; JS_FreeCString(ctx, key); JS_FreeCString(ctx, str); } done: for(i = 0; i < len; i++) JS_FreeAtom(ctx, tab[i].atom); js_free(ctx, tab); return envp; fail: if (envp) { for(i = 0; i < len; i++) js_free(ctx, envp[i]); js_free(ctx, envp); envp = NULL; } goto done; }
O3
c
build_envp: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r8 movq %rsi, %rcx movq %rdi, %rbx leaq 0x8(%rsp), %rsi leaq 0x4(%rsp), %rdx movq %rcx, 0x18(%rsp) movq %r8, 0x20(%rsp) movl $0x11, %r9d callq 0x23db5 testl %eax, %eax js 0x1b6be movl 0x4(%rsp), %eax leaq 0x8(,%rax,8), %rsi movq %rbx, %rdi callq 0xee3f movq %rax, %r12 movl 0x4(%rsp), %eax testq %r12, %r12 je 0x1b6c6 testl %eax, %eax je 0x1b742 xorl %r13d, %r13d movq %r12, 0x10(%rsp) movq 0x8(%rsp), %rax movl 0x4(%rax,%r13,8), %ecx movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x21613 movq %rdx, %r15 cmpl $0x6, %r15d je 0x1b6e9 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi movq %rax, %rdx movq %r15, %rcx xorl %r8d, %r8d callq 0x21353 movq %rbx, %rdi movq %r14, %rsi movq %rax, %r14 movq %r15, %rdx callq 0x1e1d5 testq %r14, %r14 je 0x1b6e9 movq 0x8(%rsp), %rax movl 0x4(%rax,%r13,8), %esi movq %rbx, %rdi callq 0x20f58 testq %rax, %rax je 0x1b6de movq %rax, %rbp movq %r13, 0x30(%rsp) movq %rax, %rdi callq 0xe240 movq %rax, %r12 movq %r14, %rdi callq 0xe240 movq %rax, %r15 leaq (%r12,%rax), %rsi addq $0x2, %rsi movq %rbx, %rdi callq 0xee12 movq %r14, %r13 testq %rax, %rax je 0x1b6cb movq %rax, %r14 movq %rax, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0xe5b0 leaq (%r14,%r12), %rax movq %rax, 0x28(%rsp) movb $0x3d, (%r14,%r12) leaq (%r14,%r12), %rdi incq %rdi movq %r13, %rsi movq %r15, %rdx callq 0xe5b0 movq 0x28(%rsp), %rax movb $0x0, 0x1(%r15,%rax) movq 0x10(%rsp), %r12 movq 0x30(%rsp), %r15 movq %r14, (%r12,%r15,8) movq %rbx, %rdi movq %rbp, %rsi callq 0x21629 movq %rbx, %rdi movq %r13, %rsi movq %r15, %r13 callq 0x21629 incq %r13 movl 0x4(%rsp), %eax cmpq %rax, %r13 jb 0x1b59b jmp 0x1b71d xorl %r12d, %r12d jmp 0x1b74f xorl %r12d, %r12d jmp 0x1b71d movq %rbx, %rdi movq %rbp, %rsi callq 0x21629 movq 0x10(%rsp), %r12 movq %r13, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x21629 cmpl $0x0, 0x4(%rsp) je 0x1b70b xorl %r14d, %r14d movq (%r12,%r14,8), %rsi movq %rbx, %rdi callq 0x1d481 incq %r14 movl 0x4(%rsp), %eax cmpq %rax, %r14 jb 0x1b6f3 movq %rbx, %rdi movq %r12, %rsi callq 0x1d481 xorl %r12d, %r12d movl 0x4(%rsp), %eax testl %eax, %eax je 0x1b742 xorl %r14d, %r14d movq 0x8(%rsp), %rax movl 0x4(%rax,%r14,8), %esi movq %rbx, %rdi callq 0x20f31 incq %r14 movl 0x4(%rsp), %eax cmpq %rax, %r14 jb 0x1b724 movq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1d481 movq %r12, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
build_envp: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r8, rdx mov rcx, rsi mov rbx, rdi lea rsi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_64] mov [rsp+68h+var_50], rcx mov [rsp+68h+var_48], r8 mov r9d, 11h call JS_GetOwnPropertyNames test eax, eax js loc_1B6BE mov eax, [rsp+68h+var_64] lea rsi, ds:8[rax*8] mov rdi, rbx call js_mallocz mov r12, rax mov eax, [rsp+68h+var_64] test r12, r12 jz loc_1B6C6 test eax, eax jz loc_1B742 xor r13d, r13d mov [rsp+68h+var_58], r12 loc_1B59B: mov rax, [rsp+68h+var_60] mov ecx, [rax+r13*8+4] mov rdi, rbx mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_48] call JS_GetProperty mov r15, rdx cmp r15d, 6 jz loc_1B6E9 mov r14, rax mov rdi, rbx xor esi, esi mov rdx, rax mov rcx, r15 xor r8d, r8d call JS_ToCStringLen2 mov rdi, rbx mov rsi, r14 mov r14, rax mov rdx, r15 call JS_FreeValue test r14, r14 jz loc_1B6E9 mov rax, [rsp+68h+var_60] mov esi, [rax+r13*8+4] mov rdi, rbx call JS_AtomToCString test rax, rax jz loc_1B6DE mov rbp, rax mov [rsp+68h+var_38], r13 mov rdi, rax call _strlen mov r12, rax mov rdi, r14 call _strlen mov r15, rax lea rsi, [r12+rax] add rsi, 2 mov rdi, rbx call js_malloc mov r13, r14 test rax, rax jz loc_1B6CB mov r14, rax mov rdi, rax mov rsi, rbp mov rdx, r12 call _memcpy lea rax, [r14+r12] mov [rsp+68h+var_40], rax mov byte ptr [r14+r12], 3Dh ; '=' lea rdi, [r14+r12] inc rdi mov rsi, r13 mov rdx, r15 call _memcpy mov rax, [rsp+68h+var_40] mov byte ptr [r15+rax+1], 0 mov r12, [rsp+68h+var_58] mov r15, [rsp+68h+var_38] mov [r12+r15*8], r14 mov rdi, rbx mov rsi, rbp call JS_FreeCString mov rdi, rbx mov rsi, r13 mov r13, r15 call JS_FreeCString inc r13 mov eax, [rsp+68h+var_64] cmp r13, rax jb loc_1B59B jmp short loc_1B71D loc_1B6BE: xor r12d, r12d jmp loc_1B74F loc_1B6C6: xor r12d, r12d jmp short loc_1B71D loc_1B6CB: mov rdi, rbx mov rsi, rbp call JS_FreeCString mov r12, [rsp+68h+var_58] mov r14, r13 loc_1B6DE: mov rdi, rbx mov rsi, r14 call JS_FreeCString loc_1B6E9: cmp [rsp+68h+var_64], 0 jz short loc_1B70B xor r14d, r14d loc_1B6F3: mov rsi, [r12+r14*8] mov rdi, rbx call js_free inc r14 mov eax, [rsp+68h+var_64] cmp r14, rax jb short loc_1B6F3 loc_1B70B: mov rdi, rbx mov rsi, r12 call js_free xor r12d, r12d mov eax, [rsp+68h+var_64] loc_1B71D: test eax, eax jz short loc_1B742 xor r14d, r14d loc_1B724: mov rax, [rsp+68h+var_60] mov esi, [rax+r14*8+4] mov rdi, rbx call JS_FreeAtom inc r14 mov eax, [rsp+68h+var_64] cmp r14, rax jb short loc_1B724 loc_1B742: mov rsi, [rsp+68h+var_60] mov rdi, rbx call js_free loc_1B74F: mov rax, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long build_envp(long long a1, long long a2, long long a3) { long long v3; // r12 unsigned int v4; // eax long long v5; // r13 long long Property; // rax long long v7; // rdx long long v8; // r15 long long v9; // rsi long long v10; // r14 long long v11; // rax long long v12; // rbp long long v13; // r12 long long v14; // r15 long long v15; // rax long long v16; // r13 long long v17; // r14 long long v18; // r15 unsigned long long i; // r14 unsigned long long v20; // r14 unsigned int v22; // [rsp+4h] [rbp-64h] BYREF long long v23; // [rsp+8h] [rbp-60h] BYREF long long v24; // [rsp+10h] [rbp-58h] long long v25; // [rsp+18h] [rbp-50h] long long v26; // [rsp+20h] [rbp-48h] long long v27; // [rsp+28h] [rbp-40h] long long v28; // [rsp+30h] [rbp-38h] v25 = a2; v26 = a3; if ( (int)JS_GetOwnPropertyNames(a1, &v23, &v22, a2, a3, 17LL) >= 0 ) { v3 = js_mallocz(a1, 8LL * v22 + 8); v4 = v22; if ( v3 ) { if ( !v22 ) { LABEL_22: js_free(a1, v23); return v3; } v5 = 0LL; v24 = v3; while ( 1 ) { Property = JS_GetProperty(a1, v25, v26, *(unsigned int *)(v23 + 8 * v5 + 4)); v8 = v7; if ( (_DWORD)v7 == 6 ) break; v9 = Property; v10 = JS_ToCStringLen2(a1, 0LL, Property, v7, 0LL); JS_FreeValue(a1, v9, v8); if ( !v10 ) break; v11 = JS_AtomToCString(a1, *(unsigned int *)(v23 + 8 * v5 + 4)); if ( !v11 ) goto LABEL_14; v12 = v11; v28 = v5; v13 = strlen(v11); v14 = strlen(v10); v15 = js_malloc(a1, v13 + v14 + 2); v16 = v10; if ( !v15 ) { JS_FreeCString(a1, v12); v3 = v24; LABEL_14: JS_FreeCString(a1, v10); break; } v17 = v15; memcpy(v15, v12, v13); v27 = v17 + v13; *(_BYTE *)(v17 + v13) = 61; memcpy(v17 + v13 + 1, v16, v14); *(_BYTE *)(v14 + v27 + 1) = 0; v3 = v24; v18 = v28; *(_QWORD *)(v24 + 8 * v28) = v17; JS_FreeCString(a1, v12); JS_FreeCString(a1, v16); v5 = v18 + 1; v4 = v22; if ( v18 + 1 >= (unsigned long long)v22 ) goto LABEL_19; } if ( v22 ) { for ( i = 0LL; i < v22; js_free(a1, *(_QWORD *)(v3 + 8 * i++)) ) ; } js_free(a1, v3); v3 = 0LL; v4 = v22; } else { v3 = 0LL; } LABEL_19: if ( v4 ) { v20 = 0LL; do JS_FreeAtom(a1, *(unsigned int *)(v23 + 8 * v20++ + 4)); while ( v20 < v22 ); } goto LABEL_22; } return 0LL; }
build_envp: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R8,RDX MOV RCX,RSI MOV RBX,RDI LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x4] MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x20],R8 MOV R9D,0x11 CALL 0x00123db5 TEST EAX,EAX JS 0x0011b6be MOV EAX,dword ptr [RSP + 0x4] LEA RSI,[0x8 + RAX*0x8] MOV RDI,RBX CALL 0x0010ee3f MOV R12,RAX MOV EAX,dword ptr [RSP + 0x4] TEST R12,R12 JZ 0x0011b6c6 TEST EAX,EAX JZ 0x0011b742 XOR R13D,R13D MOV qword ptr [RSP + 0x10],R12 LAB_0011b59b: MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX + R13*0x8 + 0x4] MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] CALL 0x00121613 MOV R15,RDX CMP R15D,0x6 JZ 0x0011b6e9 MOV R14,RAX MOV RDI,RBX XOR ESI,ESI MOV RDX,RAX MOV RCX,R15 XOR R8D,R8D CALL 0x00121353 MOV RDI,RBX MOV RSI,R14 MOV R14,RAX MOV RDX,R15 CALL 0x0011e1d5 TEST R14,R14 JZ 0x0011b6e9 MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + R13*0x8 + 0x4] MOV RDI,RBX CALL 0x00120f58 TEST RAX,RAX JZ 0x0011b6de MOV RBP,RAX MOV qword ptr [RSP + 0x30],R13 MOV RDI,RAX CALL 0x0010e240 MOV R12,RAX MOV RDI,R14 CALL 0x0010e240 MOV R15,RAX LEA RSI,[R12 + RAX*0x1] ADD RSI,0x2 MOV RDI,RBX CALL 0x0010ee12 MOV R13,R14 TEST RAX,RAX JZ 0x0011b6cb MOV R14,RAX MOV RDI,RAX MOV RSI,RBP MOV RDX,R12 CALL 0x0010e5b0 LEA RAX,[R14 + R12*0x1] MOV qword ptr [RSP + 0x28],RAX MOV byte ptr [R14 + R12*0x1],0x3d LEA RDI,[R14 + R12*0x1] INC RDI MOV RSI,R13 MOV RDX,R15 CALL 0x0010e5b0 MOV RAX,qword ptr [RSP + 0x28] MOV byte ptr [R15 + RAX*0x1 + 0x1],0x0 MOV R12,qword ptr [RSP + 0x10] MOV R15,qword ptr [RSP + 0x30] MOV qword ptr [R12 + R15*0x8],R14 MOV RDI,RBX MOV RSI,RBP CALL 0x00121629 MOV RDI,RBX MOV RSI,R13 MOV R13,R15 CALL 0x00121629 INC R13 MOV EAX,dword ptr [RSP + 0x4] CMP R13,RAX JC 0x0011b59b JMP 0x0011b71d LAB_0011b6be: XOR R12D,R12D JMP 0x0011b74f LAB_0011b6c6: XOR R12D,R12D JMP 0x0011b71d LAB_0011b6cb: MOV RDI,RBX MOV RSI,RBP CALL 0x00121629 MOV R12,qword ptr [RSP + 0x10] MOV R14,R13 LAB_0011b6de: MOV RDI,RBX MOV RSI,R14 CALL 0x00121629 LAB_0011b6e9: CMP dword ptr [RSP + 0x4],0x0 JZ 0x0011b70b XOR R14D,R14D LAB_0011b6f3: MOV RSI,qword ptr [R12 + R14*0x8] MOV RDI,RBX CALL 0x0011d481 INC R14 MOV EAX,dword ptr [RSP + 0x4] CMP R14,RAX JC 0x0011b6f3 LAB_0011b70b: MOV RDI,RBX MOV RSI,R12 CALL 0x0011d481 XOR R12D,R12D MOV EAX,dword ptr [RSP + 0x4] LAB_0011b71d: TEST EAX,EAX JZ 0x0011b742 XOR R14D,R14D LAB_0011b724: MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + R14*0x8 + 0x4] MOV RDI,RBX CALL 0x00120f31 INC R14 MOV EAX,dword ptr [RSP + 0x4] CMP R14,RAX JC 0x0011b724 LAB_0011b742: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x0011d481 LAB_0011b74f: MOV RAX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long build_envp(int8 param_1,int8 param_2,int8 param_3) { int iVar1; long lVar2; char *__s; char *__s_00; size_t __n; size_t __n_00; void *__dest; ulong uVar3; int1 auVar4 [16]; uint local_64; long local_60; long local_58; int8 local_50; int8 local_48; long local_40; ulong local_38; local_50 = param_2; local_48 = param_3; iVar1 = JS_GetOwnPropertyNames(param_1,&local_60,&local_64,param_2,param_3,0x11); if (iVar1 < 0) { return 0; } lVar2 = js_mallocz(param_1,(ulong)local_64 * 8 + 8); if (lVar2 == 0) { lVar2 = 0; } else { if (local_64 == 0) goto LAB_0011b742; uVar3 = 0; local_58 = lVar2; do { auVar4 = JS_GetProperty(param_1,local_50,local_48,*(int4 *)(local_60 + 4 + uVar3 * 8)); if (auVar4._8_4_ == 6) { LAB_0011b6e9: if (local_64 != 0) { uVar3 = 0; do { js_free(param_1,*(int8 *)(lVar2 + uVar3 * 8)); uVar3 = uVar3 + 1; } while (uVar3 < local_64); } js_free(param_1,lVar2); lVar2 = 0; break; } __s = (char *)JS_ToCStringLen2(param_1,0,auVar4._0_8_,auVar4._8_8_,0); JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); if (__s == (char *)0x0) goto LAB_0011b6e9; __s_00 = (char *)JS_AtomToCString(param_1,*(int4 *)(local_60 + 4 + uVar3 * 8)); if (__s_00 == (char *)0x0) { LAB_0011b6de: JS_FreeCString(param_1,__s); goto LAB_0011b6e9; } local_38 = uVar3; __n = strlen(__s_00); __n_00 = strlen(__s); __dest = (void *)js_malloc(param_1,__n + __n_00 + 2); if (__dest == (void *)0x0) { JS_FreeCString(param_1,__s_00); lVar2 = local_58; goto LAB_0011b6de; } memcpy(__dest,__s_00,__n); local_40 = (long)__dest + __n; *(int1 *)((long)__dest + __n) = 0x3d; memcpy((void *)((long)__dest + __n + 1),__s,__n_00); uVar3 = local_38; lVar2 = local_58; *(int1 *)(__n_00 + 1 + local_40) = 0; *(void **)(local_58 + local_38 * 8) = __dest; JS_FreeCString(param_1,__s_00); JS_FreeCString(param_1,__s); uVar3 = uVar3 + 1; } while (uVar3 < local_64); } if (local_64 != 0) { uVar3 = 0; do { JS_FreeAtom(param_1,*(int4 *)(local_60 + 4 + uVar3 * 8)); uVar3 = uVar3 + 1; } while (uVar3 < local_64); } LAB_0011b742: js_free(param_1,local_60); return lVar2; }
65,777
my_mb_wc_latin1
eloqsql/strings/ctype-latin1.c
static int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const uchar *str, const uchar *end __attribute__((unused))) { if (str >= end) return MY_CS_TOOSMALL; /* There are no unassigned characters in latin1. Every code point in latin1 is mapped to some Unicode code point. We can always return 1, no needs to check the value of cs_to_uni[*str]. */ *wc= cs_to_uni[*str]; DBUG_ASSERT(wc[0] || !str[0]); return 1; }
O3
c
my_mb_wc_latin1: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb2bd8 movzbl (%rdx), %eax leaq 0x171744(%rip), %rcx # 0x224310 movzwl (%rcx,%rax,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq
my_mb_wc_latin1: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B2BD8 movzx eax, byte ptr [rdx] lea rcx, cs_to_uni movzx eax, word ptr [rcx+rax*2] mov [rsi], rax mov eax, 1 loc_B2BD8: pop rbp retn
long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a2 = cs_to_uni[*a3]; return 1LL; } return result; }
my_mb_wc_latin1: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b2bd8 MOVZX EAX,byte ptr [RDX] LEA RCX,[0x324310] MOVZX EAX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RAX MOV EAX,0x1 LAB_001b2bd8: POP RBP RET
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2); uVar1 = 1; } return uVar1; }
65,778
partitioned_key_cache_insert
eloqsql/mysys/mf_keycache.c
static int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { uint w_length; uint offset= (uint) (filepos % keycache->key_cache_block_size); DBUG_ENTER("partitioned_key_cache_insert"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); /* Write data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache, file, filepos); w_length= length; set_if_smaller(w_length, keycache->key_cache_block_size - offset); if (simple_key_cache_insert((void *) partition, file, filepos, level, buff, w_length)) DBUG_RETURN(1); filepos+= w_length; buff+= w_length; offset = 0; } while ((length-= w_length)); DBUG_RETURN(0); }
O3
c
partitioned_key_cache_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %ebx movq %r8, %r14 movl %ecx, -0x2c(%rbp) movq %rdx, %r12 movq %rdi, %r13 movl 0x18(%rdi), %ecx movq %rdx, %rax xorl %edx, %edx divq %rcx movq %rdx, %rcx movslq %esi, %rax movq %rax, -0x38(%rbp) movl 0x18(%r13), %r15d movq %r12, %rax xorl %edx, %edx divq %r15 movq -0x38(%rbp), %rsi addq %rsi, %rax movl 0x1c(%r13), %edi xorl %edx, %edx divq %rdi movq 0x8(%r13), %rax movq (%rax,%rdx,8), %rdi subl %ecx, %r15d cmpl %r15d, %ebx cmovbl %ebx, %r15d movq %r12, %rdx movl -0x2c(%rbp), %ecx movq %r14, %r8 movl %r15d, %r9d callq 0x9c0e3 testl %eax, %eax jne 0x9d9f6 movl %r15d, %eax addq %rax, %r14 addq %rax, %r12 xorl %ecx, %ecx subl %r15d, %ebx jne 0x9d9a1 jmp 0x9d9fb movl $0x1, %ecx movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
partitioned_key_cache_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, r9d mov r14, r8 mov [rbp+var_2C], ecx mov r12, rdx mov r13, rdi mov ecx, [rdi+18h] mov rax, rdx xor edx, edx div rcx mov rcx, rdx movsxd rax, esi mov [rbp+var_38], rax loc_9D9A1: mov r15d, [r13+18h] mov rax, r12 xor edx, edx div r15 mov rsi, [rbp+var_38] add rax, rsi mov edi, [r13+1Ch] xor edx, edx div rdi mov rax, [r13+8] mov rdi, [rax+rdx*8] sub r15d, ecx cmp ebx, r15d cmovb r15d, ebx mov rdx, r12 mov ecx, [rbp+var_2C] mov r8, r14 mov r9d, r15d call simple_key_cache_insert test eax, eax jnz short loc_9D9F6 mov eax, r15d add r14, rax add r12, rax xor ecx, ecx sub ebx, r15d jnz short loc_9D9A1 jmp short loc_9D9FB loc_9D9F6: mov ecx, 1 loc_9D9FB: mov eax, ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long partitioned_key_cache_insert( long long a1, signed int a2, unsigned long long a3, int a4, long long a5, unsigned int a6) { unsigned long long v8; // r12 unsigned long long v9; // rcx unsigned int v10; // r15d v8 = a3; v9 = a3 % *(unsigned int *)(a1 + 24); while ( 1 ) { v10 = *(_DWORD *)(a1 + 24) - v9; if ( a6 < v10 ) v10 = a6; if ( (unsigned int)simple_key_cache_insert( *(__m128i **)(*(_QWORD *)(a1 + 8) + 8 * ((a2 + v8 / *(unsigned int *)(a1 + 24)) % *(unsigned int *)(a1 + 28))), a2, v8, a4, a5, v10) ) break; a5 += v10; v8 += v10; LODWORD(v9) = 0; a6 -= v10; if ( !a6 ) return (unsigned int)v9; } LODWORD(v9) = 1; return (unsigned int)v9; }
partitioned_key_cache_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,R9D MOV R14,R8 MOV dword ptr [RBP + -0x2c],ECX MOV R12,RDX MOV R13,RDI MOV ECX,dword ptr [RDI + 0x18] MOV RAX,RDX XOR EDX,EDX DIV RCX MOV RCX,RDX MOVSXD RAX,ESI MOV qword ptr [RBP + -0x38],RAX LAB_0019d9a1: MOV R15D,dword ptr [R13 + 0x18] MOV RAX,R12 XOR EDX,EDX DIV R15 MOV RSI,qword ptr [RBP + -0x38] ADD RAX,RSI MOV EDI,dword ptr [R13 + 0x1c] XOR EDX,EDX DIV RDI MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + RDX*0x8] SUB R15D,ECX CMP EBX,R15D CMOVC R15D,EBX MOV RDX,R12 MOV ECX,dword ptr [RBP + -0x2c] MOV R8,R14 MOV R9D,R15D CALL 0x0019c0e3 TEST EAX,EAX JNZ 0x0019d9f6 MOV EAX,R15D ADD R14,RAX ADD R12,RAX XOR ECX,ECX SUB EBX,R15D JNZ 0x0019d9a1 JMP 0x0019d9fb LAB_0019d9f6: MOV ECX,0x1 LAB_0019d9fb: MOV EAX,ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 partitioned_key_cache_insert (long param_1,int param_2,ulong param_3,int4 param_4,long param_5,uint param_6) { int iVar1; ulong uVar2; uint uVar3; uVar2 = param_3 % (ulong)*(uint *)(param_1 + 0x18); while( true ) { uVar3 = *(uint *)(param_1 + 0x18) - (int)uVar2; if (param_6 < uVar3) { uVar3 = param_6; } iVar1 = simple_key_cache_insert (*(int8 *) (*(long *)(param_1 + 8) + ((param_3 / *(uint *)(param_1 + 0x18) + (long)param_2) % (ulong)*(uint *)(param_1 + 0x1c)) * 8),(long)param_2,param_3,param_4,param_5 ,uVar3); if (iVar1 != 0) break; param_5 = param_5 + (ulong)uVar3; param_3 = param_3 + uVar3; uVar2 = 0; param_6 = param_6 - uVar3; if (param_6 == 0) { return 0; } } return 1; }
65,779
tree_delete
eloqsql/mysys/tree.c
int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg) { int cmp,remove_colour; TREE_ELEMENT *element,***parent, ***org_parent, *nod; if (!tree->with_delete) return 1; /* not allowed */ parent= tree->parents; *parent= &tree->root; element= tree->root; for (;;) { if (element == &null_element) return 1; /* Was not in tree */ if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key)) == 0) break; if (cmp < 0) { *++parent= &element->right; element= element->right; } else { *++parent = &element->left; element= element->left; } } if (element->left == &null_element) { (**parent)=element->right; remove_colour= element->colour; } else if (element->right == &null_element) { (**parent)=element->left; remove_colour= element->colour; } else { org_parent= parent; *++parent= &element->right; nod= element->right; while (nod->left != &null_element) { *++parent= &nod->left; nod= nod->left; } (**parent)=nod->right; /* unlink nod from tree */ remove_colour= nod->colour; org_parent[0][0]=nod; /* put y in place of element */ org_parent[1]= &nod->right; nod->left=element->left; nod->right=element->right; nod->colour=element->colour; } if (remove_colour == BLACK) rb_delete_fixup(tree,parent); if (tree->free) (*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg); tree->allocated-= sizeof(TREE_ELEMENT) + tree->size_of_element + key_size; my_free(element); tree->elements_in_tree--; return 0; }
O0
c
tree_delete: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x278(%rax) jne 0x879b3 movl $0x1, -0x4(%rbp) jmp 0x87cb9 movq -0x10(%rbp), %rax addq $0x8, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) leaq 0x1b1674(%rip), %rax # 0x239050 cmpq %rax, -0x38(%rbp) jne 0x879ee movl $0x1, -0x4(%rbp) jmp 0x87cb9 movq -0x10(%rbp), %rax movq 0x228(%rax), %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0x87a29 movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) jmp 0x87a35 movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movq -0x58(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x18(%rbp), %rdx callq *%rax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x87a51 jmp 0x87aa7 cmpl $0x0, -0x2c(%rbp) jge 0x87a80 movq -0x38(%rbp), %rcx addq $0x8, %rcx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x40(%rbp) movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x87aa2 movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x40(%rbp) movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x879d5 movq -0x38(%rbp), %rax leaq 0x1b159e(%rip), %rcx # 0x239050 cmpq %rcx, (%rax) jne 0x87adb movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx movq -0x40(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax movl %eax, -0x30(%rbp) jmp 0x87bf1 movq -0x38(%rbp), %rax leaq 0x1b156a(%rip), %rcx # 0x239050 cmpq %rcx, 0x8(%rax) jne 0x87b0f movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x40(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax movl %eax, -0x30(%rbp) jmp 0x87bef movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rcx addq $0x8, %rcx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x40(%rbp) movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax leaq 0x1b1507(%rip), %rcx # 0x239050 cmpq %rcx, (%rax) je 0x87b72 movq -0x50(%rbp), %rcx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x40(%rbp) movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) jmp 0x87b3e movq -0x50(%rbp), %rax movq 0x8(%rax), %rcx movq -0x40(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) movq -0x50(%rbp), %rax movl 0x10(%rax), %eax shrl $0x1f, %eax movl %eax, -0x30(%rbp) movq -0x50(%rbp), %rcx movq -0x48(%rbp), %rax movq (%rax), %rax movq %rcx, (%rax) movq -0x50(%rbp), %rcx addq $0x8, %rcx movq -0x48(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %edx shrl $0x1f, %edx movq -0x50(%rbp), %rax movl 0x10(%rax), %ecx andl $0x1, %edx shll $0x1f, %edx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF orl %edx, %ecx movl %ecx, 0x10(%rax) jmp 0x87bf1 cmpl $0x1, -0x30(%rbp) jne 0x87c04 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x87cd0 movq -0x10(%rbp), %rax cmpq $0x0, 0x280(%rax) je 0x87c6b movq -0x10(%rbp), %rax movq 0x280(%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x208(%rax) je 0x87c45 movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x208(%rcx), %ecx addq %rcx, %rax movq %rax, -0x78(%rbp) jmp 0x87c51 movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rax movq -0x78(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x230(%rcx), %rdx movl $0x1, %esi callq *%rax movq -0x10(%rbp), %rax movl 0x210(%rax), %eax movl %eax, %edx addq $0x18, %rdx movl -0x1c(%rbp), %eax addq %rax, %rdx movq -0x10(%rbp), %rax movq 0x220(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x220(%rax) movq -0x38(%rbp), %rdi callq 0x808d0 movq -0x10(%rbp), %rax movl 0x20c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x20c(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
tree_delete: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] cmp byte ptr [rax+278h], 0 jnz short loc_879B3 mov [rbp+var_4], 1 jmp loc_87CB9 loc_879B3: mov rax, [rbp+var_10] add rax, 8 mov [rbp+var_40], rax mov rcx, [rbp+var_10] mov rax, [rbp+var_40] mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax loc_879D5: lea rax, null_element cmp [rbp+var_38], rax jnz short loc_879EE mov [rbp+var_4], 1 jmp loc_87CB9 loc_879EE: mov rax, [rbp+var_10] mov rax, [rax+228h] mov [rbp+var_60], rax mov rax, [rbp+var_28] mov [rbp+var_58], rax mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_87A29 mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_68], rax jmp short loc_87A35 loc_87A29: mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_68], rax loc_87A35: mov rax, [rbp+var_60] mov rdi, [rbp+var_58] mov rsi, [rbp+var_68] mov rdx, [rbp+var_18] call rax mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_87A51 jmp short loc_87AA7 loc_87A51: cmp [rbp+var_2C], 0 jge short loc_87A80 mov rcx, [rbp+var_38] add rcx, 8 mov rax, [rbp+var_40] mov rdx, rax add rdx, 8 mov [rbp+var_40], rdx mov [rax+8], rcx mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_38], rax jmp short loc_87AA2 loc_87A80: mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov rdx, rax add rdx, 8 mov [rbp+var_40], rdx mov [rax+8], rcx mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax loc_87AA2: jmp loc_879D5 loc_87AA7: mov rax, [rbp+var_38] lea rcx, null_element cmp [rax], rcx jnz short loc_87ADB mov rax, [rbp+var_38] mov rcx, [rax+8] mov rax, [rbp+var_40] mov rax, [rax] mov [rax], rcx mov rax, [rbp+var_38] mov eax, [rax+10h] shr eax, 1Fh mov [rbp+var_30], eax jmp loc_87BF1 loc_87ADB: mov rax, [rbp+var_38] lea rcx, null_element cmp [rax+8], rcx jnz short loc_87B0F mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_40] mov rax, [rax] mov [rax], rcx mov rax, [rbp+var_38] mov eax, [rax+10h] shr eax, 1Fh mov [rbp+var_30], eax jmp loc_87BEF loc_87B0F: mov rax, [rbp+var_40] mov [rbp+var_48], rax mov rcx, [rbp+var_38] add rcx, 8 mov rax, [rbp+var_40] mov rdx, rax add rdx, 8 mov [rbp+var_40], rdx mov [rax+8], rcx mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_50], rax loc_87B3E: mov rax, [rbp+var_50] lea rcx, null_element cmp [rax], rcx jz short loc_87B72 mov rcx, [rbp+var_50] mov rax, [rbp+var_40] mov rdx, rax add rdx, 8 mov [rbp+var_40], rdx mov [rax+8], rcx mov rax, [rbp+var_50] mov rax, [rax] mov [rbp+var_50], rax jmp short loc_87B3E loc_87B72: mov rax, [rbp+var_50] mov rcx, [rax+8] mov rax, [rbp+var_40] mov rax, [rax] mov [rax], rcx mov rax, [rbp+var_50] mov eax, [rax+10h] shr eax, 1Fh mov [rbp+var_30], eax mov rcx, [rbp+var_50] mov rax, [rbp+var_48] mov rax, [rax] mov [rax], rcx mov rcx, [rbp+var_50] add rcx, 8 mov rax, [rbp+var_48] mov [rax+8], rcx mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_50] mov [rax], rcx mov rax, [rbp+var_38] mov rcx, [rax+8] mov rax, [rbp+var_50] mov [rax+8], rcx mov rax, [rbp+var_38] mov edx, [rax+10h] shr edx, 1Fh mov rax, [rbp+var_50] mov ecx, [rax+10h] and edx, 1 shl edx, 1Fh and ecx, 7FFFFFFFh or ecx, edx mov [rax+10h], ecx loc_87BEF: jmp short $+2 loc_87BF1: cmp [rbp+var_30], 1 jnz short loc_87C04 mov rdi, [rbp+var_10] mov rsi, [rbp+var_40] call rb_delete_fixup loc_87C04: mov rax, [rbp+var_10] cmp qword ptr [rax+280h], 0 jz short loc_87C6B mov rax, [rbp+var_10] mov rax, [rax+280h] mov [rbp+var_70], rax mov rax, [rbp+var_10] cmp dword ptr [rax+208h], 0 jz short loc_87C45 mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+208h] add rax, rcx mov [rbp+var_78], rax jmp short loc_87C51 loc_87C45: mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_78], rax loc_87C51: mov rax, [rbp+var_70] mov rdi, [rbp+var_78] mov rcx, [rbp+var_10] mov rdx, [rcx+230h] mov esi, 1 call rax loc_87C6B: mov rax, [rbp+var_10] mov eax, [rax+210h] mov edx, eax add rdx, 18h mov eax, [rbp+var_1C] add rdx, rax mov rax, [rbp+var_10] mov rcx, [rax+220h] sub rcx, rdx mov [rax+220h], rcx mov rdi, [rbp+var_38] call my_free mov rax, [rbp+var_10] mov ecx, [rax+20Ch] add ecx, 0FFFFFFFFh mov [rax+20Ch], ecx mov [rbp+var_4], 0 loc_87CB9: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long tree_delete(long long a1, long long a2, unsigned int a3, long long a4) { int v4; // eax _QWORD **v5; // rax _QWORD **v6; // rax _QWORD **v7; // rax _QWORD **v8; // rax void ( *v10)(long long, long long, _QWORD); // [rsp+10h] [rbp-70h] long long ( *v11)(long long, long long, long long); // [rsp+20h] [rbp-60h] _QWORD *i; // [rsp+30h] [rbp-50h] _QWORD **v13; // [rsp+38h] [rbp-48h] _QWORD **v14; // [rsp+40h] [rbp-40h] long long v15; // [rsp+48h] [rbp-38h] int v16; // [rsp+50h] [rbp-30h] if ( *(_BYTE *)(a1 + 632) ) { v14 = (_QWORD **)(a1 + 8); *(_QWORD *)(a1 + 8) = a1; v15 = *(_QWORD *)a1; while ( 1 ) { if ( (_UNKNOWN *)v15 == &null_element ) return 1; v11 = *(long long ( **)(long long, long long, long long))(a1 + 552); v4 = *(_DWORD *)(a1 + 520) ? v11(a4, *(unsigned int *)(a1 + 520) + v15, a2) : v11(a4, *(_QWORD *)(v15 + 24), a2); if ( !v4 ) break; if ( v4 >= 0 ) { v6 = v14++; v6[1] = (_QWORD *)v15; v15 = *(_QWORD *)v15; } else { v5 = v14++; v5[1] = (_QWORD *)(v15 + 8); v15 = *(_QWORD *)(v15 + 8); } } if ( *(_UNKNOWN **)v15 == &null_element ) { **v14 = *(_QWORD *)(v15 + 8); v16 = *(_DWORD *)(v15 + 16) >> 31; } else if ( *(_UNKNOWN **)(v15 + 8) == &null_element ) { **v14 = *(_QWORD *)v15; v16 = *(_DWORD *)(v15 + 16) >> 31; } else { v13 = v14; v7 = v14++; v7[1] = (_QWORD *)(v15 + 8); for ( i = *(_QWORD **)(v15 + 8); (_UNKNOWN *)*i != &null_element; i = (_QWORD *)*i ) { v8 = v14++; v8[1] = i; } **v14 = i[1]; v16 = *((_DWORD *)i + 4) >> 31; **v13 = i; v13[1] = i + 1; *i = *(_QWORD *)v15; i[1] = *(_QWORD *)(v15 + 8); *((_DWORD *)i + 4) = (*(_DWORD *)(v15 + 16) >> 31 << 31) | i[2] & 0x7FFFFFFF; } if ( v16 == 1 ) rb_delete_fixup(a1, v14); if ( *(_QWORD *)(a1 + 640) ) { v10 = *(void ( **)(long long, long long, _QWORD))(a1 + 640); if ( *(_DWORD *)(a1 + 520) ) v10(*(unsigned int *)(a1 + 520) + v15, 1LL, *(_QWORD *)(a1 + 560)); else v10(*(_QWORD *)(v15 + 24), 1LL, *(_QWORD *)(a1 + 560)); } *(_QWORD *)(a1 + 544) -= a3 + *(unsigned int *)(a1 + 528) + 24LL; my_free(v15); --*(_DWORD *)(a1 + 524); return 0; } else { return 1; } }
tree_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x278],0x0 JNZ 0x001879b3 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00187cb9 LAB_001879b3: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_001879d5: LEA RAX,[0x339050] CMP qword ptr [RBP + -0x38],RAX JNZ 0x001879ee MOV dword ptr [RBP + -0x4],0x1 JMP 0x00187cb9 LAB_001879ee: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x228] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x00187a29 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX JMP 0x00187a35 LAB_00187a29: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x68],RAX LAB_00187a35: MOV RAX,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x00187a51 JMP 0x00187aa7 LAB_00187a51: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x00187a80 MOV RCX,qword ptr [RBP + -0x38] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x00187aa2 LAB_00187a80: MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_00187aa2: JMP 0x001879d5 LAB_00187aa7: MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x339050] CMP qword ptr [RAX],RCX JNZ 0x00187adb MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f MOV dword ptr [RBP + -0x30],EAX JMP 0x00187bf1 LAB_00187adb: MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x339050] CMP qword ptr [RAX + 0x8],RCX JNZ 0x00187b0f MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f MOV dword ptr [RBP + -0x30],EAX JMP 0x00187bef LAB_00187b0f: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX MOV RCX,qword ptr [RBP + -0x38] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x50],RAX LAB_00187b3e: MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x339050] CMP qword ptr [RAX],RCX JZ 0x00187b72 MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX JMP 0x00187b3e LAB_00187b72: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x10] SHR EAX,0x1f MOV dword ptr [RBP + -0x30],EAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x50] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RAX + 0x10] SHR EDX,0x1f MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX + 0x10] AND EDX,0x1 SHL EDX,0x1f AND ECX,0x7fffffff OR ECX,EDX MOV dword ptr [RAX + 0x10],ECX LAB_00187bef: JMP 0x00187bf1 LAB_00187bf1: CMP dword ptr [RBP + -0x30],0x1 JNZ 0x00187c04 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00187cd0 LAB_00187c04: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x280],0x0 JZ 0x00187c6b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x280] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x208],0x0 JZ 0x00187c45 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x208] ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX JMP 0x00187c51 LAB_00187c45: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x78],RAX LAB_00187c51: MOV RAX,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x230] MOV ESI,0x1 CALL RAX LAB_00187c6b: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x210] MOV EDX,EAX ADD RDX,0x18 MOV EAX,dword ptr [RBP + -0x1c] ADD RDX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x220] SUB RCX,RDX MOV qword ptr [RAX + 0x220],RCX MOV RDI,qword ptr [RBP + -0x38] CALL 0x001808d0 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x20c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x20c],ECX MOV dword ptr [RBP + -0x4],0x0 LAB_00187cb9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 tree_delete(int8 *param_1,int8 param_2,uint param_3,int8 param_4) { int8 *puVar1; int8 *puVar2; int iVar3; long local_80; long local_70; long *local_58; int8 *local_48; long *local_40; if (*(char *)(param_1 + 0x4f) != '\0') { local_48 = param_1 + 1; *local_48 = param_1; local_40 = (long *)*param_1; while (puVar2 = local_48, local_40 != (long *)null_element) { if (*(int *)(param_1 + 0x41) == 0) { local_70 = local_40[3]; } else { local_70 = (long)local_40 + (ulong)*(uint *)(param_1 + 0x41); } iVar3 = (*(code *)param_1[0x45])(param_4,local_70,param_2); if (iVar3 == 0) { if ((int1 *)*local_40 == null_element) { *(long *)*local_48 = local_40[1]; iVar3 = (int)local_40[2]; } else if ((int1 *)local_40[1] == null_element) { *(long *)*local_48 = *local_40; iVar3 = (int)local_40[2]; } else { local_48[1] = local_40 + 1; puVar1 = local_48; for (local_58 = (long *)local_40[1]; local_48 = puVar1 + 1, (int1 *)*local_58 != null_element; local_58 = (long *)*local_58) { puVar1[2] = local_58; puVar1 = local_48; } *(long *)*local_48 = local_58[1]; iVar3 = (int)local_58[2]; *(long **)*puVar2 = local_58; puVar2[1] = local_58 + 1; *local_58 = *local_40; local_58[1] = local_40[1]; *(uint *)(local_58 + 2) = *(uint *)(local_58 + 2) & 0x7fffffff | *(uint *)(local_40 + 2) & 0x80000000; } if (iVar3 < 0) { rb_delete_fixup(param_1,local_48); } if (param_1[0x50] != 0) { if (*(int *)(param_1 + 0x41) == 0) { local_80 = local_40[3]; } else { local_80 = (long)local_40 + (ulong)*(uint *)(param_1 + 0x41); } (*(code *)param_1[0x50])(local_80,1,param_1[0x46]); } param_1[0x44] = param_1[0x44] - ((ulong)*(uint *)(param_1 + 0x42) + 0x18 + (ulong)param_3); my_free(local_40); *(int *)((long)param_1 + 0x20c) = *(int *)((long)param_1 + 0x20c) + -1; return 0; } if (iVar3 < 0) { local_48[1] = local_40 + 1; local_40 = (long *)local_40[1]; } else { local_48[1] = local_40; local_40 = (long *)*local_40; } local_48 = local_48 + 1; } } return 1; }
65,780
tree_delete
eloqsql/mysys/tree.c
int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg) { int cmp,remove_colour; TREE_ELEMENT *element,***parent, ***org_parent, *nod; if (!tree->with_delete) return 1; /* not allowed */ parent= tree->parents; *parent= &tree->root; element= tree->root; for (;;) { if (element == &null_element) return 1; /* Was not in tree */ if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key)) == 0) break; if (cmp < 0) { *++parent= &element->right; element= element->right; } else { *++parent = &element->left; element= element->left; } } if (element->left == &null_element) { (**parent)=element->right; remove_colour= element->colour; } else if (element->right == &null_element) { (**parent)=element->left; remove_colour= element->colour; } else { org_parent= parent; *++parent= &element->right; nod= element->right; while (nod->left != &null_element) { *++parent= &nod->left; nod= nod->left; } (**parent)=nod->right; /* unlink nod from tree */ remove_colour= nod->colour; org_parent[0][0]=nod; /* put y in place of element */ org_parent[1]= &nod->right; nod->left=element->left; nod->right=element->right; nod->colour=element->colour; } if (remove_colour == BLACK) rb_delete_fixup(tree,parent); if (tree->free) (*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg); tree->allocated-= sizeof(TREE_ELEMENT) + tree->size_of_element + key_size; my_free(element); tree->elements_in_tree--; return 0; }
O3
c
tree_delete: movl $0x1, %eax cmpb $0x0, 0x278(%rdi) je 0x5f41d pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rdi, %rcx movq %rdi, 0x8(%rdi) movq (%rdi), %r15 leaq 0x2d0e2e(%rip), %rbx # 0x32ff00 cmpq %rbx, %r15 je 0x5f40f movq %rsi, %r14 movl %edx, -0x34(%rbp) leaq 0x10(%rcx), %r12 movq %rcx, -0x30(%rbp) movl 0x208(%rcx), %esi testq %rsi, %rsi je 0x5f0f9 addq %r15, %rsi jmp 0x5f0fd movq 0x18(%r15), %rsi movq %r13, %rdi movq %r14, %rdx callq *0x228(%rcx) testl %eax, %eax je 0x5f132 shrl $0x1f, %eax leaq (%r15,%rax,8), %rax movq %rax, (%r12) movq (%rax), %r15 addq $0x8, %r12 cmpq %rbx, %r15 movq -0x30(%rbp), %rcx jne 0x5f0e9 movl $0x1, %eax jmp 0x5f40f movq (%r15), %rcx movq 0x8(%r15), %rdx leaq -0x8(%r12), %rax cmpq %rbx, %rcx movq -0x30(%rbp), %r9 je 0x5f174 cmpq %rbx, %rdx je 0x5f17c leaq 0x8(%r15), %rdx movq %rdx, (%r12) movq (%rdx), %rcx cmpq %rbx, (%rcx) je 0x5f188 movq %r12, %rax movq %rcx, %rdx movq %rcx, 0x8(%rax) addq $0x8, %rax movq (%rcx), %rcx cmpq %rbx, (%rcx) jne 0x5f15f jmp 0x5f18b movq (%rax), %rcx movq %rdx, (%rcx) jmp 0x5f182 movq (%rax), %rdx movq %rcx, (%rdx) movl 0x10(%r15), %edx jmp 0x5f1c9 movq %r12, %rax leaq 0x8(%rcx), %rsi movq 0x8(%rcx), %rdi movq %rdi, (%rdx) movl 0x10(%rcx), %edx movq -0x8(%r12), %rdi movq %rcx, (%rdi) movq %rsi, (%r12) movq (%r15), %rsi movq %rsi, (%rcx) movq 0x8(%r15), %rsi movq %rsi, 0x8(%rcx) movl $0x80000000, %esi # imm = 0x80000000 andl 0x10(%r15), %esi movl $0x7fffffff, %edi # imm = 0x7FFFFFFF andl 0x10(%rcx), %edi orl %esi, %edi movl %edi, 0x10(%rcx) testl %edx, %edx movl -0x34(%rbp), %r14d jns 0x5f3a4 movq (%rax), %rcx movq (%rcx), %rsi cmpq (%r9), %rsi je 0x5f2d0 cmpl $0x0, 0x10(%rsi) jns 0x5f2d0 movq -0x8(%rax), %rcx movq (%rcx), %rcx movq (%rcx), %rdx cmpq %rdx, %rsi je 0x5f25c movl 0x10(%rdx), %esi testl %esi, %esi js 0x5f23c orl $0x80000000, %esi # imm = 0x80000000 movl %esi, 0x10(%rdx) andb $0x7f, 0x13(%rcx) movq -0x8(%rax), %rsi movq (%rcx), %rdi movq 0x8(%rdi), %r8 movq %r8, (%rcx) movq %rdi, (%rsi) movq %rcx, 0x8(%rdi) addq $0x8, %rdx movq %rdx, (%rax) leaq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) addq $0x8, %rax movq (%rcx), %rdx movq (%rdx), %r8 movq 0x8(%rdx), %rsi movl 0x10(%rsi), %edi movl 0x10(%r8), %r8d testl %edi, %edi jns 0x5f2d8 testl %r8d, %r8d js 0x5f2b7 jmp 0x5f2fe movq 0x8(%rcx), %rdx movl 0x10(%rdx), %esi testl %esi, %esi js 0x5f298 orl $0x80000000, %esi # imm = 0x80000000 movl %esi, 0x10(%rdx) andb $0x7f, 0x13(%rcx) movq -0x8(%rax), %rsi movq 0x8(%rcx), %rdi movq (%rdi), %r8 movq %r8, 0x8(%rcx) movq %rdi, (%rsi) movq %rcx, (%rdi) movq %rdx, (%rax) movq %rcx, 0x8(%rax) addq $0x8, %rax movq 0x8(%rcx), %rdx movq (%rdx), %rsi movq 0x8(%rdx), %r8 movl 0x10(%rsi), %edi movl 0x10(%r8), %r8d testl %edi, %edi jns 0x5f33a testl %r8d, %r8d jns 0x5f362 andb $0x7f, 0x13(%rdx) addq $-0x8, %rax movq %rcx, %rsi cmpq (%r9), %rcx jne 0x5f1e4 jmp 0x5f3a0 movq %rsi, %rcx jmp 0x5f3a0 testl %r8d, %r8d jns 0x5f2fe orl $0x80000000, %edi # imm = 0x80000000 movl %edi, 0x10(%rsi) andb $0x7f, 0x13(%rdx) movq 0x8(%rdx), %rsi movq (%rsi), %rdi movq %rdi, 0x8(%rdx) movq %rsi, (%rcx) movq %rdx, (%rsi) movq (%rcx), %rdx movl $0x80000000, %esi # imm = 0x80000000 movl 0x10(%rcx), %edi andl %esi, %edi movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF andl 0x10(%rdx), %r8d orl %edi, %r8d movl %r8d, 0x10(%rdx) orb $-0x80, 0x13(%rcx) movq (%rdx), %rdx orl %esi, 0x10(%rdx) movq -0x8(%rax), %rdx movq (%rcx), %rsi leaq 0x8(%rsi), %rax movq 0x8(%rsi), %rdi movq %rdi, (%rcx) movq %rsi, (%rdx) jmp 0x5f39a testl %r8d, %r8d jns 0x5f362 orl $0x80000000, %edi # imm = 0x80000000 movl %edi, 0x10(%rsi) andb $0x7f, 0x13(%rdx) movq (%rdx), %rsi movq 0x8(%rsi), %rdi movq %rdi, (%rdx) movq %rsi, 0x8(%rcx) movq %rdx, 0x8(%rsi) movq 0x8(%rcx), %rdx movl $0x80000000, %esi # imm = 0x80000000 movl 0x10(%rcx), %edi andl %esi, %edi movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF andl 0x10(%rdx), %r8d orl %edi, %r8d movl %r8d, 0x10(%rdx) orb $-0x80, 0x13(%rcx) movq 0x8(%rdx), %rdx orl %esi, 0x10(%rdx) movq -0x8(%rax), %rdx movq 0x8(%rcx), %rax movq (%rax), %rsi movq %rsi, 0x8(%rcx) movq %rax, (%rdx) movq %rcx, (%rax) movq (%r9), %rcx orb $-0x80, 0x13(%rcx) movq 0x280(%r9), %rax testq %rax, %rax je 0x5f3d7 movl 0x208(%r9), %edi testq %rdi, %rdi je 0x5f3c1 addq %r15, %rdi jmp 0x5f3c5 movq 0x18(%r15), %rdi movq 0x230(%r9), %rdx movl $0x1, %esi callq *%rax movq -0x30(%rbp), %r9 movl 0x210(%r9), %eax movl %r14d, %ecx addq %rax, %rcx movq 0x220(%r9), %rax negq %rcx addq %rcx, %rax addq $-0x18, %rax movq %rax, 0x220(%r9) movq %r15, %rdi movq %r9, %rbx callq 0x5a5f2 decl 0x20c(%rbx) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tree_delete: mov eax, 1 cmp byte ptr [rdi+278h], 0 jz locret_5F41D push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rcx mov rcx, rdi mov [rdi+8], rdi mov r15, [rdi] lea rbx, null_element cmp r15, rbx jz loc_5F40F mov r14, rsi mov [rbp-34h], edx lea r12, [rcx+10h] mov [rbp-30h], rcx loc_5F0E9: mov esi, [rcx+208h] test rsi, rsi jz short loc_5F0F9 add rsi, r15 jmp short loc_5F0FD loc_5F0F9: mov rsi, [r15+18h] loc_5F0FD: mov rdi, r13 mov rdx, r14 call qword ptr [rcx+228h] test eax, eax jz short loc_5F132 shr eax, 1Fh lea rax, [r15+rax*8] mov [r12], rax mov r15, [rax] add r12, 8 cmp r15, rbx mov rcx, [rbp-30h] jnz short loc_5F0E9 mov eax, 1 jmp loc_5F40F loc_5F132: mov rcx, [r15] mov rdx, [r15+8] lea rax, [r12-8] cmp rcx, rbx mov r9, [rbp-30h] jz short loc_5F174 cmp rdx, rbx jz short loc_5F17C lea rdx, [r15+8] mov [r12], rdx mov rcx, [rdx] cmp [rcx], rbx jz short loc_5F188 mov rax, r12 loc_5F15F: mov rdx, rcx mov [rax+8], rcx add rax, 8 mov rcx, [rcx] cmp [rcx], rbx jnz short loc_5F15F jmp short loc_5F18B loc_5F174: mov rcx, [rax] mov [rcx], rdx jmp short loc_5F182 loc_5F17C: mov rdx, [rax] mov [rdx], rcx loc_5F182: mov edx, [r15+10h] jmp short loc_5F1C9 loc_5F188: mov rax, r12 loc_5F18B: lea rsi, [rcx+8] mov rdi, [rcx+8] mov [rdx], rdi mov edx, [rcx+10h] mov rdi, [r12-8] mov [rdi], rcx mov [r12], rsi mov rsi, [r15] mov [rcx], rsi mov rsi, [r15+8] mov [rcx+8], rsi mov esi, 80000000h and esi, [r15+10h] mov edi, 7FFFFFFFh and edi, [rcx+10h] or edi, esi mov [rcx+10h], edi loc_5F1C9: test edx, edx mov r14d, [rbp-34h] jns loc_5F3A4 mov rcx, [rax] mov rsi, [rcx] cmp rsi, [r9] jz loc_5F2D0 loc_5F1E4: cmp dword ptr [rsi+10h], 0 jns loc_5F2D0 mov rcx, [rax-8] mov rcx, [rcx] mov rdx, [rcx] cmp rsi, rdx jz short loc_5F25C mov esi, [rdx+10h] test esi, esi js short loc_5F23C or esi, 80000000h mov [rdx+10h], esi and byte ptr [rcx+13h], 7Fh mov rsi, [rax-8] mov rdi, [rcx] mov r8, [rdi+8] mov [rcx], r8 mov [rsi], rdi mov [rdi+8], rcx add rdx, 8 mov [rax], rdx lea rdx, [rcx+8] mov [rax+8], rdx add rax, 8 mov rdx, [rcx] loc_5F23C: mov r8, [rdx] mov rsi, [rdx+8] mov edi, [rsi+10h] mov r8d, [r8+10h] test edi, edi jns loc_5F2D8 test r8d, r8d js short loc_5F2B7 jmp loc_5F2FE loc_5F25C: mov rdx, [rcx+8] mov esi, [rdx+10h] test esi, esi js short loc_5F298 or esi, 80000000h mov [rdx+10h], esi and byte ptr [rcx+13h], 7Fh mov rsi, [rax-8] mov rdi, [rcx+8] mov r8, [rdi] mov [rcx+8], r8 mov [rsi], rdi mov [rdi], rcx mov [rax], rdx mov [rax+8], rcx add rax, 8 mov rdx, [rcx+8] loc_5F298: mov rsi, [rdx] mov r8, [rdx+8] mov edi, [rsi+10h] mov r8d, [r8+10h] test edi, edi jns loc_5F33A test r8d, r8d jns loc_5F362 loc_5F2B7: and byte ptr [rdx+13h], 7Fh add rax, 0FFFFFFFFFFFFFFF8h mov rsi, rcx cmp rcx, [r9] jnz loc_5F1E4 jmp loc_5F3A0 loc_5F2D0: mov rcx, rsi jmp loc_5F3A0 loc_5F2D8: test r8d, r8d jns short loc_5F2FE or edi, 80000000h mov [rsi+10h], edi and byte ptr [rdx+13h], 7Fh mov rsi, [rdx+8] mov rdi, [rsi] mov [rdx+8], rdi mov [rcx], rsi mov [rsi], rdx mov rdx, [rcx] loc_5F2FE: mov esi, 80000000h mov edi, [rcx+10h] and edi, esi mov r8d, 7FFFFFFFh and r8d, [rdx+10h] or r8d, edi mov [rdx+10h], r8d or byte ptr [rcx+13h], 80h mov rdx, [rdx] or [rdx+10h], esi mov rdx, [rax-8] mov rsi, [rcx] lea rax, [rsi+8] mov rdi, [rsi+8] mov [rcx], rdi mov [rdx], rsi jmp short loc_5F39A loc_5F33A: test r8d, r8d jns short loc_5F362 or edi, 80000000h mov [rsi+10h], edi and byte ptr [rdx+13h], 7Fh mov rsi, [rdx] mov rdi, [rsi+8] mov [rdx], rdi mov [rcx+8], rsi mov [rsi+8], rdx mov rdx, [rcx+8] loc_5F362: mov esi, 80000000h mov edi, [rcx+10h] and edi, esi mov r8d, 7FFFFFFFh and r8d, [rdx+10h] or r8d, edi mov [rdx+10h], r8d or byte ptr [rcx+13h], 80h mov rdx, [rdx+8] or [rdx+10h], esi mov rdx, [rax-8] mov rax, [rcx+8] mov rsi, [rax] mov [rcx+8], rsi mov [rdx], rax loc_5F39A: mov [rax], rcx mov rcx, [r9] loc_5F3A0: or byte ptr [rcx+13h], 80h loc_5F3A4: mov rax, [r9+280h] test rax, rax jz short loc_5F3D7 mov edi, [r9+208h] test rdi, rdi jz short loc_5F3C1 add rdi, r15 jmp short loc_5F3C5 loc_5F3C1: mov rdi, [r15+18h] loc_5F3C5: mov rdx, [r9+230h] mov esi, 1 call rax mov r9, [rbp-30h] loc_5F3D7: mov eax, [r9+210h] mov ecx, r14d add rcx, rax mov rax, [r9+220h] neg rcx add rax, rcx add rax, 0FFFFFFFFFFFFFFE8h mov [r9+220h], rax mov rdi, r15 mov rbx, r9 call my_free dec dword ptr [rbx+20Ch] xor eax, eax loc_5F40F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_5F41D: retn
long long tree_delete(char **a1, long long a2, unsigned int a3, long long a4) { long long result; // rax char **v6; // rcx char *v7; // r15 void ***i; // r12 char *v10; // rsi unsigned int v11; // eax void **v12; // rax void *v13; // rdx void ***v14; // rax char **v15; // r9 _QWORD *v16; // rdx char *v17; // rcx int v18; // edx int *v19; // rsi int *v20; // rcx long long v21; // rdx int v22; // esi _QWORD *v23; // rsi long long v24; // rdi long long v25; // rsi int v26; // edi int v27; // r8d int v28; // esi int ***v29; // rsi int **v30; // rdi int v31; // edi int v32; // r8d _QWORD *v33; // rsi _QWORD *v34; // rdx long long v35; // rsi int **v36; // rax _QWORD *v37; // rsi int ***v38; // rdx char *v39; // rax char *v40; // rdi char **v41; // rbx result = 1LL; if ( !*((_BYTE *)a1 + 632) ) return result; v6 = a1; a1[1] = (char *)a1; v7 = *a1; if ( *a1 == (char *)&null_element ) return result; for ( i = (void ***)(a1 + 2); ; ++i ) { v10 = *((_DWORD *)v6 + 130) ? &v7[*((unsigned int *)v6 + 130)] : (char *)*((_QWORD *)v7 + 3); v11 = ((long long ( *)(long long, char *, long long))v6[69])(a4, v10, a2); if ( !v11 ) break; v12 = (void **)&v7[8 * (v11 >> 31)]; *i = v12; v7 = (char *)*v12; v6 = a1; if ( *v12 == &null_element ) return 1LL; } v13 = (void *)*((_QWORD *)v7 + 1); v14 = i - 1; v15 = a1; if ( *(_UNKNOWN **)v7 == &null_element ) { **v14 = v13; } else { if ( v13 != &null_element ) { v16 = v7 + 8; *i = (void **)(v7 + 8); v17 = (char *)*((_QWORD *)v7 + 1); if ( *(_UNKNOWN **)v17 == &null_element ) { v14 = i; } else { v14 = i; do { v16 = v17; v14[1] = (void **)v17; ++v14; v17 = *(char **)v17; } while ( *(_UNKNOWN **)v17 != &null_element ); } *v16 = *((_QWORD *)v17 + 1); v18 = *((_DWORD *)v17 + 4); **(i - 1) = v17; *i = (void **)(v17 + 8); *(_QWORD *)v17 = *(_QWORD *)v7; *((_QWORD *)v17 + 1) = *((_QWORD *)v7 + 1); *((_DWORD *)v17 + 4) = *((_DWORD *)v7 + 4) & 0x80000000 | *((_DWORD *)v17 + 4) & 0x7FFFFFFF; goto LABEL_21; } **v14 = *(void **)v7; } v18 = *((_DWORD *)v7 + 4); LABEL_21: if ( v18 < 0 ) { v19 = (int *)**v14; if ( v19 != (int *)*a1 ) { while ( v19[4] < 0 ) { v20 = (int *)**(v14 - 1); v21 = *(_QWORD *)v20; if ( v19 == *(int **)v20 ) { v21 = *((_QWORD *)v20 + 1); v28 = *(_DWORD *)(v21 + 16); if ( v28 >= 0 ) { *(_DWORD *)(v21 + 16) = v28 | 0x80000000; *((_BYTE *)v20 + 19) &= ~0x80u; v29 = (int ***)*(v14 - 1); v30 = (int **)*((_QWORD *)v20 + 1); *((_QWORD *)v20 + 1) = *v30; *v29 = v30; *v30 = v20; *v14 = (void **)v21; v14[1] = (void **)v20; ++v14; v21 = *((_QWORD *)v20 + 1); } v31 = *(_DWORD *)(*(_QWORD *)v21 + 16LL); v32 = *(_DWORD *)(*(_QWORD *)(v21 + 8) + 16LL); if ( v31 >= 0 ) { if ( v32 < 0 ) { *(_DWORD *)(*(_QWORD *)v21 + 16LL) = v31 | 0x80000000; *(_BYTE *)(v21 + 19) &= ~0x80u; v37 = *(_QWORD **)v21; *(_QWORD *)v21 = *(_QWORD *)(*(_QWORD *)v21 + 8LL); *((_QWORD *)v20 + 1) = v37; v37[1] = v21; v21 = *((_QWORD *)v20 + 1); } LABEL_42: *(_DWORD *)(v21 + 16) = v20[4] & 0x80000000 | *(_DWORD *)(v21 + 16) & 0x7FFFFFFF; *((_BYTE *)v20 + 19) |= 0x80u; *(_DWORD *)(*(_QWORD *)(v21 + 8) + 16LL) |= 0x80000000; v38 = (int ***)*(v14 - 1); v36 = (int **)*((_QWORD *)v20 + 1); *((_QWORD *)v20 + 1) = *v36; *v38 = v36; LABEL_43: *v36 = v20; v20 = (int *)*a1; goto LABEL_44; } if ( v32 >= 0 ) goto LABEL_42; } else { v22 = *(_DWORD *)(v21 + 16); if ( v22 >= 0 ) { *(_DWORD *)(v21 + 16) = v22 | 0x80000000; *((_BYTE *)v20 + 19) &= ~0x80u; v23 = *(v14 - 1); v24 = *(_QWORD *)v20; *(_QWORD *)v20 = *(_QWORD *)(*(_QWORD *)v20 + 8LL); *v23 = v24; *(_QWORD *)(v24 + 8) = v20; *v14 = (void **)(v21 + 8); v14[1] = (void **)(v20 + 2); ++v14; v21 = *(_QWORD *)v20; } v25 = *(_QWORD *)(v21 + 8); v26 = *(_DWORD *)(v25 + 16); v27 = *(_DWORD *)(*(_QWORD *)v21 + 16LL); if ( v26 >= 0 ) { if ( v27 < 0 ) { *(_DWORD *)(v25 + 16) = v26 | 0x80000000; *(_BYTE *)(v21 + 19) &= ~0x80u; v33 = *(_QWORD **)(v21 + 8); *(_QWORD *)(v21 + 8) = *v33; *(_QWORD *)v20 = v33; *v33 = v21; v21 = *(_QWORD *)v20; } LABEL_39: *(_DWORD *)(v21 + 16) = v20[4] & 0x80000000 | *(_DWORD *)(v21 + 16) & 0x7FFFFFFF; *((_BYTE *)v20 + 19) |= 0x80u; *(_DWORD *)(*(_QWORD *)v21 + 16LL) |= 0x80000000; v34 = *(v14 - 1); v35 = *(_QWORD *)v20; v36 = (int **)(*(_QWORD *)v20 + 8LL); *(_QWORD *)v20 = *v36; *v34 = v35; goto LABEL_43; } if ( v27 >= 0 ) goto LABEL_39; } *(_BYTE *)(v21 + 19) &= ~0x80u; --v14; v19 = v20; if ( v20 == (int *)*a1 ) goto LABEL_44; } } v20 = v19; LABEL_44: *((_BYTE *)v20 + 19) |= 0x80u; } v39 = a1[80]; if ( v39 ) { if ( *((_DWORD *)a1 + 130) ) v40 = &v7[*((unsigned int *)a1 + 130)]; else v40 = (char *)*((_QWORD *)v7 + 3); ((void ( *)(char *, long long, char *))v39)(v40, 1LL, a1[70]); v15 = a1; } v15[68] = &v15[68][-*((unsigned int *)v15 + 132) - (unsigned long long)a3 - 24]; v41 = v15; my_free((long long)v7); --*((_DWORD *)v41 + 131); return 0LL; }
tree_delete: MOV EAX,0x1 CMP byte ptr [RDI + 0x278],0x0 JZ 0x0015f41d PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RCX MOV RCX,RDI MOV qword ptr [RDI + 0x8],RDI MOV R15,qword ptr [RDI] LEA RBX,[0x42ff00] CMP R15,RBX JZ 0x0015f40f MOV R14,RSI MOV dword ptr [RBP + -0x34],EDX LEA R12,[RCX + 0x10] MOV qword ptr [RBP + -0x30],RCX LAB_0015f0e9: MOV ESI,dword ptr [RCX + 0x208] TEST RSI,RSI JZ 0x0015f0f9 ADD RSI,R15 JMP 0x0015f0fd LAB_0015f0f9: MOV RSI,qword ptr [R15 + 0x18] LAB_0015f0fd: MOV RDI,R13 MOV RDX,R14 CALL qword ptr [RCX + 0x228] TEST EAX,EAX JZ 0x0015f132 SHR EAX,0x1f LEA RAX,[R15 + RAX*0x8] MOV qword ptr [R12],RAX MOV R15,qword ptr [RAX] ADD R12,0x8 CMP R15,RBX MOV RCX,qword ptr [RBP + -0x30] JNZ 0x0015f0e9 MOV EAX,0x1 JMP 0x0015f40f LAB_0015f132: MOV RCX,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RAX,[R12 + -0x8] CMP RCX,RBX MOV R9,qword ptr [RBP + -0x30] JZ 0x0015f174 CMP RDX,RBX JZ 0x0015f17c LEA RDX,[R15 + 0x8] MOV qword ptr [R12],RDX MOV RCX,qword ptr [RDX] CMP qword ptr [RCX],RBX JZ 0x0015f188 MOV RAX,R12 LAB_0015f15f: MOV RDX,RCX MOV qword ptr [RAX + 0x8],RCX ADD RAX,0x8 MOV RCX,qword ptr [RCX] CMP qword ptr [RCX],RBX JNZ 0x0015f15f JMP 0x0015f18b LAB_0015f174: MOV RCX,qword ptr [RAX] MOV qword ptr [RCX],RDX JMP 0x0015f182 LAB_0015f17c: MOV RDX,qword ptr [RAX] MOV qword ptr [RDX],RCX LAB_0015f182: MOV EDX,dword ptr [R15 + 0x10] JMP 0x0015f1c9 LAB_0015f188: MOV RAX,R12 LAB_0015f18b: LEA RSI,[RCX + 0x8] MOV RDI,qword ptr [RCX + 0x8] MOV qword ptr [RDX],RDI MOV EDX,dword ptr [RCX + 0x10] MOV RDI,qword ptr [R12 + -0x8] MOV qword ptr [RDI],RCX MOV qword ptr [R12],RSI MOV RSI,qword ptr [R15] MOV qword ptr [RCX],RSI MOV RSI,qword ptr [R15 + 0x8] MOV qword ptr [RCX + 0x8],RSI MOV ESI,0x80000000 AND ESI,dword ptr [R15 + 0x10] MOV EDI,0x7fffffff AND EDI,dword ptr [RCX + 0x10] OR EDI,ESI MOV dword ptr [RCX + 0x10],EDI LAB_0015f1c9: TEST EDX,EDX MOV R14D,dword ptr [RBP + -0x34] JNS 0x0015f3a4 MOV RCX,qword ptr [RAX] MOV RSI,qword ptr [RCX] CMP RSI,qword ptr [R9] JZ 0x0015f2d0 LAB_0015f1e4: CMP dword ptr [RSI + 0x10],0x0 JNS 0x0015f2d0 MOV RCX,qword ptr [RAX + -0x8] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX] CMP RSI,RDX JZ 0x0015f25c MOV ESI,dword ptr [RDX + 0x10] TEST ESI,ESI JS 0x0015f23c OR ESI,0x80000000 MOV dword ptr [RDX + 0x10],ESI AND byte ptr [RCX + 0x13],0x7f MOV RSI,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RCX] MOV R8,qword ptr [RDI + 0x8] MOV qword ptr [RCX],R8 MOV qword ptr [RSI],RDI MOV qword ptr [RDI + 0x8],RCX ADD RDX,0x8 MOV qword ptr [RAX],RDX LEA RDX,[RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX ADD RAX,0x8 MOV RDX,qword ptr [RCX] LAB_0015f23c: MOV R8,qword ptr [RDX] MOV RSI,qword ptr [RDX + 0x8] MOV EDI,dword ptr [RSI + 0x10] MOV R8D,dword ptr [R8 + 0x10] TEST EDI,EDI JNS 0x0015f2d8 TEST R8D,R8D JS 0x0015f2b7 JMP 0x0015f2fe LAB_0015f25c: MOV RDX,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RDX + 0x10] TEST ESI,ESI JS 0x0015f298 OR ESI,0x80000000 MOV dword ptr [RDX + 0x10],ESI AND byte ptr [RCX + 0x13],0x7f MOV RSI,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV R8,qword ptr [RDI] MOV qword ptr [RCX + 0x8],R8 MOV qword ptr [RSI],RDI MOV qword ptr [RDI],RCX MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],RCX ADD RAX,0x8 MOV RDX,qword ptr [RCX + 0x8] LAB_0015f298: MOV RSI,qword ptr [RDX] MOV R8,qword ptr [RDX + 0x8] MOV EDI,dword ptr [RSI + 0x10] MOV R8D,dword ptr [R8 + 0x10] TEST EDI,EDI JNS 0x0015f33a TEST R8D,R8D JNS 0x0015f362 LAB_0015f2b7: AND byte ptr [RDX + 0x13],0x7f ADD RAX,-0x8 MOV RSI,RCX CMP RCX,qword ptr [R9] JNZ 0x0015f1e4 JMP 0x0015f3a0 LAB_0015f2d0: MOV RCX,RSI JMP 0x0015f3a0 LAB_0015f2d8: TEST R8D,R8D JNS 0x0015f2fe OR EDI,0x80000000 MOV dword ptr [RSI + 0x10],EDI AND byte ptr [RDX + 0x13],0x7f MOV RSI,qword ptr [RDX + 0x8] MOV RDI,qword ptr [RSI] MOV qword ptr [RDX + 0x8],RDI MOV qword ptr [RCX],RSI MOV qword ptr [RSI],RDX MOV RDX,qword ptr [RCX] LAB_0015f2fe: MOV ESI,0x80000000 MOV EDI,dword ptr [RCX + 0x10] AND EDI,ESI MOV R8D,0x7fffffff AND R8D,dword ptr [RDX + 0x10] OR R8D,EDI MOV dword ptr [RDX + 0x10],R8D OR byte ptr [RCX + 0x13],0x80 MOV RDX,qword ptr [RDX] OR dword ptr [RDX + 0x10],ESI MOV RDX,qword ptr [RAX + -0x8] MOV RSI,qword ptr [RCX] LEA RAX,[RSI + 0x8] MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RCX],RDI MOV qword ptr [RDX],RSI JMP 0x0015f39a LAB_0015f33a: TEST R8D,R8D JNS 0x0015f362 OR EDI,0x80000000 MOV dword ptr [RSI + 0x10],EDI AND byte ptr [RDX + 0x13],0x7f MOV RSI,qword ptr [RDX] MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RDX],RDI MOV qword ptr [RCX + 0x8],RSI MOV qword ptr [RSI + 0x8],RDX MOV RDX,qword ptr [RCX + 0x8] LAB_0015f362: MOV ESI,0x80000000 MOV EDI,dword ptr [RCX + 0x10] AND EDI,ESI MOV R8D,0x7fffffff AND R8D,dword ptr [RDX + 0x10] OR R8D,EDI MOV dword ptr [RDX + 0x10],R8D OR byte ptr [RCX + 0x13],0x80 MOV RDX,qword ptr [RDX + 0x8] OR dword ptr [RDX + 0x10],ESI MOV RDX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RCX + 0x8] MOV RSI,qword ptr [RAX] MOV qword ptr [RCX + 0x8],RSI MOV qword ptr [RDX],RAX LAB_0015f39a: MOV qword ptr [RAX],RCX MOV RCX,qword ptr [R9] LAB_0015f3a0: OR byte ptr [RCX + 0x13],0x80 LAB_0015f3a4: MOV RAX,qword ptr [R9 + 0x280] TEST RAX,RAX JZ 0x0015f3d7 MOV EDI,dword ptr [R9 + 0x208] TEST RDI,RDI JZ 0x0015f3c1 ADD RDI,R15 JMP 0x0015f3c5 LAB_0015f3c1: MOV RDI,qword ptr [R15 + 0x18] LAB_0015f3c5: MOV RDX,qword ptr [R9 + 0x230] MOV ESI,0x1 CALL RAX MOV R9,qword ptr [RBP + -0x30] LAB_0015f3d7: MOV EAX,dword ptr [R9 + 0x210] MOV ECX,R14D ADD RCX,RAX MOV RAX,qword ptr [R9 + 0x220] NEG RCX ADD RAX,RCX ADD RAX,-0x18 MOV qword ptr [R9 + 0x220],RAX MOV RDI,R15 MOV RBX,R9 CALL 0x0015a5f2 DEC dword ptr [RBX + 0x20c] XOR EAX,EAX LAB_0015f40f: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0015f41d: RET
int8 tree_delete(long *param_1,int8 param_2,uint param_3,int8 param_4) { int iVar1; int8 *puVar2; uint uVar3; long *plVar4; long *plVar5; long *plVar6; long *plVar7; long lVar8; long *plVar9; if ((char)param_1[0x4f] == '\0') { return 1; } param_1[1] = (long)param_1; plVar9 = (long *)*param_1; if (plVar9 == (long *)null_element) { return 1; } plVar6 = param_1 + 2; while( true ) { if ((ulong)*(uint *)(param_1 + 0x41) == 0) { lVar8 = plVar9[3]; } else { lVar8 = (ulong)*(uint *)(param_1 + 0x41) + (long)plVar9; } uVar3 = (*(code *)param_1[0x45])(param_4,lVar8,param_2); if (uVar3 == 0) break; *plVar6 = (long)(plVar9 + (uVar3 >> 0x1f)); plVar9 = (long *)plVar9[uVar3 >> 0x1f]; plVar6 = plVar6 + 1; if (plVar9 == (long *)null_element) { return 1; } } plVar4 = plVar6 + -1; if ((int1 *)*plVar9 == null_element) { *(int1 **)*plVar4 = (int1 *)plVar9[1]; } else { if ((int1 *)plVar9[1] != null_element) { plVar7 = plVar9 + 1; *plVar6 = (long)plVar7; plVar5 = (long *)*plVar7; plVar4 = plVar6; if ((int1 *)*plVar5 != null_element) { do { plVar7 = plVar5; plVar4[1] = (long)plVar7; plVar4 = plVar4 + 1; plVar5 = (long *)*plVar7; } while ((int1 *)*plVar5 != null_element); } *plVar7 = plVar5[1]; iVar1 = (int)plVar5[2]; *(long **)plVar6[-1] = plVar5; *plVar6 = (long)(plVar5 + 1); *plVar5 = *plVar9; plVar5[1] = plVar9[1]; *(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar9 + 2) & 0x80000000; goto LAB_0015f1c9; } *(int1 **)*plVar4 = (int1 *)*plVar9; } iVar1 = (int)plVar9[2]; LAB_0015f1c9: if (iVar1 < 0) { plVar6 = *(long **)*plVar4; plVar7 = plVar6; if (plVar6 != (long *)*param_1) { do { plVar6 = plVar7; if (-1 < (int)plVar7[2]) break; plVar6 = *(long **)plVar4[-1]; plVar5 = (long *)*plVar6; if (plVar7 == plVar5) { plVar5 = (long *)plVar6[1]; if (-1 < (int)*(uint *)(plVar5 + 2)) { *(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) | 0x80000000; *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f; puVar2 = (int8 *)plVar4[-1]; plVar7 = (long *)plVar6[1]; plVar6[1] = *plVar7; *puVar2 = plVar7; *plVar7 = (long)plVar6; *plVar4 = (long)plVar5; plVar4[1] = (long)plVar6; plVar4 = plVar4 + 1; plVar5 = (long *)plVar6[1]; } uVar3 = *(uint *)(*plVar5 + 0x10); if ((int)uVar3 < 0) { if (*(int *)(plVar5[1] + 0x10) < 0) goto LAB_0015f2b7; } else if (*(int *)(plVar5[1] + 0x10) < 0) { *(uint *)(*plVar5 + 0x10) = uVar3 | 0x80000000; *(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f; lVar8 = *plVar5; *plVar5 = *(long *)(lVar8 + 8); plVar6[1] = lVar8; *(long **)(lVar8 + 8) = plVar5; plVar5 = (long *)plVar6[1]; } *(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar6 + 2) & 0x80000000; *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80; *(uint *)(plVar5[1] + 0x10) = *(uint *)(plVar5[1] + 0x10) | 0x80000000; plVar7 = (long *)plVar4[-1]; plVar4 = (long *)plVar6[1]; plVar6[1] = *plVar4; *plVar7 = (long)plVar4; LAB_0015f39a: *plVar4 = (long)plVar6; plVar6 = (long *)*param_1; break; } if (-1 < (int)*(uint *)(plVar5 + 2)) { *(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) | 0x80000000; *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f; plVar7 = (long *)plVar4[-1]; lVar8 = *plVar6; *plVar6 = *(long *)(lVar8 + 8); *plVar7 = lVar8; *(long **)(lVar8 + 8) = plVar6; *plVar4 = (long)(plVar5 + 1); plVar4[1] = (long)(plVar6 + 1); plVar4 = plVar4 + 1; plVar5 = (long *)*plVar6; } uVar3 = *(uint *)(plVar5[1] + 0x10); if (-1 < (int)uVar3) { if (*(int *)(*plVar5 + 0x10) < 0) { *(uint *)(plVar5[1] + 0x10) = uVar3 | 0x80000000; *(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f; plVar7 = (long *)plVar5[1]; plVar5[1] = *plVar7; *plVar6 = (long)plVar7; *plVar7 = (long)plVar5; plVar5 = (long *)*plVar6; } LAB_0015f2fe: *(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar6 + 2) & 0x80000000; *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80; *(uint *)(*plVar5 + 0x10) = *(uint *)(*plVar5 + 0x10) | 0x80000000; plVar7 = (long *)plVar4[-1]; lVar8 = *plVar6; plVar4 = (long *)(lVar8 + 8); *plVar6 = *(long *)(lVar8 + 8); *plVar7 = lVar8; goto LAB_0015f39a; } if (-1 < *(int *)(*plVar5 + 0x10)) goto LAB_0015f2fe; LAB_0015f2b7: *(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f; plVar4 = plVar4 + -1; plVar7 = plVar6; } while (plVar6 != (long *)*param_1); } *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80; } if ((code *)param_1[0x50] != (code *)0x0) { if ((ulong)*(uint *)(param_1 + 0x41) == 0) { lVar8 = plVar9[3]; } else { lVar8 = (ulong)*(uint *)(param_1 + 0x41) + (long)plVar9; } (*(code *)param_1[0x50])(lVar8,1,param_1[0x46]); } param_1[0x44] = (param_1[0x44] - ((ulong)param_3 + (ulong)*(uint *)(param_1 + 0x42))) + -0x18; my_free(plVar9); *(int *)((long)param_1 + 0x20c) = *(int *)((long)param_1 + 0x20c) + -1; return 0; }
65,781
get_record_position
eloqsql/storage/maria/ma_blockrec.c
static uchar *get_record_position(MARIA_SHARE *share, uchar *buff, uint record_number, uchar **end_of_data) { uint block_size= share->block_size; uint number_of_records= (uint) buff[DIR_COUNT_OFFSET]; uchar *dir; uchar *data; uint offset, length; #ifdef SANITY_CHECKS if (record_number >= number_of_records || record_number > ((block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE)) { DBUG_PRINT("error", ("Wrong row number: record_number: %u number_of_records: %u", record_number, number_of_records)); return 0; } #endif dir= dir_entry_pos(buff, block_size, record_number); offset= uint2korr(dir); length= uint2korr(dir + 2); #ifdef SANITY_CHECKS if (offset < PAGE_HEADER_SIZE(share) || offset + length > (block_size - number_of_records * DIR_ENTRY_SIZE - PAGE_SUFFIX_SIZE)) { DBUG_PRINT("error", ("Wrong row position: record_number: %u offset: %u " "length: %u number_of_records: %u", record_number, offset, length, number_of_records)); return 0; } #endif data= buff + offset; *end_of_data= data + length; return data; }
O0
c
get_record_position: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movzbl 0x8(%rax), %eax movl %eax, -0x30(%rbp) movl -0x1c(%rbp), %eax cmpl -0x30(%rbp), %eax jae 0x58ee6 movl -0x1c(%rbp), %eax movl -0x2c(%rbp), %ecx movq -0x10(%rbp), %rdx movl 0xc18(%rdx), %edx addl $0xc, %edx subl %edx, %ecx subl $0x4, %ecx shrl $0x2, %ecx cmpl %ecx, %eax jbe 0x58ef7 jmp 0x58ee8 jmp 0x58eea movq $0x0, -0x8(%rbp) jmp 0x58f80 movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x55820 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x44(%rbp) movq -0x38(%rbp), %rax movzwl 0x2(%rax), %eax movl %eax, -0x48(%rbp) movl -0x44(%rbp), %eax movq -0x10(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0xc, %ecx cmpl %ecx, %eax jb 0x58f4b movl -0x44(%rbp), %eax addl -0x48(%rbp), %eax movl -0x2c(%rbp), %ecx movl -0x30(%rbp), %edx shll $0x2, %edx subl %edx, %ecx subl $0x4, %ecx cmpl %ecx, %eax jbe 0x58f59 jmp 0x58f4d jmp 0x58f4f movq $0x0, -0x8(%rbp) jmp 0x58f80 movq -0x18(%rbp), %rax movl -0x44(%rbp), %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movl -0x48(%rbp), %eax addq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
get_record_position: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov eax, [rax+7BCh] mov [rbp+var_2C], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+8] mov [rbp+var_30], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_30] jnb short loc_58EE6 mov eax, [rbp+var_1C] mov ecx, [rbp+var_2C] mov rdx, [rbp+var_10] mov edx, [rdx+0C18h] add edx, 0Ch sub ecx, edx sub ecx, 4 shr ecx, 2 cmp eax, ecx jbe short loc_58EF7 loc_58EE6: jmp short $+2 loc_58EE8: jmp short $+2 loc_58EEA: mov [rbp+var_8], 0 jmp loc_58F80 loc_58EF7: mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov edx, [rbp+var_1C] call dir_entry_pos mov [rbp+var_38], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax] mov [rbp+var_44], eax mov rax, [rbp+var_38] movzx eax, word ptr [rax+2] mov [rbp+var_48], eax mov eax, [rbp+var_44] mov rcx, [rbp+var_10] mov ecx, [rcx+0C18h] add ecx, 0Ch cmp eax, ecx jb short loc_58F4B mov eax, [rbp+var_44] add eax, [rbp+var_48] mov ecx, [rbp+var_2C] mov edx, [rbp+var_30] shl edx, 2 sub ecx, edx sub ecx, 4 cmp eax, ecx jbe short loc_58F59 loc_58F4B: jmp short $+2 loc_58F4D: jmp short $+2 loc_58F4F: mov [rbp+var_8], 0 jmp short loc_58F80 loc_58F59: mov rax, [rbp+var_18] mov ecx, [rbp+var_44] add rax, rcx mov [rbp+var_40], rax mov rcx, [rbp+var_40] mov eax, [rbp+var_48] add rcx, rax mov rax, [rbp+var_28] mov [rax], rcx mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_58F80: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long get_record_position(long long a1, long long a2, unsigned int a3, _QWORD *a4) { unsigned int v5; // [rsp+Ch] [rbp-44h] unsigned __int16 *v6; // [rsp+18h] [rbp-38h] unsigned int v7; // [rsp+20h] [rbp-30h] unsigned int v8; // [rsp+24h] [rbp-2Ch] v8 = *(_DWORD *)(a1 + 1980); v7 = *(unsigned __int8 *)(a2 + 8); if ( a3 >= v7 || a3 > (v8 - (*(_DWORD *)(a1 + 3096) + 12) - 4) >> 2 ) return 0LL; v6 = (unsigned __int16 *)dir_entry_pos(a2, v8, a3); v5 = *v6; if ( v5 < *(_DWORD *)(a1 + 3096) + 12 || v6[1] + v5 > v8 - 4 * v7 - 4 ) return 0LL; *a4 = v6[1] + *v6 + a2; return v5 + a2; }
get_record_position: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x30] JNC 0x00158ee6 MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RDX + 0xc18] ADD EDX,0xc SUB ECX,EDX SUB ECX,0x4 SHR ECX,0x2 CMP EAX,ECX JBE 0x00158ef7 LAB_00158ee6: JMP 0x00158ee8 LAB_00158ee8: JMP 0x00158eea LAB_00158eea: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00158f80 LAB_00158ef7: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x00155820 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0x2] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x44] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0xc CMP EAX,ECX JC 0x00158f4b MOV EAX,dword ptr [RBP + -0x44] ADD EAX,dword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] SHL EDX,0x2 SUB ECX,EDX SUB ECX,0x4 CMP EAX,ECX JBE 0x00158f59 LAB_00158f4b: JMP 0x00158f4d LAB_00158f4d: JMP 0x00158f4f LAB_00158f4f: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00158f80 LAB_00158f59: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x48] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_00158f80: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long get_record_position(long param_1,long param_2,uint param_3,long *param_4) { byte bVar1; int iVar2; uint uVar3; ushort *puVar4; long local_10; iVar2 = *(int *)(param_1 + 0x7bc); bVar1 = *(byte *)(param_2 + 8); if ((param_3 < bVar1) && (param_3 <= (iVar2 - (*(int *)(param_1 + 0xc18) + 0xc)) - 4U >> 2)) { puVar4 = (ushort *)dir_entry_pos(param_2,iVar2,param_3); uVar3 = (uint)*puVar4; if ((uVar3 < *(int *)(param_1 + 0xc18) + 0xcU) || ((iVar2 + (uint)bVar1 * -4) - 4 < uVar3 + puVar4[1])) { local_10 = 0; } else { local_10 = param_2 + (ulong)uVar3; *param_4 = local_10 + (ulong)(uint)puVar4[1]; } } else { local_10 = 0; } return local_10; }
65,782
blst_fr_from_scalar
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/exports.c
void blst_fr_from_scalar(vec256 ret, const pow256 a) { const union { long one; char little; } is_endian = { 1 }; if ((uptr_t)ret == (uptr_t)a && is_endian.little) { mul_mont_sparse_256(ret, (const limb_t *)a, BLS12_381_rRR, BLS12_381_r, r0); } else { vec256 out; limbs_from_le_bytes(out, a, 32); mul_mont_sparse_256(ret, out, BLS12_381_rRR, BLS12_381_r, r0); vec_zero(out, sizeof(out)); } }
O0
c
blst_fr_from_scalar: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq 0x24c29(%rip), %rax # 0x54fc0 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx cmpq %rcx, %rax jne 0x303d8 movsbl -0x18(%rbp), %eax cmpl $0x0, %eax je 0x303d8 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq 0x24be0(%rip), %rdx # 0x54fa0 leaq 0x246c9(%rip), %rcx # 0x54a90 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0x47200 jmp 0x3041d leaq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x20, %edx callq 0x30430 movq -0x8(%rbp), %rdi leaq -0x40(%rbp), %rsi leaq 0x24ba7(%rip), %rdx # 0x54fa0 leaq 0x24690(%rip), %rcx # 0x54a90 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0x47200 leaq -0x40(%rbp), %rdi movl $0x20, %esi callq 0x23310 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
blst_fr_from_scalar: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, cs:qword_54FC0 mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] cmp rax, rcx jnz short loc_303D8 movsx eax, byte ptr [rbp+var_18] cmp eax, 0 jz short loc_303D8 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, BLS12_381_rRR lea rcx, BLS12_381_r mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 jmp short loc_3041D loc_303D8: lea rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, 20h ; ' ' call limbs_from_le_bytes mov rdi, [rbp+var_8] lea rsi, [rbp+var_40] lea rdx, BLS12_381_rRR lea rcx, BLS12_381_r mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 lea rdi, [rbp+var_40] mov esi, 20h ; ' ' call vec_zero loc_3041D: add rsp, 40h pop rbp retn
long long blst_fr_from_scalar(long long a1, long long a2) { _BYTE v3[40]; // [rsp+0h] [rbp-40h] BYREF long long v4; // [rsp+28h] [rbp-18h] long long v5; // [rsp+30h] [rbp-10h] long long v6; // [rsp+38h] [rbp-8h] v6 = a1; v5 = a2; v4 = 1LL; if ( a1 == a2 ) return mul_mont_sparse_256(v6, v5, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); limbs_from_le_bytes(v3, v5, 32LL); mul_mont_sparse_256(v6, v3, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); return vec_zero((long long)v3, 0x20uLL); }
blst_fr_from_scalar: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [0x00154fc0] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JNZ 0x001303d8 MOVSX EAX,byte ptr [RBP + -0x18] CMP EAX,0x0 JZ 0x001303d8 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x154fa0] LEA RCX,[0x154a90] MOV R8,-0x100000001 CALL 0x00147200 JMP 0x0013041d LAB_001303d8: LEA RDI,[RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x20 CALL 0x00130430 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x40] LEA RDX,[0x154fa0] LEA RCX,[0x154a90] MOV R8,-0x100000001 CALL 0x00147200 LEA RDI,[RBP + -0x40] MOV ESI,0x20 CALL 0x00123310 LAB_0013041d: ADD RSP,0x40 POP RBP RET
void blst_fr_from_scalar(long param_1,long param_2) { int1 local_48 [40]; int8 local_20; long local_18; long local_10; local_20 = DAT_00154fc0; local_18 = param_2; local_10 = param_1; if ((param_1 == param_2) && (local_20._0_1_ = (char)DAT_00154fc0, (char)local_20 != '\0')) { mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); } else { limbs_from_le_bytes(local_48,param_2,0x20); mul_mont_sparse_256(local_10,local_48,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); vec_zero(local_48,0x20); } return; }
65,783
set_max_sort_char
eloqsql/strings/ctype-simple.c
static void set_max_sort_char(struct charset_info_st *cs) { uchar max_char; uint i; if (!cs->sort_order) return; max_char=cs->sort_order[(uchar) cs->max_sort_char]; for (i= 0; i < 256; i++) { if ((uchar) cs->sort_order[i] > max_char) { max_char=(uchar) cs->sort_order[i]; cs->max_sort_char= i; } } }
O0
c
set_max_sort_char: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x58(%rax) jne 0x4d045 jmp 0x4d0b6 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq -0x8(%rbp), %rcx movq 0xa8(%rcx), %rcx movzbl %cl, %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x100, -0x10(%rbp) # imm = 0x100 jae 0x4d0b6 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %eax movzbl -0x9(%rbp), %ecx cmpl %ecx, %eax jle 0x4d0a9 movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movl -0x10(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x9(%rbp) movl -0x10(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) jmp 0x4d0ab movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x4d068 popq %rbp retq nopl (%rax,%rax)
set_max_sort_char: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+58h], 0 jnz short loc_4D045 jmp short loc_4D0B6 loc_4D045: mov rax, [rbp+var_8] mov rax, [rax+58h] mov rcx, [rbp+var_8] mov rcx, [rcx+0A8h] movzx ecx, cl mov al, [rax+rcx] mov [rbp+var_9], al mov [rbp+var_10], 0 loc_4D068: cmp [rbp+var_10], 100h jnb short loc_4D0B6 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_9] cmp eax, ecx jle short loc_4D0A9 mov rax, [rbp+var_8] mov rax, [rax+58h] mov ecx, [rbp+var_10] mov al, [rax+rcx] mov [rbp+var_9], al mov eax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_8] mov [rax+0A8h], rcx loc_4D0A9: jmp short $+2 loc_4D0AB: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_4D068 loc_4D0B6: pop rbp retn
unsigned __int8 set_max_sort_char(long long a1) { unsigned __int8 result; // al unsigned int i; // [rsp+0h] [rbp-10h] unsigned __int8 v3; // [rsp+7h] [rbp-9h] result = a1; if ( *(_QWORD *)(a1 + 88) ) { result = *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*(_QWORD *)(a1 + 168)); v3 = result; for ( i = 0; i < 0x100; ++i ) { if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + i) > (int)v3 ) { v3 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + i); *(_QWORD *)(a1 + 168) = i; } result = i + 1; } } return result; }
set_max_sort_char: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x58],0x0 JNZ 0x0014d045 JMP 0x0014d0b6 LAB_0014d045: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0xa8] MOVZX ECX,CL MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV dword ptr [RBP + -0x10],0x0 LAB_0014d068: CMP dword ptr [RBP + -0x10],0x100 JNC 0x0014d0b6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x9] CMP EAX,ECX JLE 0x0014d0a9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV ECX,dword ptr [RBP + -0x10] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x9],AL MOV EAX,dword ptr [RBP + -0x10] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX LAB_0014d0a9: JMP 0x0014d0ab LAB_0014d0ab: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x0014d068 LAB_0014d0b6: POP RBP RET
void set_max_sort_char(long param_1) { int4 local_18; int1 local_11; if (*(long *)(param_1 + 0x58) != 0) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (*(ulong *)(param_1 + 0xa8) & 0xff)); for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) { if (local_11 < *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18)) { local_11 = *(byte *)(*(long *)(param_1 + 0x58) + (ulong)local_18); *(ulong *)(param_1 + 0xa8) = (ulong)local_18; } } } return; }
65,784
uf_prespace
eloqsql/storage/maria/ma_packrec.c
static void uf_prespace(MARIA_COLUMNDEF *rec, MARIA_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; } bfill(to, spaces, ' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); }
O0
c
uf_prespace: 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 0x24(%rcx), %eax jb 0x3bc2b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x24(%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 0x24(%rcx), %ecx movl %ecx, %edx leaq 0x28275d(%rip), %rcx # 0x2be380 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0x3bc3e movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x24(%rax), %esi callq 0x3a1f0 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 0x3bc60 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0x3bc9e movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2c0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0x3bc9e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0x3ad80 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_prespace: 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+24h] jb short loc_3BC2B mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+24h] 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+24h] mov edx, ecx lea rcx, mask and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_3BC3E loc_3BC2B: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+24h] call fill_and_get_bits mov [rbp+var_28], eax loc_3BC3E: 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_3BC60 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_3BC9E loc_3BC60: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_3BC9E mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes loc_3BC9E: add rsp, 30h pop rbp retn
long long uf_prespace(long long a1, unsigned int *a2, long long 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 + 36) ) { bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36)); } else { v4 = *a2; v5 = a2[1] - *(_DWORD *)(a1 + 36); a2[1] = v5; bits = mask[*(unsigned int *)(a1 + 36)] & (v4 >> v5); } if ( (unsigned long long)bits + a3 <= (unsigned long long)a4 ) { memset(a3, 32LL, bits); result = bits + a3; if ( (_BYTE *)result != a4 ) return decode_bytes(a1, (long long)a2, (_BYTE *)(bits + a3), a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_prespace: 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 + 0x24] JC 0x0013bc2b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x24] 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 + 0x24] MOV EDX,ECX LEA RCX,[0x3be380] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x0013bc3e LAB_0013bc2b: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x24] CALL 0x0013a1f0 MOV dword ptr [RBP + -0x28],EAX LAB_0013bc3e: 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 0x0013bc60 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x0013bc9e LAB_0013bc60: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x0013bc9e MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x0013ad80 LAB_0013bc9e: ADD RSP,0x30 POP RBP RET
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] < *(uint *)(param_1 + 0x24)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x24); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } return; }
65,785
skip_all
eloqsql/unittest/mytap/tap.c
void skip_all(char const *reason, ...) { va_list ap; va_start(ap, reason); fprintf(tapout, "1..0 # skip "); vfprintf(tapout, reason, ap); fflush(tapout); va_end(ap); exit(0); }
O0
c
skip_all: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp testb %al, %al je 0xd9e05 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %r9, -0xa8(%rbp) movq %r8, -0xb0(%rbp) movq %rcx, -0xb8(%rbp) movq %rdx, -0xc0(%rbp) movq %rsi, -0xc8(%rbp) movq %rdi, -0x8(%rbp) leaq -0x20(%rbp), %rax leaq -0xd0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) movq 0x1e3179(%rip), %rax # 0x2bcfd0 movq (%rax), %rdi leaq 0x79f60(%rip), %rsi # 0x153dc1 movb $0x0, %al callq 0x2a180 movq 0x1e3161(%rip), %rax # 0x2bcfd0 movq (%rax), %rdi movq -0x8(%rbp), %rsi leaq -0x20(%rbp), %rdx callq 0x2a7e0 movq 0x1e314a(%rip), %rax # 0x2bcfd0 movq (%rax), %rdi callq 0x2a3e0 leaq -0x20(%rbp), %rax xorl %edi, %edi callq 0x2a500 nopl (%rax)
skip_all: push rbp mov rbp, rsp sub rsp, 0D0h test al, al jz short loc_D9E05 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_D9E05: mov [rbp+var_A8], r9 mov [rbp+var_B0], r8 mov [rbp+var_B8], rcx mov [rbp+var_C0], rdx mov [rbp+var_C8], rsi mov [rbp+var_8], rdi lea rax, [rbp+var_20] lea rcx, [rbp+var_D0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, a10Skip; "1..0 # skip " mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_8] lea rdx, [rbp+var_20] call _vfprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush lea rax, [rbp+var_20] xor edi, edi call _exit
void __noreturn skip_all( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v15; // [rsp+0h] [rbp-D0h] BYREF long long v16; // [rsp+8h] [rbp-C8h] long long v17; // [rsp+10h] [rbp-C0h] long long v18; // [rsp+18h] [rbp-B8h] long long v19; // [rsp+20h] [rbp-B0h] long long v20; // [rsp+28h] [rbp-A8h] __m128 v21; // [rsp+30h] [rbp-A0h] __m128 v22; // [rsp+40h] [rbp-90h] __m128 v23; // [rsp+50h] [rbp-80h] __m128 v24; // [rsp+60h] [rbp-70h] __m128 v25; // [rsp+70h] [rbp-60h] __m128 v26; // [rsp+80h] [rbp-50h] __m128 v27; // [rsp+90h] [rbp-40h] __m128 v28; // [rsp+A0h] [rbp-30h] _DWORD v29[2]; // [rsp+B0h] [rbp-20h] BYREF char *v30; // [rsp+B8h] [rbp-18h] char *v31; // [rsp+C0h] [rbp-10h] long long v32; // [rsp+C8h] [rbp-8h] v21 = a7; v22 = a8; v23 = a9; v24 = a10; v25 = a11; v26 = a12; v27 = a13; v28 = a14; v20 = a6; v19 = a5; v18 = a4; v17 = a3; v16 = a2; v32 = a1; v31 = &v15; v30 = &a15; v29[1] = 48; v29[0] = 8; fprintf(stdout, "1..0 # skip "); vfprintf(stdout, v32, v29); fflush(stdout); exit(0LL); }
skip_all: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 TEST AL,AL JZ 0x001d9e05 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001d9e05: MOV qword ptr [RBP + -0xa8],R9 MOV qword ptr [RBP + -0xb0],R8 MOV qword ptr [RBP + -0xb8],RCX MOV qword ptr [RBP + -0xc0],RDX MOV qword ptr [RBP + -0xc8],RSI MOV qword ptr [RBP + -0x8],RDI LEA RAX,[RBP + -0x20] LEA RCX,[RBP + -0xd0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x8 MOV RAX,qword ptr [0x003bcfd0] MOV RDI,qword ptr [RAX] LEA RSI,[0x253dc1] MOV AL,0x0 CALL 0x0012a180 MOV RAX,qword ptr [0x003bcfd0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] LEA RDX,[RBP + -0x20] CALL 0x0012a7e0 MOV RAX,qword ptr [0x003bcfd0] MOV RDI,qword ptr [RAX] CALL 0x0012a3e0 LEA RAX,[RBP + -0x20] XOR EDI,EDI CALL 0x0012a500
void skip_all(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, char *param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [8]; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int4 local_28; int4 local_24; int1 *local_20; int1 *local_18; char *local_10; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_18 = local_d8; local_20 = &stack0x00000008; local_24 = 0x30; local_28 = 8; local_d0 = param_10; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; local_10 = param_9; fprintf(*(FILE **)PTR_stdout_003bcfd0,"1..0 # skip "); vfprintf(*(FILE **)PTR_stdout_003bcfd0,local_10,&local_28); fflush(*(FILE **)PTR_stdout_003bcfd0); /* WARNING: Subroutine does not return */ exit(0); }
65,786
mysql_list_tables_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_tables_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_tables, (parms->mysql, parms->wild), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_list_tables_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movq %rax, %rdi callq 0x1e34a movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_list_tables_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov rdi, rax call mysql_list_tables mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_list_tables_start_internal(long long a1) { long long v1; // rbx long long result; // rax v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8)); *(_QWORD *)(v1 + 8) = result; *(_DWORD *)v1 = 0; return result; }
mysql_list_tables_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDI,RAX CALL 0x0011e34a MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_list_tables_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_tables(*param_1,param_1[1]); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
65,787
trnman_get_max_trid
eloqsql/storage/maria/trnman.c
TrID trnman_get_max_trid() { TrID id; /* Check if trnman has been initalized */ if (short_trid_to_active_trn == NULL) return 0; mysql_mutex_lock(&LOCK_trn_list); id= global_trid_generator; mysql_mutex_unlock(&LOCK_trn_list); return id; }
O0
c
trnman_get_max_trid: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp cmpq $0x0, 0x4496f0(%rip) # 0x476000 jne 0x2c91c movq $0x0, -0x8(%rbp) jmp 0x2c953 leaq 0x449a8d(%rip), %rdi # 0x4763b0 leaq 0x123967(%rip), %rsi # 0x150291 movl $0x38c, %edx # imm = 0x38C callq 0x2b950 movq 0x4499a5(%rip), %rax # 0x4762e0 movq %rax, -0x10(%rbp) leaq 0x449a6a(%rip), %rdi # 0x4763b0 callq 0x2b9c0 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
trnman_get_max_trid: push rbp mov rbp, rsp sub rsp, 10h cmp cs:short_trid_to_active_trn, 0 jnz short loc_2C91C mov [rbp+var_8], 0 jmp short loc_2C953 loc_2C91C: lea rdi, LOCK_trn_list lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 38Ch call inline_mysql_mutex_lock mov rax, cs:global_trid_generator mov [rbp+var_10], rax lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_2C953: mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long trnman_get_max_trid() { long long v1; // [rsp+0h] [rbp-10h] if ( !short_trid_to_active_trn ) return 0LL; inline_mysql_mutex_lock( (long long)&LOCK_trn_list, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x38Cu); v1 = global_trid_generator; inline_mysql_mutex_unlock((long long)&LOCK_trn_list); return v1; }
trnman_get_max_trid: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CMP qword ptr [0x00576000],0x0 JNZ 0x0012c91c MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012c953 LAB_0012c91c: LEA RDI,[0x5763b0] LEA RSI,[0x250291] MOV EDX,0x38c CALL 0x0012b950 MOV RAX,qword ptr [0x005762e0] MOV qword ptr [RBP + -0x10],RAX LEA RDI,[0x5763b0] CALL 0x0012b9c0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0012c953: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
int8 trnman_get_max_trid(void) { int8 local_10; if (short_trid_to_active_trn == 0) { local_10 = 0; } else { inline_mysql_mutex_lock (LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x38c ); local_10 = global_trid_generator; inline_mysql_mutex_unlock(LOCK_trn_list); } return local_10; }
65,788
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O0
c
my_error_unregister_all: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq 0x1cfc61(%rip), %rax # 0x2bf9d0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0xefd98 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0xf3b80 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xefd73 movq $0x0, 0x1cfc2d(%rip) # 0x2bf9d0 leaq 0x1cfc26(%rip), %rax # 0x2bf9d0 movq %rax, 0x1cfc17(%rip) # 0x2bf9c8 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_error_unregister_all: push rbp mov rbp, rsp sub rsp, 10h mov rax, cs:my_errmsgs_globerrs mov [rbp+var_8], rax loc_EFD73: cmp [rbp+var_8], 0 jz short loc_EFD98 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_8] call my_free mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_EFD73 loc_EFD98: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax add rsp, 10h pop rbp retn
long long *my_error_unregister_all() { long long *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *i; // [rsp+8h] [rbp-8h] for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 ) { v1 = (_QWORD *)*i; my_free(i); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr [0x003bf9d0] MOV qword ptr [RBP + -0x8],RAX LAB_001efd73: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001efd98 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f3b80 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001efd73 LAB_001efd98: MOV qword ptr [0x003bf9d0],0x0 LEA RAX,[0x3bf9d0] MOV qword ptr [0x003bf9c8],RAX ADD RSP,0x10 POP RBP RET
void my_error_unregister_all(void) { int8 *puVar1; int8 *local_10; local_10 = my_errmsgs_globerrs; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; my_free(local_10); local_10 = puVar1; } my_errmsgs_globerrs = (int8 *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
65,789
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
O1
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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 %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0x6f992 movq (%rdx), %rsi cmpq %r14, %rsi jne 0x6f9ee movq %rdi, %rbx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0x6fa94 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3ea60 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x3fa53(%rip), %rsi # 0xaf409 movq %rsp, %rdi callq 0x6fb2f movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x4aa46 xorl %ebp, %ebp leaq 0x6e8db(%rip), %rsi # 0xde2b8 leaq -0x2291c(%rip), %rdx # 0x4d0c8 movq %rbx, %rdi callq 0x18b30 jmp 0x6fa48 movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x3ea00(%rip), %rsi # 0xae40b leaq 0x3ea1c(%rip), %rdx # 0xae42e movq %rsp, %rdi callq 0x1d1e4 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x4a7de xorl %ebp, %ebp leaq 0x6e9a7(%rip), %rsi # 0xde3e0 leaq -0x22978(%rip), %rdx # 0x4d0c8 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0x6fa69 jmp 0x6fa7e jmp 0x6fa78 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6fa7e movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x6fa7e movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x6fa8b movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_6F992 mov rsi, [rdx] cmp rsi, r14 jnz loc_6F9EE mov rbx, rdi lea rax, [rsp+68h+var_40] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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_iterator<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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,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, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_6F992: 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+68h+var_48] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 135h; 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 jmp short loc_6FA48 loc_6F9EE: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+68h+var_58] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" mov rdi, rsp 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 bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6FA48: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_6FA69 jmp short loc_6FA7E jmp short loc_6FA78 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6FA7E loc_6FA69: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6FA7E loc_6FA78: mov r14, rax mov bpl, 1 loc_6FA7E: test bpl, bpl jz short loc_6FA8B mov rdi, rbx; void * call ___cxa_free_exception loc_6FA8B: 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>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx _QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+40h] [rbp-28h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[2] = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, 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); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = v7; std::string::_M_construct<char const*>(v6, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v8 = *(unsigned __int8 **)a3; v9 = *(_OWORD *)(a3 + 8); v10 = *(_QWORD *)(a3 + 24); 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_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v8); return a1; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x0016f992 MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x0016f9ee MOV RBX,RDI LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x0016fa94 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0016f992: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013ea60 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_0016f9af: LEA RSI,[0x1af409] MOV RDI,RSP CALL 0x0016fb2f MOV BPL,0x1 LAB_0016f9c1: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x0014aa46 XOR EBP,EBP LEA RSI,[0x1de2b8] LEA RDX,[0x14d0c8] MOV RDI,RBX CALL 0x00118b30 LAB_0016f9ee: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_0016fa04: LEA RSI,[0x1ae40b] LEA RDX,[0x1ae42e] MOV RDI,RSP CALL 0x0011d1e4 MOV BPL,0x1 LAB_0016fa1d: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0014a7de XOR EBP,EBP LEA RSI,[0x1de3e0] LEA RDX,[0x14d0c8] MOV RDI,RBX CALL 0x00118b30
/* 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(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, 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&) */ 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> * __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> ::insert(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,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> *param_2,long *param_3) { int8 uVar1; int1 *local_68 [2]; int1 local_58 [16]; char *local_48; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_40; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; long local_28; if (*param_2 != (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> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_48 = (char *)type_name(param_2); /* try { // try from 0016f9af to 0016f9bd has its CatchHandler @ 0016fa78 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 0016f9c1 to 0016f9eb has its CatchHandler @ 0016fa58 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_40 = (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> *)*param_3; if (local_40 == param_2) { local_38 = (int4)param_3[1]; uStack_34 = *(int4 *)((long)param_3 + 0xc); uStack_30 = (int4)param_3[2]; uStack_2c = *(int4 *)((long)param_3 + 0x14); local_28 = param_3[3]; insert_iterator<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&> (this,param_2,&local_40); return this; } uVar1 = __cxa_allocate_exception(0x20); local_68[0] = local_58; /* try { // try from 0016fa04 to 0016fa19 has its CatchHandler @ 0016fa56 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 0016fa1d to 0016fa47 has its CatchHandler @ 0016fa48 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
65,790
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
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>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, 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 %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0x6e722 movq (%rdx), %rsi cmpq %r14, %rsi jne 0x6e77e movq %rdi, %rbx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0x6e820 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3deb4 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x3dcb3(%rip), %rsi # 0xac3f9 movq %rsp, %rdi callq 0x6e894 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x49ade xorl %ebp, %ebp leaq 0x6cb4b(%rip), %rsi # 0xdb2b8 leaq -0x225fa(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 jmp 0x6e7d8 movl $0x20, %edi callq 0x18360 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x3cc60(%rip), %rsi # 0xab3fb leaq 0x3cc7c(%rip), %rdx # 0xab41e movq %rsp, %rdi callq 0x1d1e4 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x49876 xorl %ebp, %ebp leaq 0x6cc17(%rip), %rsi # 0xdb3e0 leaq -0x22656(%rip), %rdx # 0x4c17a movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0x6e7f9 jmp 0x6e806 jmp 0x6e80d movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6e806 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x6e810 jmp 0x6e818 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_6E722 mov rsi, [rdx] cmp rsi, r14 jnz loc_6E77E mov rbx, rdi lea rax, [rsp+68h+var_40] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; 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_iterator<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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,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, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_6E722: 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+68h+var_48] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 135h; 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 jmp short loc_6E7D8 loc_6E77E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+68h+var_58] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" mov rdi, rsp 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 bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6E7D8: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_6E7F9 jmp short loc_6E806 jmp short loc_6E80D mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6E806 loc_6E7F9: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6E806: test bpl, bpl jnz short loc_6E810 jmp short loc_6E818 loc_6E80D: mov r14, rax loc_6E810: mov rdi, rbx; void * call ___cxa_free_exception loc_6E818: 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>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx _QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+40h] [rbp-28h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[2] = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, 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); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = v7; std::string::_M_construct<char const*>((long long)v6, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v8 = *(unsigned __int8 **)a3; v9 = *(_OWORD *)(a3 + 8); v10 = *(_QWORD *)(a3 + 24); 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_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v8); return a1; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x0016e722 MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x0016e77e MOV RBX,RDI LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x0016e820 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0016e722: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013deb4 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_0016e73f: LEA RSI,[0x1ac3f9] MOV RDI,RSP CALL 0x0016e894 MOV BPL,0x1 LAB_0016e751: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x00149ade XOR EBP,EBP LEA RSI,[0x1db2b8] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30 LAB_0016e77e: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_0016e794: LEA RSI,[0x1ab3fb] LEA RDX,[0x1ab41e] MOV RDI,RSP CALL 0x0011d1e4 MOV BPL,0x1 LAB_0016e7ad: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x00149876 XOR EBP,EBP LEA RSI,[0x1db3e0] LEA RDX,[0x14c17a] MOV RDI,RBX CALL 0x00118b30
/* 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(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, 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&) */ 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> * __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> ::insert(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,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> *param_2,long *param_3) { int8 uVar1; int1 *local_68 [2]; int1 local_58 [16]; char *local_48; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_40; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; long local_28; if (*param_2 != (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> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_48 = (char *)type_name(param_2); /* try { // try from 0016e73f to 0016e74d has its CatchHandler @ 0016e80d */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 0016e751 to 0016e77b has its CatchHandler @ 0016e7e8 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_40 = (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> *)*param_3; if (local_40 == param_2) { local_38 = (int4)param_3[1]; uStack_34 = *(int4 *)((long)param_3 + 0xc); uStack_30 = (int4)param_3[2]; uStack_2c = *(int4 *)((long)param_3 + 0x14); local_28 = param_3[3]; insert_iterator<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&> (this,param_2,&local_40); return this; } uVar1 = __cxa_allocate_exception(0x20); local_68[0] = local_58; /* try { // try from 0016e794 to 0016e7a9 has its CatchHandler @ 0016e7e6 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 0016e7ad to 0016e7d7 has its CatchHandler @ 0016e7d8 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
65,791
output_digits
bluesky950520[P]quickjs/libbf.c
static void output_digits(DynBuf *s, const bf_t *a1, int radix, limb_t n_digits, limb_t dot_pos, BOOL is_dec) { limb_t i, v, l; slimb_t pos, pos_incr; int digits_per_limb, buf_pos, radix_bits, first_buf_pos; char buf[65]; bf_t a_s, *a; if (is_dec) { digits_per_limb = LIMB_DIGITS; a = (bf_t *)a1; radix_bits = 0; pos = a->len; pos_incr = 1; first_buf_pos = 0; } else if ((radix & (radix - 1)) == 0) { a = (bf_t *)a1; radix_bits = ceil_log2(radix); digits_per_limb = LIMB_BITS / radix_bits; pos_incr = digits_per_limb * radix_bits; /* digits are aligned relative to the radix point */ pos = a->len * LIMB_BITS + smod(-a->expn, radix_bits); first_buf_pos = 0; } else { limb_t n, radixl; digits_per_limb = digits_per_limb_table[radix - 2]; radixl = get_limb_radix(radix); a = &a_s; bf_init(a1->ctx, a); n = (n_digits + digits_per_limb - 1) / digits_per_limb; if (bf_resize(a, n)) { dbuf_set_error(s); goto done; } if (bf_integer_to_radix(a, a1, radixl)) { dbuf_set_error(s); goto done; } radix_bits = 0; pos = n; pos_incr = 1; first_buf_pos = pos * digits_per_limb - n_digits; } buf_pos = digits_per_limb; i = 0; while (i < n_digits) { if (buf_pos == digits_per_limb) { pos -= pos_incr; if (radix_bits == 0) { v = get_limbz(a, pos); limb_to_a(buf, v, radix, digits_per_limb); } else { v = get_bits(a->tab, a->len, pos); limb_to_a2(buf, v, radix_bits, digits_per_limb); } buf_pos = first_buf_pos; first_buf_pos = 0; } if (i < dot_pos) { l = dot_pos; } else { if (i == dot_pos) dbuf_putc(s, '.'); l = n_digits; } l = bf_min(digits_per_limb - buf_pos, l - i); dbuf_put(s, (uint8_t *)(buf + buf_pos), l); buf_pos += l; i += l; } done: if (a != a1) bf_delete(a); }
O0
c
output_digits: subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movl %edx, 0xf4(%rsp) movq %rcx, 0xe8(%rsp) movq %r8, 0xe0(%rsp) movl %r9d, 0xdc(%rsp) cmpl $0x0, 0xdc(%rsp) je 0xf7900 movl $0x13, 0xac(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x20(%rsp) movl $0x0, 0xa4(%rsp) movq 0x20(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0xb8(%rsp) movq $0x1, 0xb0(%rsp) movl $0x0, 0xa0(%rsp) jmp 0xf7ace movl 0xf4(%rsp), %eax movl 0xf4(%rsp), %ecx subl $0x1, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xf79b9 movq 0xf8(%rsp), %rax movq %rax, 0x20(%rsp) movslq 0xf4(%rsp), %rdi callq 0xebad0 movl %eax, 0xa4(%rsp) movl $0x40, %eax cltd idivl 0xa4(%rsp) movl %eax, 0xac(%rsp) movl 0xac(%rsp), %eax imull 0xa4(%rsp), %eax cltq movq %rax, 0xb0(%rsp) movq 0x20(%rsp), %rax movq 0x18(%rax), %rax shlq $0x6, %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rax xorl %ecx, %ecx movl %ecx, %edi subq 0x10(%rax), %rdi movslq 0xa4(%rsp), %rsi callq 0xf8070 movq %rax, %rcx movq 0x8(%rsp), %rax addq %rcx, %rax movq %rax, 0xb8(%rsp) movl $0x0, 0xa0(%rsp) jmp 0xf7acc movl 0xf4(%rsp), %eax subl $0x2, %eax movslq %eax, %rcx leaq 0x1a5a3(%rip), %rax # 0x111f70 movzbl (%rax,%rcx), %eax movl %eax, 0xac(%rsp) movl 0xf4(%rsp), %edi callq 0xf7530 movq %rax, 0x10(%rsp) leaq 0x28(%rsp), %rax movq %rax, 0x20(%rsp) movq 0xf8(%rsp), %rax movq (%rax), %rdi movq 0x20(%rsp), %rsi callq 0xe5f70 movq 0xe8(%rsp), %rax movslq 0xac(%rsp), %rcx addq %rcx, %rax subq $0x1, %rax movslq 0xac(%rsp), %rcx xorl %edx, %edx divq %rcx movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xe5fd0 cmpl $0x0, %eax je 0xf7a57 movq 0x100(%rsp), %rdi callq 0xf80c0 jmp 0xf7cb7 movq 0x20(%rsp), %rdi movq 0xf8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0xf80e0 cmpl $0x0, %eax je 0xf7a85 movq 0x100(%rsp), %rdi callq 0xf80c0 jmp 0xf7cb7 movl $0x0, 0xa4(%rsp) movq 0x18(%rsp), %rax movq %rax, 0xb8(%rsp) movq $0x1, 0xb0(%rsp) movq 0xb8(%rsp), %rax movslq 0xac(%rsp), %rcx imulq %rcx, %rax subq 0xe8(%rsp), %rax movl %eax, 0xa0(%rsp) jmp 0xf7ace movl 0xac(%rsp), %eax movl %eax, 0xa8(%rsp) movq $0x0, 0xd0(%rsp) movq 0xd0(%rsp), %rax cmpq 0xe8(%rsp), %rax jae 0xf7cb5 movl 0xa8(%rsp), %eax cmpl 0xac(%rsp), %eax jne 0xf7bd3 movq 0xb0(%rsp), %rcx movq 0xb8(%rsp), %rax subq %rcx, %rax movq %rax, 0xb8(%rsp) cmpl $0x0, 0xa4(%rsp) jne 0xf7b73 movq 0x20(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0xe70a0 movq %rax, 0xc8(%rsp) leaq 0x50(%rsp), %rdi movq 0xc8(%rsp), %rsi movl 0xf4(%rsp), %edx movl 0xac(%rsp), %ecx callq 0xf8270 jmp 0xf7bba movq 0x20(%rsp), %rax movq 0x20(%rax), %rdi movq 0x20(%rsp), %rax movq 0x18(%rax), %rsi movq 0xb8(%rsp), %rdx callq 0xeb310 movq %rax, 0xc8(%rsp) leaq 0x50(%rsp), %rdi movq 0xc8(%rsp), %rsi movl 0xa4(%rsp), %edx movl 0xac(%rsp), %ecx callq 0xf8370 movl 0xa0(%rsp), %eax movl %eax, 0xa8(%rsp) movl $0x0, 0xa0(%rsp) movq 0xd0(%rsp), %rax cmpq 0xe0(%rsp), %rax jae 0xf7bf7 movq 0xe0(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0xf7c2b movq 0xd0(%rsp), %rax cmpq 0xe0(%rsp), %rax jne 0xf7c1b movq 0x100(%rsp), %rdi movl $0x2e, %esi callq 0x1e6d0 movq 0xe8(%rsp), %rax movq %rax, 0xc0(%rsp) movl 0xac(%rsp), %eax subl 0xa8(%rsp), %eax movslq %eax, %rdi movq 0xc0(%rsp), %rsi subq 0xd0(%rsp), %rsi callq 0xe7680 movq %rax, 0xc0(%rsp) movq 0x100(%rsp), %rdi leaq 0x50(%rsp), %rsi movslq 0xa8(%rsp), %rax addq %rax, %rsi movq 0xc0(%rsp), %rdx callq 0x1e550 movq 0xc0(%rsp), %rcx movslq 0xa8(%rsp), %rax addq %rcx, %rax movl %eax, 0xa8(%rsp) movq 0xc0(%rsp), %rax addq 0xd0(%rsp), %rax movq %rax, 0xd0(%rsp) jmp 0xf7ae8 jmp 0xf7cb7 movq 0x20(%rsp), %rax cmpq 0xf8(%rsp), %rax je 0xf7cd0 movq 0x20(%rsp), %rdi callq 0xe93d0 addq $0x108, %rsp # imm = 0x108 retq nopl (%rax,%rax)
output_digits: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov [rsp+108h+var_14], edx mov [rsp+108h+var_20], rcx mov [rsp+108h+var_28], r8 mov [rsp+108h+var_2C], r9d cmp [rsp+108h+var_2C], 0 jz short loc_F7900 mov [rsp+108h+var_5C], 13h mov rax, [rsp+108h+var_10] mov [rsp+108h+var_E8], rax mov [rsp+108h+var_64], 0 mov rax, [rsp+108h+var_E8] mov rax, [rax+18h] mov [rsp+108h+var_50], rax mov [rsp+108h+var_58], 1 mov [rsp+108h+var_68], 0 jmp loc_F7ACE loc_F7900: mov eax, [rsp+108h+var_14] mov ecx, [rsp+108h+var_14] sub ecx, 1 and eax, ecx cmp eax, 0 jnz loc_F79B9 mov rax, [rsp+108h+var_10] mov [rsp+108h+var_E8], rax movsxd rdi, [rsp+108h+var_14] call ceil_log2 mov [rsp+108h+var_64], eax mov eax, 40h ; '@' cdq idiv [rsp+108h+var_64] mov [rsp+108h+var_5C], eax mov eax, [rsp+108h+var_5C] imul eax, [rsp+108h+var_64] cdqe mov [rsp+108h+var_58], rax mov rax, [rsp+108h+var_E8] mov rax, [rax+18h] shl rax, 6 mov [rsp+108h+var_100], rax mov rax, [rsp+108h+var_E8] xor ecx, ecx mov edi, ecx sub rdi, [rax+10h] movsxd rsi, [rsp+108h+var_64] call smod mov rcx, rax mov rax, [rsp+108h+var_100] add rax, rcx mov [rsp+108h+var_50], rax mov [rsp+108h+var_68], 0 jmp loc_F7ACC loc_F79B9: mov eax, [rsp+108h+var_14] sub eax, 2 movsxd rcx, eax lea rax, digits_per_limb_table movzx eax, byte ptr [rax+rcx] mov [rsp+108h+var_5C], eax mov edi, [rsp+108h+var_14] call get_limb_radix mov [rsp+108h+var_F8], rax lea rax, [rsp+108h+var_E0] mov [rsp+108h+var_E8], rax mov rax, [rsp+108h+var_10] mov rdi, [rax] mov rsi, [rsp+108h+var_E8] call bf_init mov rax, [rsp+108h+var_20] movsxd rcx, [rsp+108h+var_5C] add rax, rcx sub rax, 1 movsxd rcx, [rsp+108h+var_5C] xor edx, edx div rcx mov [rsp+108h+var_F0], rax mov rdi, [rsp+108h+var_E8] mov rsi, [rsp+108h+var_F0] call bf_resize cmp eax, 0 jz short loc_F7A57 mov rdi, [rsp+108h+var_8] call dbuf_set_error jmp loc_F7CB7 loc_F7A57: mov rdi, [rsp+108h+var_E8] mov rsi, [rsp+108h+var_10] mov rdx, [rsp+108h+var_F8] call bf_integer_to_radix cmp eax, 0 jz short loc_F7A85 mov rdi, [rsp+108h+var_8] call dbuf_set_error jmp loc_F7CB7 loc_F7A85: mov [rsp+108h+var_64], 0 mov rax, [rsp+108h+var_F0] mov [rsp+108h+var_50], rax mov [rsp+108h+var_58], 1 mov rax, [rsp+108h+var_50] movsxd rcx, [rsp+108h+var_5C] imul rax, rcx sub rax, [rsp+108h+var_20] mov [rsp+108h+var_68], eax loc_F7ACC: jmp short $+2 loc_F7ACE: mov eax, [rsp+108h+var_5C] mov [rsp+108h+var_60], eax mov [rsp+108h+var_38], 0 loc_F7AE8: mov rax, [rsp+108h+var_38] cmp rax, [rsp+108h+var_20] jnb loc_F7CB5 mov eax, [rsp+108h+var_60] cmp eax, [rsp+108h+var_5C] jnz loc_F7BD3 mov rcx, [rsp+108h+var_58] mov rax, [rsp+108h+var_50] sub rax, rcx mov [rsp+108h+var_50], rax cmp [rsp+108h+var_64], 0 jnz short loc_F7B73 mov rdi, [rsp+108h+var_E8] mov rsi, [rsp+108h+var_50] call get_limbz mov [rsp+108h+var_40], rax lea rdi, [rsp+108h+var_B8] mov rsi, [rsp+108h+var_40] mov edx, [rsp+108h+var_14] mov ecx, [rsp+108h+var_5C] call limb_to_a jmp short loc_F7BBA loc_F7B73: mov rax, [rsp+108h+var_E8] mov rdi, [rax+20h] mov rax, [rsp+108h+var_E8] mov rsi, [rax+18h] mov rdx, [rsp+108h+var_50] call get_bits mov [rsp+108h+var_40], rax lea rdi, [rsp+108h+var_B8] mov rsi, [rsp+108h+var_40] mov edx, [rsp+108h+var_64] mov ecx, [rsp+108h+var_5C] call limb_to_a2 loc_F7BBA: mov eax, [rsp+108h+var_68] mov [rsp+108h+var_60], eax mov [rsp+108h+var_68], 0 loc_F7BD3: mov rax, [rsp+108h+var_38] cmp rax, [rsp+108h+var_28] jnb short loc_F7BF7 mov rax, [rsp+108h+var_28] mov [rsp+108h+var_48], rax jmp short loc_F7C2B loc_F7BF7: mov rax, [rsp+108h+var_38] cmp rax, [rsp+108h+var_28] jnz short loc_F7C1B mov rdi, [rsp+108h+var_8] mov esi, 2Eh ; '.' call dbuf_putc loc_F7C1B: mov rax, [rsp+108h+var_20] mov [rsp+108h+var_48], rax loc_F7C2B: mov eax, [rsp+108h+var_5C] sub eax, [rsp+108h+var_60] movsxd rdi, eax mov rsi, [rsp+108h+var_48] sub rsi, [rsp+108h+var_38] call bf_min mov [rsp+108h+var_48], rax mov rdi, [rsp+108h+var_8] lea rsi, [rsp+108h+var_B8] movsxd rax, [rsp+108h+var_60] add rsi, rax mov rdx, [rsp+108h+var_48] call dbuf_put mov rcx, [rsp+108h+var_48] movsxd rax, [rsp+108h+var_60] add rax, rcx mov [rsp+108h+var_60], eax mov rax, [rsp+108h+var_48] add rax, [rsp+108h+var_38] mov [rsp+108h+var_38], rax jmp loc_F7AE8 loc_F7CB5: jmp short $+2 loc_F7CB7: mov rax, [rsp+108h+var_E8] cmp rax, [rsp+108h+var_10] jz short loc_F7CD0 mov rdi, [rsp+108h+var_E8] call bf_delete_0 loc_F7CD0: add rsp, 108h retn
long long output_digits(_QWORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax long long v7; // [rsp+8h] [rbp-100h] long long limb_radix; // [rsp+10h] [rbp-F8h] unsigned long long v9; // [rsp+18h] [rbp-F0h] long long *v10; // [rsp+20h] [rbp-E8h] _QWORD v11[5]; // [rsp+28h] [rbp-E0h] BYREF _BYTE v12[80]; // [rsp+50h] [rbp-B8h] BYREF int v13; // [rsp+A0h] [rbp-68h] signed int v14; // [rsp+A4h] [rbp-64h] int v15; // [rsp+A8h] [rbp-60h] int v16; // [rsp+ACh] [rbp-5Ch] long long v17; // [rsp+B0h] [rbp-58h] unsigned long long v18; // [rsp+B8h] [rbp-50h] long long v19; // [rsp+C0h] [rbp-48h] unsigned long long bits; // [rsp+C8h] [rbp-40h] unsigned long long i; // [rsp+D0h] [rbp-38h] int v22; // [rsp+DCh] [rbp-2Ch] unsigned long long v23; // [rsp+E0h] [rbp-28h] unsigned long long v24; // [rsp+E8h] [rbp-20h] unsigned int v25; // [rsp+F4h] [rbp-14h] long long *v26; // [rsp+F8h] [rbp-10h] _QWORD *v27; // [rsp+100h] [rbp-8h] v27 = a1; v26 = (long long *)a2; v25 = a3; v24 = a4; v23 = a5; v22 = a6; if ( (_DWORD)a6 ) { v16 = 19; v10 = v26; v14 = 0; v18 = v26[3]; v17 = 1LL; v13 = 0; } else if ( ((v25 - 1) & v25) != 0 ) { v16 = digits_per_limb_table[v25 - 2]; limb_radix = get_limb_radix(v25); v10 = v11; bf_init(*v26, (long long)v11); v9 = (v16 + v24 - 1) / v16; a2 = v9; if ( (unsigned int)bf_resize(v11, v9) || (a2 = (long long)v26, (unsigned int)bf_integer_to_radix(v11, v26, limb_radix)) ) { dbuf_set_error(v27); goto LABEL_22; } v14 = 0; v18 = v9; v17 = 1LL; a4 = v16; v13 = v16 * v9 - v24; } else { v10 = v26; v14 = ceil_log2((int)v25); v16 = 64 / v14; v17 = v14 * (64 / v14); v7 = v26[3] << 6; a2 = v14; a4 = smod(-v26[2], v14); v18 = a4 + v7; v13 = 0; } v15 = v16; for ( i = 0LL; i < v24; i += v19 ) { if ( v15 == v16 ) { v18 -= v17; if ( v14 ) { bits = get_bits(v10[4], v10[3], v18); limb_to_a2(v12, bits, (unsigned int)v14, (unsigned int)v16); } else { bits = get_limbz((long long)v10, v18); limb_to_a(v12, bits, v25, (unsigned int)v16); } v15 = v13; v13 = 0; } if ( i >= v23 ) { if ( i == v23 ) dbuf_putc(v27, 46); v19 = v24; } else { v19 = v23; } v19 = bf_min(v16 - v15, v19 - i); a2 = (long long)&v12[v15]; dbuf_put(v27, a2, v19); a4 = v19; v15 += v19; } LABEL_22: result = (long long)v10; if ( v10 != v26 ) return bf_delete_0(v10, a2, a3, a4, a5, a6); return result; }
output_digits: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV dword ptr [RSP + 0xf4],EDX MOV qword ptr [RSP + 0xe8],RCX MOV qword ptr [RSP + 0xe0],R8 MOV dword ptr [RSP + 0xdc],R9D CMP dword ptr [RSP + 0xdc],0x0 JZ 0x001f7900 MOV dword ptr [RSP + 0xac],0x13 MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0xa4],0x0 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xb0],0x1 MOV dword ptr [RSP + 0xa0],0x0 JMP 0x001f7ace LAB_001f7900: MOV EAX,dword ptr [RSP + 0xf4] MOV ECX,dword ptr [RSP + 0xf4] SUB ECX,0x1 AND EAX,ECX CMP EAX,0x0 JNZ 0x001f79b9 MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x20],RAX MOVSXD RDI,dword ptr [RSP + 0xf4] CALL 0x001ebad0 MOV dword ptr [RSP + 0xa4],EAX MOV EAX,0x40 CDQ IDIV dword ptr [RSP + 0xa4] MOV dword ptr [RSP + 0xac],EAX MOV EAX,dword ptr [RSP + 0xac] IMUL EAX,dword ptr [RSP + 0xa4] CDQE MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x18] SHL RAX,0x6 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x20] XOR ECX,ECX MOV EDI,ECX SUB RDI,qword ptr [RAX + 0x10] MOVSXD RSI,dword ptr [RSP + 0xa4] CALL 0x001f8070 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,RCX MOV qword ptr [RSP + 0xb8],RAX MOV dword ptr [RSP + 0xa0],0x0 JMP 0x001f7acc LAB_001f79b9: MOV EAX,dword ptr [RSP + 0xf4] SUB EAX,0x2 MOVSXD RCX,EAX LEA RAX,[0x211f70] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0xac],EAX MOV EDI,dword ptr [RSP + 0xf4] CALL 0x001f7530 MOV qword ptr [RSP + 0x10],RAX LEA RAX,[RSP + 0x28] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001e5f70 MOV RAX,qword ptr [RSP + 0xe8] MOVSXD RCX,dword ptr [RSP + 0xac] ADD RAX,RCX SUB RAX,0x1 MOVSXD RCX,dword ptr [RSP + 0xac] XOR EDX,EDX DIV RCX MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001e5fd0 CMP EAX,0x0 JZ 0x001f7a57 MOV RDI,qword ptr [RSP + 0x100] CALL 0x001f80c0 JMP 0x001f7cb7 LAB_001f7a57: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x001f80e0 CMP EAX,0x0 JZ 0x001f7a85 MOV RDI,qword ptr [RSP + 0x100] CALL 0x001f80c0 JMP 0x001f7cb7 LAB_001f7a85: MOV dword ptr [RSP + 0xa4],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0xb8],RAX MOV qword ptr [RSP + 0xb0],0x1 MOV RAX,qword ptr [RSP + 0xb8] MOVSXD RCX,dword ptr [RSP + 0xac] IMUL RAX,RCX SUB RAX,qword ptr [RSP + 0xe8] MOV dword ptr [RSP + 0xa0],EAX LAB_001f7acc: JMP 0x001f7ace LAB_001f7ace: MOV EAX,dword ptr [RSP + 0xac] MOV dword ptr [RSP + 0xa8],EAX MOV qword ptr [RSP + 0xd0],0x0 LAB_001f7ae8: MOV RAX,qword ptr [RSP + 0xd0] CMP RAX,qword ptr [RSP + 0xe8] JNC 0x001f7cb5 MOV EAX,dword ptr [RSP + 0xa8] CMP EAX,dword ptr [RSP + 0xac] JNZ 0x001f7bd3 MOV RCX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xb8] SUB RAX,RCX MOV qword ptr [RSP + 0xb8],RAX CMP dword ptr [RSP + 0xa4],0x0 JNZ 0x001f7b73 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001e70a0 MOV qword ptr [RSP + 0xc8],RAX LEA RDI,[RSP + 0x50] MOV RSI,qword ptr [RSP + 0xc8] MOV EDX,dword ptr [RSP + 0xf4] MOV ECX,dword ptr [RSP + 0xac] CALL 0x001f8270 JMP 0x001f7bba LAB_001f7b73: MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x001eb310 MOV qword ptr [RSP + 0xc8],RAX LEA RDI,[RSP + 0x50] MOV RSI,qword ptr [RSP + 0xc8] MOV EDX,dword ptr [RSP + 0xa4] MOV ECX,dword ptr [RSP + 0xac] CALL 0x001f8370 LAB_001f7bba: MOV EAX,dword ptr [RSP + 0xa0] MOV dword ptr [RSP + 0xa8],EAX MOV dword ptr [RSP + 0xa0],0x0 LAB_001f7bd3: MOV RAX,qword ptr [RSP + 0xd0] CMP RAX,qword ptr [RSP + 0xe0] JNC 0x001f7bf7 MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0xc0],RAX JMP 0x001f7c2b LAB_001f7bf7: MOV RAX,qword ptr [RSP + 0xd0] CMP RAX,qword ptr [RSP + 0xe0] JNZ 0x001f7c1b MOV RDI,qword ptr [RSP + 0x100] MOV ESI,0x2e CALL 0x0011e6d0 LAB_001f7c1b: MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xc0],RAX LAB_001f7c2b: MOV EAX,dword ptr [RSP + 0xac] SUB EAX,dword ptr [RSP + 0xa8] MOVSXD RDI,EAX MOV RSI,qword ptr [RSP + 0xc0] SUB RSI,qword ptr [RSP + 0xd0] CALL 0x001e7680 MOV qword ptr [RSP + 0xc0],RAX MOV RDI,qword ptr [RSP + 0x100] LEA RSI,[RSP + 0x50] MOVSXD RAX,dword ptr [RSP + 0xa8] ADD RSI,RAX MOV RDX,qword ptr [RSP + 0xc0] CALL 0x0011e550 MOV RCX,qword ptr [RSP + 0xc0] MOVSXD RAX,dword ptr [RSP + 0xa8] ADD RAX,RCX MOV dword ptr [RSP + 0xa8],EAX MOV RAX,qword ptr [RSP + 0xc0] ADD RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0xd0],RAX JMP 0x001f7ae8 LAB_001f7cb5: JMP 0x001f7cb7 LAB_001f7cb7: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0xf8] JZ 0x001f7cd0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e93d0 LAB_001f7cd0: ADD RSP,0x108 RET
void output_digits(int8 param_1,int8 *param_2,uint param_3,ulong param_4,ulong param_5, int param_6) { long lVar1; int iVar2; long lVar3; int8 uVar4; ulong uVar5; ulong uVar6; int8 *local_e8; int8 local_e0 [5]; int1 local_b8 [80]; uint local_68; int local_64; uint local_60; uint local_5c; long local_58; ulong local_50; ulong local_48; int8 local_40; ulong local_38; int local_2c; ulong local_28; ulong local_20; uint local_14; int8 *local_10; int8 local_8; local_e8 = param_2; local_2c = param_6; local_28 = param_5; local_20 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; if (param_6 == 0) { if ((param_3 & param_3 - 1) == 0) { local_64 = ceil_log2((long)(int)param_3); local_5c = (uint)(0x40 / (long)local_64); local_58 = (long)(int)(local_5c * local_64); lVar1 = param_2[3]; lVar3 = smod(-param_2[2],(long)local_64,0x40 % (long)local_64 & 0xffffffff); local_68 = 0; local_50 = lVar1 * 0x40 + lVar3; } else { local_5c = (uint)(byte)digits_per_limb_table[(int)(param_3 - 2)]; uVar4 = get_limb_radix(param_3); local_e8 = local_e0; bf_init(*local_10,local_e8); uVar5 = (local_20 + (long)(int)local_5c) - 1; uVar6 = uVar5 / (ulong)(long)(int)local_5c; iVar2 = bf_resize(local_e8,uVar6,uVar5 % (ulong)(long)(int)local_5c); if (iVar2 != 0) { dbuf_set_error(local_8); goto LAB_001f7cb7; } iVar2 = bf_integer_to_radix(local_e8,local_10,uVar4); if (iVar2 != 0) { dbuf_set_error(local_8); goto LAB_001f7cb7; } local_64 = 0; local_58 = 1; local_68 = (int)uVar6 * local_5c - (int)local_20; local_50 = uVar6; } } else { local_5c = 0x13; local_64 = 0; local_58 = 1; local_68 = 0; local_50 = param_2[3]; } local_60 = local_5c; for (local_38 = 0; local_38 < local_20; local_38 = local_48 + local_38) { if (local_60 == local_5c) { local_50 = local_50 - local_58; if (local_64 == 0) { local_40 = get_limbz(local_e8,local_50); limb_to_a(local_b8,local_40,local_14,local_5c); } else { local_40 = get_bits(local_e8[4],local_e8[3],local_50); limb_to_a2(local_b8,local_40,local_64,local_5c); } local_60 = local_68; local_68 = 0; } if (local_38 < local_28) { local_48 = local_28; } else { if (local_38 == local_28) { dbuf_putc(local_8,0x2e); } local_48 = local_20; } local_48 = bf_min((long)(int)(local_5c - local_60),local_48 - local_38); dbuf_put(local_8,local_b8 + (int)local_60,local_48); local_60 = local_60 + (int)local_48; } LAB_001f7cb7: if (local_e8 != local_10) { bf_delete(local_e8); } return; }
65,792
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE FileDescriptor OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc, uint64_t& start_address, uint64_t& base_address, char* out_file_name, size_t out_file_name_size) { FileDescriptor maps_fd{ FailureRetry([] { return open("/proc/self/maps", O_RDONLY); })}; if (!maps_fd) { return nullptr; } FileDescriptor mem_fd{ FailureRetry([] { return open("/proc/self/mem", O_RDONLY); })}; if (!mem_fd) { return nullptr; } // Iterate over maps and look for the map containing the pc. Then // look into the symbol tables inside. char buf[1024]; // Big enough for line of sane /proc/self/maps LineReader reader(maps_fd.get(), buf, sizeof(buf), 0); while (true) { const char* cursor; const char* eol; if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. return nullptr; } // Start parsing line in /proc/self/maps. Here is an example: // // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat // // We want start address (08048000), end address (0804c000), flags // (r-xp) and file name (/bin/cat). // Read start address. cursor = GetHex(cursor, eol, &start_address); if (cursor == eol || *cursor != '-') { return nullptr; // Malformed line. } ++cursor; // Skip '-'. // Read end address. uint64_t end_address; cursor = GetHex(cursor, eol, &end_address); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Read flags. Skip flags until we encounter a space or eol. const char* const flags_start = cursor; while (cursor < eol && *cursor != ' ') { ++cursor; } // We expect at least four letters for flags (ex. "r-xp"). if (cursor == eol || cursor < flags_start + 4) { return nullptr; // Malformed line. } // Determine the base address by reading ELF headers in process memory. ElfW(Ehdr) ehdr; // Skip non-readable maps. if (flags_start[0] == 'r' && ReadFromOffsetExact(mem_fd.get(), &ehdr, sizeof(ElfW(Ehdr)), start_address) && memcmp(ehdr.e_ident, ELFMAG, SELFMAG) == 0) { switch (ehdr.e_type) { case ET_EXEC: base_address = 0; break; case ET_DYN: // Find the segment containing file offset 0. This will correspond // to the ELF header that we just read. Normally this will have // virtual address 0, but this is not guaranteed. We must subtract // the virtual address from the address where the ELF header was // mapped to get the base address. // // If we fail to find a segment for file offset 0, use the address // of the ELF header as the base address. base_address = start_address; for (unsigned i = 0; i != ehdr.e_phnum; ++i) { ElfW(Phdr) phdr; if (ReadFromOffsetExact( mem_fd.get(), &phdr, sizeof(phdr), start_address + ehdr.e_phoff + i * sizeof(phdr)) && phdr.p_type == PT_LOAD && phdr.p_offset == 0) { base_address = start_address - phdr.p_vaddr; break; } } break; default: // ET_REL or ET_CORE. These aren't directly executable, so they don't // affect the base address. break; } } // Check start and end addresses. if (start_address > pc || pc >= end_address) { continue; // We skip this map. PC isn't in this map. } // Check flags. We are only interested in "r*x" maps. if (flags_start[0] != 'r' || flags_start[2] != 'x') { continue; // We skip this map. } ++cursor; // Skip ' '. // Read file offset. uint64_t file_offset; cursor = GetHex(cursor, eol, &file_offset); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Skip to file name. "cursor" now points to dev. We need to // skip at least two spaces for dev and inode. int num_spaces = 0; while (cursor < eol) { if (*cursor == ' ') { ++num_spaces; } else if (num_spaces >= 2) { // The first non-space character after skipping two spaces // is the beginning of the file name. break; } ++cursor; } if (cursor == eol) { return nullptr; // Malformed line. } strncpy(out_file_name, cursor, out_file_name_size); // Making sure |out_file_name| is always null-terminated. out_file_name[out_file_name_size - 1] = '\0'; // Finally, "cursor" now points to file name of our interest. return FileDescriptor{ FailureRetry([cursor] { return open(cursor, O_RDONLY); })}; } }
O3
cpp
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4d8, %rsp # imm = 0x4D8 movq %r9, %r12 movq %r8, %r13 movq %rcx, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, %r15 leaq 0x39c7(%rip), %r14 # 0x250f0 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x73b0 cmpl $-0x1, %eax jne 0x21750 callq 0x7050 cmpl $0x4, (%rax) je 0x21729 movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x21a3f movl %eax, %ebx leaq 0x39a7(%rip), %r14 # 0x25100 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x73b0 movl %eax, %ebp cmpl $-0x1, %eax jne 0x21782 callq 0x7050 cmpl $0x4, (%rax) je 0x21759 movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x21a38 movq %r13, 0x28(%rsp) movq %r12, 0x30(%rsp) movq %r15, (%rsp) leaq 0xd0(%rsp), %r15 xorl %r12d, %r12d movq %r15, %r13 movq %r15, %r14 cmpq %r14, %r15 je 0x217d9 incq %r13 cmpq %r14, %r13 ja 0x21ae0 movq %r14, 0x18(%rsp) subq %r13, %r14 movq %r13, %rdi movl $0xa, %esi movq %r14, %rdx callq 0x75d0 testq %rax, %rax je 0x21804 movq %r13, %r15 movq 0x18(%rsp), %rdx jmp 0x21844 movl $0x400, %edx # imm = 0x400 movl %ebx, %edi movq %r15, %rsi movq %r12, %rcx callq 0x21305 testq %rax, %rax jle 0x21a27 addq %rax, %r12 leaq (%rsp,%rax), %rdx addq $0xd0, %rdx jmp 0x21844 movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x7900 leaq (%rsp,%r14), %rsi addq $0xd0, %rsi movl $0x400, %edx # imm = 0x400 subq %r14, %rdx movl %ebx, %edi movq %rsi, %r14 movq %r12, %rcx callq 0x21305 testq %rax, %rax jle 0x21a27 addq %rax, %r12 addq %rax, %r14 movq %r14, %rdx movq %rdx, 0x18(%rsp) subq %r15, %rdx movq %r15, %rdi movl $0xa, %esi callq 0x75d0 testq %rax, %rax je 0x21a27 movq %rax, %r13 movb $0x0, (%rax) movq %r15, %rdi movq %rax, %rsi movq 0x8(%rsp), %rdx callq 0x21bf3 cmpq %r13, %rax je 0x21a27 cmpb $0x2d, (%rax) jne 0x21a27 incq %rax movq %rax, %rdi movq %r13, %rsi leaq 0x50(%rsp), %rdx callq 0x21bf3 cmpq %r13, %rax je 0x21a27 movq %rax, %r14 cmpb $0x20, (%rax) jne 0x21a27 leaq 0x1(%r14), %rdx cmpq %r13, %rdx jae 0x21a27 movq %r13, %rcx subq %r14, %rcx movl $0x1, %eax cmpb $0x20, (%r14,%rax) je 0x218e1 incq %rax cmpq %rax, %rcx jne 0x218ca movq %rcx, %rax movq %r13, %rcx jmp 0x218e7 movq %r14, %rcx addq %rax, %rcx cmpq $0x5, %rax jb 0x21a27 cmpq %r13, %rcx je 0x21a27 movq %rcx, 0x38(%rsp) movq %r12, 0x48(%rsp) movq %rdx, 0x40(%rsp) cmpb $0x72, (%rdx) jne 0x219e4 movq 0x8(%rsp), %rax movq (%rax), %rcx movl $0x40, %edx movl %ebp, %edi leaq 0x90(%rsp), %rsi callq 0x21305 cmpq $0x40, %rax jne 0x219e4 cmpl $0x464c457f, 0x90(%rsp) # imm = 0x464C457F jne 0x219e4 movzwl 0xa0(%rsp), %eax cmpl $0x2, %eax je 0x219c1 cmpl $0x3, %eax jne 0x219e4 movq 0x8(%rsp), %rax movq (%rax), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movzwl 0xc8(%rsp), %r12d testq %r12, %r12 je 0x219e4 movq 0xb0(%rsp), %r15 movq 0x8(%rsp), %rax movq (%rax), %rcx addq %r15, %rcx movl $0x38, %edx movl %ebp, %edi leaq 0x58(%rsp), %rsi callq 0x21305 cmpq $0x38, %rax jne 0x219b6 cmpl $0x1, 0x58(%rsp) jne 0x219b6 cmpq $0x0, 0x60(%rsp) je 0x219cf addq $0x38, %r15 decq %r12 jne 0x21985 jmp 0x219e4 movq 0x10(%rsp), %rax movq $0x0, (%rax) jmp 0x219e4 movq 0x8(%rsp), %rax movq (%rax), %rax subq 0x68(%rsp), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movq 0x8(%rsp), %rax movq 0x20(%rsp), %rcx cmpq %rcx, (%rax) ja 0x21a10 movq 0x20(%rsp), %rax cmpq %rax, 0x50(%rsp) jbe 0x21a10 movq 0x40(%rsp), %rax cmpb $0x72, (%rax) jne 0x21a10 cmpb $0x78, 0x3(%r14) je 0x21a51 leaq 0xd0(%rsp), %r15 movq 0x48(%rsp), %r12 movq 0x18(%rsp), %r14 jmp 0x217a1 movq (%rsp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl %ebp, %edi callq 0x7a60 movl %ebx, %edi callq 0x7a60 addq $0x4d8, %rsp # imm = 0x4D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rdi incq %rdi leaq 0x58(%rsp), %rdx movq %r13, %rsi callq 0x21bf3 movq %rax, %rcx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %r13, %rcx je 0x21ad4 cmpb $0x20, (%rcx) jne 0x21ad4 leaq 0x1(%rcx), %r14 cmpq %r13, %r14 jae 0x21aa3 notq %rcx addq %r13, %rcx xorl %edx, %edx cmpb $0x20, (%r14) jne 0x21a93 incl %edx jmp 0x21a98 cmpl $0x1, %edx jg 0x21aa3 incq %r14 decq %rcx jne 0x21a89 movq %r13, %r14 cmpq %r13, %r14 movq (%rsp), %r15 je 0x21ad8 movq 0x28(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi movq 0x30(%rsp), %r12 movq %r12, %rdx callq 0x7240 movb $0x0, -0x1(%r13,%r12) movq %r14, %rdi callq 0x21c6c jmp 0x21ad8 movq (%rsp), %r15 movl %eax, (%r15) jmp 0x21a31 callq 0x72b0 jmp 0x21aef jmp 0x21b0f jmp 0x21aef jmp 0x21b0f jmp 0x21aef movq %rax, %r14 movl %ebp, %edi callq 0x7a60 jmp 0x21b00 jmp 0x21b0f movq %rax, %r14 movl %ebx, %edi callq 0x7a60 movq %r14, %rdi callq 0x79b0 movq %rax, %rdi callq 0x9717
_ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4D8h mov r12, r9 mov r13, r8 mov [rsp+508h+var_4F8], rcx mov [rsp+508h+var_500], rdx mov [rsp+508h+var_4E8], rsi mov r15, rdi lea r14, aProcSelfMaps; "/proc/self/maps" loc_21729: mov rdi, r14 xor esi, esi xor eax, eax call _open cmp eax, 0FFFFFFFFh jnz short loc_21750 call ___errno_location cmp dword ptr [rax], 4 jz short loc_21729 mov dword ptr [r15], 0FFFFFFFFh jmp loc_21A3F loc_21750: mov ebx, eax lea r14, aProcSelfMem; "/proc/self/mem" loc_21759: mov rdi, r14 xor esi, esi xor eax, eax call _open mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_21782 call ___errno_location cmp dword ptr [rax], 4 jz short loc_21759 mov dword ptr [r15], 0FFFFFFFFh jmp loc_21A38 loc_21782: mov [rsp+508h+var_4E0], r13 mov [rsp+508h+var_4D8], r12 mov [rsp+508h+var_508], r15 lea r15, [rsp+508h+var_438] xor r12d, r12d mov r13, r15 mov r14, r15 loc_217A1: cmp r15, r14 jz short loc_217D9 inc r13 cmp r13, r14 ja loc_21AE0 mov [rsp+508h+var_4F0], r14 sub r14, r13 mov rdi, r13 mov esi, 0Ah mov rdx, r14 call _memchr test rax, rax jz short loc_21804 mov r15, r13 mov rdx, [rsp+508h+var_4F0] jmp short loc_21844 loc_217D9: mov edx, offset stru_3F0.st_size; void * mov edi, ebx; this mov rsi, r15; int mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_21A27 add r12, rax lea rdx, [rsp+rax+508h+var_508] add rdx, 0D0h jmp short loc_21844 loc_21804: mov rdi, r15 mov rsi, r13 mov rdx, r14 call _memmove lea rsi, [rsp+r14+508h+var_508] add rsi, 0D0h; int mov edx, 400h sub rdx, r14; void * mov edi, ebx; this mov r14, rsi mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_21A27 add r12, rax add r14, rax mov rdx, r14 loc_21844: mov [rsp+508h+var_4F0], rdx sub rdx, r15 mov rdi, r15 mov esi, 0Ah call _memchr test rax, rax jz loc_21A27 mov r13, rax mov byte ptr [rax], 0 mov rdi, r15; this mov rsi, rax; char * mov rdx, [rsp+508h+var_500]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_21A27 cmp byte ptr [rax], 2Dh ; '-' jnz loc_21A27 inc rax mov rdi, rax; this mov rsi, r13; char * lea rdx, [rsp+508h+var_4B8]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_21A27 mov r14, rax cmp byte ptr [rax], 20h ; ' ' jnz loc_21A27 lea rdx, [r14+1] cmp rdx, r13 jnb loc_21A27 mov rcx, r13 sub rcx, r14 mov eax, 1 loc_218CA: cmp byte ptr [r14+rax], 20h ; ' ' jz short loc_218E1 inc rax cmp rcx, rax jnz short loc_218CA mov rax, rcx mov rcx, r13 jmp short loc_218E7 loc_218E1: mov rcx, r14 add rcx, rax loc_218E7: cmp rax, 5 jb loc_21A27 cmp rcx, r13 jz loc_21A27 mov [rsp+508h+var_4D0], rcx mov [rsp+508h+var_4C0], r12 mov [rsp+508h+var_4C8], rdx cmp byte ptr [rdx], 72h ; 'r' jnz loc_219E4 mov rax, [rsp+508h+var_500] mov rcx, [rax]; unsigned __int64 mov edx, offset dword_40; void * mov edi, ebp; this lea rsi, [rsp+508h+var_478]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_219E4 cmp [rsp+508h+var_478], 464C457Fh jnz loc_219E4 movzx eax, [rsp+508h+var_468] cmp eax, 2 jz short loc_219C1 cmp eax, 3 jnz loc_219E4 mov rax, [rsp+508h+var_500] mov rax, [rax] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax movzx r12d, [rsp+508h+var_440] test r12, r12 jz short loc_219E4 mov r15, [rsp+508h+var_458] loc_21985: mov rax, [rsp+508h+var_500] mov rcx, [rax] add rcx, r15; unsigned __int64 mov edx, offset word_38; void * mov edi, ebp; this lea rsi, [rsp+508h+var_4B0]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 38h ; '8' jnz short loc_219B6 cmp dword ptr [rsp+508h+var_4B0], 1 jnz short loc_219B6 cmp [rsp+508h+var_4A8], 0 jz short loc_219CF loc_219B6: add r15, 38h ; '8' dec r12 jnz short loc_21985 jmp short loc_219E4 loc_219C1: mov rax, [rsp+508h+var_4F8] mov qword ptr [rax], 0 jmp short loc_219E4 loc_219CF: mov rax, [rsp+508h+var_500] mov rax, [rax] sub rax, [rsp+508h+var_4A0] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax loc_219E4: mov rax, [rsp+508h+var_500] mov rcx, [rsp+508h+var_4E8]; unsigned __int64 * cmp [rax], rcx ja short loc_21A10 mov rax, [rsp+508h+var_4E8] cmp qword ptr [rsp+508h+var_4B8], rax jbe short loc_21A10 mov rax, [rsp+508h+var_4C8] cmp byte ptr [rax], 72h ; 'r' jnz short loc_21A10 cmp byte ptr [r14+3], 78h ; 'x' jz short loc_21A51 loc_21A10: lea r15, [rsp+508h+var_438] mov r12, [rsp+508h+var_4C0] mov r14, [rsp+508h+var_4F0] jmp loc_217A1 loc_21A27: mov rax, [rsp+508h+var_508] mov dword ptr [rax], 0FFFFFFFFh loc_21A31: mov edi, ebp call _close loc_21A38: mov edi, ebx call _close loc_21A3F: add rsp, 4D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_21A51: mov rdi, [rsp+508h+var_4D0] inc rdi; this lea rdx, [rsp+508h+var_4B0]; char * mov rsi, r13; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) mov rcx, rax mov eax, 0FFFFFFFFh cmp rcx, r13 jz short loc_21AD4 cmp byte ptr [rcx], 20h ; ' ' jnz short loc_21AD4 lea r14, [rcx+1] cmp r14, r13 jnb short loc_21AA3 not rcx add rcx, r13 xor edx, edx loc_21A89: cmp byte ptr [r14], 20h ; ' ' jnz short loc_21A93 inc edx jmp short loc_21A98 loc_21A93: cmp edx, 1 jg short loc_21AA3 loc_21A98: inc r14 dec rcx jnz short loc_21A89 mov r14, r13 loc_21AA3: cmp r14, r13 mov r15, [rsp+508h+var_508] jz short loc_21AD8 mov r13, [rsp+508h+var_4E0] mov rdi, r13 mov rsi, r14 mov r12, [rsp+508h+var_4D8] mov rdx, r12 call _strncpy mov byte ptr [r13+r12-1], 0 mov rdi, r14 call _ZN5nglog5tools12_GLOBAL__N_112FailureRetryIZNS0_L44OpenObjectFileContainingPcAndGetStartAddressEmRmS3_PcmE3$_2EEDaT_i jmp short loc_21AD8 loc_21AD4: mov r15, [rsp+508h+var_508] loc_21AD8: mov [r15], eax jmp loc_21A31 loc_21AE0: call _abort jmp short loc_21AEF jmp short loc_21B0F jmp short loc_21AEF jmp short loc_21B0F jmp short $+2 loc_21AEF: mov r14, rax mov edi, ebp call _close jmp short loc_21B00 jmp short loc_21B0F mov r14, rax loc_21B00: mov edi, ebx call _close mov rdi, r14 call __Unwind_Resume loc_21B0F: mov rdi, rax call __clang_call_terminate
_DWORD * nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( nglog::tools *this, unsigned long long *a2, const char *a3, unsigned long long *a4, char *a5, long long a6) { unsigned int v9; // eax long long v10; // rdx _DWORD *result; // rax unsigned int v12; // ebx unsigned long long v13; // rdi unsigned int v14; // ebp int *v15; // r15 long long v16; // r12 int *v17; // r13 int *i; // r14 int *v19; // r13 char *v20; // r14 char *v21; // rdx signed long long v22; // rax char *v23; // rdx char *v24; // r14 signed long long v25; // rax const char *v26; // rax unsigned long long *v27; // rcx int *Hex; // rax unsigned long long *v29; // rcx int *v30; // rax int *v31; // r14 _BYTE *v32; // rdx signed long long v33; // rcx unsigned long long v34; // rax int *v35; // rcx long long v36; // r12 long long v37; // r15 long long v38; // rcx int v39; // eax int *v40; // r14 char *v41; // rcx int v42; // edx _DWORD *v43; // r15 nglog::tools *v44; // [rsp+0h] [rbp-508h] int *v47; // [rsp+18h] [rbp-4F0h] int *v48; // [rsp+18h] [rbp-4F0h] char *v49; // [rsp+28h] [rbp-4E0h] long long v50; // [rsp+30h] [rbp-4D8h] int *v51; // [rsp+38h] [rbp-4D0h] long long v52; // [rsp+48h] [rbp-4C0h] char v53[8]; // [rsp+50h] [rbp-4B8h] BYREF char v54[8]; // [rsp+58h] [rbp-4B0h] BYREF long long v55; // [rsp+60h] [rbp-4A8h] long long v56; // [rsp+68h] [rbp-4A0h] int v57[4]; // [rsp+90h] [rbp-478h] BYREF __int16 v58; // [rsp+A0h] [rbp-468h] long long v59; // [rsp+B0h] [rbp-458h] unsigned __int16 v60; // [rsp+C8h] [rbp-440h] int v61[270]; // [rsp+D0h] [rbp-438h] BYREF while ( 1 ) { v9 = open("/proc/self/maps", 0LL, a3); if ( v9 != -1 ) break; result = (_DWORD *)__errno_location("/proc/self/maps"); if ( *result != 4 ) { *(_DWORD *)this = -1; return result; } } v12 = v9; while ( 1 ) { v13 = (unsigned long long)"/proc/self/mem"; v14 = open("/proc/self/mem", 0LL, v10); if ( v14 != -1 ) break; if ( *(_DWORD *)__errno_location("/proc/self/mem") != 4 ) { *(_DWORD *)this = -1; return (_DWORD *)close(v12); } } v49 = a5; v50 = a6; v44 = this; v15 = v61; v16 = 0LL; v17 = v61; for ( i = v61; ; i = v48 ) { if ( v61 == i ) { v22 = nglog::tools::ReadFromOffset(v12, (long long)v61, (char *)&stru_3F0.st_size, v16); if ( v22 <= 0 ) goto LABEL_49; v16 += v22; v21 = (char *)v61 + v22; } else { v19 = (int *)((char *)v17 + 1); if ( v19 > i ) abort(v13); v47 = i; v20 = (char *)((char *)i - (char *)v19); if ( memchr(v19, 10LL, v20) ) { v15 = v19; v21 = (char *)v47; } else { memmove(v61, v19, v20); v23 = (char *)(1024LL - (_QWORD)v20); v24 = (char *)v61 + (_QWORD)v20; v25 = nglog::tools::ReadFromOffset(v12, (long long)v24, v23, v16); if ( v25 <= 0 ) goto LABEL_49; v16 += v25; v21 = &v24[v25]; } } v48 = (int *)v21; v26 = (const char *)memchr(v15, 10LL, v21 - (char *)v15); if ( !v26 ) goto LABEL_49; v17 = (int *)v26; *v26 = 0; Hex = (int *)nglog::tools::GetHex((nglog::tools *)v15, v26, a3, v27); if ( Hex == v17 ) goto LABEL_49; if ( *(_BYTE *)Hex != 45 ) goto LABEL_49; v13 = (unsigned long long)Hex + 1; v30 = (int *)nglog::tools::GetHex((nglog::tools *)((char *)Hex + 1), (const char *)v17, v53, v29); if ( v30 == v17 ) goto LABEL_49; v31 = v30; if ( *(_BYTE *)v30 != 32 ) goto LABEL_49; v32 = (char *)v30 + 1; if ( (int *)((char *)v30 + 1) >= v17 ) goto LABEL_49; v33 = (char *)v17 - (char *)v30; v34 = 1LL; while ( *((_BYTE *)v31 + v34) != 32 ) { if ( v33 == ++v34 ) { v34 = (char *)v17 - (char *)v31; v35 = v17; goto LABEL_28; } } v35 = (int *)((char *)v31 + v34); LABEL_28: if ( v34 < 5 || v35 == v17 ) { LABEL_49: *(_DWORD *)v44 = -1; goto LABEL_50; } v51 = v35; v52 = v16; if ( *v32 == 114 ) { v13 = v14; if ( nglog::tools::ReadFromOffset(v14, (long long)v57, (char *)&dword_40, *(_QWORD *)a3) == 64 && v57[0] == 1179403647 ) { if ( v58 == 2 ) { *a4 = 0LL; } else if ( v58 == 3 ) { *a4 = *(_QWORD *)a3; v36 = v60; if ( v60 ) { v37 = v59; while ( 1 ) { v13 = v14; if ( nglog::tools::ReadFromOffset(v14, (long long)v54, (char *)&word_38, v37 + *(_QWORD *)a3) == 56 && *(_DWORD *)v54 == 1 && !v55 ) { break; } v37 += 56LL; if ( !--v36 ) goto LABEL_44; } *a4 = *(_QWORD *)a3 - v56; } } } } LABEL_44: if ( *(_QWORD *)a3 <= (unsigned long long)a2 && *(_QWORD *)v53 > (unsigned long long)a2 && *((_BYTE *)v31 + 1) == 114 && *((_BYTE *)v31 + 3) == 120 ) { break; } v15 = v61; v16 = v52; } v38 = nglog::tools::GetHex((nglog::tools *)((char *)v51 + 1), (const char *)v17, v54, a2); v39 = -1; if ( (int *)v38 == v17 || *(_BYTE *)v38 != 32 ) { v43 = v44; } else { v40 = (int *)(v38 + 1); if ( v38 + 1 < (unsigned long long)v17 ) { v41 = (char *)v17 + ~v38; v42 = 0; do { if ( *(_BYTE *)v40 == 32 ) { ++v42; } else if ( v42 > 1 ) { goto LABEL_61; } v40 = (int *)((char *)v40 + 1); --v41; } while ( v41 ); v40 = v17; } LABEL_61: v43 = v44; if ( v40 != v17 ) { strncpy(v49, v40, v50); v49[v50 - 1] = 0; v39 = nglog::tools::`anonymous namespace'::FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long,unsigned long &,unsigned long &,char *,unsigned long)::$_2>(v40); } } *v43 = v39; LABEL_50: close(v14); return (_DWORD *)close(v12); }
OpenObjectFileContainingPcAndGetStartAddress: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x4d8 MOV R12,R9 MOV R13,R8 MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x20],RSI MOV R15,RDI LEA R14,[0x1250f0] LAB_00121729: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x001073b0 CMP EAX,-0x1 JNZ 0x00121750 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x00121729 MOV dword ptr [R15],0xffffffff JMP 0x00121a3f LAB_00121750: MOV EBX,EAX LEA R14,[0x125100] LAB_00121759: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x001073b0 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x00121782 CALL 0x00107050 CMP dword ptr [RAX],0x4 JZ 0x00121759 MOV dword ptr [R15],0xffffffff JMP 0x00121a38 LAB_00121782: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x30],R12 MOV qword ptr [RSP],R15 LEA R15,[RSP + 0xd0] XOR R12D,R12D MOV R13,R15 MOV R14,R15 LAB_001217a1: CMP R15,R14 JZ 0x001217d9 INC R13 CMP R13,R14 JA 0x00121ae0 MOV qword ptr [RSP + 0x18],R14 SUB R14,R13 MOV RDI,R13 MOV ESI,0xa MOV RDX,R14 CALL 0x001075d0 TEST RAX,RAX JZ 0x00121804 MOV R15,R13 MOV RDX,qword ptr [RSP + 0x18] JMP 0x00121844 LAB_001217d9: MOV EDX,0x400 MOV EDI,EBX MOV RSI,R15 MOV RCX,R12 CALL 0x00121305 LAB_001217eb: TEST RAX,RAX JLE 0x00121a27 ADD R12,RAX LEA RDX,[RSP + RAX*0x1] ADD RDX,0xd0 JMP 0x00121844 LAB_00121804: MOV RDI,R15 MOV RSI,R13 MOV RDX,R14 CALL 0x00107900 LEA RSI,[RSP + R14*0x1] ADD RSI,0xd0 MOV EDX,0x400 SUB RDX,R14 LAB_00121825: MOV EDI,EBX MOV R14,RSI MOV RCX,R12 CALL 0x00121305 TEST RAX,RAX JLE 0x00121a27 ADD R12,RAX ADD R14,RAX MOV RDX,R14 LAB_00121844: MOV qword ptr [RSP + 0x18],RDX SUB RDX,R15 MOV RDI,R15 MOV ESI,0xa CALL 0x001075d0 TEST RAX,RAX JZ 0x00121a27 MOV R13,RAX MOV byte ptr [RAX],0x0 MOV RDI,R15 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x8] CALL 0x00121bf3 CMP RAX,R13 JZ 0x00121a27 CMP byte ptr [RAX],0x2d JNZ 0x00121a27 INC RAX MOV RDI,RAX MOV RSI,R13 LEA RDX,[RSP + 0x50] CALL 0x00121bf3 CMP RAX,R13 JZ 0x00121a27 MOV R14,RAX CMP byte ptr [RAX],0x20 JNZ 0x00121a27 LEA RDX,[R14 + 0x1] CMP RDX,R13 JNC 0x00121a27 MOV RCX,R13 SUB RCX,R14 MOV EAX,0x1 LAB_001218ca: CMP byte ptr [R14 + RAX*0x1],0x20 JZ 0x001218e1 INC RAX CMP RCX,RAX JNZ 0x001218ca MOV RAX,RCX MOV RCX,R13 JMP 0x001218e7 LAB_001218e1: MOV RCX,R14 ADD RCX,RAX LAB_001218e7: CMP RAX,0x5 JC 0x00121a27 CMP RCX,R13 JZ 0x00121a27 MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x48],R12 MOV qword ptr [RSP + 0x40],RDX CMP byte ptr [RDX],0x72 JNZ 0x001219e4 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_0012191a: MOV EDX,0x40 MOV EDI,EBP LEA RSI,[RSP + 0x90] CALL 0x00121305 CMP RAX,0x40 JNZ 0x001219e4 CMP dword ptr [RSP + 0x90],0x464c457f JNZ 0x001219e4 MOVZX EAX,word ptr [RSP + 0xa0] CMP EAX,0x2 JZ 0x001219c1 CMP EAX,0x3 JNZ 0x001219e4 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX MOVZX R12D,word ptr [RSP + 0xc8] TEST R12,R12 JZ 0x001219e4 MOV R15,qword ptr [RSP + 0xb0] LAB_00121985: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] ADD RCX,R15 LAB_00121990: MOV EDX,0x38 MOV EDI,EBP LEA RSI,[RSP + 0x58] CALL 0x00121305 CMP RAX,0x38 JNZ 0x001219b6 CMP dword ptr [RSP + 0x58],0x1 JNZ 0x001219b6 CMP qword ptr [RSP + 0x60],0x0 JZ 0x001219cf LAB_001219b6: ADD R15,0x38 DEC R12 JNZ 0x00121985 JMP 0x001219e4 LAB_001219c1: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],0x0 JMP 0x001219e4 LAB_001219cf: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX LAB_001219e4: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],RCX JA 0x00121a10 MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RSP + 0x50],RAX JBE 0x00121a10 MOV RAX,qword ptr [RSP + 0x40] CMP byte ptr [RAX],0x72 JNZ 0x00121a10 CMP byte ptr [R14 + 0x3],0x78 JZ 0x00121a51 LAB_00121a10: LEA R15,[RSP + 0xd0] MOV R12,qword ptr [RSP + 0x48] MOV R14,qword ptr [RSP + 0x18] JMP 0x001217a1 LAB_00121a27: MOV RAX,qword ptr [RSP] MOV dword ptr [RAX],0xffffffff LAB_00121a31: MOV EDI,EBP CALL 0x00107a60 LAB_00121a38: MOV EDI,EBX CALL 0x00107a60 LAB_00121a3f: ADD RSP,0x4d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00121a51: MOV RDI,qword ptr [RSP + 0x38] INC RDI LEA RDX,[RSP + 0x58] MOV RSI,R13 CALL 0x00121bf3 MOV RCX,RAX MOV EAX,0xffffffff CMP RCX,R13 JZ 0x00121ad4 CMP byte ptr [RCX],0x20 JNZ 0x00121ad4 LEA R14,[RCX + 0x1] CMP R14,R13 JNC 0x00121aa3 NOT RCX ADD RCX,R13 XOR EDX,EDX LAB_00121a89: CMP byte ptr [R14],0x20 JNZ 0x00121a93 INC EDX JMP 0x00121a98 LAB_00121a93: CMP EDX,0x1 JG 0x00121aa3 LAB_00121a98: INC R14 DEC RCX JNZ 0x00121a89 MOV R14,R13 LAB_00121aa3: CMP R14,R13 MOV R15,qword ptr [RSP] JZ 0x00121ad8 MOV R13,qword ptr [RSP + 0x28] MOV RDI,R13 MOV RSI,R14 MOV R12,qword ptr [RSP + 0x30] MOV RDX,R12 CALL 0x00107240 MOV byte ptr [R13 + R12*0x1 + -0x1],0x0 LAB_00121aca: MOV RDI,R14 CALL 0x00121c6c JMP 0x00121ad8 LAB_00121ad4: MOV R15,qword ptr [RSP] LAB_00121ad8: MOV dword ptr [R15],EAX JMP 0x00121a31 LAB_00121ae0: CALL 0x001072b0
/* nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long) */ void __thiscall nglog::tools::OpenObjectFileContainingPcAndGetStartAddress (tools *this,ulong param_1,ulong *param_2,ulong *param_3,char *param_4,ulong param_5) { int __fd; int __fd_00; int4 uVar1; int *piVar2; void *pvVar3; char *pcVar4; ulong uVar5; long lVar6; long lVar7; char *pcVar8; ulong uVar9; char *pcVar10; int iVar11; ulong uVar12; char *pcVar13; size_t __n; char *pcVar14; ulong local_4b8; int local_4b0 [2]; long local_4a8; long local_4a0; int local_478 [4]; short local_468; long local_458; ushort local_440; char local_438 [1032]; while (__fd = open("/proc/self/maps",0), __fd == -1) { piVar2 = __errno_location(); if (*piVar2 != 4) { *(int4 *)this = 0xffffffff; return; } } do { /* try { // try from 00121759 to 00121764 has its CatchHandler @ 00121afd */ __fd_00 = open("/proc/self/mem",0); if (__fd_00 != -1) { pcVar4 = local_438; uVar12 = 0; pcVar8 = pcVar4; goto LAB_001217a1; } piVar2 = __errno_location(); } while (*piVar2 == 4); *(int4 *)this = 0xffffffff; goto LAB_00121a38; LAB_001217a1: do { if (local_438 == pcVar8) { /* try { // try from 001217d9 to 001217ea has its CatchHandler @ 00121aed */ lVar6 = ReadFromOffset(__fd,local_438,0x400,uVar12); if (0 < lVar6) { uVar12 = uVar12 + lVar6; pcVar8 = local_438 + lVar6; pcVar13 = local_438; goto LAB_00121844; } LAB_00121a27: *(int4 *)this = 0xffffffff; goto LAB_00121a31; } pcVar13 = pcVar4 + 1; if (pcVar8 < pcVar13) { /* WARNING: Subroutine does not return */ abort(); } __n = (long)pcVar8 - (long)pcVar13; pvVar3 = memchr(pcVar13,10,__n); if (pvVar3 == (void *)0x0) { memmove(local_438,pcVar13,__n); /* try { // try from 00121825 to 00121831 has its CatchHandler @ 00121aed */ lVar6 = ReadFromOffset(__fd,local_438 + __n,0x400 - __n,uVar12); if (lVar6 < 1) goto LAB_00121a27; uVar12 = uVar12 + lVar6; pcVar8 = local_438 + __n + lVar6; pcVar13 = local_438; } LAB_00121844: pcVar4 = (char *)memchr(pcVar13,10,(long)pcVar8 - (long)pcVar13); if (pcVar4 == (char *)0x0) goto LAB_00121a27; *pcVar4 = '\0'; pcVar13 = (char *)GetHex(pcVar13,pcVar4,param_2); if ((((pcVar13 == pcVar4) || (*pcVar13 != '-')) || (pcVar13 = (char *)GetHex(pcVar13 + 1,pcVar4,&local_4b8), pcVar13 == pcVar4)) || ((*pcVar13 != ' ' || (pcVar14 = pcVar13 + 1, pcVar4 <= pcVar14)))) goto LAB_00121a27; uVar9 = (long)pcVar4 - (long)pcVar13; uVar5 = 1; do { if (pcVar13[uVar5] == ' ') { uVar9 = uVar5; pcVar10 = pcVar13 + uVar5; break; } uVar5 = uVar5 + 1; pcVar10 = pcVar4; } while (uVar9 != uVar5); if ((uVar9 < 5) || (pcVar10 == pcVar4)) goto LAB_00121a27; /* try { // try from 0012191a to 0012192d has its CatchHandler @ 00121ae9 */ if (((*pcVar14 == 'r') && (lVar6 = ReadFromOffset(__fd_00,local_478,0x40,*param_2), lVar6 == 0x40)) && (local_478[0] == 0x464c457f)) { if (local_468 == 2) { *param_3 = 0; } else if (local_468 == 3) { *param_3 = *param_2; lVar6 = local_458; for (uVar9 = (ulong)local_440; uVar9 != 0; uVar9 = uVar9 - 1) { /* try { // try from 00121990 to 001219a0 has its CatchHandler @ 00121aef */ lVar7 = ReadFromOffset(__fd_00,local_4b0,0x38,*param_2 + lVar6); if (((lVar7 == 0x38) && (local_4b0[0] == 1)) && (local_4a8 == 0)) { *param_3 = *param_2 - local_4a0; break; } lVar6 = lVar6 + 0x38; } } } } while (((param_1 < *param_2) || (local_4b8 <= param_1)) || ((*pcVar14 != 'r' || (pcVar13[3] != 'x')))); pcVar8 = (char *)GetHex(pcVar10 + 1,pcVar4,(ulong *)local_4b0); uVar1 = 0xffffffff; if ((pcVar8 != pcVar4) && (*pcVar8 == ' ')) { pcVar13 = pcVar8 + 1; pcVar14 = pcVar13; if (pcVar13 < pcVar4) { pcVar8 = pcVar4 + ~(ulong)pcVar8; iVar11 = 0; do { if (*pcVar13 == ' ') { iVar11 = iVar11 + 1; } else { pcVar14 = pcVar13; if (1 < iVar11) break; } pcVar13 = pcVar13 + 1; pcVar8 = pcVar8 + -1; pcVar14 = pcVar4; } while (pcVar8 != (char *)0x0); } if (pcVar14 != pcVar4) { strncpy(param_4,pcVar14,param_5); param_4[param_5 - 1] = '\0'; /* try { // try from 00121aca to 00121ad1 has its CatchHandler @ 00121ae5 */ uVar1 = (anonymous_namespace):: FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned_long,unsigned_long&,unsigned_long&,char*,unsigned_long)::__2> (pcVar14); } } *(int4 *)this = uVar1; LAB_00121a31: /* try { // try from 00121a31 to 00121a37 has its CatchHandler @ 00121ae7 */ close(__fd_00); LAB_00121a38: /* try { // try from 00121a38 to 00121a3e has its CatchHandler @ 00121aeb */ close(__fd); return; }
65,793
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint()
monkey531[P]llama/common/./json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint(): pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x32282 leaq 0x14(%rdi), %rsi leaq 0xc(%rsp), %rbx movq %rbx, %rdx callq 0x1b1f9 movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq leaq 0x82ead(%rip), %rdi # 0xb5136 leaq 0x82ef2(%rip), %rdx # 0xb5182 leaq 0x83bd0(%rip), %rcx # 0xb5e67 movl $0x1d79, %esi # imm = 0x1D79 xorl %eax, %eax callq 0x19b30 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_32282 lea rsi, [rdi+14h] lea rbx, [rsp+18h+var_C] mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void) [clone] mov eax, [rbx] add rsp, 10h pop rbx retn loc_32282: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 unsigned int v14[3]; // [rsp+Ch] [rbp-Ch] BYREF if ( a1[1].m128i_i32[1] == 117 ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( a1, &a1[1].m128i_u32[1], v14); return v14[0]; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 7545LL, v10, v11, v12, v13, a7, a8, a9); } }
get_codepoint: PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x00132282 LEA RSI,[RDI + 0x14] LEA RBX,[RSP + 0xc] MOV RDX,RBX CALL 0x0011b1f9 MOV EAX,dword ptr [RBX] ADD RSP,0x10 POP RBX RET LAB_00132282: LEA RDI,[0x1b5136] LEA RDX,[0x1b5182] LEA RCX,[0x1b5e67] MOV ESI,0x1d79 XOR EAX,EAX CALL 0x00119b30
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_codepoint() */ int4 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int4 local_c; if (*(int *)(this + 0x14) == 0x75) { get_codepoint(); return local_c; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",0x1d79, "GGML_ASSERT(%s) failed","current == \'u\'"); }
65,794
testing::TestSuite::TestPassed(testing::TestInfo const*)
AlayaLite/build_O3/_deps/googletest-src/googletest/include/gtest/gtest.h
static bool TestPassed(const TestInfo* test_info) { return test_info->should_run() && test_info->result()->Passed(); }
O3
c
testing::TestSuite::TestPassed(testing::TestInfo const*): cmpb $0x1, 0x80(%rdi) jne 0x7612c pushq %rbx movq %rdi, %rbx addq $0x90, %rbx movq %rbx, %rdi callq 0x61924 testb %al, %al je 0x7612f xorl %eax, %eax jmp 0x76139 xorl %eax, %eax retq movq %rbx, %rdi callq 0x61960 xorb $0x1, %al popq %rbx retq
_ZN7testing9TestSuite10TestPassedEPKNS_8TestInfoE: cmp byte ptr [rdi+80h], 1 jnz short loc_7612C push rbx mov rbx, rdi add rbx, 90h mov rdi, rbx; this call _ZNK7testing10TestResult7SkippedEv; testing::TestResult::Skipped(void) test al, al jz short loc_7612F xor eax, eax jmp short loc_76139 loc_7612C: xor eax, eax retn loc_7612F: mov rdi, rbx; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) xor al, 1 loc_76139: pop rbx retn
bool testing::TestSuite::TestPassed(testing::TestSuite *this, const testing::TestInfo *a2) { if ( *((_BYTE *)this + 128) != 1 ) return 0; if ( testing::TestResult::Skipped((testing::TestSuite *)((char *)this + 144)) ) return 0; return !testing::TestResult::Failed((testing::TestSuite *)((char *)this + 144)); }
TestPassed: CMP byte ptr [RDI + 0x80],0x1 JNZ 0x0017612c PUSH RBX MOV RBX,RDI ADD RBX,0x90 MOV RDI,RBX CALL 0x00161924 TEST AL,AL JZ 0x0017612f XOR EAX,EAX JMP 0x00176139 LAB_0017612c: XOR EAX,EAX RET LAB_0017612f: MOV RDI,RBX CALL 0x00161960 XOR AL,0x1 LAB_00176139: POP RBX RET
/* testing::TestSuite::TestPassed(testing::TestInfo const*) */ ulong testing::TestSuite::TestPassed(TestInfo *param_1) { char cVar1; ulong uVar2; if (param_1[0x80] == (TestInfo)0x1) { cVar1 = TestResult::Skipped((TestResult *)(param_1 + 0x90)); if (cVar1 == '\0') { uVar2 = TestResult::Failed((TestResult *)(param_1 + 0x90)); uVar2 = uVar2 ^ 1; } else { uVar2 = 0; } return uVar2; } return 0; }
65,795
item_registry::find(char const*)
untodesu[P]voxelius/game/shared/item_registry.cc
ItemInfo *item_registry::find(const char *name) { const auto it = item_registry::names.find(name); if(it != item_registry::names.cend()) return item_registry::find(it->second); return nullptr; }
O0
cpp
item_registry::find(char const*): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) leaq -0x39(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x2d1c0 movq -0x68(%rbp), %rsi movq -0x60(%rbp), %rdx leaq -0x38(%rbp), %rdi callq 0x329f0 jmp 0x15ab64 leaq 0x3b5fb5(%rip), %rdi # 0x510b20 leaq -0x38(%rbp), %rsi callq 0x15aee0 movq %rax, -0x70(%rbp) jmp 0x15ab7a movq -0x70(%rbp), %rax movq %rax, -0x18(%rbp) leaq -0x38(%rbp), %rdi callq 0x2d648 leaq -0x39(%rbp), %rdi callq 0x2d620 leaq 0x3b5f85(%rip), %rdi # 0x510b20 callq 0x15af40 movq %rax, -0x58(%rbp) leaq -0x18(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x15af10 testb $0x1, %al jne 0x15abb7 jmp 0x15abfc leaq -0x18(%rbp), %rdi callq 0x15af70 movl 0x20(%rax), %edi callq 0x15ac20 movq %rax, -0x8(%rbp) jmp 0x15ac04 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x15abf1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x38(%rbp), %rdi callq 0x2d648 leaq -0x39(%rbp), %rdi callq 0x2d620 jmp 0x15ac0e movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x2cbe0 nopw (%rax,%rax)
_ZN13item_registry4findEPKc: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_68], rax lea rdi, [rbp+var_39] mov [rbp+var_60], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_68] mov rdx, [rbp+var_60] lea rdi, [rbp+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_15AB64: lea rdi, _ZN13item_registry5namesB5cxx11E; item_registry::names lea rsi, [rbp+var_38] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_jEEE4findERSB_; std::unordered_map<std::string,uint>::find(std::string const&) mov [rbp+var_70], rax jmp short $+2 loc_15AB7A: mov rax, [rbp+var_70] mov [rbp+var_18], rax lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, _ZN13item_registry5namesB5cxx11E; item_registry::names call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_jEEE4cendEv; std::unordered_map<std::string,uint>::cend(void) mov qword ptr [rbp+var_58], rax lea rdi, [rbp+var_18] lea rsi, [rbp+var_58]; unsigned int call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjELb1EEESC_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,uint>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,uint>,true> const&) test al, 1 jnz short loc_15ABB7 jmp short loc_15ABFC loc_15ABB7: lea rdi, [rbp+var_18] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,uint>,false,true>::operator->(void) mov edi, [rax+20h]; this call _ZN13item_registry4findEj; item_registry::find(uint) mov [rbp+var_8], rax jmp short loc_15AC04 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp short loc_15ABF1 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_15ABF1: lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_15AC0E loc_15ABFC: mov [rbp+var_8], 0 loc_15AC04: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn loc_15AC0E: mov rdi, [rbp+var_48] call __Unwind_Resume
long long item_registry::find(item_registry *this, const char *a2) { long long v2; // rax unsigned int v4[2]; // [rsp+18h] [rbp-58h] BYREF char v5; // [rsp+37h] [rbp-39h] BYREF _BYTE v6[32]; // [rsp+38h] [rbp-38h] BYREF _QWORD v7[2]; // [rsp+58h] [rbp-18h] BYREF v7[1] = this; std::allocator<char>::allocator(&v5, a2); std::string::basic_string<std::allocator<char>>((long long)v6, (long long)this, (long long)&v5); v7[0] = std::unordered_map<std::string,unsigned int>::find(&item_registry::names[abi:cxx11], v6); std::string::~string(v6); std::allocator<char>::~allocator(&v5); *(_QWORD *)v4 = std::unordered_map<std::string,unsigned int>::cend(&item_registry::names[abi:cxx11]); if ( (std::__detail::operator!=(v7, v4) & 1) == 0 ) return 0LL; v2 = std::__detail::_Node_iterator<std::pair<std::string const,unsigned int>,false,true>::operator->(v7); return item_registry::find((item_registry *)*(unsigned int *)(v2 + 32), (unsigned int)v4); }
allocate: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV EDX,EAX CALL 0x0015ab90 ADD RSP,0x10 POP RBP RET
/* std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<entt::internal::dispatcher_handler<protocol::ChatMessage, std::allocator<void> >, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> > >::allocate(std::allocator<std::_Sp_counted_ptr_inplace<entt::internal::dispatcher_handler<protocol::ChatMessage, std::allocator<void> >, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >&, unsigned long) */ void std:: allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<entt::internal::dispatcher_handler<protocol::ChatMessage,std::allocator<void>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>>> ::allocate(allocator *param_1,ulong param_2) { __gnu_cxx:: new_allocator<std::_Sp_counted_ptr_inplace<entt::internal::dispatcher_handler<protocol::ChatMessage,std::allocator<void>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>> ::allocate((ulong)param_1,(void *)param_2); return; }
65,796
item_registry::find(char const*)
untodesu[P]voxelius/game/shared/item_registry.cc
ItemInfo *item_registry::find(const char *name) { const auto it = item_registry::names.find(name); if(it != item_registry::names.cend()) return item_registry::find(it->second); return nullptr; }
O3
cpp
item_registry::find(char const*): pushq %rbx subq $0x30, %rsp movq %rdi, %rsi leaq 0x10(%rsp), %rbx leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x2f9b0 leaq 0x1e18ca(%rip), %rdi # 0x25c8f0 movq %rbx, %rsi callq 0x7b426 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7b04c movq 0x20(%rsp), %rsi incq %rsi callq 0x268e0 testq %rbx, %rbx je 0x7b073 movl 0x28(%rbx), %eax testq %rax, %rax je 0x7b073 movq 0x1e18d0(%rip), %rdx # 0x25c930 movq 0x1e18c1(%rip), %rcx # 0x25c928 subq %rcx, %rdx sarq $0x4, %rdx cmpq %rax, %rdx jae 0x7b07b xorl %eax, %eax addq $0x30, %rsp popq %rbx retq decl %eax shlq $0x4, %rax movq (%rcx,%rax), %rax jmp 0x7b075 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7b0a5 movq 0x20(%rsp), %rsi incq %rsi callq 0x268e0 movq %rbx, %rdi callq 0x26ff0
_ZN13item_registry4findEPKc: push rbx sub rsp, 30h mov rsi, rdi lea rbx, [rsp+38h+var_28] lea rdx, [rsp+38h+var_29] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _ZN13item_registry5namesB5cxx11E; item_registry::names mov rsi, rbx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_jESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,uint>,std::allocator<std::pair<std::string const,uint>>,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>>::find(std::string const&) mov rbx, rax lea rax, [rsp+38h+var_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7B04C mov rsi, [rsp+38h+var_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7B04C: test rbx, rbx jz short loc_7B073 mov eax, [rbx+28h] test rax, rax jz short loc_7B073 mov rdx, qword ptr cs:_ZN13item_registry5itemsE+8; item_registry::items mov rcx, qword ptr cs:_ZN13item_registry5itemsE; item_registry::items sub rdx, rcx sar rdx, 4 cmp rdx, rax jnb short loc_7B07B loc_7B073: xor eax, eax loc_7B075: add rsp, 30h pop rbx retn loc_7B07B: dec eax shl rax, 4 mov rax, [rcx+rax] jmp short loc_7B075 mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7B0A5 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7B0A5: mov rdi, rbx call __Unwind_Resume
long long item_registry::find(item_registry *this, const char *a2) { long long v2; // rbx unsigned long long v3; // rax void *v5[2]; // [rsp+10h] [rbp-28h] BYREF long long v6; // [rsp+20h] [rbp-18h] BYREF std::string::basic_string<std::allocator<char>>(v5, (long long)this); v2 = std::_Hashtable<std::string,std::pair<std::string const,unsigned int>,std::allocator<std::pair<std::string const,unsigned int>>,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>>::find( &item_registry::names[abi:cxx11], v5); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); if ( v2 && (v3 = *(unsigned int *)(v2 + 40), *(_DWORD *)(v2 + 40)) && (long long)(*((_QWORD *)&item_registry::items + 1) - item_registry::items) >> 4 >= v3 ) { return *(_QWORD *)(item_registry::items + 16LL * (unsigned int)(v3 - 1)); } else { return 0LL; } }
find: PUSH RBX SUB RSP,0x30 MOV RSI,RDI LEA RBX,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,RBX CALL 0x0012f9b0 LAB_0017b01f: LEA RDI,[0x35c8f0] MOV RSI,RBX CALL 0x0017b426 LAB_0017b02e: MOV RBX,RAX LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0017b04c MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001268e0 LAB_0017b04c: TEST RBX,RBX JZ 0x0017b073 MOV EAX,dword ptr [RBX + 0x28] TEST RAX,RAX JZ 0x0017b073 MOV RDX,qword ptr [0x0035c930] MOV RCX,qword ptr [0x0035c928] SUB RDX,RCX SAR RDX,0x4 CMP RDX,RAX JNC 0x0017b07b LAB_0017b073: XOR EAX,EAX LAB_0017b075: ADD RSP,0x30 POP RBX RET LAB_0017b07b: DEC EAX SHL RAX,0x4 MOV RAX,qword ptr [RCX + RAX*0x1] JMP 0x0017b075
/* item_registry::find(char const*) */ int8 item_registry::find(char *param_1) { uint uVar1; long lVar2; allocator local_29; long *local_28 [2]; long local_18 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_28,param_1,&local_29); /* try { // try from 0017b01f to 0017b02d has its CatchHandler @ 0017b087 */ lVar2 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_int>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_int>>,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>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_int>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_int>>,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>> *)names_abi_cxx11_,(string *)local_28); if (local_28[0] != local_18) { operator_delete(local_28[0],local_18[0] + 1); } if (lVar2 != 0) { uVar1 = *(uint *)(lVar2 + 0x28); if (((ulong)uVar1 != 0) && ((ulong)uVar1 <= (ulong)(DAT_0035c930 - items >> 4))) { return *(int8 *)(items + (ulong)(uVar1 - 1) * 0x10); } } return 0; }
65,797
mysql_stmt_reset_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_reset_start(my_bool *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_reset, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, TRUE, r_my_bool, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_reset(stmt); return 0; }) }
O3
c
mysql_stmt_reset_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x5b5de movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0x9f(%rip), %rsi # 0x5b663 callq 0x5c670 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x5b5e8 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x5b658 movq %r14, %rdi callq 0x50d68 jmp 0x5b654 js 0x5b5f0 movb 0x8(%r15), %al jmp 0x5b654 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2f1f72(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2f1f57(%rip), %rax # 0x34d590 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37130 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_reset_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_5B5DE mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_reset_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_5B5E8 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_5B658 loc_5B5DE: mov rdi, r14 call mysql_stmt_reset jmp short loc_5B654 loc_5B5E8: js short loc_5B5F0 mov al, [r15+8] jmp short loc_5B654 loc_5B5F0: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_5B654: mov [rbx], al xor eax, eax loc_5B658: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_reset_start(char *a1, long long a2) { long long v2; // rax long long v3; // rax _BYTE *v4; // r15 int v5; // eax char v7; // al long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(_BYTE **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; v4[20] = 1; v5 = my_context_spawn(v4 + 56, mysql_stmt_reset_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { v4[21] = 1; return *(unsigned int *)v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[8]; } } else { v7 = mysql_stmt_reset(a2); } *a1 = v7; return 0LL; }
mysql_stmt_reset_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0015b5de MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x15b663] CALL 0x0015c670 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0015b5e8 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0015b658 LAB_0015b5de: MOV RDI,R14 CALL 0x00150d68 JMP 0x0015b654 LAB_0015b5e8: JS 0x0015b5f0 MOV AL,byte ptr [R15 + 0x8] JMP 0x0015b654 LAB_0015b5f0: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x44d590] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137130 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_0015b654: MOV byte ptr [RBX],AL XOR EAX,EAX LAB_0015b658: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_reset_start(int1 *param_1,long param_2) { int4 *puVar1; int1 uVar2; int iVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar2 = mysql_stmt_reset(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar3 = my_context_spawn(puVar1 + 0xe,mysql_stmt_reset_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar3) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0044d5d0, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } } *param_1 = uVar2; return 0; }
65,798
Catch::operator==(Catch::ProcessedReporterSpec const&, Catch::ProcessedReporterSpec const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
IMutableRegistryHub& getMutableRegistryHub() { return RegistryHubSingleton::getMutable(); }
O3
cpp
Catch::operator==(Catch::ProcessedReporterSpec const&, Catch::ProcessedReporterSpec const&): pushq %r14 pushq %rbx pushq %rax movq 0x8(%rdi), %rdx cmpq 0x8(%rsi), %rdx jne 0x4b160 movq %rsi, %r14 movq %rdi, %rbx testq %rdx, %rdx je 0x4b112 movq (%r14), %rsi movq (%rbx), %rdi callq 0x177b0 testl %eax, %eax jne 0x4b160 movq 0x28(%rbx), %rdx cmpq 0x28(%r14), %rdx jne 0x4b160 testq %rdx, %rdx je 0x4b132 movq 0x20(%r14), %rsi movq 0x20(%rbx), %rdi callq 0x177b0 testl %eax, %eax jne 0x4b160 movb 0x40(%rbx), %al cmpb 0x40(%r14), %al jne 0x4b160 movq 0x70(%rbx), %rax cmpq 0x70(%r14), %rax jne 0x4b160 movq 0x60(%rbx), %rdi addq $0x50, %rbx movq 0x60(%r14), %rdx movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x80bee xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5CatcheqERKNS_21ProcessedReporterSpecES2_: push r14 push rbx push rax mov rdx, [rdi+8] cmp rdx, [rsi+8] jnz short loc_4B160 mov r14, rsi mov rbx, rdi test rdx, rdx jz short loc_4B112 mov rsi, [r14] mov rdi, [rbx] call _bcmp test eax, eax jnz short loc_4B160 loc_4B112: mov rdx, [rbx+28h] cmp rdx, [r14+28h] jnz short loc_4B160 test rdx, rdx jz short loc_4B132 mov rsi, [r14+20h] mov rdi, [rbx+20h] call _bcmp test eax, eax jnz short loc_4B160 loc_4B132: mov al, [rbx+40h] cmp al, [r14+40h] jnz short loc_4B160 mov rax, [rbx+70h] cmp rax, [r14+70h] jnz short loc_4B160 mov rdi, [rbx+60h] add rbx, 50h ; 'P' mov rdx, [r14+60h] mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp _ZNSt7__equalILb0EE5equalISt23_Rb_tree_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EESC_EEbT_SD_T0_; std::__equal<false>::equal<std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>>(std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>) loc_4B160: xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long Catch::operator==(long long a1, long long a2) { long long v2; // rdx long long v3; // rdx v2 = *(_QWORD *)(a1 + 8); if ( v2 != *(_QWORD *)(a2 + 8) || v2 && (unsigned int)bcmp(*(_QWORD *)a1, *(_QWORD *)a2) ) return 0LL; v3 = *(_QWORD *)(a1 + 40); if ( v3 != *(_QWORD *)(a2 + 40) || v3 && (unsigned int)bcmp(*(_QWORD *)(a1 + 32), *(_QWORD *)(a2 + 32)) ) return 0LL; if ( *(_BYTE *)(a1 + 64) != *(_BYTE *)(a2 + 64) || *(_QWORD *)(a1 + 112) != *(_QWORD *)(a2 + 112) ) return 0LL; else return std::__equal<false>::equal<std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>,std::_Rb_tree_const_iterator<std::pair<std::string const,std::string>>>( *(_QWORD *)(a1 + 96), a1 + 80, *(_QWORD *)(a2 + 96)); }
operator==: PUSH R14 PUSH RBX PUSH RAX MOV RDX,qword ptr [RDI + 0x8] CMP RDX,qword ptr [RSI + 0x8] JNZ 0x0014b160 MOV R14,RSI MOV RBX,RDI TEST RDX,RDX JZ 0x0014b112 MOV RSI,qword ptr [R14] MOV RDI,qword ptr [RBX] CALL 0x001177b0 TEST EAX,EAX JNZ 0x0014b160 LAB_0014b112: MOV RDX,qword ptr [RBX + 0x28] CMP RDX,qword ptr [R14 + 0x28] JNZ 0x0014b160 TEST RDX,RDX JZ 0x0014b132 MOV RSI,qword ptr [R14 + 0x20] MOV RDI,qword ptr [RBX + 0x20] CALL 0x001177b0 TEST EAX,EAX JNZ 0x0014b160 LAB_0014b132: MOV AL,byte ptr [RBX + 0x40] CMP AL,byte ptr [R14 + 0x40] JNZ 0x0014b160 MOV RAX,qword ptr [RBX + 0x70] CMP RAX,qword ptr [R14 + 0x70] JNZ 0x0014b160 MOV RDI,qword ptr [RBX + 0x60] ADD RBX,0x50 MOV RDX,qword ptr [R14 + 0x60] MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00180bee LAB_0014b160: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
/* Catch::TEMPNAMEPLACEHOLDERVALUE(Catch::ProcessedReporterSpec const&, Catch::ProcessedReporterSpec const&) */ bool Catch::operator==(ProcessedReporterSpec *param_1,ProcessedReporterSpec *param_2) { size_t sVar1; bool bVar2; int iVar3; sVar1 = *(size_t *)(param_1 + 8); if (sVar1 == *(size_t *)(param_2 + 8)) { if ((sVar1 != 0) && (iVar3 = bcmp(*(void **)param_1,*(void **)param_2,sVar1), iVar3 != 0)) { return false; } sVar1 = *(size_t *)(param_1 + 0x28); if (sVar1 == *(size_t *)(param_2 + 0x28)) { if ((sVar1 != 0) && (iVar3 = bcmp(*(void **)(param_1 + 0x20),*(void **)(param_2 + 0x20),sVar1), iVar3 != 0)) { return false; } if ((param_1[0x40] == param_2[0x40]) && (*(long *)(param_1 + 0x70) == *(long *)(param_2 + 0x70))) { bVar2 = std::__equal<false>:: equal<std::_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::_Rb_tree_const_iterator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> (*(int8 *)(param_1 + 0x60),param_1 + 0x50, *(int8 *)(param_2 + 0x60)); return bVar2; } } } return false; }
65,799
ma_bitmap_set
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_set(MARIA_HA *info, pgcache_page_no_t page, my_bool head, uint empty_space) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; uint bits; my_bool res; DBUG_ENTER("_ma_bitmap_set"); DBUG_PRINT("enter", ("page: %lu head: %d empty_space: %u", (ulong) page, head, empty_space)); mysql_mutex_lock(&info->s->bitmap.bitmap_lock); bits= (head ? _ma_free_size_to_head_pattern(bitmap, empty_space) : free_size_to_tail_pattern(bitmap, empty_space)); res= set_page_bits(info, bitmap, page, bits); mysql_mutex_unlock(&info->s->bitmap.bitmap_lock); DBUG_RETURN(res); }
O0
c
ma_bitmap_set: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x20(%rbp) jmp 0x6585b movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0xedf69(%rip), %rsi # 0x1537e0 movl $0xb55, %edx # imm = 0xB55 callq 0x63440 movsbl -0x11(%rbp), %eax cmpl $0x0, %eax je 0x6589b movq -0x20(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x63cf0 movl %eax, -0x2c(%rbp) jmp 0x658aa movq -0x20(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x65670 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x24(%rbp), %ecx callq 0x65460 movb %al, -0x25(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x636f0 movb -0x25(%rbp), %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %al addq $0x30, %rsp popq %rbp retq
_ma_bitmap_set: 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_18], ecx mov rax, [rbp+var_8] mov rax, [rax] add rax, 0A10h mov [rbp+var_20], rax jmp short $+2 loc_6585B: mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B55h call inline_mysql_mutex_lock_8 movsx eax, [rbp+var_11] cmp eax, 0 jz short loc_6589B mov rdi, [rbp+var_20] mov esi, [rbp+var_18] call _ma_free_size_to_head_pattern mov [rbp+var_2C], eax jmp short loc_658AA loc_6589B: mov rdi, [rbp+var_20] mov esi, [rbp+var_18] call free_size_to_tail_pattern mov [rbp+var_2C], eax loc_658AA: mov eax, [rbp+var_2C] mov [rbp+var_24], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_24] call set_page_bits mov [rbp+var_25], al mov rax, [rbp+var_8] mov rdi, [rax] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_8 mov al, [rbp+var_25] mov [rbp+var_2D], al mov al, [rbp+var_2D] add rsp, 30h pop rbp retn
char ma_bitmap_set(long long *a1, unsigned long long a2, char a3, unsigned int a4) { unsigned int v5; // [rsp+4h] [rbp-2Ch] char v6; // [rsp+Bh] [rbp-25h] _DWORD *v7; // [rsp+10h] [rbp-20h] v7 = (_DWORD *)(*a1 + 2576); inline_mysql_mutex_lock_8( *a1 + 2712, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xB55u); if ( a3 ) v5 = ma_free_size_to_head_pattern(v7, a4); else v5 = free_size_to_tail_pattern(v7, a4); v6 = set_page_bits(a1, (long long)v7, a2, v5); inline_mysql_mutex_unlock_8(*a1 + 2712); return v6; }
_ma_bitmap_set: 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 dword ptr [RBP + -0x18],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x20],RAX JMP 0x0016585b LAB_0016585b: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x2537e0] MOV EDX,0xb55 CALL 0x00163440 MOVSX EAX,byte ptr [RBP + -0x11] CMP EAX,0x0 JZ 0x0016589b MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00163cf0 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001658aa LAB_0016589b: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00165670 MOV dword ptr [RBP + -0x2c],EAX LAB_001658aa: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] CALL 0x00165460 MOV byte ptr [RBP + -0x25],AL MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x001636f0 MOV AL,byte ptr [RBP + -0x25] MOV byte ptr [RBP + -0x2d],AL MOV AL,byte ptr [RBP + -0x2d] ADD RSP,0x30 POP RBP RET
int1 _ma_bitmap_set(long *param_1,int8 param_2,char param_3,int4 param_4) { int1 uVar1; long lVar2; int4 local_34; lVar2 = *param_1 + 0xa10; inline_mysql_mutex_lock (*param_1 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_bitmap.c", 0xb55); if (param_3 == '\0') { local_34 = free_size_to_tail_pattern(lVar2,param_4); } else { local_34 = _ma_free_size_to_head_pattern(lVar2,param_4); } uVar1 = set_page_bits(param_1,lVar2,param_2,local_34); inline_mysql_mutex_unlock(*param_1 + 0xa98); return uVar1; }