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
14,900
common_params_get_system_info[abi:cxx11](common_params const&)
monkey531[P]llama/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(); }
O0
cpp
common_params_get_system_info[abi:cxx11](common_params const&): subq $0x1e8, %rsp # imm = 0x1E8 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x1e0(%rsp) movq %rsi, 0x1d8(%rsp) leaq 0x60(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x52fb0 movq 0x40(%rsp), %rdi leaq 0xfca0b(%rip), %rsi # 0x1df3ba callq 0x52990 movq %rax, 0x48(%rsp) jmp 0xe29bb movq 0x48(%rsp), %rdi movq 0x1d8(%rsp), %rax movl 0x274(%rax), %esi callq 0x52560 jmp 0xe29d5 movq 0x1d8(%rsp), %rax cmpl $-0x1, 0x488(%rax) je 0xe2a4f leaq 0xfc9e7(%rip), %rsi # 0x1df3d4 leaq 0x60(%rsp), %rdi callq 0x52990 movq %rax, 0x28(%rsp) jmp 0xe29fe movq 0x28(%rsp), %rdi movq 0x1d8(%rsp), %rax movl 0x488(%rax), %esi callq 0x52560 movq %rax, 0x20(%rsp) jmp 0xe2a1d movq 0x20(%rsp), %rdi leaq 0x10526d(%rip), %rsi # 0x1e7c96 callq 0x52990 jmp 0xe2a30 jmp 0xe2a4f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x60(%rsp), %rdi callq 0x52ea0 jmp 0xe2ada leaq 0xfc993(%rip), %rsi # 0x1df3e9 leaq 0x60(%rsp), %rdi callq 0x52990 movq %rax, 0x18(%rsp) jmp 0xe2a67 callq 0x52d40 movq 0x18(%rsp), %rdi movl %eax, %esi callq 0x52da0 movq %rax, 0x10(%rsp) jmp 0xe2a7f movq 0x10(%rsp), %rdi leaq 0x10562c(%rip), %rsi # 0x1e80b7 callq 0x52990 movq %rax, 0x8(%rsp) jmp 0xe2a97 callq 0x52060 movq %rax, (%rsp) jmp 0xe2aa2 movq (%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x52990 jmp 0xe2ab2 movq 0x30(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x53320 jmp 0xe2ac3 leaq 0x60(%rsp), %rdi callq 0x52ea0 movq 0x38(%rsp), %rax addq $0x1e8, %rsp # imm = 0x1E8 retq movq 0x58(%rsp), %rdi callq 0x52ae0 nopw %cs:(%rax,%rax)
_Z29common_params_get_system_infoB5cxx11RK13common_params: sub rsp, 1E8h mov [rsp+1E8h+var_1B8], rdi mov rax, rdi mov [rsp+1E8h+var_1B0], rax mov [rsp+1E8h+var_8], rdi mov [rsp+1E8h+var_10], rsi lea rdi, [rsp+1E8h+var_188] mov [rsp+1E8h+var_1A8], rdi call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rdi, [rsp+1E8h+var_1A8] lea rsi, aSystemInfoNThr; "system_info: n_threads = " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1E8h+var_1A0], rax jmp short $+2 loc_E29BB: mov rdi, [rsp+1E8h+var_1A0] mov rax, [rsp+1E8h+var_10] mov esi, [rax+274h] call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_E29D5: mov rax, [rsp+1E8h+var_10] cmp dword ptr [rax+488h], 0FFFFFFFFh jz short loc_E2A4F lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+1E8h+var_188] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1E8h+var_1C0], rax jmp short $+2 loc_E29FE: mov rdi, [rsp+1E8h+var_1C0] mov rax, [rsp+1E8h+var_10] mov esi, [rax+488h] call __ZNSolsEi; std::ostream::operator<<(int) mov [rsp+1E8h+var_1C8], rax jmp short $+2 loc_E2A1D: mov rdi, [rsp+1E8h+var_1C8] lea rsi, a09401910201912+51h; ")" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_E2A30: jmp short loc_E2A4F mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() jmp loc_E2ADA loc_E2A4F: lea rsi, asc_1DF3E9; " / " lea rdi, [rsp+1E8h+var_188]; this call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1E8h+var_1D0], rax jmp short $+2 loc_E2A67: call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov rdi, [rsp+1E8h+var_1D0] mov esi, eax call __ZNSolsEj; std::ostream::operator<<(uint) mov [rsp+1E8h+var_1D8], rax jmp short $+2 loc_E2A7F: mov rdi, [rsp+1E8h+var_1D8] lea rsi, asc_1E80B6+1; " | " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1E8h+var_1E0], rax jmp short $+2 loc_E2A97: call _llama_print_system_info mov [rsp+1E8h+var_1E8], rax jmp short $+2 loc_E2AA2: mov rsi, [rsp+1E8h+var_1E8] mov rdi, [rsp+1E8h+var_1E0] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_E2AB2: mov rdi, [rsp+1E8h+var_1B8] lea rsi, [rsp+1E8h+var_188] call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void) jmp short $+2 loc_E2AC3: lea rdi, [rsp+1E8h+var_188] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, [rsp+1E8h+var_1B0] add rsp, 1E8h retn loc_E2ADA: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { unsigned int v2; // eax long long v3; // rdi long long v5; // [rsp+0h] [rbp-1E8h] long long v6; // [rsp+8h] [rbp-1E0h] long long v7; // [rsp+18h] [rbp-1D0h] long long v8; // [rsp+20h] [rbp-1C8h] long long v9; // [rsp+28h] [rbp-1C0h] long long v12; // [rsp+48h] [rbp-1A0h] _BYTE v13[376]; // [rsp+60h] [rbp-188h] BYREF long long v14; // [rsp+1D8h] [rbp-10h] long long v15; // [rsp+1E0h] [rbp-8h] v15 = a1; v14 = a2; std::ostringstream::basic_ostringstream(v13); v12 = std::operator<<<std::char_traits<char>>(v13, "system_info: n_threads = "); std::ostream::operator<<(v12, *(unsigned int *)(v14 + 628)); if ( *(_DWORD *)(v14 + 1160) != -1 ) { v9 = std::operator<<<std::char_traits<char>>(v13, " (n_threads_batch = "); v8 = std::ostream::operator<<(v9, *(unsigned int *)(v14 + 1160)); std::operator<<<std::char_traits<char>>(v8, ")"); } v7 = std::operator<<<std::char_traits<char>>(v13, " / "); v2 = std::thread::hardware_concurrency((std::thread *)v13); v3 = std::ostream::operator<<(v7, v2); v6 = std::operator<<<std::char_traits<char>>(v3, " | "); v5 = llama_print_system_info(); std::operator<<<std::char_traits<char>>(v6, v5); std::ostringstream::str(a1, v13); std::ostringstream::~ostringstream(v13); return a1; }
common_params_get_system_info[abi:cxx11]: SUB RSP,0x1e8 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x1e0],RDI MOV qword ptr [RSP + 0x1d8],RSI LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x40],RDI CALL 0x00152fb0 MOV RDI,qword ptr [RSP + 0x40] LAB_001e29a8: LEA RSI,[0x2df3ba] CALL 0x00152990 MOV qword ptr [RSP + 0x48],RAX JMP 0x001e29bb LAB_001e29bb: MOV RDI,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x1d8] MOV ESI,dword ptr [RAX + 0x274] CALL 0x00152560 JMP 0x001e29d5 LAB_001e29d5: MOV RAX,qword ptr [RSP + 0x1d8] CMP dword ptr [RAX + 0x488],-0x1 JZ 0x001e2a4f LEA RSI,[0x2df3d4] LEA RDI,[RSP + 0x60] CALL 0x00152990 MOV qword ptr [RSP + 0x28],RAX JMP 0x001e29fe LAB_001e29fe: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x1d8] MOV ESI,dword ptr [RAX + 0x488] CALL 0x00152560 MOV qword ptr [RSP + 0x20],RAX JMP 0x001e2a1d LAB_001e2a1d: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x2e7c96] CALL 0x00152990 JMP 0x001e2a30 LAB_001e2a30: JMP 0x001e2a4f LAB_001e2a4f: LEA RSI,[0x2df3e9] LEA RDI,[RSP + 0x60] CALL 0x00152990 MOV qword ptr [RSP + 0x18],RAX JMP 0x001e2a67 LAB_001e2a67: CALL 0x00152d40 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,EAX CALL 0x00152da0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e2a7f LAB_001e2a7f: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x2e80b7] CALL 0x00152990 MOV qword ptr [RSP + 0x8],RAX JMP 0x001e2a97 LAB_001e2a97: CALL 0x00152060 MOV qword ptr [RSP],RAX JMP 0x001e2aa2 LAB_001e2aa2: MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] CALL 0x00152990 JMP 0x001e2ab2 LAB_001e2ab2: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x60] CALL 0x00153320 LAB_001e2ac1: JMP 0x001e2ac3 LAB_001e2ac3: LEA RDI,[RSP + 0x60] CALL 0x00152ea0 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x1e8 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { uint uVar1; ostream *poVar2; char *pcVar3; long in_RSI; ostringstream local_188 [376]; long local_10; common_params *local_8; local_10 = in_RSI; local_8 = param_1; std::__cxx11::ostringstream::ostringstream(local_188); /* try { // try from 001e29a8 to 001e2ac0 has its CatchHandler @ 001e2a32 */ poVar2 = std::operator<<((ostream *)local_188,"system_info: n_threads = "); std::ostream::operator<<(poVar2,*(int *)(local_10 + 0x274)); if (*(int *)(local_10 + 0x488) != -1) { poVar2 = std::operator<<((ostream *)local_188," (n_threads_batch = "); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*(int *)(local_10 + 0x488)); std::operator<<(poVar2,")"); } poVar2 = std::operator<<((ostream *)local_188," / "); uVar1 = std::thread::hardware_concurrency(); poVar2 = (ostream *)std::ostream::operator<<(poVar2,uVar1); poVar2 = std::operator<<(poVar2," | "); pcVar3 = (char *)llama_print_system_info(); std::operator<<(poVar2,pcVar3); std::__cxx11::ostringstream::str(); std::__cxx11::ostringstream::~ostringstream(local_188); return param_1; }
14,901
common_params_get_system_info[abi:cxx11](common_params const&)
monkey531[P]llama/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(); }
O2
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 0x21ac0 leaq 0x4ee28(%rip), %rsi # 0x97bd2 movq %r15, %rdi callq 0x217e0 movl 0x274(%r14), %esi movq %rax, %rdi callq 0x21df0 cmpl $-0x1, 0x488(%r14) je 0x48dfa leaq 0x4ee1a(%rip), %rsi # 0x97bec leaq 0x8(%rsp), %rdi callq 0x217e0 movl 0x488(%r14), %esi movq %rax, %rdi callq 0x21df0 leaq 0x55955(%rip), %rsi # 0x9e747 movq %rax, %rdi callq 0x217e0 leaq 0x4ee00(%rip), %rsi # 0x97c01 leaq 0x8(%rsp), %rdi callq 0x217e0 movq %rax, %r14 callq 0x21b00 movl %eax, %esi movq %r14, %rdi callq 0x21570 leaq 0x55d44(%rip), %rsi # 0x9eb68 movq %rax, %rdi callq 0x217e0 movq %rax, %r14 callq 0x21490 movq %r14, %rdi movq %rax, %rsi callq 0x217e0 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x21ce0 leaq 0x8(%rsp), %rdi callq 0x21190 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x21190 movq %rbx, %rdi callq 0x21e50
_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 rdi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, [r14+274h] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_48DFA lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, [r14+488h] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, a09401910201912+51h; ")" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_48DFA: lea rsi, asc_97C01; " / " lea rdi, [rsp+198h+var_190]; this call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax mov rdi, r14 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, asc_9EB67+1; " | " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call _llama_print_system_info mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // r14 unsigned int v7; // eax long long v8; // rdi long long v9; // r14 long long v10; // rax _BYTE v12[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v13[392]; // [rsp+10h] [rbp-188h] BYREF std::ostringstream::basic_ostringstream(v12); v3 = std::operator<<<std::char_traits<char>>(v12, "system_info: n_threads = "); std::ostream::operator<<(v3, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { v4 = std::operator<<<std::char_traits<char>>(v12, " (n_threads_batch = "); v5 = std::ostream::operator<<(v4, *(unsigned int *)(a2 + 1160)); std::operator<<<std::char_traits<char>>(v5, ")"); } v6 = std::operator<<<std::char_traits<char>>(v12, " / "); v7 = std::thread::hardware_concurrency((std::thread *)v12); v8 = std::ostream::_M_insert<unsigned long>(v6, v7); v9 = std::operator<<<std::char_traits<char>>(v8, " | "); v10 = llama_print_system_info(); std::operator<<<std::char_traits<char>>(v9, v10); std::stringbuf::str(a1, v13); std::ostringstream::~ostringstream(v12); 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 0x00121ac0 LAB_00148da3: LEA RSI,[0x197bd2] MOV RDI,R15 CALL 0x001217e0 MOV ESI,dword ptr [R14 + 0x274] MOV RDI,RAX CALL 0x00121df0 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x00148dfa LEA RSI,[0x197bec] LEA RDI,[RSP + 0x8] CALL 0x001217e0 MOV ESI,dword ptr [R14 + 0x488] MOV RDI,RAX CALL 0x00121df0 LEA RSI,[0x19e747] MOV RDI,RAX CALL 0x001217e0 LAB_00148dfa: LEA RSI,[0x197c01] LEA RDI,[RSP + 0x8] CALL 0x001217e0 MOV R14,RAX CALL 0x00121b00 MOV ESI,EAX MOV RDI,R14 CALL 0x00121570 LEA RSI,[0x19eb68] MOV RDI,RAX CALL 0x001217e0 MOV R14,RAX CALL 0x00121490 MOV RDI,R14 MOV RSI,RAX CALL 0x001217e0 LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00121ce0 LAB_00148e4c: LEA RDI,[RSP + 0x8] CALL 0x00121190 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 *pcVar2; long in_RSI; ostringstream local_190 [376]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 00148da3 to 00148e4b has its CatchHandler @ 00148e66 */ poVar1 = std::operator<<((ostream *)local_190,"system_info: n_threads = "); std::ostream::operator<<(poVar1,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { poVar1 = std::operator<<((ostream *)local_190," (n_threads_batch = "); poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(int *)(in_RSI + 0x488)); std::operator<<(poVar1,")"); } poVar1 = std::operator<<((ostream *)local_190," / "); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)poVar1); poVar1 = std::operator<<(poVar1," | "); pcVar2 = (char *)llama_print_system_info(); std::operator<<(poVar1,pcVar2); std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); return param_1; }
14,902
common_params_get_system_info[abi:cxx11](common_params const&)
monkey531[P]llama/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 0x19a40 leaq 0x66249(%rip), %rsi # 0xb3bd2 movl $0x19, %edx movq %r15, %rdi callq 0x198b0 movl 0x274(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x19db0 cmpl $-0x1, 0x488(%r14) je 0x4d9ec leaq 0x66234(%rip), %rsi # 0xb3bec leaq 0x8(%rsp), %rdi movl $0x14, %edx callq 0x198b0 movl 0x488(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x19db0 leaq 0x6cd44(%rip), %rsi # 0xba723 movl $0x1, %edx movq %rax, %rdi callq 0x198b0 leaq 0x6620e(%rip), %rsi # 0xb3c01 leaq 0x8(%rsp), %rdi movl $0x3, %edx callq 0x198b0 callq 0x19a90 movl %eax, %esi leaq 0x8(%rsp), %rdi callq 0x19510 movq %rax, %r14 leaq 0x6d129(%rip), %rsi # 0xbab46 movl $0x3, %edx movq %rax, %rdi callq 0x198b0 callq 0x19450 movq %rax, %r15 testq %rax, %rax je 0x4da4f movq %r15, %rdi callq 0x19360 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x198b0 jmp 0x4da69 movq (%r14), %rax movq -0x18(%rax), %rax movq %r14, %rdi addq %rax, %rdi movl 0x20(%r14,%rax), %esi orl $0x1, %esi callq 0x19d70 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x19c90 movq 0x9a503(%rip), %rsi # 0xe7f80 leaq 0x8(%rsp), %rdi callq 0x19400 leaq 0x78(%rsp), %rdi callq 0x19240 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x9a4d5(%rip), %rsi # 0xe7f80 leaq 0x8(%rsp), %rdi callq 0x19400 leaq 0x78(%rsp), %rdi callq 0x19240 movq %rbx, %rdi callq 0x19e10
_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_4D9EC 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, a09401910201912+51h; ")" 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_4D9EC: lea rsi, asc_B3C01; " / " 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_BAB45+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_4DA4F 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_4DA69 loc_4DA4F: 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_4DA69: 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 0x00119a40 LAB_0014d982: LEA RSI,[0x1b3bd2] MOV EDX,0x19 MOV RDI,R15 CALL 0x001198b0 MOV ESI,dword ptr [R14 + 0x274] LEA RDI,[RSP + 0x8] CALL 0x00119db0 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x0014d9ec LEA RSI,[0x1b3bec] LEA RDI,[RSP + 0x8] MOV EDX,0x14 CALL 0x001198b0 MOV ESI,dword ptr [R14 + 0x488] LEA RDI,[RSP + 0x8] CALL 0x00119db0 LEA RSI,[0x1ba723] MOV EDX,0x1 MOV RDI,RAX CALL 0x001198b0 LAB_0014d9ec: LEA RSI,[0x1b3c01] LEA RDI,[RSP + 0x8] MOV EDX,0x3 CALL 0x001198b0 CALL 0x00119a90 MOV ESI,EAX LEA RDI,[RSP + 0x8] CALL 0x00119510 MOV R14,RAX LEA RSI,[0x1bab46] MOV EDX,0x3 MOV RDI,RAX CALL 0x001198b0 CALL 0x00119450 MOV R15,RAX TEST RAX,RAX JZ 0x0014da4f MOV RDI,R15 CALL 0x00119360 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x001198b0 JMP 0x0014da69 LAB_0014da4f: 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 0x00119d70 LAB_0014da69: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00119c90 LAB_0014da76: MOV RSI,qword ptr [0x001e7f80] LEA RDI,[RSP + 0x8] CALL 0x00119400 LEA RDI,[RSP + 0x78] CALL 0x00119240 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 0014d982 to 0014da75 has its CatchHandler @ 0014daa1 */ 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; }
14,903
get_timer_pico_value(enum_timer_name)
eloqsql/storage/perfschema/pfs_timer.cc
ulonglong get_timer_pico_value(enum_timer_name timer_name) { ulonglong result; switch (timer_name) { case TIMER_NAME_CYCLE: result= (my_timer_cycles() - cycle_v0) * cycle_to_pico; break; case TIMER_NAME_NANOSEC: result= (my_timer_nanoseconds() - nanosec_v0) * nanosec_to_pico; break; case TIMER_NAME_MICROSEC: result= (my_timer_microseconds() - microsec_v0) * microsec_to_pico; break; case TIMER_NAME_MILLISEC: result= (my_timer_milliseconds() - millisec_v0) * millisec_to_pico; break; case TIMER_NAME_TICK: result= (my_timer_ticks() - tick_v0) * tick_to_pico; break; default: result= 0; assert(false); } return result; }
O0
cpp
get_timer_pico_value(enum_timer_name): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x18(%rbp) subl $0x4, %eax ja 0x26045 movq -0x18(%rbp), %rax leaq 0x58d2e(%rip), %rcx # 0x7ece8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax callq 0x25d80 subq 0x3608b1(%rip), %rax # 0x386880 imulq 0x3608d1(%rip), %rax # 0x3868a8 movq %rax, -0x10(%rbp) jmp 0x2604d callq 0x28270 subq 0x36089f(%rip), %rax # 0x386888 imulq 0x3608bf(%rip), %rax # 0x3868b0 movq %rax, -0x10(%rbp) jmp 0x2604d callq 0x282a0 subq 0x36088d(%rip), %rax # 0x386890 imulq 0x3608ad(%rip), %rax # 0x3868b8 movq %rax, -0x10(%rbp) jmp 0x2604d callq 0x282f0 subq 0x36087b(%rip), %rax # 0x386898 imulq 0x36089b(%rip), %rax # 0x3868c0 movq %rax, -0x10(%rbp) jmp 0x2604d callq 0x28330 subq 0x360869(%rip), %rax # 0x3868a0 imulq 0x360889(%rip), %rax # 0x3868c8 movq %rax, -0x10(%rbp) jmp 0x2604d movq $0x0, -0x10(%rbp) movq -0x10(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
_Z20get_timer_pico_value15enum_timer_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov eax, [rbp+var_4] dec eax; switch 5 cases mov ecx, eax mov [rbp+var_18], rcx sub eax, 4 ja def_25FC1; jumptable 0000000000025FC1 default case mov rax, [rbp+var_18] lea rcx, jpt_25FC1 movsxd rax, ds:(jpt_25FC1 - 7ECE8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_25FC3: call _ZL15my_timer_cyclesv; jumptable 0000000000025FC1 case 1 sub rax, cs:_ZL8cycle_v0; cycle_v0 imul rax, cs:_ZL13cycle_to_pico; cycle_to_pico mov [rbp+var_10], rax jmp short loc_2604D loc_25FDD: call my_timer_nanoseconds; jumptable 0000000000025FC1 case 2 sub rax, cs:_ZL10nanosec_v0; nanosec_v0 imul rax, cs:_ZL15nanosec_to_pico; nanosec_to_pico mov [rbp+var_10], rax jmp short loc_2604D loc_25FF7: call my_timer_microseconds; jumptable 0000000000025FC1 case 3 sub rax, cs:_ZL11microsec_v0; microsec_v0 imul rax, cs:_ZL16microsec_to_pico; microsec_to_pico mov [rbp+var_10], rax jmp short loc_2604D loc_26011: call my_timer_milliseconds; jumptable 0000000000025FC1 case 4 sub rax, cs:_ZL11millisec_v0; millisec_v0 imul rax, cs:_ZL16millisec_to_pico; millisec_to_pico mov [rbp+var_10], rax jmp short loc_2604D loc_2602B: call my_timer_ticks; jumptable 0000000000025FC1 case 5 sub rax, cs:_ZL7tick_v0; tick_v0 imul rax, cs:_ZL12tick_to_pico; tick_to_pico mov [rbp+var_10], rax jmp short loc_2604D def_25FC1: mov [rbp+var_10], 0; jumptable 0000000000025FC1 default case loc_2604D: mov rax, [rbp+var_10] add rsp, 20h pop rbp retn
long long get_timer_pico_value(long long a1) { long long v2; // [rsp+10h] [rbp-10h] switch ( (int)a1 ) { case 1: v2 = cycle_to_pico * (my_timer_cycles() - cycle_v0); break; case 2: v2 = nanosec_to_pico * (my_timer_nanoseconds(a1) - nanosec_v0); break; case 3: v2 = microsec_to_pico * (my_timer_microseconds(a1) - microsec_v0); break; case 4: v2 = millisec_to_pico * (my_timer_milliseconds(a1) - millisec_v0); break; case 5: v2 = tick_to_pico * (my_timer_ticks(a1) - tick_v0); break; default: v2 = 0LL; break; } return v2; }
get_timer_pico_value: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x18],RCX SUB EAX,0x4 JA 0x00126045 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x17ece8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: CALL 0x00125d80 SUB RAX,qword ptr [0x00486880] IMUL RAX,qword ptr [0x004868a8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012604d caseD_2: CALL 0x00128270 SUB RAX,qword ptr [0x00486888] IMUL RAX,qword ptr [0x004868b0] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012604d caseD_3: CALL 0x001282a0 SUB RAX,qword ptr [0x00486890] IMUL RAX,qword ptr [0x004868b8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012604d caseD_4: CALL 0x001282f0 SUB RAX,qword ptr [0x00486898] IMUL RAX,qword ptr [0x004868c0] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012604d caseD_5: CALL 0x00128330 SUB RAX,qword ptr [0x004868a0] IMUL RAX,qword ptr [0x004868c8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012604d default: MOV qword ptr [RBP + -0x10],0x0 LAB_0012604d: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x20 POP RBP RET
/* get_timer_pico_value(enum_timer_name) */ long get_timer_pico_value(int4 param_1) { long lVar1; long local_18; switch(param_1) { case 1: lVar1 = my_timer_cycles(); local_18 = (lVar1 - cycle_v0) * cycle_to_pico; break; case 2: lVar1 = my_timer_nanoseconds(); local_18 = (lVar1 - nanosec_v0) * nanosec_to_pico; break; case 3: lVar1 = my_timer_microseconds(); local_18 = (lVar1 - microsec_v0) * microsec_to_pico; break; case 4: lVar1 = my_timer_milliseconds(); local_18 = (lVar1 - millisec_v0) * millisec_to_pico; break; case 5: lVar1 = my_timer_ticks(); local_18 = (lVar1 - tick_v0) * tick_to_pico; break; default: local_18 = 0; } return local_18; }
14,904
my_fill_utf8mb3
eloqsql/strings/ctype-utf8.c
static void my_fill_utf8mb3(CHARSET_INFO *cs, char *str, size_t length, int fill) { if (fill < 0x80) my_fill_8bit(cs, str, length, fill); else my_fill_utf8mb3_mb(cs, str, length, fill); }
O3
c
my_fill_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpl $0x7f, %ecx jg 0x4f90d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4f991 movq %rbx, %rsi movq %r15, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x399d3 leaq (%rbx,%r15), %r14 movq 0xb8(%rdi), %rax movl %ecx, %esi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0xd8(%rax) movsbq %al, %r12 cmpq %r15, %r12 jle 0x4f936 movq %rbx, %r13 jmp 0x4f95b movsbq %al, %r15 movq %rbx, %r13 movq %rbx, %rdi leaq -0x3a(%rbp), %rsi movq %r15, %rdx callq 0x24240 addq %r12, %rbx addq %r12, %r13 leaq (%rbx,%r12), %rax cmpq %r14, %rax jbe 0x4f93d cmpq %r14, %rbx jae 0x4f973 subq %r13, %r14 movq %rbx, %rdi movl $0x20, %esi movq %r14, %rdx callq 0x24180 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4f991 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24330
my_fill_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax cmp ecx, 7Fh jg short loc_4F90D mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_4F991 mov rsi, rbx mov rdx, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_fill_8bit loc_4F90D: lea r14, [rbx+r15] mov rax, [rdi+0B8h] mov esi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+0D8h] movsx r12, al cmp r12, r15 jle short loc_4F936 mov r13, rbx jmp short loc_4F95B loc_4F936: movsx r15, al mov r13, rbx loc_4F93D: mov rdi, rbx lea rsi, [rbp+var_3A] mov rdx, r15 call _memcpy add rbx, r12 add r13, r12 lea rax, [rbx+r12] cmp rax, r14 jbe short loc_4F93D loc_4F95B: cmp rbx, r14 jnb short loc_4F973 sub r14, r13 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r14 call _memset loc_4F973: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4F991 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4F991: call ___stack_chk_fail
long long my_fill_utf8mb3(long long a1, long long a2, long long a3, signed int a4) { unsigned long long v5; // rbx unsigned long long v7; // r14 char v8; // al long long v9; // r12 long long v10; // r13 long long v11; // r15 _BYTE v12[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v13[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v13[0] = __readfsqword(0x28u); if ( a4 <= 127 ) return my_fill_8bit(a1, a2, a3, a4); v7 = a2 + a3; v8 = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))( a1, (unsigned int)a4, v12, v13); v9 = v8; if ( v8 <= a3 ) { v11 = v8; v10 = a2; do { memcpy(v5, v12, v11); v5 += v9; v10 += v9; } while ( v5 + v9 <= v7 ); } else { v10 = a2; } if ( v5 < v7 ) memset(v5, 32LL, v7 - v10); return __readfsqword(0x28u); }
my_fill_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP ECX,0x7f JG 0x0014f90d MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014f991 MOV RSI,RBX MOV RDX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001399d3 LAB_0014f90d: LEA R14,[RBX + R15*0x1] MOV RAX,qword ptr [RDI + 0xb8] MOV ESI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0xd8] MOVSX R12,AL CMP R12,R15 JLE 0x0014f936 MOV R13,RBX JMP 0x0014f95b LAB_0014f936: MOVSX R15,AL MOV R13,RBX LAB_0014f93d: MOV RDI,RBX LEA RSI,[RBP + -0x3a] MOV RDX,R15 CALL 0x00124240 ADD RBX,R12 ADD R13,R12 LEA RAX,[RBX + R12*0x1] CMP RAX,R14 JBE 0x0014f93d LAB_0014f95b: CMP RBX,R14 JNC 0x0014f973 SUB R14,R13 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R14 CALL 0x00124180 LAB_0014f973: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014f991 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014f991: CALL 0x00124330
void my_fill_utf8mb3(long param_1,void *param_2,long param_3,int param_4) { void *pvVar1; char cVar2; long lVar3; void *pvVar4; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 < 0x80) { if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { my_fill_8bit(param_1,param_2,param_3); return; } } else { pvVar1 = (void *)((long)param_2 + param_3); cVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,param_4,local_42,&local_38); lVar3 = (long)cVar2; pvVar4 = param_2; if (lVar3 <= param_3) { do { memcpy(param_2,local_42,(long)cVar2); param_2 = (void *)((long)param_2 + lVar3); pvVar4 = (void *)((long)pvVar4 + lVar3); } while ((void *)((long)param_2 + lVar3) <= pvVar1); } if (param_2 < pvVar1) { memset(param_2,0x20,(long)pvVar1 - (long)pvVar4); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,905
mi_read_rnd_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_read_rnd_static_record(MI_INFO *info, uchar *buf, register my_off_t filepos, my_bool skip_deleted_blocks) { int locked,error,cache_read; uint cache_length; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_read_rnd_static_record"); cache_read=0; cache_length=0; if (info->opt_flag & WRITE_CACHE_USED && (info->rec_cache.pos_in_file <= filepos || skip_deleted_blocks) && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); if (info->opt_flag & READ_CACHE_USED) { /* Cache in use */ if (filepos == my_b_tell(&info->rec_cache) && (skip_deleted_blocks || !filepos)) { cache_read=1; /* Read record using cache */ cache_length=(uint) (info->rec_cache.read_end - info->rec_cache.read_pos); } else info->rec_cache.seek_not_done=1; /* Filepos is changed */ } locked=0; if (info->lock_type == F_UNLCK) { if (filepos >= info->state->data_file_length) { /* Test if new records */ if (_mi_readinfo(info,F_RDLCK,0)) DBUG_RETURN(my_errno); locked=1; } else { /* We don't nead new info */ #ifndef UNSAFE_LOCKING if ((! cache_read || share->base.reclength > cache_length) && share->tot_locks == 0) { /* record not in cache */ if (my_lock(share->kfile,F_RDLCK,0L,F_TO_EOF, MYF(MY_SEEK_NOT_DONE) | info->lock_wait)) DBUG_RETURN(my_errno); locked=1; } #else info->tmp_lock_type=F_RDLCK; #endif } } if (filepos >= info->state->data_file_length) { DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld", (long) filepos/share->base.reclength, (long) filepos, (long) info->state->records, (long) info->state->del)); fast_mi_writeinfo(info); DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE); } info->lastpos= filepos; info->nextpos= filepos+share->base.pack_reclength; if (! cache_read) /* No cacheing */ { if ((error=_mi_read_static_record(info,filepos,buf))) { if (error > 0) error=my_errno=HA_ERR_RECORD_DELETED; else error=my_errno; } DBUG_RETURN(error); } /* Read record with caching. If my_b_read() returns TRUE, less than the requested bytes have been read. In this case rec_cache.error is either -1 for a read error, or contains the number of bytes copied into the buffer. */ error=my_b_read(&info->rec_cache,(uchar*) buf,share->base.reclength); if (info->s->base.pack_reclength != info->s->base.reclength && !error) { char tmp[8]; /* Skill fill bytes */ error=my_b_read(&info->rec_cache,(uchar*) tmp, info->s->base.pack_reclength - info->s->base.reclength); } if (locked) (void) _mi_writeinfo(info,0); /* Unlock keyfile */ if (!error) { if (!buf[0]) { /* Record is removed */ DBUG_RETURN(my_errno=HA_ERR_RECORD_DELETED); } /* Found and may be updated */ info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN(0); } /* error is TRUE. my_errno should be set if rec_cache.error == -1 */ if (info->rec_cache.error != -1 || my_errno == 0) { /* If we could not get a full record, we either have a broken record, or are at end of file. */ if (info->rec_cache.error == 0) my_errno= HA_ERR_END_OF_FILE; else my_errno= HA_ERR_WRONG_IN_RECORD; } DBUG_RETURN(my_errno); /* Something wrong (EOF?) */ }
O0
c
mi_read_rnd_static_record: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movl $0x0, -0x40(%rbp) movl $0x0, -0x44(%rbp) movq -0x20(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xc4486 movq -0x20(%rbp), %rax movq 0x220(%rax), %rax cmpq -0x30(%rbp), %rax jbe 0xc445b movsbl -0x31(%rbp), %eax cmpl $0x0, %eax je 0xc4486 movq -0x20(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 movl $0x1, %esi callq 0xe0b20 cmpl $0x0, %eax je 0xc4486 jmp 0xc4477 callq 0xf6280 movl (%rax), %eax movl %eax, -0x14(%rbp) jmp 0xc47a2 movq -0x20(%rbp), %rax movl 0x1c8(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xc4501 movq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x20(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 callq 0xc47d0 movq %rax, %rcx movq -0x58(%rbp), %rax cmpq %rcx, %rax jne 0xc44f1 movsbl -0x31(%rbp), %eax cmpl $0x0, %eax jne 0xc44cc cmpq $0x0, -0x30(%rbp) jne 0xc44f1 movl $0x1, -0x40(%rbp) movq -0x20(%rbp), %rax movq 0x238(%rax), %rax movq -0x20(%rbp), %rcx movq 0x230(%rcx), %rcx subq %rcx, %rax movl %eax, -0x44(%rbp) jmp 0xc44ff movq -0x20(%rbp), %rax movl $0x1, 0x300(%rax) jmp 0xc4501 movl $0x0, -0x38(%rbp) movq -0x20(%rbp), %rax cmpl $0x2, 0x1f4(%rax) jne 0xc45c5 movq -0x30(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx cmpq 0x28(%rcx), %rax jb 0xc4557 movq -0x20(%rbp), %rdi xorl %edx, %edx movl %edx, %esi callq 0xb1030 cmpl $0x0, %eax je 0xc454e jmp 0xc453f callq 0xf6280 movl (%rax), %eax movl %eax, -0x14(%rbp) jmp 0xc47a2 movl $0x1, -0x38(%rbp) jmp 0xc45c3 cmpl $0x0, -0x40(%rbp) je 0xc4570 movq -0x50(%rbp), %rax movq 0x140(%rax), %rax movl -0x44(%rbp), %ecx cmpq %rcx, %rax jbe 0xc45c1 movq -0x50(%rbp), %rax cmpl $0x0, 0x368(%rax) jne 0xc45c1 movq -0x50(%rbp), %rax movl 0x350(%rax), %edi movq -0x20(%rbp), %rax movq 0x330(%rax), %r8 orq $0x20, %r8 xorl %esi, %esi xorl %eax, %eax movl %eax, %ecx movq %rcx, %rdx callq 0xf36f0 cmpl $0x0, %eax je 0xc45ba jmp 0xc45ab callq 0xf6280 movl (%rax), %eax movl %eax, -0x14(%rbp) jmp 0xc47a2 movl $0x1, -0x38(%rbp) jmp 0xc45c3 jmp 0xc45c5 movq -0x30(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx cmpq 0x28(%rcx), %rax jb 0xc460f jmp 0xc45d9 jmp 0xc45db movq -0x20(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x368(%rax) jne 0xc45f6 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0xb1190 jmp 0xc45f8 callq 0xf6280 movl $0x89, (%rax) movl $0x89, -0x14(%rbp) jmp 0xc47a2 movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x30(%rbp), %rcx movq -0x50(%rbp), %rax addq 0x148(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x178(%rax) cmpl $0x0, -0x40(%rbp) jne 0xc468a movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xc42a0 movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0xc467d cmpl $0x0, -0x3c(%rbp) jle 0xc4671 callq 0xf6280 movl $0x86, (%rax) movl $0x86, -0x3c(%rbp) jmp 0xc467b callq 0xf6280 movl (%rax), %eax movl %eax, -0x3c(%rbp) jmp 0xc467d jmp 0xc467f movl -0x3c(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0xc47a2 movq -0x20(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 movq -0x28(%rbp), %rsi movq -0x50(%rbp), %rax movq 0x140(%rax), %rdx callq 0xc4830 movl %eax, -0x3c(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx cmpq 0x140(%rcx), %rax je 0xc4703 cmpl $0x0, -0x3c(%rbp) jne 0xc4703 movq -0x20(%rbp), %rdi addq $0x220, %rdi # imm = 0x220 leaq -0x10(%rbp), %rsi movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rdx movq -0x20(%rbp), %rax movq (%rax), %rax subq 0x140(%rax), %rdx callq 0xc4830 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x38(%rbp) je 0xc4714 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0xb1190 cmpl $0x0, -0x3c(%rbp) jne 0xc4758 movq -0x28(%rbp), %rax cmpb $0x0, (%rax) jne 0xc4739 jmp 0xc4725 callq 0xf6280 movl $0x86, (%rax) movl $0x86, -0x14(%rbp) jmp 0xc47a2 movq -0x20(%rbp), %rax movl 0x1d0(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x1d0(%rax) movl $0x0, -0x14(%rbp) jmp 0xc47a2 movq -0x20(%rbp), %rax cmpl $-0x1, 0x304(%rax) jne 0xc476f callq 0xf6280 cmpl $0x0, (%rax) jne 0xc4796 movq -0x20(%rbp), %rax cmpl $0x0, 0x304(%rax) jne 0xc4789 callq 0xf6280 movl $0x89, (%rax) jmp 0xc4794 callq 0xf6280 movl $0x7f, (%rax) jmp 0xc4796 jmp 0xc4798 callq 0xf6280 movl (%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x5c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xc47c3 movl -0x5c(%rbp), %eax addq $0x60, %rsp popq %rbp retq callq 0x2a250 nopl (%rax,%rax)
_mi_read_rnd_static_record: push rbp mov rbp, rsp sub rsp, 60h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_31], al mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov [rbp+var_40], 0 mov [rbp+var_44], 0 mov rax, [rbp+var_20] mov eax, [rax+1C8h] and eax, 10h cmp eax, 0 jz short loc_C4486 mov rax, [rbp+var_20] mov rax, [rax+220h] cmp rax, [rbp+var_30] jbe short loc_C445B movsx eax, [rbp+var_31] cmp eax, 0 jz short loc_C4486 loc_C445B: mov rdi, [rbp+var_20] add rdi, 220h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_C4486 jmp short $+2 loc_C4477: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax jmp loc_C47A2 loc_C4486: mov rax, [rbp+var_20] mov eax, [rax+1C8h] and eax, 2 cmp eax, 0 jz short loc_C4501 mov rax, [rbp+var_30] mov [rbp+var_58], rax mov rdi, [rbp+var_20] add rdi, 220h call my_b_tell_0 mov rcx, rax mov rax, [rbp+var_58] cmp rax, rcx jnz short loc_C44F1 movsx eax, [rbp+var_31] cmp eax, 0 jnz short loc_C44CC cmp [rbp+var_30], 0 jnz short loc_C44F1 loc_C44CC: mov [rbp+var_40], 1 mov rax, [rbp+var_20] mov rax, [rax+238h] mov rcx, [rbp+var_20] mov rcx, [rcx+230h] sub rax, rcx mov [rbp+var_44], eax jmp short loc_C44FF loc_C44F1: mov rax, [rbp+var_20] mov dword ptr [rax+300h], 1 loc_C44FF: jmp short $+2 loc_C4501: mov [rbp+var_38], 0 mov rax, [rbp+var_20] cmp dword ptr [rax+1F4h], 2 jnz loc_C45C5 mov rax, [rbp+var_30] mov rcx, [rbp+var_20] mov rcx, [rcx+8] cmp rax, [rcx+28h] jb short loc_C4557 mov rdi, [rbp+var_20] xor edx, edx mov esi, edx call _mi_readinfo cmp eax, 0 jz short loc_C454E jmp short $+2 loc_C453F: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax jmp loc_C47A2 loc_C454E: mov [rbp+var_38], 1 jmp short loc_C45C3 loc_C4557: cmp [rbp+var_40], 0 jz short loc_C4570 mov rax, [rbp+var_50] mov rax, [rax+140h] mov ecx, [rbp+var_44] cmp rax, rcx jbe short loc_C45C1 loc_C4570: mov rax, [rbp+var_50] cmp dword ptr [rax+368h], 0 jnz short loc_C45C1 mov rax, [rbp+var_50] mov edi, [rax+350h] mov rax, [rbp+var_20] mov r8, [rax+330h] or r8, 20h xor esi, esi xor eax, eax mov ecx, eax mov rdx, rcx call my_lock cmp eax, 0 jz short loc_C45BA jmp short $+2 loc_C45AB: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax jmp loc_C47A2 loc_C45BA: mov [rbp+var_38], 1 loc_C45C1: jmp short $+2 loc_C45C3: jmp short $+2 loc_C45C5: mov rax, [rbp+var_30] mov rcx, [rbp+var_20] mov rcx, [rcx+8] cmp rax, [rcx+28h] jb short loc_C460F jmp short $+2 loc_C45D9: jmp short $+2 loc_C45DB: mov rax, [rbp+var_20] mov rax, [rax] cmp dword ptr [rax+368h], 0 jnz short loc_C45F6 mov rdi, [rbp+var_20] xor esi, esi call _mi_writeinfo loc_C45F6: jmp short $+2 loc_C45F8: call _my_thread_var mov dword ptr [rax], 89h mov [rbp+var_14], 89h jmp loc_C47A2 loc_C460F: mov rcx, [rbp+var_30] mov rax, [rbp+var_20] mov [rax+170h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_50] add rcx, [rax+148h] mov rax, [rbp+var_20] mov [rax+178h], rcx cmp [rbp+var_40], 0 jnz short loc_C468A mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] call _mi_read_static_record mov [rbp+var_3C], eax cmp eax, 0 jz short loc_C467D cmp [rbp+var_3C], 0 jle short loc_C4671 call _my_thread_var mov dword ptr [rax], 86h mov [rbp+var_3C], 86h jmp short loc_C467B loc_C4671: call _my_thread_var mov eax, [rax] mov [rbp+var_3C], eax loc_C467B: jmp short $+2 loc_C467D: jmp short $+2 loc_C467F: mov eax, [rbp+var_3C] mov [rbp+var_14], eax jmp loc_C47A2 loc_C468A: mov rdi, [rbp+var_20] add rdi, 220h mov rsi, [rbp+var_28] mov rax, [rbp+var_50] mov rdx, [rax+140h] call my_b_read_0 mov [rbp+var_3C], eax mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+148h] mov rcx, [rbp+var_20] mov rcx, [rcx] cmp rax, [rcx+140h] jz short loc_C4703 cmp [rbp+var_3C], 0 jnz short loc_C4703 mov rdi, [rbp+var_20] add rdi, 220h lea rsi, [rbp+var_10] mov rax, [rbp+var_20] mov rax, [rax] mov rdx, [rax+148h] mov rax, [rbp+var_20] mov rax, [rax] sub rdx, [rax+140h] call my_b_read_0 mov [rbp+var_3C], eax loc_C4703: cmp [rbp+var_38], 0 jz short loc_C4714 mov rdi, [rbp+var_20] xor esi, esi call _mi_writeinfo loc_C4714: cmp [rbp+var_3C], 0 jnz short loc_C4758 mov rax, [rbp+var_28] cmp byte ptr [rax], 0 jnz short loc_C4739 jmp short $+2 loc_C4725: call _my_thread_var mov dword ptr [rax], 86h mov [rbp+var_14], 86h jmp short loc_C47A2 loc_C4739: mov rax, [rbp+var_20] mov ecx, [rax+1D0h] or ecx, 82h mov [rax+1D0h], ecx mov [rbp+var_14], 0 jmp short loc_C47A2 loc_C4758: mov rax, [rbp+var_20] cmp dword ptr [rax+304h], 0FFFFFFFFh jnz short loc_C476F call _my_thread_var cmp dword ptr [rax], 0 jnz short loc_C4796 loc_C476F: mov rax, [rbp+var_20] cmp dword ptr [rax+304h], 0 jnz short loc_C4789 call _my_thread_var mov dword ptr [rax], 89h jmp short loc_C4794 loc_C4789: call _my_thread_var mov dword ptr [rax], 7Fh loc_C4794: jmp short $+2 loc_C4796: jmp short $+2 loc_C4798: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax loc_C47A2: mov eax, [rbp+var_14] mov [rbp+var_5C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_C47C3 mov eax, [rbp+var_5C] add rsp, 60h pop rbp retn loc_C47C3: call ___stack_chk_fail
long long mi_read_rnd_static_record(long long a1, const char *a2, const char *a3, char a4) { long long v4; // rdi const char *v5; // rsi long long v7; // [rsp+10h] [rbp-50h] unsigned int v8; // [rsp+1Ch] [rbp-44h] int v9; // [rsp+20h] [rbp-40h] int static_record; // [rsp+24h] [rbp-3Ch] int v11; // [rsp+24h] [rbp-3Ch] int v12; // [rsp+28h] [rbp-38h] char *v15; // [rsp+38h] [rbp-28h] long long v16; // [rsp+40h] [rbp-20h] _BYTE v18[8]; // [rsp+50h] [rbp-10h] BYREF unsigned long long v19; // [rsp+58h] [rbp-8h] v19 = __readfsqword(0x28u); v16 = a1; v15 = (char *)a2; v7 = *(_QWORD *)a1; v9 = 0; v8 = 0; if ( (*(_DWORD *)(a1 + 456) & 0x10) != 0 && (*(_QWORD *)(a1 + 544) <= (unsigned long long)a3 || a4) ) { a1 += 544LL; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(v16 + 544, 1LL) ) return *(unsigned int *)my_thread_var(a1, a2); } if ( (*(_DWORD *)(v16 + 456) & 2) != 0 ) { a1 = v16 + 544; if ( a3 == (const char *)my_b_tell_0(v16 + 544) && (a4 || !a3) ) { v9 = 1; v8 = *(_QWORD *)(v16 + 568) - *(_QWORD *)(v16 + 560); } else { *(_DWORD *)(v16 + 768) = 1; } } v12 = 0; if ( *(_DWORD *)(v16 + 500) == 2 ) { if ( (unsigned long long)a3 >= *(_QWORD *)(*(_QWORD *)(v16 + 8) + 40LL) ) { a1 = v16; a2 = 0LL; if ( !(unsigned int)mi_readinfo((long long *)v16, 0LL, 0) ) { v12 = 1; goto LABEL_22; } return *(unsigned int *)my_thread_var(a1, a2); } if ( (!v9 || *(_QWORD *)(v7 + 320) > (unsigned long long)v8) && !*(_DWORD *)(v7 + 872) ) { a1 = *(unsigned int *)(v7 + 848); a2 = 0LL; if ( (unsigned int)my_lock(a1, 0LL, 0LL, 0LL, *(_QWORD *)(v16 + 816) | 0x20LL) ) return *(unsigned int *)my_thread_var(a1, a2); v12 = 1; } } LABEL_22: if ( (unsigned long long)a3 < *(_QWORD *)(*(_QWORD *)(v16 + 8) + 40LL) ) { *(_QWORD *)(v16 + 368) = a3; *(_QWORD *)(v16 + 376) = &a3[*(_QWORD *)(v7 + 328)]; if ( v9 ) { v4 = v16 + 544; v5 = v15; v11 = my_b_read_0(v16 + 544, v15, *(_QWORD *)(v7 + 320)); if ( *(_QWORD *)(*(_QWORD *)v16 + 328LL) != *(_QWORD *)(*(_QWORD *)v16 + 320LL) && !v11 ) { v4 = v16 + 544; v5 = v18; v11 = my_b_read_0(v16 + 544, v18, *(_QWORD *)(*(_QWORD *)v16 + 328LL) - *(_QWORD *)(*(_QWORD *)v16 + 320LL)); } if ( v12 ) { v4 = v16; v5 = 0LL; mi_writeinfo((_QWORD *)v16, 0LL); } if ( v11 ) { if ( *(_DWORD *)(v16 + 772) != -1 || !*(_DWORD *)my_thread_var(v4, v5) ) { if ( *(_DWORD *)(v16 + 772) ) *(_DWORD *)my_thread_var(v4, v5) = 127; else *(_DWORD *)my_thread_var(v4, v5) = 137; } return *(unsigned int *)my_thread_var(v4, v5); } else if ( *v15 ) { *(_DWORD *)(v16 + 464) |= 0x82u; return 0; } else { *(_DWORD *)my_thread_var(v4, v5) = 134; return 134; } } else { static_record = mi_read_static_record(v16, (unsigned long long)a3, v15); if ( static_record ) { if ( static_record <= 0 ) { return *(unsigned int *)my_thread_var(v16, a3); } else { *(_DWORD *)my_thread_var(v16, a3) = 134; return 134; } } return (unsigned int)static_record; } } else { if ( !*(_DWORD *)(*(_QWORD *)v16 + 872LL) ) { a1 = v16; a2 = 0LL; mi_writeinfo((_QWORD *)v16, 0LL); } *(_DWORD *)my_thread_var(a1, a2) = 137; return 137; } }
_mi_read_rnd_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x40],0x0 MOV dword ptr [RBP + -0x44],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x10 CMP EAX,0x0 JZ 0x001c4486 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x220] CMP RAX,qword ptr [RBP + -0x30] JBE 0x001c445b MOVSX EAX,byte ptr [RBP + -0x31] CMP EAX,0x0 JZ 0x001c4486 LAB_001c445b: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x220 MOV ESI,0x1 CALL 0x001e0b20 CMP EAX,0x0 JZ 0x001c4486 JMP 0x001c4477 LAB_001c4477: CALL 0x001f6280 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX JMP 0x001c47a2 LAB_001c4486: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x1c8] AND EAX,0x2 CMP EAX,0x0 JZ 0x001c4501 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x220 CALL 0x001c47d0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,RCX JNZ 0x001c44f1 MOVSX EAX,byte ptr [RBP + -0x31] CMP EAX,0x0 JNZ 0x001c44cc CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001c44f1 LAB_001c44cc: MOV dword ptr [RBP + -0x40],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x238] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x230] SUB RAX,RCX MOV dword ptr [RBP + -0x44],EAX JMP 0x001c44ff LAB_001c44f1: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x300],0x1 LAB_001c44ff: JMP 0x001c4501 LAB_001c4501: MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x1f4],0x2 JNZ 0x001c45c5 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] CMP RAX,qword ptr [RCX + 0x28] JC 0x001c4557 MOV RDI,qword ptr [RBP + -0x20] XOR EDX,EDX MOV ESI,EDX CALL 0x001b1030 CMP EAX,0x0 JZ 0x001c454e JMP 0x001c453f LAB_001c453f: CALL 0x001f6280 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX JMP 0x001c47a2 LAB_001c454e: MOV dword ptr [RBP + -0x38],0x1 JMP 0x001c45c3 LAB_001c4557: CMP dword ptr [RBP + -0x40],0x0 JZ 0x001c4570 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x140] MOV ECX,dword ptr [RBP + -0x44] CMP RAX,RCX JBE 0x001c45c1 LAB_001c4570: MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x001c45c1 MOV RAX,qword ptr [RBP + -0x50] MOV EDI,dword ptr [RAX + 0x350] MOV RAX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RAX + 0x330] OR R8,0x20 XOR ESI,ESI XOR EAX,EAX MOV ECX,EAX MOV RDX,RCX CALL 0x001f36f0 CMP EAX,0x0 JZ 0x001c45ba JMP 0x001c45ab LAB_001c45ab: CALL 0x001f6280 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX JMP 0x001c47a2 LAB_001c45ba: MOV dword ptr [RBP + -0x38],0x1 LAB_001c45c1: JMP 0x001c45c3 LAB_001c45c3: JMP 0x001c45c5 LAB_001c45c5: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] CMP RAX,qword ptr [RCX + 0x28] JC 0x001c460f JMP 0x001c45d9 LAB_001c45d9: JMP 0x001c45db LAB_001c45db: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x001c45f6 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x001b1190 LAB_001c45f6: JMP 0x001c45f8 LAB_001c45f8: CALL 0x001f6280 MOV dword ptr [RAX],0x89 MOV dword ptr [RBP + -0x14],0x89 JMP 0x001c47a2 LAB_001c460f: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x170],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] ADD RCX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x178],RCX CMP dword ptr [RBP + -0x40],0x0 JNZ 0x001c468a MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001c42a0 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x001c467d CMP dword ptr [RBP + -0x3c],0x0 JLE 0x001c4671 CALL 0x001f6280 MOV dword ptr [RAX],0x86 MOV dword ptr [RBP + -0x3c],0x86 JMP 0x001c467b LAB_001c4671: CALL 0x001f6280 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX LAB_001c467b: JMP 0x001c467d LAB_001c467d: JMP 0x001c467f LAB_001c467f: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x14],EAX JMP 0x001c47a2 LAB_001c468a: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x220 MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RAX + 0x140] CALL 0x001c4830 MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x140] JZ 0x001c4703 CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x001c4703 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x220 LEA RSI,[RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] SUB RDX,qword ptr [RAX + 0x140] CALL 0x001c4830 MOV dword ptr [RBP + -0x3c],EAX LAB_001c4703: CMP dword ptr [RBP + -0x38],0x0 JZ 0x001c4714 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x001b1190 LAB_001c4714: CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x001c4758 MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX],0x0 JNZ 0x001c4739 JMP 0x001c4725 LAB_001c4725: CALL 0x001f6280 MOV dword ptr [RAX],0x86 MOV dword ptr [RBP + -0x14],0x86 JMP 0x001c47a2 LAB_001c4739: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x1d0] OR ECX,0x82 MOV dword ptr [RAX + 0x1d0],ECX MOV dword ptr [RBP + -0x14],0x0 JMP 0x001c47a2 LAB_001c4758: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x304],-0x1 JNZ 0x001c476f CALL 0x001f6280 CMP dword ptr [RAX],0x0 JNZ 0x001c4796 LAB_001c476f: MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x304],0x0 JNZ 0x001c4789 CALL 0x001f6280 MOV dword ptr [RAX],0x89 JMP 0x001c4794 LAB_001c4789: CALL 0x001f6280 MOV dword ptr [RAX],0x7f LAB_001c4794: JMP 0x001c4796 LAB_001c4796: JMP 0x001c4798 LAB_001c4798: CALL 0x001f6280 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX LAB_001c47a2: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001c47c3 MOV EAX,dword ptr [RBP + -0x5c] ADD RSP,0x60 POP RBP RET LAB_001c47c3: CALL 0x0012a250
int _mi_read_rnd_static_record(long *param_1,char *param_2,ulong param_3,char param_4) { long lVar1; bool bVar2; bool bVar3; int iVar4; int *piVar5; ulong uVar6; int4 *puVar7; long in_FS_OFFSET; uint local_4c; int local_44; int local_1c; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; bVar3 = false; local_4c = 0; if (((*(uint *)(param_1 + 0x39) & 0x10) == 0) || (((param_3 < (ulong)param_1[0x44] && (param_4 == '\0')) || (iVar4 = my_b_flush_io_cache(param_1 + 0x44,1), iVar4 == 0)))) { if ((*(uint *)(param_1 + 0x39) & 2) != 0) { uVar6 = my_b_tell(param_1 + 0x44); if ((param_3 == uVar6) && ((param_4 != '\0' || (param_3 == 0)))) { bVar3 = true; local_4c = (int)param_1[0x47] - (int)param_1[0x46]; } else { *(int4 *)(param_1 + 0x60) = 1; } } bVar2 = false; if (*(int *)((long)param_1 + 500) == 2) { if (param_3 < *(ulong *)(param_1[1] + 0x28)) { if (((!bVar3) || ((ulong)local_4c < *(ulong *)(lVar1 + 0x140))) && (*(int *)(lVar1 + 0x368) == 0)) { iVar4 = my_lock(*(int4 *)(lVar1 + 0x350),0,0,0,param_1[0x66] | 0x20); if (iVar4 != 0) { piVar5 = (int *)_my_thread_var(); local_1c = *piVar5; goto LAB_001c47a2; } bVar2 = true; } } else { iVar4 = _mi_readinfo(param_1,0); if (iVar4 != 0) { piVar5 = (int *)_my_thread_var(); local_1c = *piVar5; goto LAB_001c47a2; } bVar2 = true; } } if (param_3 < *(ulong *)(param_1[1] + 0x28)) { param_1[0x2e] = param_3; param_1[0x2f] = param_3 + *(long *)(lVar1 + 0x148); if (bVar3) { local_44 = my_b_read(param_1 + 0x44,param_2,*(int8 *)(lVar1 + 0x140)); if ((*(long *)(*param_1 + 0x148) != *(long *)(*param_1 + 0x140)) && (local_44 == 0)) { local_44 = my_b_read(param_1 + 0x44,local_18, *(long *)(*param_1 + 0x148) - *(long *)(*param_1 + 0x140)); } if (bVar2) { _mi_writeinfo(param_1,0); } if (local_44 == 0) { if (*param_2 == '\0') { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x86; local_1c = 0x86; } else { *(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 0x82; local_1c = 0; } } else { if ((*(int *)((long)param_1 + 0x304) != -1) || (piVar5 = (int *)_my_thread_var(), *piVar5 == 0)) { if (*(int *)((long)param_1 + 0x304) == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x89; } else { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x7f; } } piVar5 = (int *)_my_thread_var(); local_1c = *piVar5; } } else { local_44 = _mi_read_static_record(param_1,param_3,param_2); if (local_44 != 0) { if (local_44 < 1) { piVar5 = (int *)_my_thread_var(); local_44 = *piVar5; } else { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x86; local_44 = 0x86; } } local_1c = local_44; } } else { if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x89; local_1c = 0x89; } } else { piVar5 = (int *)_my_thread_var(); local_1c = *piVar5; } LAB_001c47a2: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_1c; }
14,906
CLI::App::run_callback(bool, bool)
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::run_callback(bool final_mode, bool suppress_final_callback) { pre_callback(); // in the main app if immediate_callback_ is set it runs the main callback before the used subcommands if(!final_mode && parse_complete_callback_) { parse_complete_callback_(); } // run the callbacks for the received subcommands for(App *subc : get_subcommands()) { if(subc->parent_ == this) { subc->run_callback(true, suppress_final_callback); } } // now run callbacks for option_groups for(auto &subc : subcommands_) { if(subc->name_.empty() && subc->count_all() > 0) { subc->run_callback(true, suppress_final_callback); } } // finally run the main callback if(final_callback_ && (parsed_ > 0) && (!suppress_final_callback)) { if(!name_.empty() || count_all() > 0 || parent_ == nullptr) { final_callback_(); } } }
O1
cpp
CLI::App::run_callback(bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %edx, %ebp movl %esi, %r14d movq %rdi, %rbx movq (%rdi), %rax callq *0x10(%rax) testl %r14d, %r14d jne 0x1e59b cmpq $0x0, 0x80(%rbx) je 0x1e59b leaq 0x70(%rbx), %rdi callq *0x88(%rbx) leaq 0x1a8(%rbx), %rsi leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x26f2e movq (%r14), %r15 movq 0x8(%r14), %r12 cmpq %r12, %r15 je 0x1e5e1 movzbl %bpl, %r14d movq (%r15), %rdi cmpq %rbx, 0x2c8(%rdi) jne 0x1e5d8 movl $0x1, %esi movl %r14d, %edx callq 0x1e568 addq $0x8, %r15 cmpq %r12, %r15 jne 0x1e5bf movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1e5f8 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x7430 movq 0x280(%rbx), %r15 movq 0x288(%rbx), %r12 cmpq %r12, %r15 je 0x1e63c movzbl %bpl, %r14d movq (%r15), %rdi cmpq $0x0, 0x10(%rdi) jne 0x1e633 callq 0x24678 testq %rax, %rax je 0x1e633 movq (%r15), %rdi movl $0x1, %esi movl %r14d, %edx callq 0x1e568 addq $0x10, %r15 cmpq %r12, %r15 jne 0x1e60f cmpq $0x0, 0xa0(%rbx) sete %al cmpl $0x0, 0x2a4(%rbx) sete %cl orb %al, %cl orb %bpl, %cl jne 0x1e676 cmpq $0x0, 0x10(%rbx) je 0x1e683 cmpq $0x0, 0xa0(%rbx) je 0x1e69c leaq 0x90(%rbx), %rdi callq *0xa8(%rbx) addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x24678 testq %rax, %rax jne 0x1e65f cmpq $0x0, 0x2c8(%rbx) jne 0x1e676 jmp 0x1e65f callq 0x7170 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1e6bb movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x7430 movq %rbx, %rdi callq 0x7780 nop
_ZN3CLI3App12run_callbackEbb: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, edx mov r14d, esi mov rbx, rdi mov rax, [rdi] call qword ptr [rax+10h] test r14d, r14d jnz short loc_1E59B cmp qword ptr [rbx+80h], 0 jz short loc_1E59B lea rdi, [rbx+70h] call qword ptr [rbx+88h] loc_1E59B: lea rsi, [rbx+1A8h] lea r14, [rsp+48h+var_40] mov rdi, r14 call _ZNSt6vectorIPN3CLI3AppESaIS2_EEC2ERKS4_; std::vector<CLI::App *>::vector(std::vector<CLI::App *> const&) mov r15, [r14] mov r12, [r14+8] cmp r15, r12 jz short loc_1E5E1 movzx r14d, bpl loc_1E5BF: mov rdi, [r15]; this cmp [rdi+2C8h], rbx jnz short loc_1E5D8 mov esi, 1; bool mov edx, r14d; bool call _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool) loc_1E5D8: add r15, 8 cmp r15, r12 jnz short loc_1E5BF loc_1E5E1: mov rdi, [rsp+48h+var_40]; void * test rdi, rdi jz short loc_1E5F8 mov rsi, [rsp+48h+var_30] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E5F8: mov r15, [rbx+280h] mov r12, [rbx+288h] cmp r15, r12 jz short loc_1E63C movzx r14d, bpl loc_1E60F: mov rdi, [r15]; this cmp qword ptr [rdi+10h], 0 jnz short loc_1E633 call _ZNK3CLI3App9count_allEv; CLI::App::count_all(void) test rax, rax jz short loc_1E633 mov rdi, [r15]; this mov esi, 1; bool mov edx, r14d; bool call _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool) loc_1E633: add r15, 10h cmp r15, r12 jnz short loc_1E60F loc_1E63C: cmp qword ptr [rbx+0A0h], 0 setz al cmp dword ptr [rbx+2A4h], 0 setz cl or cl, al or cl, bpl jnz short loc_1E676 cmp qword ptr [rbx+10h], 0 jz short loc_1E683 loc_1E65F: cmp qword ptr [rbx+0A0h], 0 jz short loc_1E69C lea rdi, [rbx+90h] call qword ptr [rbx+0A8h] loc_1E676: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1E683: mov rdi, rbx; this call _ZNK3CLI3App9count_allEv; CLI::App::count_all(void) test rax, rax jnz short loc_1E65F cmp qword ptr [rbx+2C8h], 0 jnz short loc_1E676 jmp short loc_1E65F loc_1E69C: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax mov rdi, [rsp+48h+var_40]; void * test rdi, rdi jz short loc_1E6BB mov rsi, [rsp+48h+var_30] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E6BB: mov rdi, rbx call __Unwind_Resume
char CLI::App::run_callback(CLI::App *this, int a2, bool a3) { CLI::App **v4; // r15 CLI::App **v5; // r12 CLI::App **v6; // r15 CLI::App **i; // r12 long long v8; // rax void *v10; // [rsp+8h] [rbp-40h] BYREF CLI::App **v11; // [rsp+10h] [rbp-38h] long long v12; // [rsp+18h] [rbp-30h] (*(void ( **)(CLI::App *))(*(_QWORD *)this + 16LL))(this); if ( !a2 && *((_QWORD *)this + 16) ) (*((void ( **)(char *))this + 17))((char *)this + 112); std::vector<CLI::App *>::vector(&v10, (char *)this + 424); v4 = (CLI::App **)v10; v5 = v11; if ( v10 != v11 ) { do { if ( *((CLI::App **)*v4 + 89) == this ) CLI::App::run_callback(*v4, 1, a3); ++v4; } while ( v4 != v5 ); } if ( v10 ) operator delete(v10, v12 - (_QWORD)v10); v6 = (CLI::App **)*((_QWORD *)this + 80); for ( i = (CLI::App **)*((_QWORD *)this + 81); v6 != i; v6 += 2 ) { if ( !*((_QWORD *)*v6 + 2) && CLI::App::count_all(*v6) ) CLI::App::run_callback(*v6, 1, a3); } LOBYTE(v8) = *((_QWORD *)this + 20) == 0LL; if ( !(a3 | (unsigned __int8)(v8 | (*((_DWORD *)this + 169) == 0))) && (*((_QWORD *)this + 2) || (v8 = CLI::App::count_all(this)) != 0 || !*((_QWORD *)this + 89)) ) { if ( !*((_QWORD *)this + 20) ) std::__throw_bad_function_call(); LOBYTE(v8) = (*((long long ( **)(char *))this + 21))((char *)this + 144); } return v8; }
run_callback: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,EDX MOV R14D,ESI MOV RBX,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x10] TEST R14D,R14D JNZ 0x0011e59b CMP qword ptr [RBX + 0x80],0x0 JZ 0x0011e59b LEA RDI,[RBX + 0x70] CALL qword ptr [RBX + 0x88] LAB_0011e59b: LEA RSI,[RBX + 0x1a8] LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00126f2e MOV R15,qword ptr [R14] MOV R12,qword ptr [R14 + 0x8] CMP R15,R12 JZ 0x0011e5e1 MOVZX R14D,BPL LAB_0011e5bf: MOV RDI,qword ptr [R15] CMP qword ptr [RDI + 0x2c8],RBX JNZ 0x0011e5d8 LAB_0011e5cb: MOV ESI,0x1 MOV EDX,R14D CALL 0x0011e568 LAB_0011e5d8: ADD R15,0x8 CMP R15,R12 JNZ 0x0011e5bf LAB_0011e5e1: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0011e5f8 MOV RSI,qword ptr [RSP + 0x18] SUB RSI,RDI CALL 0x00107430 LAB_0011e5f8: MOV R15,qword ptr [RBX + 0x280] MOV R12,qword ptr [RBX + 0x288] CMP R15,R12 JZ 0x0011e63c MOVZX R14D,BPL LAB_0011e60f: MOV RDI,qword ptr [R15] CMP qword ptr [RDI + 0x10],0x0 JNZ 0x0011e633 CALL 0x00124678 TEST RAX,RAX JZ 0x0011e633 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV EDX,R14D CALL 0x0011e568 LAB_0011e633: ADD R15,0x10 CMP R15,R12 JNZ 0x0011e60f LAB_0011e63c: CMP qword ptr [RBX + 0xa0],0x0 SETZ AL CMP dword ptr [RBX + 0x2a4],0x0 SETZ CL OR CL,AL OR CL,BPL JNZ 0x0011e676 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0011e683 LAB_0011e65f: CMP qword ptr [RBX + 0xa0],0x0 JZ 0x0011e69c LEA RDI,[RBX + 0x90] CALL qword ptr [RBX + 0xa8] LAB_0011e676: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011e683: MOV RDI,RBX CALL 0x00124678 TEST RAX,RAX JNZ 0x0011e65f CMP qword ptr [RBX + 0x2c8],0x0 JNZ 0x0011e676 JMP 0x0011e65f LAB_0011e69c: CALL 0x00107170
/* CLI::App::run_callback(bool, bool) */ void __thiscall CLI::App::run_callback(App *this,bool param_1,bool param_2) { int8 *puVar1; long lVar2; int7 in_register_00000031; int8 *puVar3; int8 *local_40; int8 *local_38; long local_30; (**(code **)(*(long *)this + 0x10))(); if (((int)CONCAT71(in_register_00000031,param_1) == 0) && (*(long *)(this + 0x80) != 0)) { (**(code **)(this + 0x88))(this + 0x70); } std::vector<CLI::App*,std::allocator<CLI::App*>>::vector ((vector<CLI::App*,std::allocator<CLI::App*>> *)&local_40,(vector *)(this + 0x1a8)); for (puVar3 = local_40; puVar3 != local_38; puVar3 = puVar3 + 1) { if (*(App **)((App *)*puVar3 + 0x2c8) == this) { /* try { // try from 0011e5cb to 0011e5d7 has its CatchHandler @ 0011e6a1 */ run_callback((App *)*puVar3,true,param_2); } } if (local_40 != (int8 *)0x0) { operator_delete(local_40,local_30 - (long)local_40); } puVar1 = *(int8 **)(this + 0x288); for (puVar3 = *(int8 **)(this + 0x280); puVar3 != puVar1; puVar3 = puVar3 + 2) { if ((*(long *)((App *)*puVar3 + 0x10) == 0) && (lVar2 = count_all((App *)*puVar3), lVar2 != 0)) { run_callback((App *)*puVar3,true,param_2); } } if (((*(int *)(this + 0x2a4) != 0 && *(long *)(this + 0xa0) != 0) && !param_2) && (((*(long *)(this + 0x10) != 0 || (lVar2 = count_all(this), lVar2 != 0)) || (*(long *)(this + 0x2c8) == 0)))) { if (*(long *)(this + 0xa0) == 0) { /* WARNING: Subroutine does not return */ std::__throw_bad_function_call(); } (**(code **)(this + 0xa8))(this + 0x90); } return; }
14,907
js_os_waitpid
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_waitpid(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int pid, status, options, ret; JSValue obj; if (JS_ToInt32(ctx, &pid, argv[0])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &options, argv[1])) return JS_EXCEPTION; ret = waitpid(pid, &status, options); if (ret < 0) { ret = -errno; status = 0; } obj = JS_NewArray(ctx); if (JS_IsException(obj)) return obj; JS_DefinePropertyValueUint32(ctx, obj, 0, JS_NewInt32(ctx, ret), JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, obj, 1, JS_NewInt32(ctx, status), JS_PROP_C_W_E); return obj; }
O0
c
js_os_waitpid: subq $0xd8, %rsp movq %rsi, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq %rdi, 0x70(%rsp) movl %ecx, 0x6c(%rsp) movq %r8, 0x60(%rsp) movq 0x70(%rsp), %rdi movq 0x60(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x5c(%rsp), %rsi callq 0x38f20 cmpl $0x0, %eax je 0x1c66e movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x1c836 movq 0x70(%rsp), %rdi movq 0x60(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x54(%rsp), %rsi callq 0x38f20 cmpl $0x0, %eax je 0x1c6ab movl $0x0, 0x88(%rsp) movq $0x6, 0x90(%rsp) jmp 0x1c836 movl 0x5c(%rsp), %edi movl 0x54(%rsp), %edx leaq 0x58(%rsp), %rsi callq 0xe740 movl %eax, 0x50(%rsp) cmpl $0x0, 0x50(%rsp) jge 0x1c6e0 callq 0xe0b0 movq %rax, %rcx xorl %eax, %eax subl (%rcx), %eax movl %eax, 0x50(%rsp) movl $0x0, 0x58(%rsp) movq 0x70(%rsp), %rdi callq 0x2a520 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x1c73b movq 0x40(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0x1c836 movq 0x70(%rsp), %rdi movl 0x50(%rsp), %eax movq %rdi, 0xc0(%rsp) movl %eax, 0xbc(%rsp) movl 0xbc(%rsp), %eax movl %eax, 0xc8(%rsp) movq $0x0, 0xd0(%rsp) movq 0xc8(%rsp), %rcx movq 0xd0(%rsp), %rax movq %rcx, 0x20(%rsp) movq %rax, 0x28(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 movq %rsp, %rax movl $0x7, (%rax) xorl %ecx, %ecx callq 0x37370 movq 0x70(%rsp), %rdi movl 0x58(%rsp), %eax movq %rdi, 0xa0(%rsp) movl %eax, 0x9c(%rsp) movl 0x9c(%rsp), %eax movl %eax, 0xa8(%rsp) movq $0x0, 0xb0(%rsp) movq 0xa8(%rsp), %rcx movq 0xb0(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rax, 0x18(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x10(%rsp), %r8 movq 0x18(%rsp), %r9 movl $0x1, %ecx movl $0x7, (%rsp) callq 0x37370 movq 0x40(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x88(%rsp), %rax movq 0x90(%rsp), %rdx addq $0xd8, %rsp retq nop
js_os_waitpid: sub rsp, 0D8h mov [rsp+0D8h+var_60], rsi mov [rsp+0D8h+var_58], rdx mov [rsp+0D8h+var_68], rdi mov [rsp+0D8h+var_6C], ecx mov [rsp+0D8h+var_78], r8 mov rdi, [rsp+0D8h+var_68] mov rax, [rsp+0D8h+var_78] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+0D8h+var_7C] call JS_ToInt32 cmp eax, 0 jz short loc_1C66E mov dword ptr [rsp+0D8h+var_50], 0 mov [rsp+0D8h+var_48], 6 jmp loc_1C836 loc_1C66E: mov rdi, [rsp+0D8h+var_68] mov rax, [rsp+0D8h+var_78] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+0D8h+var_84] call JS_ToInt32 cmp eax, 0 jz short loc_1C6AB mov dword ptr [rsp+0D8h+var_50], 0 mov [rsp+0D8h+var_48], 6 jmp loc_1C836 loc_1C6AB: mov edi, [rsp+0D8h+var_7C] mov edx, [rsp+0D8h+var_84] lea rsi, [rsp+0D8h+var_80] call _waitpid mov [rsp+0D8h+var_88], eax cmp [rsp+0D8h+var_88], 0 jge short loc_1C6E0 call ___errno_location mov rcx, rax xor eax, eax sub eax, [rcx] mov [rsp+0D8h+var_88], eax mov [rsp+0D8h+var_80], 0 loc_1C6E0: mov rdi, [rsp+0D8h+var_68] call JS_NewArray mov [rsp+0D8h+var_A8], rax mov [rsp+0D8h+var_A0], rdx mov rax, [rsp+0D8h+var_A8] mov [rsp+0D8h+var_98], rax mov rax, [rsp+0D8h+var_A0] mov [rsp+0D8h+var_90], rax mov rdi, [rsp+0D8h+var_98] mov rsi, [rsp+0D8h+var_90] call JS_IsException_0 cmp eax, 0 jz short loc_1C73B mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_50], rax mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_48], rax jmp loc_1C836 loc_1C73B: mov rdi, [rsp+0D8h+var_68] mov eax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_18], rdi mov [rsp+0D8h+var_1C], eax mov eax, [rsp+0D8h+var_1C] mov dword ptr [rsp+0D8h+var_10], eax mov [rsp+0D8h+var_8], 0 mov rcx, [rsp+0D8h+var_10] mov rax, [rsp+0D8h+var_8] mov [rsp+0D8h+var_B8], rcx mov [rsp+0D8h+var_B0], rax mov rsi, [rsp+0D8h+var_98] mov rdx, [rsp+0D8h+var_90] mov r8, [rsp+0D8h+var_B8] mov r9, [rsp+0D8h+var_B0] mov rax, rsp mov dword ptr [rax], 7 xor ecx, ecx call JS_DefinePropertyValueUint32 mov rdi, [rsp+0D8h+var_68] mov eax, [rsp+0D8h+var_80] mov [rsp+0D8h+var_38], rdi mov [rsp+0D8h+var_3C], eax mov eax, [rsp+0D8h+var_3C] mov dword ptr [rsp+0D8h+var_30], eax mov [rsp+0D8h+var_28], 0 mov rcx, [rsp+0D8h+var_30] mov rax, [rsp+0D8h+var_28] mov [rsp+0D8h+var_C8], rcx mov [rsp+0D8h+var_C0], rax mov rsi, [rsp+0D8h+var_98] mov rdx, [rsp+0D8h+var_90] mov r8, [rsp+0D8h+var_C8] mov r9, [rsp+0D8h+var_C0] mov ecx, 1 mov [rsp+0D8h+var_D8], 7 call JS_DefinePropertyValueUint32 mov rax, [rsp+0D8h+var_98] mov [rsp+0D8h+var_50], rax mov rax, [rsp+0D8h+var_90] mov [rsp+0D8h+var_48], rax loc_1C836: mov rax, [rsp+0D8h+var_50] mov rdx, [rsp+0D8h+var_48] add rsp, 0D8h retn
long long js_os_waitpid(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v5; // rdx long long v7; // [rsp+30h] [rbp-A8h] long long v8; // [rsp+48h] [rbp-90h] int v9; // [rsp+50h] [rbp-88h] unsigned int v10; // [rsp+54h] [rbp-84h] BYREF int v11; // [rsp+58h] [rbp-80h] BYREF unsigned int v12; // [rsp+5Ch] [rbp-7Ch] BYREF _QWORD *v13; // [rsp+60h] [rbp-78h] int v14; // [rsp+6Ch] [rbp-6Ch] long long v15; // [rsp+70h] [rbp-68h] long long v16; // [rsp+78h] [rbp-60h] long long v17; // [rsp+80h] [rbp-58h] long long v18; // [rsp+88h] [rbp-50h] long long v19; // [rsp+90h] [rbp-48h] int v20; // [rsp+9Ch] [rbp-3Ch] long long v21; // [rsp+A0h] [rbp-38h] long long v22; // [rsp+A8h] [rbp-30h] long long v23; // [rsp+B0h] [rbp-28h] int v24; // [rsp+BCh] [rbp-1Ch] long long v25; // [rsp+C0h] [rbp-18h] long long v26; // [rsp+C8h] [rbp-10h] long long v27; // [rsp+D0h] [rbp-8h] v16 = a2; v17 = a3; v15 = a1; v14 = a4; v13 = a5; if ( (unsigned int)JS_ToInt32(a1, &v12, *a5, a5[1]) ) { LODWORD(v18) = 0; v19 = 6LL; } else if ( (unsigned int)JS_ToInt32(v15, &v10, v13[2], v13[3]) ) { LODWORD(v18) = 0; v19 = 6LL; } else { v9 = waitpid(v12, &v11, v10); if ( v9 < 0 ) { v9 = -*(_DWORD *)__errno_location(); v11 = 0; } v7 = JS_NewArray(v15); v8 = v5; if ( !JS_IsException_0(v7, v5) ) { v25 = v15; v24 = v9; LODWORD(v26) = v9; v27 = 0LL; JS_DefinePropertyValueUint32(v15, v7, v8, 0, v9, 0, 7); v21 = v15; v20 = v11; LODWORD(v22) = v11; v23 = 0LL; JS_DefinePropertyValueUint32(v15, v7, v8, 1, v11, 0, 7); } v18 = v7; v19 = v8; } return v18; }
js_os_waitpid: SUB RSP,0xd8 MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x80],RDX MOV qword ptr [RSP + 0x70],RDI MOV dword ptr [RSP + 0x6c],ECX MOV qword ptr [RSP + 0x60],R8 MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x5c] CALL 0x00138f20 CMP EAX,0x0 JZ 0x0011c66e MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0011c836 LAB_0011c66e: MOV RDI,qword ptr [RSP + 0x70] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x54] CALL 0x00138f20 CMP EAX,0x0 JZ 0x0011c6ab MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x6 JMP 0x0011c836 LAB_0011c6ab: MOV EDI,dword ptr [RSP + 0x5c] MOV EDX,dword ptr [RSP + 0x54] LEA RSI,[RSP + 0x58] CALL 0x0010e740 MOV dword ptr [RSP + 0x50],EAX CMP dword ptr [RSP + 0x50],0x0 JGE 0x0011c6e0 CALL 0x0010e0b0 MOV RCX,RAX XOR EAX,EAX SUB EAX,dword ptr [RCX] MOV dword ptr [RSP + 0x50],EAX MOV dword ptr [RSP + 0x58],0x0 LAB_0011c6e0: MOV RDI,qword ptr [RSP + 0x70] CALL 0x0012a520 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00110390 CMP EAX,0x0 JZ 0x0011c73b MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x90],RAX JMP 0x0011c836 LAB_0011c73b: MOV RDI,qword ptr [RSP + 0x70] MOV EAX,dword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xc0],RDI MOV dword ptr [RSP + 0xbc],EAX MOV EAX,dword ptr [RSP + 0xbc] MOV dword ptr [RSP + 0xc8],EAX MOV qword ptr [RSP + 0xd0],0x0 MOV RCX,qword ptr [RSP + 0xc8] MOV RAX,qword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x28],RAX MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] MOV RAX,RSP MOV dword ptr [RAX],0x7 XOR ECX,ECX CALL 0x00137370 MOV RDI,qword ptr [RSP + 0x70] MOV EAX,dword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa0],RDI MOV dword ptr [RSP + 0x9c],EAX MOV EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0xa8],EAX MOV qword ptr [RSP + 0xb0],0x0 MOV RCX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] MOV ECX,0x1 MOV dword ptr [RSP],0x7 CALL 0x00137370 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x90],RAX LAB_0011c836: MOV RAX,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] ADD RSP,0xd8 RET
int1 [16] js_os_waitpid(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int iVar1; int *piVar2; int1 auVar5 [16]; int local_88; int local_84; int local_80; __pid_t local_7c; int8 *local_78; int4 local_6c; int8 local_68; int8 local_60; int8 local_58; int4 local_50; int4 uStack_4c; int8 local_48; int local_3c; int8 local_38; int local_30; int4 uStack_2c; int8 local_28; int local_1c; int8 local_18; int local_10; int4 uStack_c; int8 local_8; int8 uVar3; int8 uVar4; local_78 = param_5; local_6c = param_4; local_68 = param_1; local_60 = param_2; local_58 = param_3; iVar1 = JS_ToInt32(param_1,&local_7c,*param_5,param_5[1]); if (iVar1 == 0) { iVar1 = JS_ToInt32(local_68,&local_84,local_78[2],local_78[3]); if (iVar1 == 0) { local_88 = waitpid(local_7c,&local_80,local_84); if (local_88 < 0) { piVar2 = __errno_location(); local_88 = -*piVar2; local_80 = 0; } auVar5 = JS_NewArray(local_68); uVar4 = auVar5._8_8_; uVar3 = auVar5._0_8_; iVar1 = JS_IsException(uVar3,uVar4); local_50 = auVar5._0_4_; uStack_4c = auVar5._4_4_; local_48 = uVar4; if (iVar1 == 0) { local_18 = local_68; local_1c = local_88; local_10 = local_88; local_8 = 0; JS_DefinePropertyValueUint32(local_68,uVar3,uVar4,0,CONCAT44(uStack_c,local_88),0,7); local_38 = local_68; local_3c = local_80; local_30 = local_80; local_28 = 0; JS_DefinePropertyValueUint32(local_68,uVar3,uVar4,1,CONCAT44(uStack_2c,local_80),0,7); } } else { local_50 = 0; local_48 = 6; } } else { local_50 = 0; local_48 = 6; } auVar5._4_4_ = uStack_4c; auVar5._0_4_ = local_50; auVar5._8_8_ = local_48; return auVar5; }
14,908
js_os_waitpid
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_waitpid(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int pid, status, options, ret; JSValue obj; if (JS_ToInt32(ctx, &pid, argv[0])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &options, argv[1])) return JS_EXCEPTION; ret = waitpid(pid, &status, options); if (ret < 0) { ret = -errno; status = 0; } obj = JS_NewArray(ctx); if (JS_IsException(obj)) return obj; JS_DefinePropertyValueUint32(ctx, obj, 0, JS_NewInt32(ctx, ret), JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, obj, 1, JS_NewInt32(ctx, status), JS_PROP_C_W_E); return obj; }
O1
c
js_os_waitpid: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %r8, %r15 movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x1c(%rsp), %rsi callq 0x279b0 movl $0x6, %r14d testl %eax, %eax jne 0x1a889 movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x279b0 testl %eax, %eax je 0x1a8a4 xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl 0x1c(%rsp), %edi movl 0x18(%rsp), %edx leaq 0x14(%rsp), %rsi callq 0xe750 movl %eax, %ebp testl %eax, %eax jns 0x1a8cb callq 0xe0b0 xorl %ecx, %ecx xorl %ebp, %ebp subl (%rax), %ebp movl %ecx, 0x14(%rsp) movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 movq %rbx, %rdi callq 0xf6ed movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d je 0x1a925 movl %ebp, %r8d movl $0x7, %ebp movl %ebp, (%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx xorl %r9d, %r9d callq 0x26bc5 movl 0x14(%rsp), %r8d movl %ebp, (%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x1, %ecx xorl %r9d, %r9d callq 0x26bc5 movq %r15, %rcx andq %r12, %rcx jmp 0x1a88e
js_os_waitpid: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r15, r8 mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+48h+var_2C] call JS_ToInt32 mov r14d, 6 test eax, eax jnz short loc_1A889 mov rdx, [r15+10h] mov rcx, [r15+18h] lea rsi, [rsp+48h+var_30] mov rdi, rbx call JS_ToInt32 test eax, eax jz short loc_1A8A4 loc_1A889: xor r15d, r15d xor ecx, ecx loc_1A88E: mov eax, r15d or rax, rcx mov rdx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1A8A4: mov edi, [rsp+48h+var_2C] mov edx, [rsp+48h+var_30] lea rsi, [rsp+48h+var_34] call _waitpid mov ebp, eax test eax, eax jns short loc_1A8CB call ___errno_location xor ecx, ecx xor ebp, ebp sub ebp, [rax] mov [rsp+48h+var_34], ecx loc_1A8CB: mov r12, 0FFFFFFFF00000000h mov rdi, rbx call JS_NewArray mov r15, rax mov r14, rdx cmp r14d, 6 jz short loc_1A925 mov r8d, ebp mov ebp, 7 mov [rsp+48h+var_48], ebp mov rdi, rbx mov rsi, r15 mov rdx, r14 xor ecx, ecx xor r9d, r9d call JS_DefinePropertyValueUint32 mov r8d, [rsp+48h+var_34] mov [rsp+48h+var_48], ebp mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, 1 xor r9d, r9d call JS_DefinePropertyValueUint32 loc_1A925: mov rcx, r15 and rcx, r12 jmp loc_1A88E
unsigned long long js_os_waitpid(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r15 unsigned long long v8; // rcx long long v10; // rdi int v11; // ebp long long v12; // rax int v13; // edx int v14; // r14d int v15; // [rsp+14h] [rbp-34h] BYREF unsigned int v16; // [rsp+18h] [rbp-30h] BYREF _DWORD v17[11]; // [rsp+1Ch] [rbp-2Ch] BYREF if ( (unsigned int)JS_ToInt32(a1, v17, *a5, a5[1]) || (unsigned int)JS_ToInt32(a1, &v16, a5[2], a5[3]) ) { LODWORD(v7) = 0; v8 = 0LL; } else { v10 = v17[0]; v11 = waitpid(v17[0], &v15, v16); if ( v11 < 0 ) { v11 = -*(_DWORD *)__errno_location(v10); v15 = 0; } v12 = JS_NewArray(a1); v7 = v12; v14 = v13; if ( v13 != 6 ) { JS_DefinePropertyValueUint32(a1, v12, v13, 0, v11, 0, 7); JS_DefinePropertyValueUint32(a1, v7, v14, 1, v15, 0, 7); } v8 = v7 & 0xFFFFFFFF00000000LL; } return v8 | (unsigned int)v7; }
14,909
js_os_waitpid
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_waitpid(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int pid, status, options, ret; JSValue obj; if (JS_ToInt32(ctx, &pid, argv[0])) return JS_EXCEPTION; if (JS_ToInt32(ctx, &options, argv[1])) return JS_EXCEPTION; ret = waitpid(pid, &status, options); if (ret < 0) { ret = -errno; status = 0; } obj = JS_NewArray(ctx); if (JS_IsException(obj)) return obj; JS_DefinePropertyValueUint32(ctx, obj, 0, JS_NewInt32(ctx, ret), JS_PROP_C_W_E); JS_DefinePropertyValueUint32(ctx, obj, 1, JS_NewInt32(ctx, status), JS_PROP_C_W_E); return obj; }
O2
c
js_os_waitpid: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %r8, %r15 movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x1c(%rsp), %rsi callq 0x215d7 pushq $0x6 popq %r14 testl %eax, %eax jne 0x15510 movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x215d7 testl %eax, %eax je 0x1552b xorl %r15d, %r15d xorl %ecx, %ecx movl %r15d, %eax orq %rcx, %rax movq %r14, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl 0x1c(%rsp), %edi movl 0x18(%rsp), %edx leaq 0x14(%rsp), %rsi callq 0xe770 movl %eax, %ebp testl %eax, %eax jns 0x15551 callq 0xe0b0 xorl %ebp, %ebp subl (%rax), %ebp andl $0x0, 0x14(%rsp) movabsq $-0x100000000, %r12 # imm = 0xFFFFFFFF00000000 movq %rbx, %rdi callq 0x1b2bb movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d je 0x155a7 movl %ebp, %r8d pushq $0x7 popq %rbp movl %ebp, (%rsp) movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx xorl %ecx, %ecx xorl %r9d, %r9d callq 0x20972 movl 0x14(%rsp), %r8d movl %ebp, (%rsp) pushq $0x1 popq %rcx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx xorl %r9d, %r9d callq 0x20972 movq %r15, %rcx andq %r12, %rcx jmp 0x15515
js_os_waitpid: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r15, r8 mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+48h+var_2C] call JS_ToInt32 push 6 pop r14 test eax, eax jnz short loc_15510 mov rdx, [r15+10h] mov rcx, [r15+18h] lea rsi, [rsp+48h+var_30] mov rdi, rbx call JS_ToInt32 test eax, eax jz short loc_1552B loc_15510: xor r15d, r15d xor ecx, ecx loc_15515: mov eax, r15d or rax, rcx mov rdx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1552B: mov edi, [rsp+48h+var_2C] mov edx, [rsp+48h+var_30] lea rsi, [rsp+48h+var_34] call _waitpid mov ebp, eax test eax, eax jns short loc_15551 call ___errno_location xor ebp, ebp sub ebp, [rax] and [rsp+48h+var_34], 0 loc_15551: mov r12, 0FFFFFFFF00000000h mov rdi, rbx call JS_NewArray mov r15, rax mov r14, rdx cmp r14d, 6 jz short loc_155A7 mov r8d, ebp push 7 pop rbp mov [rsp+48h+var_48], ebp mov rdi, rbx mov rsi, r15 mov rdx, r14 xor ecx, ecx xor r9d, r9d call JS_DefinePropertyValueUint32 mov r8d, [rsp+48h+var_34] mov [rsp+48h+var_48], ebp push 1 pop rcx mov rdi, rbx mov rsi, r15 mov rdx, r14 xor r9d, r9d call JS_DefinePropertyValueUint32 loc_155A7: mov rcx, r15 and rcx, r12 jmp loc_15515
unsigned long long js_os_waitpid(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r15 unsigned long long v8; // rcx long long v10; // rdi int v11; // ebp long long v12; // rax int v13; // edx int v14; // r14d int v15; // [rsp+14h] [rbp-34h] BYREF unsigned int v16; // [rsp+18h] [rbp-30h] BYREF _DWORD v17[11]; // [rsp+1Ch] [rbp-2Ch] BYREF if ( (unsigned int)JS_ToInt32(a1, v17, *a5, a5[1]) || (unsigned int)JS_ToInt32(a1, &v16, a5[2], a5[3]) ) { LODWORD(v7) = 0; v8 = 0LL; } else { v10 = v17[0]; v11 = waitpid(v17[0], &v15, v16); if ( v11 < 0 ) { v11 = -*(_DWORD *)__errno_location(v10); v15 = 0; } v12 = JS_NewArray(a1); v7 = v12; v14 = v13; if ( v13 != 6 ) { JS_DefinePropertyValueUint32(a1, v12, v13, 0, v11, 0, 7); JS_DefinePropertyValueUint32(a1, v7, v14, 1, v15, 0, 7); } v8 = v7 & 0xFFFFFFFF00000000LL; } return v8 | (unsigned int)v7; }
js_os_waitpid: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,R8 MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x1c] CALL 0x001215d7 PUSH 0x6 POP R14 TEST EAX,EAX JNZ 0x00115510 MOV RDX,qword ptr [R15 + 0x10] MOV RCX,qword ptr [R15 + 0x18] LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x001215d7 TEST EAX,EAX JZ 0x0011552b LAB_00115510: XOR R15D,R15D XOR ECX,ECX LAB_00115515: MOV EAX,R15D OR RAX,RCX MOV RDX,R14 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011552b: MOV EDI,dword ptr [RSP + 0x1c] MOV EDX,dword ptr [RSP + 0x18] LEA RSI,[RSP + 0x14] CALL 0x0010e770 MOV EBP,EAX TEST EAX,EAX JNS 0x00115551 CALL 0x0010e0b0 XOR EBP,EBP SUB EBP,dword ptr [RAX] AND dword ptr [RSP + 0x14],0x0 LAB_00115551: MOV R12,-0x100000000 MOV RDI,RBX CALL 0x0011b2bb MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x001155a7 MOV R8D,EBP PUSH 0x7 POP RBP MOV dword ptr [RSP],EBP MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 XOR ECX,ECX XOR R9D,R9D CALL 0x00120972 MOV R8D,dword ptr [RSP + 0x14] MOV dword ptr [RSP],EBP PUSH 0x1 POP RCX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 XOR R9D,R9D CALL 0x00120972 LAB_001155a7: MOV RCX,R15 AND RCX,R12 JMP 0x00115515
int1 [16] js_os_waitpid(int8 param_1) { int iVar1; int *piVar2; ulong uVar3; int8 *in_R8; int1 auVar4 [16]; int1 auVar5 [16]; int local_34; int local_30; __pid_t local_2c; iVar1 = JS_ToInt32(param_1,&local_2c,*in_R8,in_R8[1]); if (iVar1 == 0) { iVar1 = JS_ToInt32(param_1,&local_30,in_R8[2],in_R8[3]); if (iVar1 == 0) { iVar1 = waitpid(local_2c,&local_34,local_30); if (iVar1 < 0) { piVar2 = __errno_location(); iVar1 = -*piVar2; local_34 = 0; } auVar5 = JS_NewArray(param_1); uVar3 = auVar5._0_8_; if (auVar5._8_4_ != 6) { JS_DefinePropertyValueUint32(param_1,uVar3,auVar5._8_8_,0,iVar1,0,7); JS_DefinePropertyValueUint32(param_1,uVar3,auVar5._8_8_,1,local_34,0,7); } uVar3 = uVar3 & 0xffffffff00000000; goto LAB_00115515; } } auVar5 = ZEXT816(6) << 0x40; uVar3 = 0; LAB_00115515: auVar4._0_8_ = auVar5._0_8_ & 0xffffffff | uVar3; auVar4._8_8_ = auVar5._8_8_; return auVar4; }
14,910
plutovg_path_add_round_rect
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_add_round_rect(plutovg_path_t* path, float x, float y, float w, float h, float rx, float ry) { rx = plutovg_min(rx, w * 0.5f); ry = plutovg_min(ry, h * 0.5f); if(rx == 0.f && ry == 0.f) { plutovg_path_add_rect(path, x, y, w, h); return; } float right = x + w; float bottom = y + h; float cpx = rx * PLUTOVG_KAPPA; float cpy = ry * PLUTOVG_KAPPA; plutovg_path_reserve(path, 6 * 2 + 4 * 4); plutovg_path_move_to(path, x, y+ry); plutovg_path_cubic_to(path, x, y+ry-cpy, x+rx-cpx, y, x+rx, y); plutovg_path_line_to(path, right-rx, y); plutovg_path_cubic_to(path, right-rx+cpx, y, right, y+ry-cpy, right, y+ry); plutovg_path_line_to(path, right, bottom-ry); plutovg_path_cubic_to(path, right, bottom-ry+cpy, right-rx+cpx, bottom, right-rx, bottom); plutovg_path_line_to(path, x+rx, bottom); plutovg_path_cubic_to(path, x+rx-cpx, bottom, x, bottom-ry+cpy, x, bottom-ry); plutovg_path_line_to(path, x, y+ry); plutovg_path_close(path); }
O0
c
plutovg_path_add_round_rect: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movss %xmm0, -0xc(%rbp) movss %xmm1, -0x10(%rbp) movss %xmm2, -0x14(%rbp) movss %xmm3, -0x18(%rbp) movss %xmm4, -0x1c(%rbp) movss %xmm5, -0x20(%rbp) movss -0x1c(%rbp), %xmm1 movss 0x2bdf9(%rip), %xmm0 # 0x3bd70 mulss -0x14(%rbp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0xff8d movss -0x1c(%rbp), %xmm0 movss %xmm0, -0x34(%rbp) jmp 0xff9f movss 0x2bddb(%rip), %xmm0 # 0x3bd70 mulss -0x14(%rbp), %xmm0 movss %xmm0, -0x34(%rbp) movss -0x34(%rbp), %xmm0 movss %xmm0, -0x1c(%rbp) movss -0x20(%rbp), %xmm1 movss 0x2bdba(%rip), %xmm0 # 0x3bd70 mulss -0x18(%rbp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0xffcc movss -0x20(%rbp), %xmm0 movss %xmm0, -0x38(%rbp) jmp 0xffde movss 0x2bd9c(%rip), %xmm0 # 0x3bd70 mulss -0x18(%rbp), %xmm0 movss %xmm0, -0x38(%rbp) movss -0x38(%rbp), %xmm0 movss %xmm0, -0x20(%rbp) movss -0x1c(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x10028 jp 0x10028 movss -0x20(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0x10028 jp 0x10028 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 movss -0x14(%rbp), %xmm2 movss -0x18(%rbp), %xmm3 callq 0xfe90 jmp 0x101f9 movss -0xc(%rbp), %xmm0 addss -0x14(%rbp), %xmm0 movss %xmm0, -0x24(%rbp) movss -0x10(%rbp), %xmm0 addss -0x18(%rbp), %xmm0 movss %xmm0, -0x28(%rbp) movss 0x2bd32(%rip), %xmm0 # 0x3bd80 mulss -0x1c(%rbp), %xmm0 movss %xmm0, -0x2c(%rbp) movss 0x2bd20(%rip), %xmm0 # 0x3bd80 mulss -0x20(%rbp), %xmm0 movss %xmm0, -0x30(%rbp) movq -0x8(%rbp), %rdi movl $0x1c, %esi callq 0xfd90 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 addss -0x20(%rbp), %xmm1 callq 0xf100 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 addss -0x20(%rbp), %xmm1 subss -0x30(%rbp), %xmm1 movss -0xc(%rbp), %xmm2 addss -0x1c(%rbp), %xmm2 subss -0x2c(%rbp), %xmm2 movss -0x10(%rbp), %xmm3 movss -0xc(%rbp), %xmm4 addss -0x1c(%rbp), %xmm4 movss -0x10(%rbp), %xmm5 callq 0xf490 movq -0x8(%rbp), %rdi movss -0x24(%rbp), %xmm0 subss -0x1c(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 callq 0xf280 movq -0x8(%rbp), %rdi movss -0x24(%rbp), %xmm0 subss -0x1c(%rbp), %xmm0 addss -0x2c(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 movss -0x24(%rbp), %xmm2 movss -0x10(%rbp), %xmm3 addss -0x20(%rbp), %xmm3 subss -0x30(%rbp), %xmm3 movss -0x24(%rbp), %xmm4 movss -0x10(%rbp), %xmm5 addss -0x20(%rbp), %xmm5 callq 0xf490 movq -0x8(%rbp), %rdi movss -0x24(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 subss -0x20(%rbp), %xmm1 callq 0xf280 movq -0x8(%rbp), %rdi movss -0x24(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 subss -0x20(%rbp), %xmm1 addss -0x30(%rbp), %xmm1 movss -0x24(%rbp), %xmm2 subss -0x1c(%rbp), %xmm2 addss -0x2c(%rbp), %xmm2 movss -0x28(%rbp), %xmm3 movss -0x24(%rbp), %xmm4 subss -0x1c(%rbp), %xmm4 movss -0x28(%rbp), %xmm5 callq 0xf490 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 addss -0x1c(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 callq 0xf280 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 addss -0x1c(%rbp), %xmm0 subss -0x2c(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 movss -0xc(%rbp), %xmm2 movss -0x28(%rbp), %xmm3 subss -0x20(%rbp), %xmm3 addss -0x30(%rbp), %xmm3 movss -0xc(%rbp), %xmm4 movss -0x28(%rbp), %xmm5 subss -0x20(%rbp), %xmm5 callq 0xf490 movq -0x8(%rbp), %rdi movss -0xc(%rbp), %xmm0 movss -0x10(%rbp), %xmm1 addss -0x20(%rbp), %xmm1 callq 0xf280 movq -0x8(%rbp), %rdi callq 0xfd40 addq $0x40, %rsp popq %rbp retq nop
plutovg_path_add_round_rect: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi movss [rbp+var_C], xmm0 movss [rbp+var_10], xmm1 movss [rbp+var_14], xmm2 movss [rbp+var_18], xmm3 movss [rbp+var_1C], xmm4 movss [rbp+var_20], xmm5 movss xmm1, [rbp+var_1C] movss xmm0, cs:dword_3BD70 mulss xmm0, [rbp+var_14] ucomiss xmm0, xmm1 loc_FF7F: jbe short loc_FF8D movss xmm0, [rbp+var_1C] movss [rbp+var_34], xmm0 jmp short loc_FF9F loc_FF8D: movss xmm0, cs:dword_3BD70 mulss xmm0, [rbp+var_14] movss [rbp+var_34], xmm0 loc_FF9F: movss xmm0, [rbp+var_34] movss [rbp+var_1C], xmm0 movss xmm1, [rbp+var_20] movss xmm0, cs:dword_3BD70 mulss xmm0, [rbp+var_18] ucomiss xmm0, xmm1 jbe short loc_FFCC movss xmm0, [rbp+var_20] movss [rbp+var_38], xmm0 jmp short loc_FFDE loc_FFCC: movss xmm0, cs:dword_3BD70 mulss xmm0, [rbp+var_18] movss [rbp+var_38], xmm0 loc_FFDE: movss xmm0, [rbp+var_38] movss [rbp+var_20], xmm0 movss xmm0, [rbp+var_1C] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_10028 jp short loc_10028 movss xmm0, [rbp+var_20] xorps xmm1, xmm1 loc_FFFF: ucomiss xmm0, xmm1 jnz short loc_10028 jp short loc_10028 mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] movss xmm1, [rbp+var_10] movss xmm2, [rbp+var_14] movss xmm3, [rbp+var_18] call plutovg_path_add_rect jmp loc_101F9 loc_10028: movss xmm0, [rbp+var_C] addss xmm0, [rbp+var_14] movss [rbp+var_24], xmm0 movss xmm0, [rbp+var_10] addss xmm0, [rbp+var_18] movss [rbp+var_28], xmm0 movss xmm0, cs:dword_3BD80 mulss xmm0, [rbp+var_1C] movss [rbp+var_2C], xmm0 movss xmm0, cs:dword_3BD80 mulss xmm0, [rbp+var_20] movss [rbp+var_30], xmm0 mov rdi, [rbp+var_8] mov esi, 1Ch call plutovg_path_reserve mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] movss xmm1, [rbp+var_10] addss xmm1, [rbp+var_20] call plutovg_path_move_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] movss xmm1, [rbp+var_10] addss xmm1, [rbp+var_20] subss xmm1, [rbp+var_30] movss xmm2, [rbp+var_C] addss xmm2, [rbp+var_1C] subss xmm2, [rbp+var_2C] movss xmm3, [rbp+var_10] movss xmm4, [rbp+var_C] addss xmm4, [rbp+var_1C] movss xmm5, [rbp+var_10] call plutovg_path_cubic_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_24] subss xmm0, [rbp+var_1C] movss xmm1, [rbp+var_10] call plutovg_path_line_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_24] subss xmm0, [rbp+var_1C] addss xmm0, [rbp+var_2C] movss xmm1, [rbp+var_10] movss xmm2, [rbp+var_24] movss xmm3, [rbp+var_10] addss xmm3, [rbp+var_20] subss xmm3, [rbp+var_30] movss xmm4, [rbp+var_24] movss xmm5, [rbp+var_10] addss xmm5, [rbp+var_20] call plutovg_path_cubic_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_24] movss xmm1, [rbp+var_28] subss xmm1, [rbp+var_20] call plutovg_path_line_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_24] movss xmm1, [rbp+var_28] subss xmm1, [rbp+var_20] addss xmm1, [rbp+var_30] movss xmm2, [rbp+var_24] subss xmm2, [rbp+var_1C] addss xmm2, [rbp+var_2C] movss xmm3, [rbp+var_28] movss xmm4, [rbp+var_24] subss xmm4, [rbp+var_1C] movss xmm5, [rbp+var_28] call plutovg_path_cubic_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] addss xmm0, [rbp+var_1C] movss xmm1, [rbp+var_28] call plutovg_path_line_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] addss xmm0, [rbp+var_1C] subss xmm0, [rbp+var_2C] movss xmm1, [rbp+var_28] movss xmm2, [rbp+var_C] movss xmm3, [rbp+var_28] subss xmm3, [rbp+var_20] addss xmm3, [rbp+var_30] movss xmm4, [rbp+var_C] movss xmm5, [rbp+var_28] subss xmm5, [rbp+var_20] call plutovg_path_cubic_to mov rdi, [rbp+var_8] movss xmm0, [rbp+var_C] movss xmm1, [rbp+var_10] addss xmm1, [rbp+var_20] call plutovg_path_line_to mov rdi, [rbp+var_8] call plutovg_path_close loc_101F9: add rsp, 40h pop rbp retn
_DWORD * plutovg_path_add_round_rect( long long a1, float a2, float a3, float a4, float a5, float a6, float a7, double a8, double a9) { float v10; // [rsp+8h] [rbp-38h] float v11; // [rsp+Ch] [rbp-34h] float v12; // [rsp+18h] [rbp-28h] float v13; // [rsp+1Ch] [rbp-24h] if ( (float)(0.5 * a4) <= a6 ) v11 = 0.5 * a4; else v11 = a6; if ( (float)(0.5 * a5) <= a7 ) v10 = 0.5 * a5; else v10 = a7; if ( v11 == 0.0 && v10 == 0.0 ) return plutovg_path_add_rect(a1, a2, a3, a4, a5); v13 = a2 + a4; v12 = a3 + a5; plutovg_path_reserve(a1, 28); plutovg_path_move_to(a1, a2, a3 + v10); plutovg_path_cubic_to( a1, a2, (float)(a3 + v10) - (float)(0.55228478 * v10), (float)(a2 + v11) - (float)(0.55228478 * v11), a3, a2 + v11, a3, a8, a9); plutovg_path_line_to(a1, (float)(a2 + a4) - v11, a3); plutovg_path_cubic_to( a1, (float)(v13 - v11) + (float)(0.55228478 * v11), a3, v13, (float)(a3 + v10) - (float)(0.55228478 * v10), v13, a3 + v10, a8, a9); plutovg_path_line_to(a1, a2 + a4, (float)(a3 + a5) - v10); plutovg_path_cubic_to( a1, v13, (float)(v12 - v10) + (float)(0.55228478 * v10), (float)(v13 - v11) + (float)(0.55228478 * v11), v12, v13 - v11, v12, a8, a9); plutovg_path_line_to(a1, a2 + v11, a3 + a5); plutovg_path_cubic_to( a1, (float)(a2 + v11) - (float)(0.55228478 * v11), v12, a2, (float)(v12 - v10) + (float)(0.55228478 * v10), a2, v12 - v10, a8, a9); plutovg_path_line_to(a1, a2, a3 + v10); return plutovg_path_close(a1); }
plutovg_path_add_round_rect: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOVSS dword ptr [RBP + -0xc],XMM0 MOVSS dword ptr [RBP + -0x10],XMM1 MOVSS dword ptr [RBP + -0x14],XMM2 MOVSS dword ptr [RBP + -0x18],XMM3 MOVSS dword ptr [RBP + -0x1c],XMM4 MOVSS dword ptr [RBP + -0x20],XMM5 MOVSS XMM1,dword ptr [RBP + -0x1c] MOVSS XMM0,dword ptr [0x0013bd70] MULSS XMM0,dword ptr [RBP + -0x14] UCOMISS XMM0,XMM1 JBE 0x0010ff8d MOVSS XMM0,dword ptr [RBP + -0x1c] MOVSS dword ptr [RBP + -0x34],XMM0 JMP 0x0010ff9f LAB_0010ff8d: MOVSS XMM0,dword ptr [0x0013bd70] MULSS XMM0,dword ptr [RBP + -0x14] MOVSS dword ptr [RBP + -0x34],XMM0 LAB_0010ff9f: MOVSS XMM0,dword ptr [RBP + -0x34] MOVSS dword ptr [RBP + -0x1c],XMM0 MOVSS XMM1,dword ptr [RBP + -0x20] MOVSS XMM0,dword ptr [0x0013bd70] MULSS XMM0,dword ptr [RBP + -0x18] UCOMISS XMM0,XMM1 JBE 0x0010ffcc MOVSS XMM0,dword ptr [RBP + -0x20] MOVSS dword ptr [RBP + -0x38],XMM0 JMP 0x0010ffde LAB_0010ffcc: MOVSS XMM0,dword ptr [0x0013bd70] MULSS XMM0,dword ptr [RBP + -0x18] MOVSS dword ptr [RBP + -0x38],XMM0 LAB_0010ffde: MOVSS XMM0,dword ptr [RBP + -0x38] MOVSS dword ptr [RBP + -0x20],XMM0 MOVSS XMM0,dword ptr [RBP + -0x1c] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x00110028 JP 0x00110028 MOVSS XMM0,dword ptr [RBP + -0x20] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x00110028 JP 0x00110028 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x10] MOVSS XMM2,dword ptr [RBP + -0x14] MOVSS XMM3,dword ptr [RBP + -0x18] CALL 0x0010fe90 JMP 0x001101f9 LAB_00110028: MOVSS XMM0,dword ptr [RBP + -0xc] ADDSS XMM0,dword ptr [RBP + -0x14] MOVSS dword ptr [RBP + -0x24],XMM0 MOVSS XMM0,dword ptr [RBP + -0x10] ADDSS XMM0,dword ptr [RBP + -0x18] MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [0x0013bd80] MULSS XMM0,dword ptr [RBP + -0x1c] MOVSS dword ptr [RBP + -0x2c],XMM0 MOVSS XMM0,dword ptr [0x0013bd80] MULSS XMM0,dword ptr [RBP + -0x20] MOVSS dword ptr [RBP + -0x30],XMM0 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1c CALL 0x0010fd90 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x10] ADDSS XMM1,dword ptr [RBP + -0x20] CALL 0x0010f100 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x10] ADDSS XMM1,dword ptr [RBP + -0x20] SUBSS XMM1,dword ptr [RBP + -0x30] MOVSS XMM2,dword ptr [RBP + -0xc] ADDSS XMM2,dword ptr [RBP + -0x1c] SUBSS XMM2,dword ptr [RBP + -0x2c] MOVSS XMM3,dword ptr [RBP + -0x10] MOVSS XMM4,dword ptr [RBP + -0xc] ADDSS XMM4,dword ptr [RBP + -0x1c] MOVSS XMM5,dword ptr [RBP + -0x10] CALL 0x0010f490 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x24] SUBSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM1,dword ptr [RBP + -0x10] CALL 0x0010f280 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x24] SUBSS XMM0,dword ptr [RBP + -0x1c] ADDSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM1,dword ptr [RBP + -0x10] MOVSS XMM2,dword ptr [RBP + -0x24] MOVSS XMM3,dword ptr [RBP + -0x10] ADDSS XMM3,dword ptr [RBP + -0x20] SUBSS XMM3,dword ptr [RBP + -0x30] MOVSS XMM4,dword ptr [RBP + -0x24] MOVSS XMM5,dword ptr [RBP + -0x10] ADDSS XMM5,dword ptr [RBP + -0x20] CALL 0x0010f490 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x24] MOVSS XMM1,dword ptr [RBP + -0x28] SUBSS XMM1,dword ptr [RBP + -0x20] CALL 0x0010f280 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x24] MOVSS XMM1,dword ptr [RBP + -0x28] SUBSS XMM1,dword ptr [RBP + -0x20] ADDSS XMM1,dword ptr [RBP + -0x30] MOVSS XMM2,dword ptr [RBP + -0x24] SUBSS XMM2,dword ptr [RBP + -0x1c] ADDSS XMM2,dword ptr [RBP + -0x2c] MOVSS XMM3,dword ptr [RBP + -0x28] MOVSS XMM4,dword ptr [RBP + -0x24] SUBSS XMM4,dword ptr [RBP + -0x1c] MOVSS XMM5,dword ptr [RBP + -0x28] CALL 0x0010f490 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] ADDSS XMM0,dword ptr [RBP + -0x1c] MOVSS XMM1,dword ptr [RBP + -0x28] CALL 0x0010f280 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] ADDSS XMM0,dword ptr [RBP + -0x1c] SUBSS XMM0,dword ptr [RBP + -0x2c] MOVSS XMM1,dword ptr [RBP + -0x28] MOVSS XMM2,dword ptr [RBP + -0xc] MOVSS XMM3,dword ptr [RBP + -0x28] SUBSS XMM3,dword ptr [RBP + -0x20] ADDSS XMM3,dword ptr [RBP + -0x30] MOVSS XMM4,dword ptr [RBP + -0xc] MOVSS XMM5,dword ptr [RBP + -0x28] SUBSS XMM5,dword ptr [RBP + -0x20] CALL 0x0010f490 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [RBP + -0x10] ADDSS XMM1,dword ptr [RBP + -0x20] CALL 0x0010f280 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010fd40 LAB_001101f9: ADD RSP,0x40 POP RBP RET
void plutovg_path_add_round_rect (float param_1,float param_2,float param_3,float param_4,float param_5,float param_6, int8 param_7) { float fVar1; float fVar2; int4 local_40; int4 local_3c; local_3c = param_5; if (DAT_0013bd70 * param_3 <= param_5) { local_3c = DAT_0013bd70 * param_3; } local_40 = param_6; if (DAT_0013bd70 * param_4 <= param_6) { local_40 = DAT_0013bd70 * param_4; } if ((((local_3c != 0.0) || (NAN(local_3c))) || (local_40 != 0.0)) || (NAN(local_40))) { param_3 = param_1 + param_3; param_4 = param_2 + param_4; fVar1 = DAT_0013bd80 * local_3c; fVar2 = DAT_0013bd80 * local_40; plutovg_path_reserve(param_7,0x1c); plutovg_path_move_to(param_1,param_2 + local_40,param_7); plutovg_path_cubic_to (param_1,(param_2 + local_40) - fVar2,(param_1 + local_3c) - fVar1,param_2, param_1 + local_3c,param_2,param_7); plutovg_path_line_to(param_3 - local_3c,param_2,param_7); plutovg_path_cubic_to ((param_3 - local_3c) + fVar1,param_2,param_3,(param_2 + local_40) - fVar2,param_3, param_2 + local_40,param_7); plutovg_path_line_to(param_3,param_4 - local_40,param_7); plutovg_path_cubic_to (param_3,(param_4 - local_40) + fVar2,(param_3 - local_3c) + fVar1,param_4, param_3 - local_3c,param_4,param_7); plutovg_path_line_to(param_1 + local_3c,param_4,param_7); plutovg_path_cubic_to ((param_1 + local_3c) - fVar1,param_4,param_1,(param_4 - local_40) + fVar2,param_1, param_4 - local_40,param_7); plutovg_path_line_to(param_1,param_2 + local_40,param_7); plutovg_path_close(param_7); } else { plutovg_path_add_rect(param_1,param_2,param_3,param_4,param_7); } return; }
14,911
plutovg_path_add_round_rect
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_add_round_rect(plutovg_path_t* path, float x, float y, float w, float h, float rx, float ry) { rx = plutovg_min(rx, w * 0.5f); ry = plutovg_min(ry, h * 0.5f); if(rx == 0.f && ry == 0.f) { plutovg_path_add_rect(path, x, y, w, h); return; } float right = x + w; float bottom = y + h; float cpx = rx * PLUTOVG_KAPPA; float cpy = ry * PLUTOVG_KAPPA; plutovg_path_reserve(path, 6 * 2 + 4 * 4); plutovg_path_move_to(path, x, y+ry); plutovg_path_cubic_to(path, x, y+ry-cpy, x+rx-cpx, y, x+rx, y); plutovg_path_line_to(path, right-rx, y); plutovg_path_cubic_to(path, right-rx+cpx, y, right, y+ry-cpy, right, y+ry); plutovg_path_line_to(path, right, bottom-ry); plutovg_path_cubic_to(path, right, bottom-ry+cpy, right-rx+cpx, bottom, right-rx, bottom); plutovg_path_line_to(path, x+rx, bottom); plutovg_path_cubic_to(path, x+rx-cpx, bottom, x, bottom-ry+cpy, x, bottom-ry); plutovg_path_line_to(path, x, y+ry); plutovg_path_close(path); }
O1
c
plutovg_path_add_round_rect: pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movss 0x18316(%rip), %xmm7 # 0x23070 movaps %xmm2, %xmm6 mulss %xmm7, %xmm6 minss %xmm6, %xmm4 mulss %xmm3, %xmm7 minss %xmm7, %xmm5 xorps %xmm6, %xmm6 ucomiss %xmm6, %xmm4 jne 0xad8b jp 0xad8b ucomiss %xmm6, %xmm5 jne 0xad8b jp 0xad8b movq %rbx, %rdi addq $0x30, %rsp popq %rbx jmp 0xac6e addss %xmm0, %xmm2 movss %xmm2, 0x8(%rsp) addss %xmm1, %xmm3 movss %xmm3, 0x14(%rsp) movss 0x18f95(%rip), %xmm3 # 0x23d3c movaps %xmm4, %xmm6 mulss %xmm3, %xmm6 movss %xmm6, 0xc(%rsp) mulss %xmm5, %xmm3 movss %xmm3, 0x10(%rsp) movq %rbx, %rdi movl $0x1c, %esi movss %xmm0, 0x18(%rsp) movss %xmm5, 0x20(%rsp) movss %xmm1, (%rsp) movss %xmm4, 0x4(%rsp) callq 0xac17 movss 0x20(%rsp), %xmm0 addss (%rsp), %xmm0 movss %xmm0, 0x1c(%rsp) movq %rbx, %rdi xorl %esi, %esi movl $0x1, %edx callq 0xa3a7 movss 0x18(%rsp), %xmm0 movss %xmm0, (%rax) movss 0x1c(%rsp), %xmm1 movss %xmm1, 0x4(%rax) movss %xmm0, 0x10(%rbx) movss %xmm1, 0x14(%rbx) incl 0x8(%rbx) subss 0x10(%rsp), %xmm1 movss %xmm1, 0x24(%rsp) movss 0x4(%rsp), %xmm3 addss %xmm0, %xmm3 movaps %xmm3, %xmm2 movaps %xmm3, %xmm4 movss %xmm3, 0x28(%rsp) subss 0xc(%rsp), %xmm2 movss %xmm2, 0x2c(%rsp) movq %rbx, %rdi movss (%rsp), %xmm3 movaps %xmm3, %xmm5 callq 0xa526 movss 0x8(%rsp), %xmm0 subss 0x4(%rsp), %xmm0 movss %xmm0, 0x4(%rsp) movq %rbx, %rdi movss (%rsp), %xmm1 callq 0xa41d movss 0xc(%rsp), %xmm0 addss 0x4(%rsp), %xmm0 movss %xmm0, 0xc(%rsp) movq %rbx, %rdi movss (%rsp), %xmm1 movss 0x8(%rsp), %xmm2 movss 0x24(%rsp), %xmm3 movaps %xmm2, %xmm4 movss 0x1c(%rsp), %xmm5 callq 0xa526 movss 0x14(%rsp), %xmm1 subss 0x20(%rsp), %xmm1 movss %xmm1, (%rsp) movq %rbx, %rdi movss 0x8(%rsp), %xmm0 callq 0xa41d movss 0x10(%rsp), %xmm1 addss (%rsp), %xmm1 movss %xmm1, 0x10(%rsp) movq %rbx, %rdi movss 0x8(%rsp), %xmm0 movss 0xc(%rsp), %xmm2 movss 0x14(%rsp), %xmm3 movss 0x4(%rsp), %xmm4 movaps %xmm3, %xmm5 callq 0xa526 movq %rbx, %rdi movss 0x28(%rsp), %xmm0 movss 0x14(%rsp), %xmm1 callq 0xa41d movq %rbx, %rdi movss 0x2c(%rsp), %xmm0 movss 0x14(%rsp), %xmm1 movss 0x18(%rsp), %xmm2 movss 0x10(%rsp), %xmm3 movaps %xmm2, %xmm4 movss (%rsp), %xmm5 callq 0xa526 movq %rbx, %rdi movss 0x18(%rsp), %xmm0 movss 0x1c(%rsp), %xmm1 callq 0xa41d cmpl $0x0, 0x20(%rbx) je 0xaf77 movq %rbx, %rdi movl $0x3, %esi movl $0x1, %edx callq 0xa3a7 movq 0x10(%rbx), %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbx retq
plutovg_path_add_round_rect: push rbx sub rsp, 30h mov rbx, rdi movss xmm7, cs:dword_23070 movaps xmm6, xmm2 mulss xmm6, xmm7 minss xmm4, xmm6 mulss xmm7, xmm3 minss xmm5, xmm7 xorps xmm6, xmm6 ucomiss xmm4, xmm6 jnz short loc_AD8B jp short loc_AD8B ucomiss xmm5, xmm6 jnz short loc_AD8B jp short loc_AD8B mov rdi, rbx add rsp, 30h pop rbx jmp plutovg_path_add_rect loc_AD8B: addss xmm2, xmm0 movss [rsp+38h+var_30], xmm2 addss xmm3, xmm1 movss [rsp+38h+var_24], xmm3 movss xmm3, cs:dword_23D3C movaps xmm6, xmm4 mulss xmm6, xmm3 movss [rsp+38h+var_2C], xmm6 mulss xmm3, xmm5 movss [rsp+38h+var_28], xmm3 mov rdi, rbx mov esi, 1Ch movss [rsp+38h+var_20], xmm0 movss [rsp+38h+var_18], xmm5 movss [rsp+38h+var_38], xmm1 movss [rsp+38h+var_34], xmm4 call plutovg_path_reserve movss xmm0, [rsp+38h+var_18] addss xmm0, [rsp+38h+var_38] movss [rsp+38h+var_1C], xmm0 mov rdi, rbx xor esi, esi mov edx, 1 call plutovg_path_add_command movss xmm0, [rsp+38h+var_20] movss dword ptr [rax], xmm0 movss xmm1, [rsp+38h+var_1C] movss dword ptr [rax+4], xmm1 movss dword ptr [rbx+10h], xmm0 movss dword ptr [rbx+14h], xmm1 inc dword ptr [rbx+8] subss xmm1, [rsp+38h+var_28] movss [rsp+38h+var_14], xmm1 movss xmm3, [rsp+38h+var_34] addss xmm3, xmm0 movaps xmm2, xmm3 movaps xmm4, xmm3 movss [rsp+38h+var_10], xmm3 subss xmm2, [rsp+38h+var_2C] movss [rsp+38h+var_C], xmm2 mov rdi, rbx movss xmm3, [rsp+38h+var_38] movaps xmm5, xmm3 call plutovg_path_cubic_to movss xmm0, [rsp+38h+var_30] subss xmm0, [rsp+38h+var_34] movss [rsp+38h+var_34], xmm0 mov rdi, rbx movss xmm1, [rsp+38h+var_38] call plutovg_path_line_to movss xmm0, [rsp+38h+var_2C] addss xmm0, [rsp+38h+var_34] movss [rsp+38h+var_2C], xmm0 mov rdi, rbx movss xmm1, [rsp+38h+var_38] movss xmm2, [rsp+38h+var_30] movss xmm3, [rsp+38h+var_14] movaps xmm4, xmm2 movss xmm5, [rsp+38h+var_1C] call plutovg_path_cubic_to movss xmm1, [rsp+38h+var_24] subss xmm1, [rsp+38h+var_18] movss [rsp+38h+var_38], xmm1 mov rdi, rbx movss xmm0, [rsp+38h+var_30] call plutovg_path_line_to movss xmm1, [rsp+38h+var_28] addss xmm1, [rsp+38h+var_38] movss [rsp+38h+var_28], xmm1 mov rdi, rbx movss xmm0, [rsp+38h+var_30] movss xmm2, [rsp+38h+var_2C] movss xmm3, [rsp+38h+var_24] movss xmm4, [rsp+38h+var_34] movaps xmm5, xmm3 call plutovg_path_cubic_to mov rdi, rbx movss xmm0, [rsp+38h+var_10] movss xmm1, [rsp+38h+var_24] call plutovg_path_line_to mov rdi, rbx movss xmm0, [rsp+38h+var_C] movss xmm1, [rsp+38h+var_24] movss xmm2, [rsp+38h+var_20] movss xmm3, [rsp+38h+var_28] movaps xmm4, xmm2 movss xmm5, [rsp+38h+var_38] call plutovg_path_cubic_to mov rdi, rbx movss xmm0, [rsp+38h+var_20] movss xmm1, [rsp+38h+var_1C] call plutovg_path_line_to cmp dword ptr [rbx+20h], 0 jz short loc_AF77 mov rdi, rbx mov esi, 3 mov edx, 1 call plutovg_path_add_command mov rcx, [rbx+10h] mov [rax], rcx loc_AF77: add rsp, 30h pop rbx retn
_QWORD * plutovg_path_add_round_rect( long long a1, long long a2, long long a3, float a4, float a5, float a6, float a7, float a8, float a9) { float v9; // xmm4_4 float v10; // xmm5_4 _QWORD *result; // rax float *v12; // rax float v13; // [rsp+4h] [rbp-34h] float v14; // [rsp+4h] [rbp-34h] float v15; // [rsp+Ch] [rbp-2Ch] float v16; // [rsp+Ch] [rbp-2Ch] float v17; // [rsp+10h] [rbp-28h] float v18; // [rsp+10h] [rbp-28h] float v19; // [rsp+14h] [rbp-24h] float v21; // [rsp+20h] [rbp-18h] float v22; // [rsp+28h] [rbp-10h] float v23; // [rsp+2Ch] [rbp-Ch] v9 = fminf(a8, a6 * 0.5); v10 = fminf(a9, 0.5 * a7); if ( v9 == 0.0 && v10 == 0.0 ) return plutovg_path_add_rect(a1, a4, a5, a6, a7, a2, a3); v19 = a7 + a5; v15 = v9 * 0.55228478; v17 = 0.55228478 * v10; v21 = v10; v13 = v9; plutovg_path_reserve(a1, 28, a3); v12 = (float *)plutovg_path_add_command(a1, 0, 1); *v12 = a4; v12[1] = v21 + a5; *(float *)(a1 + 16) = a4; *(float *)(a1 + 20) = v21 + a5; ++*(_DWORD *)(a1 + 8); v22 = v13 + a4; v23 = (float)(v13 + a4) - v15; plutovg_path_cubic_to(a1, a4, (float)(v21 + a5) - v17, (float)(v13 + a4) - v15, a5, v13 + a4, a5); v14 = (float)(a6 + a4) - v13; plutovg_path_line_to(a1, v14, a5); v16 = v15 + v14; plutovg_path_cubic_to(a1, v16, a5, a6 + a4, (float)(v21 + a5) - v17, a6 + a4, v21 + a5); plutovg_path_line_to(a1, a6 + a4, (float)(a7 + a5) - v21); v18 = v17 + (float)((float)(a7 + a5) - v21); plutovg_path_cubic_to(a1, a6 + a4, v18, v16, v19, v14, v19); plutovg_path_line_to(a1, v22, a7 + a5); plutovg_path_cubic_to(a1, v23, v19, a4, v18, a4, v19 - v21); result = plutovg_path_line_to(a1, a4, v21 + a5); if ( *(_DWORD *)(a1 + 32) ) { result = (_QWORD *)plutovg_path_add_command(a1, 3, 1); *result = *(_QWORD *)(a1 + 16); } return result; }
plutovg_path_add_round_rect: PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOVSS XMM7,dword ptr [0x00123070] MOVAPS XMM6,XMM2 MULSS XMM6,XMM7 MINSS XMM4,XMM6 MULSS XMM7,XMM3 MINSS XMM5,XMM7 XORPS XMM6,XMM6 UCOMISS XMM4,XMM6 JNZ 0x0010ad8b JP 0x0010ad8b UCOMISS XMM5,XMM6 JNZ 0x0010ad8b JP 0x0010ad8b MOV RDI,RBX ADD RSP,0x30 POP RBX JMP 0x0010ac6e LAB_0010ad8b: ADDSS XMM2,XMM0 MOVSS dword ptr [RSP + 0x8],XMM2 ADDSS XMM3,XMM1 MOVSS dword ptr [RSP + 0x14],XMM3 MOVSS XMM3,dword ptr [0x00123d3c] MOVAPS XMM6,XMM4 MULSS XMM6,XMM3 MOVSS dword ptr [RSP + 0xc],XMM6 MULSS XMM3,XMM5 MOVSS dword ptr [RSP + 0x10],XMM3 MOV RDI,RBX MOV ESI,0x1c MOVSS dword ptr [RSP + 0x18],XMM0 MOVSS dword ptr [RSP + 0x20],XMM5 MOVSS dword ptr [RSP],XMM1 MOVSS dword ptr [RSP + 0x4],XMM4 CALL 0x0010ac17 MOVSS XMM0,dword ptr [RSP + 0x20] ADDSS XMM0,dword ptr [RSP] MOVSS dword ptr [RSP + 0x1c],XMM0 MOV RDI,RBX XOR ESI,ESI MOV EDX,0x1 CALL 0x0010a3a7 MOVSS XMM0,dword ptr [RSP + 0x18] MOVSS dword ptr [RAX],XMM0 MOVSS XMM1,dword ptr [RSP + 0x1c] MOVSS dword ptr [RAX + 0x4],XMM1 MOVSS dword ptr [RBX + 0x10],XMM0 MOVSS dword ptr [RBX + 0x14],XMM1 INC dword ptr [RBX + 0x8] SUBSS XMM1,dword ptr [RSP + 0x10] MOVSS dword ptr [RSP + 0x24],XMM1 MOVSS XMM3,dword ptr [RSP + 0x4] ADDSS XMM3,XMM0 MOVAPS XMM2,XMM3 MOVAPS XMM4,XMM3 MOVSS dword ptr [RSP + 0x28],XMM3 SUBSS XMM2,dword ptr [RSP + 0xc] MOVSS dword ptr [RSP + 0x2c],XMM2 MOV RDI,RBX MOVSS XMM3,dword ptr [RSP] MOVAPS XMM5,XMM3 CALL 0x0010a526 MOVSS XMM0,dword ptr [RSP + 0x8] SUBSS XMM0,dword ptr [RSP + 0x4] MOVSS dword ptr [RSP + 0x4],XMM0 MOV RDI,RBX MOVSS XMM1,dword ptr [RSP] CALL 0x0010a41d MOVSS XMM0,dword ptr [RSP + 0xc] ADDSS XMM0,dword ptr [RSP + 0x4] MOVSS dword ptr [RSP + 0xc],XMM0 MOV RDI,RBX MOVSS XMM1,dword ptr [RSP] MOVSS XMM2,dword ptr [RSP + 0x8] MOVSS XMM3,dword ptr [RSP + 0x24] MOVAPS XMM4,XMM2 MOVSS XMM5,dword ptr [RSP + 0x1c] CALL 0x0010a526 MOVSS XMM1,dword ptr [RSP + 0x14] SUBSS XMM1,dword ptr [RSP + 0x20] MOVSS dword ptr [RSP],XMM1 MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x8] CALL 0x0010a41d MOVSS XMM1,dword ptr [RSP + 0x10] ADDSS XMM1,dword ptr [RSP] MOVSS dword ptr [RSP + 0x10],XMM1 MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x8] MOVSS XMM2,dword ptr [RSP + 0xc] MOVSS XMM3,dword ptr [RSP + 0x14] MOVSS XMM4,dword ptr [RSP + 0x4] MOVAPS XMM5,XMM3 CALL 0x0010a526 MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x28] MOVSS XMM1,dword ptr [RSP + 0x14] CALL 0x0010a41d MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x2c] MOVSS XMM1,dword ptr [RSP + 0x14] MOVSS XMM2,dword ptr [RSP + 0x18] MOVSS XMM3,dword ptr [RSP + 0x10] MOVAPS XMM4,XMM2 MOVSS XMM5,dword ptr [RSP] CALL 0x0010a526 MOV RDI,RBX MOVSS XMM0,dword ptr [RSP + 0x18] MOVSS XMM1,dword ptr [RSP + 0x1c] CALL 0x0010a41d CMP dword ptr [RBX + 0x20],0x0 JZ 0x0010af77 MOV RDI,RBX MOV ESI,0x3 MOV EDX,0x1 CALL 0x0010a3a7 MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX],RCX LAB_0010af77: ADD RSP,0x30 POP RBX RET
void plutovg_path_add_round_rect (float param_1,float param_2,float param_3,float param_4,float param_5,float param_6, long param_7) { float *pfVar1; int8 *puVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; if (param_3 * DAT_00123070 <= param_5) { param_5 = param_3 * DAT_00123070; } if (DAT_00123070 * param_4 <= param_6) { param_6 = DAT_00123070 * param_4; } if ((((param_5 == 0.0) && (!NAN(param_5))) && (param_6 == 0.0)) && (!NAN(param_6))) { plutovg_path_add_rect(param_7); return; } param_3 = param_3 + param_1; param_4 = param_4 + param_2; fVar7 = param_5 * DAT_00123d3c; fVar6 = DAT_00123d3c * param_6; plutovg_path_reserve(param_7,0x1c); fVar3 = param_6 + param_2; pfVar1 = (float *)plutovg_path_add_command(param_7,0,1); *pfVar1 = param_1; pfVar1[1] = fVar3; *(float *)(param_7 + 0x10) = param_1; *(float *)(param_7 + 0x14) = fVar3; *(int *)(param_7 + 8) = *(int *)(param_7 + 8) + 1; plutovg_path_cubic_to(param_7); fVar4 = param_3 - param_5; plutovg_path_line_to(fVar4,param_2,param_7); fVar5 = fVar7 + fVar4; plutovg_path_cubic_to(fVar5,param_2,param_3,fVar3 - fVar6,param_3,fVar3,param_7); plutovg_path_line_to(param_3,param_7); fVar6 = fVar6 + (param_4 - param_6); plutovg_path_cubic_to(param_3,fVar6,fVar5,param_4,fVar4,param_4,param_7); plutovg_path_line_to(param_5 + param_1,param_4,param_7); plutovg_path_cubic_to ((param_5 + param_1) - fVar7,param_4,param_1,fVar6,param_1,param_4 - param_6,param_7); plutovg_path_line_to(param_1,fVar3,param_7); if (*(int *)(param_7 + 0x20) != 0) { puVar2 = (int8 *)plutovg_path_add_command(param_7,3,1); *puVar2 = *(int8 *)(param_7 + 0x10); } return; }
14,912
expand_fast_array
bluesky950520[P]quickjs/quickjs.c
static int expand_fast_array(JSContext *ctx, JSObject *p, uint32_t new_len) { uint32_t new_size; size_t slack; JSValue *new_array_prop; /* XXX: potential arithmetic overflow */ new_size = max_int(new_len, p->u.array.u1.size * 3 / 2); new_array_prop = js_realloc2(ctx, p->u.array.u.values, sizeof(JSValue) * new_size, &slack); if (!new_array_prop) return -1; new_size += slack / sizeof(*new_array_prop); p->u.array.u.values = new_array_prop; p->u.array.u1.size = new_size; return 0; }
O0
c
expand_fast_array: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %edx, 0x1c(%rsp) movl 0x1c(%rsp), %edi movq 0x20(%rsp), %rax imull $0x3, 0x30(%rax), %esi shrl %esi callq 0x5c050 movl %eax, 0x18(%rsp) movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x38(%rax), %rsi movl 0x18(%rsp), %eax movl %eax, %edx shlq $0x4, %rdx leaq 0x10(%rsp), %rcx callq 0x20bc0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x5fdf3 movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x5fe29 movq 0x10(%rsp), %rcx shrq $0x4, %rcx movl 0x18(%rsp), %eax addq %rcx, %rax movl %eax, 0x18(%rsp) movq 0x8(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rax) movl 0x18(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x30(%rax) movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
expand_fast_array: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], edx mov edi, [rsp+38h+var_1C] mov rax, [rsp+38h+var_18] imul esi, [rax+30h], 3 shr esi, 1 call max_int_0 mov [rsp+38h+var_20], eax mov rdi, [rsp+38h+var_10] mov rax, [rsp+38h+var_18] mov rsi, [rax+38h] mov eax, [rsp+38h+var_20] mov edx, eax shl rdx, 4 lea rcx, [rsp+38h+var_28] call js_realloc2 mov [rsp+38h+var_30], rax cmp [rsp+38h+var_30], 0 jnz short loc_5FDF3 mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_5FE29 loc_5FDF3: mov rcx, [rsp+38h+var_28] shr rcx, 4 mov eax, [rsp+38h+var_20] add rax, rcx mov [rsp+38h+var_20], eax mov rcx, [rsp+38h+var_30] mov rax, [rsp+38h+var_18] mov [rax+38h], rcx mov ecx, [rsp+38h+var_20] mov rax, [rsp+38h+var_18] mov [rax+30h], ecx mov [rsp+38h+var_4], 0 loc_5FE29: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long expand_fast_array(long long a1, long long a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-30h] unsigned long long v5; // [rsp+10h] [rbp-28h] BYREF unsigned int v6; // [rsp+18h] [rbp-20h] unsigned int v7; // [rsp+1Ch] [rbp-1Ch] long long v8; // [rsp+20h] [rbp-18h] long long v9; // [rsp+28h] [rbp-10h] v9 = a1; v8 = a2; v7 = a3; v6 = max_int_0(a3, (unsigned int)(3 * *(_DWORD *)(a2 + 48)) >> 1); v4 = js_realloc2(a1, *(_QWORD *)(a2 + 56), 16LL * v6, &v5); if ( v4 ) { v6 += v5 >> 4; *(_QWORD *)(v8 + 56) = v4; *(_DWORD *)(v8 + 48) = v6; return 0; } else { return (unsigned int)-1; } }
expand_fast_array: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],EDX MOV EDI,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x20] IMUL ESI,dword ptr [RAX + 0x30],0x3 SHR ESI,0x1 CALL 0x0015c050 MOV dword ptr [RSP + 0x18],EAX MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RSP + 0x18] MOV EDX,EAX SHL RDX,0x4 LEA RCX,[RSP + 0x10] CALL 0x00120bc0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0015fdf3 MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x0015fe29 LAB_0015fdf3: MOV RCX,qword ptr [RSP + 0x10] SHR RCX,0x4 MOV EAX,dword ptr [RSP + 0x18] ADD RAX,RCX MOV dword ptr [RSP + 0x18],EAX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],RCX MOV ECX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0x30],ECX MOV dword ptr [RSP + 0x34],0x0 LAB_0015fe29: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int4 expand_fast_array(int8 param_1,long param_2,int4 param_3) { long lVar1; ulong local_28; uint local_20; int4 local_1c; long local_18; int8 local_10; int4 local_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_20 = max_int(param_3,(uint)(*(int *)(param_2 + 0x30) * 3) >> 1); lVar1 = js_realloc2(local_10,*(int8 *)(local_18 + 0x38),(ulong)local_20 << 4,&local_28); if (lVar1 == 0) { local_4 = 0xffffffff; } else { *(long *)(local_18 + 0x38) = lVar1; *(uint *)(local_18 + 0x30) = local_20 + (int)(local_28 >> 4); local_4 = 0; } return local_4; }
14,913
expand_fast_array
bluesky950520[P]quickjs/quickjs.c
static int expand_fast_array(JSContext *ctx, JSObject *p, uint32_t new_len) { uint32_t new_size; size_t slack; JSValue *new_array_prop; /* XXX: potential arithmetic overflow */ new_size = max_int(new_len, p->u.array.u1.size * 3 / 2); new_array_prop = js_realloc2(ctx, p->u.array.u.values, sizeof(JSValue) * new_size, &slack); if (!new_array_prop) return -1; new_size += slack / sizeof(*new_array_prop); p->u.array.u.values = new_array_prop; p->u.array.u1.size = new_size; return 0; }
O3
c
expand_fast_array: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movl 0x30(%rsi), %eax leal (%rax,%rax,2), %r14d shrl %r14d cmpl %r14d, %edx cmovgl %edx, %r14d movq 0x38(%rsi), %rsi movq %r14, %rdx shlq $0x4, %rdx movq %rsp, %rcx callq 0x1c8be testq %rax, %rax je 0x3e615 movq (%rsp), %rcx shrq $0x4, %rcx addl %ecx, %r14d movq %rax, 0x38(%rbx) movl %r14d, 0x30(%rbx) xorl %eax, %eax jmp 0x3e61a movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp popq %rbx popq %r14 retq
expand_fast_array: push r14 push rbx push rax mov rbx, rsi mov eax, [rsi+30h] lea r14d, [rax+rax*2] shr r14d, 1 cmp edx, r14d cmovg r14d, edx mov rsi, [rsi+38h] mov rdx, r14 shl rdx, 4 mov rcx, rsp call js_realloc2 test rax, rax jz short loc_3E615 mov rcx, [rsp+18h+var_18] shr rcx, 4 add r14d, ecx mov [rbx+38h], rax mov [rbx+30h], r14d xor eax, eax jmp short loc_3E61A loc_3E615: mov eax, 0FFFFFFFFh loc_3E61A: add rsp, 8 pop rbx pop r14 retn
long long expand_fast_array(long long a1, long long a2, int a3) { unsigned long long v3; // rax long long v4; // r14 long long v5; // rax int v6; // r14d unsigned long long v8[3]; // [rsp+0h] [rbp-18h] BYREF v8[0] = v3; v4 = (unsigned int)(3 * *(_DWORD *)(a2 + 48)) >> 1; if ( a3 > (int)v4 ) v4 = (unsigned int)a3; v5 = js_realloc2(a1, *(_QWORD *)(a2 + 56), 16 * v4, v8); if ( !v5 ) return 0xFFFFFFFFLL; v6 = (v8[0] >> 4) + v4; *(_QWORD *)(a2 + 56) = v5; *(_DWORD *)(a2 + 48) = v6; return 0LL; }
expand_fast_array: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV EAX,dword ptr [RSI + 0x30] LEA R14D,[RAX + RAX*0x2] SHR R14D,0x1 CMP EDX,R14D CMOVG R14D,EDX MOV RSI,qword ptr [RSI + 0x38] MOV RDX,R14 SHL RDX,0x4 MOV RCX,RSP CALL 0x0011c8be TEST RAX,RAX JZ 0x0013e615 MOV RCX,qword ptr [RSP] SHR RCX,0x4 ADD R14D,ECX MOV qword ptr [RBX + 0x38],RAX MOV dword ptr [RBX + 0x30],R14D XOR EAX,EAX JMP 0x0013e61a LAB_0013e615: MOV EAX,0xffffffff LAB_0013e61a: ADD RSP,0x8 POP RBX POP R14 RET
int8 expand_fast_array(int8 param_1,long param_2,uint param_3) { ulong in_RAX; long lVar1; int8 uVar2; uint uVar3; ulong uVar4; ulong local_18; uVar3 = (uint)(*(int *)(param_2 + 0x30) * 3) >> 1; uVar4 = (ulong)uVar3; if ((int)uVar3 < (int)param_3) { uVar4 = (ulong)param_3; } local_18 = in_RAX; lVar1 = js_realloc2(param_1,*(int8 *)(param_2 + 0x38),uVar4 << 4,&local_18); if (lVar1 == 0) { uVar2 = 0xffffffff; } else { *(long *)(param_2 + 0x38) = lVar1; *(int *)(param_2 + 0x30) = (int)uVar4 + (int)(local_18 >> 4); uVar2 = 0; } return uVar2; }
14,914
value_buffer_init
bluesky950520[P]quickjs/quickjs.c
static int value_buffer_init(JSContext *ctx, ValueBuffer *b) { b->ctx = ctx; b->len = 0; b->size = 4; b->error_status = 0; b->arr = b->def; return 0; }
O0
c
value_buffer_init: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq -0x8(%rsp), %rcx movq -0x10(%rsp), %rax movq %rcx, (%rax) movq -0x10(%rsp), %rax movl $0x0, 0x50(%rax) movq -0x10(%rsp), %rax movl $0x4, 0x54(%rax) movq -0x10(%rsp), %rax movl $0x0, 0x58(%rax) movq -0x10(%rsp), %rcx addq $0x10, %rcx movq -0x10(%rsp), %rax movq %rcx, 0x8(%rax) xorl %eax, %eax retq
value_buffer_init: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov rcx, [rsp+var_8] mov rax, [rsp+var_10] mov [rax], rcx mov rax, [rsp+var_10] mov dword ptr [rax+50h], 0 mov rax, [rsp+var_10] mov dword ptr [rax+54h], 4 mov rax, [rsp+var_10] mov dword ptr [rax+58h], 0 mov rcx, [rsp+var_10] add rcx, 10h mov rax, [rsp+var_10] mov [rax+8], rcx xor eax, eax retn
long long value_buffer_init(long long a1, long long a2) { *(_QWORD *)a2 = a1; *(_DWORD *)(a2 + 80) = 0; *(_DWORD *)(a2 + 84) = 4; *(_DWORD *)(a2 + 88) = 0; *(_QWORD *)(a2 + 8) = a2 + 16; return 0LL; }
value_buffer_init: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV RCX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x54],0x4 MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX + 0x58],0x0 MOV RCX,qword ptr [RSP + -0x10] ADD RCX,0x10 MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RAX + 0x8],RCX XOR EAX,EAX RET
int8 value_buffer_init(int8 param_1,int8 *param_2) { *param_2 = param_1; *(int4 *)(param_2 + 10) = 0; *(int4 *)((long)param_2 + 0x54) = 4; *(int4 *)(param_2 + 0xb) = 0; param_2[1] = param_2 + 2; return 0; }
14,915
walk_and_copy
eloqsql/storage/maria/ma_ft_parser.c
static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat) { word->weight=LWS_IN_USE; docstat->sum+=word->weight; memcpy((docstat->list)++, word, sizeof(FT_WORD)); return 0; }
O3
c
walk_and_copy: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi je 0x5f1f1 movl %esi, %eax cvtsi2sd %rax, %xmm0 callq 0x29130 addsd 0x81cd9(%rip), %xmm0 # 0xe0ec8 jmp 0x5f1f5 xorpd %xmm0, %xmm0 movsd %xmm0, 0x10(%rbx) addsd 0x10(%r14), %xmm0 movsd %xmm0, 0x10(%r14) movq (%r14), %rax leaq 0x18(%rax), %rcx movq %rcx, (%r14) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) movups (%rbx), %xmm0 movups %xmm0, (%rax) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
walk_and_copy: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rdi test esi, esi jz short loc_5F1F1 mov eax, esi cvtsi2sd xmm0, rax call _log addsd xmm0, cs:qword_E0EC8 jmp short loc_5F1F5 loc_5F1F1: xorpd xmm0, xmm0 loc_5F1F5: movsd qword ptr [rbx+10h], xmm0 addsd xmm0, qword ptr [r14+10h] movsd qword ptr [r14+10h], xmm0 mov rax, [r14] lea rcx, [rax+18h] mov [r14], rcx mov rcx, [rbx+10h] mov [rax+10h], rcx movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 xor eax, eax pop rbx pop r14 pop rbp retn
long long walk_and_copy(long long a1, int a2, double *a3) { double v4; // xmm0_8 double v5; // rax if ( a2 ) v4 = log((double)a2) + 1.0; else v4 = 0.0; *(double *)(a1 + 16) = v4; a3[2] = v4 + a3[2]; v5 = *a3; *(_QWORD *)a3 += 24LL; *(_QWORD *)(*(_QWORD *)&v5 + 16LL) = *(_QWORD *)(a1 + 16); **(_OWORD **)&v5 = *(_OWORD *)a1; return 0LL; }
walk_and_copy: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JZ 0x0015f1f1 MOV EAX,ESI CVTSI2SD XMM0,RAX CALL 0x00129130 ADDSD XMM0,qword ptr [0x001e0ec8] JMP 0x0015f1f5 LAB_0015f1f1: XORPD XMM0,XMM0 LAB_0015f1f5: MOVSD qword ptr [RBX + 0x10],XMM0 ADDSD XMM0,qword ptr [R14 + 0x10] MOVSD qword ptr [R14 + 0x10],XMM0 MOV RAX,qword ptr [R14] LEA RCX,[RAX + 0x18] MOV qword ptr [R14],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 walk_and_copy(int8 *param_1,uint param_2,long *param_3) { int8 *puVar1; double dVar2; int8 uVar3; if (param_2 == 0) { dVar2 = 0.0; } else { dVar2 = log((double)param_2); dVar2 = dVar2 + DAT_001e0ec8; } param_1[2] = dVar2; param_3[2] = (long)(dVar2 + (double)param_3[2]); puVar1 = (int8 *)*param_3; *param_3 = (long)(puVar1 + 3); puVar1[2] = param_1[2]; uVar3 = param_1[1]; *puVar1 = *param_1; puVar1[1] = uVar3; return 0; }
14,916
ma_net_write
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write(NET *net, const uchar *packet, size_t len) { uchar buff[NET_HEADER_SIZE]; while (len >= MAX_PACKET_LENGTH) { const ulong max_len= MAX_PACKET_LENGTH; int3store(buff,max_len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, max_len)) return 1; packet+= max_len; len-= max_len; } /* write last remaining packet, size can be zero */ int3store(buff, len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, len)) return 1; return 0; }
O0
c
ma_net_write: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) cmpq $0xffffff, -0x28(%rbp) # imm = 0xFFFFFF jb 0x4abc0 movq $0xffffff, -0x30(%rbp) # imm = 0xFFFFFF movb $-0x1, -0xc(%rbp) movb $-0x1, -0xb(%rbp) movb $-0x1, -0xa(%rbp) movq -0x18(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movb %al, -0x9(%rbp) movq -0x18(%rbp), %rdi leaq -0xc(%rbp), %rsi movl $0x4, %edx callq 0x4ac60 cmpl $0x0, %eax jne 0x4ab93 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movl $0xffffff, %edx # imm = 0xFFFFFF callq 0x4ac60 cmpl $0x0, %eax je 0x4ab9f movl $0x1, -0x10(%rbp) jmp 0x4ac2e movq -0x20(%rbp), %rax addq $0xffffff, %rax # imm = 0xFFFFFF movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax subq $0xffffff, %rax # imm = 0xFFFFFF movq %rax, -0x28(%rbp) jmp 0x4ab31 jmp 0x4abc2 movq -0x28(%rbp), %rax movb %al, -0xc(%rbp) movq -0x28(%rbp), %rax shrq $0x8, %rax movb %al, -0xb(%rbp) movq -0x28(%rbp), %rax shrq $0x10, %rax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movb %al, -0x9(%rbp) movq -0x18(%rbp), %rdi leaq -0xc(%rbp), %rsi movl $0x4, %edx callq 0x4ac60 cmpl $0x0, %eax jne 0x4ac1e movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x4ac60 cmpl $0x0, %eax je 0x4ac27 movl $0x1, -0x10(%rbp) jmp 0x4ac2e movl $0x0, -0x10(%rbp) movl -0x10(%rbp), %eax movl %eax, -0x34(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4ac4f movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq callq 0x134b0 nopw %cs:(%rax,%rax)
ma_net_write: push rbp mov rbp, rsp sub rsp, 40h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx loc_4AB31: cmp [rbp+var_28], 0FFFFFFh jb loc_4ABC0 mov [rbp+var_30], 0FFFFFFh mov [rbp+var_C], 0FFh mov [rbp+var_B], 0FFh mov [rbp+var_A], 0FFh mov rcx, [rbp+var_18] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx mov [rbp+var_9], al mov rdi, [rbp+var_18] lea rsi, [rbp+var_C] mov edx, 4 call ma_net_write_buff cmp eax, 0 jnz short loc_4AB93 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, 0FFFFFFh call ma_net_write_buff cmp eax, 0 jz short loc_4AB9F loc_4AB93: mov [rbp+var_10], 1 jmp loc_4AC2E loc_4AB9F: mov rax, [rbp+var_20] add rax, 0FFFFFFh mov [rbp+var_20], rax mov rax, [rbp+var_28] sub rax, 0FFFFFFh mov [rbp+var_28], rax jmp loc_4AB31 loc_4ABC0: jmp short $+2 loc_4ABC2: mov rax, [rbp+var_28] mov [rbp+var_C], al mov rax, [rbp+var_28] shr rax, 8 mov [rbp+var_B], al mov rax, [rbp+var_28] shr rax, 10h mov [rbp+var_A], al mov rcx, [rbp+var_18] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx mov [rbp+var_9], al mov rdi, [rbp+var_18] lea rsi, [rbp+var_C] mov edx, 4 call ma_net_write_buff cmp eax, 0 jnz short loc_4AC1E mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call ma_net_write_buff cmp eax, 0 jz short loc_4AC27 loc_4AC1E: mov [rbp+var_10], 1 jmp short loc_4AC2E loc_4AC27: mov [rbp+var_10], 0 loc_4AC2E: mov eax, [rbp+var_10] mov [rbp+var_34], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4AC4F mov eax, [rbp+var_34] add rsp, 40h pop rbp retn loc_4AC4F: call ___stack_chk_fail
_BOOL8 ma_net_write(long long a1, long long a2, unsigned long long a3) { int v3; // eax int v4; // eax __int16 v9; // [rsp+34h] [rbp-Ch] BYREF char v10; // [rsp+36h] [rbp-Ah] char v11; // [rsp+37h] [rbp-9h] unsigned long long v12; // [rsp+38h] [rbp-8h] v12 = __readfsqword(0x28u); while ( a3 >= 0xFFFFFF ) { v9 = -1; v10 = -1; v3 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v3 + 1; v11 = v3; if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) ) return 1; a2 += 0xFFFFFFLL; a3 -= 0xFFFFFFLL; } v9 = a3; v10 = BYTE2(a3); v4 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v4 + 1; v11 = v4; return (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, a3); }
ma_net_write: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LAB_0014ab31: CMP qword ptr [RBP + -0x28],0xffffff JC 0x0014abc0 MOV qword ptr [RBP + -0x30],0xffffff MOV byte ptr [RBP + -0xc],0xff MOV byte ptr [RBP + -0xb],0xff MOV byte ptr [RBP + -0xa],0xff MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOV byte ptr [RBP + -0x9],AL MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0xc] MOV EDX,0x4 CALL 0x0014ac60 CMP EAX,0x0 JNZ 0x0014ab93 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0xffffff CALL 0x0014ac60 CMP EAX,0x0 JZ 0x0014ab9f LAB_0014ab93: MOV dword ptr [RBP + -0x10],0x1 JMP 0x0014ac2e LAB_0014ab9f: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0xffffff MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] SUB RAX,0xffffff MOV qword ptr [RBP + -0x28],RAX JMP 0x0014ab31 LAB_0014abc0: JMP 0x0014abc2 LAB_0014abc2: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x10 MOV byte ptr [RBP + -0xa],AL MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOV byte ptr [RBP + -0x9],AL MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0xc] MOV EDX,0x4 CALL 0x0014ac60 CMP EAX,0x0 JNZ 0x0014ac1e MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0014ac60 CMP EAX,0x0 JZ 0x0014ac27 LAB_0014ac1e: MOV dword ptr [RBP + -0x10],0x1 JMP 0x0014ac2e LAB_0014ac27: MOV dword ptr [RBP + -0x10],0x0 LAB_0014ac2e: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014ac4f MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET LAB_0014ac4f: CALL 0x001134b0
int4 ma_net_write(long param_1,long param_2,ulong param_3) { int iVar1; long in_FS_OFFSET; ulong local_30; long local_28; int4 local_18; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_28 = param_2; for (local_30 = param_3; 0xfffffe < local_30; local_30 = local_30 - 0xffffff) { local_14 = 0xff; local_13 = 0xff; local_12 = 0xff; iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_11 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_14,4); if (iVar1 != 0) { LAB_0014ab93: local_18 = 1; goto LAB_0014ac2e; } iVar1 = ma_net_write_buff(param_1,local_28,0xffffff); if (iVar1 != 0) goto LAB_0014ab93; local_28 = local_28 + 0xffffff; } local_14 = (int1)local_30; local_13 = (int1)(local_30 >> 8); local_12 = (int1)(local_30 >> 0x10); iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_11 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_14,4); if (iVar1 == 0) { iVar1 = ma_net_write_buff(param_1,local_28,local_30); if (iVar1 == 0) { local_18 = 0; goto LAB_0014ac2e; } } local_18 = 1; LAB_0014ac2e: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_18; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,917
ma_net_write
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write(NET *net, const uchar *packet, size_t len) { uchar buff[NET_HEADER_SIZE]; while (len >= MAX_PACKET_LENGTH) { const ulong max_len= MAX_PACKET_LENGTH; int3store(buff,max_len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, max_len)) return 1; packet+= max_len; len-= max_len; } /* write last remaining packet, size can be zero */ int3store(buff, len); buff[3]= (uchar)net->pkt_nr++; if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) || ma_net_write_buff(net, (char *)packet, len)) return 1; return 0; }
O3
c
ma_net_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $0xffffff, %rdx # imm = 0xFFFFFF jb 0x344c8 leaq -0x34(%rbp), %r12 movl $0x1, %r13d movw $0xffff, -0x34(%rbp) # imm = 0xFFFF movb $-0x1, -0x32(%rbp) movl 0x60(%r15), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%r15) movb %al, -0x31(%rbp) movl $0x4, %edx movq %r15, %rdi movq %r12, %rsi callq 0x34535 testl %eax, %eax jne 0x3450f movl $0xffffff, %edx # imm = 0xFFFFFF movq %r15, %rdi movq %r14, %rsi callq 0x34535 testl %eax, %eax jne 0x3450f addq $0xffffff, %r14 # imm = 0xFFFFFF addq $-0xffffff, %rbx # imm = 0xFF000001 cmpq $0xfffffe, %rbx # imm = 0xFFFFFE ja 0x34471 leaq -0x34(%rbp), %rsi movb %bl, (%rsi) movb %bh, -0x33(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, 0x2(%rsi) movl 0x60(%r15), %eax leal 0x1(%rax), %ecx movl %ecx, 0x60(%r15) movb %al, 0x3(%rsi) movl $0x4, %edx movq %r15, %rdi callq 0x34535 movl $0x1, %r13d testl %eax, %eax jne 0x3450f movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x34535 movl %eax, %r13d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x34530 movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x13500
ma_net_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp rdx, 0FFFFFFh jb short loc_344C8 lea r12, [rbp+var_34] mov r13d, 1 loc_34471: mov [rbp+var_34], 0FFFFh mov [rbp+var_32], 0FFh mov eax, [r15+60h] lea ecx, [rax+1] mov [r15+60h], ecx mov [rbp+var_31], al mov edx, 4 mov rdi, r15 mov rsi, r12 call ma_net_write_buff test eax, eax jnz short loc_3450F mov edx, 0FFFFFFh mov rdi, r15 mov rsi, r14 call ma_net_write_buff test eax, eax jnz short loc_3450F add r14, 0FFFFFFh add rbx, 0FFFFFFFFFF000001h cmp rbx, 0FFFFFEh ja short loc_34471 loc_344C8: lea rsi, [rbp+var_34] mov [rsi], bl mov byte ptr [rbp+var_34+1], bh mov eax, ebx shr eax, 10h mov [rsi+2], al mov eax, [r15+60h] lea ecx, [rax+1] mov [r15+60h], ecx mov [rsi+3], al mov edx, 4 mov rdi, r15 call ma_net_write_buff mov r13d, 1 test eax, eax jnz short loc_3450F mov rdi, r15 mov rsi, r14 mov rdx, rbx call ma_net_write_buff mov r13d, eax loc_3450F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_34530 mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_34530: call ___stack_chk_fail
long long ma_net_write(long long a1, long long a2, unsigned long long a3) { unsigned long long v3; // rbx unsigned int v5; // r13d int v6; // eax int v7; // eax __int16 v9; // [rsp+Ch] [rbp-34h] BYREF char v10; // [rsp+Eh] [rbp-32h] char v11; // [rsp+Fh] [rbp-31h] unsigned long long v12; // [rsp+10h] [rbp-30h] v3 = a3; v12 = __readfsqword(0x28u); if ( a3 < 0xFFFFFF ) { LABEL_6: v9 = v3; v10 = BYTE2(v3); v7 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v7 + 1; v11 = v7; v5 = 1; if ( !(unsigned int)ma_net_write_buff(a1, &v9, 4LL) ) return (unsigned int)ma_net_write_buff(a1, a2, v3); } else { v5 = 1; while ( 1 ) { v9 = -1; v10 = -1; v6 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v6 + 1; v11 = v6; if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) ) break; a2 += 0xFFFFFFLL; v3 -= 0xFFFFFFLL; if ( v3 <= 0xFFFFFE ) goto LABEL_6; } } return v5; }
ma_net_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP RDX,0xffffff JC 0x001344c8 LEA R12,[RBP + -0x34] MOV R13D,0x1 LAB_00134471: MOV word ptr [RBP + -0x34],0xffff MOV byte ptr [RBP + -0x32],0xff MOV EAX,dword ptr [R15 + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [R15 + 0x60],ECX MOV byte ptr [RBP + -0x31],AL MOV EDX,0x4 MOV RDI,R15 MOV RSI,R12 CALL 0x00134535 TEST EAX,EAX JNZ 0x0013450f MOV EDX,0xffffff MOV RDI,R15 MOV RSI,R14 CALL 0x00134535 TEST EAX,EAX JNZ 0x0013450f ADD R14,0xffffff ADD RBX,-0xffffff CMP RBX,0xfffffe JA 0x00134471 LAB_001344c8: LEA RSI,[RBP + -0x34] MOV byte ptr [RSI],BL MOV byte ptr [RBP + -0x33],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RSI + 0x2],AL MOV EAX,dword ptr [R15 + 0x60] LEA ECX,[RAX + 0x1] MOV dword ptr [R15 + 0x60],ECX MOV byte ptr [RSI + 0x3],AL MOV EDX,0x4 MOV RDI,R15 CALL 0x00134535 MOV R13D,0x1 TEST EAX,EAX JNZ 0x0013450f MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00134535 MOV R13D,EAX LAB_0013450f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00134530 MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00134530: CALL 0x00113500
int4 ma_net_write(long param_1,long param_2,ulong param_3) { int iVar1; int4 uVar2; long in_FS_OFFSET; int2 local_3c; int1 local_3a; int1 local_39; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (0xfffffe < param_3) { uVar2 = 1; do { local_3c = 0xffff; local_3a = 0xff; iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_39 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3c,4); if (iVar1 != 0) goto LAB_0013450f; iVar1 = ma_net_write_buff(param_1,param_2,0xffffff); if (iVar1 != 0) goto LAB_0013450f; param_2 = param_2 + 0xffffff; param_3 = param_3 - 0xffffff; } while (0xfffffe < param_3); } local_3c = (int2)param_3; local_3a = (int1)(param_3 >> 0x10); iVar1 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar1 + 1; local_39 = (int1)iVar1; iVar1 = ma_net_write_buff(param_1,&local_3c,4); uVar2 = 1; if (iVar1 == 0) { uVar2 = ma_net_write_buff(param_1,param_2,param_3); } LAB_0013450f: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,918
google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateFieldAccessorTable(google::protobuf::io::Printer*, int*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message.cc
void ImmutableMessageGenerator::GenerateFieldAccessorTable( io::Printer* printer, int* bytecode_estimate) { std::map<std::string, std::string> vars; vars["identifier"] = UniqueFileScopeIdentifier(descriptor_); if (MultipleJavaFiles(descriptor_->file(), /* immutable = */ true)) { // We can only make these package-private since the classes that use them // are in separate files. vars["private"] = ""; } else { vars["private"] = "private "; } if (*bytecode_estimate <= kMaxStaticSize) { vars["final"] = "final "; } else { vars["final"] = ""; } vars["ver"] = GeneratedCodeVersionSuffix(); printer->Print( vars, "$private$static $final$\n" " com.google.protobuf.GeneratedMessage$ver$.FieldAccessorTable\n" " internal_$identifier$_fieldAccessorTable;\n"); // The following bytecode_estimate calculation logic must stay in sync with // the similar logic in the GenerateFieldAccessorTableInitializer method below // to make sure that the generated static final fields are initialized in the // static initialization block directly. // // 6 bytes per field and oneof *bytecode_estimate += 10 + 6 * descriptor_->field_count() + 6 * descriptor_->oneof_decl_count(); }
O3
cpp
google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateFieldAccessorTable(google::protobuf::io::Printer*, int*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 leaq 0x48(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movq 0x8(%rdi), %rsi movq %rsp, %rdi callq 0x43761 leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0xf3f50(%rip), %rsi # 0x19dad5 leaq 0xf3f53(%rip), %rdx # 0x19dadf leaq 0x20(%rsp), %rdi callq 0x250b2 leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x2e310 movq %rsp, %rsi movq %rax, %rdi callq 0x1f5d0 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xa9bbf callq 0x1f4a0 leaq 0x10(%rsp), %r12 movq -0x10(%r12), %rdi cmpq %r12, %rdi je 0xa9bd3 callq 0x1f4a0 movq 0x8(%r14), %rax movq 0x10(%rax), %rax movq 0x78(%rax), %rax cmpb $0x1, 0x98(%rax) jne 0xa9c28 movq %rsp, %rdi movq %r12, (%rdi) leaq 0xf41d3(%rip), %rsi # 0x19ddc8 leaq 0xf41d3(%rip), %rdx # 0x19ddcf callq 0x250b2 leaq 0x40(%rsp), %rdi movq %rsp, %rsi callq 0x2e310 movq 0x8(%rax), %rdx leaq 0xf0990(%rip), %rcx # 0x19a5a9 movq %rax, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x1f760 jmp 0xa9c69 movq %rsp, %rdi movq %r12, (%rdi) leaq 0xf4193(%rip), %rsi # 0x19ddc8 leaq 0xf4193(%rip), %rdx # 0x19ddcf callq 0x250b2 leaq 0x40(%rsp), %rdi movq %rsp, %rsi callq 0x2e310 movq 0x8(%rax), %rdx leaq 0x1114b7(%rip), %rcx # 0x1bb110 movl $0x8, %r8d movq %rax, %rdi xorl %esi, %esi callq 0x1f760 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa9c77 callq 0x1f4a0 cmpl $0x8000, (%rbx) # imm = 0x8000 jg 0xa9cc2 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x10670f(%rip), %rsi # 0x1b039b leaq 0x10670d(%rip), %rdx # 0x1b03a0 callq 0x250b2 leaq 0x40(%rsp), %rdi movq %rsp, %rsi callq 0x2e310 movq 0x8(%rax), %rdx leaq 0x111469(%rip), %rcx # 0x1bb119 movl $0x6, %r8d movq %rax, %rdi xorl %esi, %esi callq 0x1f760 jmp 0xa9d00 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x1066cc(%rip), %rsi # 0x1b039b leaq 0x1066ca(%rip), %rdx # 0x1b03a0 callq 0x250b2 leaq 0x40(%rsp), %rdi movq %rsp, %rsi callq 0x2e310 movq 0x8(%rax), %rdx leaq 0xf08b6(%rip), %rcx # 0x19a5a9 movq %rax, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x1f760 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa9d0e callq 0x1f4a0 movq %r12, (%rsp) movw $0x3356, 0x10(%rsp) # imm = 0x3356 movq $0x2, 0x8(%rsp) movb $0x0, 0x12(%rsp) leaq 0x20(%rsp), %rdi movq %r13, (%rdi) leaq 0xf30ff(%rip), %rsi # 0x19ce35 leaq 0xf30fb(%rip), %rdx # 0x19ce38 callq 0x250b2 leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x2e310 movq %rsp, %rsi movq %rax, %rdi callq 0x1f5d0 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xa9d6b callq 0x1f4a0 movq (%rsp), %rdi cmpq %r12, %rdi je 0xa9d79 callq 0x1f4a0 leaq 0x1114bf(%rip), %rdx # 0x1bb23f leaq 0x40(%rsp), %rsi movq %r15, %rdi callq 0x16cd32 movq 0x8(%r14), %rax movl 0x68(%rax), %ecx addl 0x4(%rax), %ecx movl (%rbx), %eax leal (%rcx,%rcx,2), %ecx leal (%rax,%rcx,2), %eax addl $0xa, %eax movl %eax, (%rbx) leaq 0x40(%rsp), %rdi callq 0x2e5e0 addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0xa9e1c jmp 0xa9e1c jmp 0xa9e1c jmp 0xa9e1c jmp 0xa9e1c movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xa9de5 callq 0x1f4a0 jmp 0xa9de5 jmp 0xa9de2 jmp 0xa9de2 jmp 0xa9de2 jmp 0xa9de2 movq %rax, %rbx movq (%rsp), %rdi cmpq %r12, %rdi jne 0xa9e15 jmp 0xa9e1f movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xa9e07 callq 0x1f4a0 jmp 0xa9e07 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa9e1f callq 0x1f4a0 jmp 0xa9e1f movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x2e5e0 movq %rbx, %rdi callq 0x1f860 nop
_ZN6google8protobuf8compiler4java25ImmutableMessageGenerator26GenerateFieldAccessorTableEPNS0_2io7PrinterEPi: push r15 push r14 push r13 push r12 push rbx sub rsp, 70h mov rbx, rdx mov r15, rsi mov r14, rdi lea rax, [rsp+98h+var_50] mov dword ptr [rax], 0 xor ecx, ecx; int mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx mov rsi, [rdi+8]; int mov rdi, rsp; int call _ZN6google8protobuf8compiler4java25UniqueFileScopeIdentifierB5cxx11EPKNS0_10DescriptorE; google::protobuf::compiler::java::UniqueFileScopeIdentifier(google::protobuf::Descriptor const*) lea r13, [rsp+98h+var_68] mov [r13-10h], r13 lea rsi, aFilenameIdenti+9; "identifier" lea rdx, aFilenameIdenti+13h; "" lea rdi, [rsp+98h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] lea rsi, [rsp+98h+var_78] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rsi, rsp mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+98h+var_78]; void * cmp rdi, r13 jz short loc_A9BBF call __ZdlPv; operator delete(void *) loc_A9BBF: lea r12, [rsp+98h+var_88] mov rdi, [r12-10h]; void * cmp rdi, r12 jz short loc_A9BD3 call __ZdlPv; operator delete(void *) loc_A9BD3: mov rax, [r14+8] mov rax, [rax+10h] mov rax, [rax+78h] cmp byte ptr [rax+98h], 1 jnz short loc_A9C28 mov rdi, rsp mov [rdi], r12 lea rsi, aPrivate_0; "private" lea rdx, aPrivate_0+7; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] mov rsi, rsp call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdx, [rax+8] lea rcx, asc_19A5A7+2; "" mov rdi, rax xor esi, esi xor r8d, r8d call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) jmp short loc_A9C69 loc_A9C28: mov rdi, rsp mov [rdi], r12 lea rsi, aPrivate_0; "private" lea rdx, aPrivate_0+7; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] mov rsi, rsp call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdx, [rax+8] lea rcx, aPrivate_1; "private " mov r8d, 8 mov rdi, rax xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_A9C69: mov rdi, [rsp+98h+var_98]; void * cmp rdi, r12 jz short loc_A9C77 call __ZdlPv; operator delete(void *) loc_A9C77: cmp dword ptr [rbx], 8000h jg short loc_A9CC2 mov rdi, rsp mov [rdi], r12 lea rsi, aFullFinal+5; "final" lea rdx, aFullFinal+0Ah; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] mov rsi, rsp call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdx, [rax+8] lea rcx, aFinal; "final " mov r8d, 6 mov rdi, rax xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) jmp short loc_A9D00 loc_A9CC2: mov rdi, rsp mov [rdi], r12 lea rsi, aFullFinal+5; "final" lea rdx, aFullFinal+0Ah; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] mov rsi, rsp call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdx, [rax+8] lea rcx, asc_19A5A7+2; "" mov rdi, rax xor esi, esi xor r8d, r8d call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_A9D00: mov rdi, [rsp+98h+var_98]; void * cmp rdi, r12 jz short loc_A9D0E call __ZdlPv; operator delete(void *) loc_A9D0E: mov [rsp+98h+var_98], r12; void * mov word ptr [rsp+98h+var_88], 3356h; char mov qword ptr [rsp+98h+var_90], 2; int mov [rsp+98h+var_86], 0 lea rdi, [rsp+98h+var_78] mov [rdi], r13 lea rsi, aNever+2; "ver" lea rdx, aNever+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+98h+var_58] lea rsi, [rsp+98h+var_78] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rsi, rsp mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+98h+var_78]; void * cmp rdi, r13 jz short loc_A9D6B call __ZdlPv; operator delete(void *) loc_A9D6B: mov rdi, [rsp+98h+var_98]; void * cmp rdi, r12 jz short loc_A9D79 call __ZdlPv; operator delete(void *) loc_A9D79: lea rdx, aPrivateStaticF_0; "$private$static $final$\n com.google.p"... lea rsi, [rsp+98h+var_58] mov rdi, r15; this call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rax, [r14+8] mov ecx, [rax+68h] add ecx, [rax+4] mov eax, [rbx] lea ecx, [rcx+rcx*2] lea eax, [rax+rcx*2] add eax, 0Ah mov [rbx], eax lea rdi, [rsp+98h+var_58] 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() add rsp, 70h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_A9E1C jmp short loc_A9E1C jmp short loc_A9E1C jmp short loc_A9E1C jmp short loc_A9E1C mov rbx, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r13 jz short loc_A9DE5 call __ZdlPv; operator delete(void *) jmp short loc_A9DE5 jmp short loc_A9DE2 jmp short loc_A9DE2 jmp short loc_A9DE2 jmp short $+2 loc_A9DE2: mov rbx, rax loc_A9DE5: mov rdi, [rsp+0] cmp rdi, r12 jnz short loc_A9E15 jmp short loc_A9E1F mov rbx, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r13 jz short loc_A9E07 call __ZdlPv; operator delete(void *) jmp short loc_A9E07 mov rbx, rax loc_A9E07: lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A9E1F loc_A9E15: call __ZdlPv; operator delete(void *) jmp short loc_A9E1F loc_A9E1C: mov rbx, rax loc_A9E1F: lea rdi, [rsp+arg_38] 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 call __Unwind_Resume
long long google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateFieldAccessorTable( google::protobuf::compiler::java::ImmutableMessageGenerator *this, google::protobuf::io::Printer *a2, int *a3) { long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long result; // rax void *v11; // [rsp+0h] [rbp-98h] BYREF int v12[2]; // [rsp+8h] [rbp-90h] char v13[8]; // [rsp+10h] [rbp-88h] BYREF int v14; // [rsp+18h] [rbp-80h] void *v15; // [rsp+20h] [rbp-78h] BYREF int v16; // [rsp+28h] [rbp-70h] int v17[4]; // [rsp+30h] [rbp-68h] BYREF int v18; // [rsp+40h] [rbp-58h] BYREF void *v19; // [rsp+48h] [rbp-50h] BYREF long long v20; // [rsp+50h] [rbp-48h] void **v21; // [rsp+58h] [rbp-40h] void **v22; // [rsp+60h] [rbp-38h] long long v23; // [rsp+68h] [rbp-30h] LODWORD(v19) = 0; v20 = 0LL; v21 = &v19; v22 = &v19; v23 = 0LL; google::protobuf::compiler::java::UniqueFileScopeIdentifier[abi:cxx11]((long long)&v11, *((_QWORD *)this + 1)); v15 = v17; std::string::_M_construct<char const*>((long long)&v15, "identifier", (long long)""); v4 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v15); std::string::operator=(v4, &v11); if ( v15 != v17 ) operator delete(v15); if ( v11 != v13 ) operator delete(v11); if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 1) + 16LL) + 120LL) + 152LL) == 1 ) { v11 = v13; std::string::_M_construct<char const*>((long long)&v11, "private", (long long)""); v5 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v11); std::string::_M_replace(v5, 0LL, *(_QWORD *)(v5 + 8), "", 0LL); } else { v11 = v13; std::string::_M_construct<char const*>((long long)&v11, "private", (long long)""); v6 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v11); std::string::_M_replace(v6, 0LL, *(_QWORD *)(v6 + 8), "private ", 8LL); } if ( v11 != v13 ) operator delete(v11); if ( *a3 > 0x8000 ) { v11 = v13; std::string::_M_construct<char const*>((long long)&v11, "final", (long long)""); v8 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v11); std::string::_M_replace(v8, 0LL, *(_QWORD *)(v8 + 8), "", 0LL); } else { v11 = v13; std::string::_M_construct<char const*>((long long)&v11, "final", (long long)""); v7 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v11); std::string::_M_replace(v7, 0LL, *(_QWORD *)(v7 + 8), "final ", 6LL); } if ( v11 != v13 ) operator delete(v11); v11 = v13; strcpy(v13, "V3"); *(_QWORD *)v12 = 2LL; v15 = v17; std::string::_M_construct<char const*>((long long)&v15, "ver", (long long)""); v9 = std::map<std::string,std::string>::operator[]((long long)&v18, (long long)&v15); std::string::operator=(v9, &v11); if ( v15 != v17 ) operator delete(v15); if ( v11 != v13 ) operator delete(v11); google::protobuf::io::Printer::Print( a2, v11, v12[0], v13[0], v14, (int)v15, v16, v17[0], v17[2], v18, v19, v20, (char)v21); result = (unsigned int)(*a3 + 6 * (*(_DWORD *)(*((_QWORD *)this + 1) + 4LL) + *(_DWORD *)(*((_QWORD *)this + 1) + 104LL)) + 10); *a3 = result; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)&v18); return result; }
GenerateFieldAccessorTable: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x70 MOV RBX,RDX MOV R15,RSI MOV R14,RDI LEA RAX,[RSP + 0x48] MOV dword ptr [RAX],0x0 XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX MOV qword ptr [RAX + 0x20],RCX MOV RSI,qword ptr [RDI + 0x8] LAB_001a9b6d: MOV RDI,RSP CALL 0x00143761 LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 LAB_001a9b7e: LEA RSI,[0x29dad5] LEA RDX,[0x29dadf] LEA RDI,[RSP + 0x20] CALL 0x001250b2 LAB_001a9b96: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x20] CALL 0x0012e310 MOV RSI,RSP MOV RDI,RAX CALL 0x0011f5d0 MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x001a9bbf CALL 0x0011f4a0 LAB_001a9bbf: LEA R12,[RSP + 0x10] MOV RDI,qword ptr [R12 + -0x10] CMP RDI,R12 JZ 0x001a9bd3 CALL 0x0011f4a0 LAB_001a9bd3: MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x78] CMP byte ptr [RAX + 0x98],0x1 JNZ 0x001a9c28 MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001a9bee: LEA RSI,[0x29ddc8] LEA RDX,[0x29ddcf] CALL 0x001250b2 LAB_001a9c01: LEA RDI,[RSP + 0x40] MOV RSI,RSP CALL 0x0012e310 MOV RDX,qword ptr [RAX + 0x8] LEA RCX,[0x29a5a9] MOV RDI,RAX XOR ESI,ESI XOR R8D,R8D CALL 0x0011f760 JMP 0x001a9c69 LAB_001a9c28: MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001a9c2e: LEA RSI,[0x29ddc8] LEA RDX,[0x29ddcf] CALL 0x001250b2 LAB_001a9c41: LEA RDI,[RSP + 0x40] MOV RSI,RSP CALL 0x0012e310 MOV RDX,qword ptr [RAX + 0x8] LEA RCX,[0x2bb110] MOV R8D,0x8 MOV RDI,RAX XOR ESI,ESI CALL 0x0011f760 LAB_001a9c69: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001a9c77 CALL 0x0011f4a0 LAB_001a9c77: CMP dword ptr [RBX],0x8000 JG 0x001a9cc2 MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001a9c85: LEA RSI,[0x2b039b] LEA RDX,[0x2b03a0] CALL 0x001250b2 LAB_001a9c98: LEA RDI,[RSP + 0x40] MOV RSI,RSP CALL 0x0012e310 MOV RDX,qword ptr [RAX + 0x8] LEA RCX,[0x2bb119] MOV R8D,0x6 MOV RDI,RAX XOR ESI,ESI CALL 0x0011f760 JMP 0x001a9d00 LAB_001a9cc2: MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001a9cc8: LEA RSI,[0x2b039b] LEA RDX,[0x2b03a0] CALL 0x001250b2 LAB_001a9cdb: LEA RDI,[RSP + 0x40] MOV RSI,RSP CALL 0x0012e310 MOV RDX,qword ptr [RAX + 0x8] LEA RCX,[0x29a5a9] MOV RDI,RAX XOR ESI,ESI XOR R8D,R8D CALL 0x0011f760 LAB_001a9d00: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001a9d0e CALL 0x0011f4a0 LAB_001a9d0e: MOV qword ptr [RSP],R12 MOV word ptr [RSP + 0x10],0x3356 MOV qword ptr [RSP + 0x8],0x2 MOV byte ptr [RSP + 0x12],0x0 LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],R13 LAB_001a9d2f: LEA RSI,[0x29ce35] LEA RDX,[0x29ce38] CALL 0x001250b2 LAB_001a9d42: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x20] CALL 0x0012e310 MOV RSI,RSP MOV RDI,RAX CALL 0x0011f5d0 MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x001a9d6b CALL 0x0011f4a0 LAB_001a9d6b: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001a9d79 CALL 0x0011f4a0 LAB_001a9d79: LEA RDX,[0x2bb23f] LEA RSI,[RSP + 0x40] MOV RDI,R15 CALL 0x0026cd32 LAB_001a9d8d: MOV RAX,qword ptr [R14 + 0x8] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,dword ptr [RAX + 0x4] MOV EAX,dword ptr [RBX] LEA ECX,[RCX + RCX*0x2] LEA EAX,[RAX + RCX*0x2] ADD EAX,0xa MOV dword ptr [RBX],EAX LEA RDI,[RSP + 0x40] CALL 0x0012e5e0 ADD RSP,0x70 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateFieldAccessorTable(google::protobuf::io::Printer*, int*) */ void __thiscall google::protobuf::compiler::java::ImmutableMessageGenerator::GenerateFieldAccessorTable (ImmutableMessageGenerator *this,Printer *param_1,int *param_2) { string *psVar1; ulong uVar2; int2 *local_98; int8 local_90; int2 local_88; int1 local_86; int1 *local_78 [2]; int1 local_68 [16]; map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_58 [8]; int4 local_50 [2]; int8 local_48; int4 *local_40; int4 *local_38; int8 local_30; local_40 = local_50; local_50[0] = 0; local_48 = 0; local_30 = 0; local_38 = local_40; /* try { // try from 001a9b6d to 001a9b74 has its CatchHandler @ 001a9e1c */ UniqueFileScopeIdentifier_abi_cxx11_((java *)&local_98,*(Descriptor **)(this + 8)); /* try { // try from 001a9b7e to 001a9b95 has its CatchHandler @ 001a9e04 */ local_78[0] = local_68; std::__cxx11::string::_M_construct<char_const*>(local_78,"identifier",""); /* try { // try from 001a9b96 to 001a9ba4 has its CatchHandler @ 001a9df0 */ 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[](local_58,(string *)local_78); std::__cxx11::string::operator=(psVar1,(string *)&local_98); if (local_78[0] != local_68) { operator_delete(local_78[0]); } if (local_98 != &local_88) { operator_delete(local_98); } local_98 = &local_88; if (*(char *)(*(long *)(*(long *)(*(long *)(this + 8) + 0x10) + 0x78) + 0x98) == '\x01') { /* try { // try from 001a9bee to 001a9c00 has its CatchHandler @ 001a9dc2 */ std::__cxx11::string::_M_construct<char_const*>(&local_98,"private",""); /* try { // try from 001a9c01 to 001a9c25 has its CatchHandler @ 001a9de2 */ uVar2 = 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[](local_58,(string *)&local_98); std::__cxx11::string::_M_replace(uVar2,0,*(char **)(uVar2 + 8),0x29a5a9); } else { /* try { // try from 001a9c2e to 001a9c40 has its CatchHandler @ 001a9dc0 */ std::__cxx11::string::_M_construct<char_const*>(&local_98,"private",""); /* try { // try from 001a9c41 to 001a9c68 has its CatchHandler @ 001a9de0 */ uVar2 = 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[](local_58,(string *)&local_98); std::__cxx11::string::_M_replace(uVar2,0,*(char **)(uVar2 + 8),0x2bb110); } if (local_98 != &local_88) { operator_delete(local_98); } if (*param_2 < 0x8001) { local_98 = &local_88; /* try { // try from 001a9c85 to 001a9c97 has its CatchHandler @ 001a9dbe */ std::__cxx11::string::_M_construct<char_const*>(&local_98,"final",""); /* try { // try from 001a9c98 to 001a9cbf has its CatchHandler @ 001a9dde */ uVar2 = 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[](local_58,(string *)&local_98); std::__cxx11::string::_M_replace(uVar2,0,*(char **)(uVar2 + 8),0x2bb119); } else { local_98 = &local_88; /* try { // try from 001a9cc8 to 001a9cda has its CatchHandler @ 001a9dbc */ std::__cxx11::string::_M_construct<char_const*>(&local_98,"final",""); /* try { // try from 001a9cdb to 001a9cff has its CatchHandler @ 001a9ddc */ uVar2 = 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[](local_58,(string *)&local_98); std::__cxx11::string::_M_replace(uVar2,0,*(char **)(uVar2 + 8),0x29a5a9); } if (local_98 != &local_88) { operator_delete(local_98); } local_88 = 0x3356; local_90 = 2; local_86 = 0; local_98 = &local_88; local_78[0] = local_68; /* try { // try from 001a9d2f to 001a9d41 has its CatchHandler @ 001a9dda */ std::__cxx11::string::_M_construct<char_const*>(local_78,"ver",""); /* try { // try from 001a9d42 to 001a9d50 has its CatchHandler @ 001a9dc6 */ 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[](local_58,(string *)local_78); std::__cxx11::string::operator=(psVar1,(string *)&local_98); if (local_78[0] != local_68) { operator_delete(local_78[0]); } if (local_98 != &local_88) { operator_delete(local_98); } /* try { // try from 001a9d79 to 001a9d8c has its CatchHandler @ 001a9dc4 */ io::Printer::Print(param_1,(map *)local_58, "$private$static $final$\n com.google.protobuf.GeneratedMessage$ver$.FieldAccessorTable\n internal_$identifier$_fieldAccessorTable;\n" ); *param_2 = *param_2 + (*(int *)(*(long *)(this + 8) + 0x68) + *(int *)(*(long *)(this + 8) + 4)) * 6 + 10; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)local_58); return; }
14,919
ftxui::separatorStyled(ftxui::BorderStyle)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp
Element separatorStyled(BorderStyle style) { return std::make_shared<SeparatorAuto>(style); }
O1
cpp
ftxui::separatorStyled(ftxui::BorderStyle): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %r14 movl $0x70, %edi callq 0xb3e0 movq %rax, %rbx movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%rbx) leaq 0x34210(%rip), %rax # 0x585f8 movq %rax, (%rbx) movq %rbx, %r15 addq $0x10, %r15 movq %r15, %rdi callq 0x240c8 leaq 0x34247(%rip), %rax # 0x58648 movq %rax, 0x10(%rbx) movl %ebp, 0x6c(%rbx) movq %r15, (%r14) movq %rbx, 0x8(%r14) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movl $0x70, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780
_ZN5ftxui15separatorStyledENS_11BorderStyleE: push rbp push r15 push r14 push rbx push rax mov ebp, esi mov r14, rdi mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, 100000001h mov [rbx+8], rax lea rax, off_585F8 mov [rbx], rax mov r15, rbx add r15, 10h mov rdi, r15; this call _ZN5ftxui4NodeC2Ev; ftxui::Node::Node(void) lea rax, off_58648 mov [rbx+10h], rax mov [rbx+6Ch], ebp mov [r14], r15 mov [r14+8], rbx mov rax, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r14, rax mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
_QWORD * ftxui::separatorStyled(_QWORD *a1, int a2) { long long v2; // rbx v2 = operator new(0x70uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = off_585F8; ftxui::Node::Node((ftxui::Node *)(v2 + 16)); *(_QWORD *)(v2 + 16) = off_58648; *(_DWORD *)(v2 + 108) = a2; *a1 = v2 + 16; a1[1] = v2; return a1; }
separatorStyled: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ESI MOV R14,RDI MOV EDI,0x70 CALL 0x0010b3e0 MOV RBX,RAX MOV RAX,0x100000001 MOV qword ptr [RBX + 0x8],RAX LEA RAX,[0x1585f8] MOV qword ptr [RBX],RAX MOV R15,RBX ADD R15,0x10 LAB_001243f2: MOV RDI,R15 CALL 0x001240c8 LAB_001243fa: LEA RAX,[0x158648] MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x6c],EBP MOV qword ptr [R14],R15 MOV qword ptr [R14 + 0x8],RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* ftxui::separatorStyled(ftxui::BorderStyle) */ ftxui * __thiscall ftxui::separatorStyled(ftxui *this,int4 param_2) { int8 *puVar1; puVar1 = (int8 *)operator_new(0x70); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001585f8; /* try { // try from 001243f2 to 001243f9 has its CatchHandler @ 0012441d */ Node::Node((Node *)(puVar1 + 2)); puVar1[2] = &PTR__Node_00158648; *(int4 *)((long)puVar1 + 0x6c) = param_2; *(Node **)this = (Node *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; return this; }
14,920
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O0
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x5adf0 cmpb $0x0, %al je 0x5c287 movb $0x1, -0x1(%rbp) jmp 0x5c2af movq -0x10(%rbp), %rdi callq 0x66de0 cmpb $0x0, %al je 0x5c2ab movq -0x10(%rbp), %rdi leaq 0x279861(%rip), %rsi # 0x2d5b00 leaq 0x27987a(%rip), %rdx # 0x2d5b20 callq 0x66e40 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_5C287 mov [rbp+var_1], 1 jmp short loc_5C2AF loc_5C287: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_5C2AB mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb3 lea rdx, my_uca_package_no_contractions_utf8mb3 call my_uca_handler_map loc_5C2AB: mov [rbp+var_1], 0 loc_5C2AF: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb3(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3); return 0; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0015adf0 CMP AL,0x0 JZ 0x0015c287 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015c2af LAB_0015c287: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00166de0 CMP AL,0x0 JZ 0x0015c2ab MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x3d5b00] LEA RDX,[0x3d5b20] CALL 0x00166e40 LAB_0015c2ab: MOV byte ptr [RBP + -0x1],0x0 LAB_0015c2af: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3); } local_9 = 0; } else { local_9 = 1; } return local_9; }
14,921
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0x7d6d5 leaq 0x38eff8(%rip), %rdi # 0x40c6d4 leaq -0xae3(%rip), %rsi # 0x7cc00 callq 0x382a0 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x7cec0 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0x7d732 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x7d250 movq %rax, -0x258(%rbp) jmp 0x7d73d xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0x7d73d movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0x7d7a0 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x7d7a0 leaq -0x220(%rbp), %rdi callq 0x7c8c0 movq %rax, %rdi leaq 0x650c5(%rip), %rsi # 0xe2841 callq 0x389c0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x85630 jmp 0x7d7a2 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x7d7d2 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x382c0 nopw (%rax,%rax)
ma_int_hash_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _free add rsp, 10h pop rbp retn
long long ma_int_hash_free(long long a1) { return free(a1); }
ma_int_hash_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00162220 ADD RSP,0x10 POP RBP RET
void ma_int_hash_free(void *param_1) { free(param_1); return; }
14,922
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O3
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rcx, %r15 movl %edx, %r12d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x34ffce(%rip), %rdi # 0x378f90 leaq -0x9ae(%rip), %rsi # 0x2861b callq 0x24310 movq %rbx, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x28806 testl %eax, %eax je 0x28ff2 movq %r14, %rdi movl %eax, %esi movq %r15, %rdx callq 0x28aaa movq %rax, %r14 jmp 0x28ff5 xorl %r14d, %r14d testq %r14, %r14 setne %al testb $0x10, %r15b sete %cl orb %al, %cl jne 0x2903f leaq -0x240(%rbp), %r15 movq %r15, %rdi callq 0x283db movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x16, %edi movq %rbx, %rdx movq %r15, %rcx xorl %eax, %eax callq 0x2cce7 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x29061 movq %r14, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_charset_get_by_name: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov r15, rcx mov r12d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov esi, r12d mov rdx, r15 call get_charset_number test eax, eax jz short loc_28FF2 mov rdi, r14 mov esi, eax mov rdx, r15 call get_internal_charset mov r14, rax jmp short loc_28FF5 loc_28FF2: xor r14d, r14d loc_28FF5: test r14, r14 setnz al test r15b, 10h setz cl or cl, al jnz short loc_2903F lea r15, [rbp+var_240] mov rdi, r15 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 16h mov rdx, rbx mov rcx, r15 xor eax, eax call my_error loc_2903F: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_29061 mov rax, r14 add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_29061: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int charset_number; // eax long long internal_charset; // r14 int v8; // r8d int v9; // r9d _BYTE v11[536]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+218h] [rbp-28h] v12 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( internal_charset == 0 && (a4 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v11), "Index.xml"); my_error(22, 4, a2, (unsigned int)v11, v8, v9); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV R15,RCX MOV R12D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[0x478f90] LEA RSI,[0x12861b] CALL 0x00124310 MOV RDI,RBX MOV ESI,R12D MOV RDX,R15 CALL 0x00128806 TEST EAX,EAX JZ 0x00128ff2 MOV RDI,R14 MOV ESI,EAX MOV RDX,R15 CALL 0x00128aaa MOV R14,RAX JMP 0x00128ff5 LAB_00128ff2: XOR R14D,R14D LAB_00128ff5: TEST R14,R14 SETNZ AL TEST R15B,0x10 SETZ CL OR CL,AL JNZ 0x0012903f LEA R15,[RBP + -0x240] MOV RDI,R15 CALL 0x001283db MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x16 MOV RDX,RBX MOV RCX,R15 XOR EAX,EAX CALL 0x0012cce7 LAB_0012903f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00129061 MOV RAX,R14 ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00129061: CALL 0x001243e0
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_248 [536]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_4); } if ((param_4 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_248); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x16,4,param_2,local_248); } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,923
rlDrawVertexArrayElementsInstanced
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffer, int instances) { #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) // NOTE: Added pointer math separately from function to avoid UBSAN complaining unsigned short *bufferPtr = (unsigned short *)buffer; if (offset > 0) bufferPtr += offset; glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)bufferPtr, instances); #endif }
O2
c
rlDrawVertexArrayElementsInstanced: movl %ecx, %r8d xorl %eax, %eax testl %edi, %edi cmovgl %edi, %eax leaq (%rdx,%rax,2), %rcx movq 0xd04d5(%rip), %rax # 0x1257f0 pushq $0x4 popq %rdi movl $0x1403, %edx # imm = 0x1403 jmpq *%rax
rlDrawVertexArrayElementsInstanced: mov r8d, ecx xor eax, eax test edi, edi cmovg eax, edi lea rcx, [rdx+rax*2] mov rax, cs:glad_glDrawElementsInstanced push 4 pop rdi mov edx, 1403h jmp rax
long long rlDrawVertexArrayElementsInstanced(int a1, long long a2, long long a3, unsigned int a4) { long long v4; // rax v4 = 0LL; if ( a1 > 0 ) v4 = (unsigned int)a1; return glad_glDrawElementsInstanced(4LL, a2, 5123LL, a3 + 2 * v4, a4); }
rlDrawVertexArrayElementsInstanced: MOV R8D,ECX XOR EAX,EAX TEST EDI,EDI CMOVG EAX,EDI LEA RCX,[RDX + RAX*0x2] MOV RAX,qword ptr [0x002257f0] PUSH 0x4 POP RDI MOV EDX,0x1403 JMP RAX
void rlDrawVertexArrayElementsInstanced (uint param_1,int8 param_2,long param_3,int4 param_4) { ulong uVar1; uVar1 = 0; if (0 < (int)param_1) { uVar1 = (ulong)param_1; } /* WARNING: Could not recover jumptable at 0x00155323. Too many branches */ /* WARNING: Treating indirect jump as call */ (*glad_glDrawElementsInstanced)(4,param_2,0x1403,param_3 + uVar1 * 2,param_4); return; }
14,924
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O0
c
get_charset: pushq %rbp movq %rsp, %rbp subq $0x320, %rsp # imm = 0x320 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2fc(%rbp) movq %rsi, -0x308(%rbp) movq $0x0, -0x310(%rbp) movl -0x2fc(%rbp), %eax leaq 0x1e389b(%rip), %rcx # 0x2bf798 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0xdbf1a leaq 0x1e388d(%rip), %rax # 0x2bf798 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0xdbfec leaq 0xba6813(%rip), %rdi # 0xc82734 leaq -0x548(%rip), %rsi # 0xdb9e0 callq 0x2a240 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0xdbf65 leaq -0xb8(%rbp), %rdi callq 0xdb000 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0xdc030 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0xdbfde movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xdbfde leaq -0x2d0(%rbp), %rdi callq 0xdb6a0 movq %rax, %rdi leaq 0x77f44(%rip), %rsi # 0x153eda callq 0x2a730 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x14a550 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0xefb70 movq -0x310(%rbp), %rax movq %rax, -0x2f8(%rbp) movq -0x2f8(%rbp), %rax movq %rax, -0x318(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdc01c movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
get_charset: push rbp mov rbp, rsp sub rsp, 320h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2FC], edi mov [rbp+var_308], rsi mov [rbp+var_310], 0 mov eax, [rbp+var_2FC] lea rcx, default_charset_info mov rcx, [rcx] cmp eax, [rcx] jnz short loc_DBF1A lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_DBFEC loc_DBF1A: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_DBF65 lea rdi, [rbp+var_B8] call my_charset_loader_init_mysys mov esi, [rbp+var_2FC] mov rdx, [rbp+var_308] lea rdi, [rbp+var_B8] call get_internal_charset mov [rbp+var_310], rax loc_DBF65: cmp [rbp+var_310], 0 jnz short loc_DBFDE mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_DBFDE lea rdi, [rbp+var_2D0] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov [rbp+var_2F0], 23h ; '#' mov eax, [rbp+var_2FC] mov edi, eax lea rsi, [rbp+var_2F0] add rsi, 1 mov edx, 0Ah call int10_to_str lea rdx, [rbp+var_2F0] lea rcx, [rbp+var_2D0] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_DBFDE: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_DBFEC: mov rax, [rbp+var_2F8] mov [rbp+var_318], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DC01C mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_DC01C: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { long long charsets_dir; // rax int v3; // r8d int v4; // r9d long long internal_charset; // [rsp+10h] [rbp-310h] char v8; // [rsp+30h] [rbp-2F0h] BYREF _BYTE v9[7]; // [rsp+31h] [rbp-2EFh] BYREF _BYTE v10[536]; // [rsp+50h] [rbp-2D0h] BYREF _BYTE v11[176]; // [rsp+268h] [rbp-B8h] BYREF unsigned long long v12; // [rsp+318h] [rbp-8h] v12 = __readfsqword(0x28u); internal_charset = 0LL; if ( a1 == *(_DWORD *)default_charset_info ) return default_charset_info; pthread_once(&charsets_initialized, init_available_charsets); if ( a1 < 0x800 ) { my_charset_loader_init_mysys((long long)v11); internal_charset = get_internal_charset(v11, a1, a2); } if ( !internal_charset && (a2 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v10); stpcpy(charsets_dir, "Index.xml"); v8 = 35; int10_to_str(a1, v9, 10LL); my_error(22, 4, (unsigned int)&v8, (unsigned int)v10, v3, v4); } return (void *)internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x320 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2fc],EDI MOV qword ptr [RBP + -0x308],RSI MOV qword ptr [RBP + -0x310],0x0 MOV EAX,dword ptr [RBP + -0x2fc] LEA RCX,[0x3bf798] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x001dbf1a LEA RAX,[0x3bf798] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x001dbfec LAB_001dbf1a: LEA RDI,[0xd82734] LEA RSI,[0x1db9e0] CALL 0x0012a240 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x001dbf65 LEA RDI,[RBP + -0xb8] CALL 0x001db000 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x001dc030 MOV qword ptr [RBP + -0x310],RAX LAB_001dbf65: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x001dbfde MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x001dbfde LEA RDI,[RBP + -0x2d0] CALL 0x001db6a0 MOV RDI,RAX LEA RSI,[0x253eda] CALL 0x0012a730 MOV byte ptr [RBP + -0x2f0],0x23 MOV EAX,dword ptr [RBP + -0x2fc] MOV EDI,EAX LEA RSI,[RBP + -0x2f0] ADD RSI,0x1 MOV EDX,0xa CALL 0x0024a550 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x001efb70 LAB_001dbfde: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_001dbfec: MOV RAX,qword ptr [RBP + -0x2f8] MOV qword ptr [RBP + -0x318],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dc01c MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_001dc01c: CALL 0x0012a270
int * get_charset(uint param_1,ulong param_2) { char *__dest; long in_FS_OFFSET; int *local_318; int *local_300; int1 local_2f8; int1 auStack_2f7 [31]; int1 local_2d8 [536]; int1 local_c0 [176]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_318 = (int *)0x0; if (param_1 == *(uint *)default_charset_info) { local_300 = default_charset_info; } else { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { my_charset_loader_init_mysys(local_c0); local_318 = (int *)get_internal_charset(local_c0,param_1,param_2); } if ((local_318 == (int *)0x0) && ((param_2 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_2d8); stpcpy(__dest,"Index.xml"); local_2f8 = 0x23; int10_to_str(param_1,auStack_2f7,10); my_error(0x16,4,&local_2f8,local_2d8); } local_300 = local_318; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_300; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,925
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2f2c4a(%rip), %rax # 0x3856f8 movq (%rax), %r15 cmpl %edi, (%r15) je 0x92bb5 movq %rsi, %r14 movl %edi, %ebx leaq 0xb7506a(%rip), %rdi # 0xc07b30 leaq -0x382(%rip), %rsi # 0x9274b callq 0x29240 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x92b4a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x91f7e movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x91f8d movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x91fa8 movq %rax, 0x90(%rdi) leaq 0xd4c9(%rip), %rax # 0x9ffde movq %rax, 0x98(%rdi) leaq 0x2f2bcd(%rip), %rax # 0x3856f0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x91fc6 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x92bda movq %rax, %r15 jmp 0x92b4d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x92bb5 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x9250b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0xd5802 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x9e1d7 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x92bd5 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29270
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_92BB5 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_92B4A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_92B4D loc_92B4A: xor r15d, r15d loc_92B4D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_92BB5 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_92BB5: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_92BD5 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_92BD5: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long, long long, long long, long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x4856f8] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00192bb5 MOV R14,RSI MOV EBX,EDI LEA RDI,[0xd07b30] LEA RSI,[0x19274b] CALL 0x00129240 CMP EBX,0x7ff JA 0x00192b4a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x191f7e] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x191f8d] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x191fa8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x19ffde] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4856f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x191fc6] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x00192bda MOV R15,RAX JMP 0x00192b4d LAB_00192b4a: XOR R15D,R15D LAB_00192b4d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00192bb5 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0019250b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x001d5802 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0019e1d7 LAB_00192bb5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00192bd5 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00192bd5: CALL 0x00129270
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,926
nglog::LogMessage::SendToLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { static bool already_warned_before_init = false; RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Messages of a given severity get logged to lower severity logs, too if (!already_warned_before_init && !IsLoggingInitialized()) { const char w[] = "WARNING: Logging before InitializeLogging() is " "written to STDERR\n"; WriteToStderr(w, strlen(w)); already_warned_before_init = true; } // global flag: never log to file if set. Also -- don't log to a // file if we haven't parsed the command line flags to get the // program name. if (FLAGS_logtostderr || FLAGS_logtostdout || !IsLoggingInitialized()) { if (FLAGS_logtostdout) { ColoredWriteToStdout(data_->severity_, data_->message_text_, data_->num_chars_to_log_); } else { ColoredWriteToStderr(data_->severity_, data_->message_text_, data_->num_chars_to_log_); } // this could be protected by a flag if necessary. LogDestination::LogToSinks( 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)); } else { // log this message to all log files of severity <= severity_ LogDestination::LogToAllLogfiles(data_->severity_, time_.when(), data_->message_text_, data_->num_chars_to_log_); LogDestination::MaybeLogToStderr(data_->severity_, data_->message_text_, data_->num_chars_to_log_, data_->num_prefix_chars_); LogDestination::MaybeLogToEmail(data_->severity_, data_->message_text_, data_->num_chars_to_log_); LogDestination::LogToSinks( 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)); // NOTE: -1 removes trailing \n } // If we log a FATAL message, flush all the log destinations, then toss // a signal for others to catch. We leave the logs in a state that // someone else can use them (as long as they flush afterwards) if (data_->severity_ == NGLOG_FATAL && exit_on_dfatal) { if (data_->first_fatal_) { // Store crash information so that it is accessible from within signal // handlers that may be invoked later. RecordCrashReason(&crash_reason); SetCrashReason(&crash_reason); // Store shortened fatal message for other logs and GWQ status const size_t copy = min(data_->num_chars_to_log_, sizeof(fatal_message) - 1); memcpy(fatal_message, data_->message_text_, copy); fatal_message[copy] = '\0'; fatal_time = time_.when(); } if (!FLAGS_logtostderr && !FLAGS_logtostdout) { for (auto& log_destination : LogDestination::log_destinations_) { if (log_destination) { log_destination->logger_->Write( true, std::chrono::system_clock::time_point{}, "", 0); } } } LogDestination::WaitForSinks(data_); } }
O0
cpp
nglog::LogMessage::SendToLog(): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq 0x8(%rax), %rax cmpq $0x0, 0x76c0(%rax) jbe 0xea83 movq -0x90(%rbp), %rcx movq 0x8(%rcx), %rax movq 0x8(%rcx), %rcx movq 0x76c0(%rcx), %rcx subq $0x1, %rcx movsbl 0x4(%rax,%rcx), %eax cmpl $0xa, %eax je 0xeab4 jmp 0xea85 movl $0x3, %edi leaq 0x3ecc9(%rip), %rsi # 0x4d75a movl $0x6f6, %edx # imm = 0x6F6 leaq 0x3ed04(%rip), %rcx # 0x4d7a1 leaq 0x3ed11(%rip), %r8 # 0x4d7b5 leaq 0x3f240(%rip), %r9 # 0x4dceb movb $0x0, %al callq 0x47ab0 jmp 0xeab4 jmp 0xeab6 testb $0x1, 0x7133b(%rip) # 0x7fdf8 jne 0xeaf2 callq 0x4b1f0 testb $0x1, %al jne 0xeaf2 leaq -0x50(%rbp), %rdi leaq 0x3fc7d(%rip), %rsi # 0x4e750 movl $0x42, %edx callq 0x95a0 leaq -0x50(%rbp), %rdi movl $0x41, %esi callq 0xfa10 movb $0x1, 0x71306(%rip) # 0x7fdf8 leaq 0x620a1(%rip), %rax # 0x70b9a testb $0x1, (%rax) jne 0xeb17 leaq 0x6209d(%rip), %rax # 0x70ba2 testb $0x1, (%rax) jne 0xeb17 callq 0x4b1f0 testb $0x1, %al jne 0xebea leaq 0x62084(%rip), %rax # 0x70ba2 testb $0x1, (%rax) je 0xeb4e movq -0x90(%rbp), %rax movq 0x8(%rax), %rcx movl 0x7698(%rcx), %edi movq 0x8(%rax), %rsi addq $0x4, %rsi movq 0x8(%rax), %rax movq 0x76c0(%rax), %rdx callq 0xfa50 jmp 0xeb77 movq -0x90(%rbp), %rax movq 0x8(%rax), %rcx movl 0x7698(%rcx), %edi movq 0x8(%rax), %rsi addq $0x4, %rsi movq 0x8(%rax), %rax movq 0x76c0(%rax), %rdx callq 0xfab0 movq -0x90(%rbp), %r10 movq 0x8(%r10), %rax movl 0x7698(%rax), %edi movq 0x8(%r10), %rax movq 0x76d8(%rax), %rsi movq 0x8(%r10), %rax movq 0x76d0(%rax), %rdx movq 0x8(%r10), %rax movl 0x769c(%rax), %ecx movq %r10, %r8 addq $0x10, %r8 movq 0x8(%r10), %r9 addq $0x4, %r9 movq 0x8(%r10), %rax addq 0x76b8(%rax), %r9 movq 0x8(%r10), %rax movq 0x76c0(%rax), %rax movq 0x8(%r10), %r10 subq 0x76b8(%r10), %rax subq $0x1, %rax movq %rax, (%rsp) callq 0x17ff0 jmp 0xecfd movq -0x90(%rbp), %rdi movq 0x8(%rdi), %rax movl 0x7698(%rax), %eax movl %eax, -0x94(%rbp) addq $0x10, %rdi callq 0x180f0 movl -0x94(%rbp), %edi movq %rax, %rsi movq -0x90(%rbp), %rax movq 0x8(%rax), %rdx addq $0x4, %rdx movq 0x8(%rax), %rax movq 0x76c0(%rax), %rcx callq 0x17f60 movq -0x90(%rbp), %rax movq 0x8(%rax), %rcx movl 0x7698(%rcx), %edi movq 0x8(%rax), %rsi addq $0x4, %rsi movq 0x8(%rax), %rcx movq 0x76c0(%rcx), %rdx movq 0x8(%rax), %rax movq 0x76b8(%rax), %rcx callq 0x18110 movq -0x90(%rbp), %rax movq 0x8(%rax), %rcx movl 0x7698(%rcx), %edi movq 0x8(%rax), %rsi addq $0x4, %rsi movq 0x8(%rax), %rax movq 0x76c0(%rax), %rdx callq 0x18180 movq -0x90(%rbp), %r10 movq 0x8(%r10), %rax movl 0x7698(%rax), %edi movq 0x8(%r10), %rax movq 0x76d8(%rax), %rsi movq 0x8(%r10), %rax movq 0x76d0(%rax), %rdx movq 0x8(%r10), %rax movl 0x769c(%rax), %ecx movq %r10, %r8 addq $0x10, %r8 movq 0x8(%r10), %r9 addq $0x4, %r9 movq 0x8(%r10), %rax addq 0x76b8(%rax), %r9 movq 0x8(%r10), %rax movq 0x76c0(%rax), %rax movq 0x8(%r10), %r10 subq 0x76b8(%r10), %rax subq $0x1, %rax movq %rax, (%rsp) callq 0x17ff0 movq -0x90(%rbp), %rax movq 0x8(%rax), %rax cmpl $0x3, 0x7698(%rax) jne 0xee9c testb $0x1, 0x61a50(%rip) # 0x7076c je 0xee9c movq -0x90(%rbp), %rax movq 0x8(%rax), %rax testb $0x1, 0x76e1(%rax) je 0xedce movq -0x90(%rbp), %rdi leaq 0x620a8(%rip), %rsi # 0x70df0 callq 0xfaf0 leaq 0x6209c(%rip), %rdi # 0x70df0 callq 0x4b320 movq -0x90(%rbp), %rax movq 0x8(%rax), %rdi addq $0x76c0, %rdi # imm = 0x76C0 movq $0xff, -0x60(%rbp) leaq -0x60(%rbp), %rsi callq 0xd000 movq %rax, %rcx movq -0x90(%rbp), %rax movq (%rcx), %rcx movq %rcx, -0x58(%rbp) movq 0x8(%rax), %rsi addq $0x4, %rsi movq -0x58(%rbp), %rdx leaq 0x70f50(%rip), %rdi # 0x7fcf0 callq 0x95a0 movq -0x90(%rbp), %rdi movq -0x58(%rbp), %rcx leaq 0x70f39(%rip), %rax # 0x7fcf0 movb $0x0, (%rax,%rcx) addq $0x10, %rdi callq 0x180f0 movq (%rax), %rax movq %rax, 0x71022(%rip) # 0x7fdf0 leaq 0x61dc5(%rip), %rax # 0x70b9a testb $0x1, (%rax) jne 0xee8c leaq 0x61dbd(%rip), %rax # 0x70ba2 testb $0x1, (%rax) jne 0xee8c leaq 0x61fbb(%rip), %rax # 0x70db0 movq %rax, -0x68(%rbp) leaq 0x61fb0(%rip), %rax # 0x70db0 movq %rax, -0x70(%rbp) leaq 0x61fa5(%rip), %rax # 0x70db0 addq $0x20, %rax movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rax cmpq -0x78(%rbp), %rax je 0xee8a movq -0x70(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rdi callq 0x18450 testb $0x1, %al jne 0xee34 jmp 0xee7a movq -0x80(%rbp), %rdi callq 0x18480 movq 0xc8(%rax), %rax movq %rax, -0xa0(%rbp) leaq -0x88(%rbp), %rdi callq 0x184a0 movq -0xa0(%rbp), %rdi movq (%rdi), %rax movl $0x1, %esi leaq -0x88(%rbp), %rdx leaq 0x3ee77(%rip), %rcx # 0x4dceb xorl %r8d, %r8d callq *0x10(%rax) jmp 0xee7c movq -0x70(%rbp), %rax addq $0x8, %rax movq %rax, -0x70(%rbp) jmp 0xee13 jmp 0xee8c movq -0x90(%rbp), %rax movq 0x8(%rax), %rdi callq 0x17df0 addq $0xb0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5nglog10LogMessage9SendToLogEv: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_90], rax mov rax, [rbp+var_90] mov rax, [rax+8] cmp qword ptr [rax+76C0h], 0 jbe short loc_EA83 mov rcx, [rbp+var_90] mov rax, [rcx+8] mov rcx, [rcx+8] mov rcx, [rcx+76C0h] sub rcx, 1 movsx eax, byte ptr [rax+rcx+4] cmp eax, 0Ah jz short loc_EAB4 loc_EA83: jmp short $+2 loc_EA85: mov edi, (offset dword_0+3); this lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 6F6h lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_4DCE9+2; "" mov al, 0 call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) jmp short $+2 loc_EAB4: jmp short $+2 loc_EAB6: test cs:_ZZN5nglog10LogMessage9SendToLogEvE26already_warned_before_init, 1; nglog::LogMessage::SendToLog(void)::already_warned_before_init jnz short loc_EAF2 call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, 1 jnz short loc_EAF2 lea rdi, [rbp+var_50] lea rsi, aWarningLogging; "WARNING: Logging before InitializeLoggi"... mov edx, 42h ; 'B' call _memcpy lea rdi, [rbp+var_50]; this mov esi, (offset dword_40+1); char * call _ZN5nglogL13WriteToStderrEPKcm; nglog::WriteToStderr(char const*,ulong) mov cs:_ZZN5nglog10LogMessage9SendToLogEvE26already_warned_before_init, 1; nglog::LogMessage::SendToLog(void)::already_warned_before_init loc_EAF2: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr test byte ptr [rax], 1 jnz short loc_EB17 lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout test byte ptr [rax], 1 jnz short loc_EB17 call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, 1 jnz loc_EBEA loc_EB17: lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout test byte ptr [rax], 1 jz short loc_EB4E mov rax, [rbp+var_90] mov rcx, [rax+8] mov edi, [rcx+7698h] mov rsi, [rax+8] add rsi, 4 mov rax, [rax+8] mov rdx, [rax+76C0h] call _ZN5nglogL20ColoredWriteToStdoutENS_11LogSeverityEPKcm; nglog::ColoredWriteToStdout(nglog::LogSeverity,char const*,ulong) jmp short loc_EB77 loc_EB4E: mov rax, [rbp+var_90] mov rcx, [rax+8] mov edi, [rcx+7698h] mov rsi, [rax+8] add rsi, 4 mov rax, [rax+8] mov rdx, [rax+76C0h] call _ZN5nglogL20ColoredWriteToStderrENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderr(nglog::LogSeverity,char const*,ulong) loc_EB77: mov r10, [rbp+var_90] mov rax, [r10+8] mov edi, [rax+7698h] mov rax, [r10+8] mov rsi, [rax+76D8h] mov rax, [r10+8] mov rdx, [rax+76D0h] mov rax, [r10+8] mov ecx, [rax+769Ch] mov r8, r10 add r8, 10h mov r9, [r10+8] add r9, 4 mov rax, [r10+8] add r9, [rax+76B8h] mov rax, [r10+8] mov rax, [rax+76C0h] mov r10, [r10+8] sub rax, [r10+76B8h] sub rax, 1 mov [rsp+0B0h+var_B0], rax call _ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m; nglog::LogDestination::LogToSinks(nglog::LogSeverity,char const*,char const*,int,nglog::LogMessageTime const&,char const*,ulong) jmp loc_ECFD loc_EBEA: mov rdi, [rbp+var_90] mov rax, [rdi+8] mov eax, [rax+7698h] mov [rbp+var_94], eax add rdi, 10h; this call _ZNK5nglog14LogMessageTime4whenEv; nglog::LogMessageTime::when(void) mov edi, [rbp+var_94] mov rsi, rax mov rax, [rbp+var_90] mov rdx, [rax+8] add rdx, 4 mov rax, [rax+8] mov rcx, [rax+76C0h] call _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) mov rax, [rbp+var_90] mov rcx, [rax+8] mov edi, [rcx+7698h] mov rsi, [rax+8] add rsi, 4 mov rcx, [rax+8] mov rdx, [rcx+76C0h] mov rax, [rax+8] mov rcx, [rax+76B8h] call _ZN5nglog14LogDestination16MaybeLogToStderrENS_11LogSeverityEPKcmm; nglog::LogDestination::MaybeLogToStderr(nglog::LogSeverity,char const*,ulong,ulong) mov rax, [rbp+var_90] mov rcx, [rax+8] mov edi, [rcx+7698h] mov rsi, [rax+8] add rsi, 4 mov rax, [rax+8] mov rdx, [rax+76C0h] call _ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm; nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity,char const*,ulong) mov r10, [rbp+var_90] mov rax, [r10+8] mov edi, [rax+7698h] mov rax, [r10+8] mov rsi, [rax+76D8h] mov rax, [r10+8] mov rdx, [rax+76D0h] mov rax, [r10+8] mov ecx, [rax+769Ch] mov r8, r10 add r8, 10h mov r9, [r10+8] add r9, 4 mov rax, [r10+8] add r9, [rax+76B8h] mov rax, [r10+8] mov rax, [rax+76C0h] mov r10, [r10+8] sub rax, [r10+76B8h] sub rax, 1 mov [rsp+0B0h+var_B0], rax call _ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m; nglog::LogDestination::LogToSinks(nglog::LogSeverity,char const*,char const*,int,nglog::LogMessageTime const&,char const*,ulong) loc_ECFD: mov rax, [rbp+var_90] mov rax, [rax+8] cmp dword ptr [rax+7698h], 3 jnz loc_EE9C test cs:_ZN5nglogL14exit_on_dfatalE, 1; nglog::exit_on_dfatal jz loc_EE9C mov rax, [rbp+var_90] mov rax, [rax+8] test byte ptr [rax+76E1h], 1 jz loc_EDCE mov rdi, [rbp+var_90]; this lea rsi, _ZN5nglogL12crash_reasonE; nglog::internal::CrashReason * call _ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE; nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason *) lea rdi, _ZN5nglogL12crash_reasonE; this call _ZN5nglog5tools14SetCrashReasonEPKNS_8internal11CrashReasonE; nglog::tools::SetCrashReason(nglog::internal::CrashReason const*) mov rax, [rbp+var_90] mov rdi, [rax+8] add rdi, 76C0h mov [rbp+var_60], 0FFh lea rsi, [rbp+var_60] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rcx, rax mov rax, [rbp+var_90] mov rcx, [rcx] mov [rbp+var_58], rcx mov rsi, [rax+8] add rsi, 4; nglog::internal::LogMessageData * mov rdx, [rbp+var_58] lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message call _memcpy mov rdi, [rbp+var_90] mov rcx, [rbp+var_58] lea rax, _ZN5nglogL13fatal_messageE; nglog::fatal_message mov byte ptr [rax+rcx], 0 add rdi, 10h; this call _ZNK5nglog14LogMessageTime4whenEv; nglog::LogMessageTime::when(void) mov rax, [rax] mov cs:_ZN5nglogL10fatal_timeE, rax; nglog::fatal_time loc_EDCE: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr test byte ptr [rax], 1 jnz loc_EE8C lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout test byte ptr [rax], 1 jnz loc_EE8C lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov [rbp+var_68], rax lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ mov [rbp+var_70], rax lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ add rax, 20h ; ' ' mov [rbp+var_78], rax loc_EE13: mov rax, [rbp+var_70] cmp rax, [rbp+var_78] jz short loc_EE8A mov rax, [rbp+var_70] mov [rbp+var_80], rax mov rdi, [rbp+var_80] call _ZNKSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EEcvbEv; std::unique_ptr<nglog::LogDestination>::operator bool(void) test al, 1 jnz short loc_EE34 jmp short loc_EE7A loc_EE34: mov rdi, [rbp+var_80] call _ZNKSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EEptEv; std::unique_ptr<nglog::LogDestination>::operator->(void) mov rax, [rax+0C8h] mov [rbp+var_A0], rax lea rdi, [rbp+var_88] call _ZNSt6chrono10time_pointINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEEEC2Ev; std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_point(void) mov rdi, [rbp+var_A0] mov rax, [rdi] mov esi, 1 lea rdx, [rbp+var_88] lea rcx, asc_4DCE9+2; "" xor r8d, r8d call qword ptr [rax+10h] loc_EE7A: jmp short $+2 loc_EE7C: mov rax, [rbp+var_70] add rax, 8 mov [rbp+var_70], rax jmp short loc_EE13 loc_EE8A: jmp short $+2 loc_EE8C: mov rax, [rbp+var_90] mov rdi, [rax+8]; this call _ZN5nglog14LogDestination12WaitForSinksEPNS_8internal14LogMessageDataE; nglog::LogDestination::WaitForSinks(nglog::internal::LogMessageData *) loc_EE9C: add rsp, 0B0h pop rbp retn
nglog::LogDestination * nglog::LogMessage::SendToLog(nglog::LogMessage *this) { unsigned long long v1; // rdx nglog::LogDestination *v2; // rax nglog::internal::LogMessageData *v3; // rsi long long v4; // rax nglog::LogDestination *v5; // rax nglog::LogDestination *result; // rax _QWORD *v7; // rdi long long v8; // [rsp+10h] [rbp-A0h] unsigned int v9; // [rsp+1Ch] [rbp-94h] nglog::LogDestination **v10; // [rsp+20h] [rbp-90h] char v11[8]; // [rsp+28h] [rbp-88h] BYREF char *v12; // [rsp+30h] [rbp-80h] char *v13; // [rsp+38h] [rbp-78h] char *v14; // [rsp+40h] [rbp-70h] void *v15; // [rsp+48h] [rbp-68h] long long v16; // [rsp+50h] [rbp-60h] BYREF long long v17; // [rsp+58h] [rbp-58h] _BYTE v18[72]; // [rsp+60h] [rbp-50h] BYREF nglog::LogMessage *v19; // [rsp+A8h] [rbp-8h] v19 = this; v10 = (nglog::LogDestination **)this; if ( !*(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) || *(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) - 1LL + 4) != 10 ) { this = (nglog::LogMessage *)((char *)&dword_0 + 3); nglog::RawLog( (unsigned int)&dword_0 + 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1782, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)""); } if ( (nglog::LogMessage::SendToLog(void)::already_warned_before_init & 1) == 0 && (nglog::IsLoggingInitialized(this) & 1) == 0 ) { memcpy(v18, "WARNING: Logging before InitializeLogging() is written to STDERR\n", 66LL); this = (nglog::LogMessage *)v18; nglog::WriteToStderr((nglog *)v18, (const char *)&dword_40 + 1, v1); nglog::LogMessage::SendToLog(void)::already_warned_before_init = 1; } if ( (fLB::FLAGS_logtostderr & 1) != 0 || (fLB::FLAGS_logtostdout & 1) != 0 || (nglog::IsLoggingInitialized(this) & 1) == 0 ) { if ( (fLB::FLAGS_logtostdout & 1) != 0 ) nglog::ColoredWriteToStdout(*((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800)); else nglog::ColoredWriteToStderr(*((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800)); v2 = v10[1]; v3 = (nglog::internal::LogMessageData *)*((_QWORD *)v2 + 3803); nglog::LogDestination::LogToSinks( *((_DWORD *)v2 + 7590), (_DWORD)v3, *((_QWORD *)v2 + 3802), *((_DWORD *)v2 + 7591), (_DWORD)v10 + 16, *((_DWORD *)v2 + 7598) + *((_DWORD *)v10 + 2) + 4, *((_QWORD *)v2 + 3800) - *((_QWORD *)v2 + 3799) - 1LL); } else { v9 = *((_DWORD *)v10[1] + 7590); v4 = nglog::LogMessageTime::when((nglog::LogMessageTime *)(v10 + 2)); nglog::LogDestination::LogToAllLogfiles(v9, v4, (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800)); nglog::LogDestination::MaybeLogToStderr( *((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800), *((_QWORD *)v10[1] + 3799)); nglog::LogDestination::MaybeLogToEmail( *((unsigned int *)v10[1] + 7590), (char *)v10[1] + 4, *((_QWORD *)v10[1] + 3800)); v5 = v10[1]; v3 = (nglog::internal::LogMessageData *)*((_QWORD *)v5 + 3803); nglog::LogDestination::LogToSinks( *((_DWORD *)v5 + 7590), (_DWORD)v3, *((_QWORD *)v5 + 3802), *((_DWORD *)v5 + 7591), (_DWORD)v10 + 16, *((_DWORD *)v5 + 7598) + *((_DWORD *)v10 + 2) + 4, *((_QWORD *)v5 + 3800) - *((_QWORD *)v5 + 3799) - 1LL); } result = v10[1]; if ( *((_DWORD *)result + 7590) == 3 && (nglog::exit_on_dfatal & 1) != 0 ) { if ( (*((_BYTE *)v10[1] + 30433) & 1) != 0 ) { nglog::LogMessage::RecordCrashReason( (nglog::LogMessage *)v10, (nglog::internal::CrashReason *)&nglog::crash_reason); nglog::tools::SetCrashReason( (nglog::tools *)&nglog::crash_reason, (const nglog::internal::CrashReason *)&nglog::crash_reason); v7 = (_QWORD *)((char *)v10[1] + 30400); v16 = 255LL; v17 = *std::min<unsigned long>(v7, &v16); v3 = (nglog::LogDestination *)((char *)v10[1] + 4); memcpy(nglog::fatal_message, v3, v17); nglog::fatal_message[v17] = 0; nglog::fatal_time = *(_QWORD *)nglog::LogMessageTime::when((nglog::LogMessageTime *)(v10 + 2)); } if ( (fLB::FLAGS_logtostderr & 1) == 0 && (fLB::FLAGS_logtostdout & 1) == 0 ) { v15 = &nglog::LogDestination::log_destinations_; v14 = (char *)&nglog::LogDestination::log_destinations_; v13 = (char *)&nglog::LogDestination::log_destinations_ + 32; while ( v14 != v13 ) { v12 = v14; if ( (std::unique_ptr<nglog::LogDestination>::operator bool(v14) & 1) != 0 ) { v8 = *(_QWORD *)(std::unique_ptr<nglog::LogDestination>::operator->(v12) + 200); std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::time_point(v11); v3 = (nglog::internal::LogMessageData *)(&dword_0 + 1); (*(void ( **)(long long, long long, char *, char *, _QWORD))(*(_QWORD *)v8 + 16LL))( v8, 1LL, v11, "", 0LL); } v14 += 8; } } return (nglog::LogDestination *)nglog::LogDestination::WaitForSinks(v10[1], v3); } return result; }
SendToLog: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX + 0x8] CMP qword ptr [RAX + 0x76c0],0x0 JBE 0x0010ea83 MOV RCX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x76c0] SUB RCX,0x1 MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4] CMP EAX,0xa JZ 0x0010eab4 LAB_0010ea83: JMP 0x0010ea85 LAB_0010ea85: MOV EDI,0x3 LEA RSI,[0x14d75a] MOV EDX,0x6f6 LEA RCX,[0x14d7a1] LEA R8,[0x14d7b5] LEA R9,[0x14dceb] MOV AL,0x0 CALL 0x00147ab0 JMP 0x0010eab4 LAB_0010eab4: JMP 0x0010eab6 LAB_0010eab6: TEST byte ptr [0x0017fdf8],0x1 JNZ 0x0010eaf2 CALL 0x0014b1f0 TEST AL,0x1 JNZ 0x0010eaf2 LEA RDI,[RBP + -0x50] LEA RSI,[0x14e750] MOV EDX,0x42 CALL 0x001095a0 LEA RDI,[RBP + -0x50] MOV ESI,0x41 CALL 0x0010fa10 MOV byte ptr [0x0017fdf8],0x1 LAB_0010eaf2: LEA RAX,[0x170b9a] TEST byte ptr [RAX],0x1 JNZ 0x0010eb17 LEA RAX,[0x170ba2] TEST byte ptr [RAX],0x1 JNZ 0x0010eb17 CALL 0x0014b1f0 TEST AL,0x1 JNZ 0x0010ebea LAB_0010eb17: LEA RAX,[0x170ba2] TEST byte ptr [RAX],0x1 JZ 0x0010eb4e MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RCX + 0x7698] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x4 MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x76c0] CALL 0x0010fa50 JMP 0x0010eb77 LAB_0010eb4e: MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RCX + 0x7698] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x4 MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x76c0] CALL 0x0010fab0 LAB_0010eb77: MOV R10,qword ptr [RBP + -0x90] MOV RAX,qword ptr [R10 + 0x8] MOV EDI,dword ptr [RAX + 0x7698] MOV RAX,qword ptr [R10 + 0x8] MOV RSI,qword ptr [RAX + 0x76d8] MOV RAX,qword ptr [R10 + 0x8] MOV RDX,qword ptr [RAX + 0x76d0] MOV RAX,qword ptr [R10 + 0x8] MOV ECX,dword ptr [RAX + 0x769c] MOV R8,R10 ADD R8,0x10 MOV R9,qword ptr [R10 + 0x8] ADD R9,0x4 MOV RAX,qword ptr [R10 + 0x8] ADD R9,qword ptr [RAX + 0x76b8] MOV RAX,qword ptr [R10 + 0x8] MOV RAX,qword ptr [RAX + 0x76c0] MOV R10,qword ptr [R10 + 0x8] SUB RAX,qword ptr [R10 + 0x76b8] SUB RAX,0x1 MOV qword ptr [RSP],RAX CALL 0x00117ff0 JMP 0x0010ecfd LAB_0010ebea: MOV RDI,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RDI + 0x8] MOV EAX,dword ptr [RAX + 0x7698] MOV dword ptr [RBP + -0x94],EAX ADD RDI,0x10 CALL 0x001180f0 MOV EDI,dword ptr [RBP + -0x94] MOV RSI,RAX MOV RAX,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,0x4 MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x76c0] CALL 0x00117f60 MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RCX + 0x7698] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x4 MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RCX + 0x76c0] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x76b8] CALL 0x00118110 MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RCX + 0x7698] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x4 MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x76c0] CALL 0x00118180 MOV R10,qword ptr [RBP + -0x90] MOV RAX,qword ptr [R10 + 0x8] MOV EDI,dword ptr [RAX + 0x7698] MOV RAX,qword ptr [R10 + 0x8] MOV RSI,qword ptr [RAX + 0x76d8] MOV RAX,qword ptr [R10 + 0x8] MOV RDX,qword ptr [RAX + 0x76d0] MOV RAX,qword ptr [R10 + 0x8] MOV ECX,dword ptr [RAX + 0x769c] MOV R8,R10 ADD R8,0x10 MOV R9,qword ptr [R10 + 0x8] ADD R9,0x4 MOV RAX,qword ptr [R10 + 0x8] ADD R9,qword ptr [RAX + 0x76b8] MOV RAX,qword ptr [R10 + 0x8] MOV RAX,qword ptr [RAX + 0x76c0] MOV R10,qword ptr [R10 + 0x8] SUB RAX,qword ptr [R10 + 0x76b8] SUB RAX,0x1 MOV qword ptr [RSP],RAX CALL 0x00117ff0 LAB_0010ecfd: MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX + 0x8] CMP dword ptr [RAX + 0x7698],0x3 JNZ 0x0010ee9c TEST byte ptr [0x0017076c],0x1 JZ 0x0010ee9c MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX + 0x8] TEST byte ptr [RAX + 0x76e1],0x1 JZ 0x0010edce MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[0x170df0] CALL 0x0010faf0 LEA RDI,[0x170df0] CALL 0x0014b320 MOV RAX,qword ptr [RBP + -0x90] MOV RDI,qword ptr [RAX + 0x8] ADD RDI,0x76c0 MOV qword ptr [RBP + -0x60],0xff LEA RSI,[RBP + -0x60] CALL 0x0010d000 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RCX] MOV qword ptr [RBP + -0x58],RCX MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x4 MOV RDX,qword ptr [RBP + -0x58] LEA RDI,[0x17fcf0] CALL 0x001095a0 MOV RDI,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0x58] LEA RAX,[0x17fcf0] MOV byte ptr [RAX + RCX*0x1],0x0 ADD RDI,0x10 CALL 0x001180f0 MOV RAX,qword ptr [RAX] MOV qword ptr [0x0017fdf0],RAX LAB_0010edce: LEA RAX,[0x170b9a] TEST byte ptr [RAX],0x1 JNZ 0x0010ee8c LEA RAX,[0x170ba2] TEST byte ptr [RAX],0x1 JNZ 0x0010ee8c LEA RAX,[0x170db0] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[0x170db0] MOV qword ptr [RBP + -0x70],RAX LEA RAX,[0x170db0] ADD RAX,0x20 MOV qword ptr [RBP + -0x78],RAX LAB_0010ee13: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x78] JZ 0x0010ee8a MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x80] CALL 0x00118450 TEST AL,0x1 JNZ 0x0010ee34 JMP 0x0010ee7a LAB_0010ee34: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00118480 MOV RAX,qword ptr [RAX + 0xc8] MOV qword ptr [RBP + -0xa0],RAX LEA RDI,[RBP + -0x88] CALL 0x001184a0 MOV RDI,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RDI] MOV ESI,0x1 LEA RDX,[RBP + -0x88] LEA RCX,[0x14dceb] XOR R8D,R8D CALL qword ptr [RAX + 0x10] LAB_0010ee7a: JMP 0x0010ee7c LAB_0010ee7c: MOV RAX,qword ptr [RBP + -0x70] ADD RAX,0x8 MOV qword ptr [RBP + -0x70],RAX JMP 0x0010ee13 LAB_0010ee8a: JMP 0x0010ee8c LAB_0010ee8c: MOV RAX,qword ptr [RBP + -0x90] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00117df0 LAB_0010ee9c: ADD RSP,0xb0 POP RBP RET
/* nglog::LogMessage::SendToLog() */ void __thiscall nglog::LogMessage::SendToLog(LogMessage *this) { int4 uVar1; long *plVar2; bool bVar3; ulong uVar4; int8 uVar5; ulong *puVar6; int8 *puVar7; long lVar8; time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> local_90 [8]; unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *local_88; unique_ptr *local_80; unique_ptr *local_78; int1 *local_70; ulong local_68; size_t local_60; char local_58 [72]; LogMessage *local_10; local_10 = this; if ((*(long *)(*(long *)(this + 8) + 0x76c0) == 0) || (*(char *)(*(long *)(this + 8) + *(long *)(*(long *)(this + 8) + 0x76c0) + 3) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x6f6, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0014dceb); } if (((SendToLog()::already_warned_before_init & 1) == 0) && (uVar4 = IsLoggingInitialized(), (uVar4 & 1) == 0)) { memcpy(local_58,"WARNING: Logging before InitializeLogging() is written to STDERR\n",0x42); WriteToStderr(local_58,0x41); SendToLog()::already_warned_before_init = 1; } if ((((fLB::FLAGS_logtostderr & 1) == 0) && ((fLB::FLAGS_logtostdout & 1) == 0)) && (uVar4 = IsLoggingInitialized(), (uVar4 & 1) != 0)) { uVar1 = *(int4 *)(*(long *)(this + 8) + 0x7698); uVar5 = LogMessageTime::when((LogMessageTime *)(this + 0x10)); LogDestination::LogToAllLogfiles (uVar1,uVar5,*(long *)(this + 8) + 4,*(int8 *)(*(long *)(this + 8) + 0x76c0)); LogDestination::MaybeLogToStderr (*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4, *(int8 *)(*(long *)(this + 8) + 0x76c0), *(int8 *)(*(long *)(this + 8) + 0x76b8)); LogDestination::MaybeLogToEmail (*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4, *(int8 *)(*(long *)(this + 8) + 0x76c0)); LogDestination::LogToSinks (*(int4 *)(*(long *)(this + 8) + 0x7698), *(int8 *)(*(long *)(this + 8) + 0x76d8), *(int8 *)(*(long *)(this + 8) + 0x76d0), *(int4 *)(*(long *)(this + 8) + 0x769c),this + 0x10, *(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8), (*(long *)(*(long *)(this + 8) + 0x76c0) - *(long *)(*(long *)(this + 8) + 0x76b8)) + -1); } else { if ((fLB::FLAGS_logtostdout & 1) == 0) { ColoredWriteToStderr (*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4, *(int8 *)(*(long *)(this + 8) + 0x76c0)); } else { ColoredWriteToStdout (*(int4 *)(*(long *)(this + 8) + 0x7698),*(long *)(this + 8) + 4, *(int8 *)(*(long *)(this + 8) + 0x76c0)); } LogDestination::LogToSinks (*(int4 *)(*(long *)(this + 8) + 0x7698), *(int8 *)(*(long *)(this + 8) + 0x76d8), *(int8 *)(*(long *)(this + 8) + 0x76d0), *(int4 *)(*(long *)(this + 8) + 0x769c),this + 0x10, *(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76b8), (*(long *)(*(long *)(this + 8) + 0x76c0) - *(long *)(*(long *)(this + 8) + 0x76b8)) + -1); } if ((*(int *)(*(long *)(this + 8) + 0x7698) == 3) && ((exit_on_dfatal & 1) != 0)) { if ((*(byte *)(*(long *)(this + 8) + 0x76e1) & 1) != 0) { RecordCrashReason(this,(CrashReason *)crash_reason); tools::SetCrashReason((CrashReason *)crash_reason); local_68 = 0xff; puVar6 = std::min<unsigned_long>((ulong *)(*(long *)(this + 8) + 0x76c0),&local_68); local_60 = *puVar6; memcpy(&fatal_message,(void *)(*(long *)(this + 8) + 4),local_60); (&fatal_message)[local_60] = 0; puVar7 = (int8 *)LogMessageTime::when((LogMessageTime *)(this + 0x10)); fatal_time = *puVar7; } if (((fLB::FLAGS_logtostderr & 1) == 0) && ((fLB::FLAGS_logtostdout & 1) == 0)) { local_70 = LogDestination::log_destinations_; local_80 = (unique_ptr *)(anonymous_namespace)::g_application_fingerprint_abi_cxx11_; for (local_78 = (unique_ptr *)LogDestination::log_destinations_; local_78 != local_80; local_78 = local_78 + 8) { local_88 = (unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) local_78; bVar3 = std::unique_ptr::operator_cast_to_bool(local_78); if (bVar3) { lVar8 = std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> ::operator->(local_88); plVar2 = *(long **)(lVar8 + 200); std::chrono:: time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> ::time_point(local_90); (**(code **)(*plVar2 + 0x10))(plVar2,1,local_90,&DAT_0014dceb,0); } } } LogDestination::WaitForSinks(*(LogMessageData **)(this + 8)); } return; }
14,927
LefDefParser::defiTrack::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
void defiTrack::Init() { macro_ = 0; macroLength_ = 0; x_ = 0.0; xNum_ = 0.0; xStep_ = 0.0; layersLength_ = 0; numLayers_ = 0; layers_ = 0; firstTrackMask_=0; samemask_ = 0; }
O0
cpp
LefDefParser::defiTrack::Init(): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq $0x0, 0x8(%rax) movl $0x0, (%rax) xorps %xmm0, %xmm0 movsd %xmm0, 0x10(%rax) xorps %xmm0, %xmm0 movsd %xmm0, 0x18(%rax) xorps %xmm0, %xmm0 movsd %xmm0, 0x20(%rax) movl $0x0, 0x28(%rax) movl $0x0, 0x2c(%rax) movq $0x0, 0x30(%rax) movl $0x0, 0x38(%rax) movl $0x0, 0x3c(%rax) retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser9defiTrack4InitEv: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov qword ptr [rax+8], 0 mov dword ptr [rax], 0 xorps xmm0, xmm0 movsd qword ptr [rax+10h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rax+18h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rax+20h], xmm0 mov dword ptr [rax+28h], 0 mov dword ptr [rax+2Ch], 0 mov qword ptr [rax+30h], 0 mov dword ptr [rax+38h], 0 mov dword ptr [rax+3Ch], 0 retn
LefDefParser::defiTrack * LefDefParser::defiTrack::Init(LefDefParser::defiTrack *this) { LefDefParser::defiTrack *result; // rax result = this; *((_QWORD *)this + 1) = 0LL; *(_DWORD *)this = 0; *((_QWORD *)this + 2) = 0LL; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 4) = 0LL; *((_DWORD *)this + 10) = 0; *((_DWORD *)this + 11) = 0; *((_QWORD *)this + 6) = 0LL; *((_DWORD *)this + 14) = 0; *((_DWORD *)this + 15) = 0; return result; }
Init: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV dword ptr [RAX],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RAX + 0x10],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RAX + 0x18],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RAX + 0x20],XMM0 MOV dword ptr [RAX + 0x28],0x0 MOV dword ptr [RAX + 0x2c],0x0 MOV qword ptr [RAX + 0x30],0x0 MOV dword ptr [RAX + 0x38],0x0 MOV dword ptr [RAX + 0x3c],0x0 RET
/* LefDefParser::defiTrack::Init() */ void __thiscall LefDefParser::defiTrack::Init(defiTrack *this) { *(int8 *)(this + 8) = 0; *(int4 *)this = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int4 *)(this + 0x28) = 0; *(int4 *)(this + 0x2c) = 0; *(int8 *)(this + 0x30) = 0; *(int4 *)(this + 0x38) = 0; *(int4 *)(this + 0x3c) = 0; return; }
14,928
LefDefParser::defiTrack::Init()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
void defiTrack::Init() { macro_ = 0; macroLength_ = 0; x_ = 0.0; xNum_ = 0.0; xStep_ = 0.0; layersLength_ = 0; numLayers_ = 0; layers_ = 0; firstTrackMask_=0; samemask_ = 0; }
O3
cpp
LefDefParser::defiTrack::Init(): movl $0x0, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movq $0x0, 0x38(%rdi) retq
_ZN12LefDefParser9defiTrack4InitEv: mov dword ptr [rdi], 0 xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 mov qword ptr [rdi+38h], 0 retn
void LefDefParser::defiTrack::Init(LefDefParser::defiTrack *this) { *(_DWORD *)this = 0; *(_OWORD *)((char *)this + 8) = 0LL; *(_OWORD *)((char *)this + 24) = 0LL; *(_OWORD *)((char *)this + 40) = 0LL; *((_QWORD *)this + 7) = 0LL; }
Init: MOV dword ptr [RDI],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOV qword ptr [RDI + 0x38],0x0 RET
/* LefDefParser::defiTrack::Init() */ void __thiscall LefDefParser::defiTrack::Init(defiTrack *this) { *(int4 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; return; }
14,929
ma_flush_table_files
eloqsql/storage/maria/ma_extra.c
int _ma_flush_table_files(MARIA_HA *info, uint flush_data_or_index, enum flush_type flush_type_for_data, enum flush_type flush_type_for_index) { int error= 0; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_flush_table_files"); /* flush data file first because it's more critical */ if (flush_data_or_index & MARIA_FLUSH_DATA) { if ((info->opt_flag & WRITE_CACHE_USED) && flush_type_for_data != FLUSH_IGNORE_CHANGED && flush_io_cache(&info->rec_cache)) error= 1; if (share->data_file_type == BLOCK_RECORD) { if (flush_type_for_data != FLUSH_IGNORE_CHANGED) { if (_ma_bitmap_flush(share)) error= 1; } else { mysql_mutex_lock(&share->bitmap.bitmap_lock); share->bitmap.changed= 0; share->bitmap.changed_not_flushed= 0; mysql_mutex_unlock(&share->bitmap.bitmap_lock); } if (flush_pagecache_blocks(share->pagecache, &info->dfile, flush_type_for_data)) error= 1; } } if ((flush_data_or_index & MARIA_FLUSH_INDEX) && flush_pagecache_blocks(share->pagecache, &share->kfile, flush_type_for_index)) error= 1; if (!error) DBUG_RETURN(0); _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(1); }
O3
c
ma_flush_table_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r12d movq %rdi, %rbx movq (%rdi), %r15 testb $0x1, %r12b jne 0x36270 xorl %r14d, %r14d movl $0x0, %r13d testb $0x2, %r12b jne 0x3634c jmp 0x36384 movl %edx, %r13d xorl %r14d, %r14d cmpl $0x2, %edx je 0x362a6 movl 0x61c(%rbx), %eax andl $0x10, %eax je 0x362a6 leaq 0x4b8(%rbx), %rdi movl $0x1, %esi movl %ecx, %r14d callq 0x95539 movl %r14d, %ecx xorl %r14d, %r14d testl %eax, %eax setne %r14b cmpl $0x3, 0x7d0(%r15) jne 0x3633c cmpl $0x2, %r13d movl %ecx, -0x2c(%rbp) je 0x362d2 movq %r15, %rdi callq 0x3fb0d testb %al, %al movl $0x1, %eax cmovnel %eax, %r14d jmp 0x36313 leaq 0xa98(%r15), %rdi cmpq $0x0, 0xad8(%r15) movq %rdi, -0x38(%rbp) jne 0x36396 callq 0x29220 movw $0x0, 0xa30(%r15) movq 0xad8(%r15), %rdi testq %rdi, %rdi jne 0x363ac movq -0x38(%rbp), %rdi callq 0x291e0 movq 0x600(%r15), %rdi leaq 0x470(%rbx), %rsi movl %r13d, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3416c testl %eax, %eax movl $0x1, %eax cmovnel %eax, %r14d movl -0x2c(%rbp), %ecx testb $0x2, %r12b jne 0x3634c testl %r14d, %r14d jne 0x36371 xorl %r13d, %r13d jmp 0x36384 movq 0x600(%r15), %rdi addq $0x750, %r15 # imm = 0x750 xorl %r13d, %r13d movq %r15, %rsi movl %ecx, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x3416c orl %r14d, %eax je 0x36384 movq %rbx, %rdi movl $0x7e, %esi callq 0x36a24 movl $0x1, %r13d movl %r13d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa3269(%rip), %rsi # 0xd9606 movl $0x28c, %edx # imm = 0x28C callq 0x2eb8f jmp 0x362f0 leaq 0x34fc5d(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3630a
_ma_flush_table_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, esi mov rbx, rdi mov r15, [rdi] test r12b, 1 jnz short loc_36270 xor r14d, r14d mov r13d, 0 test r12b, 2 jnz loc_3634C jmp loc_36384 loc_36270: mov r13d, edx xor r14d, r14d cmp edx, 2 jz short loc_362A6 mov eax, [rbx+61Ch] and eax, 10h jz short loc_362A6 lea rdi, [rbx+4B8h] mov esi, 1 mov r14d, ecx call my_b_flush_io_cache mov ecx, r14d xor r14d, r14d test eax, eax setnz r14b loc_362A6: cmp dword ptr [r15+7D0h], 3 jnz loc_3633C cmp r13d, 2 mov [rbp+var_2C], ecx jz short loc_362D2 mov rdi, r15 call _ma_bitmap_flush test al, al mov eax, 1 cmovnz r14d, eax jmp short loc_36313 loc_362D2: lea rdi, [r15+0A98h] cmp qword ptr [r15+0AD8h], 0 mov [rbp+var_38], rdi jnz loc_36396 call _pthread_mutex_lock loc_362F0: mov word ptr [r15+0A30h], 0 mov rdi, [r15+0AD8h] test rdi, rdi jnz loc_363AC loc_3630A: mov rdi, [rbp+var_38] call _pthread_mutex_unlock loc_36313: mov rdi, [r15+600h] lea rsi, [rbx+470h] mov edx, r13d xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax mov eax, 1 cmovnz r14d, eax mov ecx, [rbp+var_2C] loc_3633C: test r12b, 2 jnz short loc_3634C test r14d, r14d jnz short loc_36371 xor r13d, r13d jmp short loc_36384 loc_3634C: mov rdi, [r15+600h] add r15, 750h xor r13d, r13d mov rsi, r15 mov edx, ecx xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter or eax, r14d jz short loc_36384 loc_36371: mov rdi, rbx mov esi, 7Eh ; '~' call _ma_set_fatal_error mov r13d, 1 loc_36384: mov eax, r13d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_36396: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 28Ch call psi_mutex_lock jmp loc_362F0 loc_363AC: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3630A
long long ma_flush_table_files(long long *a1, char a2, unsigned int a3, unsigned int a4) { long long v5; // r15 BOOL v6; // r14d unsigned int v7; // r13d unsigned int v9; // r14d int v10; // eax long long v11; // rdi unsigned int v13; // [rsp+14h] [rbp-2Ch] v5 = *a1; if ( (a2 & 1) == 0 ) { v6 = 0; v7 = 0; if ( (a2 & 2) == 0 ) return v7; LABEL_23: v7 = 0; if ( v6 | (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), v5 + 1872, a4, 0LL, 0LL) ) goto LABEL_24; return v7; } v6 = 0; if ( a3 != 2 && (*((_DWORD *)a1 + 391) & 0x10) != 0 ) { v9 = a4; v10 = my_b_flush_io_cache(a1 + 151, 1LL); a4 = v9; v6 = v10 != 0; } if ( *(_DWORD *)(v5 + 2000) == 3 ) { v13 = a4; if ( a3 == 2 ) { v11 = v5 + 2712; if ( *(_QWORD *)(v5 + 2776) ) psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c", 0x28Cu); else pthread_mutex_lock(v11); *(_WORD *)(v5 + 2608) = 0; if ( *(_QWORD *)(v5 + 2776) ) PSI_server[44](); pthread_mutex_unlock(v5 + 2712); } else if ( (unsigned __int8)ma_bitmap_flush(v5) ) { v6 = 1; } if ( (unsigned int)flush_pagecache_blocks_with_filter(*(_QWORD *)(v5 + 1536), (long long)(a1 + 142), a3, 0LL, 0LL) ) v6 = 1; a4 = v13; } if ( (a2 & 2) != 0 ) goto LABEL_23; if ( v6 ) { LABEL_24: ma_set_fatal_error(a1, 126LL); return 1; } return 0; }
_ma_flush_table_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12D,ESI MOV RBX,RDI MOV R15,qword ptr [RDI] TEST R12B,0x1 JNZ 0x00136270 XOR R14D,R14D MOV R13D,0x0 TEST R12B,0x2 JNZ 0x0013634c JMP 0x00136384 LAB_00136270: MOV R13D,EDX XOR R14D,R14D CMP EDX,0x2 JZ 0x001362a6 MOV EAX,dword ptr [RBX + 0x61c] AND EAX,0x10 JZ 0x001362a6 LEA RDI,[RBX + 0x4b8] MOV ESI,0x1 MOV R14D,ECX CALL 0x00195539 MOV ECX,R14D XOR R14D,R14D TEST EAX,EAX SETNZ R14B LAB_001362a6: CMP dword ptr [R15 + 0x7d0],0x3 JNZ 0x0013633c CMP R13D,0x2 MOV dword ptr [RBP + -0x2c],ECX JZ 0x001362d2 MOV RDI,R15 CALL 0x0013fb0d TEST AL,AL MOV EAX,0x1 CMOVNZ R14D,EAX JMP 0x00136313 LAB_001362d2: LEA RDI,[R15 + 0xa98] CMP qword ptr [R15 + 0xad8],0x0 MOV qword ptr [RBP + -0x38],RDI JNZ 0x00136396 CALL 0x00129220 LAB_001362f0: MOV word ptr [R15 + 0xa30],0x0 MOV RDI,qword ptr [R15 + 0xad8] TEST RDI,RDI JNZ 0x001363ac LAB_0013630a: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001291e0 LAB_00136313: MOV RDI,qword ptr [R15 + 0x600] LEA RSI,[RBX + 0x470] MOV EDX,R13D XOR ECX,ECX XOR R8D,R8D CALL 0x0013416c TEST EAX,EAX MOV EAX,0x1 CMOVNZ R14D,EAX MOV ECX,dword ptr [RBP + -0x2c] LAB_0013633c: TEST R12B,0x2 JNZ 0x0013634c TEST R14D,R14D JNZ 0x00136371 XOR R13D,R13D JMP 0x00136384 LAB_0013634c: MOV RDI,qword ptr [R15 + 0x600] ADD R15,0x750 XOR R13D,R13D MOV RSI,R15 MOV EDX,ECX XOR ECX,ECX XOR R8D,R8D CALL 0x0013416c OR EAX,R14D JZ 0x00136384 LAB_00136371: MOV RDI,RBX MOV ESI,0x7e CALL 0x00136a24 MOV R13D,0x1 LAB_00136384: MOV EAX,R13D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00136396: LEA RSI,[0x1d9606] MOV EDX,0x28c CALL 0x0012eb8f JMP 0x001362f0 LAB_001363ac: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013630a
int8 _ma_flush_table_files(long *param_1,uint param_2,int param_3,int4 param_4) { pthread_mutex_t *__mutex; long lVar1; char cVar2; int iVar3; bool bVar4; lVar1 = *param_1; if ((param_2 & 1) == 0) { bVar4 = false; if ((param_2 & 2) == 0) { return 0; } } else { bVar4 = false; if ((param_3 != 2) && ((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0)) { iVar3 = my_b_flush_io_cache(param_1 + 0x97,1); bVar4 = iVar3 != 0; } if (*(int *)(lVar1 + 2000) == 3) { if (param_3 == 2) { __mutex = (pthread_mutex_t *)(lVar1 + 0xa98); if (*(long *)(lVar1 + 0xad8) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_extra.c" ,0x28c); } *(int2 *)(lVar1 + 0xa30) = 0; if (*(long *)(lVar1 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } else { cVar2 = _ma_bitmap_flush(lVar1); if (cVar2 != '\0') { bVar4 = true; } } iVar3 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),param_1 + 0x8e,param_3,0,0); if (iVar3 != 0) { bVar4 = true; } } if ((param_2 & 2) == 0) { if (!bVar4) { return 0; } goto LAB_00136371; } } iVar3 = flush_pagecache_blocks_with_filter (*(int8 *)(lVar1 + 0x600),lVar1 + 0x750,param_4,0,0); if (iVar3 == 0 && !bVar4) { return 0; } LAB_00136371: _ma_set_fatal_error(param_1,0x7e); return 1; }
14,930
my_error_register
eloqsql/mysys/my_error.c
int my_error_register(const char** (*get_errmsgs)(int error), uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Allocate a new header structure. */ if (! (meh_p= (struct my_err_head*) my_malloc(key_memory_my_err_head, sizeof(struct my_err_head), MYF(MY_WME)))) return 1; meh_p->get_errmsgs= get_errmsgs; meh_p->meh_first= first; meh_p->meh_last= last; /* Search for the right position in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if ((*search_meh_pp)->meh_last > first) break; } /* Error numbers must be unique. No overlapping is allowed. */ if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last)) { my_free(meh_p); return 1; } /* Insert header into the chain. */ meh_p->meh_next= *search_meh_pp; *search_meh_pp= meh_p; return 0; }
O3
c
my_error_register: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d movl %esi, %r15d movq %rdi, %r12 leaq 0xb69f2a(%rip), %rax # 0xc0b080 movl (%rax), %edi movl $0x18, %esi movl $0x10, %edx callq 0xa2a95 movl $0x1, %ebx testq %rax, %rax je 0xa11ad movq %r12, 0x8(%rax) movl %r15d, 0x10(%rax) movl %r14d, 0x14(%rax) leaq 0x2e767c(%rip), %rcx # 0x388800 movq %rcx, %rdx movq (%rcx), %rcx testq %rcx, %rcx je 0xa119b cmpl %r15d, 0x14(%rcx) jbe 0xa1184 cmpl %r14d, 0x10(%rcx) jbe 0xa11a5 movq %rcx, (%rax) movq %rax, (%rdx) xorl %ebx, %ebx jmp 0xa11ad movq %rax, %rdi callq 0xa2cc2 movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_error_register: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, edx mov r15d, esi mov r12, rdi lea rax, key_memory_my_err_head mov edi, [rax] mov esi, 18h mov edx, 10h call my_malloc mov ebx, 1 test rax, rax jz short loc_A11AD mov [rax+8], r12 mov [rax+10h], r15d mov [rax+14h], r14d lea rcx, my_errmsgs_list loc_A1184: mov rdx, rcx mov rcx, [rcx] test rcx, rcx jz short loc_A119B cmp [rcx+14h], r15d jbe short loc_A1184 cmp [rcx+10h], r14d jbe short loc_A11A5 loc_A119B: mov [rax], rcx mov [rdx], rax xor ebx, ebx jmp short loc_A11AD loc_A11A5: mov rdi, rax call my_free loc_A11AD: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_error_register(long long a1, unsigned int a2, unsigned int a3) { long long v4; // rax unsigned int v5; // ebx long long **v6; // rcx _QWORD *v7; // rdx v4 = my_malloc(key_memory_my_err_head, 24LL, 16LL); v5 = 1; if ( v4 ) { *(_QWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 16) = a2; *(_DWORD *)(v4 + 20) = a3; v6 = &my_errmsgs_list; do { v7 = v6; v6 = (long long **)*v6; if ( !v6 ) goto LABEL_6; } while ( *((_DWORD *)v6 + 5) <= a2 ); if ( *((_DWORD *)v6 + 4) > a3 ) { LABEL_6: *(_QWORD *)v4 = v6; *v7 = v4; return 0; } my_free(v4); } return v5; }
my_error_register: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX MOV R15D,ESI MOV R12,RDI LEA RAX,[0xd0b080] MOV EDI,dword ptr [RAX] MOV ESI,0x18 MOV EDX,0x10 CALL 0x001a2a95 MOV EBX,0x1 TEST RAX,RAX JZ 0x001a11ad MOV qword ptr [RAX + 0x8],R12 MOV dword ptr [RAX + 0x10],R15D MOV dword ptr [RAX + 0x14],R14D LEA RCX,[0x488800] LAB_001a1184: MOV RDX,RCX MOV RCX,qword ptr [RCX] TEST RCX,RCX JZ 0x001a119b CMP dword ptr [RCX + 0x14],R15D JBE 0x001a1184 CMP dword ptr [RCX + 0x10],R14D JBE 0x001a11a5 LAB_001a119b: MOV qword ptr [RAX],RCX MOV qword ptr [RDX],RAX XOR EBX,EBX JMP 0x001a11ad LAB_001a11a5: MOV RDI,RAX CALL 0x001a2cc2 LAB_001a11ad: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 my_error_register(long param_1,uint param_2,uint param_3) { int **ppuVar1; long *plVar2; int **ppuVar3; int8 uVar4; plVar2 = (long *)my_malloc(key_memory_my_err_head,0x18,0x10); uVar4 = 1; if (plVar2 != (long *)0x0) { plVar2[1] = param_1; *(uint *)(plVar2 + 2) = param_2; *(uint *)((long)plVar2 + 0x14) = param_3; ppuVar1 = &my_errmsgs_list; do { ppuVar3 = ppuVar1; ppuVar1 = (int **)*ppuVar3; if (ppuVar1 == (int **)0x0) goto LAB_001a119b; } while (*(uint *)((long)ppuVar1 + 0x14) <= param_2); if (param_3 < *(uint *)(ppuVar1 + 2)) { LAB_001a119b: *plVar2 = (long)ppuVar1; *ppuVar3 = (int *)plVar2; uVar4 = 0; } else { my_free(plVar2); } } return uVar4; }
14,931
google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator=(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h
inline RepeatedPtrField<Element>& RepeatedPtrField<Element>::operator=( RepeatedPtrField&& other) noexcept { // We don't just call Swap(&other) here because it would perform 3 copies if // the two fields are on different arenas. if (this != &other) { if (GetOwningArena() != other.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE || GetOwningArena() == nullptr #endif // !PROTOBUF_FORCE_COPY_IN_MOVE ) { CopyFrom(other); } else { InternalSwap(&other); } } return *this; }
O0
c
google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::operator=(google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) cmpq 0x18(%rsp), %rax je 0x211a06 movq 0x10(%rsp), %rdi callq 0x211950 movq %rax, 0x8(%rsp) jmp 0x2119c0 movq 0x18(%rsp), %rdi callq 0x211950 movq %rax, (%rsp) jmp 0x2119d0 movq 0x8(%rsp), %rax movq (%rsp), %rcx cmpq %rcx, %rax je 0x2119f1 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x2118b0 jmp 0x2119ef jmp 0x211a04 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x211960 jmp 0x211a02 jmp 0x211a04 jmp 0x211a06 movq 0x10(%rsp), %rax addq $0x28, %rsp retq movq %rax, %rdi callq 0x29080 nopl (%rax,%rax)
_ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSEOS8_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax cmp rax, [rsp+28h+var_10] jz short loc_211A06 mov rdi, [rsp+28h+var_18] call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14GetOwningArenaEv; google::protobuf::RepeatedPtrField<std::string>::GetOwningArena(void) mov [rsp+28h+var_20], rax jmp short $+2 loc_2119C0: mov rdi, [rsp+28h+var_10] call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE14GetOwningArenaEv; google::protobuf::RepeatedPtrField<std::string>::GetOwningArena(void) mov [rsp+28h+var_28], rax jmp short $+2 loc_2119D0: mov rax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_28] cmp rax, rcx jz short loc_2119F1 mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_10] call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE8CopyFromERKS8_; google::protobuf::RepeatedPtrField<std::string>::CopyFrom(google::protobuf::RepeatedPtrField<std::string> const&) jmp short $+2 loc_2119EF: jmp short loc_211A04 loc_2119F1: mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_10] call _ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12InternalSwapEPS8_; google::protobuf::RepeatedPtrField<std::string>::InternalSwap(google::protobuf::RepeatedPtrField<std::string>*) jmp short $+2 loc_211A02: jmp short $+2 loc_211A04: jmp short $+2 loc_211A06: mov rax, [rsp+28h+var_18] add rsp, 28h retn mov rdi, rax call __clang_call_terminate
google::protobuf::internal::RepeatedPtrFieldBase * google::protobuf::RepeatedPtrField<std::string>::operator=( google::protobuf::internal::RepeatedPtrFieldBase *a1, google::protobuf::internal::RepeatedPtrFieldBase *a2) { long long OwningArena; // [rsp+8h] [rbp-20h] if ( a1 != a2 ) { OwningArena = google::protobuf::RepeatedPtrField<std::string>::GetOwningArena(a1); if ( OwningArena == google::protobuf::RepeatedPtrField<std::string>::GetOwningArena(a2) ) google::protobuf::RepeatedPtrField<std::string>::InternalSwap(a1, a2); else google::protobuf::RepeatedPtrField<std::string>::CopyFrom((long long)a1, (long long)a2); } return a1; }
_Hashtable_alloc: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x002119d0 POP RAX RET
/* std::__detail::_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor const* const, unsigned long>, false> > >::_Hashtable_alloc() */ _Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor_const*const,unsigned_long>,false>>> * __thiscall std::__detail:: _Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor_const*const,unsigned_long>,false>>> ::_Hashtable_alloc(_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor_const*const,unsigned_long>,false>>> *this) { _Hashtable_ebo_helper<0,std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor_const*const,unsigned_long>,false>>,true> ::_Hashtable_ebo_helper ((_Hashtable_ebo_helper<0,std::allocator<std::__detail::_Hash_node<std::pair<google::protobuf::FieldDescriptor_const*const,unsigned_long>,false>>,true> *)this); return this; }
14,932
minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
TemplateNode(const Location & location) : location_(location) {}
O1
cpp
minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&): leaq 0x796e1(%rip), %rax # 0xddfe8 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x64938 movq 0x7a66f(%rip), %r8 # 0xdef98 cmpb $0x0, (%r8) je 0x64934 incl 0x8(%rax) jmp 0x64938 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0x79bd1(%rip), %rax # 0xde518 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movq %rax, 0x38(%rdi) movups (%rcx), %xmm0 movq %rax, 0x8(%rcx) movups %xmm0, 0x30(%rdi) movq %rax, (%rcx) retq nop
_ZN5minja10FilterNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12TemplateNodeEE: lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_64938 mov r8, cs:__libc_single_threaded_ptr cmp byte ptr [r8], 0 jz short loc_64934 inc dword ptr [rax+8] jmp short loc_64938 loc_64934: lock inc dword ptr [rax+8] loc_64938: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja10FilterNodeE; `vtable for'minja::FilterNode add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax mov [rdi+38h], rax movups xmm0, xmmword ptr [rcx] mov [rcx+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [rcx], rax retn
long long minja::FilterNode::FilterNode(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long v4; // rax long long result; // rax __int128 v6; // xmm0 __int128 v7; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v4 = a2[1]; *(_QWORD *)(a1 + 16) = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v4 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v4 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::FilterNode + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v6 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v6; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a4 = 0LL; return result; }
FilterNode: LEA RAX,[0x1ddfe8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x00164938 MOV R8,qword ptr [0x001def98] CMP byte ptr [R8],0x0 JZ 0x00164934 INC dword ptr [RAX + 0x8] JMP 0x00164938 LAB_00164934: INC.LOCK dword ptr [RAX + 0x8] LAB_00164938: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x1de518] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RCX],RAX RET
/* minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::FilterNode::FilterNode (FilterNode *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_001ddff8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001def98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_001de528; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)param_3 = 0; return; }
14,933
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x5c8b0 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x5c8b0 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x5c8a0 movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_5C8B0 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_5C8B0 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_5C8A0: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_5C8A0 loc_5C8B0: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x0015c8b0 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x0015c8b0 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_0015c8a0: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x0015c8a0 LAB_0015c8b0: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
14,934
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
monkey531[P]llama/common/minja.hpp
std::vector<std::string> consumeTokenGroups(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); std::vector<std::string> ret; for (size_t i = 0, n = match.size(); i < n; ++i) { ret.push_back(match[i].str()); } return ret; } it = start; return {}; }
O3
cpp
minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0x40c26 xorps %xmm0, %xmm0 movq %rsp, %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movq %r15, %rcx xorl %r8d, %r8d callq 0x5f1be testb %al, %al je 0x34a5a movq 0x18(%rsp), %rdx movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %r15 subq %rax, %r15 je 0x34a41 movq (%rax), %rdi cmpq $0x48, %r15 jne 0x34a52 cmpq %rdx, %rdi jne 0x34a5a jmp 0x34a48 cmpq %rdx, -0x48(%rax,%r15) jne 0x34a5a leaq (%rax,%r15), %rsi addq $-0x48, %rsi jmp 0x34a94 movq %rax, %rsi cmpq %rdx, %rdi je 0x34a94 movq %r12, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rdi testq %rdi, %rdi je 0x34a82 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a740 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsi), %rdi subq %rdx, %rdi xorl %edx, %edx cmpb $0x0, 0x10(%rsi) cmovneq %rdi, %rdx addq %rdx, 0x20(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) cmpq %rcx, %rax je 0x34a6c sarq $0x3, %r15 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r15 addq $-0x3, %r15 je 0x34a6c leaq 0x38(%rsp), %r13 xorl %ebp, %ebp leaq 0x28(%rsp), %r14 xorl %r12d, %r12d movq (%rsp), %rax movq 0x8(%rsp), %rcx subq %rax, %rcx je 0x34b14 movq %rcx, %rdx sarq $0x3, %rdx movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB imulq %rsi, %rdx addq $-0x3, %rdx cmpq %r12, %rdx jbe 0x34b14 addq %rbp, %rax jmp 0x34b1b addq %rcx, %rax addq $-0x48, %rax cmpb $0x1, 0x10(%rax) jne 0x34b37 movq (%rax), %rsi movq 0x8(%rax), %rdx movq %r13, 0x28(%rsp) movq %r14, %rdi callq 0x61208 jmp 0x34b4a movq %r13, 0x28(%rsp) movq $0x0, 0x30(%rsp) movb $0x0, 0x38(%rsp) movq %rbx, %rdi movq %r14, %rsi callq 0x81216 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x34b6c movq 0x38(%rsp), %rsi incq %rsi callq 0x1a740 incq %r12 addq $0x18, %rbp cmpq %r12, %r15 jne 0x34ae3 jmp 0x34a6c movq %rax, %r14 jmp 0x34bad movq %rax, %r14 jmp 0x34ba5 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x34ba5 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a740 movq %rbx, %rdi callq 0x29eb6 movq (%rsp), %rdi testq %rdi, %rdi je 0x34bc3 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1a740 movq %r14, %rdi callq 0x1ad30 nop
_ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 mov rdx, rsp movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov rcx, r15 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz short loc_34A5A mov rdx, [rsp+78h+var_60] mov rax, [rsp+78h+var_78] mov rcx, [rsp+78h+var_70] mov r15, rcx sub r15, rax jz short loc_34A41 mov rdi, [rax] cmp r15, 48h ; 'H' jnz short loc_34A52 cmp rdi, rdx jnz short loc_34A5A jmp short loc_34A48 loc_34A41: cmp [rax+r15-48h], rdx jnz short loc_34A5A loc_34A48: lea rsi, [rax+r15] add rsi, 0FFFFFFFFFFFFFFB8h jmp short loc_34A94 loc_34A52: mov rsi, rax cmp rdi, rdx jz short loc_34A94 loc_34A5A: mov [r14+20h], r12 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_34A6C: mov rdi, [rsp+78h+var_78]; void * test rdi, rdi jz short loc_34A82 mov rsi, [rsp+78h+var_68] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34A82: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_34A94: mov rdi, [rsi+8] sub rdi, rdx xor edx, edx cmp byte ptr [rsi+10h], 0 cmovnz rdx, rdi add [r14+20h], rdx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 cmp rax, rcx jz short loc_34A6C sar r15, 3 mov rax, 0AAAAAAAAAAAAAAABh imul r15, rax add r15, 0FFFFFFFFFFFFFFFDh jz short loc_34A6C lea r13, [rsp+78h+var_40] xor ebp, ebp lea r14, [rsp+78h+var_50] xor r12d, r12d loc_34AE3: mov rax, [rsp+78h+var_78] mov rcx, [rsp+78h+var_70] sub rcx, rax jz short loc_34B14 mov rdx, rcx sar rdx, 3 mov rsi, 0AAAAAAAAAAAAAAABh imul rdx, rsi add rdx, 0FFFFFFFFFFFFFFFDh cmp rdx, r12 jbe short loc_34B14 add rax, rbp jmp short loc_34B1B loc_34B14: add rax, rcx add rax, 0FFFFFFFFFFFFFFB8h loc_34B1B: cmp byte ptr [rax+10h], 1 jnz short loc_34B37 mov rsi, [rax] mov rdx, [rax+8] mov [rsp+78h+var_50], r13 mov rdi, r14 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) jmp short loc_34B4A loc_34B37: mov [rsp+78h+var_50], r13 mov [rsp+78h+var_48], 0 mov byte ptr [rsp+78h+var_40], 0 loc_34B4A: mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_34B6C mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34B6C: inc r12 add rbp, 18h cmp r15, r12 jnz loc_34AE3 jmp loc_34A6C mov r14, rax jmp short loc_34BAD mov r14, rax jmp short loc_34BA5 mov r14, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_34BA5 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34BA5: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_34BAD: mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_34BC3 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34BC3: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::consumeTokenGroups(long long a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // r15 long long v10; // rdi long long v11; // rsi long long v13; // rdx unsigned long long v14; // r15 long long v15; // rbp unsigned long long i; // r12 long long v17; // rax long long v18; // rsi long long v19; // rdx __int128 v20; // [rsp+0h] [rbp-78h] BYREF __int128 v21; // [rsp+10h] [rbp-68h] void *v22[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v23[8]; // [rsp+38h] [rbp-40h] BYREF v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v21 = 0LL; v20 = 0LL; if ( !(unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( *(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 24), &v20, a3, 0LL) ) goto LABEL_9; v8 = v20; v9 = *((_QWORD *)&v20 + 1) - v20; if ( *((_QWORD *)&v20 + 1) != (_QWORD)v20 ) { v10 = *(_QWORD *)v20; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v21 + 1) ) goto LABEL_7; } else { v11 = v20; if ( v10 == *((_QWORD *)&v21 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v20 + 1) - 72LL) != *((_QWORD *)&v21 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v20 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v21 + 1); *(_QWORD *)(a2 + 32) += v13; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; if ( (_QWORD)v8 != *((_QWORD *)&v8 + 1) ) { v14 = 0xAAAAAAAAAAAAAAABLL * (v9 >> 3) - 3; if ( v14 ) { v15 = 0LL; for ( i = 0LL; i != v14; ++i ) { if ( *((_QWORD *)&v20 + 1) == (_QWORD)v20 || 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v20 + 1) - v20) >> 3) - 3 <= i ) { v17 = *((_QWORD *)&v20 + 1) - 72LL; } else { v17 = v15 + v20; } if ( *(_BYTE *)(v17 + 16) == 1 ) { v18 = *(_QWORD *)v17; v19 = *(_QWORD *)(v17 + 8); v22[0] = v23; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(v22, v18, v19); } else { v22[0] = v23; v22[1] = 0LL; LOBYTE(v23[0]) = 0; } std::vector<std::string>::emplace_back<std::string>(a1, v22); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); v15 += 24LL; } } } LABEL_10: if ( (_QWORD)v20 ) operator delete((void *)v20, v21 - v20); return a1; }
consumeTokenGroups: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x00140c26 XORPS XMM0,XMM0 MOV RDX,RSP MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_00134a0c: MOV RCX,R15 XOR R8D,R8D CALL 0x0015f1be TEST AL,AL JZ 0x00134a5a MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV R15,RCX SUB R15,RAX JZ 0x00134a41 MOV RDI,qword ptr [RAX] CMP R15,0x48 JNZ 0x00134a52 CMP RDI,RDX JNZ 0x00134a5a JMP 0x00134a48 LAB_00134a41: CMP qword ptr [RAX + R15*0x1 + -0x48],RDX JNZ 0x00134a5a LAB_00134a48: LEA RSI,[RAX + R15*0x1] ADD RSI,-0x48 JMP 0x00134a94 LAB_00134a52: MOV RSI,RAX CMP RDI,RDX JZ 0x00134a94 LAB_00134a5a: MOV qword ptr [R14 + 0x20],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_00134a6c: MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x00134a82 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x0011a740 LAB_00134a82: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00134a94: MOV RDI,qword ptr [RSI + 0x8] SUB RDI,RDX XOR EDX,EDX CMP byte ptr [RSI + 0x10],0x0 CMOVNZ RDX,RDI ADD qword ptr [R14 + 0x20],RDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 CMP RAX,RCX JZ 0x00134a6c SAR R15,0x3 MOV RAX,-0x5555555555555555 IMUL R15,RAX ADD R15,-0x3 JZ 0x00134a6c LEA R13,[RSP + 0x38] XOR EBP,EBP LEA R14,[RSP + 0x28] XOR R12D,R12D LAB_00134ae3: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] SUB RCX,RAX JZ 0x00134b14 MOV RDX,RCX SAR RDX,0x3 MOV RSI,-0x5555555555555555 IMUL RDX,RSI ADD RDX,-0x3 CMP RDX,R12 JBE 0x00134b14 ADD RAX,RBP JMP 0x00134b1b LAB_00134b14: ADD RAX,RCX ADD RAX,-0x48 LAB_00134b1b: CMP byte ptr [RAX + 0x10],0x1 JNZ 0x00134b37 MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],R13 LAB_00134b2d: MOV RDI,R14 CALL 0x00161208 JMP 0x00134b4a LAB_00134b37: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x30],0x0 MOV byte ptr [RSP + 0x38],0x0 LAB_00134b4a: MOV RDI,RBX MOV RSI,R14 CALL 0x00181216 LAB_00134b55: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00134b6c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a740 LAB_00134b6c: INC R12 ADD RBP,0x18 CMP R15,R12 JNZ 0x00134ae3 JMP 0x00134a6c
/* minja::Parser::consumeTokenGroups(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> * minja::Parser::consumeTokenGroups (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1, Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; long lVar2; bool bVar3; int8 *puVar4; long lVar5; long lVar6; long *plVar7; ulong uVar8; long lVar9; long *local_78; long *plStack_70; long local_68; long lStack_60; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_68 = 0; lStack_60 = 0; local_78 = (long *)0x0; plStack_70 = (long *)0x0; /* try { // try from 00134a0c to 00134a16 has its CatchHandler @ 00134b81 */ bVar3 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_78, param_3,0); if (bVar3) { lVar9 = (long)plStack_70 - (long)local_78; if (lVar9 == 0) { lVar6 = local_78[-9]; joined_r0x00134a46: if (lVar6 != lStack_60) goto LAB_00134a5a; plVar7 = (long *)((long)local_78 + lVar9 + -0x48); } else { lVar6 = *local_78; if (lVar9 == 0x48) goto joined_r0x00134a46; plVar7 = local_78; if (lVar6 != lStack_60) goto LAB_00134a5a; } lVar6 = 0; if ((char)plVar7[2] != '\0') { lVar6 = plVar7[1] - lStack_60; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar6; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; if ((local_78 != plStack_70) && (lVar9 = (lVar9 >> 3) * -0x5555555555555555, lVar9 != 3)) { lVar6 = 0; uVar8 = 0; do { lVar5 = (long)plStack_70 - (long)local_78; if ((lVar5 == 0) || (lVar2 = lVar6, (lVar5 >> 3) * -0x5555555555555555 - 3U <= uVar8)) { lVar2 = lVar5 + -0x48; } puVar4 = (int8 *)((long)local_78 + lVar2); local_50 = &local_40; if (*(char *)(puVar4 + 2) == '\x01') { /* try { // try from 00134b2d to 00134b34 has its CatchHandler @ 00134b86 */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> ((string *)&local_50,*puVar4,puVar4[1]); } else { local_48 = 0; local_40 = 0; } /* try { // try from 00134b4a to 00134b54 has its CatchHandler @ 00134b8b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(param_1,(string *)&local_50); if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } uVar8 = uVar8 + 1; lVar6 = lVar6 + 0x18; } while (lVar9 - 3U != uVar8); } } else { LAB_00134a5a: *(int8 *)(param_2 + 0x20) = uVar1; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; } if (local_78 != (long *)0x0) { operator_delete(local_78,local_68 - (long)local_78); } return param_1; }
14,935
my_fill_mb2
eloqsql/strings/ctype-ucs2.c
static void my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10], *last; size_t buflen, remainder; DBUG_ASSERT((slen % 2) == 0); buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); /* "last" in the last position where a sequence of "buflen" bytes can start. */ for (last= s + slen - buflen; s <= last; s+= buflen) { /* Enough space for the character */ memcpy(s, buf, buflen); } /* If there are some more space which is not enough for the whole multibyte character, then add trailing zeros. */ if ((remainder= last + buflen - s) > 0) bzero(s, (size_t) remainder); }
O0
c
my_fill_mb2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movq %rdx, -0x30(%rbp) movl %ecx, -0x34(%rbp) jmp 0xaaa06 movq -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x20(%rbp), %rdi movslq -0x34(%rbp), %rsi leaq -0x12(%rbp), %rdx leaq -0x12(%rbp), %rcx addq $0xa, %rcx callq *%rax cltq movq %rax, -0x48(%rbp) jmp 0xaaa33 movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax xorl %ecx, %ecx subq -0x48(%rbp), %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0xaaa71 movq -0x28(%rbp), %rdi leaq -0x12(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0x360b0 movq -0x48(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xaaa48 movq -0x40(%rbp), %rax addq -0x48(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x50(%rbp) cmpq $0x0, %rax jbe 0xaaa99 movq -0x28(%rbp), %rdi movq -0x50(%rbp), %rdx xorl %esi, %esi callq 0x362e0 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xaaab1 addq $0x50, %rsp popq %rbp retq callq 0x362a0 nopw %cs:(%rax,%rax)
my_fill_mb2: push rbp mov rbp, rsp sub rsp, 50h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_30], rdx mov [rbp+var_34], ecx jmp short $+2 loc_AAA06: mov rax, [rbp+var_20] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_20] movsxd rsi, [rbp+var_34] lea rdx, [rbp+var_12] lea rcx, [rbp+var_12] add rcx, 0Ah call rax cdqe mov [rbp+var_48], rax jmp short $+2 loc_AAA33: mov rax, [rbp+var_28] add rax, [rbp+var_30] xor ecx, ecx sub rcx, [rbp+var_48] add rax, rcx mov [rbp+var_40], rax loc_AAA48: mov rax, [rbp+var_28] cmp rax, [rbp+var_40] ja short loc_AAA71 mov rdi, [rbp+var_28] lea rsi, [rbp+var_12] mov rdx, [rbp+var_48] call _memcpy mov rax, [rbp+var_48] add rax, [rbp+var_28] mov [rbp+var_28], rax jmp short loc_AAA48 loc_AAA71: mov rax, [rbp+var_40] add rax, [rbp+var_48] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_50], rax cmp rax, 0 jbe short loc_AAA99 mov rdi, [rbp+var_28] mov rdx, [rbp+var_50] xor esi, esi call _memset loc_AAA99: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_AAAB1 add rsp, 50h pop rbp retn loc_AAAB1: call ___stack_chk_fail
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4) { long long i; // [rsp+8h] [rbp-48h] unsigned long long v7; // [rsp+28h] [rbp-28h] _BYTE v8[10]; // [rsp+3Eh] [rbp-12h] BYREF unsigned long long v9; // [rsp+48h] [rbp-8h] BYREF v9 = __readfsqword(0x28u); v7 = a2; for ( i = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a4, v8, &v9); v7 <= a3 + a2 - i; v7 += i ) memcpy(v7, v8, i); if ( a3 + a2 != v7 ) memset(v7, 0LL, a3 + a2 - v7); return __readfsqword(0x28u); }
my_fill_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV qword ptr [RBP + -0x30],RDX MOV dword ptr [RBP + -0x34],ECX JMP 0x001aaa06 LAB_001aaa06: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x20] MOVSXD RSI,dword ptr [RBP + -0x34] LEA RDX,[RBP + -0x12] LEA RCX,[RBP + -0x12] ADD RCX,0xa CALL RAX CDQE MOV qword ptr [RBP + -0x48],RAX JMP 0x001aaa33 LAB_001aaa33: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x48] ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_001aaa48: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x40] JA 0x001aaa71 MOV RDI,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x12] MOV RDX,qword ptr [RBP + -0x48] CALL 0x001360b0 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX JMP 0x001aaa48 LAB_001aaa71: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JBE 0x001aaa99 MOV RDI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x50] XOR ESI,ESI CALL 0x001362e0 LAB_001aaa99: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001aaab1 ADD RSP,0x50 POP RBP RET LAB_001aaab1: CALL 0x001362a0
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4) { int iVar1; size_t sVar2; void *pvVar3; long in_FS_OFFSET; void *local_30; int1 local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_1a); sVar2 = (size_t)iVar1; pvVar3 = (void *)((long)param_2 + (param_3 - sVar2)); for (local_30 = param_2; local_30 <= pvVar3; local_30 = (void *)(sVar2 + (long)local_30)) { memcpy(local_30,local_1a,sVar2); } sVar2 = (long)pvVar3 + (sVar2 - (long)local_30); if (sVar2 != 0) { memset(local_30,0,sVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,936
my_fill_mb2
eloqsql/strings/ctype-ucs2.c
static void my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill) { char buf[10], *last; size_t buflen, remainder; DBUG_ASSERT((slen % 2) == 0); buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf, (uchar*) buf + sizeof(buf)); DBUG_ASSERT(buflen > 0); /* "last" in the last position where a sequence of "buflen" bytes can start. */ for (last= s + slen - buflen; s <= last; s+= buflen) { /* Enough space for the character */ memcpy(s, buf, buflen); } /* If there are some more space which is not enough for the whole multibyte character, then add trailing zeros. */ if ((remainder= last + buflen - s) > 0) bzero(s, (size_t) remainder); }
O3
c
my_fill_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0xb8(%rdi), %rax movslq %ecx, %rsi leaq -0x30(%rbp), %rcx leaq -0x3a(%rbp), %rdx callq *0x30(%rax) movslq %eax, %r15 addq %r14, %rbx movq %rbx, %r13 subq %r15, %r13 cmpq %r14, %r13 jb 0x7de03 leaq -0x3a(%rbp), %r12 movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x360b0 addq %r15, %r14 cmpq %r13, %r14 jbe 0x7dded subq %r14, %rbx je 0x7de15 movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x36300 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x7de33 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x362b0
my_fill_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdx mov r14, rsi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi+0B8h] movsxd rsi, ecx lea rcx, [rbp+var_30] lea rdx, [rbp+var_3A] call qword ptr [rax+30h] movsxd r15, eax add rbx, r14 mov r13, rbx sub r13, r15 cmp r13, r14 jb short loc_7DE03 lea r12, [rbp+var_3A] loc_7DDED: mov rdi, r14 mov rsi, r12 mov rdx, r15 call _memcpy add r14, r15 cmp r14, r13 jbe short loc_7DDED loc_7DE03: sub rbx, r14 jz short loc_7DE15 mov rdi, r14 xor esi, esi mov rdx, rbx call _memset loc_7DE15: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_7DE33 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7DE33: call ___stack_chk_fail
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4) { unsigned long long v5; // r14 long long v6; // r15 long long v7; // rbx long long v8; // rbx _BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF v5 = a2; v11[0] = __readfsqword(0x28u); v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a4, v10, v11); v7 = a2 + a3; if ( v7 - v6 >= a2 ) { do { memcpy(v5, v10, v6); v5 += v6; } while ( v5 <= v7 - v6 ); } v8 = v7 - v5; if ( v8 ) memset(v5, 0LL, v8); return __readfsqword(0x28u); }
my_fill_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI + 0xb8] MOVSXD RSI,ECX LEA RCX,[RBP + -0x30] LEA RDX,[RBP + -0x3a] CALL qword ptr [RAX + 0x30] MOVSXD R15,EAX ADD RBX,R14 MOV R13,RBX SUB R13,R15 CMP R13,R14 JC 0x0017de03 LEA R12,[RBP + -0x3a] LAB_0017dded: MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x001360b0 ADD R14,R15 CMP R14,R13 JBE 0x0017dded LAB_0017de03: SUB RBX,R14 JZ 0x0017de15 MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX CALL 0x00136300 LAB_0017de15: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0017de33 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017de33: CALL 0x001362b0
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4) { int iVar1; void *pvVar2; void *__dest; size_t sVar3; long in_FS_OFFSET; int1 local_42 [10]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38); sVar3 = (size_t)iVar1; pvVar2 = (void *)((long)param_2 + (param_3 - sVar3)); __dest = param_2; if (param_2 <= pvVar2) { do { memcpy(__dest,local_42,sVar3); __dest = (void *)((long)__dest + sVar3); } while (__dest <= pvVar2); } sVar3 = (long)param_2 + (param_3 - (long)__dest); if (sVar3 != 0) { memset(__dest,0,sVar3); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,937
ma_alloc_buffer
eloqsql/storage/maria/ma_open.c
my_bool _ma_alloc_buffer(uchar **old_addr, size_t *old_size, size_t new_size, myf flag) { if (*old_size < new_size) { uchar *addr; if (!(addr= (uchar*) my_realloc(PSI_INSTRUMENT_ME, *old_addr, new_size, MYF(MY_ALLOW_ZERO_PTR | flag)))) return 1; *old_addr= addr; *old_size= new_size; } return 0; }
O0
c
ma_alloc_buffer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax cmpq -0x20(%rbp), %rax jae 0x8fde5 movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx orq $0x40, %rcx xorl %edi, %edi callq 0xf39c0 movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x8fdcf movb $0x1, -0x1(%rbp) jmp 0x8fde9 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_alloc_buffer: push rbp mov rbp, rsp sub rsp, 30h 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] mov rax, [rax] cmp rax, [rbp+var_20] jnb short loc_8FDE5 mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] or rcx, 40h xor edi, edi call my_realloc mov [rbp+var_30], rax cmp rax, 0 jnz short loc_8FDCF mov [rbp+var_1], 1 jmp short loc_8FDE9 loc_8FDCF: mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax], rcx loc_8FDE5: mov [rbp+var_1], 0 loc_8FDE9: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char ma_alloc_buffer(long long *a1, unsigned long long *a2, unsigned long long a3, long long a4) { long long v5; // [rsp+0h] [rbp-30h] if ( *a2 >= a3 ) return 0; v5 = my_realloc(0LL, *a1, a3, a4 | 0x40); if ( v5 ) { *a1 = v5; *a2 = a3; return 0; } return 1; }
_ma_alloc_buffer: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0018fde5 MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] OR RCX,0x40 XOR EDI,EDI CALL 0x001f39c0 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x0018fdcf MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018fde9 LAB_0018fdcf: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX LAB_0018fde5: MOV byte ptr [RBP + -0x1],0x0 LAB_0018fde9: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 _ma_alloc_buffer(long *param_1,ulong *param_2,ulong param_3,ulong param_4) { long lVar1; if (*param_2 < param_3) { lVar1 = my_realloc(0,*param_1,param_3,param_4 | 0x40); if (lVar1 == 0) { return 1; } *param_1 = lVar1; *param_2 = param_3; } return 0; }
14,938
js_os_run_timers
bluesky950520[P]quickjs/quickjs-libc.c
static int js_os_run_timers(JSRuntime *rt, JSContext *ctx, JSThreadState *ts, int *min_delay) { JSValue func; JSOSTimer *th; int64_t cur_time, delay; struct list_head *el; int r; if (list_empty(&ts->os_timers)) { *min_delay = -1; return 0; } cur_time = js__hrtime_ms(); *min_delay = INT32_MAX; list_for_each(el, &ts->os_timers) { th = list_entry(el, JSOSTimer, link); delay = th->timeout - cur_time; if (delay > 0) { *min_delay = min_int(*min_delay, delay); } else { *min_delay = 0; func = JS_DupValueRT(rt, th->func); if (th->repeats) th->timeout = cur_time + th->delay; else free_timer(rt, th); r = call_handler(ctx, func); JS_FreeValueRT(rt, func); return r; } } return 0; }
O0
c
js_os_run_timers: subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x50(%rsp) movq 0x58(%rsp), %rdi addq $0x20, %rdi callq 0x16440 cmpl $0x0, %eax je 0x1c693 movq 0x50(%rsp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl $0x0, 0x74(%rsp) jmp 0x1c7dc callq 0x1bb80 movq %rax, 0x30(%rsp) movq 0x50(%rsp), %rax movl $0x7fffffff, (%rax) # imm = 0x7FFFFFFF movq 0x58(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq 0x58(%rsp), %rcx addq $0x20, %rcx cmpq %rcx, %rax je 0x1c7d4 movq 0x20(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq 0x20(%rax), %rax subq 0x30(%rsp), %rax movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jle 0x1c713 movq 0x50(%rsp), %rax movl (%rax), %edi movq 0x28(%rsp), %rax movl %eax, %esi callq 0x1cba0 movl %eax, %ecx movq 0x50(%rsp), %rax movl %ecx, (%rax) jmp 0x1c7bf movq 0x50(%rsp), %rax movl $0x0, (%rax) movq 0x68(%rsp), %rdi movq 0x38(%rsp), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x20450 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x38(%rsp), %rax movb 0x18(%rax), %al andb $0x1, %al cmpb $0x0, %al je 0x1c77a movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax addq 0x28(%rax), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x20(%rax) jmp 0x1c789 movq 0x68(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x103f0 movq 0x60(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x1c4c0 movl %eax, 0x1c(%rsp) movq 0x68(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x22a50 movl 0x1c(%rsp), %eax movl %eax, 0x74(%rsp) jmp 0x1c7dc jmp 0x1c7c1 movq 0x20(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x20(%rsp) jmp 0x1c6b6 movl $0x0, 0x74(%rsp) movl 0x74(%rsp), %eax addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
js_os_run_timers: sub rsp, 78h mov [rsp+78h+var_10], rdi mov [rsp+78h+var_18], rsi mov [rsp+78h+var_20], rdx mov [rsp+78h+var_28], rcx mov rdi, [rsp+78h+var_20] add rdi, 20h ; ' ' call list_empty cmp eax, 0 jz short loc_1C693 mov rax, [rsp+78h+var_28] mov dword ptr [rax], 0FFFFFFFFh mov [rsp+78h+var_4], 0 jmp loc_1C7DC loc_1C693: call js__hrtime_ms mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_28] mov dword ptr [rax], 7FFFFFFFh mov rax, [rsp+78h+var_20] mov rax, [rax+28h] mov [rsp+78h+var_58], rax loc_1C6B6: mov rax, [rsp+78h+var_58] mov rcx, [rsp+78h+var_20] add rcx, 20h ; ' ' cmp rax, rcx jz loc_1C7D4 mov rax, [rsp+78h+var_58] mov [rsp+78h+var_40], rax mov rax, [rsp+78h+var_40] mov rax, [rax+20h] sub rax, [rsp+78h+var_48] mov [rsp+78h+var_50], rax cmp [rsp+78h+var_50], 0 jle short loc_1C713 mov rax, [rsp+78h+var_28] mov edi, [rax] mov rax, [rsp+78h+var_50] mov esi, eax call min_int mov ecx, eax mov rax, [rsp+78h+var_28] mov [rax], ecx jmp loc_1C7BF loc_1C713: mov rax, [rsp+78h+var_28] mov dword ptr [rax], 0 mov rdi, [rsp+78h+var_10] mov rax, [rsp+78h+var_40] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_DupValueRT mov [rsp+78h+var_70], rax mov [rsp+78h+var_68], rdx mov rax, [rsp+78h+var_70] mov [rsp+78h+var_38], rax mov rax, [rsp+78h+var_68] mov [rsp+78h+var_30], rax mov rax, [rsp+78h+var_40] mov al, [rax+18h] and al, 1 cmp al, 0 jz short loc_1C77A mov rcx, [rsp+78h+var_48] mov rax, [rsp+78h+var_40] add rcx, [rax+28h] mov rax, [rsp+78h+var_40] mov [rax+20h], rcx jmp short loc_1C789 loc_1C77A: mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_40] call free_timer loc_1C789: mov rdi, [rsp+78h+var_18] mov rsi, [rsp+78h+var_38] mov rdx, [rsp+78h+var_30] call call_handler mov [rsp+78h+var_5C], eax mov rdi, [rsp+78h+var_10] mov rsi, [rsp+78h+var_38] mov rdx, [rsp+78h+var_30] call JS_FreeValueRT mov eax, [rsp+78h+var_5C] mov [rsp+78h+var_4], eax jmp short loc_1C7DC loc_1C7BF: jmp short $+2 loc_1C7C1: mov rax, [rsp+78h+var_58] mov rax, [rax+8] mov [rsp+78h+var_58], rax jmp loc_1C6B6 loc_1C7D4: mov [rsp+78h+var_4], 0 loc_1C7DC: mov eax, [rsp+78h+var_4] add rsp, 78h retn
long long js_os_run_timers(long long a1, long long a2, long long a3, _DWORD *a4) { long long v4; // rdi long long v5; // rdx long long v7; // [rsp+8h] [rbp-70h] unsigned int v8; // [rsp+1Ch] [rbp-5Ch] long long i; // [rsp+20h] [rbp-58h] long long v10; // [rsp+28h] [rbp-50h] unsigned long long v11; // [rsp+30h] [rbp-48h] long long v12; // [rsp+48h] [rbp-30h] v4 = a3 + 32; if ( list_empty(a3 + 32) ) { *a4 = -1; return 0; } else { v11 = js__hrtime_ms(v4); *a4 = 0x7FFFFFFF; for ( i = *(_QWORD *)(a3 + 40); ; i = *(_QWORD *)(i + 8) ) { if ( i == a3 + 32 ) return 0; v10 = *(_QWORD *)(i + 32) - v11; if ( v10 <= 0 ) break; *a4 = min_int((unsigned int)*a4, (unsigned int)v10); } *a4 = 0; v7 = JS_DupValueRT(a1, *(_QWORD *)(i + 48), *(_QWORD *)(i + 56)); v12 = v5; if ( (*(_BYTE *)(i + 24) & 1) != 0 ) *(_QWORD *)(i + 32) = *(_QWORD *)(i + 40) + v11; else free_timer(a1, i); v8 = call_handler(a2, v7, v12); JS_FreeValueRT(a1, v7, v12); return v8; } }
js_os_run_timers: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x50],RCX MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x20 CALL 0x00116440 CMP EAX,0x0 JZ 0x0011c693 MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RAX],0xffffffff MOV dword ptr [RSP + 0x74],0x0 JMP 0x0011c7dc LAB_0011c693: CALL 0x0011bb80 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RAX],0x7fffffff MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x20],RAX LAB_0011c6b6: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x58] ADD RCX,0x20 CMP RAX,RCX JZ 0x0011c7d4 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x20] SUB RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JLE 0x0011c713 MOV RAX,qword ptr [RSP + 0x50] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x28] MOV ESI,EAX CALL 0x0011cba0 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RAX],ECX JMP 0x0011c7bf LAB_0011c713: MOV RAX,qword ptr [RSP + 0x50] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x00120450 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x38] MOV AL,byte ptr [RAX + 0x18] AND AL,0x1 CMP AL,0x0 JZ 0x0011c77a MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] ADD RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x20],RCX JMP 0x0011c789 LAB_0011c77a: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x38] CALL 0x001103f0 LAB_0011c789: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x0011c4c0 MOV dword ptr [RSP + 0x1c],EAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00122a50 MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x74],EAX JMP 0x0011c7dc LAB_0011c7bf: JMP 0x0011c7c1 LAB_0011c7c1: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RAX JMP 0x0011c6b6 LAB_0011c7d4: MOV dword ptr [RSP + 0x74],0x0 LAB_0011c7dc: MOV EAX,dword ptr [RSP + 0x74] ADD RSP,0x78 RET
int4 js_os_run_timers(int8 param_1,int8 param_2,long param_3,int4 *param_4) { int iVar1; int4 uVar2; long lVar3; ulong uVar4; int1 auVar5 [16]; long local_58; iVar1 = list_empty(param_3 + 0x20); if (iVar1 == 0) { lVar3 = js__hrtime_ms(); *param_4 = 0x7fffffff; for (local_58 = *(long *)(param_3 + 0x28); local_58 != param_3 + 0x20; local_58 = *(long *)(local_58 + 8)) { uVar4 = *(long *)(local_58 + 0x20) - lVar3; if ((long)uVar4 < 1) { *param_4 = 0; auVar5 = JS_DupValueRT(param_1,*(int8 *)(local_58 + 0x30), *(int8 *)(local_58 + 0x38)); if ((*(byte *)(local_58 + 0x18) & 1) == 0) { free_timer(param_1,local_58); } else { *(long *)(local_58 + 0x20) = lVar3 + *(long *)(local_58 + 0x28); } uVar2 = call_handler(param_2,auVar5._0_8_,auVar5._8_8_); JS_FreeValueRT(param_1,auVar5._0_8_,auVar5._8_8_); return uVar2; } uVar2 = min_int(*param_4,uVar4 & 0xffffffff); *param_4 = uVar2; } } else { *param_4 = 0xffffffff; } return 0; }
14,939
testing::operator<<(std::ostream&, testing::TestPartResult const&)
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-test-part.cc
std::ostream& operator<<(std::ostream& os, const TestPartResult& result) { return os << internal::FormatFileLocation(result.file_name(), result.line_number()) << " " << (result.type() == TestPartResult::kSuccess ? "Success" : result.type() == TestPartResult::kSkip ? "Skipped" : result.type() == TestPartResult::kFatalFailure ? "Fatal failure" : "Non-fatal failure") << ":\n" << result.message() << std::endl; }
O2
cpp
testing::operator<<(std::ostream&, testing::TestPartResult const&): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x10(%rsi), %rsi testq %rsi, %rsi je 0x12ef2 movq 0x8(%rbx), %rsi movl 0x28(%rbx), %edx movq %rsp, %r15 movq %r15, %rdi callq 0x11bec movq %r14, %rdi movq %r15, %rsi callq 0x8450 leaq 0x20ca3(%rip), %rsi # 0x33bb5 movq %rax, %rdi callq 0x84c0 movl (%rbx), %ecx testl %ecx, %ecx je 0x12f2e cmpl $0x3, %ecx jne 0x12f37 leaq 0x20678(%rip), %rsi # 0x335a4 jmp 0x12f4c leaq 0x20667(%rip), %rsi # 0x3359c jmp 0x12f4c cmpl $0x2, %ecx leaq 0x2066b(%rip), %rcx # 0x335ac leaq 0x20672(%rip), %rsi # 0x335ba cmoveq %rcx, %rsi movq %rax, %rdi callq 0x84c0 leaq 0x202dd(%rip), %rsi # 0x33238 movq %rax, %rdi callq 0x84c0 movq 0x50(%rbx), %rsi movq %rax, %rdi callq 0x84c0 movq %rax, %rdi callq 0x8250 movq %rax, %rbx movq %rsp, %rdi callq 0x8ad8 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x8ad8 movq %rbx, %rdi callq 0x89a0
_ZN7testinglsERSoRKNS_14TestPartResultE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rsi mov r14, rdi mov rsi, [rsi+10h] test rsi, rsi jz short loc_12EF2 mov rsi, [rbx+8] loc_12EF2: mov edx, [rbx+28h] mov r15, rsp mov rdi, r15 call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int) mov rdi, r14 mov rsi, r15 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, asc_33BB3+2; " " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov ecx, [rbx] test ecx, ecx jz short loc_12F2E cmp ecx, 3 jnz short loc_12F37 lea rsi, aSkipped; "Skipped" jmp short loc_12F4C loc_12F2E: lea rsi, aSuccess; "Success" jmp short loc_12F4C loc_12F37: cmp ecx, 2 lea rcx, aFatalFailure; "Fatal failure" lea rsi, aNonFatalFailur; "Non-fatal failure" cmovz rsi, rcx loc_12F4C: mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aResultDiedButN_0+30h; ":\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [rbx+50h] mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long testing::operator<<(long long a1, int *a2) { const char *v3; // rsi long long v4; // rax long long v5; // rax int v6; // ecx const char *v7; // rsi long long v8; // rax long long v9; // rax long long v10; // rsi long long v11; // rax long long v12; // rdx long long v13; // rcx long long v14; // rbx _BYTE v16[56]; // [rsp+0h] [rbp-38h] BYREF v3 = (const char *)*((_QWORD *)a2 + 2); if ( v3 ) v3 = (const char *)*((_QWORD *)a2 + 1); testing::internal::FormatFileLocation[abi:cxx11]((long long)v16, v3, a2[10]); v4 = std::operator<<<char>(a1, v16); v5 = std::operator<<<std::char_traits<char>>(v4, " "); v6 = *a2; if ( *a2 ) { if ( v6 == 3 ) { v7 = "Skipped"; } else { v7 = "Non-fatal failure"; if ( v6 == 2 ) v7 = "Fatal failure"; } } else { v7 = "Success"; } v8 = std::operator<<<std::char_traits<char>>(v5, v7); v9 = std::operator<<<std::char_traits<char>>(v8, ":\n"); v10 = *((_QWORD *)a2 + 10); v11 = std::operator<<<std::char_traits<char>>(v9, v10); v14 = std::endl<char,std::char_traits<char>>(v11, v10, v12, v13); std::string::~string(v16); return v14; }
operator<<: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RSI + 0x10] TEST RSI,RSI JZ 0x00112ef2 MOV RSI,qword ptr [RBX + 0x8] LAB_00112ef2: MOV EDX,dword ptr [RBX + 0x28] MOV R15,RSP MOV RDI,R15 CALL 0x00111bec LAB_00112f00: MOV RDI,R14 MOV RSI,R15 CALL 0x00108450 LEA RSI,[0x133bb5] MOV RDI,RAX CALL 0x001084c0 MOV ECX,dword ptr [RBX] TEST ECX,ECX JZ 0x00112f2e CMP ECX,0x3 JNZ 0x00112f37 LEA RSI,[0x1335a4] JMP 0x00112f4c LAB_00112f2e: LEA RSI,[0x13359c] JMP 0x00112f4c LAB_00112f37: CMP ECX,0x2 LEA RCX,[0x1335ac] LEA RSI,[0x1335ba] CMOVZ RSI,RCX LAB_00112f4c: MOV RDI,RAX CALL 0x001084c0 LEA RSI,[0x133238] MOV RDI,RAX CALL 0x001084c0 MOV RSI,qword ptr [RBX + 0x50] MOV RDI,RAX CALL 0x001084c0 MOV RDI,RAX CALL 0x00108250 LAB_00112f77: MOV RBX,RAX MOV RDI,RSP CALL 0x00108ad8 MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* testing::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, testing::TestPartResult const&) */ ostream * testing::operator<<(ostream *param_1,TestPartResult *param_2) { int iVar1; ostream *poVar2; char *pcVar3; internal aiStack_38 [32]; pcVar3 = *(char **)(param_2 + 0x10); if (pcVar3 != (char *)0x0) { pcVar3 = *(char **)(param_2 + 8); } internal::FormatFileLocation_abi_cxx11_(aiStack_38,pcVar3,*(int *)(param_2 + 0x28)); /* try { // try from 00112f00 to 00112f76 has its CatchHandler @ 00112f8f */ poVar2 = std::operator<<(param_1,(string *)aiStack_38); poVar2 = std::operator<<(poVar2," "); iVar1 = *(int *)param_2; if (iVar1 == 0) { pcVar3 = "Success"; } else if (iVar1 == 3) { pcVar3 = "Skipped"; } else { pcVar3 = "Non-fatal failure"; if (iVar1 == 2) { pcVar3 = "Fatal failure"; } } poVar2 = std::operator<<(poVar2,pcVar3); poVar2 = std::operator<<(poVar2,":\n"); poVar2 = std::operator<<(poVar2,*(char **)(param_2 + 0x50)); poVar2 = std::endl<char,std::char_traits<char>>(poVar2); std::__cxx11::string::~string((string *)aiStack_38); return poVar2; }
14,940
mysql_stmt_next_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { int rc= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (!mysql_stmt_more_results(stmt)) return(-1); if (stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE) madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA); stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE; if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT) stmt->mysql->status= MYSQL_STATUS_STMT_RESULT; if (stmt->mysql->field_count) rc= madb_alloc_stmt_fields(stmt); else { stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.last_insert_id= stmt->mysql->insert_id; stmt->upsert_status.server_status= stmt->mysql->server_status; stmt->upsert_status.warning_count= stmt->mysql->warning_count; } stmt->field_count= stmt->mysql->field_count; stmt->result.rows= 0; return(rc); }
O0
c
mysql_stmt_next_result: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x30f6f jmp 0x30f00 movq -0x10(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x34260(%rip), %rax # 0x65180 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x34246(%rip), %rax # 0x65190 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3126a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jae 0x31067 jmp 0x30f7f movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x7de, 0x90(%rax) # imm = 0x7DE movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x341d9(%rip), %rax # 0x65180 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x341b7(%rip), %rax # 0x65190 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) jmp 0x30ff8 movq -0x10(%rbp), %rax movl $0x7de, 0x108(%rax) # imm = 0x7DE movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x34168(%rip), %rax # 0x65180 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3414e(%rip), %rax # 0x65190 movq 0x70(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3126a movq -0x10(%rbp), %rdi callq 0x308a0 cmpb $0x0, %al jne 0x31080 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x3126a movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jbe 0x310a2 movq -0x10(%rbp), %rax cmpl $0x6, 0x50(%rax) jae 0x310a2 movq -0x10(%rbp), %rdi movl $0xb, %esi callq 0x2e360 movq -0x10(%rbp), %rax movl $0x3, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x21930 cmpl $0x0, %eax je 0x3119a movq -0x10(%rbp), %rax movl $0x6, 0x50(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x10(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x3114b movq -0x10(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x28(%rbp) jmp 0x31171 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x34027(%rip), %rax # 0x65190 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movl $0x1, -0x4(%rbp) jmp 0x3126a movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x1, 0x488(%rax) jne 0x311bd movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x8, 0x488(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x37c(%rax) je 0x311dc movq -0x10(%rbp), %rdi callq 0x31280 movl %eax, -0x14(%rbp) jmp 0x31240 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x338(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xf8(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x340(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x100(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf4(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x388(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf0(%rax) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x37c(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x10(%rbp), %rax movq $0x0, 0xc8(%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_next_result: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_30F6F jmp short $+2 loc_30F00: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3126A loc_30F6F: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jnb loc_31067 jmp short $+2 loc_30F7F: mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+90h], 7DEh mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_10] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 jmp short $+2 loc_30FF8: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DEh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+70h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3126A loc_31067: mov rdi, [rbp+var_10] call mysql_stmt_more_results cmp al, 0 jnz short loc_31080 mov [rbp+var_4], 0FFFFFFFFh jmp loc_3126A loc_31080: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jbe short loc_310A2 mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 6 jnb short loc_310A2 mov rdi, [rbp+var_10] mov esi, 0Bh call madb_reset_stmt loc_310A2: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 3 mov rax, [rbp+var_10] mov rdi, [rax+38h] call mysql_next_result cmp eax, 0 jz loc_3119A mov rax, [rbp+var_10] mov dword ptr [rax+50h], 6 mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_10] mov [rax+108h], ecx mov rdi, [rbp+var_10] add rdi, 30Dh mov rax, [rbp+var_10] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_10] add rax, 10Ch mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_3114B mov rax, [rbp+var_10] mov rax, [rax+38h] add rax, 97h mov [rbp+var_28], rax jmp short loc_31171 loc_3114B: mov rax, [rbp+var_10] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_28], rax loc_31171: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_4], 1 jmp loc_3126A loc_3119A: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+488h], 1 jnz short loc_311BD mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+488h], 8 loc_311BD: mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+37Ch], 0 jz short loc_311DC mov rdi, [rbp+var_10] call madb_alloc_stmt_fields mov [rbp+var_14], eax jmp short loc_31240 loc_311DC: mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+338h] mov rax, [rbp+var_10] mov [rax+0F8h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov rcx, [rax+340h] mov rax, [rbp+var_10] mov [rax+100h], rcx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+380h] mov rax, [rbp+var_10] mov [rax+0F4h], ecx mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+388h] mov rax, [rbp+var_10] mov [rax+0F0h], ecx loc_31240: mov rax, [rbp+var_10] mov rax, [rax+38h] mov ecx, [rax+37Ch] mov rax, [rbp+var_10] mov [rax+60h], ecx mov rax, [rbp+var_10] mov qword ptr [rax+0C8h], 0 mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_3126A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_next_result(long long a1) { char *v1; // rax unsigned int v3; // [rsp+1Ch] [rbp-14h] v3 = 0; if ( *(_QWORD *)(a1 + 56) ) { if ( *(_DWORD *)(a1 + 80) >= 2u ) { if ( mysql_stmt_more_results(a1) ) { if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(a1 + 80) < 6u ) madb_reset_stmt(a1, 11); *(_DWORD *)(a1 + 80) = 3; if ( (unsigned int)mysql_next_result(*(_QWORD *)(a1 + 56)) ) { *(_DWORD *)(a1 + 80) = 6; *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v1 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v1 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v1, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } else { if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) == 1 ) *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 8; if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL) ) { v3 = madb_alloc_stmt_fields(a1); } else { *(_QWORD *)(a1 + 248) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 824LL); *(_QWORD *)(a1 + 256) = *(_QWORD *)(*(_QWORD *)(a1 + 56) + 832LL); *(_DWORD *)(a1 + 244) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL); *(_DWORD *)(a1 + 240) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 904LL); } *(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL); *(_QWORD *)(a1 + 200) = 0LL; return v3; } } else { return (unsigned int)-1; } } else { *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 2014; strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0; *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[14], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_next_result: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00130f6f JMP 0x00130f00 LAB_00130f00: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x165180] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x165190] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013126a LAB_00130f6f: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JNC 0x00131067 JMP 0x00130f7f LAB_00130f7f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7de MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x165180] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x165190] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 JMP 0x00130ff8 LAB_00130ff8: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7de MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x165180] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x165190] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x200 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013126a LAB_00131067: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001308a0 CMP AL,0x0 JNZ 0x00131080 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0013126a LAB_00131080: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JBE 0x001310a2 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x6 JNC 0x001310a2 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xb CALL 0x0012e360 LAB_001310a2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x3 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00121930 CMP EAX,0x0 JZ 0x0013119a MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x10c MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x0013114b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x28],RAX JMP 0x00131171 LAB_0013114b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x165190] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX LAB_00131171: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x200 CALL 0x00113220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013126a LAB_0013119a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x1 JNZ 0x001311bd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x8 LAB_001311bd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x37c],0x0 JZ 0x001311dc MOV RDI,qword ptr [RBP + -0x10] CALL 0x00131280 MOV dword ptr [RBP + -0x14],EAX JMP 0x00131240 LAB_001311dc: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x338] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xf8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x340] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x100],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x388] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf0],ECX LAB_00131240: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x37c] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc8],0x0 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0013126a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_next_result(long param_1) { char cVar1; int iVar2; char *local_30; int4 local_1c; int4 local_c; local_1c = 0; if (*(long *)(param_1 + 0x38) == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_001651f8,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else if (*(uint *)(param_1 + 0x50) < 2) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_00165200,0x1ff); *(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0; *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00165200,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } else { cVar1 = mysql_stmt_more_results(param_1); if (cVar1 == '\0') { local_c = 0xffffffff; } else { if ((2 < *(uint *)(param_1 + 0x50)) && (*(uint *)(param_1 + 0x50) < 6)) { madb_reset_stmt(param_1,0xb); } *(int4 *)(param_1 + 0x50) = 3; iVar2 = mysql_next_result(*(int8 *)(param_1 + 0x38)); if (iVar2 == 0) { if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) == 1) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 8; } if (*(int *)(*(long *)(param_1 + 0x38) + 0x37c) == 0) { *(int8 *)(param_1 + 0xf8) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(*(long *)(param_1 + 0x38) + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x388); } else { local_1c = madb_alloc_stmt_fields(param_1); } *(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c); *(int8 *)(param_1 + 200) = 0; local_c = local_1c; } else { *(int4 *)(param_1 + 0x50) = 6; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_30 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_30 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_30,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_c = 1; } } } return local_c; }
14,941
my_casedn_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_casedn_utf32(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((res= my_utf32_uni(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) { my_tolower_utf32(uni_plane,&wc); if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O0
c
my_casedn_utf32: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x50(%rbp) jmp 0x64732 jmp 0x64734 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x64520 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x647a8 movq -0x50(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x68880 movl -0x34(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0x64550 movl %eax, %ecx movl -0x54(%rbp), %eax cmpl %ecx, %eax je 0x64784 jmp 0x647a8 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x34(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x64734 movq -0x18(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_casedn_utf32: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_50], rax jmp short $+2 loc_64732: jmp short $+2 loc_64734: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf32_uni mov [rbp+var_34], eax cmp eax, 0 jle short loc_647A8 mov rdi, [rbp+var_50] lea rsi, [rbp+var_30] call my_tolower_utf32 mov eax, [rbp+var_34] mov [rbp+var_54], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_uni_utf32 mov ecx, eax mov eax, [rbp+var_54] cmp eax, ecx jz short loc_64784 jmp short loc_647A8 loc_64784: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp short loc_64734 loc_647A8: mov rax, [rbp+var_18] add rsp, 60h pop rbp retn
long long my_casedn_utf32(long long a1, long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { long long v7; // [rsp+10h] [rbp-50h] unsigned long long v8; // [rsp+18h] [rbp-48h] long long v9; // [rsp+20h] [rbp-40h] int v10; // [rsp+2Ch] [rbp-34h] unsigned long long v11[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] long long v15; // [rsp+58h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11[1] = a5; v9 = a3 + a2; v8 = (unsigned long long)&a4[a5]; v7 = *(_QWORD *)(a1 + 120); while ( 1 ) { v10 = my_utf32_uni(v15, (long long)v11, v14, v9, a5, a6); if ( v10 <= 0 ) break; my_tolower_utf32(v7, v11); if ( v10 != (unsigned int)my_uni_utf32(v15, v11[0], v12, v8) ) break; v14 += v10; v12 += v10; } return v13; }
my_casedn_utf32: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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 + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x50],RAX JMP 0x00164732 LAB_00164732: JMP 0x00164734 LAB_00164734: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00164520 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001647a8 MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x30] CALL 0x00168880 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x00164550 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x54] CMP EAX,ECX JZ 0x00164784 JMP 0x001647a8 LAB_00164784: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00164734 LAB_001647a8: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x60 POP RBP RET
long my_casedn_utf32(long param_1,long param_2,long param_3,long param_4,long param_5) { int8 uVar1; int iVar2; int iVar3; int8 local_38; long local_30; long local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3); if (iVar2 < 1) { return local_20; } my_tolower_utf32(uVar1,&local_38); iVar3 = my_uni_utf32(local_10,local_38,local_28,param_4 + param_5); if (iVar2 != iVar3) break; local_18 = local_18 + iVar2; local_28 = local_28 + iVar2; } return local_20; }
14,942
flush_cached_blocks
eloqsql/storage/maria/ma_pagecache.c
static int flush_cached_blocks(PAGECACHE *pagecache, PAGECACHE_FILE *file, PAGECACHE_BLOCK_LINK **cache, PAGECACHE_BLOCK_LINK **end, enum flush_type type, int *first_errno) { int rc= PCFLUSH_OK; my_bool error; uint count= (uint) (end-cache); DBUG_ENTER("flush_cached_blocks"); *first_errno= 0; /* Don't lock the cache during the flush */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); /* As all blocks referred in 'cache' are marked by PCBLOCK_IN_FLUSH we are guaranteed that no thread will change them */ qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link); pagecache_pthread_mutex_lock(&pagecache->cache_lock); for (; cache != end; cache++) { PAGECACHE_BLOCK_LINK *block= *cache; /* In the case of non_transactional tables we want to flush also block pinned with reads. This is becasue we may have other threads reading the block during flush, as non transactional tables can have many readers while the one writer is doing the flush. We don't want to do flush pinned blocks during checkpoint. We detect the checkpoint case by checking if type is LAZY. */ if ((type == FLUSH_KEEP_LAZY && block->pins) || block->wlocks) { KEYCACHE_DBUG_PRINT("flush_cached_blocks", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /* undo the mark put by flush_pagecache_blocks_int(): */ block->status&= ~PCBLOCK_IN_FLUSH; rc|= PCFLUSH_PINNED; DBUG_PRINT("warning", ("Page pinned")); unreg_request(pagecache, block, 1); if (!*first_errno) *first_errno= HA_ERR_INTERNAL_ERROR; continue; } if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ, PAGECACHE_PIN, FALSE)) DBUG_ASSERT(0); KEYCACHE_PRINT("flush_cached_blocks", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /** @todo IO If page is contiguous with next page to flush, group flushes in one single my_pwrite(). */ /** It is important to use block->hash_link->file below and not 'file', as the first one is right and the second may have different out-of-date content (see StaleFilePointersInFlush in ma_checkpoint.c). @todo change argument of functions to be File. */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); error= pagecache_fwrite(pagecache, &block->hash_link->file, block->buffer, block->hash_link->pageno, block->type, pagecache->readwrite_flags); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, FALSE)) DBUG_ASSERT(0); pagecache->global_cache_write++; if (error) { block->status|= PCBLOCK_ERROR; block->error= (int16) my_errno; my_debug_put_break_here(); if (!*first_errno) *first_errno= my_errno ? my_errno : -1; rc|= PCFLUSH_ERROR; } /* Let to proceed for possible waiting requests to write to the block page. It might happen only during an operation to resize the key cache. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); /* type will never be FLUSH_IGNORE_CHANGED here */ if (! (type == FLUSH_KEEP || type == FLUSH_KEEP_LAZY || type == FLUSH_FORCE_WRITE)) { if (!free_block(pagecache, block, 1)) { pagecache->blocks_changed--; pagecache->global_blocks_changed--; } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); } } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); unreg_request(pagecache, block, 1); } } DBUG_RETURN(rc); }
O3
c
flush_cached_blocks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r14 movl %r8d, -0x2c(%rbp) movq %rdx, %r12 movq %rsi, -0x38(%rbp) movq %rdi, %r13 movq %rcx, -0x48(%rbp) movq %rcx, %rbx subq %rdx, %rbx shrq $0x3, %rbx movl $0x0, (%r9) leaq 0xc8(%rdi), %r15 movq 0x108(%rdi), %rdi testq %rdi, %rdi jne 0x3f35d movq %r15, %rdi callq 0x291c0 movl %ebx, %esi leaq 0x258(%rip), %rcx # 0x3f38b movl $0x8, %edx movq %r12, %rdi callq 0x295c0 cmpq $0x0, 0x108(%r13) jne 0x3f372 movq %r15, %rdi callq 0x29200 cmpq -0x48(%rbp), %r12 movl -0x2c(%rbp), %eax je 0x3f348 movq %r15, -0x50(%rbp) xorl %r15d, %r15d movq %r14, -0x40(%rbp) movq (%r12), %rbx cmpl $0x4, %eax jne 0x3f17d cmpl $0x0, 0x64(%rbx) jne 0x3f183 cmpl $0x0, 0x68(%rbx) je 0x3f1b1 andb $-0x11, 0x74(%rbx) orl $0x2, %r15d movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3c003 cmpl $0x0, (%r14) jne 0x3f2cc movl $0x7a, (%r14) jmp 0x3f2cc movl %r15d, -0x30(%rbp) movq %r13, %rdi movq %rbx, %rsi movl $0x3, %edx movl $0x2, %ecx callq 0x3be93 movq 0x108(%r13), %rdi testq %rdi, %rdi jne 0x3f31a movq -0x50(%rbp), %r15 movq %r15, %rdi callq 0x291c0 movq 0x20(%rbx), %rsi movq 0x30(%rbx), %rdx movq 0x60(%rsi), %rcx addq $0x18, %rsi movq 0x198(%r13), %r8 movq %r13, %rdi callq 0x3e014 movl %eax, %r14d cmpq $0x0, 0x108(%r13) jne 0x3f32f movq %r15, %rdi callq 0x29200 movq %r13, %rdi movq %rbx, %rsi movl $0x5, %edx movl $0x3, %ecx callq 0x3be93 incq 0x178(%r13) testb %r14b, %r14b movl -0x30(%rbp), %r15d je 0x3f270 orb $0x1, 0x74(%rbx) callq 0xa2f56 movzwl (%rax), %eax movw %ax, 0x76(%rbx) movq -0x40(%rbp), %r14 cmpl $0x0, (%r14) jne 0x3f27e callq 0xa2f56 cmpl $0x0, (%rax) je 0x3f276 callq 0xa2f56 movl (%rax), %eax jmp 0x3f27b movq -0x40(%rbp), %r14 jmp 0x3f282 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, (%r14) orl $0x1, %r15d cmpq $0x0, 0x50(%rbx) je 0x3f292 leaq 0x50(%rbx), %rdi callq 0xa7b17 movl -0x2c(%rbp), %eax cmpl $0x4, %eax ja 0x3f2df movl $0x19, %ecx btl %eax, %ecx jae 0x3f2df andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x3ed8e movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3c003 movl -0x2c(%rbp), %eax addq $0x8, %r12 cmpq -0x48(%rbp), %r12 jne 0x3f16e jmp 0x3f34b movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3ebb5 testb %al, %al je 0x3f30d andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x3ed8e jmp 0x3f2cc decq 0x58(%r13) decq 0x168(%r13) jmp 0x3f2cc leaq 0x348cef(%rip), %rax # 0x388010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3f1da movq %r15, %rdi leaq 0x9c75b(%rip), %rsi # 0xdba94 movl $0x12dd, %edx # imm = 0x12DD callq 0x2eb7f jmp 0x3f21e xorl %r15d, %r15d movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x348cac(%rip), %rax # 0x388010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3f122 leaq 0x9c71b(%rip), %rsi # 0xdba94 movq %r15, %rdi movl $0x12a3, %edx # imm = 0x12A3 callq 0x2eb7f jmp 0x3f156
flush_cached_blocks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r9 mov [rbp+var_2C], r8d mov r12, rdx mov [rbp+var_38], rsi mov r13, rdi mov [rbp+var_48], rcx mov rbx, rcx sub rbx, rdx shr rbx, 3 mov dword ptr [r9], 0 lea r15, [rdi+0C8h] mov rdi, [rdi+108h] test rdi, rdi jnz loc_3F35D loc_3F122: mov rdi, r15 call _pthread_mutex_unlock mov esi, ebx lea rcx, cmp_sec_link mov edx, 8 mov rdi, r12 call _qsort cmp qword ptr [r13+108h], 0 jnz loc_3F372 mov rdi, r15 call _pthread_mutex_lock loc_3F156: cmp r12, [rbp+var_48] mov eax, [rbp+var_2C] jz loc_3F348 mov [rbp+var_50], r15 xor r15d, r15d mov [rbp+var_40], r14 loc_3F16E: mov rbx, [r12] cmp eax, 4 jnz short loc_3F17D cmp dword ptr [rbx+64h], 0 jnz short loc_3F183 loc_3F17D: cmp dword ptr [rbx+68h], 0 jz short loc_3F1B1 loc_3F183: and byte ptr [rbx+74h], 0EFh or r15d, 2 mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request cmp dword ptr [r14], 0 jnz loc_3F2CC mov dword ptr [r14], 7Ah ; 'z' jmp loc_3F2CC loc_3F1B1: mov [rbp+var_30], r15d mov rdi, r13 mov rsi, rbx mov edx, 3 mov ecx, 2 call make_lock_and_pin mov rdi, [r13+108h] test rdi, rdi jnz loc_3F31A loc_3F1DA: mov r15, [rbp+var_50] mov rdi, r15 call _pthread_mutex_unlock mov rsi, [rbx+20h] mov rdx, [rbx+30h] mov rcx, [rsi+60h] add rsi, 18h mov r8, [r13+198h] mov rdi, r13 call pagecache_fwrite mov r14d, eax cmp qword ptr [r13+108h], 0 jnz loc_3F32F mov rdi, r15 call _pthread_mutex_lock loc_3F21E: mov rdi, r13 mov rsi, rbx mov edx, 5 mov ecx, 3 call make_lock_and_pin inc qword ptr [r13+178h] test r14b, r14b mov r15d, [rbp+var_30] jz short loc_3F270 or byte ptr [rbx+74h], 1 call _my_thread_var movzx eax, word ptr [rax] mov [rbx+76h], ax mov r14, [rbp+var_40] cmp dword ptr [r14], 0 jnz short loc_3F27E call _my_thread_var cmp dword ptr [rax], 0 jz short loc_3F276 call _my_thread_var mov eax, [rax] jmp short loc_3F27B loc_3F270: mov r14, [rbp+var_40] jmp short loc_3F282 loc_3F276: mov eax, 0FFFFFFFFh loc_3F27B: mov [r14], eax loc_3F27E: or r15d, 1 loc_3F282: cmp qword ptr [rbx+50h], 0 jz short loc_3F292 lea rdi, [rbx+50h] call wqueue_release_queue loc_3F292: mov eax, [rbp+var_2C] cmp eax, 4 ja short loc_3F2DF mov ecx, 19h bt ecx, eax jnb short loc_3F2DF and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request loc_3F2CC: mov eax, [rbp+var_2C] add r12, 8 cmp r12, [rbp+var_48] jnz loc_3F16E jmp short loc_3F34B loc_3F2DF: mov rdi, r13 mov rsi, rbx mov edx, 1 call free_block test al, al jz short loc_3F30D and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list jmp short loc_3F2CC loc_3F30D: dec qword ptr [r13+58h] dec qword ptr [r13+168h] jmp short loc_3F2CC loc_3F31A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3F1DA loc_3F32F: mov rdi, r15 lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12DDh call psi_mutex_lock jmp loc_3F21E loc_3F348: xor r15d, r15d loc_3F34B: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3F35D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3F122 loc_3F372: lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 12A3h call psi_mutex_lock jmp loc_3F156
long long flush_cached_blocks(_QWORD *a1, long long a2, long long *a3, long long *a4, unsigned int a5, int *a6) { int *v6; // r14 long long *v7; // r12 unsigned long long v8; // rbx long long v9; // r15 unsigned int v10; // eax unsigned int v11; // r15d long long v12; // rbx char v13; // r14 int v14; // eax int v15; // ecx long long v17; // [rsp+0h] [rbp-50h] int *v19; // [rsp+10h] [rbp-40h] v6 = a6; v7 = a3; v8 = (unsigned long long)((char *)a4 - (char *)a3) >> 3; *a6 = 0; v9 = (long long)(a1 + 25); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v9); qsort(v7, (unsigned int)v8, 8LL, cmp_sec_link); if ( a1[33] ) psi_mutex_lock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12A3u); else pthread_mutex_lock(v9); v10 = a5; if ( v7 == a4 ) { return 0; } else { v17 = (long long)(a1 + 25); v11 = 0; v19 = v6; do { v12 = *v7; if ( v10 == 4 && *(_DWORD *)(v12 + 100) || *(_DWORD *)(v12 + 104) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; v11 |= 2u; unreg_request(a1, v12, 1); if ( !*v6 ) *v6 = 122; } else { make_lock_and_pin((long long)a1, v12, 3, 2); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v17); v13 = pagecache_fwrite( (long long)a1, *(_QWORD *)(v12 + 32) + 24LL, *(_QWORD *)(v12 + 48), *(_QWORD *)(*(_QWORD *)(v12 + 32) + 96LL), a1[51]); if ( a1[33] ) psi_mutex_lock(v17, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12DDu); else pthread_mutex_lock(v17); make_lock_and_pin((long long)a1, v12, 5, 3); ++a1[47]; if ( v13 ) { *(_BYTE *)(v12 + 116) |= 1u; *(_WORD *)(v12 + 118) = *(_WORD *)my_thread_var(a1); v6 = v19; if ( !*v19 ) { if ( *(_DWORD *)my_thread_var(a1) ) v14 = *(_DWORD *)my_thread_var(a1); else v14 = -1; *v19 = v14; } v11 |= 1u; } else { v6 = v19; } if ( *(_QWORD *)(v12 + 80) ) wqueue_release_queue(v12 + 80); if ( a5 <= 4 && (v15 = 25, _bittest(&v15, a5)) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); unreg_request(a1, v12, 1); } else if ( (unsigned __int8)free_block(a1, v12, 1) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); } else { --a1[11]; --a1[45]; } } v10 = a5; ++v7; } while ( v7 != a4 ); } return v11; }
flush_cached_blocks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R9 MOV dword ptr [RBP + -0x2c],R8D MOV R12,RDX MOV qword ptr [RBP + -0x38],RSI MOV R13,RDI MOV qword ptr [RBP + -0x48],RCX MOV RBX,RCX SUB RBX,RDX SHR RBX,0x3 MOV dword ptr [R9],0x0 LEA R15,[RDI + 0xc8] MOV RDI,qword ptr [RDI + 0x108] TEST RDI,RDI JNZ 0x0013f35d LAB_0013f122: MOV RDI,R15 CALL 0x001291c0 MOV ESI,EBX LEA RCX,[0x13f38b] MOV EDX,0x8 MOV RDI,R12 CALL 0x001295c0 CMP qword ptr [R13 + 0x108],0x0 JNZ 0x0013f372 MOV RDI,R15 CALL 0x00129200 LAB_0013f156: CMP R12,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x2c] JZ 0x0013f348 MOV qword ptr [RBP + -0x50],R15 XOR R15D,R15D MOV qword ptr [RBP + -0x40],R14 LAB_0013f16e: MOV RBX,qword ptr [R12] CMP EAX,0x4 JNZ 0x0013f17d CMP dword ptr [RBX + 0x64],0x0 JNZ 0x0013f183 LAB_0013f17d: CMP dword ptr [RBX + 0x68],0x0 JZ 0x0013f1b1 LAB_0013f183: AND byte ptr [RBX + 0x74],0xef OR R15D,0x2 MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013c003 CMP dword ptr [R14],0x0 JNZ 0x0013f2cc MOV dword ptr [R14],0x7a JMP 0x0013f2cc LAB_0013f1b1: MOV dword ptr [RBP + -0x30],R15D MOV RDI,R13 MOV RSI,RBX MOV EDX,0x3 MOV ECX,0x2 CALL 0x0013be93 MOV RDI,qword ptr [R13 + 0x108] TEST RDI,RDI JNZ 0x0013f31a LAB_0013f1da: MOV R15,qword ptr [RBP + -0x50] MOV RDI,R15 CALL 0x001291c0 MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RSI + 0x60] ADD RSI,0x18 MOV R8,qword ptr [R13 + 0x198] MOV RDI,R13 CALL 0x0013e014 MOV R14D,EAX CMP qword ptr [R13 + 0x108],0x0 JNZ 0x0013f32f MOV RDI,R15 CALL 0x00129200 LAB_0013f21e: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x5 MOV ECX,0x3 CALL 0x0013be93 INC qword ptr [R13 + 0x178] TEST R14B,R14B MOV R15D,dword ptr [RBP + -0x30] JZ 0x0013f270 OR byte ptr [RBX + 0x74],0x1 CALL 0x001a2f56 MOVZX EAX,word ptr [RAX] MOV word ptr [RBX + 0x76],AX MOV R14,qword ptr [RBP + -0x40] CMP dword ptr [R14],0x0 JNZ 0x0013f27e CALL 0x001a2f56 CMP dword ptr [RAX],0x0 JZ 0x0013f276 CALL 0x001a2f56 MOV EAX,dword ptr [RAX] JMP 0x0013f27b LAB_0013f270: MOV R14,qword ptr [RBP + -0x40] JMP 0x0013f282 LAB_0013f276: MOV EAX,0xffffffff LAB_0013f27b: MOV dword ptr [R14],EAX LAB_0013f27e: OR R15D,0x1 LAB_0013f282: CMP qword ptr [RBX + 0x50],0x0 JZ 0x0013f292 LEA RDI,[RBX + 0x50] CALL 0x001a7b17 LAB_0013f292: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,0x4 JA 0x0013f2df MOV ECX,0x19 BT ECX,EAX JNC 0x0013f2df AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x0013ed8e MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013c003 LAB_0013f2cc: MOV EAX,dword ptr [RBP + -0x2c] ADD R12,0x8 CMP R12,qword ptr [RBP + -0x48] JNZ 0x0013f16e JMP 0x0013f34b LAB_0013f2df: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013ebb5 TEST AL,AL JZ 0x0013f30d AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x0013ed8e JMP 0x0013f2cc LAB_0013f30d: DEC qword ptr [R13 + 0x58] DEC qword ptr [R13 + 0x168] JMP 0x0013f2cc LAB_0013f31a: LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013f1da LAB_0013f32f: MOV RDI,R15 LEA RSI,[0x1dba94] MOV EDX,0x12dd CALL 0x0012eb7f JMP 0x0013f21e LAB_0013f348: XOR R15D,R15D LAB_0013f34b: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013f35d: LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013f122 LAB_0013f372: LEA RSI,[0x1dba94] MOV RDI,R15 MOV EDX,0x12a3 CALL 0x0012eb7f JMP 0x0013f156
uint flush_cached_blocks(long param_1,int8 param_2,long *param_3,long *param_4,uint param_5, int *param_6) { pthread_mutex_t *__mutex; long lVar1; char cVar2; int iVar3; int2 *puVar4; int *piVar5; uint uVar6; *param_6 = 0; __mutex = (pthread_mutex_t *)(param_1 + 200); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); qsort(param_3,(ulong)((long)param_4 - (long)param_3) >> 3 & 0xffffffff,8,cmp_sec_link); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12a3); } if (param_3 == param_4) { uVar6 = 0; } else { uVar6 = 0; do { lVar1 = *param_3; if (((param_5 == 4) && (*(int *)(lVar1 + 100) != 0)) || (*(int *)(lVar1 + 0x68) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; uVar6 = uVar6 | 2; unreg_request(param_1,lVar1,1); if (*param_6 == 0) { *param_6 = 0x7a; } } else { make_lock_and_pin(param_1,lVar1,3,2); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); cVar2 = pagecache_fwrite(param_1,*(long *)(lVar1 + 0x20) + 0x18, *(int8 *)(lVar1 + 0x30), *(int8 *)(*(long *)(lVar1 + 0x20) + 0x60), *(int8 *)(param_1 + 0x198)); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12dd); } make_lock_and_pin(param_1,lVar1,5,3); *(long *)(param_1 + 0x178) = *(long *)(param_1 + 0x178) + 1; if (cVar2 != '\0') { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) | 1; puVar4 = (int2 *)_my_thread_var(); *(int2 *)(lVar1 + 0x76) = *puVar4; if (*param_6 == 0) { piVar5 = (int *)_my_thread_var(); if (*piVar5 == 0) { iVar3 = -1; } else { piVar5 = (int *)_my_thread_var(); iVar3 = *piVar5; } *param_6 = iVar3; } uVar6 = uVar6 | 1; } if (*(long *)(lVar1 + 0x50) != 0) { wqueue_release_queue(lVar1 + 0x50); } if ((param_5 < 5) && ((0x19U >> (param_5 & 0x1f) & 1) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); unreg_request(param_1,lVar1,1); } else { cVar2 = free_block(param_1,lVar1,1); if (cVar2 == '\0') { *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1; } else { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); } } } param_3 = param_3 + 1; } while (param_3 != param_4); } return uVar6; }
14,943
js_ecvt
bluesky950520[P]quickjs/quickjs.c
static int js_ecvt(double d, int n_digits, char dest[minimum_length(JS_ECVT_BUF_SIZE)], size_t size, int *decpt) { if (n_digits == 0) { /* find the minimum number of digits (XXX: inefficient but simple) */ // TODO(chqrlie) use direct method from quickjs-printf unsigned int n_digits_min = 1; unsigned int n_digits_max = 17; for (;;) { n_digits = (n_digits_min + n_digits_max) / 2; js_ecvt1(d, n_digits, dest, size, decpt); if (n_digits_min == n_digits_max) return n_digits; /* dest contents: 0: first digit 1: '.' decimal point (locale specific) 2..n_digits: (n_digits-1) additional digits n_digits+1: 'e' exponent mark n_digits+2..: exponent sign, value and null terminator */ if (strtod(dest, NULL) == d) { unsigned int n0 = n_digits; /* enough digits */ /* strip the trailing zeros */ while (dest[n_digits] == '0') n_digits--; if (n_digits == n_digits_min) return n_digits; /* done if trailing zeros and not denormal or huge */ if (n_digits < n0 && d > 3e-308 && d < 8e307) return n_digits; n_digits_max = n_digits; } else { /* need at least one more digit */ n_digits_min = n_digits + 1; } } } else { #if defined(FE_DOWNWARD) && defined(FE_TONEAREST) int i; /* generate 2 extra digits: 99% chances to avoid 2 calls */ js_ecvt1(d, n_digits + 2, dest, size, decpt); if (dest[n_digits + 1] < '5') return n_digits; /* truncate the 2 extra digits */ if (dest[n_digits + 1] == '5' && dest[n_digits + 2] == '0') { /* close to half-way: try rounding toward 0 */ fesetround(FE_DOWNWARD); js_ecvt1(d, n_digits + 2, dest, size, decpt); fesetround(FE_TONEAREST); if (dest[n_digits + 1] < '5') return n_digits; /* truncate the 2 extra digits */ } /* round up in the string */ for(i = n_digits;; i--) { /* ignore the locale specific decimal point */ if (is_digit(dest[i])) { if (dest[i]++ < '9') break; dest[i] = '0'; if (i == 0) { dest[0] = '1'; (*decpt)++; break; } } } return n_digits; /* truncate the 2 extra digits */ #else /* No disambiguation available, eg: __wasi__ targets */ return js_ecvt1(d, n_digits, dest, size, decpt); #endif } }
O0
c
js_ecvt: subq $0x48, %rsp movsd %xmm0, 0x38(%rsp) movl %edi, 0x34(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) cmpl $0x0, 0x34(%rsp) jne 0x6142f movl $0x1, 0x14(%rsp) movl $0x11, 0x10(%rsp) movl 0x14(%rsp), %eax addl 0x10(%rsp), %eax shrl %eax movl %eax, 0x34(%rsp) movsd 0x38(%rsp), %xmm0 movl 0x34(%rsp), %edi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x61590 movl 0x14(%rsp), %eax cmpl 0x10(%rsp), %eax jne 0x6137b movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x61584 movq 0x28(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xe180 ucomisd 0x38(%rsp), %xmm0 jne 0x6141f jp 0x6141f movl 0x34(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x28(%rsp), %rax movslq 0x34(%rsp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x30, %eax jne 0x613c3 movl 0x34(%rsp), %eax addl $-0x1, %eax movl %eax, 0x34(%rsp) jmp 0x613a3 movl 0x34(%rsp), %eax cmpl 0x14(%rsp), %eax jne 0x613da movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x61584 movl 0x34(%rsp), %eax cmpl 0xc(%rsp), %eax jae 0x61415 movsd 0x38(%rsp), %xmm0 movsd 0xaad5e(%rip), %xmm1 # 0x10c150 ucomisd %xmm1, %xmm0 jbe 0x61415 movsd 0xaad58(%rip), %xmm0 # 0x10c158 ucomisd 0x38(%rsp), %xmm0 jbe 0x61415 movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x61584 movl 0x34(%rsp), %eax movl %eax, 0x10(%rsp) jmp 0x6142a movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x61338 movsd 0x38(%rsp), %xmm0 movl 0x34(%rsp), %edi addl $0x2, %edi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x61590 movq 0x28(%rsp), %rax movl 0x34(%rsp), %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x35, %eax jge 0x61475 movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x61584 movq 0x28(%rsp), %rax movl 0x34(%rsp), %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x35, %eax jne 0x614fe movq 0x28(%rsp), %rax movl 0x34(%rsp), %ecx addl $0x2, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x30, %eax jne 0x614fe movl $0x400, %edi # imm = 0x400 callq 0xe030 movsd 0x38(%rsp), %xmm0 movl 0x34(%rsp), %edi addl $0x2, %edi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx callq 0x61590 xorl %edi, %edi callq 0xe030 movq 0x28(%rsp), %rax movl 0x34(%rsp), %ecx addl $0x1, %ecx movslq %ecx, %rcx movzbl (%rax,%rcx), %eax cmpl $0x35, %eax jge 0x614fc movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) jmp 0x61584 jmp 0x614fe movl 0x34(%rsp), %eax movl %eax, 0x8(%rsp) movq 0x28(%rsp), %rax movslq 0x8(%rsp), %rcx movzbl (%rax,%rcx), %edi callq 0x26e30 cmpl $0x0, %eax je 0x6156d movq 0x28(%rsp), %rcx movslq 0x8(%rsp), %rdx movb (%rcx,%rdx), %al movb %al, %sil addb $0x1, %sil movb %sil, (%rcx,%rdx) movzbl %al, %eax cmpl $0x39, %eax jge 0x61540 jmp 0x6157c movq 0x28(%rsp), %rax movslq 0x8(%rsp), %rcx movb $0x30, (%rax,%rcx) cmpl $0x0, 0x8(%rsp) jne 0x6156b movq 0x28(%rsp), %rax movb $0x31, (%rax) movq 0x18(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0x6157c jmp 0x6156d jmp 0x6156f movl 0x8(%rsp), %eax addl $-0x1, %eax movl %eax, 0x8(%rsp) jmp 0x61506 movl 0x34(%rsp), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
js_ecvt: sub rsp, 48h movsd [rsp+48h+var_10], xmm0 mov [rsp+48h+var_14], edi mov [rsp+48h+var_20], rsi mov [rsp+48h+var_28], rdx mov [rsp+48h+var_30], rcx cmp [rsp+48h+var_14], 0 jnz loc_6142F mov [rsp+48h+var_34], 1 mov [rsp+48h+var_38], 11h loc_61338: mov eax, [rsp+48h+var_34] add eax, [rsp+48h+var_38] shr eax, 1 mov [rsp+48h+var_14], eax movsd xmm0, [rsp+48h+var_10] mov edi, [rsp+48h+var_14] mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_28] mov rcx, [rsp+48h+var_30] call js_ecvt1 mov eax, [rsp+48h+var_34] cmp eax, [rsp+48h+var_38] jnz short loc_6137B mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax jmp loc_61584 loc_6137B: mov rdi, [rsp+48h+var_20] xor eax, eax mov esi, eax call _strtod ucomisd xmm0, [rsp+48h+var_10] jnz loc_6141F jp loc_6141F mov eax, [rsp+48h+var_14] mov [rsp+48h+var_3C], eax loc_613A3: mov rax, [rsp+48h+var_20] movsxd rcx, [rsp+48h+var_14] movzx eax, byte ptr [rax+rcx] cmp eax, 30h ; '0' jnz short loc_613C3 mov eax, [rsp+48h+var_14] add eax, 0FFFFFFFFh mov [rsp+48h+var_14], eax jmp short loc_613A3 loc_613C3: mov eax, [rsp+48h+var_14] cmp eax, [rsp+48h+var_34] jnz short loc_613DA mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax jmp loc_61584 loc_613DA: mov eax, [rsp+48h+var_14] cmp eax, [rsp+48h+var_3C] jnb short loc_61415 movsd xmm0, [rsp+48h+var_10] movsd xmm1, cs:qword_10C150 ucomisd xmm0, xmm1 jbe short loc_61415 movsd xmm0, cs:qword_10C158 ucomisd xmm0, [rsp+48h+var_10] jbe short loc_61415 mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax jmp loc_61584 loc_61415: mov eax, [rsp+48h+var_14] mov [rsp+48h+var_38], eax jmp short loc_6142A loc_6141F: mov eax, [rsp+48h+var_14] add eax, 1 mov [rsp+48h+var_34], eax loc_6142A: jmp loc_61338 loc_6142F: movsd xmm0, [rsp+48h+var_10] mov edi, [rsp+48h+var_14] add edi, 2 mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_28] mov rcx, [rsp+48h+var_30] call js_ecvt1 mov rax, [rsp+48h+var_20] mov ecx, [rsp+48h+var_14] add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 35h ; '5' jge short loc_61475 mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax jmp loc_61584 loc_61475: mov rax, [rsp+48h+var_20] mov ecx, [rsp+48h+var_14] add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 35h ; '5' jnz short loc_614FE mov rax, [rsp+48h+var_20] mov ecx, [rsp+48h+var_14] add ecx, 2 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 30h ; '0' jnz short loc_614FE mov edi, 400h call _fesetround movsd xmm0, [rsp+48h+var_10] mov edi, [rsp+48h+var_14] add edi, 2 mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_28] mov rcx, [rsp+48h+var_30] call js_ecvt1 xor edi, edi call _fesetround mov rax, [rsp+48h+var_20] mov ecx, [rsp+48h+var_14] add ecx, 1 movsxd rcx, ecx movzx eax, byte ptr [rax+rcx] cmp eax, 35h ; '5' jge short loc_614FC mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax jmp loc_61584 loc_614FC: jmp short $+2 loc_614FE: mov eax, [rsp+48h+var_14] mov [rsp+48h+var_40], eax loc_61506: mov rax, [rsp+48h+var_20] movsxd rcx, [rsp+48h+var_40] movzx edi, byte ptr [rax+rcx] call is_digit cmp eax, 0 jz short loc_6156D mov rcx, [rsp+48h+var_20] movsxd rdx, [rsp+48h+var_40] mov al, [rcx+rdx] mov sil, al add sil, 1 mov [rcx+rdx], sil movzx eax, al cmp eax, 39h ; '9' jge short loc_61540 jmp short loc_6157C loc_61540: mov rax, [rsp+48h+var_20] movsxd rcx, [rsp+48h+var_40] mov byte ptr [rax+rcx], 30h ; '0' cmp [rsp+48h+var_40], 0 jnz short loc_6156B mov rax, [rsp+48h+var_20] mov byte ptr [rax], 31h ; '1' mov rax, [rsp+48h+var_30] mov ecx, [rax] add ecx, 1 mov [rax], ecx jmp short loc_6157C loc_6156B: jmp short $+2 loc_6156D: jmp short $+2 loc_6156F: mov eax, [rsp+48h+var_40] add eax, 0FFFFFFFFh mov [rsp+48h+var_40], eax jmp short loc_61506 loc_6157C: mov eax, [rsp+48h+var_14] mov [rsp+48h+var_4], eax loc_61584: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long js_ecvt(unsigned int a1, _BYTE *a2, long long a3, _DWORD *a4, double a5) { unsigned __int8 v5; // al unsigned int i; // [rsp+8h] [rbp-40h] int j; // [rsp+10h] [rbp-38h] int v9; // [rsp+14h] [rbp-34h] unsigned int v12; // [rsp+34h] [rbp-14h] if ( a1 ) { js_ecvt1(a1 + 2, a2, a3, a4, a5); if ( (unsigned __int8)a2[a1 + 1] >= 0x35u ) { if ( a2[a1 + 1] == 53 && a2[a1 + 2] == 48 && (fesetround(1024LL), js_ecvt1(a1 + 2, a2, a3, a4, a5), fesetround(0LL), (unsigned __int8)a2[a1 + 1] < 0x35u) ) { return a1; } else { for ( i = a1; ; --i ) { if ( is_digit((unsigned __int8)a2[i]) ) { v5 = a2[i]; a2[i] = v5 + 1; if ( v5 < 0x39u ) return a1; a2[i] = 48; if ( !i ) break; } } *a2 = 49; ++*a4; return a1; } } else { return a1; } } else { v9 = 1; for ( j = 17; ; j = v12 ) { while ( 1 ) { v12 = (unsigned int)(j + v9) >> 1; js_ecvt1(v12, a2, a3, a4, a5); if ( v9 == j ) return (unsigned int)(j + v9) >> 1; if ( strtod(a2, 0LL) == a5 ) break; v9 = v12 + 1; } while ( a2[v12] == 48 ) --v12; if ( v12 == v9 ) return v12; if ( v12 < (unsigned int)(j + v9) >> 1 && a5 > 3.0e-308 && a5 < 8.0e307 ) break; } return v12; } }
js_ecvt: SUB RSP,0x48 MOVSD qword ptr [RSP + 0x38],XMM0 MOV dword ptr [RSP + 0x34],EDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX CMP dword ptr [RSP + 0x34],0x0 JNZ 0x0016142f MOV dword ptr [RSP + 0x14],0x1 MOV dword ptr [RSP + 0x10],0x11 LAB_00161338: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,dword ptr [RSP + 0x10] SHR EAX,0x1 MOV dword ptr [RSP + 0x34],EAX MOVSD XMM0,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RSP + 0x34] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] CALL 0x00161590 MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RSP + 0x10] JNZ 0x0016137b MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX JMP 0x00161584 LAB_0016137b: MOV RDI,qword ptr [RSP + 0x28] XOR EAX,EAX MOV ESI,EAX CALL 0x0010e180 UCOMISD XMM0,qword ptr [RSP + 0x38] JNZ 0x0016141f JP 0x0016141f MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0xc],EAX LAB_001613a3: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x34] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x30 JNZ 0x001613c3 MOV EAX,dword ptr [RSP + 0x34] ADD EAX,-0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x001613a3 LAB_001613c3: MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RSP + 0x14] JNZ 0x001613da MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX JMP 0x00161584 LAB_001613da: MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RSP + 0xc] JNC 0x00161415 MOVSD XMM0,qword ptr [RSP + 0x38] MOVSD XMM1,qword ptr [0x0020c150] UCOMISD XMM0,XMM1 JBE 0x00161415 MOVSD XMM0,qword ptr [0x0020c158] UCOMISD XMM0,qword ptr [RSP + 0x38] JBE 0x00161415 MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX JMP 0x00161584 LAB_00161415: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x10],EAX JMP 0x0016142a LAB_0016141f: MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX LAB_0016142a: JMP 0x00161338 LAB_0016142f: MOVSD XMM0,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RSP + 0x34] ADD EDI,0x2 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] CALL 0x00161590 MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x34] ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x35 JGE 0x00161475 MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX JMP 0x00161584 LAB_00161475: MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x34] ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x35 JNZ 0x001614fe MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x34] ADD ECX,0x2 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x30 JNZ 0x001614fe MOV EDI,0x400 CALL 0x0010e030 MOVSD XMM0,qword ptr [RSP + 0x38] MOV EDI,dword ptr [RSP + 0x34] ADD EDI,0x2 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] CALL 0x00161590 XOR EDI,EDI CALL 0x0010e030 MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RSP + 0x34] ADD ECX,0x1 MOVSXD RCX,ECX MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x35 JGE 0x001614fc MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX JMP 0x00161584 LAB_001614fc: JMP 0x001614fe LAB_001614fe: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x8],EAX LAB_00161506: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x8] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x00126e30 CMP EAX,0x0 JZ 0x0016156d MOV RCX,qword ptr [RSP + 0x28] MOVSXD RDX,dword ptr [RSP + 0x8] MOV AL,byte ptr [RCX + RDX*0x1] MOV SIL,AL ADD SIL,0x1 MOV byte ptr [RCX + RDX*0x1],SIL MOVZX EAX,AL CMP EAX,0x39 JGE 0x00161540 JMP 0x0016157c LAB_00161540: MOV RAX,qword ptr [RSP + 0x28] MOVSXD RCX,dword ptr [RSP + 0x8] MOV byte ptr [RAX + RCX*0x1],0x30 CMP dword ptr [RSP + 0x8],0x0 JNZ 0x0016156b MOV RAX,qword ptr [RSP + 0x28] MOV byte ptr [RAX],0x31 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX JMP 0x0016157c LAB_0016156b: JMP 0x0016156d LAB_0016156d: JMP 0x0016156f LAB_0016156f: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,-0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x00161506 LAB_0016157c: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x44],EAX LAB_00161584: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
uint js_ecvt(double param_1,uint param_2,char *param_3,int8 param_4,int *param_5) { byte bVar1; uint uVar2; int iVar3; double dVar4; uint local_40; uint local_38; uint local_34; uint local_14; if (param_2 == 0) { local_34 = 1; local_38 = 0x11; while( true ) { while( true ) { uVar2 = local_34 + local_38 >> 1; js_ecvt1(param_1,uVar2,param_3,param_4,param_5); if (local_34 == local_38) { return uVar2; } dVar4 = strtod(param_3,(char **)0x0); if ((dVar4 == param_1) && (local_14 = uVar2, !NAN(dVar4) && !NAN(param_1))) break; local_34 = uVar2 + 1; } for (; param_3[(int)local_14] == '0'; local_14 = local_14 - 1) { } if (local_14 == local_34) break; if (((local_14 < uVar2) && (DAT_0020c150 < param_1)) && (param_1 < DAT_0020c158)) { return local_14; } local_38 = local_14; } return local_14; } js_ecvt1(param_1,param_2 + 2,param_3,param_4,param_5); if ((byte)param_3[(int)(param_2 + 1)] < 0x35) { return param_2; } local_40 = param_2; if ((param_3[(int)(param_2 + 1)] == '5') && (param_3[(int)(param_2 + 2)] == '0')) { fesetround(0x400); js_ecvt1(param_1,param_2 + 2,param_3,param_4,param_5); fesetround(0); if ((byte)param_3[(int)(param_2 + 1)] < 0x35) { return param_2; } } do { iVar3 = is_digit(param_3[(int)local_40]); if (iVar3 != 0) { bVar1 = param_3[(int)local_40]; param_3[(int)local_40] = bVar1 + 1; if (bVar1 < 0x39) { return param_2; } param_3[(int)local_40] = '0'; if (local_40 == 0) { *param_3 = '1'; *param_5 = *param_5 + 1; return param_2; } } local_40 = local_40 - 1; } while( true ); }
14,944
ma_mempack_get_block_info
eloqsql/storage/maria/ma_packrec.c
static uchar * _ma_mempack_get_block_info(MARIA_HA *maria, MARIA_BIT_BUFF *bit_buff, MARIA_BLOCK_INFO *info, uchar **rec_buff_p, size_t *rec_buff_size_p, uchar *header) { MARIA_SHARE *share= maria->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); header+= read_pack_length((uint) share->pack.version, header, &info->rec_len); if (share->base.blobs) { header+= read_pack_length((uint) share->pack.version, header, &info->blob_len); /* _ma_alloc_rec_buff sets my_errno on error */ if (_ma_alloc_buffer(rec_buff_p, rec_buff_size_p, info->blob_len + share->base.extra_rec_buff_size, flag)) return 0; /* not enough memory */ bit_buff->blob_pos= *rec_buff_p; bit_buff->blob_end= *rec_buff_p + info->blob_len; } return header; }
O3
c
ma_mempack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movzbl (%r9), %eax cmpq $0xfd, %rax ja 0x3bfe2 movl $0x1, %ecx jmp 0x3c01a cmpl $0xfe, %eax jne 0x3bff4 movzwl 0x1(%rbx), %eax movl $0x3, %ecx jmp 0x3c01a cmpb $0x1, 0x59c(%rdi) jne 0x3c012 movzwl 0x1(%rbx), %ecx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rcx, %rax movl $0x4, %ecx jmp 0x3c01a movl 0x1(%rbx), %eax movl $0x5, %ecx movb 0x7d9(%rdi), %dl movq %rax, 0x18(%r15) addq %rcx, %rbx cmpl $0x0, 0x3f0(%rdi) je 0x3c0c3 xorl %ecx, %ecx testb %dl, %dl setne %cl shll $0x10, %ecx orq $0x10, %rcx movzbl (%rbx), %eax cmpq $0xfd, %rax ja 0x3c055 movl $0x1, %r13d jmp 0x3c090 cmpl $0xfe, %eax jne 0x3c068 movzwl 0x1(%rbx), %eax movl $0x3, %r13d jmp 0x3c090 cmpb $0x1, 0x59c(%rdi) jne 0x3c087 movzwl 0x1(%rbx), %edx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rdx, %rax movl $0x4, %r13d jmp 0x3c090 movl 0x1(%rbx), %eax movl $0x5, %r13d movq %rax, 0x30(%r15) movl 0x424(%rdi), %edx addq %rax, %rdx movq %r12, %rdi movq %r8, %rsi callq 0x54eab testb %al, %al je 0x3c0b0 xorl %ebx, %ebx jmp 0x3c0c3 addq %r13, %rbx movq (%r12), %rax movq %rax, 0x18(%r14) addq 0x30(%r15), %rax movq %rax, 0x20(%r14) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nopl (%rax)
_ma_mempack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r12, rcx mov r15, rdx mov r14, rsi movzx eax, byte ptr [r9] cmp rax, 0FDh ja short loc_3BFE2 mov ecx, 1 jmp short loc_3C01A loc_3BFE2: cmp eax, 0FEh jnz short loc_3BFF4 movzx eax, word ptr [rbx+1] mov ecx, 3 jmp short loc_3C01A loc_3BFF4: cmp byte ptr [rdi+59Ch], 1 jnz short loc_3C012 movzx ecx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rcx mov ecx, 4 jmp short loc_3C01A loc_3C012: mov eax, [rbx+1] mov ecx, 5 loc_3C01A: mov dl, [rdi+7D9h] mov [r15+18h], rax add rbx, rcx cmp dword ptr [rdi+3F0h], 0 jz loc_3C0C3 xor ecx, ecx test dl, dl setnz cl shl ecx, 10h or rcx, 10h movzx eax, byte ptr [rbx] cmp rax, 0FDh ja short loc_3C055 mov r13d, 1 jmp short loc_3C090 loc_3C055: cmp eax, 0FEh jnz short loc_3C068 movzx eax, word ptr [rbx+1] mov r13d, 3 jmp short loc_3C090 loc_3C068: cmp byte ptr [rdi+59Ch], 1 jnz short loc_3C087 movzx edx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rdx mov r13d, 4 jmp short loc_3C090 loc_3C087: mov eax, [rbx+1] mov r13d, 5 loc_3C090: mov [r15+30h], rax mov edx, [rdi+424h] add rdx, rax mov rdi, r12 mov rsi, r8 call _ma_alloc_buffer test al, al jz short loc_3C0B0 xor ebx, ebx jmp short loc_3C0C3 loc_3C0B0: add rbx, r13 mov rax, [r12] mov [r14+18h], rax add rax, [r15+30h] mov [r14+20h], rax loc_3C0C3: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * ma_mempack_get_block_info( long long a1, long long a2, long long a3, long long *a4, long long a5, unsigned __int8 *a6) { unsigned long long v8; // rax long long v9; // rcx char v10; // dl unsigned __int8 *v11; // rbx unsigned long long v12; // rax long long v13; // r13 long long v14; // rax v8 = *a6; if ( v8 > 0xFD ) { if ( (_DWORD)v8 == 254 ) { v8 = *(unsigned __int16 *)(a6 + 1); v9 = 3LL; } else if ( *(_BYTE *)(a1 + 1436) == 1 ) { v8 = *(unsigned __int16 *)(a6 + 1) | (unsigned long long)(a6[3] << 16); v9 = 4LL; } else { v8 = *(unsigned int *)(a6 + 1); v9 = 5LL; } } else { v9 = 1LL; } v10 = *(_BYTE *)(a1 + 2009); *(_QWORD *)(a3 + 24) = v8; v11 = &a6[v9]; if ( *(_DWORD *)(a1 + 1008) ) { v12 = *v11; if ( v12 > 0xFD ) { if ( (_DWORD)v12 == 254 ) { v12 = *(unsigned __int16 *)(v11 + 1); v13 = 3LL; } else if ( *(_BYTE *)(a1 + 1436) == 1 ) { v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16); v13 = 4LL; } else { v12 = *(unsigned int *)(v11 + 1); v13 = 5LL; } } else { v13 = 1LL; } *(_QWORD *)(a3 + 48) = v12; if ( (unsigned __int8)ma_alloc_buffer( a4, a5, v12 + *(unsigned int *)(a1 + 1060), ((unsigned __int8)(v10 != 0) << 16) | 0x10LL) ) { return 0LL; } else { v11 += v13; v14 = *a4; *(_QWORD *)(a2 + 24) = *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14; } } return v11; }
_ma_mempack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOVZX EAX,byte ptr [R9] CMP RAX,0xfd JA 0x0013bfe2 MOV ECX,0x1 JMP 0x0013c01a LAB_0013bfe2: CMP EAX,0xfe JNZ 0x0013bff4 MOVZX EAX,word ptr [RBX + 0x1] MOV ECX,0x3 JMP 0x0013c01a LAB_0013bff4: CMP byte ptr [RDI + 0x59c],0x1 JNZ 0x0013c012 MOVZX ECX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RCX MOV ECX,0x4 JMP 0x0013c01a LAB_0013c012: MOV EAX,dword ptr [RBX + 0x1] MOV ECX,0x5 LAB_0013c01a: MOV DL,byte ptr [RDI + 0x7d9] MOV qword ptr [R15 + 0x18],RAX ADD RBX,RCX CMP dword ptr [RDI + 0x3f0],0x0 JZ 0x0013c0c3 XOR ECX,ECX TEST DL,DL SETNZ CL SHL ECX,0x10 OR RCX,0x10 MOVZX EAX,byte ptr [RBX] CMP RAX,0xfd JA 0x0013c055 MOV R13D,0x1 JMP 0x0013c090 LAB_0013c055: CMP EAX,0xfe JNZ 0x0013c068 MOVZX EAX,word ptr [RBX + 0x1] MOV R13D,0x3 JMP 0x0013c090 LAB_0013c068: CMP byte ptr [RDI + 0x59c],0x1 JNZ 0x0013c087 MOVZX EDX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RDX MOV R13D,0x4 JMP 0x0013c090 LAB_0013c087: MOV EAX,dword ptr [RBX + 0x1] MOV R13D,0x5 LAB_0013c090: MOV qword ptr [R15 + 0x30],RAX MOV EDX,dword ptr [RDI + 0x424] ADD RDX,RAX MOV RDI,R12 MOV RSI,R8 CALL 0x00154eab TEST AL,AL JZ 0x0013c0b0 XOR EBX,EBX JMP 0x0013c0c3 LAB_0013c0b0: ADD RBX,R13 MOV RAX,qword ptr [R12] MOV qword ptr [R14 + 0x18],RAX ADD RAX,qword ptr [R15 + 0x30] MOV qword ptr [R14 + 0x20],RAX LAB_0013c0c3: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _ma_mempack_get_block_info (long param_1,long param_2,long param_3,long *param_4,int8 param_5, byte *param_6) { char cVar1; ulong uVar2; long lVar3; uVar2 = (ulong)*param_6; if (uVar2 < 0xfe) { lVar3 = 1; } else if (*param_6 == 0xfe) { uVar2 = (ulong)*(ushort *)(param_6 + 1); lVar3 = 3; } else if (*(char *)(param_1 + 0x59c) == '\x01') { uVar2 = (ulong)*(uint3 *)(param_6 + 1); lVar3 = 4; } else { uVar2 = (ulong)*(uint *)(param_6 + 1); lVar3 = 5; } cVar1 = *(char *)(param_1 + 0x7d9); *(ulong *)(param_3 + 0x18) = uVar2; param_6 = param_6 + lVar3; if (*(int *)(param_1 + 0x3f0) != 0) { uVar2 = (ulong)*param_6; if (uVar2 < 0xfe) { lVar3 = 1; } else if (*param_6 == 0xfe) { uVar2 = (ulong)*(ushort *)(param_6 + 1); lVar3 = 3; } else if (*(char *)(param_1 + 0x59c) == '\x01') { uVar2 = (ulong)*(uint3 *)(param_6 + 1); lVar3 = 4; } else { uVar2 = (ulong)*(uint *)(param_6 + 1); lVar3 = 5; } *(ulong *)(param_3 + 0x30) = uVar2; cVar1 = _ma_alloc_buffer(param_4,param_5,*(uint *)(param_1 + 0x424) + uVar2, (ulong)(cVar1 != '\0') << 0x10 | 0x10); if (cVar1 == '\0') { param_6 = param_6 + lVar3; lVar3 = *param_4; *(long *)(param_2 + 0x18) = lVar3; *(long *)(param_2 + 0x20) = lVar3 + *(long *)(param_3 + 0x30); } else { param_6 = (byte *)0x0; } } return param_6; }
14,945
llama_model_loader::load_data_for(ggml_tensor*) const
monkey531[P]llama/src/llama-model-loader.cpp
void llama_model_loader::load_data_for(struct ggml_tensor * cur) const { const auto & w = require_weight(ggml_get_name(cur)); if (use_mmap) { const auto & mapping = mappings.at(w.idx); if (cur->data == nullptr) { cur->data = (uint8_t *)mapping->addr() + w.offs; } else { memcpy(cur->data, (uint8_t *)mapping->addr() + w.offs, ggml_nbytes(cur)); } } else { GGML_ASSERT(cur->data != nullptr); GGML_ASSERT(w.idx < files.size()); const auto & file = files.at(w.idx); file->seek(w.offs, SEEK_SET); file->read_raw(cur->data, ggml_nbytes(cur)); } if (check_tensors && !ggml_validate_row_data(cur->type, cur->data, ggml_nbytes(cur))) { throw std::runtime_error(format("tensor '%s' has invalid data", ggml_get_name(cur))); } }
O3
cpp
llama_model_loader::load_data_for(ggml_tensor*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x687e0 movq %r14, %rdi movq %rax, %rsi callq 0x6c120 movq %rax, %r15 cmpb $0x1, 0x20(%r14) jne 0xafd35 movzwl (%r15), %esi movq 0x48(%r14), %rax movq 0x50(%r14), %rdx subq %rax, %rdx sarq $0x3, %rdx cmpq %rsi, %rdx jbe 0xafdd2 movq 0xf8(%rbx), %r12 movq (%rax,%rsi,8), %rdi callq 0x6aca0 movq %rax, %r13 addq 0x8(%r15), %r13 testq %r12, %r12 je 0xafd93 movq %rbx, %rdi callq 0x64550 movq %r12, %rdi movq %r13, %rsi movq %rax, %rdx callq 0x67420 jmp 0xafd9a cmpq $0x0, 0xf8(%rbx) je 0xafde0 movzwl (%r15), %r12d movq 0x28(%r14), %r13 movq 0x30(%r14), %rax subq %r13, %rax sarq $0x3, %rax cmpq %r12, %rax jbe 0xafdfc movq (%r13,%r12,8), %rdi movq 0x8(%r15), %rsi xorl %edx, %edx callq 0x69a40 movq (%r13,%r12,8), %r15 movq 0xf8(%rbx), %r12 movq %rbx, %rdi callq 0x64550 movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x66ae0 jmp 0xafd9a movq %r13, 0xf8(%rbx) cmpb $0x1, 0x21(%r14) jne 0xafdc3 movl (%rbx), %ebp movq 0xf8(%rbx), %r14 movq %rbx, %rdi callq 0x64550 movl %ebp, %edi movq %r14, %rsi movq %rax, %rdx callq 0x67a60 testb %al, %al je 0xafe1d addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x65e3a(%rip), %rdi # 0x115c13 xorl %eax, %eax callq 0x6a230 leaq 0x675fc(%rip), %rdi # 0x1173e3 leaq 0x605d6(%rip), %rdx # 0x1103c4 leaq 0x67655(%rip), %rcx # 0x11744a movl $0x363, %esi # imm = 0x363 jmp 0xafe16 leaq 0x675e0(%rip), %rdi # 0x1173e3 leaq 0x605ba(%rip), %rdx # 0x1103c4 leaq 0x6764e(%rip), %rcx # 0x11745f movl $0x364, %esi # imm = 0x364 xorl %eax, %eax callq 0x6af70 movl $0x10, %edi callq 0x65cb0 movq %rax, %r14 movq %rbx, %rdi callq 0x687e0 leaq 0x6763b(%rip), %rsi # 0x117474 leaq 0x8(%rsp), %rdi movq %rax, %rdx xorl %eax, %eax callq 0x6b940 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x6aa30 xorl %ebp, %ebp movq 0xad18f(%rip), %rsi # 0x15cff0 movq 0xace88(%rip), %rdx # 0x15ccf0 movq %r14, %rdi callq 0x6b270 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xafe8e movq 0x18(%rsp), %rsi incq %rsi callq 0x681a0 testb %bpl, %bpl jne 0xafe98 jmp 0xafea0 movq %rax, %rbx movq %r14, %rdi callq 0x66d40 movq %rbx, %rdi callq 0x6b5d0
_ZNK18llama_model_loader13load_data_forEP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rsi mov r14, rdi mov rdi, rsi call _ggml_get_name mov rdi, r14; this mov rsi, rax; char * call __ZNK18llama_model_loader14require_weightEPKc; llama_model_loader::require_weight(char const*) mov r15, rax cmp byte ptr [r14+20h], 1 jnz short loc_AFD35 movzx esi, word ptr [r15] mov rax, [r14+48h] mov rdx, [r14+50h] sub rdx, rax sar rdx, 3 cmp rdx, rsi jbe loc_AFDD2 mov r12, [rbx+0F8h] mov rdi, [rax+rsi*8]; this call __ZNK10llama_mmap4addrEv; llama_mmap::addr(void) mov r13, rax add r13, [r15+8] test r12, r12 jz short loc_AFD93 mov rdi, rbx call _ggml_nbytes mov rdi, r12 mov rsi, r13 mov rdx, rax call _memcpy jmp short loc_AFD9A loc_AFD35: cmp qword ptr [rbx+0F8h], 0 jz loc_AFDE0 movzx r12d, word ptr [r15] mov r13, [r14+28h] mov rax, [r14+30h] sub rax, r13 sar rax, 3 cmp rax, r12 jbe loc_AFDFC mov rdi, [r13+r12*8+0]; this mov rsi, [r15+8]; unsigned __int64 xor edx, edx; int call __ZNK10llama_file4seekEmi; llama_file::seek(ulong,int) mov r15, [r13+r12*8+0] mov r12, [rbx+0F8h] mov rdi, rbx call _ggml_nbytes mov rdi, r15; this mov rsi, r12; void * mov rdx, rax; unsigned __int64 call __ZNK10llama_file8read_rawEPvm; llama_file::read_raw(void *,ulong) jmp short loc_AFD9A loc_AFD93: mov [rbx+0F8h], r13 loc_AFD9A: cmp byte ptr [r14+21h], 1 jnz short loc_AFDC3 mov ebp, [rbx] mov r14, [rbx+0F8h] mov rdi, rbx call _ggml_nbytes mov edi, ebp mov rsi, r14 mov rdx, rax call _ggml_validate_row_data test al, al jz short loc_AFE1D loc_AFDC3: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_AFDD2: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) loc_AFDE0: lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurDataNullptr; "cur->data != nullptr" mov esi, 363h jmp short loc_AFE16 loc_AFDFC: lea rdi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aWIdxFilesSize; "w.idx < files.size()" mov esi, 364h loc_AFE16: xor eax, eax call _ggml_abort loc_AFE1D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rbx call _ggml_get_name lea rsi, aTensorSHasInva; "tensor '%s' has invalid data" lea rdi, [rsp+58h+var_50] mov rdx, rax xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 lea rsi, [rsp+58h+var_50] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AFE8E mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AFE8E: test bpl, bpl jnz short loc_AFE98 jmp short loc_AFEA0 mov rbx, rax loc_AFE98: mov rdi, r14; void * call ___cxa_free_exception loc_AFEA0: mov rdi, rbx call __Unwind_Resume
long long llama_model_loader::load_data_for(llama_model_loader *this, int *a2) { const char *name; // rax unsigned __int16 *v4; // rax unsigned __int16 *v5; // r15 unsigned long long v6; // rsi long long v7; // rax unsigned long long v8; // rdx long long v9; // r12 long long result; // rax long long v11; // r13 long long v12; // rax unsigned long long v13; // r12 long long v14; // r13 llama_file *v15; // r15 void *v16; // r12 unsigned long long v17; // rax unsigned int v18; // ebp long long v19; // r14 long long v20; // rax void *exception; // r14 int v22; // eax int v23; // ecx int v24; // r8d int v25; // r9d _BYTE v26[16]; // [rsp+8h] [rbp-50h] BYREF name = (const char *)ggml_get_name(a2); v4 = (unsigned __int16 *)llama_model_loader::require_weight(this, name); v5 = v4; if ( *((_BYTE *)this + 32) == 1 ) { v6 = *v4; v7 = *((_QWORD *)this + 9); v8 = (*((_QWORD *)this + 10) - v7) >> 3; if ( v8 <= v6 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v6, v8); v9 = *((_QWORD *)a2 + 31); result = llama_mmap::addr(*(llama_mmap **)(v7 + 8 * v6)); v11 = *((_QWORD *)v5 + 1) + result; if ( v9 ) { v12 = ggml_nbytes(a2); result = memcpy(v9, v11, v12); } else { *((_QWORD *)a2 + 31) = v11; } } else { if ( !*((_QWORD *)a2 + 31) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp", 867LL, "GGML_ASSERT(%s) failed", "cur->data != nullptr"); goto LABEL_15; } v13 = *v4; v14 = *((_QWORD *)this + 5); if ( (*((_QWORD *)this + 6) - v14) >> 3 <= v13 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp", 868LL, "GGML_ASSERT(%s) failed", "w.idx < files.size()"); goto LABEL_15; } llama_file::seek(*(llama_file **)(v14 + 8 * v13), *((_QWORD *)v4 + 1), 0); v15 = *(llama_file **)(v14 + 8 * v13); v16 = (void *)*((_QWORD *)a2 + 31); v17 = ggml_nbytes(a2); result = llama_file::read_raw(v15, v16, v17); } if ( *((_BYTE *)this + 33) == 1 ) { v18 = *a2; v19 = *((_QWORD *)a2 + 31); v20 = ggml_nbytes(a2); result = ggml_validate_row_data(v18, v19, v20); if ( !(_BYTE)result ) { LABEL_15: exception = __cxa_allocate_exception(0x10uLL); v22 = ggml_get_name(a2); format[abi:cxx11]((unsigned int)v26, (unsigned int)"tensor '%s' has invalid data", v22, v23, v24, v25); std::runtime_error::runtime_error(exception, v26); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } return result; }
load_data_for: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x001687e0 MOV RDI,R14 MOV RSI,RAX CALL 0x0016c120 MOV R15,RAX CMP byte ptr [R14 + 0x20],0x1 JNZ 0x001afd35 MOVZX ESI,word ptr [R15] MOV RAX,qword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] SUB RDX,RAX SAR RDX,0x3 CMP RDX,RSI JBE 0x001afdd2 MOV R12,qword ptr [RBX + 0xf8] MOV RDI,qword ptr [RAX + RSI*0x8] CALL 0x0016aca0 MOV R13,RAX ADD R13,qword ptr [R15 + 0x8] TEST R12,R12 JZ 0x001afd93 MOV RDI,RBX CALL 0x00164550 MOV RDI,R12 MOV RSI,R13 MOV RDX,RAX CALL 0x00167420 JMP 0x001afd9a LAB_001afd35: CMP qword ptr [RBX + 0xf8],0x0 JZ 0x001afde0 MOVZX R12D,word ptr [R15] MOV R13,qword ptr [R14 + 0x28] MOV RAX,qword ptr [R14 + 0x30] SUB RAX,R13 SAR RAX,0x3 CMP RAX,R12 JBE 0x001afdfc MOV RDI,qword ptr [R13 + R12*0x8] MOV RSI,qword ptr [R15 + 0x8] XOR EDX,EDX CALL 0x00169a40 MOV R15,qword ptr [R13 + R12*0x8] MOV R12,qword ptr [RBX + 0xf8] MOV RDI,RBX CALL 0x00164550 MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x00166ae0 JMP 0x001afd9a LAB_001afd93: MOV qword ptr [RBX + 0xf8],R13 LAB_001afd9a: CMP byte ptr [R14 + 0x21],0x1 JNZ 0x001afdc3 MOV EBP,dword ptr [RBX] MOV R14,qword ptr [RBX + 0xf8] MOV RDI,RBX CALL 0x00164550 MOV EDI,EBP MOV RSI,R14 MOV RDX,RAX CALL 0x00167a60 TEST AL,AL JZ 0x001afe1d LAB_001afdc3: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001afdd2: LEA RDI,[0x215c13] XOR EAX,EAX CALL 0x0016a230 LAB_001afde0: LEA RDI,[0x2173e3] LEA RDX,[0x2103c4] LEA RCX,[0x21744a] MOV ESI,0x363 JMP 0x001afe16 LAB_001afdfc: LEA RDI,[0x2173e3] LEA RDX,[0x2103c4] LEA RCX,[0x21745f] MOV ESI,0x364 LAB_001afe16: XOR EAX,EAX CALL 0x0016af70 LAB_001afe1d: MOV EDI,0x10 CALL 0x00165cb0 MOV R14,RAX LAB_001afe2a: MOV RDI,RBX CALL 0x001687e0 LEA RSI,[0x217474] LEA RDI,[RSP + 0x8] MOV RDX,RAX XOR EAX,EAX CALL 0x0016b940 MOV BPL,0x1 LAB_001afe4b: LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x0016aa30 XOR EBP,EBP MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,R14 CALL 0x0016b270
/* llama_model_loader::load_data_for(ggml_tensor*) const */ void __thiscall llama_model_loader::load_data_for(llama_model_loader *this,ggml_tensor *param_1) { int4 uVar1; void *pvVar2; long lVar3; llama_file *this_00; char cVar4; char *pcVar5; ushort *puVar6; long lVar7; size_t __n; ulong uVar8; int8 uVar9; runtime_error *this_01; int8 uVar10; string local_50 [32]; pcVar5 = (char *)ggml_get_name(param_1); puVar6 = (ushort *)require_weight(this,pcVar5); if (this[0x20] == (llama_model_loader)0x1) { if ((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48) >> 3) <= (ulong)*puVar6) { /* WARNING: Subroutine does not return */ std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); } pvVar2 = *(void **)(param_1 + 0xf8); lVar7 = llama_mmap::addr(*(llama_mmap **)(*(long *)(this + 0x48) + (ulong)*puVar6 * 8)); lVar3 = *(long *)(puVar6 + 4); if (pvVar2 == (void *)0x0) { *(void **)(param_1 + 0xf8) = (void *)(lVar7 + lVar3); } else { __n = ggml_nbytes(param_1); memcpy(pvVar2,(void *)(lVar7 + lVar3),__n); } LAB_001afd9a: if (this[0x21] == (llama_model_loader)0x1) { uVar1 = *(int4 *)param_1; uVar10 = *(int8 *)(param_1 + 0xf8); uVar9 = ggml_nbytes(param_1); cVar4 = ggml_validate_row_data(uVar1,uVar10,uVar9); if (cVar4 == '\0') { this_01 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001afe2a to 001afe47 has its CatchHandler @ 001afe95 */ uVar10 = ggml_get_name(param_1); format_abi_cxx11_((char *)local_50,"tensor \'%s\' has invalid data",uVar10); /* try { // try from 001afe4b to 001afe6f has its CatchHandler @ 001afe70 */ std::runtime_error::runtime_error(this_01,local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this_01,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); } } return; } if (*(long *)(param_1 + 0xf8) == 0) { pcVar5 = "cur->data != nullptr"; uVar10 = 0x363; } else { uVar8 = (ulong)*puVar6; lVar3 = *(long *)(this + 0x28); if (uVar8 < (ulong)(*(long *)(this + 0x30) - lVar3 >> 3)) { llama_file::seek(*(llama_file **)(lVar3 + uVar8 * 8),*(ulong *)(puVar6 + 4),0); this_00 = *(llama_file **)(lVar3 + uVar8 * 8); pvVar2 = *(void **)(param_1 + 0xf8); uVar8 = ggml_nbytes(param_1); llama_file::read_raw(this_00,pvVar2,uVar8); goto LAB_001afd9a; } pcVar5 = "w.idx < files.size()"; uVar10 = 0x364; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-model-loader.cpp", uVar10,"GGML_ASSERT(%s) failed",pcVar5); }
14,946
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11])
monkey531[P]llama/common/json.hpp
size_type erase(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { // Since we cannot move const Keys, re-construct them in place for (auto next = it; ++next != this->end(); ++it) { it->~value_type(); // Destroy but keep allocation new (&*it) value_type{std::move(*next)}; } Container::pop_back(); return 1; } } return 0; }
O2
cpp
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11]): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rbx movq 0x8(%r14), %r13 cmpq %r13, %rbx je 0x7dd71 movq %rbx, %rdi movq %r15, %rsi callq 0x38a22 testb %al, %al jne 0x7dd44 addq $0x30, %rbx jmp 0x7dd26 movq %rbx, %r15 leaq 0x30(%r15), %r12 cmpq 0x8(%r14), %r12 je 0x7dd69 movq %r15, %rdi callq 0x41a18 movq %r15, %rdi movq %r12, %rsi callq 0x4267c movq %r12, %r15 jmp 0x7dd47 movq %r14, %rdi callq 0x7dd84 xorl %eax, %eax cmpq %r13, %rbx setne %al popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_: push r15 push r14 push r13 push r12 push rbx mov r15, rsi mov r14, rdi mov rbx, [rdi] loc_7DD26: mov r13, [r14+8] cmp rbx, r13 jz short loc_7DD71 mov rdi, rbx mov rsi, r15 call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_7DD44 add rbx, 30h ; '0' jmp short loc_7DD26 loc_7DD44: mov r15, rbx loc_7DD47: lea r12, [r15+30h] cmp r12, [r14+8] jz short loc_7DD69 mov rdi, r15; void * call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; 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>>::~pair() mov rdi, r15 mov rsi, r12 call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; 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>>::pair(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 r15, r12 jmp short loc_7DD47 loc_7DD69: mov rdi, r14 call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE8pop_backEv; 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>>>::pop_back(void) loc_7DD71: xor eax, eax cmp rbx, r13 setnz al pop rbx pop r12 pop r13 pop r14 pop r15 retn
_BOOL8 ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_( long long *a1, char *a2) { long long i; // rbx long long v4; // r13 char *v5; // rsi char *j; // r15 for ( i = *a1; ; i += 48LL ) { v4 = a1[1]; if ( i == v4 ) break; v5 = a2; if ( std::operator==<char>(i) ) { for ( j = (char *)i; j + 48 != (char *)a1[1]; j += 48 ) { 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>>::~pair(j); v5 = j + 48; 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>>::pair( (long long)j, (long long)(j + 48)); } 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,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::pop_back( a1, v5); return i != v4; } } return i != v4; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R15,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] LAB_0017dd26: MOV R13,qword ptr [R14 + 0x8] CMP RBX,R13 JZ 0x0017dd71 MOV RDI,RBX MOV RSI,R15 CALL 0x00138a22 TEST AL,AL JNZ 0x0017dd44 ADD RBX,0x30 JMP 0x0017dd26 LAB_0017dd44: MOV R15,RBX LAB_0017dd47: LEA R12,[R15 + 0x30] CMP R12,qword ptr [R14 + 0x8] JZ 0x0017dd69 MOV RDI,R15 CALL 0x00141a18 MOV RDI,R15 MOV RSI,R12 CALL 0x0014267c MOV R15,R12 JMP 0x0017dd47 LAB_0017dd69: MOV RDI,R14 CALL 0x0017dd84 LAB_0017dd71: XOR EAX,EAX CMP RBX,R13 SETNZ AL POP RBX POP R12 POP R13 POP R14 POP R15 RET
bool _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA11_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_ (vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *param_1,char *param_2) { 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>> *ppVar1; string *psVar2; bool bVar3; string *psVar4; pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this; for (psVar4 = *(string **)param_1; psVar2 = *(string **)(param_1 + 8), psVar4 != psVar2; psVar4 = psVar4 + 0x30) { bVar3 = std::operator==(psVar4,param_2); this = (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>> *)psVar4; if (bVar3) goto LAB_0017dd47; } LAB_0017dd71: return psVar4 != psVar2; LAB_0017dd47: while (ppVar1 = this + 0x30, ppVar1 != *(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_1 + 8)) { 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>> ::~pair(this); 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>> ::pair(this,ppVar1); this = ppVar1; } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::pop_back(param_1); goto LAB_0017dd71; }
14,947
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>::basic_json(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
basic_json(const basic_json& other) : json_base_class_t(other) { m_data.m_type = other.m_data.m_type; // check of passed value is valid other.assert_invariant(); switch (m_data.m_type) { case value_t::object: { m_data.m_value = *other.m_data.m_value.object; break; } case value_t::array: { m_data.m_value = *other.m_data.m_value.array; break; } case value_t::string: { m_data.m_value = *other.m_data.m_value.string; break; } case value_t::boolean: { m_data.m_value = other.m_data.m_value.boolean; break; } case value_t::number_integer: { m_data.m_value = other.m_data.m_value.number_integer; break; } case value_t::number_unsigned: { m_data.m_value = other.m_data.m_value.number_unsigned; break; } case value_t::number_float: { m_data.m_value = other.m_data.m_value.number_float; break; } case value_t::binary: { m_data.m_value = *other.m_data.m_value.binary; break; } case value_t::null: case value_t::discarded: default: break; } set_parents(); assert_invariant(); }
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>::basic_json(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 %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movb (%rsi), %al movb %al, (%rdi) movq %rsi, %rdi movl $0x1, %esi callq 0x284e2 movzbl (%rbx), %eax decl %eax cmpl $0x7, %eax ja 0x2d538 leaq 0x8505c(%rip), %rcx # 0xb2550 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x8(%r14), %rax jmp 0x2d534 movq 0x8(%r14), %rdi callq 0x2dd3e jmp 0x2d534 movq 0x8(%r14), %rdi callq 0x2dd8e jmp 0x2d534 movzbl 0x8(%r14), %eax jmp 0x2d534 movq 0x8(%r14), %rdi callq 0x2d9a6 jmp 0x2d534 movq 0x8(%r14), %rdi callq 0x2dbca movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x284e2 jmp 0x2d552 jmp 0x2d552 jmp 0x2d552 movq %rax, %r14 movq %rbx, %rdi callq 0x2d98e movq %r14, %rdi callq 0x19be0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov al, [rsi] mov [rdi], al mov rdi, rsi 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) movzx eax, byte ptr [rbx] dec eax; switch 8 cases cmp eax, 7 ja short def_2D4FB; jumptable 000000000002D4FB default case lea rcx, jpt_2D4FB movsxd rax, ds:(jpt_2D4FB - 0B2550h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2D4FD: mov rax, [r14+8]; jumptable 000000000002D4FB cases 5-7 jmp short loc_2D534 loc_2D503: mov rdi, [r14+8]; jumptable 000000000002D4FB case 3 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&) jmp short loc_2D534 loc_2D50E: mov rdi, [r14+8]; jumptable 000000000002D4FB case 8 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&) jmp short loc_2D534 loc_2D519: movzx eax, byte ptr [r14+8]; jumptable 000000000002D4FB case 4 jmp short loc_2D534 loc_2D520: mov rdi, [r14+8]; jumptable 000000000002D4FB case 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,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>>>> const&>(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>>>> const&) jmp short loc_2D534 loc_2D52B: mov rdi, [r14+8]; jumptable 000000000002D4FB case 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::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>> const&>(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>> const&) loc_2D534: mov [rbx+8], rax def_2D4FB: mov rdi, rbx; jumptable 000000000002D4FB default case mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_2D552 jmp short loc_2D552 jmp short $+2 loc_2D552: mov r14, rax mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov 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>::basic_json( unsigned __int8 *a1, unsigned __int8 *a2) { long long result; // rax *(_OWORD *)a1 = 0LL; *a1 = *a2; 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); result = (unsigned int)*a1 - 1; switch ( *a1 ) { case 1u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>,nlohmann::json_abi_v3_11_3::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>>>> const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 2u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::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>> const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 3u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,std::string const&>( *((_QWORD *)a2 + 1), 1LL); goto LABEL_8; case 4u: result = a2[8]; goto LABEL_8; case 5u: case 6u: case 7u: result = *((_QWORD *)a2 + 1); goto LABEL_8; case 8u: result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>( *((_QWORD *)a2 + 1), 1LL); LABEL_8: *((_QWORD *)a1 + 1) = result; break; default: break; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV AL,byte ptr [RSI] MOV byte ptr [RDI],AL MOV RDI,RSI MOV ESI,0x1 CALL 0x001284e2 MOVZX EAX,byte ptr [RBX] DEC EAX CMP EAX,0x7 JA 0x0012d538 LEA RCX,[0x1b2550] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV RAX,qword ptr [R14 + 0x8] JMP 0x0012d534 caseD_3: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d507: CALL 0x0012dd3e JMP 0x0012d534 caseD_8: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d512: CALL 0x0012dd8e JMP 0x0012d534 caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0012d534 caseD_1: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d524: CALL 0x0012d9a6 JMP 0x0012d534 caseD_2: MOV RDI,qword ptr [R14 + 0x8] LAB_0012d52f: CALL 0x0012dbca LAB_0012d534: MOV qword ptr [RBX + 0x8],RAX default: MOV RDI,RBX MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x001284e2
/* 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(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 *param_1) { string *psVar1; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *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_1; assert_invariant(SUB81(param_1,0)); switch(*this) { case (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: /* try { // try from 0012d524 to 0012d528 has its CatchHandler @ 0012d54e */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>,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>>>>const&> (*(ordered_map **)(param_1 + 8)); break; case (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: /* try { // try from 0012d52f to 0012d533 has its CatchHandler @ 0012d54c */ psVar1 = (string *) create<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>>>,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>>>const&> (*(vector **)(param_1 + 8)); break; case (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: /* try { // try from 0012d507 to 0012d50b has its CatchHandler @ 0012d552 */ psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8)); break; case (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> )0x4: psVar1 = (string *)(ulong)(byte)param_1[8]; break; case (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> )0x5: case (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> )0x6: case (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> )0x7: psVar1 = *(string **)(param_1 + 8); break; case (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: /* try { // try from 0012d512 to 0012d516 has its CatchHandler @ 0012d550 */ psVar1 = (string *) create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&> (*(byte_container_with_subtype **)(param_1 + 8)); break; default: goto switchD_0012d4fb_default; } *(string **)(this + 8) = psVar1; switchD_0012d4fb_default: assert_invariant(SUB81(this,0)); return; }
14,948
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2c6232(%rip), %rax # 0x2ee830 movq (%rax), %r15 cmpl %edi, (%r15) je 0x28705 movq %rsi, %r14 movl %edi, %ebx leaq 0x34532a(%rip), %rdi # 0x36d940 leaq -0x382(%rip), %rsi # 0x2829b callq 0x24260 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x2869a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x27ace movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x27add movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x27af8 movq %rax, 0x90(%rdi) leaq -0x2037(%rip), %rax # 0x2662e movq %rax, 0x98(%rdi) leaq 0x2c61b5(%rip), %rax # 0x2ee828 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x27b16 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x2872a movq %rax, %r15 jmp 0x2869d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x28705 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x2805b movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0x57972 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2a01b movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x28725 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x242e0
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_28705 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_2869A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_2869D loc_2869A: xor r15d, r15d loc_2869D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_28705 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_28705: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_28725 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_28725: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(unsigned long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, unsigned long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(long long); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3ee830] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00128705 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x46d940] LEA RSI,[0x12829b] CALL 0x00124260 CMP EBX,0x7ff JA 0x0012869a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x127ace] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x127add] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x127af8] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x12662e] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3ee828] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x127b16] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012872a MOV R15,RAX JMP 0x0012869d LAB_0012869a: XOR R15D,R15D LAB_0012869d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00128705 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0012805b MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x00157972 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012a01b LAB_00128705: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00128725 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00128725: CALL 0x001242e0
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,949
common_embd_normalize(float const*, float*, int, int)
monkey531[P]llama/common/common.cpp
void common_embd_normalize(const float * inp, float * out, int n, int embd_norm) { double sum = 0.0; switch (embd_norm) { case -1: // no normalisation sum = 1.0; break; case 0: // max absolute for (int i = 0; i < n; i++) { if (sum < std::abs(inp[i])) { sum = std::abs(inp[i]); } } sum /= 32760.0; // make an int16 range break; case 2: // euclidean for (int i = 0; i < n; i++) { sum += inp[i] * inp[i]; } sum = std::sqrt(sum); break; default: // p-norm (euclidean is p-norm p=2) for (int i = 0; i < n; i++) { sum += std::pow(std::abs(inp[i]), embd_norm); } sum = std::pow(sum, 1.0 / embd_norm); break; } const float norm = sum > 0.0 ? 1.0 / sum : 0.0f; for (int i = 0; i < n; i++) { out[i] = inp[i] * norm; } }
O1
cpp
common_embd_normalize(float const*, float*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movsd 0x62b51(%rip), %xmm3 # 0xb68e0 movapd %xmm3, %xmm0 cmpl $-0x1, %ecx je 0x53ea4 testl %ecx, %ecx je 0x53de2 cmpl $0x2, %ecx jne 0x53e18 xorpd %xmm1, %xmm1 xorpd %xmm0, %xmm0 testl %ebp, %ebp jle 0x53dcf movl %ebp, %eax xorl %ecx, %ecx movss (%r14,%rcx,4), %xmm2 mulss %xmm2, %xmm2 cvtss2sd %xmm2, %xmm2 addsd %xmm2, %xmm0 incq %rcx cmpq %rcx, %rax jne 0x53db5 ucomisd %xmm1, %xmm0 jb 0x53e72 sqrtsd %xmm0, %xmm0 jmp 0x53ea4 testl %ebp, %ebp jle 0x53e79 movl %ebp, %eax xorpd %xmm2, %xmm2 xorl %ecx, %ecx movaps 0x62a87(%rip), %xmm1 # 0xb6880 movss (%r14,%rcx,4), %xmm0 andps %xmm1, %xmm0 cvtss2sd %xmm0, %xmm0 maxsd %xmm2, %xmm0 incq %rcx movapd %xmm0, %xmm2 cmpq %rcx, %rax jne 0x53df9 jmp 0x53e7d cvtsi2sd %ecx, %xmm2 testl %ebp, %ebp jle 0x53e87 movl %ebp, %r15d xorpd %xmm0, %xmm0 xorl %r12d, %r12d movsd %xmm2, 0x8(%rsp) movsd %xmm0, (%rsp) movss (%r14,%r12,4), %xmm0 andps 0x62a3e(%rip), %xmm0 # 0xb6880 cvtss2sd %xmm0, %xmm0 movapd %xmm2, %xmm1 callq 0x19de0 movsd 0x8(%rsp), %xmm2 movsd (%rsp), %xmm1 addsd %xmm0, %xmm1 movsd %xmm1, (%rsp) movsd (%rsp), %xmm0 incq %r12 cmpq %r12, %r15 jne 0x53e30 jmp 0x53e8b callq 0x195e0 jmp 0x53e9c xorpd %xmm0, %xmm0 divsd 0x62a63(%rip), %xmm0 # 0xb68e8 jmp 0x53ea4 xorpd %xmm0, %xmm0 movsd 0x62a4d(%rip), %xmm1 # 0xb68e0 divsd %xmm2, %xmm1 callq 0x19de0 movsd 0x62a3c(%rip), %xmm3 # 0xb68e0 testl %ebp, %ebp jle 0x53eda divsd %xmm0, %xmm3 xorps %xmm1, %xmm1 cmpltsd %xmm0, %xmm1 andpd %xmm3, %xmm1 xorps %xmm0, %xmm0 cvtsd2ss %xmm1, %xmm0 movl %ebp, %eax xorl %ecx, %ecx movss (%r14,%rcx,4), %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rbx,%rcx,4) incq %rcx cmpq %rcx, %rax jne 0x53ec3 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_Z21common_embd_normalizePKfPfii: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov ebp, edx mov rbx, rsi mov r14, rdi movsd xmm3, cs:qword_B68E0 movapd xmm0, xmm3 cmp ecx, 0FFFFFFFFh jz loc_53EA4 test ecx, ecx jz short loc_53DE2 cmp ecx, 2 jnz short loc_53E18 xorpd xmm1, xmm1 xorpd xmm0, xmm0 test ebp, ebp jle short loc_53DCF mov eax, ebp xor ecx, ecx loc_53DB5: movss xmm2, dword ptr [r14+rcx*4] mulss xmm2, xmm2 cvtss2sd xmm2, xmm2 addsd xmm0, xmm2 inc rcx cmp rax, rcx jnz short loc_53DB5 loc_53DCF: ucomisd xmm0, xmm1 jb loc_53E72 sqrtsd xmm0, xmm0 jmp loc_53EA4 loc_53DE2: test ebp, ebp jle loc_53E79 mov eax, ebp xorpd xmm2, xmm2 xor ecx, ecx movaps xmm1, cs:xmmword_B6880 loc_53DF9: movss xmm0, dword ptr [r14+rcx*4] andps xmm0, xmm1 cvtss2sd xmm0, xmm0 maxsd xmm0, xmm2 inc rcx movapd xmm2, xmm0 cmp rax, rcx jnz short loc_53DF9 jmp short loc_53E7D loc_53E18: cvtsi2sd xmm2, ecx test ebp, ebp jle short loc_53E87 mov r15d, ebp xorpd xmm0, xmm0 xor r12d, r12d movsd [rsp+38h+var_30], xmm2 loc_53E30: movsd [rsp+38h+var_38], xmm0 movss xmm0, dword ptr [r14+r12*4] andps xmm0, cs:xmmword_B6880 cvtss2sd xmm0, xmm0 movapd xmm1, xmm2 call _pow movsd xmm2, [rsp+38h+var_30] movsd xmm1, [rsp+38h+var_38] addsd xmm1, xmm0 movsd [rsp+38h+var_38], xmm1 movsd xmm0, [rsp+38h+var_38] inc r12 cmp r15, r12 jnz short loc_53E30 jmp short loc_53E8B loc_53E72: call _sqrt jmp short loc_53E9C loc_53E79: xorpd xmm0, xmm0 loc_53E7D: divsd xmm0, cs:qword_B68E8 jmp short loc_53EA4 loc_53E87: xorpd xmm0, xmm0 loc_53E8B: movsd xmm1, cs:qword_B68E0 divsd xmm1, xmm2 call _pow loc_53E9C: movsd xmm3, cs:qword_B68E0 loc_53EA4: test ebp, ebp jle short loc_53EDA divsd xmm3, xmm0 xorps xmm1, xmm1 cmpltsd xmm1, xmm0 andpd xmm1, xmm3 xorps xmm0, xmm0 cvtsd2ss xmm0, xmm1 mov eax, ebp xor ecx, ecx loc_53EC3: movss xmm1, dword ptr [r14+rcx*4] mulss xmm1, xmm0 movss dword ptr [rbx+rcx*4], xmm1 inc rcx cmp rax, rcx jnz short loc_53EC3 loc_53EDA: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
void common_embd_normalize(const float *a1, float *a2, int a3, int a4) { __m128d v5; // xmm0 double v6; // xmm0_8 long long i; // rcx double v8; // xmm2_8 long long v9; // rcx double v10; // xmm0_8 double v11; // xmm2_8 double v12; // xmm0_8 long long v13; // r12 double v14; // xmm0_8 float v15; // xmm0_4 long long v16; // rcx double v17; // [rsp+0h] [rbp-38h] double v18; // [rsp+8h] [rbp-30h] v5.m128d_f64[0] = 1.0; if ( a4 != -1 ) { if ( a4 ) { if ( a4 == 2 ) { v6 = 0.0; if ( a3 > 0 ) { for ( i = 0LL; i != a3; ++i ) v6 = v6 + (float)(a1[i] * a1[i]); } if ( v6 < 0.0 ) v5.m128d_f64[0] = sqrt(v6); else v5.m128d_f64[0] = sqrt(v6); } else { v11 = (double)a4; if ( a3 <= 0 ) { v12 = 0.0; } else { v12 = 0.0; v13 = 0LL; v18 = (double)a4; do { v17 = v12; v14 = pow(fabs(a1[v13]), v11); v11 = v18; v12 = v17 + v14; ++v13; } while ( a3 != v13 ); } v5.m128d_f64[0] = pow(v12, 1.0 / v11); } } else { if ( a3 <= 0 ) { v10 = 0.0; } else { v8 = 0.0; v9 = 0LL; do { v10 = fmax(fabs(a1[v9++]), v8); v8 = v10; } while ( a3 != v9 ); } v5.m128d_f64[0] = v10 / 32760.0; } } if ( a3 > 0 ) { v15 = COERCE_DOUBLE(*(_OWORD *)&_mm_cmplt_sd((__m128d)0LL, v5) & COERCE_UNSIGNED_INT64(1.0 / v5.m128d_f64[0])); v16 = 0LL; do { a2[v16] = a1[v16] * v15; ++v16; } while ( a3 != v16 ); } }
common_embd_normalize: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBP,EDX MOV RBX,RSI MOV R14,RDI MOVSD XMM3,qword ptr [0x001b68e0] MOVAPD XMM0,XMM3 CMP ECX,-0x1 JZ 0x00153ea4 TEST ECX,ECX JZ 0x00153de2 CMP ECX,0x2 JNZ 0x00153e18 XORPD XMM1,XMM1 XORPD XMM0,XMM0 TEST EBP,EBP JLE 0x00153dcf MOV EAX,EBP XOR ECX,ECX LAB_00153db5: MOVSS XMM2,dword ptr [R14 + RCX*0x4] MULSS XMM2,XMM2 CVTSS2SD XMM2,XMM2 ADDSD XMM0,XMM2 INC RCX CMP RAX,RCX JNZ 0x00153db5 LAB_00153dcf: UCOMISD XMM0,XMM1 JC 0x00153e72 SQRTSD XMM0,XMM0 JMP 0x00153ea4 LAB_00153de2: TEST EBP,EBP JLE 0x00153e79 MOV EAX,EBP XORPD XMM2,XMM2 XOR ECX,ECX MOVAPS XMM1,xmmword ptr [0x001b6880] LAB_00153df9: MOVSS XMM0,dword ptr [R14 + RCX*0x4] ANDPS XMM0,XMM1 CVTSS2SD XMM0,XMM0 MAXSD XMM0,XMM2 INC RCX MOVAPD XMM2,XMM0 CMP RAX,RCX JNZ 0x00153df9 JMP 0x00153e7d LAB_00153e18: CVTSI2SD XMM2,ECX TEST EBP,EBP JLE 0x00153e87 MOV R15D,EBP XORPD XMM0,XMM0 XOR R12D,R12D MOVSD qword ptr [RSP + 0x8],XMM2 LAB_00153e30: MOVSD qword ptr [RSP],XMM0 MOVSS XMM0,dword ptr [R14 + R12*0x4] ANDPS XMM0,xmmword ptr [0x001b6880] CVTSS2SD XMM0,XMM0 MOVAPD XMM1,XMM2 CALL 0x00119de0 MOVSD XMM2,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] ADDSD XMM1,XMM0 MOVSD qword ptr [RSP],XMM1 MOVSD XMM0,qword ptr [RSP] INC R12 CMP R15,R12 JNZ 0x00153e30 JMP 0x00153e8b LAB_00153e72: CALL 0x001195e0 JMP 0x00153e9c LAB_00153e79: XORPD XMM0,XMM0 LAB_00153e7d: DIVSD XMM0,qword ptr [0x001b68e8] JMP 0x00153ea4 LAB_00153e87: XORPD XMM0,XMM0 LAB_00153e8b: MOVSD XMM1,qword ptr [0x001b68e0] DIVSD XMM1,XMM2 CALL 0x00119de0 LAB_00153e9c: MOVSD XMM3,qword ptr [0x001b68e0] LAB_00153ea4: TEST EBP,EBP JLE 0x00153eda DIVSD XMM3,XMM0 XORPS XMM1,XMM1 CMPLTSD XMM1,XMM0 ANDPD XMM1,XMM3 XORPS XMM0,XMM0 CVTSD2SS XMM0,XMM1 MOV EAX,EBP XOR ECX,ECX LAB_00153ec3: MOVSS XMM1,dword ptr [R14 + RCX*0x4] MULSS XMM1,XMM0 MOVSS dword ptr [RBX + RCX*0x4],XMM1 INC RCX CMP RAX,RCX JNZ 0x00153ec3 LAB_00153eda: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_embd_normalize(float const*, float*, int, int) */ void common_embd_normalize(float *param_1,float *param_2,int param_3,int param_4) { ulong uVar1; double dVar2; double dVar3; dVar2 = DAT_001b68e0; if (param_4 != -1) { if (param_4 == 0) { if (param_3 < 1) { dVar2 = 0.0; } else { uVar1 = 0; dVar3 = 0.0; do { dVar2 = (double)(float)((uint)param_1[uVar1] & _DAT_001b6880); if ((double)(float)((uint)param_1[uVar1] & _DAT_001b6880) <= dVar3) { dVar2 = dVar3; } uVar1 = uVar1 + 1; dVar3 = dVar2; } while ((uint)param_3 != uVar1); } dVar2 = dVar2 / _DAT_001b68e8; } else if (param_4 == 2) { dVar2 = 0.0; if (0 < param_3) { uVar1 = 0; do { dVar2 = dVar2 + (double)(param_1[uVar1] * param_1[uVar1]); uVar1 = uVar1 + 1; } while ((uint)param_3 != uVar1); } if (0.0 <= dVar2) { dVar2 = SQRT(dVar2); } else { dVar2 = sqrt(dVar2); } } else { if (param_3 < 1) { dVar2 = 0.0; } else { dVar2 = 0.0; uVar1 = 0; do { dVar3 = pow((double)(float)((uint)param_1[uVar1] & _DAT_001b6880),(double)param_4); dVar2 = dVar2 + dVar3; uVar1 = uVar1 + 1; } while ((uint)param_3 != uVar1); } dVar2 = pow(dVar2,DAT_001b68e0 / (double)param_4); } } if (0 < param_3) { dVar3 = DAT_001b68e0 / dVar2; uVar1 = 0; do { param_2[uVar1] = param_1[uVar1] * (float)(double)(-(ulong)(0.0 < dVar2) & (ulong)dVar3); uVar1 = uVar1 + 1; } while ((uint)param_3 != uVar1); } return; }
14,950
spell_halion_twilight_phasing_aura::EffectApplyHandlerFunction::~EffectApplyHandlerFunction()
SylCore-WoTLK/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*handle*/) { GetTarget()->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); GetTarget()->ToCreature()->SetReactState(REACT_DEFENSIVE); GetTarget()->GetMotionMaster()->Clear(); GetTarget()->GetThreatMgr().clearReferences(); GetTarget()->RemoveAllAttackers(); GetTarget()->AttackStop(); }
O3
cpp
spell_halion_twilight_phasing_aura::EffectApplyHandlerFunction::~EffectApplyHandlerFunction(): movl $0x28, %esi jmp 0x10a22f0
_ZN34spell_halion_twilight_phasing_aura26EffectApplyHandlerFunctionD0Ev: mov esi, 28h ; '('; unsigned __int64 jmp _ZdlPvm; operator delete(void *,ulong)
void spell_halion_twilight_phasing_aura::EffectApplyHandlerFunction::~EffectApplyHandlerFunction( spell_halion_twilight_phasing_aura::EffectApplyHandlerFunction *this) { operator delete(this, 0x28uLL); }
_M_invoke: MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x120] TEST byte ptr [RAX + 0x2781],0x80 SETZ AL RET
/* std::_Function_handler<bool (), boss_dorothee::boss_dorothee(Creature*)::{lambda()#1}>::_M_invoke(std::_Any_data const&) */ int8 std::_Function_handler<bool(),boss_dorothee::boss_dorothee(Creature*)::{lambda()#1}>::_M_invoke (_Any_data *param_1) { return CONCAT71((int7)((ulong)*(long *)(*(long *)param_1 + 0x120) >> 8), (*(byte *)(*(long *)(*(long *)param_1 + 0x120) + 0x2781) & 0x80) == 0); }
14,951
translog_get_last_page_addr
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_get_last_page_addr(TRANSLOG_ADDRESS *addr, my_bool *last_page_ok, my_bool no_errors) { char path[FN_REFLEN]; uint32 rec_offset; my_off_t file_size; uint32 file_no= LSN_FILE_NO(*addr); TRANSLOG_FILE *file; #ifndef DBUG_OFF char buff[21]; #endif DBUG_ENTER("translog_get_last_page_addr"); if (likely((file= get_logfile_by_number(file_no)) != NULL)) { /* This function used only during initialization of loghandler or in scanner (which mean we need read that part of the log), so the requested log file have to be opened and can't be freed after returning pointer on it (file_size). */ file_size= mysql_file_seek(file->handler.file, 0, SEEK_END, MYF(0)); } else { /* This branch is used only during very early initialization when files are not opened. */ File fd; if ((fd= mysql_file_open(key_file_translog, translog_filename_by_fileno(file_no, path), O_RDONLY | O_CLOEXEC, (no_errors ? MYF(0) : MYF(MY_WME)))) < 0) { my_errno= errno; DBUG_PRINT("error", ("Error %d during opening file #%d", errno, file_no)); DBUG_RETURN(1); } file_size= mysql_file_seek(fd, 0, SEEK_END, MYF(0)); mysql_file_close(fd, MYF(0)); } DBUG_PRINT("info", ("File size: %s", llstr(file_size, buff))); if (file_size == MY_FILEPOS_ERROR) DBUG_RETURN(1); DBUG_ASSERT(file_size < 0xffffffffULL); if (((uint32)file_size) > TRANSLOG_PAGE_SIZE) { rec_offset= (((((uint32)file_size) / TRANSLOG_PAGE_SIZE) - 1) * TRANSLOG_PAGE_SIZE); *last_page_ok= (((uint32)file_size) == rec_offset + TRANSLOG_PAGE_SIZE); } else { *last_page_ok= 0; rec_offset= 0; } *addr= MAKE_LSN(file_no, rec_offset); DBUG_PRINT("info", ("Last page: 0x%lx ok: %d", (ulong) rec_offset, *last_page_ok)); DBUG_RETURN(0); }
O0
c
translog_get_last_page_addr: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movb %dl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movb %al, -0x229(%rbp) movq -0x220(%rbp), %rax movq (%rax), %rax sarq $0x20, %rax movl %eax, -0x23c(%rbp) movl -0x23c(%rbp), %edi callq 0x53ec0 movq %rax, -0x248(%rbp) cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x4d238 movq -0x248(%rbp), %rax movl 0x18(%rax), %edx leaq 0x10d33d(%rip), %rdi # 0x15a551 movl $0xcd4, %esi # imm = 0xCD4 xorl %eax, %eax movl %eax, %r9d movl $0x2, %r8d movq %r9, %rcx callq 0x4d530 movq %rax, -0x238(%rbp) jmp 0x4d30b leaq 0x435a25(%rip), %rax # 0x482c64 movl (%rax), %eax movl %eax, -0x250(%rbp) movl -0x23c(%rbp), %edi leaq -0x210(%rbp), %rsi callq 0x4ad20 movl -0x250(%rbp), %edi movq %rax, %rcx movsbl -0x229(%rbp), %edx movl $0x10, %r9d xorl %eax, %eax cmpl $0x0, %edx cmovneq %rax, %r9 leaq 0x10d2d2(%rip), %rsi # 0x15a551 movl $0xcdf, %edx # imm = 0xCDF movl $0x80000, %r8d # imm = 0x80000 callq 0x53d50 movl %eax, -0x24c(%rbp) cmpl $0x0, %eax jge 0x4d2c4 callq 0x2a7a0 movl (%rax), %eax movl %eax, -0x254(%rbp) callq 0xfabb0 movl -0x254(%rbp), %ecx movl %ecx, (%rax) jmp 0x4d2b6 jmp 0x4d2b8 movb $0x1, -0x211(%rbp) jmp 0x4d3b7 movl -0x24c(%rbp), %edx leaq 0x10d280(%rip), %rdi # 0x15a551 movl $0xce6, %esi # imm = 0xCE6 xorl %eax, %eax movl %eax, %r9d movl $0x2, %r8d movq %r9, %rcx callq 0x4d530 movq %rax, -0x238(%rbp) movl -0x24c(%rbp), %edx leaq 0x10d254(%rip), %rdi # 0x15a551 movl $0xce7, %esi # imm = 0xCE7 xorl %eax, %eax movl %eax, %ecx callq 0x4b3c0 jmp 0x4d30d jmp 0x4d30f cmpq $-0x1, -0x238(%rbp) jne 0x4d327 jmp 0x4d31b movb $0x1, -0x211(%rbp) jmp 0x4d3b7 jmp 0x4d329 jmp 0x4d32b movq -0x238(%rbp), %rax cmpl $0x2000, %eax # imm = 0x2000 jbe 0x4d379 movq -0x238(%rbp), %rax shrl $0xd, %eax subl $0x1, %eax shll $0xd, %eax movl %eax, -0x230(%rbp) movq -0x238(%rbp), %rax movl -0x230(%rbp), %ecx addl $0x2000, %ecx # imm = 0x2000 cmpl %ecx, %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x228(%rbp), %rax movb %cl, (%rax) jmp 0x4d38d movq -0x228(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x230(%rbp) movl -0x23c(%rbp), %eax movl %eax, %ecx shlq $0x20, %rcx movl -0x230(%rbp), %eax orq %rax, %rcx movq -0x220(%rbp), %rax movq %rcx, (%rax) jmp 0x4d3ae jmp 0x4d3b0 movb $0x0, -0x211(%rbp) movb -0x211(%rbp), %al movb %al, -0x255(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4d3e4 movb -0x255(%rbp), %al addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a270 nopl (%rax)
translog_get_last_page_addr: push rbp mov rbp, rsp sub rsp, 260h mov al, dl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_229], al mov rax, [rbp+var_220] mov rax, [rax] sar rax, 20h mov [rbp+var_23C], eax mov edi, [rbp+var_23C] call get_logfile_by_number mov [rbp+var_248], rax cmp rax, 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_4D238 mov rax, [rbp+var_248] mov edx, [rax+18h] lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0CD4h xor eax, eax mov r9d, eax mov r8d, 2 mov rcx, r9 call inline_mysql_file_seek_2 mov [rbp+var_238], rax jmp loc_4D30B loc_4D238: lea rax, key_file_translog mov eax, [rax] mov [rbp+var_250], eax mov edi, [rbp+var_23C] lea rsi, [rbp+var_210] call translog_filename_by_fileno mov edi, [rbp+var_250] mov rcx, rax movsx edx, [rbp+var_229] mov r9d, 10h xor eax, eax cmp edx, 0 cmovnz r9, rax lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0CDFh mov r8d, offset loc_80000 call inline_mysql_file_open_0 mov [rbp+var_24C], eax cmp eax, 0 jge short loc_4D2C4 call ___errno_location mov eax, [rax] mov [rbp+var_254], eax call _my_thread_var mov ecx, [rbp+var_254] mov [rax], ecx jmp short $+2 loc_4D2B6: jmp short $+2 loc_4D2B8: mov [rbp+var_211], 1 jmp loc_4D3B7 loc_4D2C4: mov edx, [rbp+var_24C] lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0CE6h xor eax, eax mov r9d, eax mov r8d, 2 mov rcx, r9 call inline_mysql_file_seek_2 mov [rbp+var_238], rax mov edx, [rbp+var_24C] lea rdi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 0CE7h xor eax, eax mov ecx, eax call inline_mysql_file_close_2 loc_4D30B: jmp short $+2 loc_4D30D: jmp short $+2 loc_4D30F: cmp [rbp+var_238], 0FFFFFFFFFFFFFFFFh jnz short loc_4D327 jmp short $+2 loc_4D31B: mov [rbp+var_211], 1 jmp loc_4D3B7 loc_4D327: jmp short $+2 loc_4D329: jmp short $+2 loc_4D32B: mov rax, [rbp+var_238] cmp eax, 2000h jbe short loc_4D379 mov rax, [rbp+var_238] shr eax, 0Dh sub eax, 1 shl eax, 0Dh mov [rbp+var_230], eax mov rax, [rbp+var_238] mov ecx, [rbp+var_230] add ecx, 2000h cmp eax, ecx setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_228] mov [rax], cl jmp short loc_4D38D loc_4D379: mov rax, [rbp+var_228] mov byte ptr [rax], 0 mov [rbp+var_230], 0 loc_4D38D: mov eax, [rbp+var_23C] mov ecx, eax shl rcx, 20h mov eax, [rbp+var_230] or rcx, rax mov rax, [rbp+var_220] mov [rax], rcx jmp short $+2 loc_4D3AE: jmp short $+2 loc_4D3B0: mov [rbp+var_211], 0 loc_4D3B7: mov al, [rbp+var_211] mov [rbp+var_255], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4D3E4 mov al, [rbp+var_255] add rsp, 260h pop rbp retn loc_4D3E4: call ___stack_chk_fail
char translog_get_last_page_addr(unsigned long long *a1, bool *a2, char a3) { long long v3; // rdx long long v4; // rcx int v5; // r8d int v6; // r9d long long v7; // rdi long long v8; // rcx long long v9; // r9 long long v10; // rdx int v12; // [rsp+Ch] [rbp-254h] signed int v13; // [rsp+14h] [rbp-24Ch] long long logfile_by_number; // [rsp+18h] [rbp-248h] unsigned int v15; // [rsp+24h] [rbp-23Ch] long long v16; // [rsp+28h] [rbp-238h] unsigned int v17; // [rsp+30h] [rbp-230h] _BYTE v21[520]; // [rsp+50h] [rbp-210h] BYREF unsigned long long v22; // [rsp+258h] [rbp-8h] v22 = __readfsqword(0x28u); v15 = HIDWORD(*a1); logfile_by_number = get_logfile_by_number(v15); if ( logfile_by_number ) { v16 = inline_mysql_file_seek_2( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3284LL, *(unsigned int *)(logfile_by_number + 24), 0LL, 2LL); } else { v7 = key_file_translog; v8 = translog_filename_by_fileno(v15, (long long)v21, v3, v4, v5, v6); v9 = 16LL; if ( a3 ) v9 = 0LL; v13 = inline_mysql_file_open_0( v7, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3295LL, v8, &loc_80000, v9); if ( v13 < 0 ) { v12 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(v7, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", v10) = v12; return 1; } v16 = inline_mysql_file_seek_2( "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 3302LL, (unsigned int)v13, 0LL, 2LL); inline_mysql_file_close_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xCE7u, v13, 0LL); } if ( v16 == -1 ) return 1; if ( (unsigned int)v16 <= 0x2000 ) { *a2 = 0; v17 = 0; } else { v17 = (((unsigned int)v16 >> 13) - 1) << 13; *a2 = (_DWORD)v16 == v17 + 0x2000; } *a1 = v17 | ((unsigned long long)v15 << 32); return 0; }
translog_get_last_page_addr: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV AL,DL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV byte ptr [RBP + -0x229],AL MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX] SAR RAX,0x20 MOV dword ptr [RBP + -0x23c],EAX MOV EDI,dword ptr [RBP + -0x23c] CALL 0x00153ec0 MOV qword ptr [RBP + -0x248],RAX CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0014d238 MOV RAX,qword ptr [RBP + -0x248] MOV EDX,dword ptr [RAX + 0x18] LEA RDI,[0x25a551] MOV ESI,0xcd4 XOR EAX,EAX MOV R9D,EAX MOV R8D,0x2 MOV RCX,R9 CALL 0x0014d530 MOV qword ptr [RBP + -0x238],RAX JMP 0x0014d30b LAB_0014d238: LEA RAX,[0x582c64] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x250],EAX MOV EDI,dword ptr [RBP + -0x23c] LEA RSI,[RBP + -0x210] CALL 0x0014ad20 MOV EDI,dword ptr [RBP + -0x250] MOV RCX,RAX MOVSX EDX,byte ptr [RBP + -0x229] MOV R9D,0x10 XOR EAX,EAX CMP EDX,0x0 CMOVNZ R9,RAX LEA RSI,[0x25a551] MOV EDX,0xcdf MOV R8D,0x80000 CALL 0x00153d50 MOV dword ptr [RBP + -0x24c],EAX CMP EAX,0x0 JGE 0x0014d2c4 CALL 0x0012a7a0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x254],EAX CALL 0x001fabb0 MOV ECX,dword ptr [RBP + -0x254] MOV dword ptr [RAX],ECX JMP 0x0014d2b6 LAB_0014d2b6: JMP 0x0014d2b8 LAB_0014d2b8: MOV byte ptr [RBP + -0x211],0x1 JMP 0x0014d3b7 LAB_0014d2c4: MOV EDX,dword ptr [RBP + -0x24c] LEA RDI,[0x25a551] MOV ESI,0xce6 XOR EAX,EAX MOV R9D,EAX MOV R8D,0x2 MOV RCX,R9 CALL 0x0014d530 MOV qword ptr [RBP + -0x238],RAX MOV EDX,dword ptr [RBP + -0x24c] LEA RDI,[0x25a551] MOV ESI,0xce7 XOR EAX,EAX MOV ECX,EAX CALL 0x0014b3c0 LAB_0014d30b: JMP 0x0014d30d LAB_0014d30d: JMP 0x0014d30f LAB_0014d30f: CMP qword ptr [RBP + -0x238],-0x1 JNZ 0x0014d327 JMP 0x0014d31b LAB_0014d31b: MOV byte ptr [RBP + -0x211],0x1 JMP 0x0014d3b7 LAB_0014d327: JMP 0x0014d329 LAB_0014d329: JMP 0x0014d32b LAB_0014d32b: MOV RAX,qword ptr [RBP + -0x238] CMP EAX,0x2000 JBE 0x0014d379 MOV RAX,qword ptr [RBP + -0x238] SHR EAX,0xd SUB EAX,0x1 SHL EAX,0xd MOV dword ptr [RBP + -0x230],EAX MOV RAX,qword ptr [RBP + -0x238] MOV ECX,dword ptr [RBP + -0x230] ADD ECX,0x2000 CMP EAX,ECX SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x228] MOV byte ptr [RAX],CL JMP 0x0014d38d LAB_0014d379: MOV RAX,qword ptr [RBP + -0x228] MOV byte ptr [RAX],0x0 MOV dword ptr [RBP + -0x230],0x0 LAB_0014d38d: MOV EAX,dword ptr [RBP + -0x23c] MOV ECX,EAX SHL RCX,0x20 MOV EAX,dword ptr [RBP + -0x230] OR RCX,RAX MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RAX],RCX JMP 0x0014d3ae LAB_0014d3ae: JMP 0x0014d3b0 LAB_0014d3b0: MOV byte ptr [RBP + -0x211],0x0 LAB_0014d3b7: MOV AL,byte ptr [RBP + -0x211] MOV byte ptr [RBP + -0x255],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014d3e4 MOV AL,byte ptr [RBP + -0x255] ADD RSP,0x260 POP RBP RET LAB_0014d3e4: CALL 0x0012a270
int8 translog_get_last_page_addr(int8 *param_1,int1 *param_2,char param_3) { int4 uVar1; int4 uVar2; int iVar3; long lVar4; int8 uVar5; int *piVar6; int8 uVar7; long in_FS_OFFSET; ulong local_240; int local_238; int1 local_219; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = (int4)((ulong)*param_1 >> 0x20); lVar4 = get_logfile_by_number(uVar2); uVar1 = key_file_translog; if (lVar4 == 0) { uVar5 = translog_filename_by_fileno(uVar2,local_218); uVar7 = 0x10; if (param_3 != '\0') { uVar7 = 0; } iVar3 = inline_mysql_file_open (uVar1, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xcdf,uVar5,0x80000,uVar7); if (iVar3 < 0) { piVar6 = __errno_location(); iVar3 = *piVar6; piVar6 = (int *)_my_thread_var(); *piVar6 = iVar3; local_219 = 1; goto LAB_0014d3b7; } local_240 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xce6,iVar3,0,2); inline_mysql_file_close ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0xce7,iVar3, 0); } else { local_240 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xcd4,*(int4 *)(lVar4 + 0x18),0,2); } if (local_240 == 0xffffffffffffffff) { local_219 = 1; } else { if ((uint)local_240 < 0x2001) { *param_2 = 0; local_238 = 0; } else { local_238 = (((uint)(local_240 >> 0xd) & 0x7ffff) - 1) * 0x2000; *param_2 = (uint)local_240 == local_238 + 0x2000U; } *param_1 = CONCAT44(uVar2,local_238); local_219 = 0; } LAB_0014d3b7: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_219); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,952
my_snprintf_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_utf32(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_utf32(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_utf32: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0x50ab3 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 %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) addq %rsi, %rbx leaq -0x40(%rbp), %r14 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0x50b1d testl %eax, %eax je 0x50c9e cmpq %rbx, %r12 jae 0x50c9e movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r15), %al movb %al, 0x3(%r12) addq $0x4, %r12 incq %r15 jmp 0x50ae5 addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0x50b38 movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0x50b3d incq %r15 jmp 0x50b21 cmpl $0x6c, %ecx jne 0x50b47 movb (%r15), %al jmp 0x50b4a decq %r15 cmpb $0x64, %al je 0x50b7a movzbl %al, %eax cmpl $0x75, %eax je 0x50b7a cmpl $0x73, %eax jne 0x50ba2 movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x50c1b movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x50c27 movq %rbx, %rax subq %r12, %rax cmpq $0x3f, %rax jbe 0x50c9e movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x50bb8 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x50bc4 cmpq %rbx, %r12 je 0x50c9b movl $0x25000000, (%r12) # imm = 0x25000000 jmp 0x50b14 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0x50bd7 movq %r14, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x50be1 movl %edi, %edi movq %r14, %rsi movl $0xa, %edx callq 0x617e2 cmpb $0x0, -0x40(%rbp) je 0x50b18 leaq -0x3f(%rbp), %rax movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb -0x1(%rax), %cl movb %cl, 0x3(%r12) addq $0x4, %r12 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0x50bf4 jmp 0x50b18 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r14 subq %r12, %r14 testq %r13, %r13 leaq 0x17000(%rip), %rax # 0x67c3a cmoveq %rax, %r13 movq %r13, %rdi callq 0x24170 leaq (,%rax,4), %rdx movq %r14, %rcx shrq $0x2, %rcx decq %rcx cmpq %rdx, %r14 cmovaq %rax, %rcx testq %rcx, %rcx je 0x50c92 xorl %eax, %eax leaq -0x40(%rbp), %r14 movw $0x0, (%r12) movb $0x0, 0x2(%r12) movb (%r13,%rax), %dl movb %dl, 0x3(%r12) addq $0x4, %r12 incq %rax cmpq %rax, %rcx jne 0x50c6a jmp 0x50b18 leaq -0x40(%rbp), %r14 jmp 0x50b18 movq %rbx, %r12 movl $0x0, (%r12) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x50cce subq -0x68(%rbp), %r12 movq %r12, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x243e0
my_snprintf_utf32: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov rbx, rdx mov r12, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_50AB3 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_50AB3: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax add rbx, rsi lea r14, [rbp+var_40] mov [rbp+var_68], rsi loc_50AE5: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_50B1D test eax, eax jz loc_50C9E cmp r12, rbx jnb loc_50C9E mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov al, [r15] mov [r12+3], al loc_50B14: add r12, 4 loc_50B18: inc r15 jmp short loc_50AE5 loc_50B1D: add r15, 2 loc_50B21: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_50B38 movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_50B3D loc_50B38: inc r15 jmp short loc_50B21 loc_50B3D: cmp ecx, 6Ch ; 'l' jnz short loc_50B47 mov al, [r15] jmp short loc_50B4A loc_50B47: dec r15 loc_50B4A: cmp al, 64h ; 'd' jz short loc_50B7A movzx eax, al cmp eax, 75h ; 'u' jz short loc_50B7A cmp eax, 73h ; 's' jnz short loc_50BA2 mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_50C1B mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_50C27 loc_50B7A: mov rax, rbx sub rax, r12 cmp rax, 3Fh ; '?' jbe loc_50C9E mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_50BB8 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_50BC4 loc_50BA2: cmp r12, rbx jz loc_50C9B mov dword ptr [r12], 25000000h jmp loc_50B14 loc_50BB8: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_50BC4: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_50BD7 mov rsi, r14 mov edx, 0FFFFFFF6h jmp short loc_50BE1 loc_50BD7: mov edi, edi mov rsi, r14 mov edx, 0Ah loc_50BE1: call int10_to_str cmp [rbp+var_40], 0 jz loc_50B18 lea rax, [rbp+var_3F] loc_50BF4: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov cl, [rax-1] mov [r12+3], cl add r12, 4 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_50BF4 jmp loc_50B18 loc_50C1B: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_50C27: mov r13, [rax] mov r14, rbx sub r14, r12 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, ds:0[rax*4] mov rcx, r14 shr rcx, 2 dec rcx cmp r14, rdx cmova rcx, rax test rcx, rcx jz short loc_50C92 xor eax, eax lea r14, [rbp+var_40] loc_50C6A: mov word ptr [r12], 0 mov byte ptr [r12+2], 0 mov dl, [r13+rax+0] mov [r12+3], dl add r12, 4 inc rax cmp rcx, rax jnz short loc_50C6A jmp loc_50B18 loc_50C92: lea r14, [rbp+var_40] jmp loc_50B18 loc_50C9B: mov r12, rbx loc_50C9E: mov dword ptr [r12], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_50CCE sub r12, [rbp+var_68] mov rax, r12 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_50CCE: call ___stack_chk_fail
unsigned long long my_snprintf_utf32( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, unsigned long long a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { unsigned long long v16; // r12 unsigned long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r14 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] unsigned long long v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = a10 + a11; v42 = a10; while ( 1 ) { if ( *a12 != 37 ) { if ( !*a12 || v16 >= v17 ) goto LABEL_44; *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *a12; goto LABEL_6; } for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 != 100 && v18 != 117 ) break; if ( v17 - v16 <= 0x3F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = *(v23 - 1); v16 += 4LL; } while ( *v23++ != 0 ); } LABEL_7: ++a12; } if ( v18 == 115 ) { if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 2) - 1; if ( v26 > 4 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *(_WORD *)v16 = 0; *(_BYTE *)(v16 + 2) = 0; *(_BYTE *)(v16 + 3) = v25[i]; v16 += 4LL; } } goto LABEL_7; } if ( v16 != v17 ) { *(_DWORD *)v16 = 620756992; LABEL_6: v16 += 4LL; goto LABEL_7; } v16 = v17; LABEL_44: *(_DWORD *)v16 = 0; return v16 - v42; }
my_snprintf_utf32: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x00150ab3 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_00150ab3: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX ADD RBX,RSI LEA R14,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_00150ae5: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x00150b1d TEST EAX,EAX JZ 0x00150c9e CMP R12,RBX JNC 0x00150c9e MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R12 + 0x3],AL LAB_00150b14: ADD R12,0x4 LAB_00150b18: INC R15 JMP 0x00150ae5 LAB_00150b1d: ADD R15,0x2 LAB_00150b21: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x00150b38 MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x00150b3d LAB_00150b38: INC R15 JMP 0x00150b21 LAB_00150b3d: CMP ECX,0x6c JNZ 0x00150b47 MOV AL,byte ptr [R15] JMP 0x00150b4a LAB_00150b47: DEC R15 LAB_00150b4a: CMP AL,0x64 JZ 0x00150b7a MOVZX EAX,AL CMP EAX,0x75 JZ 0x00150b7a CMP EAX,0x73 JNZ 0x00150ba2 MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x00150c1b MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x00150c27 LAB_00150b7a: MOV RAX,RBX SUB RAX,R12 CMP RAX,0x3f JBE 0x00150c9e MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x00150bb8 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x00150bc4 LAB_00150ba2: CMP R12,RBX JZ 0x00150c9b MOV dword ptr [R12],0x25000000 JMP 0x00150b14 LAB_00150bb8: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_00150bc4: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x00150bd7 MOV RSI,R14 MOV EDX,0xfffffff6 JMP 0x00150be1 LAB_00150bd7: MOV EDI,EDI MOV RSI,R14 MOV EDX,0xa LAB_00150be1: CALL 0x001617e2 CMP byte ptr [RBP + -0x40],0x0 JZ 0x00150b18 LEA RAX,[RBP + -0x3f] LAB_00150bf4: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R12 + 0x3],CL ADD R12,0x4 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x00150bf4 JMP 0x00150b18 LAB_00150c1b: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_00150c27: MOV R13,qword ptr [RAX] MOV R14,RBX SUB R14,R12 TEST R13,R13 LEA RAX,[0x167c3a] CMOVZ R13,RAX MOV RDI,R13 CALL 0x00124170 LEA RDX,[RAX*0x4] MOV RCX,R14 SHR RCX,0x2 DEC RCX CMP R14,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x00150c92 XOR EAX,EAX LEA R14,[RBP + -0x40] LAB_00150c6a: MOV word ptr [R12],0x0 MOV byte ptr [R12 + 0x2],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R12 + 0x3],DL ADD R12,0x4 INC RAX CMP RCX,RAX JNZ 0x00150c6a JMP 0x00150b18 LAB_00150c92: LEA R14,[RBP + -0x40] JMP 0x00150b18 LAB_00150c9b: MOV R12,RBX LAB_00150c9e: MOV dword ptr [R12],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00150cce SUB R12,qword ptr [RBP + -0x68] MOV RAX,R12 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00150cce: CALL 0x001243e0
long my_snprintf_utf32(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,int4 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int4 *puVar6; ulong uVar7; int4 *puVar8; char *pcVar9; long in_FS_OFFSET; int1 local_128 [32]; 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; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; 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; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int4 *)(param_11 + (long)param_10); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar8 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x40) { LAB_00150c9e: *puVar8 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar8 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar9 = local_48; do { pcVar9 = pcVar9 + 1; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[-1]; param_10 = param_10 + 1; } while (*pcVar9 != '\0'); } } else { if (bVar1 != 0x73) { puVar8 = puVar6; if (param_10 != puVar6) { *param_10 = 0x25000000; goto LAB_00150b14; } goto LAB_00150c9e; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar9 = *(char **)puVar2; if (pcVar9 == (char *)0x0) { pcVar9 = "(null)"; } sVar3 = strlen(pcVar9); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 2) - 1; if (sVar3 * 4 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(char *)((long)param_10 + 3) = pcVar9[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar6 <= param_10)) goto LAB_00150c9e; *(int2 *)param_10 = 0; *(int1 *)((long)param_10 + 2) = 0; *(byte *)((long)param_10 + 3) = *param_12; LAB_00150b14: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
14,953
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0x6e0a5 leaq 0x3978e8(%rip), %rdi # 0x405994 leaq -0xae3(%rip), %rsi # 0x6d5d0 callq 0x29360 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x6d890 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0x6e102 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x6dc20 movq %rax, -0x258(%rbp) jmp 0x6e10d xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0x6e10d movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0x6e170 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x6e170 leaq -0x220(%rbp), %rdi callq 0x6d290 movq %rax, %rdi leaq 0x76fa8(%rip), %rsi # 0xe50f4 callq 0x293c0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x82bd0 jmp 0x6e172 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6e1a2 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x29420 nopw (%rax,%rax)
my_charset_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_234], edx mov [rbp+var_240], rcx jmp short $+2 loc_6E0A5: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov esi, [rbp+var_234] mov rdx, [rbp+var_240] call get_charset_number mov [rbp+var_244], eax cmp [rbp+var_244], 0 jz short loc_6E102 mov rdi, [rbp+var_228] mov esi, [rbp+var_244] mov rdx, [rbp+var_240] call get_internal_charset mov [rbp+var_258], rax jmp short loc_6E10D loc_6E102: xor eax, eax mov [rbp+var_258], rax jmp short $+2 loc_6E10D: mov rax, [rbp+var_258] mov [rbp+var_250], rax cmp [rbp+var_250], 0 jnz short loc_6E170 mov rax, [rbp+var_240] and rax, 10h cmp rax, 0 jz short loc_6E170 lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_6E170: jmp short $+2 loc_6E172: mov rax, [rbp+var_250] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6E1A2 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_6E1A2: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { long long charsets_dir; // rax int v5; // r8d int v6; // r9d long long internal_charset; // [rsp+8h] [rbp-258h] unsigned int charset_number; // [rsp+1Ch] [rbp-244h] _BYTE v12[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v13; // [rsp+258h] [rbp-8h] v13 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( !internal_charset && (a4 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v12); stpcpy(charsets_dir, "Index.xml"); my_error(22, 4, a2, (unsigned int)v12, v5, v6); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV dword ptr [RBP + -0x234],EDX MOV qword ptr [RBP + -0x240],RCX JMP 0x0016e0a5 LAB_0016e0a5: LEA RDI,[0x505994] LEA RSI,[0x16d5d0] CALL 0x00129360 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,dword ptr [RBP + -0x234] MOV RDX,qword ptr [RBP + -0x240] CALL 0x0016d890 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JZ 0x0016e102 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x240] CALL 0x0016dc20 MOV qword ptr [RBP + -0x258],RAX JMP 0x0016e10d LAB_0016e102: XOR EAX,EAX MOV qword ptr [RBP + -0x258],RAX JMP 0x0016e10d LAB_0016e10d: MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x0 JNZ 0x0016e170 MOV RAX,qword ptr [RBP + -0x240] AND RAX,0x10 CMP RAX,0x0 JZ 0x0016e170 LEA RDI,[RBP + -0x220] CALL 0x0016d290 MOV RDI,RAX LEA RSI,[0x1e50f4] CALL 0x001293c0 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00182bd0 LAB_0016e170: JMP 0x0016e172 LAB_0016e172: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016e1a2 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_0016e1a2: CALL 0x00129420
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; char *__dest; long in_FS_OFFSET; long local_260; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { local_260 = 0; } else { local_260 = get_internal_charset(param_1,iVar1,param_4); } if ((local_260 == 0) && ((param_4 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x16,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_260; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,954
LefDefParser::lefwMacroTimingFallrs(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwMacroTimingFallrs(double min, double max) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (!lefwIsMacroTiming) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " FALLRS %.11g %.11g ;\n", min, max); else fprintf(lefwFile, " FALLRS %.11g %.11g ;\n", min, max); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwMacroTimingFallrs(double, double): leaq 0xcec6(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0x17f79 leaq 0xd10b(%rip), %rax # 0x25054 cmpl $0x0, (%rax) movl $0x2, %eax je 0x17f9c leaq 0xd152(%rip), %rcx # 0x250ac cmpl $0x0, (%rcx) je 0x17f9c pushq %rax cmpb $0x1, 0xd185(%rip) # 0x250ec jne 0x17f7f leaq 0x42d2(%rip), %rsi # 0x1c242 movb $0x2, %al callq 0x18c35 jmp 0x17f8d movl $0x1, %eax retq leaq 0x42bc(%rip), %rsi # 0x1c242 movb $0x2, %al callq 0x10f0 leaq 0xd0b8(%rip), %rax # 0x2504c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser21lefwMacroTimingFallrsEdd: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_17F79 lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 mov eax, 2 jz short locret_17F9C lea rcx, _ZN12LefDefParser17lefwIsMacroTimingE; LefDefParser::lefwIsMacroTiming cmp dword ptr [rcx], 0 jz short locret_17F9C push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_17F7F lea rsi, aFallrs11g11g; " FALLRS %.11g %.11g ;\n" mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_17F8D loc_17F79: mov eax, 1 retn loc_17F7F: lea rsi, aFallrs11g11g; " FALLRS %.11g %.11g ;\n" mov al, 2 call _fprintf loc_17F8D: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_17F9C: retn
long long LefDefParser::lefwMacroTimingFallrs( LefDefParser *this, double a2, double a3, long long a4, int a5, long long a6, int a7, int a8) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwDidInit && LefDefParser::lefwIsMacroTiming ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" FALLRS %.11g %.11g ;\n", a5, (unsigned int)&LefDefParser::lefwIsMacroTiming, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FALLRS %.11g %.11g ;\n", a2, a3); ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwMacroTimingFallrs: LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00117f79 LEA RAX,[0x125054] CMP dword ptr [RAX],0x0 MOV EAX,0x2 JZ 0x00117f9c LEA RCX,[0x1250ac] CMP dword ptr [RCX],0x0 JZ 0x00117f9c PUSH RAX CMP byte ptr [0x001250ec],0x1 JNZ 0x00117f7f LEA RSI,[0x11c242] MOV AL,0x2 CALL 0x00118c35 JMP 0x00117f8d LAB_00117f79: MOV EAX,0x1 RET LAB_00117f7f: LEA RSI,[0x11c242] MOV AL,0x2 CALL 0x001010f0 LAB_00117f8d: LEA RAX,[0x12504c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00117f9c: RET
/* LefDefParser::lefwMacroTimingFallrs(double, double) */ int8 LefDefParser::lefwMacroTimingFallrs(double param_1,double param_2) { int8 uVar1; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 2; if ((lefwDidInit != 0) && (lefwIsMacroTiming != 0)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," FALLRS %.11g %.11g ;\n"); } else { fprintf(lefwFile," FALLRS %.11g %.11g ;\n"); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }
14,955
r3d_shader_load_raster_geometry_inst
r3d/src/r3d_state.c
void r3d_shader_load_raster_geometry_inst(void) { R3D.shader.raster.geometryInst.id = rlLoadShaderCode( VS_RASTER_GEOMETRY_INST, FS_RASTER_GEOMETRY ); r3d_shader_get_location(raster.geometryInst, uMatInvView); r3d_shader_get_location(raster.geometryInst, uMatModel); r3d_shader_get_location(raster.geometryInst, uMatVP); r3d_shader_get_location(raster.geometryInst, uTexCoordOffset); r3d_shader_get_location(raster.geometryInst, uTexCoordScale); r3d_shader_get_location(raster.geometryInst, uBillboardMode); r3d_shader_get_location(raster.geometryInst, uTexAlbedo); r3d_shader_get_location(raster.geometryInst, uTexNormal); r3d_shader_get_location(raster.geometryInst, uTexEmission); r3d_shader_get_location(raster.geometryInst, uTexOcclusion); r3d_shader_get_location(raster.geometryInst, uTexRoughness); r3d_shader_get_location(raster.geometryInst, uTexMetalness); r3d_shader_get_location(raster.geometryInst, uValEmission); r3d_shader_get_location(raster.geometryInst, uValOcclusion); r3d_shader_get_location(raster.geometryInst, uValRoughness); r3d_shader_get_location(raster.geometryInst, uValMetalness); r3d_shader_get_location(raster.geometryInst, uColAlbedo); r3d_shader_get_location(raster.geometryInst, uColEmission); r3d_shader_enable(raster.geometryInst); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexAlbedo, 0); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexNormal, 1); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexEmission, 2); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexOcclusion, 3); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexRoughness, 4); r3d_shader_set_sampler2D_slot(raster.geometryInst, uTexMetalness, 5); r3d_shader_disable(); }
O3
c
r3d_shader_load_raster_geometry_inst: pushq %rbp movq %rsp, %rbp leaq 0x5903f(%rip), %rdi # 0x11bf20 leaq 0x597e8(%rip), %rsi # 0x11c6d0 callq 0x1ed91 movl %eax, 0xeef59(%rip) # 0x1b1e4c leaq 0x50290(%rip), %rsi # 0x11318a movl %eax, %edi callq 0x1f1ea movl %eax, 0xeef49(%rip) # 0x1b1e50 movl 0xeef3f(%rip), %edi # 0x1b1e4c leaq 0x501a9(%rip), %rsi # 0x1130bd callq 0x1f1ea movl %eax, 0xeef35(%rip) # 0x1b1e54 movl 0xeef27(%rip), %edi # 0x1b1e4c leaq 0x5026a(%rip), %rsi # 0x113196 callq 0x1f1ea movl %eax, 0xeef21(%rip) # 0x1b1e58 movl 0xeef0f(%rip), %edi # 0x1b1e4c leaq 0x5018b(%rip), %rsi # 0x1130cf callq 0x1f1ea movl %eax, 0xeef15(%rip) # 0x1b1e64 movl 0xeeef7(%rip), %edi # 0x1b1e4c leaq 0x50183(%rip), %rsi # 0x1130df callq 0x1f1ea movl %eax, 0xeef09(%rip) # 0x1b1e70 movl 0xeeedf(%rip), %edi # 0x1b1e4c leaq 0x50229(%rip), %rsi # 0x11319d callq 0x1f1ea movl %eax, 0xeeef9(%rip) # 0x1b1e78 movl 0xeeec7(%rip), %edi # 0x1b1e4c leaq 0x50162(%rip), %rsi # 0x1130ee callq 0x1f1ea movl %eax, 0xeeee9(%rip) # 0x1b1e80 movl 0xeeeaf(%rip), %edi # 0x1b1e4c leaq 0x50155(%rip), %rsi # 0x1130f9 callq 0x1f1ea movl %eax, 0xeeed9(%rip) # 0x1b1e88 movl 0xeee97(%rip), %edi # 0x1b1e4c leaq 0x50148(%rip), %rsi # 0x113104 callq 0x1f1ea movl %eax, 0xeeec9(%rip) # 0x1b1e90 movl 0xeee7f(%rip), %edi # 0x1b1e4c leaq 0x5013d(%rip), %rsi # 0x113111 callq 0x1f1ea movl %eax, 0xeeeb9(%rip) # 0x1b1e98 movl 0xeee67(%rip), %edi # 0x1b1e4c leaq 0x50133(%rip), %rsi # 0x11311f callq 0x1f1ea movl %eax, 0xeeea9(%rip) # 0x1b1ea0 movl 0xeee4f(%rip), %edi # 0x1b1e4c leaq 0x50129(%rip), %rsi # 0x11312d callq 0x1f1ea movl %eax, 0xeee99(%rip) # 0x1b1ea8 movl 0xeee37(%rip), %edi # 0x1b1e4c leaq 0x5011f(%rip), %rsi # 0x11313b callq 0x1f1ea movl %eax, 0xeee89(%rip) # 0x1b1eb0 movl 0xeee1f(%rip), %edi # 0x1b1e4c leaq 0x50114(%rip), %rsi # 0x113148 callq 0x1f1ea movl %eax, 0xeee79(%rip) # 0x1b1eb8 movl 0xeee07(%rip), %edi # 0x1b1e4c leaq 0x5010a(%rip), %rsi # 0x113156 callq 0x1f1ea movl %eax, 0xeee69(%rip) # 0x1b1ec0 movl 0xeedef(%rip), %edi # 0x1b1e4c leaq 0x50100(%rip), %rsi # 0x113164 callq 0x1f1ea movl %eax, 0xeee59(%rip) # 0x1b1ec8 movl 0xeedd7(%rip), %edi # 0x1b1e4c leaq 0x500f6(%rip), %rsi # 0x113172 callq 0x1f1ea movl %eax, 0xeee51(%rip) # 0x1b1ed8 movl 0xeedbf(%rip), %edi # 0x1b1e4c leaq 0x500e9(%rip), %rsi # 0x11317d callq 0x1f1ea movl %eax, 0xeee49(%rip) # 0x1b1ee8 movl 0xeeda7(%rip), %edi # 0x1b1e4c callq 0x1c616 cmpl $0x0, 0xeedcb(%rip) # 0x1b1e7c je 0xc30d9 movl $0x0, 0xeedbf(%rip) # 0x1b1e7c leaq 0xeedb8(%rip), %rsi # 0x1b1e7c movl 0xeedb6(%rip), %edi # 0x1b1e80 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x1, 0xeeda4(%rip) # 0x1b1e84 je 0xc3108 movl $0x1, 0xeed98(%rip) # 0x1b1e84 leaq 0xeed91(%rip), %rsi # 0x1b1e84 movl 0xeed8f(%rip), %edi # 0x1b1e88 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x2, 0xeed7d(%rip) # 0x1b1e8c je 0xc3137 movl $0x2, 0xeed71(%rip) # 0x1b1e8c leaq 0xeed6a(%rip), %rsi # 0x1b1e8c movl 0xeed68(%rip), %edi # 0x1b1e90 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x3, 0xeed56(%rip) # 0x1b1e94 je 0xc3166 movl $0x3, 0xeed4a(%rip) # 0x1b1e94 leaq 0xeed43(%rip), %rsi # 0x1b1e94 movl 0xeed41(%rip), %edi # 0x1b1e98 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x4, 0xeed2f(%rip) # 0x1b1e9c je 0xc3195 movl $0x4, 0xeed23(%rip) # 0x1b1e9c leaq 0xeed1c(%rip), %rsi # 0x1b1e9c movl 0xeed1a(%rip), %edi # 0x1b1ea0 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 cmpl $0x5, 0xeed08(%rip) # 0x1b1ea4 je 0xc31c4 movl $0x5, 0xeecfc(%rip) # 0x1b1ea4 leaq 0xeecf5(%rip), %rsi # 0x1b1ea4 movl 0xeecf3(%rip), %edi # 0x1b1ea8 movl $0x4, %edx movl $0x1, %ecx callq 0x1f206 popq %rbp jmp 0x1c621
r3d_shader_load_raster_geometry_inst: push rbp mov rbp, rsp lea rdi, VS_RASTER_GEOMETRY_INST; "#version 330 core\n#define BILLBOARD_FR"... lea rsi, FS_RASTER_GEOMETRY; "#version 330 core\nflat in vec3 vEmissi"... call rlLoadShaderCode mov cs:dword_1B1E4C, eax lea rsi, aUmatinvview; "uMatInvView" mov edi, eax call rlGetLocationUniform mov cs:dword_1B1E50, eax mov edi, cs:dword_1B1E4C lea rsi, aUmatmodel; "uMatModel" call rlGetLocationUniform mov cs:dword_1B1E54, eax mov edi, cs:dword_1B1E4C lea rsi, aUmatvp; "uMatVP" call rlGetLocationUniform mov cs:dword_1B1E58, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexcoordoffse; "uTexCoordOffset" call rlGetLocationUniform mov cs:dword_1B1E64, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexcoordscale; "uTexCoordScale" call rlGetLocationUniform mov cs:dword_1B1E70, eax mov edi, cs:dword_1B1E4C lea rsi, aUbillboardmode; "uBillboardMode" call rlGetLocationUniform mov cs:dword_1B1E78, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexalbedo; "uTexAlbedo" call rlGetLocationUniform mov cs:dword_1B1E80, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexnormal; "uTexNormal" call rlGetLocationUniform mov cs:dword_1B1E88, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexemission; "uTexEmission" call rlGetLocationUniform mov cs:dword_1B1E90, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexocclusion; "uTexOcclusion" call rlGetLocationUniform mov cs:dword_1B1E98, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexroughness; "uTexRoughness" call rlGetLocationUniform mov cs:dword_1B1EA0, eax mov edi, cs:dword_1B1E4C lea rsi, aUtexmetalness; "uTexMetalness" call rlGetLocationUniform mov cs:dword_1B1EA8, eax mov edi, cs:dword_1B1E4C lea rsi, aUvalemission; "uValEmission" call rlGetLocationUniform mov cs:dword_1B1EB0, eax mov edi, cs:dword_1B1E4C lea rsi, aUvalocclusion; "uValOcclusion" call rlGetLocationUniform mov cs:dword_1B1EB8, eax mov edi, cs:dword_1B1E4C lea rsi, aUvalroughness; "uValRoughness" call rlGetLocationUniform mov cs:dword_1B1EC0, eax mov edi, cs:dword_1B1E4C lea rsi, aUvalmetalness; "uValMetalness" call rlGetLocationUniform mov cs:dword_1B1EC8, eax mov edi, cs:dword_1B1E4C lea rsi, aUcolalbedo; "uColAlbedo" call rlGetLocationUniform mov cs:dword_1B1ED8, eax mov edi, cs:dword_1B1E4C lea rsi, aUcolemission; "uColEmission" call rlGetLocationUniform mov cs:dword_1B1EE8, eax mov edi, cs:dword_1B1E4C call rlEnableShader cmp cs:dword_1B1E7C, 0 jz short loc_C30D9 mov cs:dword_1B1E7C, 0 lea rsi, dword_1B1E7C mov edi, cs:dword_1B1E80 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C30D9: cmp cs:dword_1B1E84, 1 jz short loc_C3108 mov cs:dword_1B1E84, 1 lea rsi, dword_1B1E84 mov edi, cs:dword_1B1E88 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C3108: cmp cs:dword_1B1E8C, 2 jz short loc_C3137 mov cs:dword_1B1E8C, 2 lea rsi, dword_1B1E8C mov edi, cs:dword_1B1E90 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C3137: cmp cs:dword_1B1E94, 3 jz short loc_C3166 mov cs:dword_1B1E94, 3 lea rsi, dword_1B1E94 mov edi, cs:dword_1B1E98 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C3166: cmp cs:dword_1B1E9C, 4 jz short loc_C3195 mov cs:dword_1B1E9C, 4 lea rsi, dword_1B1E9C mov edi, cs:dword_1B1EA0 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C3195: cmp cs:dword_1B1EA4, 5 jz short loc_C31C4 mov cs:dword_1B1EA4, 5 lea rsi, dword_1B1EA4 mov edi, cs:dword_1B1EA8 mov edx, 4 mov ecx, 1 call rlSetUniform loc_C31C4: pop rbp jmp rlDisableShader
long long r3d_shader_load_raster_geometry_inst() { int v0; // r8d int v1; // r9d dword_1B1E4C = rlLoadShaderCode( (long long)"#version 330 core\n" "#define BILLBOARD_FRONT 1\n" "#define BILLBOARD_Y_AXIS 2\n" "layout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in" " vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;layout(loc" "ation=10)in mat4 iMatModel;layout(location=14)in vec4 iColor;uniform mat4 uMatInvView;unifor" "m mat4 uMatModel;uniform mat4 uMatVP;uniform lowp int uBillboardMode;uniform float uValEmiss" "ion;uniform vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform v" "ec2 uTexCoordScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;" "void BillboardFront(inout mat4 h,inout mat3 i){float l=length(vec3(h[0]));float m=length(vec" "3(h[1]));float n=length(vec3(h[2]));h[0]=vec4(normalize(uMatInvView[0].xyz)*l,0.0);h[1]=vec4" "(normalize(uMatInvView[1].xyz)*m,0.0);h[2]=vec4(normalize(uMatInvView[2].xyz)*n,0.0);float b" "=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=normalize(uMatInvView[0].xyz)*b;i[1]=normalize(uMatI" "nvView[1].xyz)*c;i[2]=normalize(uMatInvView[2].xyz)*d;}void BillboardY(inout mat4 h,inout ma" "t3 i){vec3 j=vec3(h[3]);float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length" "(vec3(h[2]));vec3 o=normalize(vec3(h[1]));vec3 e=normalize(j-vec3(uMatInvView[3]));vec3 k=no" "rmalize(cross(o,e));vec3 a=normalize(cross(k,o));h[0]=vec4(k*l,0.0);h[1]=vec4(o*m,0.0);h[2]=" "vec4(a*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=k*b;i[1]=o*c;i[2]=a*d;}void mai" "n(){vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vEmission=uColEmission*uValEmission;v" "Color=aColor.rgb*iColor.rgb*uColAlbedo;mat4 f=uMatModel*transpose(iMatModel);mat3 g=mat3(0.0" ");if(uBillboardMode==BILLBOARD_FRONT)BillboardFront(f,g);else if(uBillboardMode==BILLBOARD_Y" "_AXIS)BillboardY(f,g);else g=transpose(inverse(mat3(f)));vec3 T=normalize(vec3(f*vec4(aTange" "nt.xyz,0.0)));vec3 N=normalize(g*aNormal);vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3(" "T,B,N);gl_Position=uMatVP*(f*vec4(aPosition,1.0));}", (long long)"#version 330 core\n" "flat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexA" "lbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOccl" "usion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOccl" "usion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;l" "ayout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 E" "ncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2(" "f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void mai" "n(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).r" "gb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValO" "cclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoor" "d).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}"); dword_1B1E50 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uMatInvView"); dword_1B1E54 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uMatModel"); dword_1B1E58 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uMatVP"); dword_1B1E64 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexCoordOffset"); dword_1B1E70 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexCoordScale"); dword_1B1E78 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uBillboardMode"); dword_1B1E80 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexAlbedo"); dword_1B1E88 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexNormal"); dword_1B1E90 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexEmission"); dword_1B1E98 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexOcclusion"); dword_1B1EA0 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexRoughness"); dword_1B1EA8 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uTexMetalness"); dword_1B1EB0 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uValEmission"); dword_1B1EB8 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uValOcclusion"); dword_1B1EC0 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uValRoughness"); dword_1B1EC8 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uValMetalness"); dword_1B1ED8 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uColAlbedo"); dword_1B1EE8 = rlGetLocationUniform((unsigned int)dword_1B1E4C, (long long)"uColEmission"); rlEnableShader((unsigned int)dword_1B1E4C); if ( dword_1B1E7C ) { dword_1B1E7C = 0; rlSetUniform((unsigned int)dword_1B1E80, (long long)&dword_1B1E7C, 4, 1u, v0, v1); } if ( dword_1B1E84 != 1 ) { dword_1B1E84 = 1; rlSetUniform((unsigned int)dword_1B1E88, (long long)&dword_1B1E84, 4, 1u, v0, v1); } if ( dword_1B1E8C != 2 ) { dword_1B1E8C = 2; rlSetUniform((unsigned int)dword_1B1E90, (long long)&dword_1B1E8C, 4, 1u, v0, v1); } if ( dword_1B1E94 != 3 ) { dword_1B1E94 = 3; rlSetUniform((unsigned int)dword_1B1E98, (long long)&dword_1B1E94, 4, 1u, v0, v1); } if ( dword_1B1E9C != 4 ) { dword_1B1E9C = 4; rlSetUniform((unsigned int)dword_1B1EA0, (long long)&dword_1B1E9C, 4, 1u, v0, v1); } if ( dword_1B1EA4 != 5 ) { dword_1B1EA4 = 5; rlSetUniform((unsigned int)dword_1B1EA8, (long long)&dword_1B1EA4, 4, 1u, v0, v1); } return rlDisableShader(); }
r3d_shader_load_raster_geometry_inst: PUSH RBP MOV RBP,RSP LEA RDI,[0x21bf20] LEA RSI,[0x21c6d0] CALL 0x0011ed91 MOV dword ptr [0x002b1e4c],EAX LEA RSI,[0x21318a] MOV EDI,EAX CALL 0x0011f1ea MOV dword ptr [0x002b1e50],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x2130bd] CALL 0x0011f1ea MOV dword ptr [0x002b1e54],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213196] CALL 0x0011f1ea MOV dword ptr [0x002b1e58],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x2130cf] CALL 0x0011f1ea MOV dword ptr [0x002b1e64],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x2130df] CALL 0x0011f1ea MOV dword ptr [0x002b1e70],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x21319d] CALL 0x0011f1ea MOV dword ptr [0x002b1e78],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x2130ee] CALL 0x0011f1ea MOV dword ptr [0x002b1e80],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x2130f9] CALL 0x0011f1ea MOV dword ptr [0x002b1e88],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213104] CALL 0x0011f1ea MOV dword ptr [0x002b1e90],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213111] CALL 0x0011f1ea MOV dword ptr [0x002b1e98],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x21311f] CALL 0x0011f1ea MOV dword ptr [0x002b1ea0],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x21312d] CALL 0x0011f1ea MOV dword ptr [0x002b1ea8],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x21313b] CALL 0x0011f1ea MOV dword ptr [0x002b1eb0],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213148] CALL 0x0011f1ea MOV dword ptr [0x002b1eb8],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213156] CALL 0x0011f1ea MOV dword ptr [0x002b1ec0],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213164] CALL 0x0011f1ea MOV dword ptr [0x002b1ec8],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x213172] CALL 0x0011f1ea MOV dword ptr [0x002b1ed8],EAX MOV EDI,dword ptr [0x002b1e4c] LEA RSI,[0x21317d] CALL 0x0011f1ea MOV dword ptr [0x002b1ee8],EAX MOV EDI,dword ptr [0x002b1e4c] CALL 0x0011c616 CMP dword ptr [0x002b1e7c],0x0 JZ 0x001c30d9 MOV dword ptr [0x002b1e7c],0x0 LEA RSI,[0x2b1e7c] MOV EDI,dword ptr [0x002b1e80] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c30d9: CMP dword ptr [0x002b1e84],0x1 JZ 0x001c3108 MOV dword ptr [0x002b1e84],0x1 LEA RSI,[0x2b1e84] MOV EDI,dword ptr [0x002b1e88] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c3108: CMP dword ptr [0x002b1e8c],0x2 JZ 0x001c3137 MOV dword ptr [0x002b1e8c],0x2 LEA RSI,[0x2b1e8c] MOV EDI,dword ptr [0x002b1e90] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c3137: CMP dword ptr [0x002b1e94],0x3 JZ 0x001c3166 MOV dword ptr [0x002b1e94],0x3 LEA RSI,[0x2b1e94] MOV EDI,dword ptr [0x002b1e98] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c3166: CMP dword ptr [0x002b1e9c],0x4 JZ 0x001c3195 MOV dword ptr [0x002b1e9c],0x4 LEA RSI,[0x2b1e9c] MOV EDI,dword ptr [0x002b1ea0] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c3195: CMP dword ptr [0x002b1ea4],0x5 JZ 0x001c31c4 MOV dword ptr [0x002b1ea4],0x5 LEA RSI,[0x2b1ea4] MOV EDI,dword ptr [0x002b1ea8] MOV EDX,0x4 MOV ECX,0x1 CALL 0x0011f206 LAB_001c31c4: POP RBP JMP 0x0011c621
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void r3d_shader_load_raster_geometry_inst(void) { DAT_002b1e4c = rlLoadShaderCode("#version 330 core\n#define BILLBOARD_FRONT 1\n#define BILLBOARD_Y_AXIS 2\nlayout(location=0)in vec3 aPosition;layout(location=1)in vec2 aTexCoord;layout(location=2)in vec3 aNormal;layout(location=3)in vec4 aColor;layout(location=4)in vec4 aTangent;layout(location=10)in mat4 iMatModel;layout(location=14)in vec4 iColor;uniform mat4 uMatInvView;uniform mat4 uMatModel;uniform mat4 uMatVP;uniform lowp int uBillboardMode;uniform float uValEmission;uniform vec3 uColEmission;uniform vec3 uColAlbedo;uniform vec2 uTexCoordOffset;uniform vec2 uTexCoordScale;flat out vec3 vEmission;out vec2 vTexCoord;out vec3 vColor;out mat3 vTBN;void BillboardFront(inout mat4 h,inout mat3 i){float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length(vec3(h[2]));h[0]=vec4(normalize(uMatInvView[0].xyz)*l,0.0);h[1]=vec4(normalize(uMatInvView[1].xyz)*m,0.0);h[2]=vec4(normalize(uMatInvView[2].xyz)*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=normalize(uMatInvView[0].xyz)*b;i[1]=normalize(uMatInvView[1].xyz)*c;i[2]=normalize(uMatInvView[2].xyz)*d;}void BillboardY(inout mat4 h,inout mat3 i){vec3 j=vec3(h[3]);float l=length(vec3(h[0]));float m=length(vec3(h[1]));float n=length(vec3(h[2]));vec3 o=normalize(vec3(h[1]));vec3 e=normalize(j-vec3(uMatInvView[3]));vec3 k=normalize(cross(o,e));vec3 a=normalize(cross(k,o));h[0]=vec4(k*l,0.0);h[1]=vec4(o*m,0.0);h[2]=vec4(a*n,0.0);float b=1.0/l;float c=1.0/m;float d=1.0/n;i[0]=k*b;i[1]=o*c;i[2]=a*d;}void main(){vTexCoord=uTexCoordOffset+aTexCoord*uTexCoordScale;vEmission=uColEmission*uValEmission;vColor=aColor.rgb*iColor.rgb*uColAlbedo;mat4 f=uMatModel*transpose(iMatModel);mat3 g=mat3(0.0);if(uBillboardMode==BILLBOARD_FRONT)BillboardFront(f,g);else if(uBillboardMode==BILLBOARD_Y_AXIS)BillboardY(f,g);else g=transpose(inverse(mat3(f)));vec3 T=normalize(vec3(f*vec4(aTangent.xyz,0.0)));vec3 N=normalize(g*aNormal);vec3 B=normalize(cross(N,T))*aTangent.w;vTBN=mat3(T,B,N);gl_Position=uMatVP*(f*vec4(aPosition,1.0));}" , "#version 330 core\nflat in vec3 vEmission;in vec2 vTexCoord;in vec3 vColor;in mat3 vTBN;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexEmission;uniform sampler2D uTexOcclusion;uniform sampler2D uTexRoughness;uniform sampler2D uTexMetalness;uniform float uValOcclusion;uniform float uValRoughness;uniform float uValMetalness;layout(location=0)out vec3 a;layout(location=1)out vec3 b;layout(location=2)out vec2 c;layout(location=3)out vec3 d;vec2 EncodeOctahedral(vec3 f){f/=abs(f.x)+abs(f.y)+abs(f.z);vec2 e=f.xy;if(f.z < 0.0){vec2 g=vec2(f.x >=0.0 ? 1.0 :-1.0,f.y >=0.0 ? 1.0 :-1.0);e=(1.0-abs(e.yx))*g;}return e*0.5+0.5;}void main(){a=vColor*texture(uTexAlbedo,vTexCoord).rgb;b=vEmission*texture(uTexEmission,vTexCoord).rgb;c=EncodeOctahedral(normalize(vTBN*(texture(uTexNormal,vTexCoord).rgb*2.0-1.0)));d.r=uValOcclusion*texture(uTexOcclusion,vTexCoord).r;d.g=uValRoughness*texture(uTexRoughness,vTexCoord).g;d.b=uValMetalness*texture(uTexMetalness,vTexCoord).b;}" ); _DAT_002b1e50 = rlGetLocationUniform(DAT_002b1e4c,"uMatInvView"); _DAT_002b1e54 = rlGetLocationUniform(DAT_002b1e4c,"uMatModel"); _DAT_002b1e58 = rlGetLocationUniform(DAT_002b1e4c,"uMatVP"); _DAT_002b1e64 = rlGetLocationUniform(DAT_002b1e4c,"uTexCoordOffset"); _DAT_002b1e70 = rlGetLocationUniform(DAT_002b1e4c,"uTexCoordScale"); _DAT_002b1e78 = rlGetLocationUniform(DAT_002b1e4c,"uBillboardMode"); _DAT_002b1e80 = rlGetLocationUniform(DAT_002b1e4c,"uTexAlbedo"); _DAT_002b1e88 = rlGetLocationUniform(DAT_002b1e4c,"uTexNormal"); _DAT_002b1e90 = rlGetLocationUniform(DAT_002b1e4c,"uTexEmission"); _DAT_002b1e98 = rlGetLocationUniform(DAT_002b1e4c,"uTexOcclusion"); _DAT_002b1ea0 = rlGetLocationUniform(DAT_002b1e4c,"uTexRoughness"); _DAT_002b1ea8 = rlGetLocationUniform(DAT_002b1e4c,"uTexMetalness"); _DAT_002b1eb0 = rlGetLocationUniform(DAT_002b1e4c,"uValEmission"); _DAT_002b1eb8 = rlGetLocationUniform(DAT_002b1e4c,"uValOcclusion"); _DAT_002b1ec0 = rlGetLocationUniform(DAT_002b1e4c,"uValRoughness"); _DAT_002b1ec8 = rlGetLocationUniform(DAT_002b1e4c,"uValMetalness"); _DAT_002b1ed8 = rlGetLocationUniform(DAT_002b1e4c,"uColAlbedo"); _DAT_002b1ee8 = rlGetLocationUniform(DAT_002b1e4c,"uColEmission"); rlEnableShader(DAT_002b1e4c); if (_DAT_002b1e7c != 0) { _DAT_002b1e7c = 0; rlSetUniform(_DAT_002b1e80,&DAT_002b1e7c,4,1); } if (_DAT_002b1e84 != 1) { _DAT_002b1e84 = 1; rlSetUniform(_DAT_002b1e88,&DAT_002b1e84,4,1); } if (_DAT_002b1e8c != 2) { _DAT_002b1e8c = 2; rlSetUniform(_DAT_002b1e90,&DAT_002b1e8c,4,1); } if (_DAT_002b1e94 != 3) { _DAT_002b1e94 = 3; rlSetUniform(_DAT_002b1e98,&DAT_002b1e94,4,1); } if (_DAT_002b1e9c != 4) { _DAT_002b1e9c = 4; rlSetUniform(_DAT_002b1ea0,&DAT_002b1e9c,4,1); } if (_DAT_002b1ea4 != 5) { _DAT_002b1ea4 = 5; rlSetUniform(_DAT_002b1ea8,&DAT_002b1ea4,4,1); } rlDisableShader(); return; }
14,956
translog_chaser_page_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_chaser_page_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor) { struct st_translog_buffer *buffer_to_flush; my_bool rc; DBUG_ENTER("translog_chaser_page_next"); DBUG_ASSERT(cursor->chaser); rc= translog_page_next(horizon, cursor, &buffer_to_flush); if (buffer_to_flush != NULL) { translog_buffer_lock(buffer_to_flush); translog_buffer_decrease_writers(buffer_to_flush); used_buffs_register_unlock(&cursor->buffs, buffer_to_flush); if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(rc); }
O0
c
translog_chaser_page_next: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x92bc2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x18(%rbp), %rdx callq 0x90610 movb %al, -0x19(%rbp) cmpq $0x0, -0x18(%rbp) je 0x92c17 movq -0x18(%rbp), %rdi callq 0x86d20 movq -0x18(%rbp), %rdi callq 0x92920 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x92970 cmpb $0x0, -0x19(%rbp) jne 0x92c0e movq -0x18(%rbp), %rdi callq 0x8cf50 movb %al, -0x19(%rbp) movq -0x18(%rbp), %rdi callq 0x86d60 jmp 0x92c19 movb -0x19(%rbp), %al movb %al, -0x1a(%rbp) movb -0x1a(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
translog_chaser_page_next: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_92BC2: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_18] call translog_page_next mov [rbp+var_19], al cmp [rbp+var_18], 0 jz short loc_92C17 mov rdi, [rbp+var_18] call translog_buffer_lock mov rdi, [rbp+var_18] call translog_buffer_decrease_writers mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call used_buffs_register_unlock cmp [rbp+var_19], 0 jnz short loc_92C0E mov rdi, [rbp+var_18] call translog_buffer_flush mov [rbp+var_19], al loc_92C0E: mov rdi, [rbp+var_18] call translog_buffer_unlock loc_92C17: jmp short $+2 loc_92C19: mov al, [rbp+var_19] mov [rbp+var_1A], al mov al, [rbp+var_1A] add rsp, 20h pop rbp retn
char translog_chaser_page_next(long long *a1, long long a2) { char v3; // [rsp+7h] [rbp-19h] long long v4; // [rsp+8h] [rbp-18h] BYREF long long v5; // [rsp+10h] [rbp-10h] long long *v6; // [rsp+18h] [rbp-8h] v6 = a1; v5 = a2; v3 = translog_page_next(a1, a2, &v4); if ( v4 ) { translog_buffer_lock(v4); translog_buffer_decrease_writers(v4); used_buffs_register_unlock(v5); if ( !v3 ) v3 = translog_buffer_flush(v4); translog_buffer_unlock(v4); } return v3; }
translog_chaser_page_next: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00192bc2 LAB_00192bc2: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x18] CALL 0x00190610 MOV byte ptr [RBP + -0x19],AL CMP qword ptr [RBP + -0x18],0x0 JZ 0x00192c17 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00186d20 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00192920 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00192970 CMP byte ptr [RBP + -0x19],0x0 JNZ 0x00192c0e MOV RDI,qword ptr [RBP + -0x18] CALL 0x0018cf50 MOV byte ptr [RBP + -0x19],AL LAB_00192c0e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00186d60 LAB_00192c17: JMP 0x00192c19 LAB_00192c19: MOV AL,byte ptr [RBP + -0x19] MOV byte ptr [RBP + -0x1a],AL MOV AL,byte ptr [RBP + -0x1a] ADD RSP,0x20 POP RBP RET
char translog_chaser_page_next(int8 param_1,int8 param_2) { char local_21; long local_20; int8 local_18; int8 local_10; local_18 = param_2; local_10 = param_1; local_21 = translog_page_next(param_1,param_2,&local_20); if (local_20 != 0) { translog_buffer_lock(local_20); translog_buffer_decrease_writers(local_20); used_buffs_register_unlock(local_18,local_20); if (local_21 == '\0') { local_21 = translog_buffer_flush(local_20); } translog_buffer_unlock(local_20); } return local_21; }
14,957
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O0
c
js_map_clear: subq $0x68, %rsp movq %rsi, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movl %ecx, 0x3c(%rsp) movq %r8, 0x30(%rsp) movl %r9d, 0x2c(%rsp) movq 0x40(%rsp), %rdi movl 0x2c(%rsp), %ecx addl $0x23, %ecx movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x383b0 movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x8c91f movl $0x0, 0x58(%rsp) movq $0x6, 0x60(%rsp) jmp 0x8c99f movq 0x20(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x8c98e movq 0x18(%rsp), %rax addq $-0x10, %rax movq %rax, 0x8(%rsp) movq 0x40(%rsp), %rax movq 0x18(%rax), %rdi movq 0x20(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x8cf70 movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x8c93b movl $0x0, 0x58(%rsp) movq $0x3, 0x60(%rsp) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rdx addq $0x68, %rsp retq nop
js_map_clear: sub rsp, 68h mov [rsp+68h+var_20], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_28], rdi mov [rsp+68h+var_2C], ecx mov [rsp+68h+var_38], r8 mov [rsp+68h+var_3C], r9d mov rdi, [rsp+68h+var_28] mov ecx, [rsp+68h+var_3C] add ecx, 23h ; '#' mov rsi, [rsp+68h+var_20] mov rdx, [rsp+68h+var_18] call JS_GetOpaque2 mov [rsp+68h+var_48], rax cmp [rsp+68h+var_48], 0 jnz short loc_8C91F mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 6 jmp loc_8C99F loc_8C91F: mov rax, [rsp+68h+var_48] mov rax, [rax+10h] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] mov rax, [rax+8] mov [rsp+68h+var_58], rax loc_8C93B: mov rax, [rsp+68h+var_50] mov rcx, [rsp+68h+var_48] add rcx, 8 cmp rax, rcx jz short loc_8C98E mov rax, [rsp+68h+var_50] add rax, 0FFFFFFFFFFFFFFF0h mov [rsp+68h+var_60], rax mov rax, [rsp+68h+var_28] mov rdi, [rax+18h] mov rsi, [rsp+68h+var_48] mov rdx, [rsp+68h+var_60] call map_delete_record mov rax, [rsp+68h+var_58] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] mov rax, [rax+8] mov [rsp+68h+var_58], rax jmp short loc_8C93B loc_8C98E: mov dword ptr [rsp+68h+var_10], 0 mov [rsp+68h+var_8], 3 loc_8C99F: mov rax, [rsp+68h+var_10] mov rdx, [rsp+68h+var_8] add rsp, 68h retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long v7; // [rsp+10h] [rbp-58h] long long v8; // [rsp+18h] [rbp-50h] long long Opaque2; // [rsp+20h] [rbp-48h] long long v10; // [rsp+58h] [rbp-10h] Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v8 = *(_QWORD *)(Opaque2 + 16); v7 = *(_QWORD *)(v8 + 8); while ( v8 != Opaque2 + 8 ) { map_delete_record(*(_QWORD *)(a1 + 24), Opaque2, v8 - 16); v8 = v7; v7 = *(_QWORD *)(v7 + 8); } LODWORD(v10) = 0; } else { LODWORD(v10) = 0; } return v10; }
js_map_clear: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],ECX MOV qword ptr [RSP + 0x30],R8 MOV dword ptr [RSP + 0x2c],R9D MOV RDI,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RSP + 0x2c] ADD ECX,0x23 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x001383b0 MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x0018c91f MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 JMP 0x0018c99f LAB_0018c91f: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_0018c93b: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x8 CMP RAX,RCX JZ 0x0018c98e MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x10 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0018cf70 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x0018c93b LAB_0018c98e: MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x3 LAB_0018c99f: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] js_map_clear(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int param_6) { int1 auVar1 [16]; long lVar2; int8 local_58; int8 local_50; int4 uStack_c; int8 local_8; lVar2 = JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23); if (lVar2 == 0) { local_8 = 6; } else { local_50 = *(long *)(lVar2 + 0x10); local_58 = *(long *)(local_50 + 8); while (local_50 != lVar2 + 8) { map_delete_record(*(int8 *)(param_1 + 0x18),lVar2,local_50 + -0x10); local_50 = local_58; local_58 = *(long *)(local_58 + 8); } local_8 = 3; } auVar1._4_8_ = local_8; auVar1._0_4_ = uStack_c; auVar1._12_4_ = 0; return auVar1 << 0x20; }
14,958
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O1
c
js_map_clear: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x275b5 testq %rax, %rax je 0x4fcf9 movq %rax, %r15 movq %rax, %r12 addq $0x8, %r12 movq 0x10(%rax), %rdx movl $0x3, %r14d cmpq %r12, %rdx je 0x4fcff movq 0x8(%rdx), %r13 addq $-0x10, %rdx movq 0x18(%rbx), %rdi movq %r15, %rsi callq 0x50086 movq %r13, %rdx cmpq %r12, %r13 jne 0x4fcdb jmp 0x4fcff movl $0x6, %r14d xorl %eax, %eax movq %r14, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_map_clear: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4FCF9 mov r15, rax mov r12, rax add r12, 8 mov rdx, [rax+10h] mov r14d, 3 cmp rdx, r12 jz short loc_4FCFF loc_4FCDB: mov r13, [rdx+8] add rdx, 0FFFFFFFFFFFFFFF0h mov rdi, [rbx+18h] mov rsi, r15 call map_delete_record mov rdx, r13 cmp r13, r12 jnz short loc_4FCDB jmp short loc_4FCFF loc_4FCF9: mov r14d, 6 loc_4FCFF: xor eax, eax mov rdx, r14 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v7; // r15 long long v8; // r12 long long v9; // rdx long long v10; // r13 Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v7 = Opaque2; v8 = Opaque2 + 8; v9 = *(_QWORD *)(Opaque2 + 16); if ( v9 != Opaque2 + 8 ) { do { v10 = *(_QWORD *)(v9 + 8); map_delete_record(*(_QWORD *)(a1 + 24), v7, v9 - 16); v9 = v10; } while ( v10 != v8 ); } } return 0LL; }
14,959
js_map_clear
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_clear(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); struct list_head *el, *el1; JSMapRecord *mr; if (!s) return JS_EXCEPTION; list_for_each_safe(el, el1, &s->records) { mr = list_entry(el, JSMapRecord, link); map_delete_record(ctx->rt, s, mr); } return JS_UNDEFINED; }
O2
c
js_map_clear: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx leal 0x23(%r9), %ecx callq 0x21207 testq %rax, %rax je 0x4486d movq %rax, %r15 movq %rax, %r12 addq $0x8, %r12 movq 0x10(%rax), %rdx pushq $0x3 popq %r14 cmpq %r12, %rdx je 0x44871 movq 0x8(%rdx), %r13 addq $-0x10, %rdx movq 0x18(%rbx), %rdi movq %r15, %rsi callq 0x44b6e movq %r13, %rdx jmp 0x4484f pushq $0x6 popq %r14 xorl %eax, %eax movq %r14, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_map_clear: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi lea ecx, [r9+23h] call JS_GetOpaque2 test rax, rax jz short loc_4486D mov r15, rax mov r12, rax add r12, 8 mov rdx, [rax+10h] push 3 pop r14 loc_4484F: cmp rdx, r12 jz short loc_44871 mov r13, [rdx+8] add rdx, 0FFFFFFFFFFFFFFF0h mov rdi, [rbx+18h] mov rsi, r15 call map_delete_record mov rdx, r13 jmp short loc_4484F loc_4486D: push 6 pop r14 loc_44871: xor eax, eax mov rdx, r14 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_map_clear(long long a1, long long a2, int a3, long long a4, long long a5, int a6) { long long Opaque2; // rax long long v7; // r15 long long v8; // r12 long long i; // rdx long long v10; // r13 Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v7 = Opaque2; v8 = Opaque2 + 8; for ( i = *(_QWORD *)(Opaque2 + 16); i != v8; i = v10 ) { v10 = *(_QWORD *)(i + 8); map_delete_record(*(_QWORD *)(a1 + 24), v7, i - 16); } } return 0LL; }
js_map_clear: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI LEA ECX,[R9 + 0x23] CALL 0x00121207 TEST RAX,RAX JZ 0x0014486d MOV R15,RAX MOV R12,RAX ADD R12,0x8 MOV RDX,qword ptr [RAX + 0x10] PUSH 0x3 POP R14 LAB_0014484f: CMP RDX,R12 JZ 0x00144871 MOV R13,qword ptr [RDX + 0x8] ADD RDX,-0x10 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 CALL 0x00144b6e MOV RDX,R13 JMP 0x0014484f LAB_0014486d: PUSH 0x6 POP R14 LAB_00144871: XOR EAX,EAX MOV RDX,R14 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_map_clear(long param_1) { long lVar1; int1 auVar2 [16]; long lVar3; long lVar4; ulong uVar5; lVar3 = JS_GetOpaque2(); if (lVar3 == 0) { uVar5 = 6; } else { uVar5 = 3; lVar4 = *(long *)(lVar3 + 0x10); while (lVar4 != lVar3 + 8) { lVar1 = *(long *)(lVar4 + 8); map_delete_record(*(int8 *)(param_1 + 0x18),lVar3,lVar4 + -0x10); lVar4 = lVar1; } } auVar2._8_8_ = 0; auVar2._0_8_ = uVar5; return auVar2 << 0x40; }
14,960
minja::Value::to_str[abi:cxx11]() const
monkey531[P]llama/common/minja.hpp
std::string to_str() const { if (is_string()) return get<std::string>(); if (is_number_integer()) return std::to_string(get<int64_t>()); if (is_number_float()) return std::to_string(get<double>()); if (is_boolean()) return get<bool>() ? "True" : "False"; if (is_null()) return "None"; return dump(); }
O2
cpp
minja::Value::to_str[abi:cxx11]() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movzbl 0x40(%rsi), %eax cmpl $0x3, %eax jne 0x748f3 movq %rbx, %rdi movq %r14, %rsi callq 0x68008 jmp 0x74981 leal -0x5(%rax), %ecx cmpb $0x1, %cl ja 0x74910 movq %r14, %rdi callq 0x6741c movq %rbx, %rdi movq %rax, %rsi callq 0x751fc jmp 0x74981 cmpl $0x4, %eax je 0x7492c cmpl $0x7, %eax jne 0x7494f movq %r14, %rdi callq 0x674f0 movq %rbx, %rdi callq 0x7525c jmp 0x74981 movq %r14, %rdi callq 0x67f52 leaq 0x43869(%rip), %rcx # 0xb81a4 leaq 0x43867(%rip), %rsi # 0xb81a9 testb %al, %al cmovneq %rcx, %rsi leaq 0x7(%rsp), %rdx jmp 0x74967 movq %r14, %rdi callq 0x67bbe testb %al, %al je 0x74971 leaq 0x43c62(%rip), %rsi # 0xb85c4 leaq 0x6(%rsp), %rdx movq %rbx, %rdi callq 0x28f3a jmp 0x74981 pushq $-0x1 popq %rdx movq %rbx, %rdi movq %r14, %rsi xorl %ecx, %ecx callq 0x675d4 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK5minja5Value6to_strB5cxx11Ev: push r14 push rbx push rax mov r14, rsi mov rbx, rdi movzx eax, byte ptr [rsi+40h] cmp eax, 3 jnz short loc_748F3 mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) jmp loc_74981 loc_748F3: lea ecx, [rax-5] cmp cl, 1 ja short loc_74910 mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov rdi, rbx; this mov rsi, rax; __int64 call _ZNSt7__cxx119to_stringEl; std::to_string(long) jmp short loc_74981 loc_74910: cmp eax, 4 jz short loc_7492C cmp eax, 7 jnz short loc_7494F mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) mov rdi, rbx; this call _ZNSt7__cxx119to_stringEd; std::to_string(double) jmp short loc_74981 loc_7492C: mov rdi, r14 call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx lea rdx, [rsp+18h+var_11] jmp short loc_74967 loc_7494F: mov rdi, r14; this call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jz short loc_74971 lea rsi, aNone_0; "None" lea rdx, [rsp+18h+var_12] loc_74967: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_74981 loc_74971: push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, rbx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) loc_74981: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
std::__cxx11 * minja::Value::to_str[abi:cxx11](std::__cxx11 *this, minja::Value *a2, double a3) { int v3; // eax long long v4; // rax char v5; // al const char *v6; // rsi v3 = *((unsigned __int8 *)a2 + 64); if ( v3 == 3 ) { minja::Value::get<std::string>((long long)this, a2); } else { if ( (unsigned __int8)(v3 - 5) > 1u ) { if ( v3 == 4 ) { v5 = minja::Value::get<bool>(a2); v6 = "False"; if ( v5 ) v6 = "True"; } else { if ( v3 == 7 ) { minja::Value::get<double>(a2); std::to_string(this, a3); return this; } if ( !minja::Value::is_null(a2) ) { minja::Value::dump[abi:cxx11]((long long)this, (long long)a2, 0xFFFFFFFF, 0); return this; } v6 = "None"; } std::string::basic_string<std::allocator<char>>(this, (long long)v6); return this; } v4 = minja::Value::get<long>(a2); std::to_string(this, v4); } return this; }
to_str[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOVZX EAX,byte ptr [RSI + 0x40] CMP EAX,0x3 JNZ 0x001748f3 MOV RDI,RBX MOV RSI,R14 CALL 0x00168008 JMP 0x00174981 LAB_001748f3: LEA ECX,[RAX + -0x5] CMP CL,0x1 JA 0x00174910 MOV RDI,R14 CALL 0x0016741c MOV RDI,RBX MOV RSI,RAX CALL 0x001751fc JMP 0x00174981 LAB_00174910: CMP EAX,0x4 JZ 0x0017492c CMP EAX,0x7 JNZ 0x0017494f MOV RDI,R14 CALL 0x001674f0 MOV RDI,RBX CALL 0x0017525c JMP 0x00174981 LAB_0017492c: MOV RDI,R14 CALL 0x00167f52 LEA RCX,[0x1b81a4] LEA RSI,[0x1b81a9] TEST AL,AL CMOVNZ RSI,RCX LEA RDX,[RSP + 0x7] JMP 0x00174967 LAB_0017494f: MOV RDI,R14 CALL 0x00167bbe TEST AL,AL JZ 0x00174971 LEA RSI,[0x1b85c4] LEA RDX,[RSP + 0x6] LAB_00174967: MOV RDI,RBX CALL 0x00128f3a JMP 0x00174981 LAB_00174971: PUSH -0x1 POP RDX MOV RDI,RBX MOV RSI,R14 XOR ECX,ECX CALL 0x001675d4 LAB_00174981: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* minja::Value::to_str[abi:cxx11]() const */ void minja::Value::to_str_abi_cxx11_(void) { Value VVar1; bool bVar2; char cVar3; long lVar4; allocator *paVar5; Value *in_RSI; char *pcVar6; __cxx11 *in_RDI; double dVar7; allocator local_12; allocator local_11; VVar1 = in_RSI[0x40]; if (VVar1 == (Value)0x3) { get<std::__cxx11::string>(); } else if ((byte)((char)VVar1 - 5U) < 2) { lVar4 = get<long>(in_RSI); std::__cxx11::to_string(in_RDI,lVar4); } else { if (VVar1 == (Value)0x4) { bVar2 = get<bool>(in_RSI); pcVar6 = "False"; if (bVar2) { pcVar6 = "True"; } paVar5 = &local_11; } else { if (VVar1 == (Value)0x7) { dVar7 = get<double>(in_RSI); std::__cxx11::to_string(dVar7); return; } cVar3 = is_null(in_RSI); if (cVar3 == '\0') { dump_abi_cxx11_((int)in_RDI,SUB81(in_RSI,0)); return; } pcVar6 = "None"; paVar5 = &local_12; } std::__cxx11::string::string<std::allocator<char>>((string *)in_RDI,pcVar6,paVar5); } return; }
14,961
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/chat.cpp
static common_chat_msg parse_prefixed_json_tool_call_array(const std::string& input, const std::string & prefix, size_t rstrip_prefix = 0) { auto content_end = input.find(prefix); size_t tc_start = std::string::npos; common_chat_msg result; result.role = "assistant"; const auto process_tool_calls = [&](const json & tool_calls) { for (const auto & tool_call : tool_calls) { const auto & arguments = tool_call["arguments"]; result.tool_calls.push_back({ tool_call["name"], arguments.is_string() ? arguments.get<std::string>() : arguments.dump(), tool_call.contains("id") ? tool_call["id"] : "", }); } }; if (content_end == std::string::npos) { result.content = input; } else { tc_start = content_end + prefix.size() - rstrip_prefix; result.content = input.substr(0, content_end); auto tool_calls = json::parse(input.substr(tc_start)); process_tool_calls(tool_calls); } return result; }
O1
cpp
parse_prefixed_json_tool_call_array(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %rbx movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbp movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %r13d, %r13d movq %r14, %rdi xorl %edx, %edx callq 0x19bc0 movq %rax, %r15 leaq 0x10(%rbp), %rax movq %rax, (%rbp) movq %r13, 0x8(%rbp) movb %r13b, 0x10(%rbp) leaq 0x30(%rbp), %rax movq %rax, 0x20(%rbp) movq %r13, 0x28(%rbp) movb %r13b, 0x30(%rbp) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rbp) movq %r13, 0x50(%rbp) leaq 0x68(%rbp), %rax movq %rax, 0x58(%rbp) movq %r13, 0x60(%rbp) movb %r13b, 0x68(%rbp) leaq 0x10843(%rip), %rcx # 0xbcbc6 movl $0x9, %r8d movq %rbp, %rdi xorl %esi, %esi xorl %edx, %edx movq %rbp, 0x8(%rsp) callq 0x19a80 leaq 0x20(%rbp), %r13 cmpq $-0x1, %r15 je 0xac4b3 movq 0x8(%r12), %r12 leaq 0x40(%rsp), %rdi movq %r14, %rsi xorl %edx, %edx movq %r15, %rcx callq 0x19720 subq %rbx, %r15 addq %r12, %r15 leaq 0x40(%rsp), %rbx movq %r13, %rdi movq %rbx, %rsi callq 0x19840 movq (%rbx), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xac3ef movq 0x50(%rsp), %rsi incq %rsi callq 0x196d0 leaq 0x40(%rsp), %rdi movq %r14, %rsi movq %r15, %rdx movq $-0x1, %rcx callq 0x19720 xorps %xmm0, %xmm0 leaq 0xc0(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rbx leaq 0x40(%rsp), %rsi movq %rbx, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0x84144 movq 0xd0(%rsp), %rax testq %rax, %rax je 0xac451 leaq 0xc0(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xac46d movq 0x50(%rsp), %rsi incq %rsi callq 0x196d0 movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000 leaq 0xa0(%rsp), %rdi movq %rbx, %rsi callq 0x48578 movq %rbx, 0x20(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rsp) movq %r14, 0x38(%rsp) movzbl 0x10(%rsp), %eax cmpl $0x2, %eax je 0xac4c3 cmpl $0x1, %eax jne 0xac4ce movq $0x0, 0x28(%rsp) jmp 0xac4d3 movq %r13, %rdi movq %r14, %rsi callq 0x193d0 jmp 0xac6b7 movq $0x0, 0x30(%rsp) jmp 0xac4d3 movq %r14, 0x38(%rsp) cmpl $0x2, %eax je 0xac4ed cmpl $0x1, %eax jne 0xac4fd movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x28(%rsp) jmp 0xac506 movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x30(%rsp) jmp 0xac506 movq $0x1, 0x38(%rsp) leaq 0xa0(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x486f4 testb %al, %al jne 0xac6ad movq 0x8(%rsp), %rax leaq 0x40(%rax), %r14 leaq 0xa0(%rsp), %r13 leaq 0x40(%rsp), %r12 leaq 0xe8(%rsp), %r15 movq %r13, %rdi callq 0x449b0 movq %rax, %rbx movq %rax, %rdi leaq 0x1199c(%rip), %rsi # 0xbdeef callq 0x4402c movq %rax, %rbp movq %rbx, %rdi leaq 0x11f2e(%rip), %rsi # 0xbe493 callq 0x4402c movq %r12, %rdi movq %rax, %rsi callq 0x47254 cmpb $0x3, (%rbp) jne 0xac58a leaq 0x60(%rsp), %rdi movq %rbp, %rsi callq 0x47254 jmp 0xac5a7 leaq 0x60(%rsp), %rdi movq %rbp, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movl $0x20, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x46d54 movq %rbx, %rdi leaq 0x10a74(%rip), %rsi # 0xbd025 callq 0x84958 testb %al, %al je 0xac5d6 movq %rbx, %rdi leaq 0x10a61(%rip), %rsi # 0xbd025 callq 0x4402c movq %r15, %rdi movq %rax, %rsi callq 0x36864 jmp 0xac5e5 movq %r15, %rdi leaq 0xb25d(%rip), %rsi # 0xb783d callq 0x94a06 leaq 0x80(%rsp), %rdi movq %r15, %rsi callq 0x47254 movq %r14, %rdi movq %r12, %rsi callq 0xaf2e8 movq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax cmpq %rax, %rdi je 0xac625 movq 0x90(%rsp), %rsi incq %rsi callq 0x196d0 movq 0x60(%rsp), %rdi leaq 0x70(%rsp), %rax cmpq %rax, %rdi je 0xac641 movq 0x70(%rsp), %rsi incq %rsi callq 0x196d0 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xac65d movq 0x50(%rsp), %rsi incq %rsi callq 0x196d0 movq %r15, %rdi callq 0x36dc4 movq 0xa0(%rsp), %rax movzbl (%rax), %eax cmpl $0x2, %eax je 0xac685 cmpl $0x1, %eax jne 0xac690 addq $0x30, 0xa8(%rsp) jmp 0xac698 addq $0x10, 0xb0(%rsp) jmp 0xac698 incq 0xb8(%rsp) movq %r13, %rdi leaq 0x20(%rsp), %rsi callq 0x486f4 testb %al, %al je 0xac53e leaq 0x10(%rsp), %rdi callq 0x36dc4 movq 0x8(%rsp), %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xac72a jmp 0xac71e jmp 0xac7a5 movq %rax, %r14 movq 0xd0(%rsp), %rax testq %rax, %rax je 0xac6f9 leaq 0xc0(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xac7b2 movq 0x50(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0xac7b2 movq %rax, %rdi callq 0x22f37 jmp 0xac72a jmp 0xac72a movq %rax, %r14 jmp 0xac7b2 movq %rax, %r14 movb $0x1, %bl jmp 0xac783 movq %rax, %r14 movb $0x1, %bl jmp 0xac74f movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0xaf208 xorl %ebx, %ebx leaq 0xe8(%rsp), %rdi callq 0x36dc4 jmp 0xac763 movq %rax, %r14 movb $0x1, %bl testb %bl, %bl je 0xac783 movq 0x60(%rsp), %rdi leaq 0x70(%rsp), %rax cmpq %rax, %rdi je 0xac783 movq 0x70(%rsp), %rsi incq %rsi callq 0x196d0 testb %bl, %bl je 0xac7a8 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xac7a8 movq 0x50(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0xac7a8 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x36dc4 movq 0x8(%rsp), %rdi callq 0x5f792 movq %r14, %rdi callq 0x19c00
_ZL35parse_prefixed_json_tool_call_arrayRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_m: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov rbx, rcx mov r12, rdx mov r14, rsi mov rbp, rdi mov rsi, [rdx] mov rcx, [rdx+8] xor r13d, r13d mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r15, rax lea rax, [rbp+10h] mov [rbp+0], rax mov [rbp+8], r13 mov [rbp+10h], r13b lea rax, [rbp+30h] mov [rbp+20h], rax mov [rbp+28h], r13 mov [rbp+30h], r13b xorps xmm0, xmm0 movups xmmword ptr [rbp+40h], xmm0 mov [rbp+50h], r13 lea rax, [rbp+68h] mov [rbp+58h], rax mov [rbp+60h], r13 mov [rbp+68h], r13b lea rcx, aYouAreAHelpful+12h; "assistant" mov r8d, 9 mov rdi, rbp xor esi, esi xor edx, edx mov [rsp+128h+var_120], rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) lea r13, [rbp+20h] cmp r15, 0FFFFFFFFFFFFFFFFh jz loc_AC4B3 mov r12, [r12+8] lea rdi, [rsp+128h+var_E8] mov rsi, r14 xor edx, edx mov rcx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) sub r15, rbx add r15, r12 lea rbx, [rsp+128h+var_E8] mov rdi, r13 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * lea rax, [rsp+128h+var_D8] cmp rdi, rax jz short loc_AC3EF mov rsi, [rsp+128h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC3EF: lea rdi, [rsp+128h+var_E8] mov rsi, r14 mov rdx, r15 mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_68] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rbx, [rsp+128h+var_118] lea rsi, [rsp+128h+var_E8] mov rdi, rbx mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string>(std::string &&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) mov rax, [rsp+128h+var_58] test rax, rax jz short loc_AC451 lea rdi, [rsp+128h+var_68] mov rsi, rdi mov edx, 3 call rax loc_AC451: mov rdi, [rsp+128h+var_E8]; void * lea rax, [rsp+128h+var_D8] cmp rdi, rax jz short loc_AC46D mov rsi, [rsp+128h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC46D: mov r14, 8000000000000000h lea rdi, [rsp+128h+var_88] mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void) mov [rsp+128h+var_108], rbx xorps xmm0, xmm0 movups [rsp+128h+var_100], xmm0 mov [rsp+128h+var_F0], r14 movzx eax, [rsp+128h+var_118] cmp eax, 2 jz short loc_AC4C3 cmp eax, 1 jnz short loc_AC4CE mov qword ptr [rsp+128h+var_100], 0 jmp short loc_AC4D3 loc_AC4B3: mov rdi, r13 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp loc_AC6B7 loc_AC4C3: mov qword ptr [rsp+128h+var_100+8], 0 jmp short loc_AC4D3 loc_AC4CE: mov [rsp+128h+var_F0], r14 loc_AC4D3: cmp eax, 2 jz short loc_AC4ED cmp eax, 1 jnz short loc_AC4FD mov rax, [rsp+128h+var_110] mov rax, [rax+8] mov qword ptr [rsp+128h+var_100], rax jmp short loc_AC506 loc_AC4ED: mov rax, [rsp+128h+var_110] mov rax, [rax+8] mov qword ptr [rsp+128h+var_100+8], rax jmp short loc_AC506 loc_AC4FD: mov [rsp+128h+var_F0], 1 loc_AC506: lea rdi, [rsp+128h+var_88] lea rsi, [rsp+128h+var_108] call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jnz loc_AC6AD mov rax, [rsp+128h+var_120] lea r14, [rax+40h] lea r13, [rsp+128h+var_88] lea r12, [rsp+128h+var_E8] lea r15, [rsp+128h+var_40] loc_AC53E: mov rdi, r13 call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; 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>::operator*(void) mov rbx, rax mov rdi, rax lea rsi, aKeywordArgumen+9; "arguments" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rbp, rax mov rdi, rbx lea rsi, aNamespacedSetO+2Fh; "name" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rdi, r12 mov rsi, rax call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE cmp byte ptr [rbp+0], 3 jnz short loc_AC58A lea rdi, [rsp+128h+var_C8] mov rsi, rbp call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE jmp short loc_AC5A7 loc_AC58A: lea rdi, [rsp+128h+var_C8] mov rsi, rbp mov edx, 0FFFFFFFFh mov ecx, 20h ; ' ' xor r8d, r8d xor r9d, r9d call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t) loc_AC5A7: mov rdi, rbx lea rsi, aToolCallId+0Ah; "id" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz short loc_AC5D6 mov rdi, rbx lea rsi, aToolCallId+0Ah; "id" call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov rdi, r15 mov rsi, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_AC5E5 loc_AC5D6: mov rdi, r15 lea rsi, asc_B7839+4; "" call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ loc_AC5E5: lea rdi, [rsp+128h+var_A8] mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov rdi, r14 mov rsi, r12 call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&) mov rdi, [rsp+128h+var_A8]; void * lea rax, [rsp+128h+var_98] cmp rdi, rax jz short loc_AC625 mov rsi, [rsp+128h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC625: mov rdi, [rsp+128h+var_C8]; void * lea rax, [rsp+128h+var_B8] cmp rdi, rax jz short loc_AC641 mov rsi, [rsp+128h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC641: mov rdi, [rsp+128h+var_E8]; void * lea rax, [rsp+128h+var_D8] cmp rdi, rax jz short loc_AC65D mov rsi, [rsp+128h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC65D: mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, [rsp+128h+var_88] movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_AC685 cmp eax, 1 jnz short loc_AC690 add [rsp+128h+var_80], 30h ; '0' jmp short loc_AC698 loc_AC685: add [rsp+128h+var_78], 10h jmp short loc_AC698 loc_AC690: inc [rsp+128h+var_70] loc_AC698: mov rdi, r13 lea rsi, [rsp+128h+var_108] call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jz loc_AC53E loc_AC6AD: lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_AC6B7: mov rax, [rsp+128h+var_120] add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_AC72A jmp short loc_AC71E jmp loc_AC7A5 mov r14, rax mov rax, [rsp+128h+var_58] test rax, rax jz short loc_AC6F9 lea rdi, [rsp+128h+var_68] mov rsi, rdi mov edx, 3 call rax loc_AC6F9: mov rdi, [rsp+128h+var_E8]; void * lea rax, [rsp+128h+var_D8] cmp rdi, rax jz loc_AC7B2 mov rsi, [rsp+128h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_AC7B2 loc_AC71E: mov rdi, rax call __clang_call_terminate jmp short loc_AC72A jmp short $+2 loc_AC72A: mov r14, rax jmp loc_AC7B2 mov r14, rax mov bl, 1 jmp short loc_AC783 mov r14, rax mov bl, 1 jmp short loc_AC74F mov r14, rax lea rdi, [rsp+128h+var_E8]; this call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call() xor ebx, ebx loc_AC74F: lea rdi, [rsp+128h+var_40] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_AC763 mov r14, rax mov bl, 1 loc_AC763: test bl, bl jz short loc_AC783 mov rdi, [rsp+128h+var_C8]; void * lea rax, [rsp+128h+var_B8] cmp rdi, rax jz short loc_AC783 mov rsi, [rsp+128h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC783: test bl, bl jz short loc_AC7A8 mov rdi, [rsp+128h+var_E8]; void * lea rax, [rsp+128h+var_D8] cmp rdi, rax jz short loc_AC7A8 mov rsi, [rsp+128h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AC7A8 loc_AC7A5: mov r14, rax loc_AC7A8: lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_AC7B2: mov rdi, [rsp+128h+var_120]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov rdi, r14 call __Unwind_Resume
long long parse_prefixed_json_tool_call_array(long long a1, long long a2, _QWORD *a3, long long a4) { long long v6; // r15 long long v7; // r12 long long v8; // r15 long long v9; // rbx _BYTE *v10; // rbp long long v11; // rax unsigned __int8 *v12; // rax int v13; // eax unsigned __int8 v15[8]; // [rsp+10h] [rbp-118h] BYREF long long v16; // [rsp+18h] [rbp-110h] unsigned __int8 *v17; // [rsp+20h] [rbp-108h] BYREF __int128 v18; // [rsp+28h] [rbp-100h] long long v19; // [rsp+38h] [rbp-F0h] void *v20[2]; // [rsp+40h] [rbp-E8h] BYREF _QWORD v21[2]; // [rsp+50h] [rbp-D8h] BYREF void *v22[2]; // [rsp+60h] [rbp-C8h] BYREF long long v23; // [rsp+70h] [rbp-B8h] BYREF void *v24; // [rsp+80h] [rbp-A8h] BYREF long long v25; // [rsp+90h] [rbp-98h] BYREF unsigned __int8 *v26; // [rsp+A0h] [rbp-88h] BYREF long long v27; // [rsp+A8h] [rbp-80h] long long v28; // [rsp+B0h] [rbp-78h] long long v29; // [rsp+B8h] [rbp-70h] __int128 v30; // [rsp+C0h] [rbp-68h] BYREF __int128 v31; // [rsp+D0h] [rbp-58h] unsigned __int8 v32[64]; // [rsp+E8h] [rbp-40h] BYREF v6 = std::string::find(a2, *a3, 0LL, a3[1]); *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; *(_QWORD *)(a1 + 32) = a1 + 48; *(_QWORD *)(a1 + 40) = 0LL; *(_BYTE *)(a1 + 48) = 0; *(_OWORD *)(a1 + 64) = 0LL; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 104; *(_QWORD *)(a1 + 96) = 0LL; *(_BYTE *)(a1 + 104) = 0; std::string::_M_replace(a1, 0LL, 0LL, "assistant", 9LL); if ( v6 == -1 ) { std::string::_M_assign(a1 + 32, a2); } else { v7 = a3[1]; std::string::substr(v20, a2, 0LL, v6); v8 = v7 + v6 - a4; std::string::operator=(a1 + 32, v20); if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); std::string::substr(v20, a2, v8, -1LL); v31 = 0LL; v30 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>( (long long)v15, (long long *)v20, (long long)&v30, 1u, 0); if ( (_QWORD)v31 ) ((void ( *)(__int128 *, __int128 *, long long))v31)(&v30, &v30, 3LL); if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cbegin( (long long)&v26, v15); v17 = v15; v18 = 0LL; v19 = 0x8000000000000000LL; if ( v15[0] == 2 ) { *((_QWORD *)&v18 + 1) = 0LL; } else if ( v15[0] == 1 ) { *(_QWORD *)&v18 = 0LL; } else { v19 = 0x8000000000000000LL; } if ( v15[0] == 2 ) { *((_QWORD *)&v18 + 1) = *(_QWORD *)(v16 + 8); } else if ( v15[0] == 1 ) { *(_QWORD *)&v18 = *(_QWORD *)(v16 + 8); } else { v19 = 1LL; } while ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_( &v26, &v17) ) { v9 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v26); v10 = (_BYTE *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v9, "arguments"); v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v9, "name"); ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v20, v11); if ( *v10 == 3 ) ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v22, (long long)v10); else 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>::dump( (long long)v22, (long long)v10, -1, 32, 0, 0); if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( v9, (long long)"id") ) { v12 = (unsigned __int8 *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( v9, "id"); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( v32, v12); } else { ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_((char *)v32); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)&v24, (long long)v32); std::vector<common_tool_call>::emplace_back<common_tool_call>(a1 + 64, v20); if ( v24 != &v25 ) operator delete(v24, v25 + 1); if ( v22[0] != &v23 ) operator delete(v22[0], v23 + 1); if ( v20[0] != v21 ) operator delete(v20[0], v21[0] + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32); v13 = *v26; if ( v13 == 2 ) { v28 += 16LL; } else if ( v13 == 1 ) { v27 += 48LL; } else { ++v29; } } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v15); } return a1; }
parse_prefixed_json_tool_call_array: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV RBX,RCX MOV R12,RDX MOV R14,RSI MOV RBP,RDI MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR R13D,R13D MOV RDI,R14 XOR EDX,EDX CALL 0x00119bc0 MOV R15,RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP],RAX MOV qword ptr [RBP + 0x8],R13 MOV byte ptr [RBP + 0x10],R13B LEA RAX,[RBP + 0x30] MOV qword ptr [RBP + 0x20],RAX MOV qword ptr [RBP + 0x28],R13 MOV byte ptr [RBP + 0x30],R13B XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + 0x40],XMM0 MOV qword ptr [RBP + 0x50],R13 LEA RAX,[RBP + 0x68] MOV qword ptr [RBP + 0x58],RAX MOV qword ptr [RBP + 0x60],R13 MOV byte ptr [RBP + 0x68],R13B LAB_001ac37c: LEA RCX,[0x1bcbc6] MOV R8D,0x9 MOV RDI,RBP XOR ESI,ESI XOR EDX,EDX MOV qword ptr [RSP + 0x8],RBP CALL 0x00119a80 LEA R13,[RBP + 0x20] CMP R15,-0x1 JZ 0x001ac4b3 MOV R12,qword ptr [R12 + 0x8] LAB_001ac3ad: LEA RDI,[RSP + 0x40] MOV RSI,R14 XOR EDX,EDX MOV RCX,R15 CALL 0x00119720 SUB R15,RBX ADD R15,R12 LEA RBX,[RSP + 0x40] MOV RDI,R13 MOV RSI,RBX CALL 0x00119840 MOV RDI,qword ptr [RBX] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001ac3ef MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001196d0 LAB_001ac3ef: LEA RDI,[RSP + 0x40] MOV RSI,R14 MOV RDX,R15 MOV RCX,-0x1 CALL 0x00119720 XORPS XMM0,XMM0 LEA RDX,[RSP + 0xc0] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_001ac418: LEA RBX,[RSP + 0x10] LEA RSI,[RSP + 0x40] MOV RDI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x00184144 MOV RAX,qword ptr [RSP + 0xd0] TEST RAX,RAX JZ 0x001ac451 LAB_001ac43f: LEA RDI,[RSP + 0xc0] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001ac451: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001ac46d MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001196d0 LAB_001ac46d: MOV R14,-0x8000000000000000 LEA RDI,[RSP + 0xa0] MOV RSI,RBX CALL 0x00148578 MOV qword ptr [RSP + 0x20],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x28],XMM0 MOV qword ptr [RSP + 0x38],R14 MOVZX EAX,byte ptr [RSP + 0x10] CMP EAX,0x2 JZ 0x001ac4c3 CMP EAX,0x1 JNZ 0x001ac4ce MOV qword ptr [RSP + 0x28],0x0 JMP 0x001ac4d3 LAB_001ac4b3: MOV RDI,R13 MOV RSI,R14 CALL 0x001193d0 JMP 0x001ac6b7 LAB_001ac4c3: MOV qword ptr [RSP + 0x30],0x0 JMP 0x001ac4d3 LAB_001ac4ce: MOV qword ptr [RSP + 0x38],R14 LAB_001ac4d3: CMP EAX,0x2 JZ 0x001ac4ed CMP EAX,0x1 JNZ 0x001ac4fd MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RAX JMP 0x001ac506 LAB_001ac4ed: MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RAX JMP 0x001ac506 LAB_001ac4fd: MOV qword ptr [RSP + 0x38],0x1 LAB_001ac506: LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x20] CALL 0x001486f4 TEST AL,AL JNZ 0x001ac6ad MOV RAX,qword ptr [RSP + 0x8] LEA R14,[RAX + 0x40] LEA R13,[RSP + 0xa0] LEA R12,[RSP + 0x40] LEA R15,[RSP + 0xe8] LAB_001ac53e: MOV RDI,R13 CALL 0x001449b0 MOV RBX,RAX MOV RDI,RAX LEA RSI,[0x1bdeef] CALL 0x0014402c MOV RBP,RAX MOV RDI,RBX LEA RSI,[0x1be493] CALL 0x0014402c MOV RDI,R12 MOV RSI,RAX CALL 0x00147254 CMP byte ptr [RBP],0x3 JNZ 0x001ac58a LAB_001ac57b: LEA RDI,[RSP + 0x60] MOV RSI,RBP CALL 0x00147254 JMP 0x001ac5a7 LAB_001ac58a: LEA RDI,[RSP + 0x60] MOV RSI,RBP MOV EDX,0xffffffff MOV ECX,0x20 XOR R8D,R8D XOR R9D,R9D CALL 0x00146d54 LAB_001ac5a7: MOV RDI,RBX LEA RSI,[0x1bd025] CALL 0x00184958 TEST AL,AL JZ 0x001ac5d6 MOV RDI,RBX LEA RSI,[0x1bd025] CALL 0x0014402c MOV RDI,R15 MOV RSI,RAX CALL 0x00136864 JMP 0x001ac5e5 LAB_001ac5d6: MOV RDI,R15 LEA RSI,[0x1b783d] CALL 0x00194a06 LAB_001ac5e5: LEA RDI,[RSP + 0x80] MOV RSI,R15 CALL 0x00147254 LAB_001ac5f5: MOV RDI,R14 MOV RSI,R12 CALL 0x001af2e8 MOV RDI,qword ptr [RSP + 0x80] LEA RAX,[RSP + 0x90] CMP RDI,RAX JZ 0x001ac625 MOV RSI,qword ptr [RSP + 0x90] INC RSI CALL 0x001196d0 LAB_001ac625: MOV RDI,qword ptr [RSP + 0x60] LEA RAX,[RSP + 0x70] CMP RDI,RAX JZ 0x001ac641 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001196d0 LAB_001ac641: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001ac65d MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001196d0 LAB_001ac65d: MOV RDI,R15 CALL 0x00136dc4 MOV RAX,qword ptr [RSP + 0xa0] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x001ac685 CMP EAX,0x1 JNZ 0x001ac690 ADD qword ptr [RSP + 0xa8],0x30 JMP 0x001ac698 LAB_001ac685: ADD qword ptr [RSP + 0xb0],0x10 JMP 0x001ac698 LAB_001ac690: INC qword ptr [RSP + 0xb8] LAB_001ac698: MOV RDI,R13 LEA RSI,[RSP + 0x20] CALL 0x001486f4 TEST AL,AL JZ 0x001ac53e LAB_001ac6ad: LEA RDI,[RSP + 0x10] CALL 0x00136dc4 LAB_001ac6b7: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* parse_prefixed_json_tool_call_array(std::__cxx11::string const&, std::__cxx11::string const&, unsigned long) */ string * parse_prefixed_json_tool_call_array(string *param_1,string *param_2,ulong param_3) { char cVar1; long lVar2; 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 *pbVar3; basic_json *pbVar4; 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_118 [8]; long local_110; 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_108; int8 local_100; int8 uStack_f8; int8 local_f0; long *local_e8 [2]; long local_d8 [2]; long *local_c8 [2]; long local_b8 [2]; long *local_a8 [2]; long local_98 [2]; char *local_88; long local_80; long local_78; long local_70; int8 local_68; int8 uStack_60; code *local_58; int8 uStack_50; 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 [16]; lVar2 = std::__cxx11::string::find((char *)param_2,*(ulong *)param_3,0); *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; *(string **)(param_1 + 0x20) = param_1 + 0x30; *(int8 *)(param_1 + 0x28) = 0; param_1[0x30] = (string)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(string **)(param_1 + 0x58) = param_1 + 0x68; *(int8 *)(param_1 + 0x60) = 0; param_1[0x68] = (string)0x0; /* try { // try from 001ac37c to 001ac399 has its CatchHandler @ 001ac72a */ std::__cxx11::string::_M_replace((ulong)param_1,0,(char *)0x0,0x1bcbc6); if (lVar2 == -1) { /* try { // try from 001ac4b3 to 001ac4bd has its CatchHandler @ 001ac6ce */ std::__cxx11::string::_M_assign(param_1 + 0x20); } else { /* try { // try from 001ac3ad to 001ac3be has its CatchHandler @ 001ac728 */ std::__cxx11::string::substr((ulong)local_e8,(ulong)param_2); std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_e8); if (local_e8[0] != local_d8) { operator_delete(local_e8[0],local_d8[0] + 1); } /* try { // try from 001ac3ef to 001ac405 has its CatchHandler @ 001ac726 */ std::__cxx11::string::substr((ulong)local_e8,(ulong)param_2); local_58 = (code *)0x0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; /* try { // try from 001ac418 to 001ac431 has its CatchHandler @ 001ac6d7 */ 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> ::parse<std::__cxx11::string>(local_118,local_e8,&local_68,1,0); if (local_58 != (code *)0x0) { /* try { // try from 001ac43f to 001ac450 has its CatchHandler @ 001ac6d0 */ (*local_58)(&local_68,&local_68,3); } if (local_e8[0] != local_d8) { operator_delete(local_e8[0],local_d8[0] + 1); } 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> ::cbegin(); local_f0 = 0x8000000000000000; uStack_f8 = 0; local_100 = 0; if (local_118[0] == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uStack_f8 = *(int8 *)(local_110 + 8); } else if (local_118[0] == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { local_100 = *(int8 *)(local_110 + 8); } else { local_f0 = 1; } /* try { // try from 001ac506 to 001ac517 has its CatchHandler @ 001ac6d2 */ local_108 = local_118; cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (&local_88,&local_108); if (cVar1 == '\0') { do { /* try { // try from 001ac53e to 001ac574 has its CatchHandler @ 001ac7a5 */ 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> *)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> ::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_88); pbVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"arguments"); pbVar4 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"name"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE ((common_tool_call *)local_e8,pbVar4); if (*pbVar3 == (basic_json)0x3) { /* try { // try from 001ac57b to 001ac5a6 has its CatchHandler @ 001ac732 */ _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_c8,pbVar3); } else { 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> ::dump(local_c8,pbVar3,0xffffffff,0x20,0,0); } /* try { // try from 001ac5a7 to 001ac5e4 has its CatchHandler @ 001ac75e */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (this,"id"); if (cVar1 == '\0') { _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ (local_40,&DAT_001b783d); } else { pbVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(this,"id"); 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> ::basic_json(local_40,pbVar3); } /* try { // try from 001ac5e5 to 001ac5f4 has its CatchHandler @ 001ac739 */ _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_a8,local_40); /* try { // try from 001ac5f5 to 001ac5ff has its CatchHandler @ 001ac740 */ std::vector<common_tool_call,std::allocator<common_tool_call>>:: emplace_back<common_tool_call> ((vector<common_tool_call,std::allocator<common_tool_call>> *)(param_1 + 0x40), (common_tool_call *)local_e8); if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (local_c8[0] != local_b8) { operator_delete(local_c8[0],local_b8[0] + 1); } if (local_e8[0] != local_d8) { operator_delete(local_e8[0],local_d8[0] + 1); } 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> ::data::~data((data *)local_40); if (*local_88 == '\x02') { local_78 = local_78 + 0x10; } else if (*local_88 == '\x01') { local_80 = local_80 + 0x30; } else { local_70 = local_70 + 1; } /* try { // try from 001ac698 to 001ac6a4 has its CatchHandler @ 001ac7a5 */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ ((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *)&local_88,&local_108); } while (cVar1 == '\0'); } 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> ::data::~data((data *)local_118); } return param_1; }
14,962
ma_SHA1Init
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Init(_MA_SHA1_CTX * context) { context->count[0] = context->count[1] = 0; /* Load magic initialization constants. */ context->state[0] = 0x67452301; context->state[1] = 0xefcdab89; context->state[2] = 0x98badcfe; context->state[3] = 0x10325476; context->state[4] = 0xc3d2e1f0; }
O0
c
ma_SHA1Init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x8(%rbp), %rax movl $0x67452301, (%rax) # imm = 0x67452301 movq -0x8(%rbp), %rax movl $0xefcdab89, 0x4(%rax) # imm = 0xEFCDAB89 movq -0x8(%rbp), %rax movl $0x98badcfe, 0x8(%rax) # imm = 0x98BADCFE movq -0x8(%rbp), %rax movl $0x10325476, 0xc(%rax) # imm = 0x10325476 movq -0x8(%rbp), %rax movl $0xc3d2e1f0, 0x10(%rax) # imm = 0xC3D2E1F0 popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_8] mov dword ptr [rax], 67452301h mov rax, [rbp+var_8] mov dword ptr [rax+4], 0EFCDAB89h mov rax, [rbp+var_8] mov dword ptr [rax+8], 98BADCFEh mov rax, [rbp+var_8] mov dword ptr [rax+0Ch], 10325476h mov rax, [rbp+var_8] mov dword ptr [rax+10h], 0C3D2E1F0h pop rbp retn
_DWORD * ma_SHA1Init(_DWORD *a1) { _DWORD *result; // rax a1[6] = 0; a1[5] = 0; *a1 = 1732584193; a1[1] = -271733879; a1[2] = -1732584194; a1[3] = 271733878; result = a1; a1[4] = -1009589776; return result; }
ma_SHA1Init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],0x67452301 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0xefcdab89 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],0x98badcfe MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],0x10325476 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],0xc3d2e1f0 POP RBP RET
void ma_SHA1Init(int4 *param_1) { param_1[6] = 0; param_1[5] = 0; *param_1 = 0x67452301; param_1[1] = 0xefcdab89; param_1[2] = 0x98badcfe; param_1[3] = 0x10325476; param_1[4] = 0xc3d2e1f0; return; }
14,963
mysql_kill_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_kill_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_kill, (parms->mysql, parms->pid), parms->mysql, int, r_int) }
O0
c
mysql_kill_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x3ad70 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_kill_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_kill mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_kill_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_kill(*a1, a1[1]); result = v2; *v2 = 0; return result; }
mysql_kill_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0013ad70 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_kill_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_kill(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
14,964
lre_case_conv_entry
bluesky950520[P]quickjs/libunicode.c
static int lre_case_conv_entry(uint32_t *res, uint32_t c, int conv_type, uint32_t idx, uint32_t v) { uint32_t code, data, type, a, is_lower; is_lower = (conv_type != 0); type = (v >> (32 - 17 - 7 - 4)) & 0xf; data = ((v & 0xf) << 8) | case_conv_table2[idx]; code = v >> (32 - 17); switch(type) { case RUN_TYPE_U: case RUN_TYPE_L: case RUN_TYPE_UF: case RUN_TYPE_LF: if (conv_type == (type & 1) || (type >= RUN_TYPE_UF && conv_type == 2)) { c = c - code + (case_conv_table1[data] >> (32 - 17)); } break; case RUN_TYPE_UL: a = c - code; if ((a & 1) != (1 - is_lower)) break; c = (a ^ 1) + code; break; case RUN_TYPE_LSU: a = c - code; if (a == 1) { c += 2 * is_lower - 1; } else if (a == (1 - is_lower) * 2) { c += (2 * is_lower - 1) * 2; } break; case RUN_TYPE_U2L_399_EXT2: if (!is_lower) { res[0] = c - code + case_conv_ext[data >> 6]; res[1] = 0x399; return 2; } else { c = c - code + case_conv_ext[data & 0x3f]; } break; case RUN_TYPE_UF_D20: if (conv_type == 1) break; c = data + (conv_type == 2) * 0x20; break; case RUN_TYPE_UF_D1_EXT: if (conv_type == 1) break; c = case_conv_ext[data] + (conv_type == 2); break; case RUN_TYPE_U_EXT: case RUN_TYPE_LF_EXT: if (is_lower != (type - RUN_TYPE_U_EXT)) break; c = case_conv_ext[data]; break; case RUN_TYPE_LF_EXT2: if (!is_lower) break; res[0] = c - code + case_conv_ext[data >> 6]; res[1] = case_conv_ext[data & 0x3f]; return 2; case RUN_TYPE_UF_EXT2: if (conv_type == 1) break; res[0] = c - code + case_conv_ext[data >> 6]; res[1] = case_conv_ext[data & 0x3f]; if (conv_type == 2) { /* convert to lower */ res[0] = lre_case_conv1(res[0], 1); res[1] = lre_case_conv1(res[1], 1); } return 2; default: case RUN_TYPE_UF_EXT3: if (conv_type == 1) break; res[0] = case_conv_ext[data >> 8]; res[1] = case_conv_ext[(data >> 4) & 0xf]; res[2] = case_conv_ext[data & 0xf]; if (conv_type == 2) { /* convert to lower */ res[0] = lre_case_conv1(res[0], 1); res[1] = lre_case_conv1(res[1], 1); res[2] = lre_case_conv1(res[2], 1); } return 3; } res[0] = c; return 1; }
O1
c
lre_case_conv_entry: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %r8d, %r9d shrl $0x4, %r9d movl %r9d, %edi andl $0xf, %edi movl %r8d, %eax andl $0xf, %eax shll $0x8, %eax movl %ecx, %ecx leaq 0xdeef(%rip), %r10 # 0xa5440 movzbl (%rcx,%r10), %ecx cmpl $0xc, %edi ja 0x976e4 orl %ecx, %eax shrl $0xf, %r8d leaq 0xaa94(%rip), %r10 # 0xa2000 movslq (%r10,%rdi,4), %r11 addq %r10, %r11 jmpq *%r11 andl $0x1, %r9d cmpl %edx, %r9d je 0x9758f cmpl $0x2, %edi setb %cl cmpl $0x2, %edx setne %dl orb %cl, %dl jne 0x975a3 subl %r8d, %esi movl %eax, %eax leaq 0xaba5(%rip), %rcx # 0xa2140 movl (%rcx,%rax,4), %eax shrl $0xf, %eax addl %eax, %esi movl %esi, (%rbx) movl $0x1, %ebp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq xorl %ecx, %ecx testl %edx, %edx setne %cl addl $-0x9, %edi cmpl %ecx, %edi jne 0x975a3 movl %eax, %eax leaq 0xdff0(%rip), %rcx # 0xa55c0 movzwl (%rcx,%rax,2), %esi jmp 0x975a3 subl %r8d, %esi testl %edx, %edx je 0x977c0 andl $0x3f, %ecx leaq 0xdfd5(%rip), %rax # 0xa55c0 movzwl (%rax,%rcx,2), %eax jmp 0x975a1 cmpl $0x1, %edx je 0x975a3 subl %r8d, %esi shrl $0x6, %eax leaq 0xdfbd(%rip), %rdi # 0xa55c0 movzwl (%rdi,%rax,2), %eax addl %esi, %eax movl %eax, (%rbx) andl $0x3f, %ecx movzwl (%rdi,%rcx,2), %r14d movl %r14d, 0x4(%rbx) movl $0x2, %ebp cmpl $0x2, %edx jne 0x975aa leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %eax, %esi movl $0x1, %edx callq 0x97480 movl (%r15), %eax movl %eax, (%rbx) leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %r14d, %esi movl $0x1, %edx callq 0x97480 movl (%r15), %eax movl %eax, 0x4(%rbx) jmp 0x975aa movl %esi, %eax subl %r8d, %eax cmpl $0x1, %eax jne 0x9779d xorl %eax, %eax cmpl $0x1, %edx sbbl %eax, %eax orl $0x1, %eax jmp 0x975a1 testl %edx, %edx je 0x975a3 subl %r8d, %esi shrl $0x6, %eax leaq 0xdf34(%rip), %rdx # 0xa55c0 movzwl (%rdx,%rax,2), %eax addl %esi, %eax movl %eax, (%rbx) andl $0x3f, %ecx movzwl (%rdx,%rcx,2), %eax movl %eax, 0x4(%rbx) jmp 0x977d9 testl %edx, %edx setne %cl movl %esi, %eax subl %r8d, %eax movl %eax, %edx andb $0x1, %dl cmpb %dl, %cl je 0x975a3 xorl $0x1, %eax addl %r8d, %eax movl %eax, %esi jmp 0x975a3 cmpl $0x1, %edx je 0x975a3 xorl %ecx, %ecx cmpl $0x2, %edx sete %cl shll $0x5, %ecx addl %ecx, %eax movl %eax, %esi jmp 0x975a3 cmpl $0x1, %edx je 0x975a3 shrl $0x7, %eax leaq 0xdec9(%rip), %rdi # 0xa55c0 movzwl (%rax,%rdi), %esi movl %esi, (%rbx) movl %ecx, %eax shrl $0x4, %eax movzwl (%rdi,%rax,2), %r15d movl %r15d, 0x4(%rbx) andl $0xf, %ecx movzwl (%rdi,%rcx,2), %r14d movl %r14d, 0x8(%rbx) movl $0x3, %ebp cmpl $0x2, %edx jne 0x975aa leaq 0x4(%rsp), %r12 movq %r12, %rdi movl $0x1, %edx callq 0x97480 movl (%r12), %eax movl %eax, (%rbx) leaq 0x4(%rsp), %r12 movq %r12, %rdi movl %r15d, %esi movl $0x1, %edx callq 0x97480 movl (%r12), %eax movl %eax, 0x4(%rbx) leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %r14d, %esi movl $0x1, %edx callq 0x97480 movl (%r15), %eax movl %eax, 0x8(%rbx) jmp 0x975aa cmpl $0x1, %edx je 0x975a3 movl %eax, %eax leaq 0xde35(%rip), %rcx # 0xa55c0 movzwl (%rcx,%rax,2), %eax xorl %esi, %esi cmpl $0x2, %edx sete %sil jmp 0x975a1 xorl %ecx, %ecx testl %edx, %edx sete %cl addl %ecx, %ecx cmpl %ecx, %eax jne 0x975a3 xorl %eax, %eax testl %edx, %edx setne %al leal (%rsi,%rax,4), %esi addl $-0x2, %esi jmp 0x975a3 shrl $0x6, %eax leaq 0xddf6(%rip), %rcx # 0xa55c0 movzwl (%rcx,%rax,2), %eax addl %eax, %esi movl %esi, (%rbx) movl $0x399, 0x4(%rbx) # imm = 0x399 movl $0x2, %ebp jmp 0x975aa
lre_case_conv_entry: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r9d, r8d shr r9d, 4 mov edi, r9d and edi, 0Fh mov eax, r8d and eax, 0Fh shl eax, 8 mov ecx, ecx lea r10, case_conv_table2 movzx ecx, byte ptr [rcx+r10] cmp edi, 0Ch; switch 13 cases ja def_97573; jumptable 0000000000097573 default case or eax, ecx shr r8d, 0Fh lea r10, jpt_97573 movsxd r11, ds:(jpt_97573 - 0A2000h)[r10+rdi*4] add r11, r10 jmp r11; switch jump loc_97576: and r9d, 1; jumptable 0000000000097573 cases 0-3 cmp r9d, edx jz short loc_9758F cmp edi, 2 setb cl cmp edx, 2 setnz dl or dl, cl jnz short loc_975A3 loc_9758F: sub esi, r8d mov eax, eax lea rcx, case_conv_table1 mov eax, [rcx+rax*4] shr eax, 0Fh loc_975A1: add esi, eax loc_975A3: mov [rbx], esi mov ebp, 1 loc_975AA: mov eax, ebp add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_975B9: xor ecx, ecx; jumptable 0000000000097573 cases 9,10 test edx, edx setnz cl add edi, 0FFFFFFF7h cmp edi, ecx jnz short loc_975A3 mov eax, eax lea rcx, case_conv_ext movzx esi, word ptr [rcx+rax*2] jmp short loc_975A3 loc_975D6: sub esi, r8d; jumptable 0000000000097573 case 6 test edx, edx jz loc_977C0 and ecx, 3Fh lea rax, case_conv_ext movzx eax, word ptr [rax+rcx*2] jmp short loc_975A1 loc_975F1: cmp edx, 1; jumptable 0000000000097573 case 11 jz short loc_975A3 sub esi, r8d shr eax, 6 lea rdi, case_conv_ext movzx eax, word ptr [rdi+rax*2] add eax, esi mov [rbx], eax and ecx, 3Fh movzx r14d, word ptr [rdi+rcx*2] mov [rbx+4], r14d mov ebp, 2 cmp edx, 2 jnz short loc_975AA lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, eax mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx], eax lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, r14d mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx+4], eax jmp loc_975AA loc_9765A: mov eax, esi; jumptable 0000000000097573 case 5 sub eax, r8d cmp eax, 1 jnz loc_9779D xor eax, eax cmp edx, 1 sbb eax, eax or eax, 1 jmp loc_975A1 loc_97677: test edx, edx; jumptable 0000000000097573 case 12 jz loc_975A3 sub esi, r8d shr eax, 6 lea rdx, case_conv_ext movzx eax, word ptr [rdx+rax*2] add eax, esi mov [rbx], eax and ecx, 3Fh movzx eax, word ptr [rdx+rcx*2] mov [rbx+4], eax jmp loc_977D9 loc_976A3: test edx, edx; jumptable 0000000000097573 case 4 setnz cl mov eax, esi sub eax, r8d mov edx, eax and dl, 1 cmp cl, dl jz loc_975A3 xor eax, 1 add eax, r8d mov esi, eax jmp loc_975A3 loc_976C7: cmp edx, 1; jumptable 0000000000097573 case 7 jz loc_975A3 xor ecx, ecx cmp edx, 2 setz cl shl ecx, 5 add eax, ecx mov esi, eax jmp loc_975A3 def_97573: cmp edx, 1; jumptable 0000000000097573 default case jz loc_975A3 shr eax, 7 lea rdi, case_conv_ext movzx esi, word ptr [rax+rdi] mov [rbx], esi mov eax, ecx shr eax, 4 movzx r15d, word ptr [rdi+rax*2] mov [rbx+4], r15d and ecx, 0Fh movzx r14d, word ptr [rdi+rcx*2] mov [rbx+8], r14d mov ebp, 3 cmp edx, 2 jnz loc_975AA lea r12, [rsp+38h+var_34] mov rdi, r12 mov edx, 1 call lre_case_conv mov eax, [r12] mov [rbx], eax lea r12, [rsp+38h+var_34] mov rdi, r12 mov esi, r15d mov edx, 1 call lre_case_conv mov eax, [r12] mov [rbx+4], eax lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, r14d mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx+8], eax jmp loc_975AA loc_97779: cmp edx, 1; jumptable 0000000000097573 case 8 jz loc_975A3 mov eax, eax lea rcx, case_conv_ext movzx eax, word ptr [rcx+rax*2] xor esi, esi cmp edx, 2 setz sil jmp loc_975A1 loc_9779D: xor ecx, ecx test edx, edx setz cl add ecx, ecx cmp eax, ecx jnz loc_975A3 xor eax, eax test edx, edx setnz al lea esi, [rsi+rax*4] add esi, 0FFFFFFFEh jmp loc_975A3 loc_977C0: shr eax, 6 lea rcx, case_conv_ext movzx eax, word ptr [rcx+rax*2] add esi, eax mov [rbx], esi mov dword ptr [rbx+4], 399h loc_977D9: mov ebp, 2 jmp loc_975AA
long long lre_case_conv_entry(_DWORD *a1, int a2, int a3, int a4, unsigned int a5) { unsigned int v6; // r9d unsigned int v7; // edi unsigned int v8; // ecx unsigned int v9; // eax unsigned int v10; // r8d int v11; // eax unsigned int v12; // ebp unsigned int v14; // eax unsigned int v15; // r14d unsigned int v16; // esi unsigned int v17; // r15d unsigned int v18; // r14d unsigned int v19[13]; // [rsp+4h] [rbp-34h] BYREF v6 = a5 >> 4; v7 = (unsigned __int8)a5 >> 4; v8 = case_conv_table2[a4]; v9 = v8 | ((a5 & 0xF) << 8); v10 = a5 >> 15; switch ( v7 ) { case 0u: case 1u: case 2u: case 3u: if ( (v6 & 1) != a3 && (v7 < 2 || a3 != 2) ) goto LABEL_6; a2 -= v10; v11 = case_conv_table1[v9] >> 15; goto LABEL_5; case 4u: if ( (a3 != 0) != (((_BYTE)a2 - (_BYTE)v10) & 1) ) a2 = v10 + ((a2 - v10) ^ 1); goto LABEL_6; case 5u: if ( a2 - v10 == 1 ) { v11 = a3 == 0 ? -1 : 1; goto LABEL_5; } if ( a2 - v10 == 2 * (a3 == 0) ) a2 = a2 + 4 * (a3 != 0) - 2; goto LABEL_6; case 6u: a2 -= v10; if ( a3 ) { v11 = case_conv_ext[v8 & 0x3F]; LABEL_5: a2 += v11; LABEL_6: *a1 = a2; return 1; } else { *a1 = case_conv_ext[v9 >> 6] + a2; a1[1] = 921; return 2; } case 7u: if ( a3 != 1 ) a2 = 32 * (a3 == 2) + v9; goto LABEL_6; case 8u: if ( a3 == 1 ) goto LABEL_6; v11 = case_conv_ext[v9]; a2 = a3 == 2; goto LABEL_5; case 9u: case 0xAu: if ( v7 - 9 == (a3 != 0) ) a2 = case_conv_ext[v9]; goto LABEL_6; case 0xBu: if ( a3 == 1 ) goto LABEL_6; v14 = a2 - v10 + case_conv_ext[v9 >> 6]; *a1 = v14; v15 = case_conv_ext[v8 & 0x3F]; a1[1] = v15; v12 = 2; if ( a3 == 2 ) { lre_case_conv(v19, v14, 1); *a1 = v19[0]; lre_case_conv(v19, v15, 1); a1[1] = v19[0]; } return v12; case 0xCu: if ( !a3 ) goto LABEL_6; *a1 = a2 - v10 + case_conv_ext[v9 >> 6]; a1[1] = case_conv_ext[v8 & 0x3F]; return 2; default: if ( a3 == 1 ) goto LABEL_6; v16 = *(unsigned __int16 *)((char *)case_conv_ext + (v9 >> 7)); *a1 = v16; v17 = case_conv_ext[v8 >> 4]; a1[1] = v17; v18 = case_conv_ext[v8 & 0xF]; a1[2] = v18; v12 = 3; if ( a3 == 2 ) { lre_case_conv(v19, v16, 1); *a1 = v19[0]; lre_case_conv(v19, v17, 1); a1[1] = v19[0]; lre_case_conv(v19, v18, 1); a1[2] = v19[0]; } return v12; } }
lre_case_conv_entry: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R9D,R8D SHR R9D,0x4 MOV EDI,R9D AND EDI,0xf MOV EAX,R8D AND EAX,0xf SHL EAX,0x8 MOV ECX,ECX LEA R10,[0x1a5440] MOVZX ECX,byte ptr [RCX + R10*0x1] CMP EDI,0xc JA 0x001976e4 OR EAX,ECX SHR R8D,0xf LEA R10,[0x1a2000] MOVSXD R11,dword ptr [R10 + RDI*0x4] ADD R11,R10 switchD: JMP R11 caseD_0: AND R9D,0x1 CMP R9D,EDX JZ 0x0019758f CMP EDI,0x2 SETC CL CMP EDX,0x2 SETNZ DL OR DL,CL JNZ 0x001975a3 LAB_0019758f: SUB ESI,R8D MOV EAX,EAX LEA RCX,[0x1a2140] MOV EAX,dword ptr [RCX + RAX*0x4] SHR EAX,0xf LAB_001975a1: ADD ESI,EAX LAB_001975a3: MOV dword ptr [RBX],ESI MOV EBP,0x1 LAB_001975aa: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET caseD_9: XOR ECX,ECX TEST EDX,EDX SETNZ CL ADD EDI,-0x9 CMP EDI,ECX JNZ 0x001975a3 MOV EAX,EAX LEA RCX,[0x1a55c0] MOVZX ESI,word ptr [RCX + RAX*0x2] JMP 0x001975a3 caseD_6: SUB ESI,R8D TEST EDX,EDX JZ 0x001977c0 AND ECX,0x3f LEA RAX,[0x1a55c0] MOVZX EAX,word ptr [RAX + RCX*0x2] JMP 0x001975a1 caseD_b: CMP EDX,0x1 JZ 0x001975a3 SUB ESI,R8D SHR EAX,0x6 LEA RDI,[0x1a55c0] MOVZX EAX,word ptr [RDI + RAX*0x2] ADD EAX,ESI MOV dword ptr [RBX],EAX AND ECX,0x3f MOVZX R14D,word ptr [RDI + RCX*0x2] MOV dword ptr [RBX + 0x4],R14D MOV EBP,0x2 CMP EDX,0x2 JNZ 0x001975aa LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,EAX MOV EDX,0x1 CALL 0x00197480 MOV EAX,dword ptr [R15] MOV dword ptr [RBX],EAX LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,R14D MOV EDX,0x1 CALL 0x00197480 MOV EAX,dword ptr [R15] MOV dword ptr [RBX + 0x4],EAX JMP 0x001975aa caseD_5: MOV EAX,ESI SUB EAX,R8D CMP EAX,0x1 JNZ 0x0019779d XOR EAX,EAX CMP EDX,0x1 SBB EAX,EAX OR EAX,0x1 JMP 0x001975a1 caseD_c: TEST EDX,EDX JZ 0x001975a3 SUB ESI,R8D SHR EAX,0x6 LEA RDX,[0x1a55c0] MOVZX EAX,word ptr [RDX + RAX*0x2] ADD EAX,ESI MOV dword ptr [RBX],EAX AND ECX,0x3f MOVZX EAX,word ptr [RDX + RCX*0x2] MOV dword ptr [RBX + 0x4],EAX JMP 0x001977d9 caseD_4: TEST EDX,EDX SETNZ CL MOV EAX,ESI SUB EAX,R8D MOV EDX,EAX AND DL,0x1 CMP CL,DL JZ 0x001975a3 XOR EAX,0x1 ADD EAX,R8D MOV ESI,EAX JMP 0x001975a3 caseD_7: CMP EDX,0x1 JZ 0x001975a3 XOR ECX,ECX CMP EDX,0x2 SETZ CL SHL ECX,0x5 ADD EAX,ECX MOV ESI,EAX JMP 0x001975a3 LAB_001976e4: CMP EDX,0x1 JZ 0x001975a3 SHR EAX,0x7 LEA RDI,[0x1a55c0] MOVZX ESI,word ptr [RAX + RDI*0x1] MOV dword ptr [RBX],ESI MOV EAX,ECX SHR EAX,0x4 MOVZX R15D,word ptr [RDI + RAX*0x2] MOV dword ptr [RBX + 0x4],R15D AND ECX,0xf MOVZX R14D,word ptr [RDI + RCX*0x2] MOV dword ptr [RBX + 0x8],R14D MOV EBP,0x3 CMP EDX,0x2 JNZ 0x001975aa LEA R12,[RSP + 0x4] MOV RDI,R12 MOV EDX,0x1 CALL 0x00197480 MOV EAX,dword ptr [R12] MOV dword ptr [RBX],EAX LEA R12,[RSP + 0x4] MOV RDI,R12 MOV ESI,R15D MOV EDX,0x1 CALL 0x00197480 MOV EAX,dword ptr [R12] MOV dword ptr [RBX + 0x4],EAX LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,R14D MOV EDX,0x1 CALL 0x00197480 MOV EAX,dword ptr [R15] MOV dword ptr [RBX + 0x8],EAX JMP 0x001975aa caseD_8: CMP EDX,0x1 JZ 0x001975a3 MOV EAX,EAX LEA RCX,[0x1a55c0] MOVZX EAX,word ptr [RCX + RAX*0x2] XOR ESI,ESI CMP EDX,0x2 SETZ SIL JMP 0x001975a1 LAB_0019779d: XOR ECX,ECX TEST EDX,EDX SETZ CL ADD ECX,ECX CMP EAX,ECX JNZ 0x001975a3 XOR EAX,EAX TEST EDX,EDX SETNZ AL LEA ESI,[RSI + RAX*0x4] ADD ESI,-0x2 JMP 0x001975a3 LAB_001977c0: SHR EAX,0x6 LEA RCX,[0x1a55c0] MOVZX EAX,word ptr [RCX + RAX*0x2] ADD ESI,EAX MOV dword ptr [RBX],ESI MOV dword ptr [RBX + 0x4],0x399 LAB_001977d9: MOV EBP,0x2 JMP 0x001975aa
int8 lre_case_conv_entry(uint *param_1,uint param_2,uint param_3,uint param_4,ulong param_5) { byte bVar1; ushort uVar2; ushort uVar3; ushort uVar4; uint uVar5; uint uVar6; uint uVar7; uint uVar8; uint local_34 [3]; uVar6 = (uint)(param_5 >> 4); uVar7 = uVar6 & 0xf; uVar5 = ((uint)param_5 & 0xf) << 8; bVar1 = (&case_conv_table2)[param_4]; if (0xc < uVar7) { if (param_3 != 1) { uVar2 = *(ushort *)(case_conv_ext + (uVar5 >> 7)); *param_1 = (uint)uVar2; uVar3 = *(ushort *)(case_conv_ext + (ulong)(bVar1 >> 4) * 2); param_1[1] = (uint)uVar3; uVar4 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0xf) * 2); param_1[2] = (uint)uVar4; if (param_3 == 2) { lre_case_conv(local_34,uVar2,1); *param_1 = local_34[0]; lre_case_conv(local_34,(uint)uVar3,1); param_1[1] = local_34[0]; lre_case_conv(local_34,(uint)uVar4,1); param_1[2] = local_34[0]; return 3; } return 3; } goto LAB_001975a3; } uVar5 = uVar5 | bVar1; uVar8 = (uint)param_5 >> 0xf; switch(uVar7) { default: if (((uVar6 & 1) != param_3) && (param_3 != 2 || uVar7 < 2)) break; param_2 = param_2 - uVar8; uVar6 = (uint)(&case_conv_table1)[uVar5] >> 0xf; goto LAB_001975a1; case 4: if ((param_3 != 0) != (bool)((byte)(param_2 - uVar8) & 1)) { param_2 = (param_2 - uVar8 ^ 1) + uVar8; } break; case 5: if (param_2 - uVar8 != 1) { if (param_2 - uVar8 == (uint)(param_3 == 0) * 2) { param_2 = (param_2 + (uint)(param_3 != 0) * 4) - 2; } break; } uVar6 = -(uint)(param_3 == 0) | 1; goto LAB_001975a1; case 6: param_2 = param_2 - uVar8; if (param_3 == 0) { *param_1 = param_2 + *(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2); param_1[1] = 0x399; return 2; } uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); goto LAB_001975a1; case 7: if (param_3 != 1) { param_2 = uVar5 + (uint)(param_3 == 2) * 0x20; } break; case 8: if (param_3 == 1) break; uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2); param_2 = (uint)(param_3 == 2); LAB_001975a1: param_2 = param_2 + uVar6; break; case 9: case 10: if (uVar7 - 9 == (uint)(param_3 != 0)) { param_2 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2); } break; case 0xb: if (param_3 != 1) { uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8); *param_1 = uVar6; uVar2 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); param_1[1] = (uint)uVar2; if (param_3 == 2) { lre_case_conv(local_34,uVar6,1); *param_1 = local_34[0]; lre_case_conv(local_34,(uint)uVar2,1); param_1[1] = local_34[0]; return 2; } return 2; } break; case 0xc: if (param_3 != 0) { *param_1 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8); param_1[1] = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); return 2; } } LAB_001975a3: *param_1 = param_2; return 1; }
14,965
lre_case_conv_entry
bluesky950520[P]quickjs/libunicode.c
static int lre_case_conv_entry(uint32_t *res, uint32_t c, int conv_type, uint32_t idx, uint32_t v) { uint32_t code, data, type, a, is_lower; is_lower = (conv_type != 0); type = (v >> (32 - 17 - 7 - 4)) & 0xf; data = ((v & 0xf) << 8) | case_conv_table2[idx]; code = v >> (32 - 17); switch(type) { case RUN_TYPE_U: case RUN_TYPE_L: case RUN_TYPE_UF: case RUN_TYPE_LF: if (conv_type == (type & 1) || (type >= RUN_TYPE_UF && conv_type == 2)) { c = c - code + (case_conv_table1[data] >> (32 - 17)); } break; case RUN_TYPE_UL: a = c - code; if ((a & 1) != (1 - is_lower)) break; c = (a ^ 1) + code; break; case RUN_TYPE_LSU: a = c - code; if (a == 1) { c += 2 * is_lower - 1; } else if (a == (1 - is_lower) * 2) { c += (2 * is_lower - 1) * 2; } break; case RUN_TYPE_U2L_399_EXT2: if (!is_lower) { res[0] = c - code + case_conv_ext[data >> 6]; res[1] = 0x399; return 2; } else { c = c - code + case_conv_ext[data & 0x3f]; } break; case RUN_TYPE_UF_D20: if (conv_type == 1) break; c = data + (conv_type == 2) * 0x20; break; case RUN_TYPE_UF_D1_EXT: if (conv_type == 1) break; c = case_conv_ext[data] + (conv_type == 2); break; case RUN_TYPE_U_EXT: case RUN_TYPE_LF_EXT: if (is_lower != (type - RUN_TYPE_U_EXT)) break; c = case_conv_ext[data]; break; case RUN_TYPE_LF_EXT2: if (!is_lower) break; res[0] = c - code + case_conv_ext[data >> 6]; res[1] = case_conv_ext[data & 0x3f]; return 2; case RUN_TYPE_UF_EXT2: if (conv_type == 1) break; res[0] = c - code + case_conv_ext[data >> 6]; res[1] = case_conv_ext[data & 0x3f]; if (conv_type == 2) { /* convert to lower */ res[0] = lre_case_conv1(res[0], 1); res[1] = lre_case_conv1(res[1], 1); } return 2; default: case RUN_TYPE_UF_EXT3: if (conv_type == 1) break; res[0] = case_conv_ext[data >> 8]; res[1] = case_conv_ext[(data >> 4) & 0xf]; res[2] = case_conv_ext[data & 0xf]; if (conv_type == 2) { /* convert to lower */ res[0] = lre_case_conv1(res[0], 1); res[1] = lre_case_conv1(res[1], 1); res[2] = lre_case_conv1(res[2], 1); } return 3; } res[0] = c; return 1; }
O3
c
lre_case_conv_entry: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %r8d, %r9d shrl $0x4, %r9d movl %r9d, %edi andl $0xf, %edi movl %r8d, %eax andl $0xf, %eax shll $0x8, %eax movl %ecx, %ecx leaq 0xe5c4(%rip), %r10 # 0xa83f0 movzbl (%rcx,%r10), %ecx cmpl $0xc, %edi ja 0x99fbf orl %ecx, %eax shrl $0xf, %r8d leaq 0xb169(%rip), %r10 # 0xa4fb0 movslq (%r10,%rdi,4), %r11 addq %r10, %r11 jmpq *%r11 andl $0x1, %r9d cmpl %edx, %r9d je 0x99e6a cmpl $0x2, %edi setb %cl cmpl $0x2, %edx setne %dl orb %cl, %dl jne 0x99e7e subl %r8d, %esi movl %eax, %eax leaq 0xb27a(%rip), %rcx # 0xa50f0 movl (%rcx,%rax,4), %eax shrl $0xf, %eax addl %eax, %esi movl %esi, (%rbx) movl $0x1, %ebp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq xorl %ecx, %ecx testl %edx, %edx setne %cl addl $-0x9, %edi cmpl %ecx, %edi jne 0x99e7e movl %eax, %eax leaq 0xe6c5(%rip), %rcx # 0xa8570 movzwl (%rcx,%rax,2), %esi jmp 0x99e7e subl %r8d, %esi testl %edx, %edx je 0x9a09b andl $0x3f, %ecx leaq 0xe6aa(%rip), %rax # 0xa8570 movzwl (%rax,%rcx,2), %eax jmp 0x99e7c cmpl $0x1, %edx je 0x99e7e subl %r8d, %esi shrl $0x6, %eax leaq 0xe692(%rip), %rdi # 0xa8570 movzwl (%rdi,%rax,2), %eax addl %esi, %eax movl %eax, (%rbx) andl $0x3f, %ecx movzwl (%rdi,%rcx,2), %r14d movl %r14d, 0x4(%rbx) movl $0x2, %ebp cmpl $0x2, %edx jne 0x99e85 leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %eax, %esi movl $0x1, %edx callq 0x99d84 movl (%r15), %eax movl %eax, (%rbx) leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %r14d, %esi movl $0x1, %edx callq 0x99d84 movl (%r15), %eax movl %eax, 0x4(%rbx) jmp 0x99e85 movl %esi, %eax subl %r8d, %eax cmpl $0x1, %eax jne 0x9a078 xorl %eax, %eax cmpl $0x1, %edx sbbl %eax, %eax orl $0x1, %eax jmp 0x99e7c testl %edx, %edx je 0x99e7e subl %r8d, %esi shrl $0x6, %eax leaq 0xe609(%rip), %rdx # 0xa8570 movzwl (%rdx,%rax,2), %eax addl %esi, %eax movl %eax, (%rbx) andl $0x3f, %ecx movzwl (%rdx,%rcx,2), %eax movl %eax, 0x4(%rbx) jmp 0x9a0b4 testl %edx, %edx setne %cl movl %esi, %eax subl %r8d, %eax movl %eax, %edx andb $0x1, %dl cmpb %dl, %cl je 0x99e7e xorl $0x1, %eax addl %r8d, %eax movl %eax, %esi jmp 0x99e7e cmpl $0x1, %edx je 0x99e7e xorl %ecx, %ecx cmpl $0x2, %edx sete %cl shll $0x5, %ecx addl %ecx, %eax movl %eax, %esi jmp 0x99e7e cmpl $0x1, %edx je 0x99e7e shrl $0x7, %eax leaq 0xe59e(%rip), %rdi # 0xa8570 movzwl (%rax,%rdi), %esi movl %esi, (%rbx) movl %ecx, %eax shrl $0x4, %eax movzwl (%rdi,%rax,2), %r15d movl %r15d, 0x4(%rbx) andl $0xf, %ecx movzwl (%rdi,%rcx,2), %r14d movl %r14d, 0x8(%rbx) movl $0x3, %ebp cmpl $0x2, %edx jne 0x99e85 leaq 0x4(%rsp), %r12 movq %r12, %rdi movl $0x1, %edx callq 0x99d84 movl (%r12), %eax movl %eax, (%rbx) leaq 0x4(%rsp), %r12 movq %r12, %rdi movl %r15d, %esi movl $0x1, %edx callq 0x99d84 movl (%r12), %eax movl %eax, 0x4(%rbx) leaq 0x4(%rsp), %r15 movq %r15, %rdi movl %r14d, %esi movl $0x1, %edx callq 0x99d84 movl (%r15), %eax movl %eax, 0x8(%rbx) jmp 0x99e85 cmpl $0x1, %edx je 0x99e7e movl %eax, %eax leaq 0xe50a(%rip), %rcx # 0xa8570 movzwl (%rcx,%rax,2), %eax xorl %esi, %esi cmpl $0x2, %edx sete %sil jmp 0x99e7c xorl %ecx, %ecx testl %edx, %edx sete %cl addl %ecx, %ecx cmpl %ecx, %eax jne 0x99e7e xorl %eax, %eax testl %edx, %edx setne %al leal (%rsi,%rax,4), %esi addl $-0x2, %esi jmp 0x99e7e shrl $0x6, %eax leaq 0xe4cb(%rip), %rcx # 0xa8570 movzwl (%rcx,%rax,2), %eax addl %eax, %esi movl %esi, (%rbx) movl $0x399, 0x4(%rbx) # imm = 0x399 movl $0x2, %ebp jmp 0x99e85
lre_case_conv_entry: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdi mov r9d, r8d shr r9d, 4 mov edi, r9d and edi, 0Fh mov eax, r8d and eax, 0Fh shl eax, 8 mov ecx, ecx lea r10, case_conv_table2 movzx ecx, byte ptr [rcx+r10] cmp edi, 0Ch; switch 13 cases ja def_99E4E; jumptable 0000000000099E4E default case or eax, ecx shr r8d, 0Fh lea r10, jpt_99E4E movsxd r11, ds:(jpt_99E4E - 0A4FB0h)[r10+rdi*4] add r11, r10 jmp r11; switch jump loc_99E51: and r9d, 1; jumptable 0000000000099E4E cases 0-3 cmp r9d, edx jz short loc_99E6A cmp edi, 2 setb cl cmp edx, 2 setnz dl or dl, cl jnz short loc_99E7E loc_99E6A: sub esi, r8d mov eax, eax lea rcx, case_conv_table1 mov eax, [rcx+rax*4] shr eax, 0Fh loc_99E7C: add esi, eax loc_99E7E: mov [rbx], esi mov ebp, 1 loc_99E85: mov eax, ebp add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_99E94: xor ecx, ecx; jumptable 0000000000099E4E cases 9,10 test edx, edx setnz cl add edi, 0FFFFFFF7h cmp edi, ecx jnz short loc_99E7E mov eax, eax lea rcx, case_conv_ext movzx esi, word ptr [rcx+rax*2] jmp short loc_99E7E loc_99EB1: sub esi, r8d; jumptable 0000000000099E4E case 6 test edx, edx jz loc_9A09B and ecx, 3Fh lea rax, case_conv_ext movzx eax, word ptr [rax+rcx*2] jmp short loc_99E7C loc_99ECC: cmp edx, 1; jumptable 0000000000099E4E case 11 jz short loc_99E7E sub esi, r8d shr eax, 6 lea rdi, case_conv_ext movzx eax, word ptr [rdi+rax*2] add eax, esi mov [rbx], eax and ecx, 3Fh movzx r14d, word ptr [rdi+rcx*2] mov [rbx+4], r14d mov ebp, 2 cmp edx, 2 jnz short loc_99E85 lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, eax mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx], eax lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, r14d mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx+4], eax jmp loc_99E85 loc_99F35: mov eax, esi; jumptable 0000000000099E4E case 5 sub eax, r8d cmp eax, 1 jnz loc_9A078 xor eax, eax cmp edx, 1 sbb eax, eax or eax, 1 jmp loc_99E7C loc_99F52: test edx, edx; jumptable 0000000000099E4E case 12 jz loc_99E7E sub esi, r8d shr eax, 6 lea rdx, case_conv_ext movzx eax, word ptr [rdx+rax*2] add eax, esi mov [rbx], eax and ecx, 3Fh movzx eax, word ptr [rdx+rcx*2] mov [rbx+4], eax jmp loc_9A0B4 loc_99F7E: test edx, edx; jumptable 0000000000099E4E case 4 setnz cl mov eax, esi sub eax, r8d mov edx, eax and dl, 1 cmp cl, dl jz loc_99E7E xor eax, 1 add eax, r8d mov esi, eax jmp loc_99E7E loc_99FA2: cmp edx, 1; jumptable 0000000000099E4E case 7 jz loc_99E7E xor ecx, ecx cmp edx, 2 setz cl shl ecx, 5 add eax, ecx mov esi, eax jmp loc_99E7E def_99E4E: cmp edx, 1; jumptable 0000000000099E4E default case jz loc_99E7E shr eax, 7 lea rdi, case_conv_ext movzx esi, word ptr [rax+rdi] mov [rbx], esi mov eax, ecx shr eax, 4 movzx r15d, word ptr [rdi+rax*2] mov [rbx+4], r15d and ecx, 0Fh movzx r14d, word ptr [rdi+rcx*2] mov [rbx+8], r14d mov ebp, 3 cmp edx, 2 jnz loc_99E85 lea r12, [rsp+38h+var_34] mov rdi, r12 mov edx, 1 call lre_case_conv mov eax, [r12] mov [rbx], eax lea r12, [rsp+38h+var_34] mov rdi, r12 mov esi, r15d mov edx, 1 call lre_case_conv mov eax, [r12] mov [rbx+4], eax lea r15, [rsp+38h+var_34] mov rdi, r15 mov esi, r14d mov edx, 1 call lre_case_conv mov eax, [r15] mov [rbx+8], eax jmp loc_99E85 loc_9A054: cmp edx, 1; jumptable 0000000000099E4E case 8 jz loc_99E7E mov eax, eax lea rcx, case_conv_ext movzx eax, word ptr [rcx+rax*2] xor esi, esi cmp edx, 2 setz sil jmp loc_99E7C loc_9A078: xor ecx, ecx test edx, edx setz cl add ecx, ecx cmp eax, ecx jnz loc_99E7E xor eax, eax test edx, edx setnz al lea esi, [rsi+rax*4] add esi, 0FFFFFFFEh jmp loc_99E7E loc_9A09B: shr eax, 6 lea rcx, case_conv_ext movzx eax, word ptr [rcx+rax*2] add esi, eax mov [rbx], esi mov dword ptr [rbx+4], 399h loc_9A0B4: mov ebp, 2 jmp loc_99E85
long long lre_case_conv_entry(_DWORD *a1, int a2, int a3, int a4, unsigned int a5) { unsigned int v6; // r9d unsigned int v7; // edi unsigned int v8; // ecx unsigned int v9; // eax unsigned int v10; // r8d int v11; // eax unsigned int v12; // ebp unsigned int v14; // eax unsigned int v15; // r14d unsigned int v16; // esi unsigned int v17; // r15d unsigned int v18; // r14d unsigned int v19[13]; // [rsp+4h] [rbp-34h] BYREF v6 = a5 >> 4; v7 = (unsigned __int8)a5 >> 4; v8 = case_conv_table2[a4]; v9 = v8 | ((a5 & 0xF) << 8); v10 = a5 >> 15; switch ( v7 ) { case 0u: case 1u: case 2u: case 3u: if ( (v6 & 1) != a3 && (v7 < 2 || a3 != 2) ) goto LABEL_6; a2 -= v10; v11 = case_conv_table1[v9] >> 15; goto LABEL_5; case 4u: if ( (a3 != 0) != (((_BYTE)a2 - (_BYTE)v10) & 1) ) a2 = v10 + ((a2 - v10) ^ 1); goto LABEL_6; case 5u: if ( a2 - v10 == 1 ) { v11 = a3 == 0 ? -1 : 1; goto LABEL_5; } if ( a2 - v10 == 2 * (a3 == 0) ) a2 = a2 + 4 * (a3 != 0) - 2; goto LABEL_6; case 6u: a2 -= v10; if ( a3 ) { v11 = case_conv_ext[v8 & 0x3F]; LABEL_5: a2 += v11; LABEL_6: *a1 = a2; return 1; } else { *a1 = case_conv_ext[v9 >> 6] + a2; a1[1] = 921; return 2; } case 7u: if ( a3 != 1 ) a2 = 32 * (a3 == 2) + v9; goto LABEL_6; case 8u: if ( a3 == 1 ) goto LABEL_6; v11 = case_conv_ext[v9]; a2 = a3 == 2; goto LABEL_5; case 9u: case 0xAu: if ( v7 - 9 == (a3 != 0) ) a2 = case_conv_ext[v9]; goto LABEL_6; case 0xBu: if ( a3 == 1 ) goto LABEL_6; v14 = a2 - v10 + case_conv_ext[v9 >> 6]; *a1 = v14; v15 = case_conv_ext[v8 & 0x3F]; a1[1] = v15; v12 = 2; if ( a3 == 2 ) { lre_case_conv(v19, v14, 1); *a1 = v19[0]; lre_case_conv(v19, v15, 1); a1[1] = v19[0]; } return v12; case 0xCu: if ( !a3 ) goto LABEL_6; *a1 = a2 - v10 + case_conv_ext[v9 >> 6]; a1[1] = case_conv_ext[v8 & 0x3F]; return 2; default: if ( a3 == 1 ) goto LABEL_6; v16 = *(unsigned __int16 *)((char *)case_conv_ext + (v9 >> 7)); *a1 = v16; v17 = case_conv_ext[v8 >> 4]; a1[1] = v17; v18 = case_conv_ext[v8 & 0xF]; a1[2] = v18; v12 = 3; if ( a3 == 2 ) { lre_case_conv(v19, v16, 1); *a1 = v19[0]; lre_case_conv(v19, v17, 1); a1[1] = v19[0]; lre_case_conv(v19, v18, 1); a1[2] = v19[0]; } return v12; } }
lre_case_conv_entry: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV R9D,R8D SHR R9D,0x4 MOV EDI,R9D AND EDI,0xf MOV EAX,R8D AND EAX,0xf SHL EAX,0x8 MOV ECX,ECX LEA R10,[0x1a83f0] MOVZX ECX,byte ptr [RCX + R10*0x1] CMP EDI,0xc JA 0x00199fbf OR EAX,ECX SHR R8D,0xf LEA R10,[0x1a4fb0] MOVSXD R11,dword ptr [R10 + RDI*0x4] ADD R11,R10 switchD: JMP R11 caseD_0: AND R9D,0x1 CMP R9D,EDX JZ 0x00199e6a CMP EDI,0x2 SETC CL CMP EDX,0x2 SETNZ DL OR DL,CL JNZ 0x00199e7e LAB_00199e6a: SUB ESI,R8D MOV EAX,EAX LEA RCX,[0x1a50f0] MOV EAX,dword ptr [RCX + RAX*0x4] SHR EAX,0xf LAB_00199e7c: ADD ESI,EAX LAB_00199e7e: MOV dword ptr [RBX],ESI MOV EBP,0x1 LAB_00199e85: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET caseD_9: XOR ECX,ECX TEST EDX,EDX SETNZ CL ADD EDI,-0x9 CMP EDI,ECX JNZ 0x00199e7e MOV EAX,EAX LEA RCX,[0x1a8570] MOVZX ESI,word ptr [RCX + RAX*0x2] JMP 0x00199e7e caseD_6: SUB ESI,R8D TEST EDX,EDX JZ 0x0019a09b AND ECX,0x3f LEA RAX,[0x1a8570] MOVZX EAX,word ptr [RAX + RCX*0x2] JMP 0x00199e7c caseD_b: CMP EDX,0x1 JZ 0x00199e7e SUB ESI,R8D SHR EAX,0x6 LEA RDI,[0x1a8570] MOVZX EAX,word ptr [RDI + RAX*0x2] ADD EAX,ESI MOV dword ptr [RBX],EAX AND ECX,0x3f MOVZX R14D,word ptr [RDI + RCX*0x2] MOV dword ptr [RBX + 0x4],R14D MOV EBP,0x2 CMP EDX,0x2 JNZ 0x00199e85 LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,EAX MOV EDX,0x1 CALL 0x00199d84 MOV EAX,dword ptr [R15] MOV dword ptr [RBX],EAX LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,R14D MOV EDX,0x1 CALL 0x00199d84 MOV EAX,dword ptr [R15] MOV dword ptr [RBX + 0x4],EAX JMP 0x00199e85 caseD_5: MOV EAX,ESI SUB EAX,R8D CMP EAX,0x1 JNZ 0x0019a078 XOR EAX,EAX CMP EDX,0x1 SBB EAX,EAX OR EAX,0x1 JMP 0x00199e7c caseD_c: TEST EDX,EDX JZ 0x00199e7e SUB ESI,R8D SHR EAX,0x6 LEA RDX,[0x1a8570] MOVZX EAX,word ptr [RDX + RAX*0x2] ADD EAX,ESI MOV dword ptr [RBX],EAX AND ECX,0x3f MOVZX EAX,word ptr [RDX + RCX*0x2] MOV dword ptr [RBX + 0x4],EAX JMP 0x0019a0b4 caseD_4: TEST EDX,EDX SETNZ CL MOV EAX,ESI SUB EAX,R8D MOV EDX,EAX AND DL,0x1 CMP CL,DL JZ 0x00199e7e XOR EAX,0x1 ADD EAX,R8D MOV ESI,EAX JMP 0x00199e7e caseD_7: CMP EDX,0x1 JZ 0x00199e7e XOR ECX,ECX CMP EDX,0x2 SETZ CL SHL ECX,0x5 ADD EAX,ECX MOV ESI,EAX JMP 0x00199e7e LAB_00199fbf: CMP EDX,0x1 JZ 0x00199e7e SHR EAX,0x7 LEA RDI,[0x1a8570] MOVZX ESI,word ptr [RAX + RDI*0x1] MOV dword ptr [RBX],ESI MOV EAX,ECX SHR EAX,0x4 MOVZX R15D,word ptr [RDI + RAX*0x2] MOV dword ptr [RBX + 0x4],R15D AND ECX,0xf MOVZX R14D,word ptr [RDI + RCX*0x2] MOV dword ptr [RBX + 0x8],R14D MOV EBP,0x3 CMP EDX,0x2 JNZ 0x00199e85 LEA R12,[RSP + 0x4] MOV RDI,R12 MOV EDX,0x1 CALL 0x00199d84 MOV EAX,dword ptr [R12] MOV dword ptr [RBX],EAX LEA R12,[RSP + 0x4] MOV RDI,R12 MOV ESI,R15D MOV EDX,0x1 CALL 0x00199d84 MOV EAX,dword ptr [R12] MOV dword ptr [RBX + 0x4],EAX LEA R15,[RSP + 0x4] MOV RDI,R15 MOV ESI,R14D MOV EDX,0x1 CALL 0x00199d84 MOV EAX,dword ptr [R15] MOV dword ptr [RBX + 0x8],EAX JMP 0x00199e85 caseD_8: CMP EDX,0x1 JZ 0x00199e7e MOV EAX,EAX LEA RCX,[0x1a8570] MOVZX EAX,word ptr [RCX + RAX*0x2] XOR ESI,ESI CMP EDX,0x2 SETZ SIL JMP 0x00199e7c LAB_0019a078: XOR ECX,ECX TEST EDX,EDX SETZ CL ADD ECX,ECX CMP EAX,ECX JNZ 0x00199e7e XOR EAX,EAX TEST EDX,EDX SETNZ AL LEA ESI,[RSI + RAX*0x4] ADD ESI,-0x2 JMP 0x00199e7e LAB_0019a09b: SHR EAX,0x6 LEA RCX,[0x1a8570] MOVZX EAX,word ptr [RCX + RAX*0x2] ADD ESI,EAX MOV dword ptr [RBX],ESI MOV dword ptr [RBX + 0x4],0x399 LAB_0019a0b4: MOV EBP,0x2 JMP 0x00199e85
int8 lre_case_conv_entry(uint *param_1,uint param_2,uint param_3,uint param_4,ulong param_5) { byte bVar1; ushort uVar2; ushort uVar3; ushort uVar4; uint uVar5; uint uVar6; uint uVar7; uint uVar8; uint local_34 [3]; uVar6 = (uint)(param_5 >> 4); uVar7 = uVar6 & 0xf; uVar5 = ((uint)param_5 & 0xf) << 8; bVar1 = (&case_conv_table2)[param_4]; if (0xc < uVar7) { if (param_3 != 1) { uVar2 = *(ushort *)(case_conv_ext + (uVar5 >> 7)); *param_1 = (uint)uVar2; uVar3 = *(ushort *)(case_conv_ext + (ulong)(bVar1 >> 4) * 2); param_1[1] = (uint)uVar3; uVar4 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0xf) * 2); param_1[2] = (uint)uVar4; if (param_3 == 2) { lre_case_conv(local_34,uVar2,1); *param_1 = local_34[0]; lre_case_conv(local_34,(uint)uVar3,1); param_1[1] = local_34[0]; lre_case_conv(local_34,(uint)uVar4,1); param_1[2] = local_34[0]; return 3; } return 3; } goto LAB_00199e7e; } uVar5 = uVar5 | bVar1; uVar8 = (uint)param_5 >> 0xf; switch(uVar7) { default: if (((uVar6 & 1) != param_3) && (param_3 != 2 || uVar7 < 2)) break; param_2 = param_2 - uVar8; uVar6 = (uint)(&case_conv_table1)[uVar5] >> 0xf; goto LAB_00199e7c; case 4: if ((param_3 != 0) != (bool)((byte)(param_2 - uVar8) & 1)) { param_2 = (param_2 - uVar8 ^ 1) + uVar8; } break; case 5: if (param_2 - uVar8 != 1) { if (param_2 - uVar8 == (uint)(param_3 == 0) * 2) { param_2 = (param_2 + (uint)(param_3 != 0) * 4) - 2; } break; } uVar6 = -(uint)(param_3 == 0) | 1; goto LAB_00199e7c; case 6: param_2 = param_2 - uVar8; if (param_3 == 0) { *param_1 = param_2 + *(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2); param_1[1] = 0x399; return 2; } uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); goto LAB_00199e7c; case 7: if (param_3 != 1) { param_2 = uVar5 + (uint)(param_3 == 2) * 0x20; } break; case 8: if (param_3 == 1) break; uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2); param_2 = (uint)(param_3 == 2); LAB_00199e7c: param_2 = param_2 + uVar6; break; case 9: case 10: if (uVar7 - 9 == (uint)(param_3 != 0)) { param_2 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2); } break; case 0xb: if (param_3 != 1) { uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8); *param_1 = uVar6; uVar2 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); param_1[1] = (uint)uVar2; if (param_3 == 2) { lre_case_conv(local_34,uVar6,1); *param_1 = local_34[0]; lre_case_conv(local_34,(uint)uVar2,1); param_1[1] = local_34[0]; return 2; } return 2; } break; case 0xc: if (param_3 != 0) { *param_1 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8); param_1[1] = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2); return 2; } } LAB_00199e7e: *param_1 = param_2; return 1; }
14,966
testing::TestSuite::successful_test_count() const
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::SetTestPartResultReporterForCurrentThread( TestPartResultReporterInterface* reporter) { per_thread_test_part_result_reporter_.set(reporter); }
O1
cpp
testing::TestSuite::successful_test_count() const: pushq %rbp pushq %r14 pushq %rbx movq 0x30(%rdi), %r14 cmpq 0x38(%rdi), %r14 je 0x207c8 movq %rdi, %rbx xorl %ebp, %ebp movq (%r14), %rdi callq 0x378d0 movzbl %al, %eax addl %eax, %ebp addq $0x8, %r14 cmpq 0x38(%rbx), %r14 jne 0x207af jmp 0x207ca xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq nop
_ZNK7testing9TestSuite21successful_test_countEv: push rbp push r14 push rbx mov r14, [rdi+30h] cmp r14, [rdi+38h] jz short loc_207C8 mov rbx, rdi xor ebp, ebp loc_207AF: mov rdi, [r14]; this call _ZN7testing9TestSuite10TestPassedEPKNS_8TestInfoE; testing::TestSuite::TestPassed(testing::TestInfo const*) movzx eax, al add ebp, eax add r14, 8 cmp r14, [rbx+38h] jnz short loc_207AF jmp short loc_207CA loc_207C8: xor ebp, ebp loc_207CA: mov eax, ebp pop rbx pop r14 pop rbp retn
long long testing::TestSuite::successful_test_count(testing::TestSuite *this, const testing::TestInfo *a2) { testing::TestSuite **v2; // r14 unsigned int v3; // ebp v2 = (testing::TestSuite **)*((_QWORD *)this + 6); if ( v2 == *((testing::TestSuite ***)this + 7) ) { return 0; } else { v3 = 0; do v3 += (unsigned __int8)testing::TestSuite::TestPassed(*v2++, a2); while ( v2 != *((testing::TestSuite ***)this + 7) ); } return v3; }
successful_test_count: PUSH RBP PUSH R14 PUSH RBX MOV R14,qword ptr [RDI + 0x30] CMP R14,qword ptr [RDI + 0x38] JZ 0x001207c8 MOV RBX,RDI XOR EBP,EBP LAB_001207af: MOV RDI,qword ptr [R14] CALL 0x001378d0 MOVZX EAX,AL ADD EBP,EAX ADD R14,0x8 CMP R14,qword ptr [RBX + 0x38] JNZ 0x001207af JMP 0x001207ca LAB_001207c8: XOR EBP,EBP LAB_001207ca: MOV EAX,EBP POP RBX POP R14 POP RBP RET
/* testing::TestSuite::successful_test_count() const */ int __thiscall testing::TestSuite::successful_test_count(TestSuite *this) { byte bVar1; int iVar2; int8 *puVar3; puVar3 = *(int8 **)(this + 0x30); if (puVar3 == *(int8 **)(this + 0x38)) { iVar2 = 0; } else { iVar2 = 0; do { bVar1 = TestPassed((TestInfo *)*puVar3); iVar2 = iVar2 + (uint)bVar1; puVar3 = puVar3 + 1; } while (puVar3 != *(int8 **)(this + 0x38)); } return iVar2; }
14,967
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
ExpressionTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && e) : TemplateToken(Type::Expression, location, pre, post), expr(std::move(e)) {}
O2
cpp
minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&): pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %r14 pushq $0x1 popq %rsi callq 0x6229c leaq 0x8aca1(%rip), %rax # 0xfcb08 addq $0x10, %rax movq %rax, (%r14) andq $0x0, 0x38(%r14) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r14) andq $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5minja23ExpressionTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE: push r14 push rbx push rax mov rbx, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov r14, rdi push 1 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja23ExpressionTemplateTokenE; `vtable for'minja::ExpressionTemplateToken add rax, 10h mov [r14], rax and qword ptr [r14+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r14+30h], xmm0 and qword ptr [rbx], 0 add rsp, 8 pop rbx pop r14 retn
long long * minja::ExpressionTemplateToken::ExpressionTemplateToken( long long a1, long long a2, int a3, int a4, __int128 *a5) { long long *result; // rax __int128 v7; // xmm0 minja::TemplateToken::TemplateToken(a1, 1, a2, a3, a4); result = &`vtable for'minja::ExpressionTemplateToken + 2; *(_QWORD *)a1 = &`vtable for'minja::ExpressionTemplateToken + 2; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a5 = 0LL; return result; }
ExpressionTemplateToken: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV R14,RDI PUSH 0x1 POP RSI CALL 0x0016229c LEA RAX,[0x1fcb08] ADD RAX,0x10 MOV qword ptr [R14],RAX AND qword ptr [R14 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R14 + 0x30],XMM0 AND qword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP R14 RET
/* minja::ExpressionTemplateToken::ExpressionTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::ExpressionTemplateToken::ExpressionTemplateToken (ExpressionTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, int8 *param_5) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,1,param_1,param_3,param_4); *(int ***)this = &PTR__ExpressionTemplateToken_001fcb18; *(int8 *)(this + 0x38) = 0; uVar1 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar1; *param_5 = 0; return; }
14,968
maria_rtree_pick_key
eloqsql/storage/maria/ma_rt_index.c
static const uchar *maria_rtree_pick_key(const MARIA_KEY *key, const MARIA_PAGE *page) { const MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; double increase; double best_incr= DBL_MAX; double area; double UNINIT_VAR(best_area); const uchar *best_key= NULL; const uchar *k= rt_PAGE_FIRST_KEY(share, page->buff, page->node); const uchar *last= rt_PAGE_END(page); for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key->data_length, page->node)) { /* The following is safe as -1.0 is an exact number */ if ((increase= maria_rtree_area_increase(key->keyinfo->seg, k, key->data, key->data_length + key->ref_length, &area)) == -1.0) return NULL; /* The following should be safe, even if we compare doubles */ if (!best_key || increase < best_incr || ((increase == best_incr) && (area < best_area))) { best_key= k; best_area= area; best_incr= increase; } } return best_key; }
O0
c
maria_rtree_pick_key: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movsd 0xdba42(%rip), %xmm0 # 0x15a2c0 movsd %xmm0, -0x38(%rbp) movsd -0x48(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movq $0x0, -0x50(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movq -0x18(%rbp), %rcx movl 0x28(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movl 0x20(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0x7e9cc movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0xc0(%rax), %rdi movq -0x58(%rbp), %rsi movq -0x10(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0x14(%rax), %ecx leaq -0x40(%rbp), %r8 callq 0x84440 movsd %xmm0, -0x30(%rbp) movsd 0xdb9ae(%rip), %xmm1 # 0x15a2c8 ucomisd %xmm1, %xmm0 jne 0x7e92f jp 0x7e92f movq $0x0, -0x8(%rbp) jmp 0x7e9d4 cmpq $0x0, -0x50(%rbp) je 0x7e964 movsd -0x30(%rbp), %xmm1 movsd -0x38(%rbp), %xmm0 ucomisd %xmm1, %xmm0 ja 0x7e964 movsd -0x30(%rbp), %xmm0 ucomisd -0x38(%rbp), %xmm0 jne 0x7e980 jp 0x7e980 movsd -0x40(%rbp), %xmm1 movsd -0x48(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jbe 0x7e980 movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) jmp 0x7e982 movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x10(%rcx), %ecx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x28(%rax) je 0x7e9aa movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x6c(%rbp) jmp 0x7e9b7 movq -0x28(%rbp), %rax movl 0x3e0(%rax), %eax movl %eax, -0x6c(%rbp) movq -0x68(%rbp), %rax movl -0x6c(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) jmp 0x7e8ce movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq nop
maria_rtree_pick_key: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax movsd xmm0, cs:qword_15A2C0 movsd [rbp+var_38], xmm0 movsd xmm0, [rbp+var_48] movsd [rbp+var_48], xmm0 mov [rbp+var_50], 0 mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] add rax, rcx mov rcx, [rbp+var_18] mov ecx, [rcx+28h] add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov ecx, [rcx+20h] add rax, rcx mov [rbp+var_60], rax loc_7E8CE: mov rax, [rbp+var_58] cmp rax, [rbp+var_60] jnb loc_7E9CC mov rax, [rbp+var_10] mov rax, [rax+8] mov rdi, [rax+0C0h] mov rsi, [rbp+var_58] mov rax, [rbp+var_10] mov rdx, [rax] mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+14h] lea r8, [rbp+var_40] call maria_rtree_area_increase movsd [rbp+var_30], xmm0 movsd xmm1, cs:qword_15A2C8 ucomisd xmm0, xmm1 jnz short loc_7E92F jp short loc_7E92F mov [rbp+var_8], 0 jmp loc_7E9D4 loc_7E92F: cmp [rbp+var_50], 0 jz short loc_7E964 movsd xmm1, [rbp+var_30] movsd xmm0, [rbp+var_38] ucomisd xmm0, xmm1 ja short loc_7E964 movsd xmm0, [rbp+var_30] ucomisd xmm0, [rbp+var_38] jnz short loc_7E980 jp short loc_7E980 movsd xmm1, [rbp+var_40] movsd xmm0, [rbp+var_48] ucomisd xmm0, xmm1 jbe short loc_7E980 loc_7E964: mov rax, [rbp+var_58] mov [rbp+var_50], rax movsd xmm0, [rbp+var_40] movsd [rbp+var_48], xmm0 movsd xmm0, [rbp+var_30] movsd [rbp+var_38], xmm0 loc_7E980: jmp short $+2 loc_7E982: mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov ecx, [rcx+10h] add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_18] cmp dword ptr [rax+28h], 0 jz short loc_7E9AA mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_6C], eax jmp short loc_7E9B7 loc_7E9AA: mov rax, [rbp+var_28] mov eax, [rax+3E0h] mov [rbp+var_6C], eax loc_7E9B7: mov rax, [rbp+var_68] mov ecx, [rbp+var_6C] mov ecx, ecx add rax, rcx mov [rbp+var_58], rax jmp loc_7E8CE loc_7E9CC: mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_7E9D4: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn
unsigned long long maria_rtree_pick_key(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-6Ch] unsigned long long v4; // [rsp+10h] [rbp-60h] unsigned long long v5; // [rsp+18h] [rbp-58h] unsigned long long v6; // [rsp+20h] [rbp-50h] double v7; // [rsp+28h] [rbp-48h] double v8; // [rsp+30h] [rbp-40h] BYREF double v9; // [rsp+38h] [rbp-38h] double v10; // [rsp+40h] [rbp-30h] long long v11; // [rsp+48h] [rbp-28h] long long *v12; // [rsp+50h] [rbp-20h] long long v13; // [rsp+58h] [rbp-18h] long long v14; // [rsp+60h] [rbp-10h] v14 = a1; v13 = a2; v12 = *(long long **)a2; v11 = *v12; v9 = 1.797693134862316e308; v6 = 0LL; v5 = *(unsigned int *)(a2 + 40) + *(unsigned int *)(v11 + 1860) + *(_QWORD *)(a2 + 16); v4 = *(unsigned int *)(a2 + 32) + *(_QWORD *)(a2 + 16); while ( v5 < v4 ) { v10 = maria_rtree_area_increase( *(_QWORD *)(*(_QWORD *)(v14 + 8) + 192LL), v5, *(_QWORD *)v14, (unsigned int)(*(_DWORD *)(v14 + 20) + *(_DWORD *)(v14 + 16)), &v8); if ( v10 == -1.0 ) return 0LL; if ( !v6 || v9 > v10 || v10 == v9 && v7 > v8 ) { v6 = v5; v7 = v8; v9 = v10; } if ( *(_DWORD *)(v13 + 40) ) v3 = *(_DWORD *)(v13 + 40); else v3 = *(_DWORD *)(v11 + 992); v5 += v3 + (unsigned long long)*(unsigned int *)(v14 + 16); } return v6; }
maria_rtree_pick_key: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOVSD XMM0,qword ptr [0x0025a2c0] MOVSD qword ptr [RBP + -0x38],XMM0 MOVSD XMM0,qword ptr [RBP + -0x48] MOVSD qword ptr [RBP + -0x48],XMM0 MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_0017e8ce: MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0017e9cc MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0x14] LEA R8,[RBP + -0x40] CALL 0x00184440 MOVSD qword ptr [RBP + -0x30],XMM0 MOVSD XMM1,qword ptr [0x0025a2c8] UCOMISD XMM0,XMM1 JNZ 0x0017e92f JP 0x0017e92f MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017e9d4 LAB_0017e92f: CMP qword ptr [RBP + -0x50],0x0 JZ 0x0017e964 MOVSD XMM1,qword ptr [RBP + -0x30] MOVSD XMM0,qword ptr [RBP + -0x38] UCOMISD XMM0,XMM1 JA 0x0017e964 MOVSD XMM0,qword ptr [RBP + -0x30] UCOMISD XMM0,qword ptr [RBP + -0x38] JNZ 0x0017e980 JP 0x0017e980 MOVSD XMM1,qword ptr [RBP + -0x40] MOVSD XMM0,qword ptr [RBP + -0x48] UCOMISD XMM0,XMM1 JBE 0x0017e980 LAB_0017e964: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOVSD XMM0,qword ptr [RBP + -0x40] MOVSD qword ptr [RBP + -0x48],XMM0 MOVSD XMM0,qword ptr [RBP + -0x30] MOVSD qword ptr [RBP + -0x38],XMM0 LAB_0017e980: JMP 0x0017e982 LAB_0017e982: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x28],0x0 JZ 0x0017e9aa MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x6c],EAX JMP 0x0017e9b7 LAB_0017e9aa: MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x3e0] MOV dword ptr [RBP + -0x6c],EAX LAB_0017e9b7: MOV RAX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RBP + -0x6c] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX JMP 0x0017e8ce LAB_0017e9cc: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_0017e9d4: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x70 POP RBP RET
ulong maria_rtree_pick_key(int8 *param_1,int8 *param_2) { uint uVar1; long lVar2; uint local_74; ulong local_60; ulong local_58; double local_50; double local_48; double local_40; double local_38; long local_30; long *local_28; int8 *local_20; int8 *local_18; local_28 = (long *)*param_2; local_30 = *local_28; local_40 = DAT_0025a2c0; local_58 = 0; local_60 = param_2[2] + (ulong)*(uint *)(local_30 + 0x744) + (ulong)*(uint *)(param_2 + 5); lVar2 = param_2[2]; uVar1 = *(uint *)(param_2 + 4); local_20 = param_2; local_18 = param_1; do { if (lVar2 + (ulong)uVar1 <= local_60) { return local_58; } local_38 = (double)maria_rtree_area_increase (*(int8 *)(local_18[1] + 0xc0),local_60,*local_18, *(int *)(local_18 + 2) + *(int *)((long)local_18 + 0x14),&local_48 ); if ((local_38 == DAT_0025a2c8) && (!NAN(local_38) && !NAN(DAT_0025a2c8))) { return 0; } if ((local_58 == 0) || (local_38 < local_40)) { LAB_0017e964: local_58 = local_60; local_50 = local_48; local_40 = local_38; } else if ((local_38 == local_40) && ((!NAN(local_38) && !NAN(local_40) && (local_48 < local_50))) ) goto LAB_0017e964; if (*(int *)(local_20 + 5) == 0) { local_74 = *(uint *)(local_30 + 0x3e0); } else { local_74 = *(uint *)(local_20 + 5); } local_60 = local_60 + *(uint *)(local_18 + 2) + (ulong)local_74; } while( true ); }
14,969
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1ab59e(%rip), %rax # 0x1d5b08 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x243c0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x2d5b08] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001243c0 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
14,970
clip_image_load_from_file
llama.cpp/examples/llava/clip.cpp
bool clip_image_load_from_file(const char * fname, clip_image_u8 * img) { int nx, ny, nc; auto * data = stbi_load(fname, &nx, &ny, &nc, 3); if (!data) { LOG_ERR("%s: failed to load image '%s'\n", __func__, fname); return false; } clip_build_img_from_pixels(data, nx, ny, img); stbi_image_free(data); return true; }
O3
cpp
clip_image_load_from_file: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %r15 leaq 0x8(%rsp), %rsi leaq 0x4(%rsp), %rdx leaq 0xc(%rsp), %rcx movl $0x3, %r8d callq 0x2ef03 movq %rax, %rbx testq %rax, %rax je 0x31892 movl 0x8(%rsp), %eax movl 0x4(%rsp), %ecx movl %eax, (%r14) movl %ecx, 0x4(%r14) leaq 0x8(%r14), %rdi imull %ecx, %eax leal (%rax,%rax,2), %eax movslq %eax, %rsi callq 0x4ba90 movq 0x8(%r14), %rdi movq 0x10(%r14), %rdx subq %rdi, %rdx movq %rbx, %rsi callq 0x23150 movq %rbx, %rdi callq 0x23300 jmp 0x318bb leaq 0x15e597(%rip), %rax # 0x18fe30 cmpl $0x4, (%rax) jg 0x318bb leaq 0x106df3(%rip), %rsi # 0x138698 leaq 0x106e0b(%rip), %rdx # 0x1386b7 movl $0x4, %edi movq %r15, %rcx xorl %eax, %eax callq 0x314f3 testq %rbx, %rbx setne %al addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
clip_image_load_from_file: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov r15, rdi lea rsi, [rsp+28h+var_20] lea rdx, [rsp+28h+var_24] lea rcx, [rsp+28h+var_1C] mov r8d, 3 call stbi_load mov rbx, rax test rax, rax jz short loc_31892 mov eax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_24] mov [r14], eax mov [r14+4], ecx lea rdi, [r14+8] imul eax, ecx lea eax, [rax+rax*2] movsxd rsi, eax call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) mov rdi, [r14+8] mov rdx, [r14+10h] sub rdx, rdi mov rsi, rbx call _memcpy mov rdi, rbx call _free jmp short loc_318BB loc_31892: lea rax, g_logger_state cmp dword ptr [rax], 4 jg short loc_318BB lea rsi, aSFailedToLoadI_0; "%s: failed to load image '%s'\n" lea rdx, aClipImageLoadF; "clip_image_load_from_file" mov edi, 4 mov rcx, r15 xor eax, eax call _ZL17clip_log_internal14ggml_log_levelPKcz; clip_log_internal(ggml_log_level,char const*,...) loc_318BB: test rbx, rbx setnz al add rsp, 10h pop rbx pop r14 pop r15 retn
bool clip_image_load_from_file( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rbx long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 int v15; // eax int v16; // ecx int v18; // [rsp+4h] [rbp-24h] BYREF int v19; // [rsp+8h] [rbp-20h] BYREF _BYTE v20[28]; // [rsp+Ch] [rbp-1Ch] BYREF v10 = stbi_load(a1, (long long)&v19, (long long)&v18, (long long)v20, 3u); if ( v10 ) { v15 = v19; v16 = v18; *(_DWORD *)a2 = v19; *(_DWORD *)(a2 + 4) = v16; std::vector<unsigned char>::resize(a2 + 8, 3 * v16 * v15); memcpy(*(_QWORD *)(a2 + 8), v10, *(_QWORD *)(a2 + 16) - *(_QWORD *)(a2 + 8)); free(v10); } else if ( g_logger_state <= 4 ) { clip_log_internal( 4u, (long long)"%s: failed to load image '%s'\n", (long long)"clip_image_load_from_file", a1, v11, v12, a3, a4, a5, a6, v13, v14, a9, a10); } return v10 != 0; }
clip_image_load_from_file: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV R15,RDI LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x4] LEA RCX,[RSP + 0xc] MOV R8D,0x3 CALL 0x0012ef03 MOV RBX,RAX TEST RAX,RAX JZ 0x00131892 MOV EAX,dword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] MOV dword ptr [R14],EAX MOV dword ptr [R14 + 0x4],ECX LEA RDI,[R14 + 0x8] IMUL EAX,ECX LEA EAX,[RAX + RAX*0x2] MOVSXD RSI,EAX CALL 0x0014ba90 MOV RDI,qword ptr [R14 + 0x8] MOV RDX,qword ptr [R14 + 0x10] SUB RDX,RDI MOV RSI,RBX CALL 0x00123150 MOV RDI,RBX CALL 0x00123300 JMP 0x001318bb LAB_00131892: LEA RAX,[0x28fe30] CMP dword ptr [RAX],0x4 JG 0x001318bb LEA RSI,[0x238698] LEA RDX,[0x2386b7] MOV EDI,0x4 MOV RCX,R15 XOR EAX,EAX CALL 0x001314f3 LAB_001318bb: TEST RBX,RBX SETNZ AL ADD RSP,0x10 POP RBX POP R14 POP R15 RET
bool clip_image_load_from_file(int8 param_1,int *param_2) { void *__src; int local_24; int local_20; int1 local_1c [4]; __src = (void *)stbi_load(param_1,&local_20,&local_24,local_1c,3); if (__src == (void *)0x0) { if (g_logger_state < 5) { clip_log_internal(4,"%s: failed to load image \'%s\'\n","clip_image_load_from_file",param_1); } } else { *param_2 = local_20; param_2[1] = local_24; std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)(param_2 + 2), (long)(local_20 * local_24 * 3)); memcpy(*(void **)(param_2 + 2),__src,*(long *)(param_2 + 4) - (long)*(void **)(param_2 + 2)); free(__src); } return __src != (void *)0x0; }
14,971
ggml_opt_alloc_graph(ggml_opt_context*, ggml_cgraph*)
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp
static void ggml_opt_alloc_graph(ggml_opt_context_t opt_ctx, ggml_cgraph * graph) { GGML_ASSERT(graph); if (opt_ctx->allocated_graph == graph) { return; } ggml_backend_sched_reset(opt_ctx->backend_sched); // clear allocation of previous graph { ggml_init_params params = { /*.mem_size =*/ ggml_tensor_overhead() * GGML_DEFAULT_GRAPH_SIZE, /*.mem_buffer =*/ nullptr, /*.no_alloc =*/ true, }; ggml_free(opt_ctx->ctx_copy); opt_ctx->ctx_copy = ggml_init(params); } opt_ctx->allocated_graph_copy = dup_graph(opt_ctx->ctx_copy, graph); ggml_backend_sched_alloc_graph(opt_ctx->backend_sched, opt_ctx->allocated_graph_copy); opt_ctx->allocated_graph = graph; }
O0
cpp
ggml_opt_alloc_graph(ggml_opt_context*, ggml_cgraph*): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x66ea8 leaq 0x4eab2(%rip), %rdi # 0xb5940 movl $0x10e, %esi # imm = 0x10E leaq 0x4a76f(%rip), %rdx # 0xb1609 leaq 0x4d864(%rip), %rcx # 0xb4705 movb $0x0, %al callq 0x48a00 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x66ebb jmp 0x66f6e movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0x447e0 callq 0x48b90 shlq $0xb, %rax movq %rax, -0x28(%rbp) movq $0x0, -0x20(%rbp) movb $0x1, -0x18(%rbp) movq -0x8(%rbp), %rax movq 0x30(%rax), %rdi callq 0x42900 movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x40(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x45980 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x8(%rbp), %rax movq 0x30(%rax), %rdi movq -0x10(%rbp), %rsi callq 0x66f80 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi callq 0x43050 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL20ggml_opt_alloc_graphP16ggml_opt_contextP11ggml_cgraph: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_10], 0 jnz short loc_66EA8 lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... mov esi, 10Eh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlGallocrAll_0+13h; "graph" mov al, 0 call _ggml_abort loc_66EA8: mov rax, [rbp+var_8] mov rax, [rax+8] cmp rax, [rbp+var_10] jnz short loc_66EBB jmp loc_66F6E loc_66EBB: mov rax, [rbp+var_8] mov rdi, [rax] call _ggml_backend_sched_reset call _ggml_tensor_overhead shl rax, 0Bh mov [rbp+var_28], rax mov [rbp+var_20], 0 mov byte ptr [rbp+var_18], 1 mov rax, [rbp+var_8] mov rdi, [rax+30h] call _ggml_free mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax lea rax, [rbp+var_40] mov rcx, [rax] mov [rsp+60h+var_60], rcx mov rcx, [rax+8] mov [rsp+60h+var_58], rcx mov rax, [rax+10h] mov [rsp+60h+var_50], rax call _ggml_init mov rcx, rax mov rax, [rbp+var_8] mov [rax+30h], rcx mov rax, [rbp+var_8] mov rdi, [rax+30h] mov rsi, [rbp+var_10] call _ZL9dup_graphP12ggml_contextP11ggml_cgraph; dup_graph(ggml_context *,ggml_cgraph *) mov rcx, rax mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_8] mov rdi, [rax] mov rax, [rbp+var_8] mov rsi, [rax+10h] call _ggml_backend_sched_alloc_graph mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+8], rcx loc_66F6E: add rsp, 60h pop rbp retn
long long * ggml_opt_alloc_graph( long long *a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long *result; // rax long long v11; // rdi long long v12; // rdx long long v13; // r8 long long v14; // r9 double v15; // xmm4_8 double v16; // xmm5_8 long long v17; // [rsp+38h] [rbp-28h] if ( !a2 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp", 270, (long long)"GGML_ASSERT(%s) failed", "graph"); result = (long long *)a1[1]; if ( result != (long long *)a2 ) { ggml_backend_sched_reset(*a1); v17 = ggml_tensor_overhead() << 11; v11 = a1[6]; ggml_free(v11, a2); a1[6] = ggml_init(v11, a2, v12, 0LL, v13, v14, v17, 0LL, 1); a1[2] = dup_graph(a1[6], a2); ggml_backend_sched_alloc_graph(*a1, a1[2], a3, a4, a5, a6, v15, v16, a9, a10); result = a1; a1[1] = a2; } return result; }
ggml_opt_alloc_graph: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00166ea8 LEA RDI,[0x1b5940] MOV ESI,0x10e LEA RDX,[0x1b1609] LEA RCX,[0x1b4705] MOV AL,0x0 CALL 0x00148a00 LAB_00166ea8: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x00166ebb JMP 0x00166f6e LAB_00166ebb: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] CALL 0x001447e0 CALL 0x00148b90 SHL RAX,0xb MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x20],0x0 MOV byte ptr [RBP + -0x18],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x30] CALL 0x00142900 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + -0x40] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00145980 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00166f80 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] CALL 0x00143050 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX LAB_00166f6e: ADD RSP,0x60 POP RBP RET
/* ggml_opt_alloc_graph(ggml_opt_context*, ggml_cgraph*) */ void ggml_opt_alloc_graph(ggml_opt_context *param_1,ggml_cgraph *param_2) { int8 uVar1; if (param_2 == (ggml_cgraph *)0x0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp" ,0x10e,"GGML_ASSERT(%s) failed","graph"); } if (*(ggml_cgraph **)(param_1 + 8) != param_2) { ggml_backend_sched_reset(*(int8 *)param_1); ggml_tensor_overhead(); ggml_free(*(int8 *)(param_1 + 0x30)); uVar1 = ggml_init(); *(int8 *)(param_1 + 0x30) = uVar1; uVar1 = dup_graph(*(ggml_context **)(param_1 + 0x30),param_2); *(int8 *)(param_1 + 0x10) = uVar1; ggml_backend_sched_alloc_graph(*(int8 *)param_1,*(int8 *)(param_1 + 0x10)); *(ggml_cgraph **)(param_1 + 8) = param_2; } return; }
14,972
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/common.cpp
std::string string_join(const std::vector<std::string> & values, const std::string & separator) { std::ostringstream result; for (size_t i = 0; i < values.size(); ++i) { if (i > 0) { result << separator; } result << values[i]; } return result.str(); }
O3
cpp
string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x178, %rsp # imm = 0x178 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %rdi callq 0x21000 movq (%r15), %rax cmpq %rax, 0x8(%r15) je 0xf70c3 movl $0x8, %r13d xorl %ebp, %ebp movq %rsp, %r12 testq %rbp, %rbp je 0xf7098 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %r12, %rdi callq 0x21060 movq (%r15), %rax movq -0x8(%rax,%r13), %rsi movq (%rax,%r13), %rdx movq %r12, %rdi callq 0x21060 incq %rbp movq (%r15), %rax movq 0x8(%r15), %rcx subq %rax, %rcx sarq $0x5, %rcx addq $0x20, %r13 cmpq %rcx, %rbp jb 0xf7081 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x20650 movq 0x6ae81(%rip), %rsi # 0x161f58 movq %rsp, %rdi callq 0x20c70 leaq 0x70(%rsp), %rdi callq 0x20c40 movq %rbx, %rax addq $0x178, %rsp # imm = 0x178 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xf7100 movq %rax, %rbx movq 0x6ae4e(%rip), %rsi # 0x161f58 movq %rsp, %rdi callq 0x20c70 leaq 0x70(%rsp), %rdi callq 0x20c40 movq %rbx, %rdi callq 0x20ae0
_Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 178h mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r15] cmp [r15+8], rax jz short loc_F70C3 mov r13d, 8 xor ebp, ebp mov r12, rsp loc_F7081: test rbp, rbp jz short loc_F7098 mov rsi, [r14] mov rdx, [r14+8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [r15] loc_F7098: mov rsi, [rax+r13-8] mov rdx, [rax+r13] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc rbp mov rax, [r15] mov rcx, [r15+8] sub rcx, rax sar rcx, 5 add r13, 20h ; ' ' cmp rbp, rcx jb short loc_F7081 loc_F70C3: lea rsi, [rsp+1A8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1A8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 178h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_F7100: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_68]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_join(long long a1, long long *a2, _QWORD *a3) { long long v4; // rax long long v5; // r13 unsigned long long v6; // rbp long long v8; // [rsp+0h] [rbp-1A8h] BYREF _BYTE v9[104]; // [rsp+8h] [rbp-1A0h] BYREF _BYTE v10[312]; // [rsp+70h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(&v8); v4 = *a2; if ( a2[1] != *a2 ) { v5 = 8LL; v6 = 0LL; do { if ( v6 ) { std::__ostream_insert<char,std::char_traits<char>>(&v8, *a3, a3[1]); v4 = *a2; } std::__ostream_insert<char,std::char_traits<char>>(&v8, *(_QWORD *)(v4 + v5 - 8), *(_QWORD *)(v4 + v5)); ++v6; v4 = *a2; v5 += 32LL; } while ( v6 < (a2[1] - *a2) >> 5 ); } std::stringbuf::str(a1, v9); std::ostringstream::~ostringstream(&v8, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v10); return a1; }
string_join: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x178 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x00121000 MOV RAX,qword ptr [R15] CMP qword ptr [R15 + 0x8],RAX JZ 0x001f70c3 MOV R13D,0x8 XOR EBP,EBP MOV R12,RSP LAB_001f7081: TEST RBP,RBP JZ 0x001f7098 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001f708d: MOV RDI,R12 CALL 0x00121060 MOV RAX,qword ptr [R15] LAB_001f7098: MOV RSI,qword ptr [RAX + R13*0x1 + -0x8] MOV RDX,qword ptr [RAX + R13*0x1] MOV RDI,R12 CALL 0x00121060 INC RBP MOV RAX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] SUB RCX,RAX SAR RCX,0x5 ADD R13,0x20 CMP RBP,RCX JC 0x001f7081 LAB_001f70c3: LEA RSI,[RSP + 0x8] LAB_001f70c8: MOV RDI,RBX CALL 0x00120650 LAB_001f70d0: MOV RSI,qword ptr [0x00261f58] MOV RDI,RSP CALL 0x00120c70 LEA RDI,[RSP + 0x70] CALL 0x00120c40 MOV RAX,RBX ADD RSP,0x178 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_join(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::__cxx11::string const&) */ vector * string_join(vector *param_1,string *param_2) { long lVar1; int8 *in_RDX; ulong uVar2; long lVar3; ostringstream aoStack_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(aoStack_1a8); lVar1 = *(long *)param_2; if (*(long *)(param_2 + 8) != lVar1) { lVar3 = 8; uVar2 = 0; do { if (uVar2 != 0) { /* try { // try from 001f708d to 001f70a8 has its CatchHandler @ 001f7100 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)aoStack_1a8,(char *)*in_RDX,in_RDX[1]); lVar1 = *(long *)param_2; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)aoStack_1a8,*(char **)(lVar1 + -8 + lVar3),*(long *)(lVar1 + lVar3)); uVar2 = uVar2 + 1; lVar1 = *(long *)param_2; lVar3 = lVar3 + 0x20; } while (uVar2 < (ulong)(*(long *)(param_2 + 8) - lVar1 >> 5)); } /* try { // try from 001f70c8 to 001f70cf has its CatchHandler @ 001f70fe */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(aoStack_1a8); std::ios_base::~ios_base(local_138); return param_1; }
14,973
my_mb_wc_utf16_quick
eloqsql/strings/ctype-utf16.h
static inline int my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 2 > e) return MY_CS_TOOSMALL2; /* High bytes: 0xD[89AB] = B'110110??' Low bytes: 0xD[CDEF] = B'110111??' Surrogate mask: 0xFC = B'11111100' */ if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */ { if (s + 4 > e) return MY_CS_TOOSMALL4; if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]); return 4; } if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC2(s[0], s[1]); return 2; }
O0
c
my_mb_wc_utf16_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x6146a movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x61548 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xd8, %eax jne 0x61507 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x6149b movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x61548 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax je 0x614bb movl $0x0, -0x4(%rbp) jmp 0x61548 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x3, %eax shll $0x12, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0xa, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx andl $0x3, %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx addl %ecx, %eax addl $0x10000, %eax # imm = 0x10000 movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x61548 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax jne 0x61523 movl $0x0, -0x4(%rbp) jmp 0x61548 movq -0x18(%rbp), %rax movzbl (%rax), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_utf16_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_6146A mov [rbp+var_4], 0FFFFFF9Ah jmp loc_61548 loc_6146A: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0D8h jnz loc_61507 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_6149B mov [rbp+var_4], 0FFFFFF98h jmp loc_61548 loc_6149B: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] and eax, 0FCh cmp eax, 0DCh jz short loc_614BB mov [rbp+var_4], 0 jmp loc_61548 loc_614BB: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 3 shl eax, 12h mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 0Ah add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] and ecx, 3 shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] add eax, ecx add eax, 10000h movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_61548 loc_61507: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0DCh jnz short loc_61523 mov [rbp+var_4], 0 jmp short loc_61548 loc_61523: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] shl eax, 8 mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 loc_61548: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf16_quick_0(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (*a2 & 0xFC) == 0xD8 ) { if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[2] & 0xFC) == 0xDC ) { *a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (*a2 & 0xFC) == 0xDC ) { return 0; } else { *a1 = a2[1] + (*a2 << 8); return 2; } } else { return (unsigned int)-102; } }
my_mb_wc_utf16_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0016146a MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00161548 LAB_0016146a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xd8 JNZ 0x00161507 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0016149b MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00161548 LAB_0016149b: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0xfc CMP EAX,0xdc JZ 0x001614bb MOV dword ptr [RBP + -0x4],0x0 JMP 0x00161548 LAB_001614bb: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x3 SHL EAX,0x12 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0xa ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] AND ECX,0x3 SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] ADD EAX,ECX ADD EAX,0x10000 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x00161548 LAB_00161507: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xdc JNZ 0x00161523 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00161548 LAB_00161523: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 LAB_00161548: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((*param_2 & 0xfc) == 0xd8) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((param_2[2] & 0xfc) == 0xdc) { *param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 + (param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000); local_c = 4; } else { local_c = 0; } } else if ((*param_2 & 0xfc) == 0xdc) { local_c = 0; } else { *param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]); local_c = 2; } return local_c; }
14,974
ac_packet_serialize
alca/libalca/packet.c
uint8_t *ac_packet_serialize(ac_packet_handle handle, uint32_t *total_size) { struct ac_packet *packet = handle; uint8_t *pkdata =ac_alloc(sizeof(ac_packet_header) + packet->header.data_len); memcpy(pkdata, &packet->header, sizeof(ac_packet_header)); memcpy(pkdata + sizeof(ac_packet_header), packet->data, packet->header.data_len); *total_size = b2l(sizeof(ac_packet_header) + packet->header.data_len); return pkdata; }
O0
c
ac_packet_serialize: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x10(%rax), %eax addq $0x18, %rax movl %eax, %edi callq 0x7890 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rdi addq $0x18, %rdi movq -0x18(%rbp), %rax movq 0x18(%rax), %rsi movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %edx callq 0x7750 movq -0x18(%rbp), %rax movl 0x10(%rax), %eax addq $0x18, %rax movl %eax, %edi callq 0x7a00 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
ac_packet_serialize: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+10h] add rax, 18h mov edi, eax call _ac_alloc mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov rcx, [rcx+10h] mov [rax+10h], rcx mov rdi, [rbp+var_20] add rdi, 18h mov rax, [rbp+var_18] mov rsi, [rax+18h] mov rax, [rbp+var_18] mov eax, [rax+10h] mov edx, eax call _memcpy mov rax, [rbp+var_18] mov eax, [rax+10h] add rax, 18h mov edi, eax call _ac_u32be_to_u32le mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_20] add rsp, 20h pop rbp retn
_QWORD * ac_packet_serialize(long long a1, _DWORD *a2) { _QWORD *v3; // [rsp+0h] [rbp-20h] v3 = (_QWORD *)ac_alloc((unsigned int)(*(_DWORD *)(a1 + 16) + 24)); *v3 = *(_QWORD *)a1; v3[1] = *(_QWORD *)(a1 + 8); v3[2] = *(_QWORD *)(a1 + 16); memcpy(v3 + 3, *(_QWORD *)(a1 + 24), *(unsigned int *)(a1 + 16)); *a2 = ac_u32be_to_u32le(*(_DWORD *)(a1 + 16) + 24); return v3; }
ac_packet_serialize: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] ADD RAX,0x18 MOV EDI,EAX CALL 0x00107890 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV EDX,EAX CALL 0x00107750 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] ADD RAX,0x18 MOV EDI,EAX CALL 0x00107a00 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x20 POP RBP RET
int8 * ac_packet_serialize(int8 *param_1,int4 *param_2) { int4 uVar1; int8 *puVar2; puVar2 = (int8 *)ac_alloc(*(int *)(param_1 + 2) + 0x18); *puVar2 = *param_1; puVar2[1] = param_1[1]; puVar2[2] = param_1[2]; memcpy(puVar2 + 3,(void *)param_1[3],(ulong)*(uint *)(param_1 + 2)); uVar1 = ac_u32be_to_u32le(*(int *)(param_1 + 2) + 0x18); *param_2 = uVar1; return puVar2; }
14,975
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>::emplace_back<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>&)
monkey531[P]llama/common/./json.hpp
reference emplace_back(Args&& ... args) { // emplace_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(311, detail::concat("cannot use emplace_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array (perfect forwarding) const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->emplace_back(std::forward<Args>(args)...); return set_parent(m_data.m_value.array->back(), old_capacity); }
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>& 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>::emplace_back<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>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax je 0xe81d8 cmpl $0x2, %eax je 0xe81f8 movl $0x20, %edi callq 0x1b430 movq %rax, %rbx movq %r14, %rdi callq 0x60036 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x11a8e(%rip), %rsi # 0xf9c2c leaq 0x10(%rsp), %rdi callq 0xe8254 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x137, %esi # imm = 0x137 movq %r14, %rcx callq 0x5fdde xorl %ebp, %ebp leaq 0x44d4f(%rip), %rsi # 0x12cf18 leaq -0x8c058(%rip), %rdx # 0x5c178 movq %rbx, %rdi callq 0x1bf20 movb $0x2, (%r14) movl $0x18, %edi callq 0x1b8b0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq 0x8(%r14), %rdi movq %rbx, %rsi callq 0xe82dc movq 0x8(%r14), %rax movq 0x8(%rax), %rax addq $-0x10, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe823f movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0xe823f movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xe824c movq %rbx, %rdi callq 0x1b670 movq %r14, %rdi callq 0x1bfb0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jz short loc_E81D8 cmp eax, 2 jz short loc_E81F8 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseEmpla; "cannot use emplace_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA32_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>(char const(&)[32],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 137h; 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_E81D8: mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax loc_E81F8: mov rdi, [r14+8] mov rsi, rbx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJRSD_EEESH_DpOT_; 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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&>(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 rax, [r14+8] mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFF0h add rsp, 30h pop rbx pop r14 pop rbp retn mov r14, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E823F mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E823F mov r14, rax mov bpl, 1 loc_E823F: test bpl, bpl jz short loc_E824C mov rdi, rbx; void * call ___cxa_free_exception loc_E824C: 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>::emplace_back<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>&>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx long long v3; // rax _QWORD v5[7]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[32],char const*>( v5, "cannot use emplace_back() 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, 311, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 2; v3 = operator new(0x18uLL); *(_OWORD *)v3 = 0LL; *(_QWORD *)(v3 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v3; } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<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>&>( *(_QWORD *)(a1 + 8), a2); return *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 16LL; }
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x001e81d8 CMP EAX,0x2 JZ 0x001e81f8 MOV EDI,0x20 CALL 0x0011b430 MOV RBX,RAX MOV RDI,R14 CALL 0x00160036 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001e8197: LEA RSI,[0x1f9c2c] LEA RDI,[RSP + 0x10] CALL 0x001e8254 MOV BPL,0x1 LAB_001e81ab: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x137 MOV RCX,R14 CALL 0x0015fdde XOR EBP,EBP LEA RSI,[0x22cf18] LEA RDX,[0x15c178] MOV RDI,RBX CALL 0x0011bf20 LAB_001e81d8: MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x0011b8b0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX LAB_001e81f8: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX CALL 0x001e82dc MOV RAX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x10 ADD RSP,0x30 POP RBX POP R14 POP RBP RET
/* 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::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>::emplace_back<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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&) */ basic_json * __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> :: emplace_back<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>&> (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 *param_1) { int8 uVar1; int8 *puVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar2 = (int8 *)operator_new(0x18); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; *(int8 **)(this + 8) = puVar2; } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001e8197 to 001e81a7 has its CatchHandler @ 001e8239 */ detail::concat<std::__cxx11::string,char_const(&)[32],char_const*> (local_38,"cannot use emplace_back() with ",&local_40); /* try { // try from 001e81ab to 001e81d7 has its CatchHandler @ 001e8219 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x137,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>> :: emplace_back<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>&> (*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8),param_1); return (basic_json *)(*(long *)(*(long *)(this + 8) + 8) + -0x10); }
14,976
mysql_close_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
MK_ASYNC_CONT_BODY_VOID_RETURN(sock) } int STDCALL mysql_close_start(MYSQL *sock) { int res; /* It is legitimate to have NULL sock argument, which will do nothing. */ if (sock && sock->net.pvio) { res= mysql_close_slow_part_start(sock); /* If we need to block, return now and do the rest in mysql_close_cont(). */ if (res) return res; } mysql_close(sock); return 0; }
O3
c
mysql_close_start: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx testq %rdi, %rdi je 0x29ba6 cmpq $0x0, (%rbx) je 0x29ba6 movq %rbx, %rdi callq 0x299ca testl %eax, %eax jne 0x29bb0 movq %rbx, %rdi callq 0x19d70 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_start: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi test rdi, rdi jz short loc_29BA6 cmp qword ptr [rbx], 0 jz short loc_29BA6 mov rdi, rbx call mysql_close_slow_part_start test eax, eax jnz short loc_29BB0 loc_29BA6: mov rdi, rbx call mysql_close xor eax, eax loc_29BB0: add rsp, 8 pop rbx pop rbp retn
long long mysql_close_start(_QWORD *a1) { long long result; // rax if ( !a1 || !*a1 || (result = mysql_close_slow_part_start((long long)a1), !(_DWORD)result) ) { mysql_close((long long)a1); return 0LL; } return result; }
mysql_close_start: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI TEST RDI,RDI JZ 0x00129ba6 CMP qword ptr [RBX],0x0 JZ 0x00129ba6 MOV RDI,RBX CALL 0x001299ca TEST EAX,EAX JNZ 0x00129bb0 LAB_00129ba6: MOV RDI,RBX CALL 0x00119d70 XOR EAX,EAX LAB_00129bb0: ADD RSP,0x8 POP RBX POP RBP RET
int8 mysql_close_start(long *param_1) { int8 uVar1; if (((param_1 != (long *)0x0) && (*param_1 != 0)) && (uVar1 = mysql_close_slow_part_start(param_1), (int)uVar1 != 0)) { return uVar1; } mysql_close(param_1); return 0; }
14,977
translog_sync_files
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_sync_files(uint32 min, uint32 max, my_bool sync_dir) { uint fn; my_bool rc= 0; ulonglong flush_interval; DBUG_ENTER("translog_sync_files"); DBUG_PRINT("info", ("min: %lu max: %lu sync dir: %d", (ulong) min, (ulong) max, (int) sync_dir)); DBUG_ASSERT(min <= max); flush_interval= group_commit_wait; if (flush_interval) flush_start= microsecond_interval_timer(); for (fn= min; fn <= max; fn++) { TRANSLOG_FILE *file= get_logfile_by_number(fn); DBUG_ASSERT(file != NULL); if (!file->is_sync) { if (mysql_file_sync(file->handler.file, MYF(MY_WME))) { rc= 1; translog_stop_writing(); DBUG_RETURN(rc); } translog_syncs++; file->is_sync= 1; } } if (sync_dir) { if (!(rc= sync_dir(log_descriptor.directory_fd, MYF(MY_WME | MY_IGNORE_BADFD)))) translog_syncs++; } DBUG_RETURN(rc); }
O3
c
translog_sync_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, -0x30(%rbp) movl %esi, %r14d movl %edi, %r15d cmpl $0x0, 0xb9f315(%rip) # 0xc0b7d4 je 0x6c4e2 callq 0xa5744 shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF mulq %rcx shrq $0x4, %rdx movq %rdx, 0xb9f2de(%rip) # 0xc0b7c0 cmpl %r14d, %r15d jbe 0x6c539 cmpb $0x0, -0x30(%rbp) je 0x6c532 movl 0x39e6ad(%rip), %ebx # 0x40aba0 leaq 0x3249de(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x6c5e2 movl $0x30, %esi movl %ebx, %edi callq 0xa875c testb %al, %al jne 0x6c5d3 incq 0x39d176(%rip) # 0x4096a8 xorl %eax, %eax jmp 0x6c5d3 leaq -0x78(%rbp), %r12 movl %r15d, %edi callq 0x6dbf6 cmpb $0x0, 0x51(%rax) jne 0x6c58c movq %rax, %r13 movl 0x18(%rax), %ebx leaq 0x324980(%rip), %rax # 0x390ed8 movq (%rax), %rax movq %r12, %rdi movl %ebx, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x6c599 movl $0x10, %esi movl %ebx, %edi callq 0xa875c testl %eax, %eax jne 0x6c5ac incq 0x39d121(%rip) # 0x4096a8 movb $0x1, 0x51(%r13) incl %r15d cmpl %r14d, %r15d jbe 0x6c53d jmp 0x6c4e7 movq %rax, %rdi movl %ebx, %esi leaq -0x2c(%rbp), %rdx callq 0x2e052 movl -0x2c(%rbp), %eax jmp 0x6c57c xorl %eax, %eax cmpl $0x3, 0x39d0eb(%rip) # 0x4096a0 setne %al addl %eax, %eax movl %eax, 0x39d0e0(%rip) # 0x4096a0 movb $0x1, 0xb9f1b9(%rip) # 0xc0b780 movl $0x0, 0x39e2eb(%rip) # 0x40a8bc movb $0x1, %al addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x2c(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rdx callq 0x2e0ab movl (%r14), %eax jmp 0x6c523
translog_sync_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_30], edx mov r14d, esi mov r15d, edi cmp cs:group_commit_wait, 0 jz short loc_6C4E2 call my_interval_timer shr rax, 3 mov rcx, 20C49BA5E353F7CFh mul rcx shr rdx, 4 mov cs:flush_start, rdx loc_6C4E2: cmp r15d, r14d jbe short loc_6C539 loc_6C4E7: cmp byte ptr [rbp+var_30], 0 jz short loc_6C532 mov ebx, cs:dword_40ABA0 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz loc_6C5E2 mov esi, 30h ; '0' mov edi, ebx call my_sync loc_6C523: test al, al jnz loc_6C5D3 inc cs:translog_syncs loc_6C532: xor eax, eax jmp loc_6C5D3 loc_6C539: lea r12, [rbp+var_78] loc_6C53D: mov edi, r15d call get_logfile_by_number cmp byte ptr [rax+51h], 0 jnz short loc_6C58C mov r13, rax mov ebx, [rax+18h] lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov esi, ebx mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_6C599 mov esi, 10h mov edi, ebx call my_sync loc_6C57C: test eax, eax jnz short loc_6C5AC inc cs:translog_syncs mov byte ptr [r13+51h], 1 loc_6C58C: inc r15d cmp r15d, r14d jbe short loc_6C53D jmp loc_6C4E7 loc_6C599: mov rdi, rax mov esi, ebx lea rdx, [rbp+var_2C] call translog_sync_files_cold_1 mov eax, [rbp+var_2C] jmp short loc_6C57C loc_6C5AC: xor eax, eax cmp cs:translog_status, 3 setnz al add eax, eax mov cs:translog_status, eax mov byte ptr cs:word_C0B780, 1 mov cs:dword_40A8BC, 0 mov al, 1 loc_6C5D3: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6C5E2: lea r14, [rbp+var_2C] mov rdi, rax mov esi, ebx mov rdx, r14 call translog_sync_files_cold_2 mov eax, [r14] jmp loc_6C523
char translog_sync_files(unsigned int a1, unsigned int a2, int a3) { unsigned int v3; // r15d unsigned int v4; // ebx long long v5; // rax char result; // al long long logfile_by_number; // rax long long v8; // r13 unsigned int v9; // ebx long long v10; // rax int v11; // eax _BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF int v13; // [rsp+50h] [rbp-30h] _DWORD v14[11]; // [rsp+54h] [rbp-2Ch] BYREF v13 = a3; v3 = a1; if ( group_commit_wait ) flush_start = my_interval_timer() / 0x3E8uLL; if ( a1 <= a2 ) { do { logfile_by_number = get_logfile_by_number(v3); if ( !*(_BYTE *)(logfile_by_number + 81) ) { v8 = logfile_by_number; v9 = *(_DWORD *)(logfile_by_number + 24); v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v9, 16LL); if ( v10 ) { translog_sync_files_cold_1(v10, v9, v14); v11 = v14[0]; } else { v11 = my_sync(v9, 16LL); } if ( v11 ) { translog_status = 2 * (translog_status != 3); LOBYTE(word_C0B780) = 1; dword_40A8BC = 0; return 1; } ++translog_syncs; *(_BYTE *)(v8 + 81) = 1; } ++v3; } while ( v3 <= a2 ); } if ( !(_BYTE)v13 ) return 0; v4 = dword_40ABA0; v5 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, (unsigned int)dword_40ABA0, 16LL); if ( v5 ) { translog_sync_files_cold_2(v5, v4, v14); result = v14[0]; } else { result = my_sync(v4, 48LL); } if ( !result ) { ++translog_syncs; return 0; } return result; }
translog_sync_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RBP + -0x30],EDX MOV R14D,ESI MOV R15D,EDI CMP dword ptr [0x00d0b7d4],0x0 JZ 0x0016c4e2 CALL 0x001a5744 SHR RAX,0x3 MOV RCX,0x20c49ba5e353f7cf MUL RCX SHR RDX,0x4 MOV qword ptr [0x00d0b7c0],RDX LAB_0016c4e2: CMP R15D,R14D JBE 0x0016c539 LAB_0016c4e7: CMP byte ptr [RBP + -0x30],0x0 JZ 0x0016c532 MOV EBX,dword ptr [0x0050aba0] LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0016c5e2 MOV ESI,0x30 MOV EDI,EBX CALL 0x001a875c LAB_0016c523: TEST AL,AL JNZ 0x0016c5d3 INC qword ptr [0x005096a8] LAB_0016c532: XOR EAX,EAX JMP 0x0016c5d3 LAB_0016c539: LEA R12,[RBP + -0x78] LAB_0016c53d: MOV EDI,R15D CALL 0x0016dbf6 CMP byte ptr [RAX + 0x51],0x0 JNZ 0x0016c58c MOV R13,RAX MOV EBX,dword ptr [RAX + 0x18] LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV ESI,EBX MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0016c599 MOV ESI,0x10 MOV EDI,EBX CALL 0x001a875c LAB_0016c57c: TEST EAX,EAX JNZ 0x0016c5ac INC qword ptr [0x005096a8] MOV byte ptr [R13 + 0x51],0x1 LAB_0016c58c: INC R15D CMP R15D,R14D JBE 0x0016c53d JMP 0x0016c4e7 LAB_0016c599: MOV RDI,RAX MOV ESI,EBX LEA RDX,[RBP + -0x2c] CALL 0x0012e052 MOV EAX,dword ptr [RBP + -0x2c] JMP 0x0016c57c LAB_0016c5ac: XOR EAX,EAX CMP dword ptr [0x005096a0],0x3 SETNZ AL ADD EAX,EAX MOV dword ptr [0x005096a0],EAX MOV byte ptr [0x00d0b780],0x1 MOV dword ptr [0x0050a8bc],0x0 MOV AL,0x1 LAB_0016c5d3: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016c5e2: LEA R14,[RBP + -0x2c] MOV RDI,RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012e0ab MOV EAX,dword ptr [R14] JMP 0x0016c523
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong translog_sync_files(uint param_1,uint param_2,int4 param_3) { int4 uVar1; uint uVar2; ulong uVar3; long lVar4; long lVar5; int1 local_80 [72]; int4 local_38; uint local_34; local_38 = param_3; if (group_commit_wait != 0) { uVar3 = my_interval_timer(); flush_start = uVar3 / 1000; } if (param_1 <= param_2) { do { lVar4 = get_logfile_by_number(param_1); if (*(char *)(lVar4 + 0x51) == '\0') { uVar1 = *(int4 *)(lVar4 + 0x18); lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,0x10); if (lVar5 == 0) { uVar2 = my_sync(uVar1,0x10); } else { translog_sync_files_cold_1(lVar5,uVar1,&local_34); uVar2 = local_34; } if (uVar2 != 0) { translog_status = (uint)(translog_status != 3) * 2; _DAT_0050a8bc = 0; DAT_00d0b780 = 1; return 1; } translog_syncs = translog_syncs + 1; *(int1 *)(lVar4 + 0x51) = 1; } param_1 = param_1 + 1; } while (param_1 <= param_2); } uVar1 = DAT_0050aba0; if ((char)local_38 != '\0') { lVar4 = (**(code **)(PSI_server + 0x158))(local_80,DAT_0050aba0,0x10); if (lVar4 == 0) { uVar3 = my_sync(uVar1,0x30); } else { translog_sync_files_cold_2(lVar4,uVar1,&local_34); uVar3 = (ulong)local_34; } if ((char)uVar3 != '\0') { return uVar3; } translog_syncs = translog_syncs + 1; } return 0; }
14,978
my_dir
eloqsql/mysys/my_lib.c
MY_DIR *my_dir(const char *path, myf MyFlags) { MY_DIR_HANDLE *dirh; FILEINFO finfo; DIR *dirp; struct dirent *dp; char tmp_path[FN_REFLEN + 2], *tmp_file; char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1]; DBUG_ENTER("my_dir"); DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags)); tmp_file= directory_file_name(tmp_path, path); if (!(dirp= opendir(tmp_path))) { my_errno= errno; goto err_open; } if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh), MYF(MyFlags | MY_ZEROFILL)))) goto err_alloc; if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO), ENTRIES_START_SIZE, ENTRIES_INCREMENT, MYF(MyFlags))) goto error; init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE, NAMES_START_SIZE, MYF(MyFlags)); dp= (struct dirent*) dirent_tmp; while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp))) { MY_STAT statbuf, *mystat= 0; if (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' && dp->d_name[2] == '\0'))) continue; /* . or .. */ if (MyFlags & MY_WANT_STAT) { mystat= &statbuf; bzero(mystat, sizeof(*mystat)); (void) strmov(tmp_file, dp->d_name); (void) my_stat(tmp_path, mystat, MyFlags); if (!(mystat->st_mode & MY_S_IREAD)) continue; } if (!(finfo.name= strdup_root(&dirh->root, dp->d_name))) goto error; if (mystat && !((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat))))) goto error; finfo.mystat= mystat; if (push_dynamic(&dirh->array, (uchar*)&finfo)) goto error; } (void) closedir(dirp); if (MyFlags & MY_WANT_SORT) sort_dynamic(&dirh->array, (qsort_cmp) comp_names); dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *); dirh->dir.number_of_files= dirh->array.elements; DBUG_RETURN(&dirh->dir); error: my_dirend(&dirh->dir); err_alloc: (void) closedir(dirp); err_open: if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_DIR, MYF(ME_BELL), path, my_errno); DBUG_RETURN(NULL); }
O0
c
my_dir: pushq %rbp movq %rsp, %rbp subq $0x530, %rsp # imm = 0x530 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x440(%rbp) movq %rsi, -0x448(%rbp) jmp 0x38968 leaq -0x210(%rbp), %rdi movq -0x440(%rbp), %rsi callq 0x38d10 movq %rax, -0x478(%rbp) leaq -0x210(%rbp), %rdi callq 0x254f0 movq %rax, -0x468(%rbp) cmpq $0x0, %rax jne 0x389ba callq 0x25050 movl (%rax), %eax movl %eax, -0x514(%rbp) callq 0x2c180 movl -0x514(%rbp), %ecx movl %ecx, (%rax) jmp 0x38c8b leaq 0x359413(%rip), %rax # 0x391dd4 movl (%rax), %edi movq -0x448(%rbp), %rdx orq $0x20, %rdx movl $0x78, %esi callq 0x2b560 movq %rax, -0x450(%rbp) cmpq $0x0, %rax jne 0x389ea jmp 0x38c7f leaq 0x3593e3(%rip), %rax # 0x391dd4 movl (%rax), %edi movq -0x450(%rbp), %rsi addq $0x10, %rsi movq -0x448(%rbp), %rax movl $0x10, %edx xorl %ecx, %ecx movl $0x200, %r8d # imm = 0x200 movl $0x1000, %r9d # imm = 0x1000 movq %rax, (%rsp) callq 0x39dd0 cmpb $0x0, %al je 0x38a2a jmp 0x38c73 leaq 0x3593a3(%rip), %rax # 0x391dd4 movl (%rax), %edi movq -0x450(%rbp), %rsi addq $0x38, %rsi movq -0x448(%rbp), %r8 movl $0x8000, %ecx # imm = 0x8000 movq %rcx, %rdx callq 0x36940 leaq -0x430(%rbp), %rax movq %rax, -0x470(%rbp) movq -0x468(%rbp), %rdi callq 0x251c0 movq %rax, -0x470(%rbp) cmpq $0x0, %rax setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x38a87 jmp 0x38bec movq $0x0, -0x510(%rbp) movq -0x470(%rbp), %rax movsbl 0x13(%rax), %eax cmpl $0x2e, %eax jne 0x38ad4 movq -0x470(%rbp), %rax movsbl 0x14(%rax), %eax cmpl $0x0, %eax je 0x38ad2 movq -0x470(%rbp), %rax movsbl 0x14(%rax), %eax cmpl $0x2e, %eax jne 0x38ad4 movq -0x470(%rbp), %rax movsbl 0x15(%rax), %eax cmpl $0x0, %eax jne 0x38ad4 jmp 0x38a60 movq -0x448(%rbp), %rax andq $0x4000, %rax # imm = 0x4000 cmpq $0x0, %rax je 0x38b54 leaq -0x508(%rbp), %rax movq %rax, -0x510(%rbp) movq -0x510(%rbp), %rdi xorl %esi, %esi movl $0x90, %edx callq 0x25190 movq -0x478(%rbp), %rdi movq -0x470(%rbp), %rsi addq $0x13, %rsi callq 0x252d0 leaq -0x210(%rbp), %rdi movq -0x510(%rbp), %rsi movq -0x448(%rbp), %rdx callq 0x38d80 movq -0x510(%rbp), %rax movl 0x18(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x38b52 jmp 0x38a60 jmp 0x38b54 movq -0x450(%rbp), %rdi addq $0x38, %rdi movq -0x470(%rbp), %rsi addq $0x13, %rsi callq 0x37470 movq %rax, -0x460(%rbp) cmpq $0x0, %rax jne 0x38b81 jmp 0x38c73 cmpq $0x0, -0x510(%rbp) je 0x38bb9 movq -0x450(%rbp), %rdi addq $0x38, %rdi movq -0x510(%rbp), %rsi movl $0x90, %edx callq 0x37510 movq %rax, -0x510(%rbp) cmpq $0x0, %rax jne 0x38bb9 jmp 0x38c73 movq -0x510(%rbp), %rax movq %rax, -0x458(%rbp) movq -0x450(%rbp), %rdi addq $0x10, %rdi leaq -0x460(%rbp), %rsi callq 0x39f00 cmpb $0x0, %al je 0x38be7 jmp 0x38c73 jmp 0x38a60 movq -0x468(%rbp), %rdi callq 0x25580 movq -0x448(%rbp), %rax andq $0x2000, %rax # imm = 0x2000 cmpq $0x0, %rax je 0x38c3a movq -0x450(%rbp), %rax movq 0x10(%rax), %rdi movq -0x450(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %esi movq -0x450(%rbp), %rax movl 0x24(%rax), %eax movl %eax, %edx leaq 0x23b(%rip), %rcx # 0x38e70 callq 0x3b240 movq -0x450(%rbp), %rax movq 0x10(%rax), %rcx movq -0x450(%rbp), %rax movq %rcx, (%rax) movq -0x450(%rbp), %rax movl 0x18(%rax), %ecx movq -0x450(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x450(%rbp), %rax movq %rax, -0x438(%rbp) jmp 0x38cd6 movq -0x450(%rbp), %rdi callq 0x388f0 movq -0x468(%rbp), %rdi callq 0x25580 movq -0x448(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x38cc9 movq -0x440(%rbp), %rax movq %rax, -0x520(%rbp) callq 0x2c180 movq -0x520(%rbp), %rdx movl (%rax), %ecx movl $0xc, %edi movl $0x4, %esi movb $0x0, %al callq 0x37670 jmp 0x38ccb movq $0x0, -0x438(%rbp) movq -0x438(%rbp), %rax movq %rax, -0x528(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x38d06 movq -0x528(%rbp), %rax addq $0x530, %rsp # imm = 0x530 popq %rbp retq callq 0x25330 nopl (%rax,%rax)
my_dir: push rbp mov rbp, rsp sub rsp, 530h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_440], rdi mov [rbp+var_448], rsi jmp short $+2 loc_38968: lea rdi, [rbp+var_210] mov rsi, [rbp+var_440] call directory_file_name mov [rbp+var_478], rax lea rdi, [rbp+var_210] call _opendir mov [rbp+var_468], rax cmp rax, 0 jnz short loc_389BA call ___errno_location mov eax, [rax] mov [rbp+var_514], eax call _my_thread_var mov ecx, [rbp+var_514] mov [rax], ecx jmp loc_38C8B loc_389BA: lea rax, key_memory_MY_DIR mov edi, [rax] mov rdx, [rbp+var_448] or rdx, 20h mov esi, 78h ; 'x' call my_malloc mov [rbp+var_450], rax cmp rax, 0 jnz short loc_389EA jmp loc_38C7F loc_389EA: lea rax, key_memory_MY_DIR mov edi, [rax] mov rsi, [rbp+var_450] add rsi, 10h mov rax, [rbp+var_448] mov edx, 10h xor ecx, ecx mov r8d, 200h mov r9d, 1000h mov [rsp+530h+var_530], rax call init_dynamic_array2 cmp al, 0 jz short loc_38A2A jmp loc_38C73 loc_38A2A: lea rax, key_memory_MY_DIR mov edi, [rax] mov rsi, [rbp+var_450] add rsi, 38h ; '8' mov r8, [rbp+var_448] mov ecx, 8000h mov rdx, rcx call init_alloc_root lea rax, [rbp+var_430] mov [rbp+var_470], rax loc_38A60: mov rdi, [rbp+var_468] call _readdir64 mov [rbp+var_470], rax cmp rax, 0 setnz al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_38A87 jmp loc_38BEC loc_38A87: mov [rbp+var_510], 0 mov rax, [rbp+var_470] movsx eax, byte ptr [rax+13h] cmp eax, 2Eh ; '.' jnz short loc_38AD4 mov rax, [rbp+var_470] movsx eax, byte ptr [rax+14h] cmp eax, 0 jz short loc_38AD2 mov rax, [rbp+var_470] movsx eax, byte ptr [rax+14h] cmp eax, 2Eh ; '.' jnz short loc_38AD4 mov rax, [rbp+var_470] movsx eax, byte ptr [rax+15h] cmp eax, 0 jnz short loc_38AD4 loc_38AD2: jmp short loc_38A60 loc_38AD4: mov rax, [rbp+var_448] and rax, 4000h cmp rax, 0 jz short loc_38B54 lea rax, [rbp+var_508] mov [rbp+var_510], rax mov rdi, [rbp+var_510] xor esi, esi mov edx, 90h call _memset mov rdi, [rbp+var_478] mov rsi, [rbp+var_470] add rsi, 13h call _stpcpy lea rdi, [rbp+var_210] mov rsi, [rbp+var_510] mov rdx, [rbp+var_448] call my_stat mov rax, [rbp+var_510] mov eax, [rax+18h] and eax, 100h cmp eax, 0 jnz short loc_38B52 jmp loc_38A60 loc_38B52: jmp short $+2 loc_38B54: mov rdi, [rbp+var_450] add rdi, 38h ; '8' mov rsi, [rbp+var_470] add rsi, 13h call strdup_root mov [rbp+var_460], rax cmp rax, 0 jnz short loc_38B81 jmp loc_38C73 loc_38B81: cmp [rbp+var_510], 0 jz short loc_38BB9 mov rdi, [rbp+var_450] add rdi, 38h ; '8' mov rsi, [rbp+var_510] mov edx, 90h call memdup_root mov [rbp+var_510], rax cmp rax, 0 jnz short loc_38BB9 jmp loc_38C73 loc_38BB9: mov rax, [rbp+var_510] mov [rbp+var_458], rax mov rdi, [rbp+var_450] add rdi, 10h lea rsi, [rbp+var_460] call insert_dynamic cmp al, 0 jz short loc_38BE7 jmp loc_38C73 loc_38BE7: jmp loc_38A60 loc_38BEC: mov rdi, [rbp+var_468] call _closedir mov rax, [rbp+var_448] and rax, 2000h cmp rax, 0 jz short loc_38C3A mov rax, [rbp+var_450] mov rdi, [rax+10h] mov rax, [rbp+var_450] mov eax, [rax+18h] mov esi, eax mov rax, [rbp+var_450] mov eax, [rax+24h] mov edx, eax lea rcx, comp_names call my_qsort loc_38C3A: mov rax, [rbp+var_450] mov rcx, [rax+10h] mov rax, [rbp+var_450] mov [rax], rcx mov rax, [rbp+var_450] mov ecx, [rax+18h] mov rax, [rbp+var_450] mov [rax+8], ecx mov rax, [rbp+var_450] mov [rbp+var_438], rax jmp short loc_38CD6 loc_38C73: mov rdi, [rbp+var_450] call my_dirend loc_38C7F: mov rdi, [rbp+var_468] call _closedir loc_38C8B: mov rax, [rbp+var_448] and rax, 18h cmp rax, 0 jz short loc_38CC9 mov rax, [rbp+var_440] mov [rbp+var_520], rax call _my_thread_var mov rdx, [rbp+var_520] mov ecx, [rax] mov edi, 0Ch mov esi, 4 mov al, 0 call my_error loc_38CC9: jmp short $+2 loc_38CCB: mov [rbp+var_438], 0 loc_38CD6: mov rax, [rbp+var_438] mov [rbp+var_528], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_38D06 mov rax, [rbp+var_528] add rsp, 530h pop rbp retn loc_38D06: call ___stack_chk_fail
long long my_dir(long long a1, long long a2) { unsigned int *v2; // rax long long v4; // [rsp+10h] [rbp-520h] int v5; // [rsp+1Ch] [rbp-514h] char *v6; // [rsp+20h] [rbp-510h] _BYTE v7[24]; // [rsp+28h] [rbp-508h] BYREF __int16 v8; // [rsp+40h] [rbp-4F0h] long long v9; // [rsp+B8h] [rbp-478h] char *v10; // [rsp+C0h] [rbp-470h] long long v11; // [rsp+C8h] [rbp-468h] _QWORD v12[2]; // [rsp+D0h] [rbp-460h] BYREF long long v13; // [rsp+E0h] [rbp-450h] long long v14; // [rsp+E8h] [rbp-448h] long long v15; // [rsp+F0h] [rbp-440h] char v17; // [rsp+100h] [rbp-430h] BYREF _BYTE v18[520]; // [rsp+320h] [rbp-210h] BYREF unsigned long long v19; // [rsp+528h] [rbp-8h] v19 = __readfsqword(0x28u); v15 = a1; v14 = a2; v9 = directory_file_name(v18, a1); v11 = opendir(v18); if ( !v11 ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; LABEL_24: if ( (v14 & 0x18) != 0 ) { v4 = v15; v2 = (unsigned int *)my_thread_var(); my_error(0xCu, 4LL, v4, *v2); } return 0LL; } v13 = my_malloc(key_memory_MY_DIR, 0x78uLL, (unsigned int)v14 | 0x20); if ( !v13 ) { LABEL_23: closedir(v11); goto LABEL_24; } if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_DIR, (int)v13 + 16, 16, 0, 512, 4096, v14) ) { LABEL_22: my_dirend(v13); goto LABEL_23; } init_alloc_root(key_memory_MY_DIR, (long long *)(v13 + 56), 0x8000LL, 0x8000LL, v14); v10 = &v17; while ( 1 ) { v10 = (char *)readdir64(v11); if ( !v10 ) break; v6 = 0LL; if ( v10[19] != 46 || v10[20] && (v10[20] != 46 || v10[21]) ) { if ( (v14 & 0x4000) == 0 || (v6 = v7, memset(v7, 0LL, 144LL), stpcpy(v9, v10 + 19), my_stat(v18, v7, v14), (v8 & 0x100) != 0) ) { v12[0] = strdup_root(v13 + 56, (long long)(v10 + 19)); if ( !v12[0] ) goto LABEL_22; if ( v6 ) { v6 = memdup_root((_QWORD **)(v13 + 56), (long long)v6, 144LL); if ( !v6 ) goto LABEL_22; } v12[1] = v6; if ( (unsigned __int8)insert_dynamic(v13 + 16, v12) ) goto LABEL_22; } } } closedir(v11); if ( (v14 & 0x2000) != 0 ) my_qsort(*(_QWORD *)(v13 + 16), *(unsigned int *)(v13 + 24), *(unsigned int *)(v13 + 36), comp_names); *(_QWORD *)v13 = *(_QWORD *)(v13 + 16); *(_DWORD *)(v13 + 8) = *(_DWORD *)(v13 + 24); return v13; }
my_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x530 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x440],RDI MOV qword ptr [RBP + -0x448],RSI JMP 0x00138968 LAB_00138968: LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x440] CALL 0x00138d10 MOV qword ptr [RBP + -0x478],RAX LEA RDI,[RBP + -0x210] CALL 0x001254f0 MOV qword ptr [RBP + -0x468],RAX CMP RAX,0x0 JNZ 0x001389ba CALL 0x00125050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x514],EAX CALL 0x0012c180 MOV ECX,dword ptr [RBP + -0x514] MOV dword ptr [RAX],ECX JMP 0x00138c8b LAB_001389ba: LEA RAX,[0x491dd4] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x448] OR RDX,0x20 MOV ESI,0x78 CALL 0x0012b560 MOV qword ptr [RBP + -0x450],RAX CMP RAX,0x0 JNZ 0x001389ea JMP 0x00138c7f LAB_001389ea: LEA RAX,[0x491dd4] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x450] ADD RSI,0x10 MOV RAX,qword ptr [RBP + -0x448] MOV EDX,0x10 XOR ECX,ECX MOV R8D,0x200 MOV R9D,0x1000 MOV qword ptr [RSP],RAX CALL 0x00139dd0 CMP AL,0x0 JZ 0x00138a2a JMP 0x00138c73 LAB_00138a2a: LEA RAX,[0x491dd4] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x450] ADD RSI,0x38 MOV R8,qword ptr [RBP + -0x448] MOV ECX,0x8000 MOV RDX,RCX CALL 0x00136940 LEA RAX,[RBP + -0x430] MOV qword ptr [RBP + -0x470],RAX LAB_00138a60: MOV RDI,qword ptr [RBP + -0x468] CALL 0x001251c0 MOV qword ptr [RBP + -0x470],RAX CMP RAX,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00138a87 JMP 0x00138bec LAB_00138a87: MOV qword ptr [RBP + -0x510],0x0 MOV RAX,qword ptr [RBP + -0x470] MOVSX EAX,byte ptr [RAX + 0x13] CMP EAX,0x2e JNZ 0x00138ad4 MOV RAX,qword ptr [RBP + -0x470] MOVSX EAX,byte ptr [RAX + 0x14] CMP EAX,0x0 JZ 0x00138ad2 MOV RAX,qword ptr [RBP + -0x470] MOVSX EAX,byte ptr [RAX + 0x14] CMP EAX,0x2e JNZ 0x00138ad4 MOV RAX,qword ptr [RBP + -0x470] MOVSX EAX,byte ptr [RAX + 0x15] CMP EAX,0x0 JNZ 0x00138ad4 LAB_00138ad2: JMP 0x00138a60 LAB_00138ad4: MOV RAX,qword ptr [RBP + -0x448] AND RAX,0x4000 CMP RAX,0x0 JZ 0x00138b54 LEA RAX,[RBP + -0x508] MOV qword ptr [RBP + -0x510],RAX MOV RDI,qword ptr [RBP + -0x510] XOR ESI,ESI MOV EDX,0x90 CALL 0x00125190 MOV RDI,qword ptr [RBP + -0x478] MOV RSI,qword ptr [RBP + -0x470] ADD RSI,0x13 CALL 0x001252d0 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x510] MOV RDX,qword ptr [RBP + -0x448] CALL 0x00138d80 MOV RAX,qword ptr [RBP + -0x510] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0x100 CMP EAX,0x0 JNZ 0x00138b52 JMP 0x00138a60 LAB_00138b52: JMP 0x00138b54 LAB_00138b54: MOV RDI,qword ptr [RBP + -0x450] ADD RDI,0x38 MOV RSI,qword ptr [RBP + -0x470] ADD RSI,0x13 CALL 0x00137470 MOV qword ptr [RBP + -0x460],RAX CMP RAX,0x0 JNZ 0x00138b81 JMP 0x00138c73 LAB_00138b81: CMP qword ptr [RBP + -0x510],0x0 JZ 0x00138bb9 MOV RDI,qword ptr [RBP + -0x450] ADD RDI,0x38 MOV RSI,qword ptr [RBP + -0x510] MOV EDX,0x90 CALL 0x00137510 MOV qword ptr [RBP + -0x510],RAX CMP RAX,0x0 JNZ 0x00138bb9 JMP 0x00138c73 LAB_00138bb9: MOV RAX,qword ptr [RBP + -0x510] MOV qword ptr [RBP + -0x458],RAX MOV RDI,qword ptr [RBP + -0x450] ADD RDI,0x10 LEA RSI,[RBP + -0x460] CALL 0x00139f00 CMP AL,0x0 JZ 0x00138be7 JMP 0x00138c73 LAB_00138be7: JMP 0x00138a60 LAB_00138bec: MOV RDI,qword ptr [RBP + -0x468] CALL 0x00125580 MOV RAX,qword ptr [RBP + -0x448] AND RAX,0x2000 CMP RAX,0x0 JZ 0x00138c3a MOV RAX,qword ptr [RBP + -0x450] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x450] MOV EAX,dword ptr [RAX + 0x18] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x450] MOV EAX,dword ptr [RAX + 0x24] MOV EDX,EAX LEA RCX,[0x138e70] CALL 0x0013b240 LAB_00138c3a: MOV RAX,qword ptr [RBP + -0x450] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x450] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x450] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x450] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x450] MOV qword ptr [RBP + -0x438],RAX JMP 0x00138cd6 LAB_00138c73: MOV RDI,qword ptr [RBP + -0x450] CALL 0x001388f0 LAB_00138c7f: MOV RDI,qword ptr [RBP + -0x468] CALL 0x00125580 LAB_00138c8b: MOV RAX,qword ptr [RBP + -0x448] AND RAX,0x18 CMP RAX,0x0 JZ 0x00138cc9 MOV RAX,qword ptr [RBP + -0x440] MOV qword ptr [RBP + -0x520],RAX CALL 0x0012c180 MOV RDX,qword ptr [RBP + -0x520] MOV ECX,dword ptr [RAX] MOV EDI,0xc MOV ESI,0x4 MOV AL,0x0 CALL 0x00137670 LAB_00138cc9: JMP 0x00138ccb LAB_00138ccb: MOV qword ptr [RBP + -0x438],0x0 LAB_00138cd6: MOV RAX,qword ptr [RBP + -0x438] MOV qword ptr [RBP + -0x528],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00138d06 MOV RAX,qword ptr [RBP + -0x528] ADD RSP,0x530 POP RBP RET LAB_00138d06: CALL 0x00125330
int8 * my_dir(int8 param_1,ulong param_2) { int iVar1; int8 uVar2; char cVar3; int *piVar4; int4 *puVar5; long in_FS_OFFSET; int1 *local_518; int1 local_510 [24]; uint local_4f8; char *local_480; dirent64 *local_478; DIR *local_470; long local_468; int1 *local_460; int8 *local_458; ulong local_450; int8 local_448; int8 *local_440; dirent64 local_438; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_450 = param_2; local_448 = param_1; local_480 = (char *)directory_file_name(local_218,param_1); local_470 = opendir(local_218); if (local_470 == (DIR *)0x0) { piVar4 = __errno_location(); iVar1 = *piVar4; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; } else { local_458 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,local_450 | 0x20); if (local_458 != (int8 *)0x0) { cVar3 = init_dynamic_array2(key_memory_MY_DIR,local_458 + 2,0x10,0,0x200,0x1000,local_450); if (cVar3 == '\0') { init_alloc_root(key_memory_MY_DIR,local_458 + 7,0x8000,0x8000,local_450); local_478 = &local_438; LAB_00138a60: do { do { local_478 = readdir64(local_470); if (local_478 == (dirent64 *)0x0) { closedir(local_470); if ((local_450 & 0x2000) != 0) { my_qsort(local_458[2],*(int4 *)(local_458 + 3), *(int4 *)((long)local_458 + 0x24),comp_names); } *local_458 = local_458[2]; *(int4 *)(local_458 + 1) = *(int4 *)(local_458 + 3); local_440 = local_458; goto LAB_00138cd6; } local_518 = (int1 *)0x0; } while ((local_478->d_name[0] == '.') && ((local_478->d_name[1] == '\0' || ((local_478->d_name[1] == '.' && (local_478->d_name[2] == '\0')))))); if ((local_450 & 0x4000) != 0) { local_518 = local_510; memset(local_518,0,0x90); stpcpy(local_480,local_478->d_name); my_stat(local_218,local_518,local_450); if ((local_4f8 & 0x100) == 0) goto LAB_00138a60; } local_468 = strdup_root(local_458 + 7,local_478->d_name); if ((local_468 == 0) || ((local_518 != (int1 *)0x0 && (local_518 = (int1 *)memdup_root(local_458 + 7,local_518,0x90), local_518 == (int1 *)0x0)))) break; local_460 = local_518; cVar3 = insert_dynamic(local_458 + 2); if (cVar3 != '\0') break; } while( true ); } my_dirend(local_458); } closedir(local_470); } uVar2 = local_448; if ((local_450 & 0x18) != 0) { puVar5 = (int4 *)_my_thread_var(); my_error(0xc,4,uVar2,*puVar5); } local_440 = (int8 *)0x0; LAB_00138cd6: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_440; }
14,979
ggml_permute
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_permute( struct ggml_context * ctx, struct ggml_tensor * a, int axis0, int axis1, int axis2, int axis3) { GGML_ASSERT(axis0 >= 0 && axis0 < GGML_MAX_DIMS); GGML_ASSERT(axis1 >= 0 && axis1 < GGML_MAX_DIMS); GGML_ASSERT(axis2 >= 0 && axis2 < GGML_MAX_DIMS); GGML_ASSERT(axis3 >= 0 && axis3 < GGML_MAX_DIMS); GGML_ASSERT(axis0 != axis1); GGML_ASSERT(axis0 != axis2); GGML_ASSERT(axis0 != axis3); GGML_ASSERT(axis1 != axis2); GGML_ASSERT(axis1 != axis3); GGML_ASSERT(axis2 != axis3); struct ggml_tensor * result = ggml_view_tensor(ctx, a); ggml_format_name(result, "%s (permuted)", a->name); int ne[GGML_MAX_DIMS]; int nb[GGML_MAX_DIMS]; ne[axis0] = a->ne[0]; ne[axis1] = a->ne[1]; ne[axis2] = a->ne[2]; ne[axis3] = a->ne[3]; nb[axis0] = a->nb[0]; nb[axis1] = a->nb[1]; nb[axis2] = a->nb[2]; nb[axis3] = a->nb[3]; result->ne[0] = ne[0]; result->ne[1] = ne[1]; result->ne[2] = ne[2]; result->ne[3] = ne[3]; result->nb[0] = nb[0]; result->nb[1] = nb[1]; result->nb[2] = nb[2]; result->nb[3] = nb[3]; result->op = GGML_OP_PERMUTE; result->src[0] = a; int32_t params[] = { axis0, axis1, axis2, axis3 }; ggml_set_op_params(result, params, sizeof(params)); return result; }
O1
c
ggml_permute: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpl $0x4, %edx jae 0x1dd64 movl %ecx, %r14d cmpl $0x4, %ecx jae 0x1dd83 movl %r8d, %ebp cmpl $0x4, %r8d jae 0x1dda2 movl %r9d, %ebx cmpl $0x4, %r9d jae 0x1ddc1 movl %edx, %r15d cmpl %r14d, %edx je 0x1dde0 cmpl %ebp, %r15d je 0x1ddff cmpl %ebx, %r15d je 0x1de1e cmpl %ebp, %r14d je 0x1de3a cmpl %ebx, %r14d je 0x1de56 cmpl %ebx, %ebp je 0x1de72 movq %rsi, %r12 callq 0x17260 movq %rax, %r13 leaq 0x100(%r12), %rdx leaq 0x2eea6(%rip), %rsi # 0x4cb31 movq %rax, %rdi xorl %eax, %eax callq 0x18a70 movl 0x10(%r12), %eax movl %r15d, %ecx movl %eax, 0x10(%rsp,%rcx,4) movl 0x18(%r12), %eax movl %r14d, %edx movl %eax, 0x10(%rsp,%rdx,4) movl 0x20(%r12), %eax movl %ebp, %esi movl %eax, 0x10(%rsp,%rsi,4) movl 0x28(%r12), %eax movl %ebx, %edi movl %eax, 0x10(%rsp,%rdi,4) movl 0x30(%r12), %eax movl %eax, (%rsp,%rcx,4) movl 0x38(%r12), %eax movl %eax, (%rsp,%rdx,4) movl 0x40(%r12), %eax movl %eax, (%rsp,%rsi,4) movl 0x48(%r12), %eax movl %eax, (%rsp,%rdi,4) movslq 0x10(%rsp), %rax movq %rax, 0x10(%r13) movslq 0x14(%rsp), %rax movq %rax, 0x18(%r13) movslq 0x18(%rsp), %rax movq %rax, 0x20(%r13) movslq 0x1c(%rsp), %rax movq %rax, 0x28(%r13) movslq (%rsp), %rax movq %rax, 0x30(%r13) movslq 0x4(%rsp), %rax movq %rax, 0x38(%r13) movslq 0x8(%rsp), %rax movq %rax, 0x40(%r13) movslq 0xc(%rsp), %rax movq %rax, 0x48(%r13) movl $0x23, 0x50(%r13) movq %r12, 0x98(%r13) testq %r13, %r13 je 0x1de8e movl %r15d, 0x54(%r13) movl %r14d, 0x58(%r13) movl %ebp, 0x5c(%r13) movl %ebx, 0x60(%r13) movq %r13, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2e804(%rip), %rdi # 0x4c56f leaq 0x2e84f(%rip), %rdx # 0x4c5c1 leaq 0x2ecce(%rip), %rcx # 0x4ca47 movl $0xc85, %esi # imm = 0xC85 jmp 0x1dea8 leaq 0x2e7e5(%rip), %rdi # 0x4c56f leaq 0x2e830(%rip), %rdx # 0x4c5c1 leaq 0x2ecd3(%rip), %rcx # 0x4ca6b movl $0xc86, %esi # imm = 0xC86 jmp 0x1dea8 leaq 0x2e7c6(%rip), %rdi # 0x4c56f leaq 0x2e811(%rip), %rdx # 0x4c5c1 leaq 0x2ecd8(%rip), %rcx # 0x4ca8f movl $0xc87, %esi # imm = 0xC87 jmp 0x1dea8 leaq 0x2e7a7(%rip), %rdi # 0x4c56f leaq 0x2e7f2(%rip), %rdx # 0x4c5c1 leaq 0x2ecdd(%rip), %rcx # 0x4cab3 movl $0xc88, %esi # imm = 0xC88 jmp 0x1dea8 leaq 0x2e788(%rip), %rdi # 0x4c56f leaq 0x2e7d3(%rip), %rdx # 0x4c5c1 leaq 0x2ece2(%rip), %rcx # 0x4cad7 movl $0xc8a, %esi # imm = 0xC8A jmp 0x1dea8 leaq 0x2e769(%rip), %rdi # 0x4c56f leaq 0x2e7b4(%rip), %rdx # 0x4c5c1 leaq 0x2ecd2(%rip), %rcx # 0x4cae6 movl $0xc8b, %esi # imm = 0xC8B jmp 0x1dea8 leaq 0x2e74a(%rip), %rdi # 0x4c56f leaq 0x2e795(%rip), %rdx # 0x4c5c1 leaq 0x2ecc2(%rip), %rcx # 0x4caf5 movl $0xc8c, %esi # imm = 0xC8C jmp 0x1dea8 leaq 0x2e72e(%rip), %rdi # 0x4c56f leaq 0x2e779(%rip), %rdx # 0x4c5c1 leaq 0x2ecb5(%rip), %rcx # 0x4cb04 movl $0xc8d, %esi # imm = 0xC8D jmp 0x1dea8 leaq 0x2e712(%rip), %rdi # 0x4c56f leaq 0x2e75d(%rip), %rdx # 0x4c5c1 leaq 0x2eca8(%rip), %rcx # 0x4cb13 movl $0xc8e, %esi # imm = 0xC8E jmp 0x1dea8 leaq 0x2e6f6(%rip), %rdi # 0x4c56f leaq 0x2e741(%rip), %rdx # 0x4c5c1 leaq 0x2ec9b(%rip), %rcx # 0x4cb22 movl $0xc8f, %esi # imm = 0xC8F jmp 0x1dea8 leaq 0x30830(%rip), %rdi # 0x4e6c5 leaq 0x2e725(%rip), %rdx # 0x4c5c1 leaq 0x3094f(%rip), %rcx # 0x4e7f2 movl $0x70, %esi xorl %eax, %eax callq 0x18ce0
ggml_permute: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp edx, 4 jnb loc_1DD64 mov r14d, ecx cmp ecx, 4 jnb loc_1DD83 mov ebp, r8d cmp r8d, 4 jnb loc_1DDA2 mov ebx, r9d cmp r9d, 4 jnb loc_1DDC1 mov r15d, edx cmp edx, r14d jz loc_1DDE0 cmp r15d, ebp jz loc_1DDFF cmp r15d, ebx jz loc_1DE1E cmp r14d, ebp jz loc_1DE3A cmp r14d, ebx jz loc_1DE56 cmp ebp, ebx jz loc_1DE72 mov r12, rsi call _ggml_view_tensor mov r13, rax lea rdx, [r12+100h] lea rsi, aSPermuted; "%s (permuted)" mov rdi, rax xor eax, eax call _ggml_format_name mov eax, [r12+10h] mov ecx, r15d mov [rsp+rcx*4+58h+var_48], eax mov eax, [r12+18h] mov edx, r14d mov [rsp+rdx*4+58h+var_48], eax mov eax, [r12+20h] mov esi, ebp mov [rsp+rsi*4+58h+var_48], eax mov eax, [r12+28h] mov edi, ebx mov [rsp+rdi*4+58h+var_48], eax mov eax, [r12+30h] mov [rsp+rcx*4+58h+var_58], eax mov eax, [r12+38h] mov [rsp+rdx*4+58h+var_58], eax mov eax, [r12+40h] mov [rsp+rsi*4+58h+var_58], eax mov eax, [r12+48h] mov [rsp+rdi*4+58h+var_58], eax movsxd rax, [rsp+58h+var_48] mov [r13+10h], rax movsxd rax, [rsp+58h+var_44] mov [r13+18h], rax movsxd rax, [rsp+58h+var_40] mov [r13+20h], rax movsxd rax, [rsp+58h+var_3C] mov [r13+28h], rax movsxd rax, [rsp+58h+var_58] mov [r13+30h], rax movsxd rax, [rsp+58h+var_54] mov [r13+38h], rax movsxd rax, [rsp+58h+var_50] mov [r13+40h], rax movsxd rax, [rsp+58h+var_4C] mov [r13+48h], rax mov dword ptr [r13+50h], 23h ; '#' mov [r13+98h], r12 test r13, r13 jz loc_1DE8E mov [r13+54h], r15d mov [r13+58h], r14d mov [r13+5Ch], ebp mov [r13+60h], ebx mov rax, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1DD64: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis00Axis0Ggm; "axis0 >= 0 && axis0 < GGML_MAX_DIMS" mov esi, 0C85h jmp loc_1DEA8 loc_1DD83: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis10Axis1Ggm; "axis1 >= 0 && axis1 < GGML_MAX_DIMS" mov esi, 0C86h jmp loc_1DEA8 loc_1DDA2: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis20Axis2Ggm; "axis2 >= 0 && axis2 < GGML_MAX_DIMS" mov esi, 0C87h jmp loc_1DEA8 loc_1DDC1: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis30Axis3Ggm; "axis3 >= 0 && axis3 < GGML_MAX_DIMS" mov esi, 0C88h jmp loc_1DEA8 loc_1DDE0: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis1; "axis0 != axis1" mov esi, 0C8Ah jmp loc_1DEA8 loc_1DDFF: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis2; "axis0 != axis2" mov esi, 0C8Bh jmp loc_1DEA8 loc_1DE1E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis3; "axis0 != axis3" mov esi, 0C8Ch jmp short loc_1DEA8 loc_1DE3A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis2; "axis1 != axis2" mov esi, 0C8Dh jmp short loc_1DEA8 loc_1DE56: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis3; "axis1 != axis3" mov esi, 0C8Eh jmp short loc_1DEA8 loc_1DE72: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis2Axis3; "axis2 != axis3" mov esi, 0C8Fh jmp short loc_1DEA8 loc_1DE8E: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1DEA8: xor eax, eax call _ggml_abort
long long ggml_permute( long long a1, _DWORD *a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, double a7) { long long v11; // r13 const char *v13; // rdi const char *v14; // rcx int v15; // esi _DWORD v16[4]; // [rsp+0h] [rbp-58h] _DWORD v17[18]; // [rsp+10h] [rbp-48h] if ( a3 >= 4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; v15 = 3205; goto LABEL_24; } if ( a4 >= 4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; v15 = 3206; goto LABEL_24; } if ( a5 >= 4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; v15 = 3207; goto LABEL_24; } if ( a6 >= 4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; v15 = 3208; goto LABEL_24; } if ( a3 == a4 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis0 != axis1"; v15 = 3210; goto LABEL_24; } if ( a3 == a5 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis0 != axis2"; v15 = 3211; goto LABEL_24; } if ( a3 == a6 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis0 != axis3"; v15 = 3212; goto LABEL_24; } if ( a4 == a5 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis1 != axis2"; v15 = 3213; goto LABEL_24; } if ( a4 == a6 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis1 != axis3"; v15 = 3214; goto LABEL_24; } if ( a5 == a6 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; v14 = "axis2 != axis3"; v15 = 3215; goto LABEL_24; } v11 = ggml_view_tensor(a1, (long long)a2, a7); ggml_format_name(v11, (long long)"%s (permuted)"); v17[a3] = a2[4]; v17[a4] = a2[6]; v17[a5] = a2[8]; v17[a6] = a2[10]; v16[a3] = a2[12]; v16[a4] = a2[14]; v16[a5] = a2[16]; v16[a6] = a2[18]; *(_QWORD *)(v11 + 16) = v17[0]; *(_QWORD *)(v11 + 24) = v17[1]; *(_QWORD *)(v11 + 32) = v17[2]; *(_QWORD *)(v11 + 40) = v17[3]; *(_QWORD *)(v11 + 48) = v16[0]; *(_QWORD *)(v11 + 56) = v16[1]; *(_QWORD *)(v11 + 64) = v16[2]; *(_QWORD *)(v11 + 72) = v16[3]; *(_DWORD *)(v11 + 80) = 35; *(_QWORD *)(v11 + 152) = a2; if ( !v11 ) { v13 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"; v14 = "tensor != NULL"; v15 = 112; LABEL_24: ggml_abort((_DWORD)v13, v15, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v14, a5, a6); } *(_DWORD *)(v11 + 84) = a3; *(_DWORD *)(v11 + 88) = a4; *(_DWORD *)(v11 + 92) = a5; *(_DWORD *)(v11 + 96) = a6; return v11; }
ggml_permute: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP EDX,0x4 JNC 0x0011dd64 MOV R14D,ECX CMP ECX,0x4 JNC 0x0011dd83 MOV EBP,R8D CMP R8D,0x4 JNC 0x0011dda2 MOV EBX,R9D CMP R9D,0x4 JNC 0x0011ddc1 MOV R15D,EDX CMP EDX,R14D JZ 0x0011dde0 CMP R15D,EBP JZ 0x0011ddff CMP R15D,EBX JZ 0x0011de1e CMP R14D,EBP JZ 0x0011de3a CMP R14D,EBX JZ 0x0011de56 CMP EBP,EBX JZ 0x0011de72 MOV R12,RSI CALL 0x00117260 MOV R13,RAX LEA RDX,[R12 + 0x100] LEA RSI,[0x14cb31] MOV RDI,RAX XOR EAX,EAX CALL 0x00118a70 MOV EAX,dword ptr [R12 + 0x10] MOV ECX,R15D MOV dword ptr [RSP + RCX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x18] MOV EDX,R14D MOV dword ptr [RSP + RDX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x20] MOV ESI,EBP MOV dword ptr [RSP + RSI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x28] MOV EDI,EBX MOV dword ptr [RSP + RDI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x30] MOV dword ptr [RSP + RCX*0x4],EAX MOV EAX,dword ptr [R12 + 0x38] MOV dword ptr [RSP + RDX*0x4],EAX MOV EAX,dword ptr [R12 + 0x40] MOV dword ptr [RSP + RSI*0x4],EAX MOV EAX,dword ptr [R12 + 0x48] MOV dword ptr [RSP + RDI*0x4],EAX MOVSXD RAX,dword ptr [RSP + 0x10] MOV qword ptr [R13 + 0x10],RAX MOVSXD RAX,dword ptr [RSP + 0x14] MOV qword ptr [R13 + 0x18],RAX MOVSXD RAX,dword ptr [RSP + 0x18] MOV qword ptr [R13 + 0x20],RAX MOVSXD RAX,dword ptr [RSP + 0x1c] MOV qword ptr [R13 + 0x28],RAX MOVSXD RAX,dword ptr [RSP] MOV qword ptr [R13 + 0x30],RAX MOVSXD RAX,dword ptr [RSP + 0x4] MOV qword ptr [R13 + 0x38],RAX MOVSXD RAX,dword ptr [RSP + 0x8] MOV qword ptr [R13 + 0x40],RAX MOVSXD RAX,dword ptr [RSP + 0xc] MOV qword ptr [R13 + 0x48],RAX MOV dword ptr [R13 + 0x50],0x23 MOV qword ptr [R13 + 0x98],R12 TEST R13,R13 JZ 0x0011de8e MOV dword ptr [R13 + 0x54],R15D MOV dword ptr [R13 + 0x58],R14D MOV dword ptr [R13 + 0x5c],EBP MOV dword ptr [R13 + 0x60],EBX MOV RAX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011dd64: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14ca47] MOV ESI,0xc85 JMP 0x0011dea8 LAB_0011dd83: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14ca6b] MOV ESI,0xc86 JMP 0x0011dea8 LAB_0011dda2: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14ca8f] MOV ESI,0xc87 JMP 0x0011dea8 LAB_0011ddc1: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cab3] MOV ESI,0xc88 JMP 0x0011dea8 LAB_0011dde0: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cad7] MOV ESI,0xc8a JMP 0x0011dea8 LAB_0011ddff: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cae6] MOV ESI,0xc8b JMP 0x0011dea8 LAB_0011de1e: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14caf5] MOV ESI,0xc8c JMP 0x0011dea8 LAB_0011de3a: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cb04] MOV ESI,0xc8d JMP 0x0011dea8 LAB_0011de56: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cb13] MOV ESI,0xc8e JMP 0x0011dea8 LAB_0011de72: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cb22] MOV ESI,0xc8f JMP 0x0011dea8 LAB_0011de8e: LEA RDI,[0x14e6c5] LEA RDX,[0x14c5c1] LEA RCX,[0x14e7f2] MOV ESI,0x70 LAB_0011dea8: XOR EAX,EAX CALL 0x00118ce0
long ggml_permute(int8 param_1,long param_2,uint param_3,uint param_4,uint param_5, uint param_6) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; int local_58 [4]; int local_48 [6]; if (param_3 < 4) { if (param_4 < 4) { if (param_5 < 4) { if (param_6 < 4) { if (param_3 == param_4) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis0 != axis1"; uVar3 = 0xc8a; } else if (param_3 == param_5) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis0 != axis2"; uVar3 = 0xc8b; } else if (param_3 == param_6) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis0 != axis3"; uVar3 = 0xc8c; } else if (param_4 == param_5) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis1 != axis2"; uVar3 = 0xc8d; } else if (param_4 == param_6) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis1 != axis3"; uVar3 = 0xc8e; } else if (param_5 == param_6) { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis2 != axis3"; uVar3 = 0xc8f; } else { lVar1 = ggml_view_tensor(); ggml_format_name(lVar1,"%s (permuted)",param_2 + 0x100); local_48[param_3] = *(int *)(param_2 + 0x10); local_48[param_4] = *(int *)(param_2 + 0x18); local_48[param_5] = *(int *)(param_2 + 0x20); local_48[param_6] = *(int *)(param_2 + 0x28); local_58[param_3] = *(int *)(param_2 + 0x30); local_58[param_4] = *(int *)(param_2 + 0x38); local_58[param_5] = *(int *)(param_2 + 0x40); local_58[param_6] = *(int *)(param_2 + 0x48); *(long *)(lVar1 + 0x10) = (long)local_48[0]; *(long *)(lVar1 + 0x18) = (long)local_48[1]; *(long *)(lVar1 + 0x20) = (long)local_48[2]; *(long *)(lVar1 + 0x28) = (long)local_48[3]; *(long *)(lVar1 + 0x30) = (long)local_58[0]; *(long *)(lVar1 + 0x38) = (long)local_58[1]; *(long *)(lVar1 + 0x40) = (long)local_58[2]; *(long *)(lVar1 + 0x48) = (long)local_58[3]; *(int4 *)(lVar1 + 0x50) = 0x23; *(long *)(lVar1 + 0x98) = param_2; if (lVar1 != 0) { *(uint *)(lVar1 + 0x54) = param_3; *(uint *)(lVar1 + 0x58) = param_4; *(uint *)(lVar1 + 0x5c) = param_5; *(uint *)(lVar1 + 0x60) = param_6; return lVar1; } pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h" ; pcVar2 = "tensor != NULL"; uVar3 = 0x70; } } else { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; uVar3 = 0xc88; } } else { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c" ; pcVar2 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; uVar3 = 0xc87; } } else { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; uVar3 = 0xc86; } } else { pcVar4 = "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c"; pcVar2 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; uVar3 = 0xc85; } /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
14,980
ggml_permute
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_permute( struct ggml_context * ctx, struct ggml_tensor * a, int axis0, int axis1, int axis2, int axis3) { GGML_ASSERT(axis0 >= 0 && axis0 < GGML_MAX_DIMS); GGML_ASSERT(axis1 >= 0 && axis1 < GGML_MAX_DIMS); GGML_ASSERT(axis2 >= 0 && axis2 < GGML_MAX_DIMS); GGML_ASSERT(axis3 >= 0 && axis3 < GGML_MAX_DIMS); GGML_ASSERT(axis0 != axis1); GGML_ASSERT(axis0 != axis2); GGML_ASSERT(axis0 != axis3); GGML_ASSERT(axis1 != axis2); GGML_ASSERT(axis1 != axis3); GGML_ASSERT(axis2 != axis3); struct ggml_tensor * result = ggml_view_tensor(ctx, a); ggml_format_name(result, "%s (permuted)", a->name); int ne[GGML_MAX_DIMS]; int nb[GGML_MAX_DIMS]; ne[axis0] = a->ne[0]; ne[axis1] = a->ne[1]; ne[axis2] = a->ne[2]; ne[axis3] = a->ne[3]; nb[axis0] = a->nb[0]; nb[axis1] = a->nb[1]; nb[axis2] = a->nb[2]; nb[axis3] = a->nb[3]; result->ne[0] = ne[0]; result->ne[1] = ne[1]; result->ne[2] = ne[2]; result->ne[3] = ne[3]; result->nb[0] = nb[0]; result->nb[1] = nb[1]; result->nb[2] = nb[2]; result->nb[3] = nb[3]; result->op = GGML_OP_PERMUTE; result->src[0] = a; int32_t params[] = { axis0, axis1, axis2, axis3 }; ggml_set_op_params(result, params, sizeof(params)); return result; }
O2
c
ggml_permute: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp cmpl $0x4, %edx jae 0x232bd movl %ecx, %r14d cmpl $0x4, %ecx jae 0x232dc movl %r8d, %ebp cmpl $0x4, %r8d jae 0x232fb movl %r9d, %ebx cmpl $0x4, %r9d jae 0x2331a movl %edx, %r15d cmpl %r14d, %edx je 0x23339 cmpl %ebp, %r15d je 0x23358 cmpl %ebx, %r15d je 0x23374 cmpl %ebp, %r14d je 0x23390 cmpl %ebx, %r14d je 0x233ac cmpl %ebx, %ebp je 0x233c8 movq %rsi, %r12 callq 0x1d410 movq %rax, %r13 leaq 0x100(%r12), %rdx leaq 0x2b97b(%rip), %rsi # 0x4eb45 movq %rax, %rdi xorl %eax, %eax callq 0x1f650 movl 0x10(%r12), %eax movl %r15d, %ecx movl %eax, 0x10(%rsp,%rcx,4) movl 0x18(%r12), %eax movl %r14d, %edx movl %eax, 0x10(%rsp,%rdx,4) movl 0x20(%r12), %eax movl %ebp, %esi movl %eax, 0x10(%rsp,%rsi,4) movl 0x28(%r12), %eax movl %ebx, %edi movl %eax, 0x10(%rsp,%rdi,4) movl 0x30(%r12), %eax movl %eax, (%rsp,%rcx,4) movl 0x38(%r12), %eax movl %eax, (%rsp,%rdx,4) movl 0x40(%r12), %eax movl %eax, (%rsp,%rsi,4) movl 0x48(%r12), %eax movl %eax, (%rsp,%rdi,4) movdqa 0x10(%rsp), %xmm0 pxor %xmm1, %xmm1 pxor %xmm2, %xmm2 pcmpgtd %xmm0, %xmm2 pshufd $0xee, %xmm0, %xmm3 # xmm3 = xmm0[2,3,2,3] punpckldq %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] pxor %xmm2, %xmm2 pcmpgtd %xmm3, %xmm2 punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1] movdqu %xmm3, 0x20(%r13) movdqu %xmm0, 0x10(%r13) movdqa (%rsp), %xmm0 pshufd $0xee, %xmm0, %xmm2 # xmm2 = xmm0[2,3,2,3] pxor %xmm3, %xmm3 pcmpgtd %xmm2, %xmm3 punpckldq %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] pcmpgtd %xmm0, %xmm1 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movdqu %xmm0, 0x30(%r13) movdqu %xmm2, 0x40(%r13) movl $0x23, 0x50(%r13) movq %r12, 0x98(%r13) leaq 0x20(%rsp), %rsi movl %r15d, (%rsi) movl %r14d, 0x4(%rsi) movl %ebp, 0x8(%rsi) movl %ebx, 0xc(%rsi) pushq $0x10 popq %rdx movq %r13, %rdi callq 0x2221d movq %r13, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2b2bf(%rip), %rdi # 0x4e583 leaq 0x2b30a(%rip), %rdx # 0x4e5d5 leaq 0x2b789(%rip), %rcx # 0x4ea5b movl $0xc85, %esi # imm = 0xC85 jmp 0x233e2 leaq 0x2b2a0(%rip), %rdi # 0x4e583 leaq 0x2b2eb(%rip), %rdx # 0x4e5d5 leaq 0x2b78e(%rip), %rcx # 0x4ea7f movl $0xc86, %esi # imm = 0xC86 jmp 0x233e2 leaq 0x2b281(%rip), %rdi # 0x4e583 leaq 0x2b2cc(%rip), %rdx # 0x4e5d5 leaq 0x2b793(%rip), %rcx # 0x4eaa3 movl $0xc87, %esi # imm = 0xC87 jmp 0x233e2 leaq 0x2b262(%rip), %rdi # 0x4e583 leaq 0x2b2ad(%rip), %rdx # 0x4e5d5 leaq 0x2b798(%rip), %rcx # 0x4eac7 movl $0xc88, %esi # imm = 0xC88 jmp 0x233e2 leaq 0x2b243(%rip), %rdi # 0x4e583 leaq 0x2b28e(%rip), %rdx # 0x4e5d5 leaq 0x2b79d(%rip), %rcx # 0x4eaeb movl $0xc8a, %esi # imm = 0xC8A jmp 0x233e2 leaq 0x2b224(%rip), %rdi # 0x4e583 leaq 0x2b26f(%rip), %rdx # 0x4e5d5 leaq 0x2b78d(%rip), %rcx # 0x4eafa movl $0xc8b, %esi # imm = 0xC8B jmp 0x233e2 leaq 0x2b208(%rip), %rdi # 0x4e583 leaq 0x2b253(%rip), %rdx # 0x4e5d5 leaq 0x2b780(%rip), %rcx # 0x4eb09 movl $0xc8c, %esi # imm = 0xC8C jmp 0x233e2 leaq 0x2b1ec(%rip), %rdi # 0x4e583 leaq 0x2b237(%rip), %rdx # 0x4e5d5 leaq 0x2b773(%rip), %rcx # 0x4eb18 movl $0xc8d, %esi # imm = 0xC8D jmp 0x233e2 leaq 0x2b1d0(%rip), %rdi # 0x4e583 leaq 0x2b21b(%rip), %rdx # 0x4e5d5 leaq 0x2b766(%rip), %rcx # 0x4eb27 movl $0xc8e, %esi # imm = 0xC8E jmp 0x233e2 leaq 0x2b1b4(%rip), %rdi # 0x4e583 leaq 0x2b1ff(%rip), %rdx # 0x4e5d5 leaq 0x2b759(%rip), %rcx # 0x4eb36 movl $0xc8f, %esi # imm = 0xC8F xorl %eax, %eax callq 0x1f9b0
ggml_permute: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h cmp edx, 4 jnb loc_232BD mov r14d, ecx cmp ecx, 4 jnb loc_232DC mov ebp, r8d cmp r8d, 4 jnb loc_232FB mov ebx, r9d cmp r9d, 4 jnb loc_2331A mov r15d, edx cmp edx, r14d jz loc_23339 cmp r15d, ebp jz loc_23358 cmp r15d, ebx jz loc_23374 cmp r14d, ebp jz loc_23390 cmp r14d, ebx jz loc_233AC cmp ebp, ebx jz loc_233C8 mov r12, rsi call _ggml_view_tensor mov r13, rax lea rdx, [r12+100h] lea rsi, aSPermuted; "%s (permuted)" mov rdi, rax xor eax, eax call _ggml_format_name mov eax, [r12+10h] mov ecx, r15d mov dword ptr [rsp+rcx*4+68h+var_58], eax mov eax, [r12+18h] mov edx, r14d mov dword ptr [rsp+rdx*4+68h+var_58], eax mov eax, [r12+20h] mov esi, ebp mov dword ptr [rsp+rsi*4+68h+var_58], eax mov eax, [r12+28h] mov edi, ebx mov dword ptr [rsp+rdi*4+68h+var_58], eax mov eax, [r12+30h] mov dword ptr [rsp+rcx*4+68h+var_68], eax mov eax, [r12+38h] mov dword ptr [rsp+rdx*4+68h+var_68], eax mov eax, [r12+40h] mov dword ptr [rsp+rsi*4+68h+var_68], eax mov eax, [r12+48h] mov dword ptr [rsp+rdi*4+68h+var_68], eax movdqa xmm0, [rsp+68h+var_58] pxor xmm1, xmm1 pxor xmm2, xmm2 pcmpgtd xmm2, xmm0 pshufd xmm3, xmm0, 0EEh punpckldq xmm0, xmm2 pxor xmm2, xmm2 pcmpgtd xmm2, xmm3 punpckldq xmm3, xmm2 movdqu xmmword ptr [r13+20h], xmm3 movdqu xmmword ptr [r13+10h], xmm0 movdqa xmm0, [rsp+68h+var_68] pshufd xmm2, xmm0, 0EEh pxor xmm3, xmm3 pcmpgtd xmm3, xmm2 punpckldq xmm2, xmm3 pcmpgtd xmm1, xmm0 punpckldq xmm0, xmm1 movdqu xmmword ptr [r13+30h], xmm0 movdqu xmmword ptr [r13+40h], xmm2 mov dword ptr [r13+50h], 23h ; '#' mov [r13+98h], r12 lea rsi, [rsp+68h+var_48] mov [rsi], r15d mov [rsi+4], r14d mov [rsi+8], ebp mov [rsi+0Ch], ebx push 10h pop rdx mov rdi, r13 call ggml_set_op_params mov rax, r13 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_232BD: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis00Axis0Ggm; "axis0 >= 0 && axis0 < GGML_MAX_DIMS" mov esi, 0C85h jmp loc_233E2 loc_232DC: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis10Axis1Ggm; "axis1 >= 0 && axis1 < GGML_MAX_DIMS" mov esi, 0C86h jmp loc_233E2 loc_232FB: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis20Axis2Ggm; "axis2 >= 0 && axis2 < GGML_MAX_DIMS" mov esi, 0C87h jmp loc_233E2 loc_2331A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis30Axis3Ggm; "axis3 >= 0 && axis3 < GGML_MAX_DIMS" mov esi, 0C88h jmp loc_233E2 loc_23339: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis1; "axis0 != axis1" mov esi, 0C8Ah jmp loc_233E2 loc_23358: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis2; "axis0 != axis2" mov esi, 0C8Bh jmp short loc_233E2 loc_23374: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis3; "axis0 != axis3" mov esi, 0C8Ch jmp short loc_233E2 loc_23390: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis2; "axis1 != axis2" mov esi, 0C8Dh jmp short loc_233E2 loc_233AC: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis3; "axis1 != axis3" mov esi, 0C8Eh jmp short loc_233E2 loc_233C8: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis2Axis3; "axis2 != axis3" mov esi, 0C8Fh loc_233E2: xor eax, eax call _ggml_abort
long long ggml_permute( long long a1, _DWORD *a2, unsigned int a3, unsigned int a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // ebp int v16; // ebx long long v18; // r13 __m128i v19; // xmm0 __m128i v20; // xmm3 __m128i v21; // xmm0 __m128i v22; // xmm2 __m128 v23; // xmm3 __m128 v24; // xmm2 __m128 v25; // xmm1 __m128 v26; // xmm0 long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 const char *v32; // rcx int v33; // esi __m128i v34; // [rsp+0h] [rbp-68h] BYREF __m128i v35; // [rsp+10h] [rbp-58h] BYREF _DWORD v36[18]; // [rsp+20h] [rbp-48h] BYREF if ( a3 >= 4 ) { v32 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; v33 = 3205; goto LABEL_22; } if ( a4 >= 4 ) { v32 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; v33 = 3206; goto LABEL_22; } v15 = a5; if ( (unsigned int)a5 >= 4 ) { v32 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; v33 = 3207; goto LABEL_22; } v16 = a6; if ( (unsigned int)a6 >= 4 ) { v32 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; v33 = 3208; goto LABEL_22; } if ( a3 == a4 ) { v32 = "axis0 != axis1"; v33 = 3210; goto LABEL_22; } if ( a3 == (_DWORD)a5 ) { v32 = "axis0 != axis2"; v33 = 3211; goto LABEL_22; } if ( a3 == (_DWORD)a6 ) { v32 = "axis0 != axis3"; v33 = 3212; goto LABEL_22; } if ( a4 == (_DWORD)a5 ) { v32 = "axis1 != axis2"; v33 = 3213; goto LABEL_22; } if ( a4 == (_DWORD)a6 ) { v32 = "axis1 != axis3"; v33 = 3214; goto LABEL_22; } if ( (_DWORD)a5 == (_DWORD)a6 ) { v32 = "axis2 != axis3"; v33 = 3215; LABEL_22: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v33, (long long)"GGML_ASSERT(%s) failed", (long long)v32, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v34.m128i_i8[0]); } v18 = ggml_view_tensor(a1, (long long)a2, a7, a8, a9, a10, a11, a12, a13, a14); ggml_format_name(v18, (long long)"%s (permuted)"); v35.m128i_i32[a3] = a2[4]; v35.m128i_i32[a4] = a2[6]; v35.m128i_i32[v15] = a2[8]; v35.m128i_i32[v16] = a2[10]; v34.m128i_i32[a3] = a2[12]; v34.m128i_i32[a4] = a2[14]; v34.m128i_i32[v15] = a2[16]; v34.m128i_i32[v16] = a2[18]; v19 = _mm_load_si128(&v35); v20 = _mm_shuffle_epi32(v19, 238); *(__m128i *)(v18 + 32) = _mm_unpacklo_epi32(v20, _mm_cmpgt_epi32((__m128i)0LL, v20)); *(__m128i *)(v18 + 16) = _mm_unpacklo_epi32(v19, _mm_cmpgt_epi32((__m128i)0LL, v19)); v21 = _mm_load_si128(&v34); v22 = _mm_shuffle_epi32(v21, 238); v23 = (__m128)_mm_cmpgt_epi32((__m128i)0LL, v22); v24 = (__m128)_mm_unpacklo_epi32(v22, (__m128i)v23); v25 = (__m128)_mm_cmpgt_epi32((__m128i)0LL, v21); v26 = (__m128)_mm_unpacklo_epi32(v21, (__m128i)v25); *(__m128 *)(v18 + 48) = v26; *(__m128 *)(v18 + 64) = v24; *(_DWORD *)(v18 + 80) = 35; *(_QWORD *)(v18 + 152) = a2; v36[0] = a3; v36[1] = a4; v36[2] = v15; v36[3] = v16; ggml_set_op_params(v18, (long long)v36, 16LL, v26, v25, v24, v23, v29, v30, a13, a14, a3, v27, v28); return v18; }
ggml_permute: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 CMP EDX,0x4 JNC 0x001232bd MOV R14D,ECX CMP ECX,0x4 JNC 0x001232dc MOV EBP,R8D CMP R8D,0x4 JNC 0x001232fb MOV EBX,R9D CMP R9D,0x4 JNC 0x0012331a MOV R15D,EDX CMP EDX,R14D JZ 0x00123339 CMP R15D,EBP JZ 0x00123358 CMP R15D,EBX JZ 0x00123374 CMP R14D,EBP JZ 0x00123390 CMP R14D,EBX JZ 0x001233ac CMP EBP,EBX JZ 0x001233c8 MOV R12,RSI CALL 0x0011d410 MOV R13,RAX LEA RDX,[R12 + 0x100] LEA RSI,[0x14eb45] MOV RDI,RAX XOR EAX,EAX CALL 0x0011f650 MOV EAX,dword ptr [R12 + 0x10] MOV ECX,R15D MOV dword ptr [RSP + RCX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x18] MOV EDX,R14D MOV dword ptr [RSP + RDX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x20] MOV ESI,EBP MOV dword ptr [RSP + RSI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x28] MOV EDI,EBX MOV dword ptr [RSP + RDI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x30] MOV dword ptr [RSP + RCX*0x4],EAX MOV EAX,dword ptr [R12 + 0x38] MOV dword ptr [RSP + RDX*0x4],EAX MOV EAX,dword ptr [R12 + 0x40] MOV dword ptr [RSP + RSI*0x4],EAX MOV EAX,dword ptr [R12 + 0x48] MOV dword ptr [RSP + RDI*0x4],EAX MOVDQA XMM0,xmmword ptr [RSP + 0x10] PXOR XMM1,XMM1 PXOR XMM2,XMM2 PCMPGTD XMM2,XMM0 PSHUFD XMM3,XMM0,0xee PUNPCKLDQ XMM0,XMM2 PXOR XMM2,XMM2 PCMPGTD XMM2,XMM3 PUNPCKLDQ XMM3,XMM2 MOVDQU xmmword ptr [R13 + 0x20],XMM3 MOVDQU xmmword ptr [R13 + 0x10],XMM0 MOVDQA XMM0,xmmword ptr [RSP] PSHUFD XMM2,XMM0,0xee PXOR XMM3,XMM3 PCMPGTD XMM3,XMM2 PUNPCKLDQ XMM2,XMM3 PCMPGTD XMM1,XMM0 PUNPCKLDQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x30],XMM0 MOVDQU xmmword ptr [R13 + 0x40],XMM2 MOV dword ptr [R13 + 0x50],0x23 MOV qword ptr [R13 + 0x98],R12 LEA RSI,[RSP + 0x20] MOV dword ptr [RSI],R15D MOV dword ptr [RSI + 0x4],R14D MOV dword ptr [RSI + 0x8],EBP MOV dword ptr [RSI + 0xc],EBX PUSH 0x10 POP RDX MOV RDI,R13 CALL 0x0012221d MOV RAX,R13 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001232bd: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14ea5b] MOV ESI,0xc85 JMP 0x001233e2 LAB_001232dc: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14ea7f] MOV ESI,0xc86 JMP 0x001233e2 LAB_001232fb: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eaa3] MOV ESI,0xc87 JMP 0x001233e2 LAB_0012331a: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eac7] MOV ESI,0xc88 JMP 0x001233e2 LAB_00123339: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eaeb] MOV ESI,0xc8a JMP 0x001233e2 LAB_00123358: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eafa] MOV ESI,0xc8b JMP 0x001233e2 LAB_00123374: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eb09] MOV ESI,0xc8c JMP 0x001233e2 LAB_00123390: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eb18] MOV ESI,0xc8d JMP 0x001233e2 LAB_001233ac: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eb27] MOV ESI,0xc8e JMP 0x001233e2 LAB_001233c8: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eb36] MOV ESI,0xc8f LAB_001233e2: XOR EAX,EAX CALL 0x0011f9b0
long ggml_permute(int8 param_1,long param_2,uint param_3,uint param_4,uint param_5, uint param_6) { long lVar1; char *pcVar2; int8 uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int4 local_68 [4]; int4 local_58 [4]; uint local_48; uint local_44; uint local_40; uint local_3c; if (param_3 < 4) { if (param_4 < 4) { if (param_5 < 4) { if (param_6 < 4) { if (param_3 == param_4) { pcVar2 = "axis0 != axis1"; uVar3 = 0xc8a; } else if (param_3 == param_5) { pcVar2 = "axis0 != axis2"; uVar3 = 0xc8b; } else if (param_3 == param_6) { pcVar2 = "axis0 != axis3"; uVar3 = 0xc8c; } else if (param_4 == param_5) { pcVar2 = "axis1 != axis2"; uVar3 = 0xc8d; } else if (param_4 == param_6) { pcVar2 = "axis1 != axis3"; uVar3 = 0xc8e; } else { if (param_5 != param_6) { lVar1 = ggml_view_tensor(); ggml_format_name(lVar1,"%s (permuted)",param_2 + 0x100); local_58[param_3] = *(int4 *)(param_2 + 0x10); local_58[param_4] = *(int4 *)(param_2 + 0x18); local_58[param_5] = *(int4 *)(param_2 + 0x20); local_58[param_6] = *(int4 *)(param_2 + 0x28); local_68[param_3] = *(int4 *)(param_2 + 0x30); local_68[param_4] = *(int4 *)(param_2 + 0x38); local_68[param_5] = *(int4 *)(param_2 + 0x40); local_68[param_6] = *(int4 *)(param_2 + 0x48); auVar7._0_8_ = local_58._8_8_; auVar4._0_8_ = local_58._0_8_; auVar4._8_4_ = local_58[1]; auVar4._12_4_ = -(uint)(local_58[1] < 0); auVar7._8_4_ = local_58[3]; auVar7._12_4_ = -(uint)(local_58[3] < 0); *(ulong *)(lVar1 + 0x20) = CONCAT44(-(uint)(local_58[2] < 0),local_58[2]); *(long *)(lVar1 + 0x28) = auVar7._8_8_; *(ulong *)(lVar1 + 0x10) = CONCAT44(-(uint)(local_58[0] < 0),local_58[0]); *(long *)(lVar1 + 0x18) = auVar4._8_8_; auVar6._0_8_ = local_68._8_8_; auVar6._8_4_ = local_68[3]; auVar6._12_4_ = -(uint)(local_68[3] < 0); auVar5._0_8_ = local_68._0_8_; auVar5._8_4_ = local_68[1]; auVar5._12_4_ = -(uint)(local_68[1] < 0); *(ulong *)(lVar1 + 0x30) = CONCAT44(-(uint)(local_68[0] < 0),local_68[0]); *(long *)(lVar1 + 0x38) = auVar5._8_8_; *(ulong *)(lVar1 + 0x40) = CONCAT44(-(uint)(local_68[2] < 0),local_68[2]); *(long *)(lVar1 + 0x48) = auVar6._8_8_; *(int4 *)(lVar1 + 0x50) = 0x23; *(long *)(lVar1 + 0x98) = param_2; local_48 = param_3; local_44 = param_4; local_40 = param_5; local_3c = param_6; ggml_set_op_params(lVar1,&local_48,0x10); return lVar1; } pcVar2 = "axis2 != axis3"; uVar3 = 0xc8f; } } else { pcVar2 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; uVar3 = 0xc88; } } else { pcVar2 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; uVar3 = 0xc87; } } else { pcVar2 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; uVar3 = 0xc86; } } else { pcVar2 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; uVar3 = 0xc85; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
14,981
ggml_permute
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_permute( struct ggml_context * ctx, struct ggml_tensor * a, int axis0, int axis1, int axis2, int axis3) { GGML_ASSERT(axis0 >= 0 && axis0 < GGML_MAX_DIMS); GGML_ASSERT(axis1 >= 0 && axis1 < GGML_MAX_DIMS); GGML_ASSERT(axis2 >= 0 && axis2 < GGML_MAX_DIMS); GGML_ASSERT(axis3 >= 0 && axis3 < GGML_MAX_DIMS); GGML_ASSERT(axis0 != axis1); GGML_ASSERT(axis0 != axis2); GGML_ASSERT(axis0 != axis3); GGML_ASSERT(axis1 != axis2); GGML_ASSERT(axis1 != axis3); GGML_ASSERT(axis2 != axis3); struct ggml_tensor * result = ggml_view_tensor(ctx, a); ggml_format_name(result, "%s (permuted)", a->name); int ne[GGML_MAX_DIMS]; int nb[GGML_MAX_DIMS]; ne[axis0] = a->ne[0]; ne[axis1] = a->ne[1]; ne[axis2] = a->ne[2]; ne[axis3] = a->ne[3]; nb[axis0] = a->nb[0]; nb[axis1] = a->nb[1]; nb[axis2] = a->nb[2]; nb[axis3] = a->nb[3]; result->ne[0] = ne[0]; result->ne[1] = ne[1]; result->ne[2] = ne[2]; result->ne[3] = ne[3]; result->nb[0] = nb[0]; result->nb[1] = nb[1]; result->nb[2] = nb[2]; result->nb[3] = nb[3]; result->op = GGML_OP_PERMUTE; result->src[0] = a; int32_t params[] = { axis0, axis1, axis2, axis3 }; ggml_set_op_params(result, params, sizeof(params)); return result; }
O3
c
ggml_permute: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpl $0x4, %edx jae 0x1ca86 movl %ecx, %r14d cmpl $0x4, %ecx jae 0x1caa5 movl %r8d, %ebp cmpl $0x4, %r8d jae 0x1cac4 movl %r9d, %ebx cmpl $0x4, %r9d jae 0x1cae3 movl %edx, %r15d cmpl %r14d, %edx je 0x1cb02 cmpl %ebp, %r15d je 0x1cb21 cmpl %ebx, %r15d je 0x1cb3d cmpl %ebp, %r14d je 0x1cb59 cmpl %ebx, %r14d je 0x1cb75 cmpl %ebx, %ebp je 0x1cb91 movq %rsi, %r12 callq 0x16260 movq %rax, %r13 leaq 0x100(%r12), %rdx leaq 0x30235(%rip), %rsi # 0x4cbd5 movq %rax, %rdi xorl %eax, %eax callq 0x17a60 movl 0x10(%r12), %eax movl %r15d, %ecx movl %eax, 0x10(%rsp,%rcx,4) movl 0x18(%r12), %eax movl %r14d, %edx movl %eax, 0x10(%rsp,%rdx,4) movl 0x20(%r12), %eax movl %ebp, %esi movl %eax, 0x10(%rsp,%rsi,4) movl 0x28(%r12), %eax movl %ebx, %edi movl %eax, 0x10(%rsp,%rdi,4) movl 0x30(%r12), %eax movl %eax, (%rsp,%rcx,4) movl 0x38(%r12), %eax movl %eax, (%rsp,%rdx,4) movl 0x40(%r12), %eax movl %eax, (%rsp,%rsi,4) movl 0x48(%r12), %eax movl %eax, (%rsp,%rdi,4) movdqa 0x10(%rsp), %xmm0 pxor %xmm1, %xmm1 pxor %xmm2, %xmm2 pcmpgtd %xmm0, %xmm2 pshufd $0xee, %xmm0, %xmm3 # xmm3 = xmm0[2,3,2,3] punpckldq %xmm2, %xmm0 # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1] pxor %xmm2, %xmm2 pcmpgtd %xmm3, %xmm2 punpckldq %xmm2, %xmm3 # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1] movdqu %xmm3, 0x20(%r13) movdqu %xmm0, 0x10(%r13) movdqa (%rsp), %xmm0 pshufd $0xee, %xmm0, %xmm2 # xmm2 = xmm0[2,3,2,3] pxor %xmm3, %xmm3 pcmpgtd %xmm2, %xmm3 punpckldq %xmm3, %xmm2 # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1] pcmpgtd %xmm0, %xmm1 punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movdqu %xmm0, 0x30(%r13) movdqu %xmm2, 0x40(%r13) movl $0x23, 0x50(%r13) movq %r12, 0x98(%r13) movl %r15d, 0x54(%r13) movl %r14d, 0x58(%r13) movl %ebp, 0x5c(%r13) movl %ebx, 0x60(%r13) movq %r13, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2fb86(%rip), %rdi # 0x4c613 leaq 0x2fbd1(%rip), %rdx # 0x4c665 leaq 0x30050(%rip), %rcx # 0x4caeb movl $0xc85, %esi # imm = 0xC85 jmp 0x1cbab leaq 0x2fb67(%rip), %rdi # 0x4c613 leaq 0x2fbb2(%rip), %rdx # 0x4c665 leaq 0x30055(%rip), %rcx # 0x4cb0f movl $0xc86, %esi # imm = 0xC86 jmp 0x1cbab leaq 0x2fb48(%rip), %rdi # 0x4c613 leaq 0x2fb93(%rip), %rdx # 0x4c665 leaq 0x3005a(%rip), %rcx # 0x4cb33 movl $0xc87, %esi # imm = 0xC87 jmp 0x1cbab leaq 0x2fb29(%rip), %rdi # 0x4c613 leaq 0x2fb74(%rip), %rdx # 0x4c665 leaq 0x3005f(%rip), %rcx # 0x4cb57 movl $0xc88, %esi # imm = 0xC88 jmp 0x1cbab leaq 0x2fb0a(%rip), %rdi # 0x4c613 leaq 0x2fb55(%rip), %rdx # 0x4c665 leaq 0x30064(%rip), %rcx # 0x4cb7b movl $0xc8a, %esi # imm = 0xC8A jmp 0x1cbab leaq 0x2faeb(%rip), %rdi # 0x4c613 leaq 0x2fb36(%rip), %rdx # 0x4c665 leaq 0x30054(%rip), %rcx # 0x4cb8a movl $0xc8b, %esi # imm = 0xC8B jmp 0x1cbab leaq 0x2facf(%rip), %rdi # 0x4c613 leaq 0x2fb1a(%rip), %rdx # 0x4c665 leaq 0x30047(%rip), %rcx # 0x4cb99 movl $0xc8c, %esi # imm = 0xC8C jmp 0x1cbab leaq 0x2fab3(%rip), %rdi # 0x4c613 leaq 0x2fafe(%rip), %rdx # 0x4c665 leaq 0x3003a(%rip), %rcx # 0x4cba8 movl $0xc8d, %esi # imm = 0xC8D jmp 0x1cbab leaq 0x2fa97(%rip), %rdi # 0x4c613 leaq 0x2fae2(%rip), %rdx # 0x4c665 leaq 0x3002d(%rip), %rcx # 0x4cbb7 movl $0xc8e, %esi # imm = 0xC8E jmp 0x1cbab leaq 0x2fa7b(%rip), %rdi # 0x4c613 leaq 0x2fac6(%rip), %rdx # 0x4c665 leaq 0x30020(%rip), %rcx # 0x4cbc6 movl $0xc8f, %esi # imm = 0xC8F xorl %eax, %eax callq 0x17cd0
ggml_permute: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp edx, 4 jnb loc_1CA86 mov r14d, ecx cmp ecx, 4 jnb loc_1CAA5 mov ebp, r8d cmp r8d, 4 jnb loc_1CAC4 mov ebx, r9d cmp r9d, 4 jnb loc_1CAE3 mov r15d, edx cmp edx, r14d jz loc_1CB02 cmp r15d, ebp jz loc_1CB21 cmp r15d, ebx jz loc_1CB3D cmp r14d, ebp jz loc_1CB59 cmp r14d, ebx jz loc_1CB75 cmp ebp, ebx jz loc_1CB91 mov r12, rsi call _ggml_view_tensor mov r13, rax lea rdx, [r12+100h] lea rsi, aSPermuted; "%s (permuted)" mov rdi, rax xor eax, eax call _ggml_format_name mov eax, [r12+10h] mov ecx, r15d mov dword ptr [rsp+rcx*4+58h+var_48], eax mov eax, [r12+18h] mov edx, r14d mov dword ptr [rsp+rdx*4+58h+var_48], eax mov eax, [r12+20h] mov esi, ebp mov dword ptr [rsp+rsi*4+58h+var_48], eax mov eax, [r12+28h] mov edi, ebx mov dword ptr [rsp+rdi*4+58h+var_48], eax mov eax, [r12+30h] mov dword ptr [rsp+rcx*4+58h+var_58], eax mov eax, [r12+38h] mov dword ptr [rsp+rdx*4+58h+var_58], eax mov eax, [r12+40h] mov dword ptr [rsp+rsi*4+58h+var_58], eax mov eax, [r12+48h] mov dword ptr [rsp+rdi*4+58h+var_58], eax movdqa xmm0, [rsp+58h+var_48] pxor xmm1, xmm1 pxor xmm2, xmm2 pcmpgtd xmm2, xmm0 pshufd xmm3, xmm0, 0EEh punpckldq xmm0, xmm2 pxor xmm2, xmm2 pcmpgtd xmm2, xmm3 punpckldq xmm3, xmm2 movdqu xmmword ptr [r13+20h], xmm3 movdqu xmmword ptr [r13+10h], xmm0 movdqa xmm0, [rsp+58h+var_58] pshufd xmm2, xmm0, 0EEh pxor xmm3, xmm3 pcmpgtd xmm3, xmm2 punpckldq xmm2, xmm3 pcmpgtd xmm1, xmm0 punpckldq xmm0, xmm1 movdqu xmmword ptr [r13+30h], xmm0 movdqu xmmword ptr [r13+40h], xmm2 mov dword ptr [r13+50h], 23h ; '#' mov [r13+98h], r12 mov [r13+54h], r15d mov [r13+58h], r14d mov [r13+5Ch], ebp mov [r13+60h], ebx mov rax, r13 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CA86: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis00Axis0Ggm; "axis0 >= 0 && axis0 < GGML_MAX_DIMS" mov esi, 0C85h jmp loc_1CBAB loc_1CAA5: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis10Axis1Ggm; "axis1 >= 0 && axis1 < GGML_MAX_DIMS" mov esi, 0C86h jmp loc_1CBAB loc_1CAC4: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis20Axis2Ggm; "axis2 >= 0 && axis2 < GGML_MAX_DIMS" mov esi, 0C87h jmp loc_1CBAB loc_1CAE3: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis30Axis3Ggm; "axis3 >= 0 && axis3 < GGML_MAX_DIMS" mov esi, 0C88h jmp loc_1CBAB loc_1CB02: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis1; "axis0 != axis1" mov esi, 0C8Ah jmp loc_1CBAB loc_1CB21: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis2; "axis0 != axis2" mov esi, 0C8Bh jmp short loc_1CBAB loc_1CB3D: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis0Axis3; "axis0 != axis3" mov esi, 0C8Ch jmp short loc_1CBAB loc_1CB59: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis2; "axis1 != axis2" mov esi, 0C8Dh jmp short loc_1CBAB loc_1CB75: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis1Axis3; "axis1 != axis3" mov esi, 0C8Eh jmp short loc_1CBAB loc_1CB91: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAxis2Axis3; "axis2 != axis3" mov esi, 0C8Fh loc_1CBAB: xor eax, eax call _ggml_abort
__m128i * ggml_permute( long long a1, _DWORD *a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, double a7) { __m128i *v11; // r13 __m128i v12; // xmm0 __m128i v13; // xmm3 __m128i v14; // xmm0 __m128i v15; // xmm2 const char *v17; // rcx int v18; // esi __m128i v19; // [rsp+0h] [rbp-58h] BYREF __m128i v20; // [rsp+10h] [rbp-48h] BYREF if ( a3 >= 4 ) { v17 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; v18 = 3205; goto LABEL_22; } if ( a4 >= 4 ) { v17 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; v18 = 3206; goto LABEL_22; } if ( a5 >= 4 ) { v17 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; v18 = 3207; goto LABEL_22; } if ( a6 >= 4 ) { v17 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; v18 = 3208; goto LABEL_22; } if ( a3 == a4 ) { v17 = "axis0 != axis1"; v18 = 3210; goto LABEL_22; } if ( a3 == a5 ) { v17 = "axis0 != axis2"; v18 = 3211; goto LABEL_22; } if ( a3 == a6 ) { v17 = "axis0 != axis3"; v18 = 3212; goto LABEL_22; } if ( a4 == a5 ) { v17 = "axis1 != axis2"; v18 = 3213; goto LABEL_22; } if ( a4 == a6 ) { v17 = "axis1 != axis3"; v18 = 3214; goto LABEL_22; } if ( a5 == a6 ) { v17 = "axis2 != axis3"; v18 = 3215; LABEL_22: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v18, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v17, a5, a6); } v11 = (__m128i *)ggml_view_tensor(a1, (long long)a2, a7); ggml_format_name((long long)v11, (long long)"%s (permuted)"); v20.m128i_i32[a3] = a2[4]; v20.m128i_i32[a4] = a2[6]; v20.m128i_i32[a5] = a2[8]; v20.m128i_i32[a6] = a2[10]; v19.m128i_i32[a3] = a2[12]; v19.m128i_i32[a4] = a2[14]; v19.m128i_i32[a5] = a2[16]; v19.m128i_i32[a6] = a2[18]; v12 = _mm_load_si128(&v20); v13 = _mm_shuffle_epi32(v12, 238); v11[2] = _mm_unpacklo_epi32(v13, _mm_cmpgt_epi32((__m128i)0LL, v13)); v11[1] = _mm_unpacklo_epi32(v12, _mm_cmpgt_epi32((__m128i)0LL, v12)); v14 = _mm_load_si128(&v19); v15 = _mm_shuffle_epi32(v14, 238); v11[3] = _mm_unpacklo_epi32(v14, _mm_cmpgt_epi32((__m128i)0LL, v14)); v11[4] = _mm_unpacklo_epi32(v15, _mm_cmpgt_epi32((__m128i)0LL, v15)); v11[5].m128i_i32[0] = 35; v11[9].m128i_i64[1] = (long long)a2; v11[5].m128i_i32[1] = a3; v11[5].m128i_i32[2] = a4; v11[5].m128i_i32[3] = a5; v11[6].m128i_i32[0] = a6; return v11; }
ggml_permute: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP EDX,0x4 JNC 0x0011ca86 MOV R14D,ECX CMP ECX,0x4 JNC 0x0011caa5 MOV EBP,R8D CMP R8D,0x4 JNC 0x0011cac4 MOV EBX,R9D CMP R9D,0x4 JNC 0x0011cae3 MOV R15D,EDX CMP EDX,R14D JZ 0x0011cb02 CMP R15D,EBP JZ 0x0011cb21 CMP R15D,EBX JZ 0x0011cb3d CMP R14D,EBP JZ 0x0011cb59 CMP R14D,EBX JZ 0x0011cb75 CMP EBP,EBX JZ 0x0011cb91 MOV R12,RSI CALL 0x00116260 MOV R13,RAX LEA RDX,[R12 + 0x100] LEA RSI,[0x14cbd5] MOV RDI,RAX XOR EAX,EAX CALL 0x00117a60 MOV EAX,dword ptr [R12 + 0x10] MOV ECX,R15D MOV dword ptr [RSP + RCX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x18] MOV EDX,R14D MOV dword ptr [RSP + RDX*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x20] MOV ESI,EBP MOV dword ptr [RSP + RSI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x28] MOV EDI,EBX MOV dword ptr [RSP + RDI*0x4 + 0x10],EAX MOV EAX,dword ptr [R12 + 0x30] MOV dword ptr [RSP + RCX*0x4],EAX MOV EAX,dword ptr [R12 + 0x38] MOV dword ptr [RSP + RDX*0x4],EAX MOV EAX,dword ptr [R12 + 0x40] MOV dword ptr [RSP + RSI*0x4],EAX MOV EAX,dword ptr [R12 + 0x48] MOV dword ptr [RSP + RDI*0x4],EAX MOVDQA XMM0,xmmword ptr [RSP + 0x10] PXOR XMM1,XMM1 PXOR XMM2,XMM2 PCMPGTD XMM2,XMM0 PSHUFD XMM3,XMM0,0xee PUNPCKLDQ XMM0,XMM2 PXOR XMM2,XMM2 PCMPGTD XMM2,XMM3 PUNPCKLDQ XMM3,XMM2 MOVDQU xmmword ptr [R13 + 0x20],XMM3 MOVDQU xmmword ptr [R13 + 0x10],XMM0 MOVDQA XMM0,xmmword ptr [RSP] PSHUFD XMM2,XMM0,0xee PXOR XMM3,XMM3 PCMPGTD XMM3,XMM2 PUNPCKLDQ XMM2,XMM3 PCMPGTD XMM1,XMM0 PUNPCKLDQ XMM0,XMM1 MOVDQU xmmword ptr [R13 + 0x30],XMM0 MOVDQU xmmword ptr [R13 + 0x40],XMM2 MOV dword ptr [R13 + 0x50],0x23 MOV qword ptr [R13 + 0x98],R12 MOV dword ptr [R13 + 0x54],R15D MOV dword ptr [R13 + 0x58],R14D MOV dword ptr [R13 + 0x5c],EBP MOV dword ptr [R13 + 0x60],EBX MOV RAX,R13 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011ca86: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14caeb] MOV ESI,0xc85 JMP 0x0011cbab LAB_0011caa5: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb0f] MOV ESI,0xc86 JMP 0x0011cbab LAB_0011cac4: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb33] MOV ESI,0xc87 JMP 0x0011cbab LAB_0011cae3: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb57] MOV ESI,0xc88 JMP 0x0011cbab LAB_0011cb02: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb7b] MOV ESI,0xc8a JMP 0x0011cbab LAB_0011cb21: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb8a] MOV ESI,0xc8b JMP 0x0011cbab LAB_0011cb3d: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cb99] MOV ESI,0xc8c JMP 0x0011cbab LAB_0011cb59: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cba8] MOV ESI,0xc8d JMP 0x0011cbab LAB_0011cb75: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cbb7] MOV ESI,0xc8e JMP 0x0011cbab LAB_0011cb91: LEA RDI,[0x14c613] LEA RDX,[0x14c665] LEA RCX,[0x14cbc6] MOV ESI,0xc8f LAB_0011cbab: XOR EAX,EAX CALL 0x00117cd0
long ggml_permute(int8 param_1,long param_2,uint param_3,uint param_4,uint param_5, uint param_6) { long lVar1; char *pcVar2; int8 uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int4 local_58 [4]; int4 local_48 [6]; if (param_3 < 4) { if (param_4 < 4) { if (param_5 < 4) { if (param_6 < 4) { if (param_3 == param_4) { pcVar2 = "axis0 != axis1"; uVar3 = 0xc8a; } else if (param_3 == param_5) { pcVar2 = "axis0 != axis2"; uVar3 = 0xc8b; } else if (param_3 == param_6) { pcVar2 = "axis0 != axis3"; uVar3 = 0xc8c; } else if (param_4 == param_5) { pcVar2 = "axis1 != axis2"; uVar3 = 0xc8d; } else if (param_4 == param_6) { pcVar2 = "axis1 != axis3"; uVar3 = 0xc8e; } else { if (param_5 != param_6) { lVar1 = ggml_view_tensor(); ggml_format_name(lVar1,"%s (permuted)",param_2 + 0x100); local_48[param_3] = *(int4 *)(param_2 + 0x10); local_48[param_4] = *(int4 *)(param_2 + 0x18); local_48[param_5] = *(int4 *)(param_2 + 0x20); local_48[param_6] = *(int4 *)(param_2 + 0x28); local_58[param_3] = *(int4 *)(param_2 + 0x30); local_58[param_4] = *(int4 *)(param_2 + 0x38); local_58[param_5] = *(int4 *)(param_2 + 0x40); local_58[param_6] = *(int4 *)(param_2 + 0x48); auVar7._0_8_ = SUB168(local_48._0_16_,8); auVar4._0_8_ = SUB168(local_48._0_16_,0); auVar4._8_4_ = SUB164(local_48._0_16_,4); auVar4._12_4_ = -(uint)(SUB164(local_48._0_16_,4) < 0); auVar7._8_4_ = SUB164(local_48._0_16_,0xc); auVar7._12_4_ = -(uint)(SUB164(local_48._0_16_,0xc) < 0); *(ulong *)(lVar1 + 0x20) = CONCAT44(-(uint)(SUB164(local_48._0_16_,8) < 0),SUB164(local_48._0_16_,8)); *(long *)(lVar1 + 0x28) = auVar7._8_8_; *(ulong *)(lVar1 + 0x10) = CONCAT44(-(uint)(SUB164(local_48._0_16_,0) < 0),SUB164(local_48._0_16_,0)); *(long *)(lVar1 + 0x18) = auVar4._8_8_; auVar6._0_8_ = local_58._8_8_; auVar6._8_4_ = local_58[3]; auVar6._12_4_ = -(uint)(local_58[3] < 0); auVar5._0_8_ = local_58._0_8_; auVar5._8_4_ = local_58[1]; auVar5._12_4_ = -(uint)(local_58[1] < 0); *(ulong *)(lVar1 + 0x30) = CONCAT44(-(uint)(local_58[0] < 0),local_58[0]); *(long *)(lVar1 + 0x38) = auVar5._8_8_; *(ulong *)(lVar1 + 0x40) = CONCAT44(-(uint)(local_58[2] < 0),local_58[2]); *(long *)(lVar1 + 0x48) = auVar6._8_8_; *(int4 *)(lVar1 + 0x50) = 0x23; *(long *)(lVar1 + 0x98) = param_2; *(uint *)(lVar1 + 0x54) = param_3; *(uint *)(lVar1 + 0x58) = param_4; *(uint *)(lVar1 + 0x5c) = param_5; *(uint *)(lVar1 + 0x60) = param_6; return lVar1; } pcVar2 = "axis2 != axis3"; uVar3 = 0xc8f; } } else { pcVar2 = "axis3 >= 0 && axis3 < GGML_MAX_DIMS"; uVar3 = 0xc88; } } else { pcVar2 = "axis2 >= 0 && axis2 < GGML_MAX_DIMS"; uVar3 = 0xc87; } } else { pcVar2 = "axis1 >= 0 && axis1 < GGML_MAX_DIMS"; uVar3 = 0xc86; } } else { pcVar2 = "axis0 >= 0 && axis0 < GGML_MAX_DIMS"; uVar3 = 0xc85; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
14,982
js_create_map_iterator
bluesky950520[P]quickjs/quickjs.c
static JSValue js_create_map_iterator(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSIteratorKindEnum kind; JSMapState *s; JSMapIteratorData *it; JSValue enum_obj; kind = magic >> 2; magic &= 3; s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); if (!s) return JS_EXCEPTION; enum_obj = JS_NewObjectClass(ctx, JS_CLASS_MAP_ITERATOR + magic); if (JS_IsException(enum_obj)) goto fail; it = js_malloc(ctx, sizeof(*it)); if (!it) { JS_FreeValue(ctx, enum_obj); goto fail; } it->obj = js_dup(this_val); it->kind = kind; it->cur_record = NULL; JS_SetOpaqueInternal(enum_obj, it); return enum_obj; fail: return JS_EXCEPTION; }
O1
c
js_create_map_iterator: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %ebx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl %r9d, %r12d andl $0x3, %r12d leal 0x23(%r12), %ecx callq 0x269a1 testq %rax, %rax je 0x4f3ed addl $0x2a, %r12d movq 0x40(%r13), %rax movl %r12d, %ecx shll $0x4, %ecx movq (%rax,%rcx), %rsi movq 0x8(%rax,%rcx), %rdx movq %r13, %rdi movl %r12d, %ecx callq 0x202f1 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x4f40c xorl %eax, %eax xorl %ecx, %ecx movl $0x6, %r12d orq %rcx, %rax movq %r12, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbp movl $0x20, %esi movq %r13, %rdi callq 0xed5d testq %rax, %rax je 0x4f45e sarl $0x2, %ebx movq %r15, (%rsp) cmpl $-0x9, %r14d jb 0x4f434 movq (%rsp), %rcx incl (%rcx) movq %r15, (%rax) movq %r14, 0x8(%rax) movl %ebx, 0x10(%rax) movq $0x0, 0x18(%rax) movq %rax, 0x30(%rbp) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbp, %rcx andq %rax, %rcx movl %ebp, %eax jmp 0x4f3f7 movq 0x18(%r13), %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x1ccb2 jmp 0x4f3ed
js_create_map_iterator: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, r9d mov r14, rdx mov r15, rsi mov r13, rdi mov r12d, r9d and r12d, 3 lea ecx, [r12+23h] call JS_GetOpaque2 test rax, rax jz short loc_4F3ED add r12d, 2Ah ; '*' mov rax, [r13+40h] mov ecx, r12d shl ecx, 4 mov rsi, [rax+rcx] mov rdx, [rax+rcx+8] mov rdi, r13 mov ecx, r12d call JS_NewObjectProtoClass mov r12, rdx cmp r12d, 6 jnz short loc_4F40C loc_4F3ED: xor eax, eax xor ecx, ecx mov r12d, 6 loc_4F3F7: or rax, rcx mov rdx, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4F40C: mov rbp, rax mov esi, 20h ; ' ' mov rdi, r13 call js_malloc test rax, rax jz short loc_4F45E sar ebx, 2 mov [rsp+38h+var_38], r15 cmp r14d, 0FFFFFFF7h jb short loc_4F434 mov rcx, [rsp+38h+var_38] inc dword ptr [rcx] loc_4F434: mov [rax], r15 mov [rax+8], r14 mov [rax+10h], ebx mov qword ptr [rax+18h], 0 mov [rbp+30h], rax mov rax, 0FFFFFFFF00000000h mov rcx, rbp and rcx, rax mov eax, ebp jmp short loc_4F3F7 loc_4F45E: mov rdi, [r13+18h] mov rsi, rbp mov rdx, r12 call JS_FreeValueRT jmp loc_4F3ED
unsigned long long js_create_map_iterator(long long a1, _DWORD *a2, long long a3, long long a4, long long a5, int a6) { int v8; // r12d long long v9; // rax long long v10; // rdx long long v11; // r12 long long v12; // rax unsigned long long v13; // rcx long long v15; // rbp long long v16; // rax int v17; // ebx v8 = a6 & 3; if ( !JS_GetOpaque2(a1, (long long)a2, a3, v8 + 35) ) goto LABEL_3; v9 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + (unsigned int)(16 * (v8 + 42))), *(_QWORD *)(*(_QWORD *)(a1 + 64) + (unsigned int)(16 * (v8 + 42)) + 8LL), v8 + 42); v11 = v10; if ( (_DWORD)v10 == 6 ) goto LABEL_3; v15 = v9; v16 = js_malloc(a1, 32LL); if ( !v16 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v15, v11); LABEL_3: v12 = 0LL; v13 = 0LL; return v13 | v12; } v17 = a6 >> 2; if ( (unsigned int)a3 >= 0xFFFFFFF7 ) ++*a2; *(_QWORD *)v16 = a2; *(_QWORD *)(v16 + 8) = a3; *(_DWORD *)(v16 + 16) = v17; *(_QWORD *)(v16 + 24) = 0LL; *(_QWORD *)(v15 + 48) = v16; v13 = v15 & 0xFFFFFFFF00000000LL; v12 = (unsigned int)v15; return v13 | v12; }
js_create_map_iterator: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,R9D MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV R12D,R9D AND R12D,0x3 LEA ECX,[R12 + 0x23] CALL 0x001269a1 TEST RAX,RAX JZ 0x0014f3ed ADD R12D,0x2a MOV RAX,qword ptr [R13 + 0x40] MOV ECX,R12D SHL ECX,0x4 MOV RSI,qword ptr [RAX + RCX*0x1] MOV RDX,qword ptr [RAX + RCX*0x1 + 0x8] MOV RDI,R13 MOV ECX,R12D CALL 0x001202f1 MOV R12,RDX CMP R12D,0x6 JNZ 0x0014f40c LAB_0014f3ed: XOR EAX,EAX XOR ECX,ECX MOV R12D,0x6 LAB_0014f3f7: OR RAX,RCX MOV RDX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014f40c: MOV RBP,RAX MOV ESI,0x20 MOV RDI,R13 CALL 0x0010ed5d TEST RAX,RAX JZ 0x0014f45e SAR EBX,0x2 MOV qword ptr [RSP],R15 CMP R14D,-0x9 JC 0x0014f434 MOV RCX,qword ptr [RSP] INC dword ptr [RCX] LAB_0014f434: MOV qword ptr [RAX],R15 MOV qword ptr [RAX + 0x8],R14 MOV dword ptr [RAX + 0x10],EBX MOV qword ptr [RAX + 0x18],0x0 MOV qword ptr [RBP + 0x30],RAX MOV RAX,-0x100000000 MOV RCX,RBP AND RCX,RAX MOV EAX,EBP JMP 0x0014f3f7 LAB_0014f45e: MOV RDI,qword ptr [R13 + 0x18] MOV RSI,RBP MOV RDX,R12 CALL 0x0011ccb2 JMP 0x0014f3ed
int1 [16] js_create_map_iterator (long param_1,int *param_2,int8 param_3,int8 param_4,int8 param_5, uint param_6) { long lVar1; ulong uVar2; int8 *puVar3; ulong uVar4; int iVar5; int8 uVar6; int1 auVar7 [16]; lVar1 = JS_GetOpaque2(); if (lVar1 != 0) { iVar5 = (param_6 & 3) + 0x2a; uVar2 = (ulong)(uint)(iVar5 * 0x10); auVar7 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + uVar2), *(int8 *)(*(long *)(param_1 + 0x40) + 8 + uVar2),iVar5); uVar6 = auVar7._8_8_; uVar2 = auVar7._0_8_; if (auVar7._8_4_ != 6) { puVar3 = (int8 *)js_malloc(param_1,0x20); if (puVar3 != (int8 *)0x0) { if (0xfffffff6 < (uint)param_3) { *param_2 = *param_2 + 1; } *puVar3 = param_2; puVar3[1] = param_3; *(int *)(puVar3 + 2) = (int)param_6 >> 2; puVar3[3] = 0; *(int8 **)(uVar2 + 0x30) = puVar3; uVar4 = uVar2 & 0xffffffff00000000; uVar2 = uVar2 & 0xffffffff; goto LAB_0014f3f7; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar6); } } uVar2 = 0; uVar4 = 0; uVar6 = 6; LAB_0014f3f7: auVar7._0_8_ = uVar2 | uVar4; auVar7._8_8_ = uVar6; return auVar7; }
14,983
list_reverse
eloqsql/mysys/list.c
LIST *list_reverse(LIST *root) { LIST *last; last=root; while (root) { last=root; root=root->next; last->next=last->prev; last->prev=root; } return last; }
O3
c
list_reverse: testq %rdi, %rdi je 0x9827a pushq %rbp movq %rsp, %rbp movq %rdi, %rax movq (%rdi), %rcx movq 0x8(%rdi), %rdi movq %rcx, 0x8(%rax) movq %rdi, (%rax) testq %rdi, %rdi jne 0x98262 popq %rbp retq xorl %eax, %eax retq
list_reverse: test rdi, rdi jz short loc_9827A push rbp mov rbp, rsp loc_98262: mov rax, rdi mov rcx, [rdi] mov rdi, [rdi+8] mov [rax+8], rcx mov [rax], rdi test rdi, rdi jnz short loc_98262 pop rbp retn loc_9827A: xor eax, eax retn
_QWORD * list_reverse(_QWORD *a1) { _QWORD *result; // rax long long v2; // rcx if ( !a1 ) return 0LL; do { result = a1; v2 = *a1; a1 = (_QWORD *)a1[1]; result[1] = v2; *result = a1; } while ( a1 ); return result; }
list_reverse: TEST RDI,RDI JZ 0x0019827a PUSH RBP MOV RBP,RSP LAB_00198262: MOV RAX,RDI MOV RCX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX],RDI TEST RDI,RDI JNZ 0x00198262 POP RBP RET LAB_0019827a: XOR EAX,EAX RET
int8 * list_reverse(int8 *param_1) { int8 *puVar1; int8 *puVar2; if (param_1 == (int8 *)0x0) { return (int8 *)0x0; } do { puVar2 = param_1; puVar1 = (int8 *)param_1[1]; param_1[1] = *param_1; *param_1 = puVar1; param_1 = puVar1; } while (puVar1 != (int8 *)0x0); return puVar2; }
14,984
mthd_supported_buffer_type
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_supported_buffer_type(enum enum_field_types type) { switch (type) { case MYSQL_TYPE_BIT: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_NEWDECIMAL: case MYSQL_TYPE_NULL: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_STRING: case MYSQL_TYPE_JSON: case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TINY: case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_YEAR: return 1; break; default: return 0; break; } }
O3
c
mthd_supported_buffer_type: pushq %rbp movq %rsp, %rbp movb $0x1, %al cmpl $0x10, %edi ja 0x26fd6 cmpl $0xf, %edi jne 0x26feb addl $0xffffff0b, %edi # imm = 0xFFFFFF0B cmpl $0xa, %edi ja 0x26fed movl $0x7f3, %ecx # imm = 0x7F3 btl %edi, %ecx jae 0x26fed popq %rbp retq xorl %eax, %eax jmp 0x26feb
mthd_supported_buffer_type: push rbp mov rbp, rsp mov al, 1 cmp edi, 10h ja short loc_26FD6 cmp edi, 0Fh jnz short loc_26FEB loc_26FD6: add edi, 0FFFFFF0Bh cmp edi, 0Ah ja short loc_26FED mov ecx, 7F3h bt ecx, edi jnb short loc_26FED loc_26FEB: pop rbp retn loc_26FED: xor eax, eax jmp short loc_26FEB
char mthd_supported_buffer_type(unsigned int a1) { char result; // al unsigned int v2; // edi int v3; // ecx result = 1; if ( a1 > 0x10 || a1 == 15 ) { v2 = a1 - 245; if ( v2 > 0xA ) return 0; v3 = 2035; if ( !_bittest(&v3, v2) ) return 0; } return result; }
mthd_supported_buffer_type: PUSH RBP MOV RBP,RSP MOV AL,0x1 CMP EDI,0x10 JA 0x00126fd6 CMP EDI,0xf JNZ 0x00126feb LAB_00126fd6: ADD EDI,0xffffff0b CMP EDI,0xa JA 0x00126fed MOV ECX,0x7f3 BT ECX,EDI JNC 0x00126fed LAB_00126feb: POP RBP RET LAB_00126fed: XOR EAX,EAX JMP 0x00126feb
int8 mthd_supported_buffer_type(uint param_1) { int8 uVar1; uVar1 = 1; if (((0x10 < param_1) || (param_1 == 0xf)) && ((10 < param_1 - 0xf5 || ((0x7f3U >> (param_1 - 0xf5 & 0x1f) & 1) == 0)))) { uVar1 = 0; } return uVar1; }
14,985
stbi_is_16_bit_from_callbacks
llama.cpp/examples/llava/../../common/stb_image.h
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) { s->io = *c; s->io_user_data = user; s->buflen = sizeof(s->buffer_start); s->read_from_callbacks = 1; s->callback_already_read = 0; s->img_buffer = s->img_buffer_original = s->buffer_start; stbi__refill_buffer(s); s->img_buffer_original_end = s->img_buffer_end; }
O3
c
stbi_is_16_bit_from_callbacks: pushq %rbx subq $0xe0, %rsp movq 0x10(%rdi), %rax leaq 0x38(%rsp), %rcx movq %rax, -0x18(%rcx) movups (%rdi), %xmm0 movups %xmm0, -0x28(%rcx) movq %rsi, -0x10(%rcx) movabsq $0x8000000001, %rax # imm = 0x8000000001 movq %rax, -0x8(%rcx) movl $0x0, 0x80(%rcx) movq %rcx, 0x98(%rcx) movq %rcx, 0x88(%rcx) movq %rsp, %rbx movq %rbx, %rdi callq 0x2fe81 movq 0xc8(%rbx), %rax movq %rax, 0xd8(%rbx) movq %rbx, %rdi callq 0x23fb4 addq $0xe0, %rsp popq %rbx retq
stbi_is_16_bit_from_callbacks: push rbx sub rsp, 0E0h mov rax, [rdi+10h] lea rcx, [rsp+0E8h+var_B0] mov [rcx-18h], rax movups xmm0, xmmword ptr [rdi] movups xmmword ptr [rcx-28h], xmm0 mov [rcx-10h], rsi mov rax, 8000000001h mov [rcx-8], rax mov dword ptr [rcx+80h], 0 mov [rcx+98h], rcx mov [rcx+88h], rcx mov rbx, rsp mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C8h] mov [rbx+0D8h], rax mov rdi, rbx call _ZL16stbi__is_16_mainP13stbi__context; stbi__is_16_main(stbi__context *) add rsp, 0E0h pop rbx retn
_BOOL8 stbi_is_16_bit_from_callbacks(long long a1, long long a2) { _OWORD v3[2]; // [rsp+0h] [rbp-E8h] BYREF long long v4; // [rsp+20h] [rbp-C8h] long long v5; // [rsp+28h] [rbp-C0h] long long v6; // [rsp+30h] [rbp-B8h] _BYTE v7[128]; // [rsp+38h] [rbp-B0h] BYREF int v8; // [rsp+B8h] [rbp-30h] _BYTE *v9; // [rsp+C0h] [rbp-28h] long long v10; // [rsp+C8h] [rbp-20h] _BYTE *v11; // [rsp+D0h] [rbp-18h] long long v12; // [rsp+D8h] [rbp-10h] v4 = *(_QWORD *)(a1 + 16); v3[1] = *(_OWORD *)a1; v5 = a2; v6 = 0x8000000001LL; v8 = 0; v11 = v7; v9 = v7; stbi__refill_buffer(v3); v12 = v10; return stbi__is_16_main((long long)v3); }
stbi_is_16_bit_from_callbacks: PUSH RBX SUB RSP,0xe0 MOV RAX,qword ptr [RDI + 0x10] LEA RCX,[RSP + 0x38] MOV qword ptr [RCX + -0x18],RAX MOVUPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RCX + -0x28],XMM0 MOV qword ptr [RCX + -0x10],RSI MOV RAX,0x8000000001 MOV qword ptr [RCX + -0x8],RAX MOV dword ptr [RCX + 0x80],0x0 MOV qword ptr [RCX + 0x98],RCX MOV qword ptr [RCX + 0x88],RCX MOV RBX,RSP MOV RDI,RBX CALL 0x0012fe81 MOV RAX,qword ptr [RBX + 0xc8] MOV qword ptr [RBX + 0xd8],RAX MOV RDI,RBX CALL 0x00123fb4 ADD RSP,0xe0 POP RBX RET
void stbi_is_16_bit_from_callbacks(int8 *param_1,int8 param_2) { stbi__context asStack_e8 [16]; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 local_c0; int8 local_b8; int1 local_b0 [128]; int4 local_30; int1 *local_28; int8 local_20; int1 *local_18; int8 local_10; local_c8 = param_1[2]; local_28 = local_b0; local_d8 = *param_1; uStack_d0 = param_1[1]; local_b8 = 0x8000000001; local_30 = 0; local_c0 = param_2; local_18 = local_28; stbi__refill_buffer(asStack_e8); local_10 = local_20; stbi__is_16_main(asStack_e8); return; }
14,986
my_thread_global_reinit
eloqsql/mysys/my_thr_init.c
void my_thread_global_reinit(void) { struct st_my_thread_var *tmp; DBUG_ASSERT(my_thread_global_init_done); #ifdef HAVE_PSI_INTERFACE my_init_mysys_psi_keys(); #endif my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); tmp= my_thread_var; DBUG_ASSERT(tmp); my_thread_destory_thr_mutex(tmp); my_thread_init_thr_mutex(tmp); }
O3
c
my_thread_global_reinit: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax callq 0x9f80b callq 0xa17bc callq 0xa19f6 callq 0xa191f callq 0xa1b83 leaq 0xb66b5e(%rip), %rax # 0xc08534 movl (%rax), %edi callq 0x29840 movq %rax, %rbx movq %rax, %rdi callq 0xa1c45 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0xa1caf
my_thread_global_reinit: push rbp mov rbp, rsp push rbx push rax call my_init_mysys_psi_keys call my_thread_destroy_common_mutex call my_thread_init_common_mutex call my_thread_destroy_internal_mutex call my_thread_init_internal_mutex lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_getspecific mov rbx, rax mov rdi, rax call my_thread_destory_thr_mutex mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp my_thread_init_thr_mutex
long long my_thread_global_reinit(long long a1) { long long v1; // rbx my_init_mysys_psi_keys(a1); my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); v1 = pthread_getspecific(THR_KEY_mysys); my_thread_destory_thr_mutex(v1); return my_thread_init_thr_mutex(v1); }
my_thread_global_reinit: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CALL 0x0019f80b CALL 0x001a17bc CALL 0x001a19f6 CALL 0x001a191f CALL 0x001a1b83 LEA RAX,[0xd08534] MOV EDI,dword ptr [RAX] CALL 0x00129840 MOV RBX,RAX MOV RDI,RAX CALL 0x001a1c45 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001a1caf
void my_thread_global_reinit(void) { void *pvVar1; my_init_mysys_psi_keys(); my_thread_destroy_common_mutex(); my_thread_init_common_mutex(); my_thread_destroy_internal_mutex(); my_thread_init_internal_mutex(); pvVar1 = pthread_getspecific(THR_KEY_mysys); my_thread_destory_thr_mutex(pvVar1); my_thread_init_thr_mutex(pvVar1); return; }
14,987
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<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::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O1
cpp
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<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::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x4326e movq %r14, %rdi movl $0x1, %esi callq 0x4326e movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x54252 movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x4326e movq %r14, %rdi callq 0x501da movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x53889 callq 0x35448 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x53898 callq 0x35448 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x538a7 callq 0x35448 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x538dd movq 0x926e0(%rip), %rax # 0xe5f98 cmpb $0x0, (%rax) je 0x538c8 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x538d2 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x538dd movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x431e2 movq %rbx, %rdi callq 0x1ad30 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 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) 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) mov rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+68h+var_30] test rdi, rdi jz short loc_53889 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_53889: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_53898 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_53898: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_538A7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_538A7: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_538DD mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_538C8 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_538D2 loc_538C8: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_538D2: cmp eax, 1 jnz short loc_538DD mov rax, [rdi] call qword ptr [rax+18h] loc_538DD: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] __int128 v8; // [rsp+20h] [rbp-48h] __int128 v9; // [rsp+30h] [rbp-38h] void *v10[5]; // [rsp+40h] [rbp-28h] BYREF v10[1] = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; LOBYTE(v10[0]) = 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 *)v10); 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 *)v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( a1, a2, &v6); 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 *)v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10); if ( *((_QWORD *)&v9 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1)); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); if ( *((_QWORD *)&v7 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1)); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0014326e MOV RDI,R14 MOV ESI,0x1 CALL 0x0014326e LAB_00153857: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x00154252 LAB_00153865: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0014326e MOV RDI,R14 CALL 0x001501da MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x00153889 CALL 0x00135448 LAB_00153889: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00153898 CALL 0x00135448 LAB_00153898: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x001538a7 CALL 0x00135448 LAB_001538a7: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001538dd MOV RAX,qword ptr [0x001e5f98] CMP byte ptr [RAX],0x0 JZ 0x001538c8 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001538d2 LAB_001538c8: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001538d2: CMP EAX,0x1 JNZ 0x001538dd MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001538dd: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = 0; p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,0); 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(bVar4); 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(bVar4); /* try { // try from 00153857 to 00153864 has its CatchHandler @ 001538ee */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); 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> ::data::~data(local_28); if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50); } if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_001e5f98 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
14,988
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<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::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O3
cpp
minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<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>, minja::Value, std::less<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::allocator<std::pair<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, minja::Value>>>::operator[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x426e2 movq %r14, %rdi movl $0x1, %esi callq 0x426e2 movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x5330a movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x426e2 movq %r14, %rdi callq 0x4f2d0 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x529ef callq 0x348da movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x529fe callq 0x348da movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x52a0d callq 0x348da movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x52a43 movq 0x9057a(%rip), %rax # 0xe2f98 cmpb $0x0, (%rax) je 0x52a2e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x52a38 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x52a43 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x42656 movq %rbx, %rdi callq 0x1ad30 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 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) 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) mov rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ mov rbx, rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+68h+var_30] test rdi, rdi jz short loc_529EF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_529EF: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_529FE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_529FE: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_52A0D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_52A0D: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_52A43 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_52A2E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_52A38 loc_52A2E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_52A38: cmp eax, 1 jnz short loc_52A43 mov rax, [rdi] call qword ptr [rax+18h] loc_52A43: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] __int128 v8; // [rsp+20h] [rbp-48h] __int128 v9; // [rsp+30h] [rbp-38h] void **v10[5]; // [rsp+40h] [rbp-28h] BYREF v10[1] = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; LOBYTE(v10[0]) = 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 *)v10); 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 *)v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( a1, a2, &v6); 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 *)v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10); if ( *((_QWORD *)&v9 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1)); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); if ( *((_QWORD *)&v7 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1)); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x001426e2 MOV RDI,R14 MOV ESI,0x1 CALL 0x001426e2 LAB_001529bd: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x0015330a LAB_001529cb: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x001426e2 MOV RDI,R14 CALL 0x0014f2d0 MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x001529ef CALL 0x001348da LAB_001529ef: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x001529fe CALL 0x001348da LAB_001529fe: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x00152a0d CALL 0x001348da LAB_00152a0d: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00152a43 MOV RAX,qword ptr [0x001e2f98] CMP byte ptr [RAX],0x0 JZ 0x00152a2e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x00152a38 LAB_00152a2e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_00152a38: CMP EAX,0x1 JNZ 0x00152a43 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_00152a43: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = 0; p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,0); 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(bVar4); 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(bVar4); /* try { // try from 001529bd to 001529ca has its CatchHandler @ 00152a54 */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); 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> ::data::~data(local_28); if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50); } if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_001e2f98 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
14,989
update_backward_delete_link
eloqsql/storage/maria/ma_dynrec.c
static my_bool update_backward_delete_link(MARIA_HA *info, my_off_t delete_block, MARIA_RECORD_POS filepos) { MARIA_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_ma_get_block_info(info, &block_info, info->dfile.file, delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O3
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x476a4 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 leaq -0x78(%rbp), %rsi movl $0x0, 0x50(%rsi) movl 0x480(%rdi), %edx movq %rbx, %rcx callq 0x470cc testb $0x4, %al jne 0x47672 movq %r14, %rdi movl $0x7f, %esi callq 0x39b54 movb $0x1, %al jmp 0x476a6 bswapq %r15 leaq -0x80(%rbp), %rsi movq %r15, (%rsi) movq (%r14), %rax addq $0xc, %rbx movl $0x8, %edx movl $0x4, %r8d movq %r14, %rdi movq %rbx, %rcx callq *0x6e8(%rax) movq %rax, %rcx movb $0x1, %al testq %rcx, %rcx jne 0x476a6 xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x476c0 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29220
update_backward_delete_link: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_476A4 mov r15, rdx mov rbx, rsi mov r14, rdi lea rsi, [rbp+var_78] mov dword ptr [rsi+50h], 0 mov edx, [rdi+480h] mov rcx, rbx call _ma_get_block_info test al, 4 jnz short loc_47672 mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error mov al, 1 jmp short loc_476A6 loc_47672: bswap r15 lea rsi, [rbp+var_80] mov [rsi], r15 mov rax, [r14] add rbx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, r14 mov rcx, rbx call qword ptr [rax+6E8h] mov rcx, rax mov al, 1 test rcx, rcx jnz short loc_476A6 loc_476A4: xor eax, eax loc_476A6: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_476C0 add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_476C0: call ___stack_chk_fail
char update_backward_delete_link( _DWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5, int a6) { long long v7; // rdx long long v8; // rcx long long v9; // r8 int v10; // r9d char result; // al long long v12; // rcx unsigned long long v13; // [rsp+0h] [rbp-80h] BYREF char v14[80]; // [rsp+8h] [rbp-78h] BYREF int v15; // [rsp+58h] [rbp-28h] unsigned long long v16; // [rsp+60h] [rbp-20h] v16 = __readfsqword(0x28u); if ( a2 == -1 ) return 0; v15 = 0; if ( (ma_get_block_info((long long)a1, v14, (unsigned int)a1[288], a2, a5, a6) & 4) == 0 ) { ma_set_fatal_error(a1, (_BYTE *)&dword_7C + 3, v7, v8, v9, v10); return 1; } v13 = _byteswap_uint64(a3); v12 = (*(long long ( **)(_DWORD *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 1768LL))( a1, &v13, 8LL, a2 + 12, 4LL); result = 1; if ( !v12 ) return 0; return result; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x001476a4 MOV R15,RDX MOV RBX,RSI MOV R14,RDI LEA RSI,[RBP + -0x78] MOV dword ptr [RSI + 0x50],0x0 MOV EDX,dword ptr [RDI + 0x480] MOV RCX,RBX CALL 0x001470cc TEST AL,0x4 JNZ 0x00147672 MOV RDI,R14 MOV ESI,0x7f CALL 0x00139b54 MOV AL,0x1 JMP 0x001476a6 LAB_00147672: BSWAP R15 LEA RSI,[RBP + -0x80] MOV qword ptr [RSI],R15 MOV RAX,qword ptr [R14] ADD RBX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x6e8] MOV RCX,RAX MOV AL,0x1 TEST RCX,RCX JNZ 0x001476a6 LAB_001476a4: XOR EAX,EAX LAB_001476a6: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x001476c0 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_001476c0: CALL 0x00129220
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3) { ulong uVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; ulong local_88; int1 local_80 [80]; int4 local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_30 = 0; uVar1 = _ma_get_block_info(param_1,local_80,(int)param_1[0x90],param_2); if ((uVar1 & 4) == 0) { _ma_set_fatal_error(param_1,0x7f); uVar2 = 1; goto LAB_001476a6; } local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 | (param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 | (param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 | (param_3 & 0xff00) << 0x28 | param_3 << 0x38; lVar3 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_88,8,param_2 + 0xc,4); uVar2 = 1; if (lVar3 != 0) goto LAB_001476a6; } uVar2 = 0; LAB_001476a6: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
14,990
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x275d4 leaq 0x1a94a9(%rip), %rax # 0x1d0a60 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x24550 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_275D4 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_275D4: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { (*((void ( **)(_QWORD))PSI_server[0] + 13))(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001275d4 LEA RAX,[0x2d0a60] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_001275d4: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124550 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
14,991
mi_cmp_buffer
eloqsql/storage/myisam/mi_dynrec.c
static int _mi_cmp_buffer(File file, const uchar *buff, my_off_t filepos, uint length) { uint next_length; uchar temp_buff[IO_SIZE*2]; DBUG_ENTER("_mi_cmp_buffer"); next_length= IO_SIZE*2 - (uint) (filepos & (IO_SIZE-1)); while (length > IO_SIZE*2) { if (mysql_file_pread(file, temp_buff, next_length, filepos, MYF(MY_NABP)) || memcmp(buff, temp_buff, next_length)) goto err; filepos+=next_length; buff+=next_length; length-= next_length; next_length=IO_SIZE*2; } if (mysql_file_pread(file, temp_buff, length, filepos, MYF(MY_NABP))) goto err; DBUG_RETURN(memcmp(buff,temp_buff,length)); err: DBUG_RETURN(1); }
O0
c
mi_cmp_buffer: pushq %rbp movq %rsp, %rbp subq $0x2040, %rsp # imm = 0x2040 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x2018(%rbp) movq %rsi, -0x2020(%rbp) movq %rdx, -0x2028(%rbp) movl %ecx, -0x202c(%rbp) movq -0x2028(%rbp), %rax andq $0xfff, %rax # imm = 0xFFF movl %eax, %ecx movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movl %eax, -0x2030(%rbp) cmpl $0x2000, -0x202c(%rbp) # imm = 0x2000 jbe 0xabe1f movl -0x2018(%rbp), %edx leaq -0x2010(%rbp), %rcx movl -0x2030(%rbp), %eax movl %eax, %r8d movq -0x2028(%rbp), %r9 leaq 0xa7ab6(%rip), %rdi # 0x153848 movl $0x67e, %esi # imm = 0x67E movq $0x4, (%rsp) callq 0xa7330 cmpq $0x0, %rax jne 0xabdca movq -0x2020(%rbp), %rdi leaq -0x2010(%rbp), %rsi movl -0x2030(%rbp), %eax movl %eax, %edx callq 0x2a810 cmpl $0x0, %eax je 0xabdcf jmp 0xabe82 movl -0x2030(%rbp), %eax addq -0x2028(%rbp), %rax movq %rax, -0x2028(%rbp) movl -0x2030(%rbp), %ecx movq -0x2020(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x2020(%rbp) movl -0x2030(%rbp), %ecx movl -0x202c(%rbp), %eax subl %ecx, %eax movl %eax, -0x202c(%rbp) movl $0x2000, -0x2030(%rbp) # imm = 0x2000 jmp 0xabd5e movl -0x2018(%rbp), %edx leaq -0x2010(%rbp), %rcx movl -0x202c(%rbp), %eax movl %eax, %r8d movq -0x2028(%rbp), %r9 leaq 0xa7a05(%rip), %rdi # 0x153848 movl $0x686, %esi # imm = 0x686 movq $0x4, (%rsp) callq 0xa7330 cmpq $0x0, %rax je 0xabe5d jmp 0xabe82 jmp 0xabe5f movq -0x2020(%rbp), %rdi leaq -0x2010(%rbp), %rsi movl -0x202c(%rbp), %eax movl %eax, %edx callq 0x2a810 movl %eax, -0x2014(%rbp) jmp 0xabe8e jmp 0xabe84 movl $0x1, -0x2014(%rbp) movl -0x2014(%rbp), %eax movl %eax, -0x2034(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xabebb movl -0x2034(%rbp), %eax addq $0x2040, %rsp # imm = 0x2040 popq %rbp retq callq 0x2a250
_mi_cmp_buffer: push rbp mov rbp, rsp sub rsp, 2040h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2018], edi mov [rbp+var_2020], rsi mov [rbp+var_2028], rdx mov [rbp+var_202C], ecx mov rax, [rbp+var_2028] and rax, 0FFFh mov ecx, eax mov eax, 2000h sub eax, ecx mov [rbp+var_2030], eax loc_ABD5E: cmp [rbp+var_202C], 2000h jbe loc_ABE1F mov edx, [rbp+var_2018] lea rcx, [rbp+var_2010] mov eax, [rbp+var_2030] mov r8d, eax mov r9, [rbp+var_2028] lea rdi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 67Eh mov [rsp+2040h+var_2040], 4 call inline_mysql_file_pread_6 cmp rax, 0 jnz short loc_ABDCA mov rdi, [rbp+var_2020] lea rsi, [rbp+var_2010] mov eax, [rbp+var_2030] mov edx, eax call _memcmp cmp eax, 0 jz short loc_ABDCF loc_ABDCA: jmp loc_ABE82 loc_ABDCF: mov eax, [rbp+var_2030] add rax, [rbp+var_2028] mov [rbp+var_2028], rax mov ecx, [rbp+var_2030] mov rax, [rbp+var_2020] mov ecx, ecx add rax, rcx mov [rbp+var_2020], rax mov ecx, [rbp+var_2030] mov eax, [rbp+var_202C] sub eax, ecx mov [rbp+var_202C], eax mov [rbp+var_2030], 2000h jmp loc_ABD5E loc_ABE1F: mov edx, [rbp+var_2018] lea rcx, [rbp+var_2010] mov eax, [rbp+var_202C] mov r8d, eax mov r9, [rbp+var_2028] lea rdi, aWorkspaceLlm4b_24; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 686h mov [rsp+2040h+var_2040], 4 call inline_mysql_file_pread_6 cmp rax, 0 jz short loc_ABE5D jmp short loc_ABE82 loc_ABE5D: jmp short $+2 loc_ABE5F: mov rdi, [rbp+var_2020] lea rsi, [rbp+var_2010] mov eax, [rbp+var_202C] mov edx, eax call _memcmp mov [rbp+var_2014], eax jmp short loc_ABE8E loc_ABE82: jmp short $+2 loc_ABE84: mov [rbp+var_2014], 1 loc_ABE8E: mov eax, [rbp+var_2014] mov [rbp+var_2034], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_ABEBB mov eax, [rbp+var_2034] add rsp, 2040h pop rbp retn loc_ABEBB: call ___stack_chk_fail
long long mi_cmp_buffer(unsigned int a1, long long a2, long long a3, unsigned int a4) { unsigned int v5; // [rsp+10h] [rbp-2030h] long long v7; // [rsp+18h] [rbp-2028h] _BYTE v10[8200]; // [rsp+30h] [rbp-2010h] BYREF unsigned long long v11; // [rsp+2038h] [rbp-8h] v11 = __readfsqword(0x28u); v7 = a3; v5 = 0x2000 - (a3 & 0xFFF); while ( a4 > 0x2000 ) { if ( inline_mysql_file_pread_6( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0x67Eu, a1, (long long)v10, v5, v7, 4LL) || (unsigned int)memcmp(a2, v10, v5) ) { return 1; } v7 += v5; a2 += v5; a4 -= v5; v5 = 0x2000; } if ( !inline_mysql_file_pread_6( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0x686u, a1, (long long)v10, a4, v7, 4LL) ) return (unsigned int)memcmp(a2, v10, a4); return 1; }
_mi_cmp_buffer: PUSH RBP MOV RBP,RSP SUB RSP,0x2040 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x2018],EDI MOV qword ptr [RBP + -0x2020],RSI MOV qword ptr [RBP + -0x2028],RDX MOV dword ptr [RBP + -0x202c],ECX MOV RAX,qword ptr [RBP + -0x2028] AND RAX,0xfff MOV ECX,EAX MOV EAX,0x2000 SUB EAX,ECX MOV dword ptr [RBP + -0x2030],EAX LAB_001abd5e: CMP dword ptr [RBP + -0x202c],0x2000 JBE 0x001abe1f MOV EDX,dword ptr [RBP + -0x2018] LEA RCX,[RBP + -0x2010] MOV EAX,dword ptr [RBP + -0x2030] MOV R8D,EAX MOV R9,qword ptr [RBP + -0x2028] LEA RDI,[0x253848] MOV ESI,0x67e MOV qword ptr [RSP],0x4 CALL 0x001a7330 CMP RAX,0x0 JNZ 0x001abdca MOV RDI,qword ptr [RBP + -0x2020] LEA RSI,[RBP + -0x2010] MOV EAX,dword ptr [RBP + -0x2030] MOV EDX,EAX CALL 0x0012a810 CMP EAX,0x0 JZ 0x001abdcf LAB_001abdca: JMP 0x001abe82 LAB_001abdcf: MOV EAX,dword ptr [RBP + -0x2030] ADD RAX,qword ptr [RBP + -0x2028] MOV qword ptr [RBP + -0x2028],RAX MOV ECX,dword ptr [RBP + -0x2030] MOV RAX,qword ptr [RBP + -0x2020] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x2020],RAX MOV ECX,dword ptr [RBP + -0x2030] MOV EAX,dword ptr [RBP + -0x202c] SUB EAX,ECX MOV dword ptr [RBP + -0x202c],EAX MOV dword ptr [RBP + -0x2030],0x2000 JMP 0x001abd5e LAB_001abe1f: MOV EDX,dword ptr [RBP + -0x2018] LEA RCX,[RBP + -0x2010] MOV EAX,dword ptr [RBP + -0x202c] MOV R8D,EAX MOV R9,qword ptr [RBP + -0x2028] LEA RDI,[0x253848] MOV ESI,0x686 MOV qword ptr [RSP],0x4 CALL 0x001a7330 CMP RAX,0x0 JZ 0x001abe5d JMP 0x001abe82 LAB_001abe5d: JMP 0x001abe5f LAB_001abe5f: MOV RDI,qword ptr [RBP + -0x2020] LEA RSI,[RBP + -0x2010] MOV EAX,dword ptr [RBP + -0x202c] MOV EDX,EAX CALL 0x0012a810 MOV dword ptr [RBP + -0x2014],EAX JMP 0x001abe8e LAB_001abe82: JMP 0x001abe84 LAB_001abe84: MOV dword ptr [RBP + -0x2014],0x1 LAB_001abe8e: MOV EAX,dword ptr [RBP + -0x2014] MOV dword ptr [RBP + -0x2034],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001abebb MOV EAX,dword ptr [RBP + -0x2034] ADD RSP,0x2040 POP RBP RET LAB_001abebb: CALL 0x0012a250
int _mi_cmp_buffer(int4 param_1,void *param_2,long param_3,uint param_4) { int iVar1; long lVar2; long in_FS_OFFSET; uint local_2038; uint local_2034; long local_2030; void *local_2028; int local_201c; int1 local_2018 [8200]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2038 = 0x2000 - ((uint)param_3 & 0xfff); local_2034 = param_4; local_2030 = param_3; local_2028 = param_2; while (0x2000 < local_2034) { lVar2 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e, param_1,local_2018,local_2038,local_2030,4); if ((lVar2 != 0) || (iVar1 = memcmp(local_2028,local_2018,(ulong)local_2038), iVar1 != 0)) goto LAB_001abe82; local_2030 = (ulong)local_2038 + local_2030; local_2028 = (void *)((long)local_2028 + (ulong)local_2038); local_2034 = local_2034 - local_2038; local_2038 = 0x2000; } lVar2 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686, param_1,local_2018,local_2034,local_2030,4); if (lVar2 == 0) { local_201c = memcmp(local_2028,local_2018,(ulong)local_2034); } else { LAB_001abe82: local_201c = 1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_201c; }
14,992
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_gcm)); int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen); int real_ivlen= EVP_CIPHER_CTX_iv_length(ctx); aad= iv + real_ivlen; aadlen= ivlen - real_ivlen; return res; }
O3
cpp
MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %rdi, %rbx movl 0x10(%rbp), %r12d testq %rsi, %rsi je 0x2ff35 movl %edx, %r9d movq 0xc8(%rbx), %rdi xorl %r13d, %r13d xorl %edx, %edx movq %r14, %r8 callq 0x29730 cmpl $0x1, %eax pushq $-0x65 popq %r15 cmovel %r13d, %r15d movq 0xc8(%rbx), %rdi callq 0x293a0 cltq addq %rax, %r14 movq %r14, 0xd0(%rbx) subl %eax, %r12d movl %r12d, 0xd8(%rbx) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x66 popq %r15 jmp 0x2ff01 nop
_ZN9MyCTX_gcm4initEPK13evp_cipher_stiPKhjS4_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov rbx, rdi mov r12d, [rbp+arg_0] test rsi, rsi jz short loc_2FF35 mov r9d, edx mov rdi, [rbx+0C8h] xor r13d, r13d xor edx, edx mov r8, r14 call _EVP_CipherInit_ex cmp eax, 1 push 0FFFFFFFFFFFFFF9Bh pop r15 cmovz r15d, r13d loc_2FF01: mov rdi, [rbx+0C8h] call _EVP_CIPHER_CTX_get_iv_length cdqe add r14, rax mov [rbx+0D0h], r14 sub r12d, eax mov [rbx+0D8h], r12d mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FF35: push 0FFFFFFFFFFFFFF9Ah pop r15 jmp short loc_2FF01
long long MyCTX_gcm::init(long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6, int a7) { long long v7; // rax unsigned int v9; // r15d int iv_length; // eax if ( a2 ) { v9 = -101; if ( (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v7) == 1 ) v9 = 0; } else { v9 = -102; } iv_length = EVP_CIPHER_CTX_get_iv_length(*(_QWORD *)(a1 + 200)); *(_QWORD *)(a1 + 208) = iv_length + a6; *(_DWORD *)(a1 + 216) = a7 - iv_length; return v9; }
init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV RBX,RDI MOV R12D,dword ptr [RBP + 0x10] TEST RSI,RSI JZ 0x0012ff35 MOV R9D,EDX MOV RDI,qword ptr [RBX + 0xc8] XOR R13D,R13D XOR EDX,EDX MOV R8,R14 CALL 0x00129730 CMP EAX,0x1 PUSH -0x65 POP R15 CMOVZ R15D,R13D LAB_0012ff01: MOV RDI,qword ptr [RBX + 0xc8] CALL 0x001293a0 CDQE ADD R14,RAX MOV qword ptr [RBX + 0xd0],R14 SUB R12D,EAX MOV dword ptr [RBX + 0xd8],R12D MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012ff35: PUSH -0x66 POP R15 JMP 0x0012ff01
/* MyCTX_gcm::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int4 __thiscall MyCTX_gcm::init(MyCTX_gcm *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4, uchar *param_5,uint param_6) { int iVar1; int4 uVar2; if (param_1 == (evp_cipher_st *)0x0) { uVar2 = 0xffffff9a; } else { iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5 ,param_2); uVar2 = 0xffffff9b; if (iVar1 == 1) { uVar2 = 0; } } iVar1 = EVP_CIPHER_CTX_get_iv_length(*(int8 *)(this + 200)); *(uchar **)(this + 0xd0) = param_5 + iVar1; *(uint *)(this + 0xd8) = param_6 - iVar1; return uVar2; }
14,993
init_event_name_sizing(PFS_global_param const*)
eloqsql/storage/perfschema/pfs_instr_class.cc
void init_event_name_sizing(const PFS_global_param *param) { /* global table io, table lock, idle, metadata */ mutex_class_start= COUNT_GLOBAL_EVENT_INDEX; rwlock_class_start= mutex_class_start + param->m_mutex_class_sizing; cond_class_start= rwlock_class_start + param->m_rwlock_class_sizing; file_class_start= cond_class_start + param->m_cond_class_sizing; socket_class_start= file_class_start + param->m_file_class_sizing; wait_class_max= socket_class_start + param->m_socket_class_sizing; }
O0
cpp
init_event_name_sizing(PFS_global_param const*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl $0x4, 0x3bfe6e(%rip) # 0x40c810 movl 0x3bfe68(%rip), %eax # 0x40c810 movq -0x8(%rbp), %rcx addq 0x18(%rcx), %rax movl %eax, 0x3bfe5e(%rip) # 0x40c814 movl 0x3bfe58(%rip), %eax # 0x40c814 movq -0x8(%rbp), %rcx addq 0x20(%rcx), %rax movl %eax, 0x3bfe4e(%rip) # 0x40c818 movl 0x3bfe48(%rip), %eax # 0x40c818 movq -0x8(%rbp), %rcx addq 0x28(%rcx), %rax movl %eax, 0x3bfe3e(%rip) # 0x40c81c movl 0x3bfe38(%rip), %eax # 0x40c81c movq -0x8(%rbp), %rcx addq 0x50(%rcx), %rax movl %eax, 0x3bfe32(%rip) # 0x40c824 movl 0x3bfe2c(%rip), %eax # 0x40c824 movq -0x8(%rbp), %rcx addq 0x98(%rcx), %rax movl %eax, 0x3bfe17(%rip) # 0x40c820 popq %rbp retq nopl (%rax,%rax)
_Z22init_event_name_sizingPK16PFS_global_param: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov cs:mutex_class_start, 4 mov eax, cs:mutex_class_start mov rcx, [rbp+var_8] add rax, [rcx+18h] mov cs:rwlock_class_start, eax mov eax, cs:rwlock_class_start mov rcx, [rbp+var_8] add rax, [rcx+20h] mov cs:cond_class_start, eax mov eax, cs:cond_class_start mov rcx, [rbp+var_8] add rax, [rcx+28h] mov cs:file_class_start, eax mov eax, cs:file_class_start mov rcx, [rbp+var_8] add rax, [rcx+50h] mov cs:socket_class_start, eax mov eax, cs:socket_class_start mov rcx, [rbp+var_8] add rax, [rcx+98h] mov cs:wait_class_max, eax pop rbp retn
long long init_event_name_sizing(long long a1) { long long result; // rax mutex_class_start = 4; rwlock_class_start = *(_DWORD *)(a1 + 24) + 4; cond_class_start = *(_DWORD *)(a1 + 32) + rwlock_class_start; file_class_start = *(_DWORD *)(a1 + 40) + cond_class_start; socket_class_start = *(_DWORD *)(a1 + 80) + file_class_start; result = *(_QWORD *)(a1 + 152) + (unsigned int)socket_class_start; wait_class_max = *(_DWORD *)(a1 + 152) + socket_class_start; return result; }
init_event_name_sizing: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [0x0050c810],0x4 MOV EAX,dword ptr [0x0050c810] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x18] MOV dword ptr [0x0050c814],EAX MOV EAX,dword ptr [0x0050c814] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x20] MOV dword ptr [0x0050c818],EAX MOV EAX,dword ptr [0x0050c818] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x28] MOV dword ptr [0x0050c81c],EAX MOV EAX,dword ptr [0x0050c81c] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x50] MOV dword ptr [0x0050c824],EAX MOV EAX,dword ptr [0x0050c824] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x98] MOV dword ptr [0x0050c820],EAX POP RBP RET
/* init_event_name_sizing(PFS_global_param const*) */ void init_event_name_sizing(PFS_global_param *param_1) { mutex_class_start = 4; rwlock_class_start = (int)*(int8 *)(param_1 + 0x18) + 4; cond_class_start = rwlock_class_start + (int)*(int8 *)(param_1 + 0x20); file_class_start = cond_class_start + (int)*(int8 *)(param_1 + 0x28); socket_class_start = file_class_start + (int)*(int8 *)(param_1 + 0x50); wait_class_max = socket_class_start + (int)*(int8 *)(param_1 + 0x98); return; }
14,994
LefDefParser::defwBeginextRevision(int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwBeginextRevision(int vers1, int vers2) { if (!defwFile) return DEFW_UNINITIALIZED; if (!defwDidInit) return DEFW_BAD_ORDER; if (defwState != DEFW_BEGINEXT_START && defwState != DEFW_BEGINEXT) return DEFW_BAD_ORDER; fprintf(defwFile, "\n REVISION %d.%d", vers1, vers2); defwState = DEFW_BEGINEXT; defwLines++; return DEFW_OK; }
O0
cpp
LefDefParser::defwBeginextRevision(int, int): subq $0x18, %rsp movl %edi, 0x10(%rsp) movl %esi, 0xc(%rsp) leaq 0x9215(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x21f56 movl $0x1, 0x14(%rsp) jmp 0x21fd8 leaq 0x9217(%rip), %rax # 0x2b174 cmpl $0x0, (%rax) jne 0x21f6c movl $0x2, 0x14(%rsp) jmp 0x21fd8 leaq 0x91f1(%rip), %rax # 0x2b164 cmpl $0x60, (%rax) je 0x21f8e leaq 0x91e5(%rip), %rax # 0x2b164 cmpl $0x61, (%rax) je 0x21f8e movl $0x2, 0x14(%rsp) jmp 0x21fd8 leaq 0x91c3(%rip), %rax # 0x2b158 movq (%rax), %rdi movl 0x10(%rsp), %edx movl 0xc(%rsp), %ecx leaq 0x33e2(%rip), %rsi # 0x25389 movb $0x0, %al callq 0x10f0 leaq 0x91af(%rip), %rax # 0x2b164 movl $0x61, (%rax) leaq 0x919e(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x9192(%rip), %rax # 0x2b160 movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser20defwBeginextRevisionEii: sub rsp, 18h mov [rsp+18h+var_8], edi mov [rsp+18h+var_C], esi lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_21F56 mov [rsp+18h+var_4], 1 jmp loc_21FD8 loc_21F56: lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit cmp dword ptr [rax], 0 jnz short loc_21F6C mov [rsp+18h+var_4], 2 jmp short loc_21FD8 loc_21F6C: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 60h ; '`' jz short loc_21F8E lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 61h ; 'a' jz short loc_21F8E mov [rsp+18h+var_4], 2 jmp short loc_21FD8 loc_21F8E: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov edx, [rsp+18h+var_8] mov ecx, [rsp+18h+var_C] lea rsi, aRevisionDD; "\n REVISION %d.%d" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 61h ; 'a' lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_21FD8: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwBeginextRevision(LefDefParser *this, int a2) { if ( LefDefParser::defwFile ) { if ( LefDefParser::defwDidInit ) { if ( LefDefParser::defwState == 96 || LefDefParser::defwState == 97 ) { fprintf(LefDefParser::defwFile, "\n REVISION %d.%d", (_DWORD)this, a2); LefDefParser::defwState = 97; ++LefDefParser::defwLines; return 0; } else { return 2; } } else { return 2; } } else { return 1; } }
defwBeginextRevision: SUB RSP,0x18 MOV dword ptr [RSP + 0x10],EDI MOV dword ptr [RSP + 0xc],ESI LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x00121f56 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00121fd8 LAB_00121f56: LEA RAX,[0x12b174] CMP dword ptr [RAX],0x0 JNZ 0x00121f6c MOV dword ptr [RSP + 0x14],0x2 JMP 0x00121fd8 LAB_00121f6c: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x60 JZ 0x00121f8e LEA RAX,[0x12b164] CMP dword ptr [RAX],0x61 JZ 0x00121f8e MOV dword ptr [RSP + 0x14],0x2 JMP 0x00121fd8 LAB_00121f8e: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] LEA RSI,[0x125389] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b164] MOV dword ptr [RAX],0x61 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_00121fd8: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwBeginextRevision(int, int) */ int4 LefDefParser::defwBeginextRevision(int param_1,int param_2) { int4 local_4; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwDidInit == 0) { local_4 = 2; } else if ((defwState == 0x60) || (defwState == 0x61)) { fprintf(defwFile,"\n REVISION %d.%d",(ulong)(uint)param_1,(ulong)(uint)param_2); defwState = 0x61; defwLines = defwLines + 1; local_4 = 0; } else { local_4 = 2; } return local_4; }
14,995
ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*)
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
static int ggml_backend_sched_backend_from_buffer(ggml_backend_sched_t sched, const struct ggml_tensor * tensor, const struct ggml_tensor * op) { ggml_backend_buffer_t buffer = tensor->view_src ? tensor->view_src->buffer : tensor->buffer; if (buffer == NULL) { return -1; } // find highest prio backend that supports the buffer type and the op for (int i = 0; i < sched->n_backends; i++) { if (ggml_backend_supports_buft(sched->backends[i], buffer->buft) && ggml_backend_supports_op(sched->backends[i], op)) { return i; } } #ifndef NDEBUG GGML_LOG_DEBUG("%s: warning: no backend supports op %s with a weight with buffer type %s used in tensor %s, the weight will need to be copied\n", __func__, ggml_op_desc(tensor), ggml_backend_buffer_name(buffer), tensor->name); #endif return -1; }
O2
cpp
ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq 0xe8(%rsi), %rax testq %rax, %rax cmoveq %rsi, %rax movq 0x8(%rax), %r15 pushq $-0x1 popq %rbp testq %r15, %r15 je 0x2d9be movq %rdx, %rbx movq %rdi, %r14 xorl %r12d, %r12d movslq 0x4(%r14), %rax cmpq %rax, %r12 jge 0x2d9be movq 0x8(%r14,%r12,8), %rax movq 0x48(%r15), %rsi movq 0x70(%rax), %rdi callq *0x50(%rdi) testb %al, %al je 0x2d9b6 movq 0x8(%r14,%r12,8), %rax movq 0x70(%rax), %rdi movq %rbx, %rsi callq *0x48(%rdi) testb %al, %al jne 0x2d9bb incq %r12 jmp 0x2d986 movl %r12d, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_: push rbp push r15 push r14 push r12 push rbx mov rax, [rsi+0E8h] test rax, rax cmovz rax, rsi mov r15, [rax+8] push 0FFFFFFFFFFFFFFFFh pop rbp test r15, r15 jz short loc_2D9BE mov rbx, rdx mov r14, rdi xor r12d, r12d loc_2D986: movsxd rax, dword ptr [r14+4] cmp r12, rax jge short loc_2D9BE mov rax, [r14+r12*8+8] mov rsi, [r15+48h] mov rdi, [rax+70h] call qword ptr [rdi+50h] test al, al jz short loc_2D9B6 mov rax, [r14+r12*8+8] mov rdi, [rax+70h] mov rsi, rbx call qword ptr [rdi+48h] test al, al jnz short loc_2D9BB loc_2D9B6: inc r12 jmp short loc_2D986 loc_2D9BB: mov ebp, r12d loc_2D9BE: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ggml_backend_sched_backend_from_buffer(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // r15 unsigned int v5; // ebp long long i; // r12 long long v9; // rdi long long v10; // rdi v3 = *(_QWORD *)(a2 + 232); if ( !v3 ) v3 = a2; v4 = *(_QWORD *)(v3 + 8); v5 = -1; if ( v4 ) { for ( i = 0LL; i < *(int *)(a1 + 4); ++i ) { v9 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * i + 8) + 112LL); if ( (*(unsigned __int8 ( **)(long long, _QWORD))(v9 + 80))(v9, *(_QWORD *)(v4 + 72)) ) { v10 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * i + 8) + 112LL); if ( (*(unsigned __int8 ( **)(long long, long long))(v10 + 72))(v10, a3) ) return (unsigned int)i; } } } return v5; }
ggml_backend_sched_backend_from_buffer: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RAX,qword ptr [RSI + 0xe8] TEST RAX,RAX CMOVZ RAX,RSI MOV R15,qword ptr [RAX + 0x8] PUSH -0x1 POP RBP TEST R15,R15 JZ 0x0012d9be MOV RBX,RDX MOV R14,RDI XOR R12D,R12D LAB_0012d986: MOVSXD RAX,dword ptr [R14 + 0x4] CMP R12,RAX JGE 0x0012d9be MOV RAX,qword ptr [R14 + R12*0x8 + 0x8] MOV RSI,qword ptr [R15 + 0x48] MOV RDI,qword ptr [RAX + 0x70] CALL qword ptr [RDI + 0x50] TEST AL,AL JZ 0x0012d9b6 MOV RAX,qword ptr [R14 + R12*0x8 + 0x8] MOV RDI,qword ptr [RAX + 0x70] MOV RSI,RBX CALL qword ptr [RDI + 0x48] TEST AL,AL JNZ 0x0012d9bb LAB_0012d9b6: INC R12 JMP 0x0012d986 LAB_0012d9bb: MOV EBP,R12D LAB_0012d9be: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*) */ ulong ggml_backend_sched_backend_from_buffer (ggml_backend_sched *param_1,ggml_tensor *param_2,ggml_tensor *param_3) { long lVar1; char cVar2; ggml_tensor *pgVar3; ulong uVar4; ulong uVar5; pgVar3 = *(ggml_tensor **)(param_2 + 0xe8); if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { pgVar3 = param_2; } lVar1 = *(long *)(pgVar3 + 8); uVar4 = 0xffffffffffffffff; if (lVar1 != 0) { for (uVar5 = 0; (long)uVar5 < (long)*(int *)(param_1 + 4); uVar5 = uVar5 + 1) { cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + uVar5 * 8 + 8) + 0x70) + 0x50)) (*(long *)(*(long *)(param_1 + uVar5 * 8 + 8) + 0x70), *(int8 *)(lVar1 + 0x48)); if (cVar2 != '\0') { cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + uVar5 * 8 + 8) + 0x70) + 0x48)) (*(long *)(*(long *)(param_1 + uVar5 * 8 + 8) + 0x70),param_3); if (cVar2 != '\0') { uVar4 = uVar5 & 0xffffffff; break; } } } } return uVar4 & 0xffffffff; }
14,996
ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*)
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
static int ggml_backend_sched_backend_from_buffer(ggml_backend_sched_t sched, const struct ggml_tensor * tensor, const struct ggml_tensor * op) { ggml_backend_buffer_t buffer = tensor->view_src ? tensor->view_src->buffer : tensor->buffer; if (buffer == NULL) { return -1; } // find highest prio backend that supports the buffer type and the op for (int i = 0; i < sched->n_backends; i++) { if (ggml_backend_supports_buft(sched->backends[i], buffer->buft) && ggml_backend_supports_op(sched->backends[i], op)) { return i; } } #ifndef NDEBUG GGML_LOG_DEBUG("%s: warning: no backend supports op %s with a weight with buffer type %s used in tensor %s, the weight will need to be copied\n", __func__, ggml_op_desc(tensor), ggml_backend_buffer_name(buffer), tensor->name); #endif return -1; }
O3
cpp
ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0xe8(%rsi), %rax testq %rax, %rax cmoveq %rsi, %rax movq 0x8(%rax), %r12 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %r12, %r12 je 0x28dbe movq %rdi, %r15 cmpl $0x0, 0x4(%rdi) jle 0x28dbe movq %rdx, %r14 xorl %r13d, %r13d movq 0x8(%r15,%r13,8), %rax movq 0x48(%r12), %rsi movq 0x70(%rax), %rdi callq *0x50(%rdi) testb %al, %al je 0x28dad movq 0x8(%r15,%r13,8), %rax movq 0x70(%rax), %rdi movq %r14, %rsi callq *0x48(%rdi) testb %al, %al jne 0x28dbb incq %r13 movslq 0x4(%r15), %rax cmpq %rax, %r13 jl 0x28d85 jmp 0x28dbe movl %r13d, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_: push r15 push r14 push r13 push r12 push rbx mov rax, [rsi+0E8h] test rax, rax cmovz rax, rsi mov r12, [rax+8] mov ebx, 0FFFFFFFFh test r12, r12 jz short loc_28DBE mov r15, rdi cmp dword ptr [rdi+4], 0 jle short loc_28DBE mov r14, rdx xor r13d, r13d loc_28D85: mov rax, [r15+r13*8+8] mov rsi, [r12+48h] mov rdi, [rax+70h] call qword ptr [rdi+50h] test al, al jz short loc_28DAD mov rax, [r15+r13*8+8] mov rdi, [rax+70h] mov rsi, r14 call qword ptr [rdi+48h] test al, al jnz short loc_28DBB loc_28DAD: inc r13 movsxd rax, dword ptr [r15+4] cmp r13, rax jl short loc_28D85 jmp short loc_28DBE loc_28DBB: mov ebx, r13d loc_28DBE: mov eax, ebx pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_backend_sched_backend_from_buffer(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // r12 unsigned int v5; // ebx long long v8; // r13 long long v9; // rdi long long v10; // rdi v3 = *(_QWORD *)(a2 + 232); if ( !v3 ) v3 = a2; v4 = *(_QWORD *)(v3 + 8); v5 = -1; if ( v4 && *(int *)(a1 + 4) > 0 ) { v8 = 0LL; while ( 1 ) { v9 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v8 + 8) + 112LL); if ( (*(unsigned __int8 ( **)(long long, _QWORD))(v9 + 80))(v9, *(_QWORD *)(v4 + 72)) ) { v10 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v8 + 8) + 112LL); if ( (*(unsigned __int8 ( **)(long long, long long))(v10 + 72))(v10, a3) ) break; } if ( ++v8 >= *(int *)(a1 + 4) ) return v5; } return (unsigned int)v8; } return v5; }
ggml_backend_sched_backend_from_buffer: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RAX,qword ptr [RSI + 0xe8] TEST RAX,RAX CMOVZ RAX,RSI MOV R12,qword ptr [RAX + 0x8] MOV EBX,0xffffffff TEST R12,R12 JZ 0x00128dbe MOV R15,RDI CMP dword ptr [RDI + 0x4],0x0 JLE 0x00128dbe MOV R14,RDX XOR R13D,R13D LAB_00128d85: MOV RAX,qword ptr [R15 + R13*0x8 + 0x8] MOV RSI,qword ptr [R12 + 0x48] MOV RDI,qword ptr [RAX + 0x70] CALL qword ptr [RDI + 0x50] TEST AL,AL JZ 0x00128dad MOV RAX,qword ptr [R15 + R13*0x8 + 0x8] MOV RDI,qword ptr [RAX + 0x70] MOV RSI,R14 CALL qword ptr [RDI + 0x48] TEST AL,AL JNZ 0x00128dbb LAB_00128dad: INC R13 MOVSXD RAX,dword ptr [R15 + 0x4] CMP R13,RAX JL 0x00128d85 JMP 0x00128dbe LAB_00128dbb: MOV EBX,R13D LAB_00128dbe: MOV EAX,EBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* ggml_backend_sched_backend_from_buffer(ggml_backend_sched*, ggml_tensor const*, ggml_tensor const*) */ ulong ggml_backend_sched_backend_from_buffer (ggml_backend_sched *param_1,ggml_tensor *param_2,ggml_tensor *param_3) { long lVar1; char cVar2; ggml_tensor *pgVar3; ulong uVar4; pgVar3 = *(ggml_tensor **)(param_2 + 0xe8); if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) { pgVar3 = param_2; } lVar1 = *(long *)(pgVar3 + 8); if ((lVar1 != 0) && (0 < *(int *)(param_1 + 4))) { uVar4 = 0; do { cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + uVar4 * 8 + 8) + 0x70) + 0x50)) (*(long *)(*(long *)(param_1 + uVar4 * 8 + 8) + 0x70), *(int8 *)(lVar1 + 0x48)); if ((cVar2 != '\0') && (cVar2 = (**(code **)(*(long *)(*(long *)(param_1 + uVar4 * 8 + 8) + 0x70) + 0x48)) (*(long *)(*(long *)(param_1 + uVar4 * 8 + 8) + 0x70),param_3), cVar2 != '\0')) { return uVar4 & 0xffffffff; } uVar4 = uVar4 + 1; } while ((long)uVar4 < (long)*(int *)(param_1 + 4)); } return 0xffffffff; }
14,997
common_log_main()
monkey531[P]llama/common/log.cpp
struct common_log * common_log_main() { static struct common_log log; return &log; }
O3
cpp
common_log_main(): pushq %rbx movb 0x60b96(%rip), %al # 0x12c4f8 testb %al, %al je 0xcb96f leaq 0x60abb(%rip), %rax # 0x12c428 popq %rbx retq leaq 0x60b82(%rip), %rdi # 0x12c4f8 callq 0x1afe0 testl %eax, %eax je 0xcb966 leaq 0x60aa2(%rip), %rdi # 0x12c428 movl $0x100, %esi # imm = 0x100 callq 0xcc05a leaq 0x10d(%rip), %rdi # 0xcbaa4 leaq 0x60a8a(%rip), %rsi # 0x12c428 leaq 0x5ff13(%rip), %rdx # 0x12b8b8 callq 0x1a790 leaq 0x60b47(%rip), %rdi # 0x12c4f8 callq 0x1a5a0 jmp 0xcb966 movq %rax, %rbx leaq 0x60b36(%rip), %rdi # 0x12c4f8 callq 0x1a590 movq %rbx, %rdi callq 0x1af80
_Z15common_log_mainv: push rbx mov al, cs:_ZGVZ15common_log_mainvE3log; `guard variable for'common_log_main(void)::log test al, al jz short loc_CB96F loc_CB966: lea rax, _ZZ15common_log_mainvE3log; common_log_main(void)::log pop rbx retn loc_CB96F: lea rdi, _ZGVZ15common_log_mainvE3log; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_CB966 lea rdi, _ZZ15common_log_mainvE3log; this mov esi, 100h; unsigned __int64 call _ZN10common_logC2Em; common_log::common_log(ulong) lea rdi, _ZN10common_logD2Ev; lpfunc lea rsi, _ZZ15common_log_mainvE3log; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZ15common_log_mainvE3log; __guard * call ___cxa_guard_release jmp short loc_CB966 mov rbx, rax lea rdi, _ZGVZ15common_log_mainvE3log; __guard * call ___cxa_guard_abort mov rdi, rbx call __Unwind_Resume
void *common_log_main(void) { if ( !(_BYTE)`guard variable for'common_log_main(void)::log && __cxa_guard_acquire(&`guard variable for'common_log_main(void)::log) ) { common_log::common_log((common_log *)&common_log_main(void)::log, 0x100uLL); __cxa_atexit(common_log::~common_log, &common_log_main(void)::log, &_dso_handle); __cxa_guard_release(&`guard variable for'common_log_main(void)::log); } return &common_log_main(void)::log; }
common_log_main: PUSH RBX MOV AL,byte ptr [0x0022c4f8] TEST AL,AL JZ 0x001cb96f LAB_001cb966: LEA RAX,[0x22c428] POP RBX RET LAB_001cb96f: LEA RDI,[0x22c4f8] CALL 0x0011afe0 TEST EAX,EAX JZ 0x001cb966 LAB_001cb97f: LEA RDI,[0x22c428] MOV ESI,0x100 CALL 0x001cc05a LAB_001cb990: LEA RDI,[0x1cbaa4] LEA RSI,[0x22c428] LEA RDX,[0x22b8b8] CALL 0x0011a790 LEA RDI,[0x22c4f8] CALL 0x0011a5a0 JMP 0x001cb966
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_log_main() */ int1 * common_log_main(void) { int iVar1; if (common_log_main()::log == '\0') { iVar1 = __cxa_guard_acquire(&common_log_main()::log); if (iVar1 != 0) { /* try { // try from 001cb97f to 001cb98f has its CatchHandler @ 001cb9b8 */ common_log::common_log((common_log *)common_log_main()::log,0x100); __cxa_atexit(common_log::~common_log,common_log_main()::log,&__dso_handle); __cxa_guard_release(&common_log_main()::log); } } return common_log_main()::log; }
14,998
eprint
eloqsql/storage/maria/ma_recovery_util.c
void eprint(FILE *trace_file __attribute__ ((unused)), const char *format __attribute__ ((unused)), ...) { va_list args; va_start(args, format); DBUG_PRINT("error", ("%s", format)); if (!trace_file) trace_file= stderr; if (procent_printed) { procent_printed= 0; /* In silent mode, print on another line than the 0% 10% 20% line */ fputc('\n', stderr); fflush(stderr); } vfprintf(trace_file , format, args); fputc('\n', trace_file); if (trace_file != stderr) { va_start(args, format); my_printv_error(HA_ERR_INITIALIZATION, format, MYF(0), args); } va_end(args); fflush(trace_file); }
O0
c
eprint: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x3fbf8 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq %r9, -0xb8(%rbp) movq %r8, -0xc0(%rbp) movq %rcx, -0xc8(%rbp) movq %rdx, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0x30(%rbp), %rax leaq -0xe0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) jmp 0x3fc42 cmpq $0x0, -0x8(%rbp) jne 0x3fc57 movq 0x284390(%rip), %rax # 0x2c3fe0 movq (%rax), %rax movq %rax, -0x8(%rbp) cmpb $0x0, 0xc410fa(%rip) # 0xc80d58 je 0x3fc8a movb $0x0, 0xc410f1(%rip) # 0xc80d58 movq 0x284372(%rip), %rax # 0x2c3fe0 movq (%rax), %rsi movl $0xa, %edi callq 0x2a680 movq 0x28435e(%rip), %rax # 0x2c3fe0 movq (%rax), %rdi callq 0x2a3d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x2a7e0 movq -0x8(%rbp), %rsi movl $0xa, %edi callq 0x2a680 movq -0x8(%rbp), %rax movq 0x28432c(%rip), %rcx # 0x2c3fe0 cmpq (%rcx), %rax je 0x3fcf3 leaq -0x30(%rbp), %rax leaq -0xe0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rcx movl $0xae, %edi xorl %eax, %eax movl %eax, %edx callq 0xf1e10 movq -0x8(%rbp), %rdi callq 0x2a3d0 addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
eprint: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_3FBF8 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_3FBF8: mov [rbp+var_B8], r9 mov [rbp+var_C0], r8 mov [rbp+var_C8], rcx mov [rbp+var_D0], rdx mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rax, [rbp+var_30] lea rcx, [rbp+var_E0] 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 jmp short $+2 loc_3FC42: cmp [rbp+var_8], 0 jnz short loc_3FC57 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_8], rax loc_3FC57: cmp cs:procent_printed, 0 jz short loc_3FC8A mov cs:procent_printed, 0 mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush loc_3FC8A: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call _vfprintf mov rsi, [rbp+var_8] mov edi, 0Ah call _fputc mov rax, [rbp+var_8] mov rcx, cs:stderr_ptr cmp rax, [rcx] jz short loc_3FCF3 lea rax, [rbp+var_30] lea rcx, [rbp+var_E0] 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 rsi, [rbp+var_10] lea rcx, [rbp+var_30] mov edi, 0AEh xor eax, eax mov edx, eax call my_printv_error loc_3FCF3: mov rdi, [rbp+var_8] call _fflush add rsp, 0E0h pop rbp retn
long long eprint( 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) { _BYTE v16[16]; // [rsp+0h] [rbp-E0h] BYREF long long v17; // [rsp+10h] [rbp-D0h] long long v18; // [rsp+18h] [rbp-C8h] long long v19; // [rsp+20h] [rbp-C0h] long long v20; // [rsp+28h] [rbp-B8h] __m128 v21; // [rsp+30h] [rbp-B0h] __m128 v22; // [rsp+40h] [rbp-A0h] __m128 v23; // [rsp+50h] [rbp-90h] __m128 v24; // [rsp+60h] [rbp-80h] __m128 v25; // [rsp+70h] [rbp-70h] __m128 v26; // [rsp+80h] [rbp-60h] __m128 v27; // [rsp+90h] [rbp-50h] __m128 v28; // [rsp+A0h] [rbp-40h] int v29; // [rsp+B0h] [rbp-30h] BYREF int v30; // [rsp+B4h] [rbp-2Ch] char *v31; // [rsp+B8h] [rbp-28h] _BYTE *v32; // [rsp+C0h] [rbp-20h] long long v33; // [rsp+D0h] [rbp-10h] long long v34; // [rsp+D8h] [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; v34 = a1; v33 = a2; v32 = v16; v31 = &a15; v30 = 48; v29 = 16; if ( !a1 ) v34 = stderr; if ( procent_printed ) { procent_printed = 0; fputc(10LL, stderr); fflush(stderr); } vfprintf(v34, v33, &v29); fputc(10LL, v34); if ( v34 != stderr ) { v32 = v16; v31 = &a15; v30 = 48; v29 = 16; my_printv_error(174LL, v33, 0LL, &v29); } return fflush(v34); }
eprint: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x0013fbf8 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_0013fbf8: MOV qword ptr [RBP + -0xb8],R9 MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xd0],RDX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xe0] 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 JMP 0x0013fc42 LAB_0013fc42: CMP qword ptr [RBP + -0x8],0x0 JNZ 0x0013fc57 MOV RAX,qword ptr [0x003c3fe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX LAB_0013fc57: CMP byte ptr [0x00d80d58],0x0 JZ 0x0013fc8a MOV byte ptr [0x00d80d58],0x0 MOV RAX,qword ptr [0x003c3fe0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x0012a680 MOV RAX,qword ptr [0x003c3fe0] MOV RDI,qword ptr [RAX] CALL 0x0012a3d0 LAB_0013fc8a: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x0012a7e0 MOV RSI,qword ptr [RBP + -0x8] MOV EDI,0xa CALL 0x0012a680 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [0x003c3fe0] CMP RAX,qword ptr [RCX] JZ 0x0013fcf3 LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xe0] 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 RSI,qword ptr [RBP + -0x10] LEA RCX,[RBP + -0x30] MOV EDI,0xae XOR EAX,EAX MOV EDX,EAX CALL 0x001f1e10 LAB_0013fcf3: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a3d0 ADD RSP,0xe0 POP RBP RET
void eprint(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,FILE *param_9 ,char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; int1 local_e8 [16]; 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; int4 local_38; int4 local_34; int1 *local_30; int1 *local_28; char *local_18; FILE *local_10; 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; } local_28 = local_e8; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; local_10 = param_9; if (param_9 == (FILE *)0x0) { local_10 = *(FILE **)PTR_stderr_003c3fe0; } local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; if (procent_printed != '\0') { procent_printed = '\0'; fputc(10,*(FILE **)PTR_stderr_003c3fe0); fflush(*(FILE **)PTR_stderr_003c3fe0); } vfprintf(local_10,local_18,&local_38); fputc(10,local_10); if (local_10 != *(FILE **)PTR_stderr_003c3fe0) { local_28 = local_e8; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; my_printv_error(0xae,local_18,0,&local_38); } fflush(local_10); return; }
14,999
stbi__bitcount
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__bitcount(unsigned int a) { a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits a = (a + (a >> 8)); // max 16 per 8 bits a = (a + (a >> 16)); // max 32 per 8 bits return a & 0xff; }
O1
c
stbi__bitcount: movl $0x55555555, %eax # imm = 0x55555555 movl %edi, %ecx andl %eax, %ecx shrl %edi andl %eax, %edi addl %ecx, %edi movl $0x33333333, %eax # imm = 0x33333333 movl %edi, %ecx andl %eax, %ecx shrl $0x2, %edi andl %eax, %edi addl %ecx, %edi movl %edi, %eax shrl $0x4, %eax addl %edi, %eax andl $0xf0f0f0f, %eax # imm = 0xF0F0F0F movl %eax, %ecx shrl $0x8, %ecx addl %eax, %ecx movl %ecx, %eax shrl $0x10, %eax addl %ecx, %eax movzbl %al, %eax retq
stbi__bitcount: mov eax, 55555555h mov ecx, edi and ecx, eax shr edi, 1 and edi, eax add edi, ecx mov eax, 33333333h mov ecx, edi and ecx, eax shr edi, 2 and edi, eax add edi, ecx mov eax, edi shr eax, 4 add eax, edi and eax, 0F0F0F0Fh mov ecx, eax shr ecx, 8 add ecx, eax mov eax, ecx shr eax, 10h add eax, ecx movzx eax, al retn
long long stbi__bitcount(unsigned int a1) { unsigned int v1; // edi v1 = (((a1 & 0x55555555) + ((a1 >> 1) & 0x55555555)) & 0x33333333) + ((((a1 & 0x55555555) + ((a1 >> 1) & 0x55555555)) >> 2) & 0x33333333); return (unsigned __int8)(((v1 + (v1 >> 4)) & 0xF) + ((unsigned __int16)((v1 + (v1 >> 4)) & 0xF0F) >> 8) + ((((v1 + (v1 >> 4)) & 0xF0F0F0F) + (((v1 + (v1 >> 4)) & 0xF0F0F0F) >> 8)) >> 16)); }
stbi__bitcount: MOV EAX,0x55555555 MOV ECX,EDI AND ECX,EAX SHR EDI,0x1 AND EDI,EAX ADD EDI,ECX MOV EAX,0x33333333 MOV ECX,EDI AND ECX,EAX SHR EDI,0x2 AND EDI,EAX ADD EDI,ECX MOV EAX,EDI SHR EAX,0x4 ADD EAX,EDI AND EAX,0xf0f0f0f MOV ECX,EAX SHR ECX,0x8 ADD ECX,EAX MOV EAX,ECX SHR EAX,0x10 ADD EAX,ECX MOVZX EAX,AL RET
uint stbi__bitcount(uint param_1) { uint uVar1; uVar1 = (param_1 >> 1 & 0x55555555) + (param_1 & 0x55555555); uVar1 = (uVar1 >> 2 & 0x33333333) + (uVar1 & 0x33333333); uVar1 = (uVar1 >> 4) + uVar1 & 0xf0f0f0f; uVar1 = (uVar1 >> 8) + uVar1; return (uVar1 >> 0x10) + uVar1 & 0xff; }