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
30,400
Settings::startGame[abi:cxx11]()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::startGame() { std::lock_guard<std::mutex> lock(settings_mutex); std::cout << "Settings::startGame(): Checking conditions..." << std::endl; std::cout << "Settings::startGame(): Calling canFitShips()..." << std::endl; bool fit = false; try { fit = canFitShips(); } catch (const std::exception& e) { std::cerr << "Settings::startGame(): Exception in canFitShips(): " << e.what() << std::endl; return "exception in canFitShips"; } if (start) { std::cout << "Settings::startGame(): Game has already been started." << std::endl; return "game has already been started"; } if (!fit) { std::cout << "Settings::startGame(): Failed to fit all ships on the map." << std::endl; return "failed to fit all ships on the map"; } start = true; std::cout << "Settings::startGame(): Game started successfully." << std::endl; return "ok"; }
O0
cpp
Settings::startGame[abi:cxx11](): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x60(%rbp) movq %rdi, %rax movq %rax, -0x58(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x50(%rbp) leaq -0x18(%rbp), %rdi callq 0xb6f0 movq 0x52a9a(%rip), %rdi # 0x5cf90 leaq 0x35dd0(%rip), %rsi # 0x402cd callq 0x7370 movq %rax, -0x48(%rbp) jmp 0xa508 movq -0x48(%rbp), %rdi movq 0x52a4d(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa51a movq 0x52a6f(%rip), %rdi # 0x5cf90 leaq 0x35dd3(%rip), %rsi # 0x402fb callq 0x7370 movq %rax, -0x68(%rbp) jmp 0xa533 movq -0x68(%rbp), %rdi movq 0x52a22(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa545 movq -0x50(%rbp), %rdi movb $0x0, -0x25(%rbp) callq 0xa850 movb %al, -0x69(%rbp) jmp 0xa557 movb -0x69(%rbp), %al andb $0x1, %al movb %al, -0x25(%rbp) jmp 0xa65e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0xa829 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0xa829 movq -0x20(%rbp), %rdi callq 0x7160 movq %rax, -0x30(%rbp) movq 0x52a3b(%rip), %rdi # 0x5cfe0 leaq 0x35d7f(%rip), %rsi # 0x4032b callq 0x7370 movq %rax, -0x78(%rbp) jmp 0xa5b7 movq -0x30(%rbp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq -0x78(%rbp), %rdi movq %rax, %rsi callq 0x7370 movq %rax, -0x80(%rbp) jmp 0xa5d6 movq -0x80(%rbp), %rdi movq 0x5297f(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa5e8 leaq -0x31(%rbp), %rdi movq %rdi, -0x88(%rbp) callq 0x7640 movq -0x60(%rbp), %rdi movq -0x88(%rbp), %rdx leaq 0x35d55(%rip), %rsi # 0x4035f callq 0xb600 jmp 0xa611 leaq -0x31(%rbp), %rdi callq 0x73c0 movl $0x1, -0x38(%rbp) callq 0x7590 jmp 0xa64d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0xa652 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x31(%rbp), %rdi callq 0x73c0 jmp 0xa652 jmp 0xa813 callq 0x7590 jmp 0xa659 jmp 0xa829 movq -0x50(%rbp), %rax testb $0x1, 0x58(%rax) je 0xa6f5 movq 0x5291d(%rip), %rdi # 0x5cf90 leaq 0x35cfe(%rip), %rsi # 0x40378 callq 0x7370 movq %rax, -0x90(%rbp) jmp 0xa688 movq -0x90(%rbp), %rdi movq 0x528ca(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa69d leaq -0x39(%rbp), %rdi movq %rdi, -0x98(%rbp) callq 0x7640 movq -0x60(%rbp), %rdi movq -0x98(%rbp), %rdx leaq 0x35cef(%rip), %rsi # 0x403ae callq 0xb600 jmp 0xa6c6 leaq -0x39(%rbp), %rdi callq 0x73c0 movl $0x1, -0x38(%rbp) jmp 0xa813 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x39(%rbp), %rdi callq 0x73c0 jmp 0xa829 testb $0x1, -0x25(%rbp) jne 0xa788 movq 0x5288a(%rip), %rdi # 0x5cf90 leaq 0x35cbf(%rip), %rsi # 0x403cc callq 0x7370 movq %rax, -0xa0(%rbp) jmp 0xa71b movq -0xa0(%rbp), %rdi movq 0x52837(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa730 leaq -0x3a(%rbp), %rdi movq %rdi, -0xa8(%rbp) callq 0x7640 movq -0x60(%rbp), %rdi movq -0xa8(%rbp), %rdx leaq 0x35cb5(%rip), %rsi # 0x40407 callq 0xb600 jmp 0xa759 leaq -0x3a(%rbp), %rdi callq 0x73c0 movl $0x1, -0x38(%rbp) jmp 0xa813 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x3a(%rbp), %rdi callq 0x73c0 jmp 0xa829 movq -0x50(%rbp), %rax movb $0x1, 0x58(%rax) movq 0x527f9(%rip), %rdi # 0x5cf90 leaq 0x35c8c(%rip), %rsi # 0x4042a callq 0x7370 movq %rax, -0xb0(%rbp) jmp 0xa7ac movq -0xb0(%rbp), %rdi movq 0x527a6(%rip), %rsi # 0x5cf60 callq 0x73b0 jmp 0xa7c1 leaq -0x3b(%rbp), %rdi movq %rdi, -0xb8(%rbp) callq 0x7640 movq -0x60(%rbp), %rdi movq -0xb8(%rbp), %rdx leaq 0x35ada(%rip), %rsi # 0x402bd callq 0xb600 jmp 0xa7ea leaq -0x3b(%rbp), %rdi callq 0x73c0 movl $0x1, -0x38(%rbp) jmp 0xa813 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) leaq -0x3b(%rbp), %rdi callq 0x73c0 jmp 0xa829 leaq -0x18(%rbp), %rdi callq 0xb780 movq -0x58(%rbp), %rax addq $0xc0, %rsp popq %rbp retq leaq -0x18(%rbp), %rdi callq 0xb780 movq -0x20(%rbp), %rdi callq 0x7630 movq %rax, %rdi callq 0x7ee0 nopw %cs:(%rax,%rax)
_ZN8Settings9startGameB5cxx11Ev: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_60], rdi mov rax, rdi mov [rbp+var_58], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] mov [rbp+var_50], rsi lea rdi, [rbp+var_18] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg; "Settings::startGame(): Checking conditi"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_48], rax jmp short $+2 loc_A508: mov rdi, [rbp+var_48] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A51A: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_0; "Settings::startGame(): Calling canFitSh"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_68], rax jmp short $+2 loc_A533: mov rdi, [rbp+var_68] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A545: mov rdi, [rbp+var_50]; this mov [rbp+var_25], 0 call _ZNK8Settings11canFitShipsEv; Settings::canFitShips(void) mov [rbp+var_69], al jmp short $+2 loc_A557: mov al, [rbp+var_69] and al, 1 mov [rbp+var_25], al jmp loc_A65E mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp loc_A829 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax mov eax, [rbp+var_24] mov ecx, 1 cmp eax, ecx jnz loc_A829 mov rdi, [rbp+var_20]; void * call ___cxa_begin_catch mov [rbp+var_30], rax mov rdi, cs:_ZSt4cerr_ptr lea rsi, aSettingsStartg_1; "Settings::startGame(): Exception in can"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_78], rax jmp short $+2 loc_A5B7: mov rdi, [rbp+var_30] mov rax, [rdi] mov rax, [rax+10h] call rax mov rdi, [rbp+var_78] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_80], rax jmp short $+2 loc_A5D6: mov rdi, [rbp+var_80] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A5E8: lea rdi, [rbp+var_31] mov [rbp+var_88], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_60] mov rdx, [rbp+var_88] lea rsi, aExceptionInCan; "exception in canFitShips" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A611: lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_38], 1 call ___cxa_end_catch jmp short loc_A64D mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_A652 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_A652 loc_A64D: jmp loc_A813 loc_A652: call ___cxa_end_catch jmp short $+2 loc_A659: jmp loc_A829 loc_A65E: mov rax, [rbp+var_50] test byte ptr [rax+58h], 1 jz loc_A6F5 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_2; "Settings::startGame(): Game has already"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_90], rax jmp short $+2 loc_A688: mov rdi, [rbp+var_90] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A69D: lea rdi, [rbp+var_39] mov [rbp+var_98], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_60] mov rdx, [rbp+var_98] lea rsi, aGameHasAlready; "game has already been started" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A6C6: lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_38], 1 jmp loc_A813 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_A829 loc_A6F5: test [rbp+var_25], 1 jnz loc_A788 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_3; "Settings::startGame(): Failed to fit al"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A0], rax jmp short $+2 loc_A71B: mov rdi, [rbp+var_A0] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A730: lea rdi, [rbp+var_3A] mov [rbp+var_A8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_60] mov rdx, [rbp+var_A8] lea rsi, aFailedToFitAll; "failed to fit all ships on the map" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A759: lea rdi, [rbp+var_3A] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_38], 1 jmp loc_A813 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_3A] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_A829 loc_A788: mov rax, [rbp+var_50] mov byte ptr [rax+58h], 1 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_4; "Settings::startGame(): Game started suc"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_B0], rax jmp short $+2 loc_A7AC: mov rdi, [rbp+var_B0] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_A7C1: lea rdi, [rbp+var_3B] mov [rbp+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rbp+var_60] mov rdx, [rbp+var_B8] lea rsi, aOk; "ok" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A7EA: lea rdi, [rbp+var_3B] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_38], 1 jmp short loc_A813 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax lea rdi, [rbp+var_3B] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_A829 loc_A813: lea rdi, [rbp+var_18] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rax, [rbp+var_58] add rsp, 0C0h pop rbp retn loc_A829: lea rdi, [rbp+var_18] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rdi, [rbp+var_20] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long Settings::startGame[abi:cxx11](long long a1, Settings *a2) { long long v3; // [rsp+10h] [rbp-B0h] long long v4; // [rsp+20h] [rbp-A0h] long long v5; // [rsp+30h] [rbp-90h] long long v6; // [rsp+58h] [rbp-68h] long long v7; // [rsp+78h] [rbp-48h] char v8; // [rsp+85h] [rbp-3Bh] BYREF char v9; // [rsp+86h] [rbp-3Ah] BYREF char v10; // [rsp+87h] [rbp-39h] BYREF int v11; // [rsp+88h] [rbp-38h] char v12; // [rsp+9Bh] [rbp-25h] _BYTE v13[8]; // [rsp+A8h] [rbp-18h] BYREF Settings *v14; // [rsp+B0h] [rbp-10h] long long v15; // [rsp+B8h] [rbp-8h] v15 = a1; v14 = a2; std::lock_guard<std::mutex>::lock_guard(v13); v7 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Checking conditions..."); std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>); v6 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Calling canFitShips()..."); std::ostream::operator<<(v6, &std::endl<char,std::char_traits<char>>); v12 = Settings::canFitShips(a2) & 1; if ( (*((_BYTE *)a2 + 88) & 1) != 0 ) { v5 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Game has already been started."); std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, "game has already been started", &v10); std::allocator<char>::~allocator(&v10); v11 = 1; } else { if ( (v12 & 1) != 0 ) { *((_BYTE *)a2 + 88) = 1; v3 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Game started successfully."); std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, "ok", &v8); std::allocator<char>::~allocator(&v8); } else { v4 = std::operator<<<std::char_traits<char>>( &std::cout, "Settings::startGame(): Failed to fit all ships on the map."); std::ostream::operator<<(v4, &std::endl<char,std::char_traits<char>>); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, "failed to fit all ships on the map", &v9); std::allocator<char>::~allocator(&v9); } v11 = 1; } std::lock_guard<std::mutex>::~lock_guard(v13); return a1; }
startGame[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x60],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RSI LEA RDI,[RBP + -0x18] CALL 0x0010b6f0 LAB_0010a4ef: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x1402cd] CALL 0x00107370 MOV qword ptr [RBP + -0x48],RAX JMP 0x0010a508 LAB_0010a508: MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [0x0015cf60] CALL 0x001073b0 JMP 0x0010a51a LAB_0010a51a: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x1402fb] CALL 0x00107370 MOV qword ptr [RBP + -0x68],RAX JMP 0x0010a533 LAB_0010a533: MOV RDI,qword ptr [RBP + -0x68] MOV RSI,qword ptr [0x0015cf60] CALL 0x001073b0 JMP 0x0010a545 LAB_0010a545: MOV RDI,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0x25],0x0 LAB_0010a54d: CALL 0x0010a850 LAB_0010a552: MOV byte ptr [RBP + -0x69],AL JMP 0x0010a557 LAB_0010a557: MOV AL,byte ptr [RBP + -0x69] AND AL,0x1 MOV byte ptr [RBP + -0x25],AL JMP 0x0010a65e LAB_0010a65e: MOV RAX,qword ptr [RBP + -0x50] TEST byte ptr [RAX + 0x58],0x1 JZ 0x0010a6f5 LAB_0010a66c: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x140378] CALL 0x00107370 MOV qword ptr [RBP + -0x90],RAX JMP 0x0010a688 LAB_0010a688: MOV RDI,qword ptr [RBP + -0x90] MOV RSI,qword ptr [0x0015cf60] CALL 0x001073b0 JMP 0x0010a69d LAB_0010a69d: LEA RDI,[RBP + -0x39] MOV qword ptr [RBP + -0x98],RDI CALL 0x00107640 MOV RDI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x98] LAB_0010a6b8: LEA RSI,[0x1403ae] CALL 0x0010b600 JMP 0x0010a6c6 LAB_0010a6c6: LEA RDI,[RBP + -0x39] CALL 0x001073c0 MOV dword ptr [RBP + -0x38],0x1 JMP 0x0010a813 LAB_0010a6f5: TEST byte ptr [RBP + -0x25],0x1 JNZ 0x0010a788 LAB_0010a6ff: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x1403cc] CALL 0x00107370 MOV qword ptr [RBP + -0xa0],RAX JMP 0x0010a71b LAB_0010a71b: MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [0x0015cf60] CALL 0x001073b0 JMP 0x0010a730 LAB_0010a730: LEA RDI,[RBP + -0x3a] MOV qword ptr [RBP + -0xa8],RDI CALL 0x00107640 MOV RDI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0xa8] LAB_0010a74b: LEA RSI,[0x140407] CALL 0x0010b600 JMP 0x0010a759 LAB_0010a759: LEA RDI,[RBP + -0x3a] CALL 0x001073c0 MOV dword ptr [RBP + -0x38],0x1 JMP 0x0010a813 LAB_0010a788: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x58],0x1 LAB_0010a790: MOV RDI,qword ptr [0x0015cf90] LEA RSI,[0x14042a] CALL 0x00107370 MOV qword ptr [RBP + -0xb0],RAX JMP 0x0010a7ac LAB_0010a7ac: MOV RDI,qword ptr [RBP + -0xb0] MOV RSI,qword ptr [0x0015cf60] CALL 0x001073b0 JMP 0x0010a7c1 LAB_0010a7c1: LEA RDI,[RBP + -0x3b] MOV qword ptr [RBP + -0xb8],RDI CALL 0x00107640 MOV RDI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0xb8] LAB_0010a7dc: LEA RSI,[0x1402bd] CALL 0x0010b600 LAB_0010a7e8: JMP 0x0010a7ea LAB_0010a7ea: LEA RDI,[RBP + -0x3b] CALL 0x001073c0 MOV dword ptr [RBP + -0x38],0x1 JMP 0x0010a813 LAB_0010a813: LEA RDI,[RBP + -0x18] CALL 0x0010b780 MOV RAX,qword ptr [RBP + -0x58] ADD RSP,0xc0 POP RBP RET
/* Settings::startGame[abi:cxx11]() */ string * Settings::startGame_abi_cxx11_(void) { ostream *poVar1; mutex *in_RSI; string *in_RDI; allocator local_43; allocator local_42; allocator local_41; int4 local_40; byte local_2d; lock_guard<std::mutex> local_20 [24]; std::lock_guard<std::mutex>::lock_guard(local_20,in_RSI); /* try { // try from 0010a4ef to 0010a542 has its CatchHandler @ 0010a564 */ poVar1 = std::operator<<((ostream *)PTR_cout_0015cf90, "Settings::startGame(): Checking conditions..."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0015cf60); poVar1 = std::operator<<((ostream *)PTR_cout_0015cf90, "Settings::startGame(): Calling canFitShips()..."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0015cf60); local_2d = 0; /* try { // try from 0010a54d to 0010a551 has its CatchHandler @ 0010a575 */ local_2d = canFitShips((Settings *)in_RSI); local_2d = local_2d & 1; if (((byte)in_RSI[0x58] & 1) == 0) { if (local_2d == 0) { /* try { // try from 0010a6ff to 0010a72d has its CatchHandler @ 0010a564 */ poVar1 = std::operator<<((ostream *)PTR_cout_0015cf90, "Settings::startGame(): Failed to fit all ships on the map."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0015cf60); std::allocator<char>::allocator(); /* try { // try from 0010a74b to 0010a756 has its CatchHandler @ 0010a76e */ std::__cxx11::string::string<std::allocator<char>> (in_RDI,"failed to fit all ships on the map",&local_42); std::allocator<char>::~allocator((allocator<char> *)&local_42); } else { in_RSI[0x58] = (mutex)0x1; /* try { // try from 0010a790 to 0010a7be has its CatchHandler @ 0010a564 */ poVar1 = std::operator<<((ostream *)PTR_cout_0015cf90, "Settings::startGame(): Game started successfully."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_0015cf60); std::allocator<char>::allocator(); /* try { // try from 0010a7dc to 0010a7e7 has its CatchHandler @ 0010a7fc */ std::__cxx11::string::string<std::allocator<char>>(in_RDI,"ok",&local_43); std::allocator<char>::~allocator((allocator<char> *)&local_43); } } else { /* try { // try from 0010a66c to 0010a69a has its CatchHandler @ 0010a564 */ poVar1 = std::operator<<((ostream *)PTR_cout_0015cf90, "Settings::startGame(): Game has already been started."); std::ostream::operator<< (poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0015cf60 ); std::allocator<char>::allocator(); /* try { // try from 0010a6b8 to 0010a6c3 has its CatchHandler @ 0010a6db */ std::__cxx11::string::string<std::allocator<char>> (in_RDI,"game has already been started",&local_41); std::allocator<char>::~allocator((allocator<char> *)&local_41); } local_40 = 1; std::lock_guard<std::mutex>::~lock_guard(local_20); return in_RDI; }
30,401
Settings::startGame[abi:cxx11]()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::startGame() { std::lock_guard<std::mutex> lock(settings_mutex); std::cout << "Settings::startGame(): Checking conditions..." << std::endl; std::cout << "Settings::startGame(): Calling canFitShips()..." << std::endl; bool fit = false; try { fit = canFitShips(); } catch (const std::exception& e) { std::cerr << "Settings::startGame(): Exception in canFitShips(): " << e.what() << std::endl; return "exception in canFitShips"; } if (start) { std::cout << "Settings::startGame(): Game has already been started." << std::endl; return "game has already been started"; } if (!fit) { std::cout << "Settings::startGame(): Failed to fit all ships on the map." << std::endl; return "failed to fit all ships on the map"; } start = true; std::cout << "Settings::startGame(): Game started successfully." << std::endl; return "ok"; }
O1
cpp
Settings::startGame[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x5500 testl %eax, %eax jne 0x6b58 movq 0x1e624(%rip), %r15 # 0x24fa0 leaq 0x138c2(%rip), %rsi # 0x1a245 movl $0x2d, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e5f2(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 movq 0x1e5de(%rip), %r15 # 0x24fa0 leaq 0x138aa(%rip), %rsi # 0x1a273 movl $0x2f, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e5ac(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 movq %rbx, %rdi callq 0x6c10 cmpb $0x0, 0x58(%rbx) je 0x6a77 movq 0x1e58a(%rip), %r15 # 0x24fa0 leaq 0x138d3(%rip), %rsi # 0x1a2f0 movl $0x35, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e558(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x138c3(%rip), %rsi # 0x1a326 leaq 0x138d9(%rip), %rdx # 0x1a343 movq %r14, %rdi callq 0x6106 jmp 0x6b47 testb %al, %al je 0x6ae4 movb $0x1, 0x58(%rbx) movq 0x1e51a(%rip), %r15 # 0x24fa0 leaq 0x13915(%rip), %rsi # 0x1a3a2 movl $0x31, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e4e8(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x13762(%rip), %rsi # 0x1a235 leaq 0x1375d(%rip), %rdx # 0x1a237 movq %r14, %rdi callq 0x6106 jmp 0x6b47 movq 0x1e4b5(%rip), %r15 # 0x24fa0 leaq 0x13852(%rip), %rsi # 0x1a344 movl $0x3a, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e483(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x13847(%rip), %rsi # 0x1a37f leaq 0x13862(%rip), %rdx # 0x1a3a1 movq %r14, %rdi callq 0x6106 movq %rbx, %rdi callq 0x52d0 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movl %eax, %edi callq 0x5260 jmp 0x6bfc jmp 0x6bfc jmp 0x6bfc movq %rax, %r15 cmpl $0x1, %edx jne 0x6bff movq %r15, %rdi callq 0x5150 movq %rax, %r15 movq 0x1e454(%rip), %rdi # 0x24fe0 leaq 0x13710(%rip), %rsi # 0x1a2a3 movl $0x33, %edx callq 0x5400 movq (%r15), %rax movq %r15, %rdi callq *0x10(%rax) movq 0x1e433(%rip), %rdi # 0x24fe0 movq %rax, %rsi callq 0x5360 movq %rax, %rdi callq 0x5190 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x1370c(%rip), %rsi # 0x1a2d7 leaq 0x1371d(%rip), %rdx # 0x1a2ef movq %r14, %rdi callq 0x6106 callq 0x5570 jmp 0x6b47 jmp 0x6bfc jmp 0x6be8 movq %rax, %r15 callq 0x5570 jmp 0x6bff movq %rax, %rdi callq 0x5fbc jmp 0x6bfc movq %rax, %r15 movq %rbx, %rdi callq 0x52d0 movq %r15, %rdi callq 0x55e0 nop
_ZN8Settings9startGameB5cxx11Ev: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz loc_6B58 mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg; "Settings::startGame(): Checking conditi"... mov edx, 2Dh ; '-' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_0; "Settings::startGame(): Calling canFitSh"... mov edx, 2Fh ; '/' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, rbx; this call _ZNK8Settings11canFitShipsEv; Settings::canFitShips(void) cmp byte ptr [rbx+58h], 0 jz short loc_6A77 mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_1; "Settings::startGame(): Game has already"... mov edx, 35h ; '5' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aGameHasAlready; "game has already been started" lea rdx, aGameHasAlready+1Dh; "" mov rdi, r14 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) jmp loc_6B47 loc_6A77: test al, al jz short loc_6AE4 mov byte ptr [rbx+58h], 1 mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_2; "Settings::startGame(): Game started suc"... mov edx, 31h ; '1' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aOk; "ok" lea rdx, aOk+2; "" mov rdi, r14 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) jmp short loc_6B47 loc_6AE4: mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_3; "Settings::startGame(): Failed to fit al"... mov edx, 3Ah ; ':' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aFailedToFitAll; "failed to fit all ships on the map" lea rdx, aFailedToFitAll+22h; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_6B47: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 pop rbx pop r14 pop r15 retn loc_6B58: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp loc_6BFC jmp loc_6BFC jmp loc_6BFC mov r15, rax cmp edx, 1 jnz loc_6BFF mov rdi, r15; void * call ___cxa_begin_catch mov r15, rax mov rdi, cs:_ZSt4cerr_ptr lea rsi, aSettingsStartg_4; "Settings::startGame(): Exception in can"... mov edx, 33h ; '3' 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] mov rdi, r15 call qword ptr [rax+10h] mov rdi, cs:_ZSt4cerr_ptr mov rsi, 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 &) lea rax, [r14+10h] mov [r14], rax lea rsi, aExceptionInCan; "exception in canFitShips" lea rdx, aExceptionInCan+18h; "" mov rdi, r14 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) call ___cxa_end_catch jmp loc_6B47 jmp short loc_6BFC jmp short $+2 loc_6BE8: mov r15, rax call ___cxa_end_catch jmp short loc_6BFF mov rdi, rax call __clang_call_terminate jmp short $+2 loc_6BFC: mov r15, rax loc_6BFF: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r15 call __Unwind_Resume
_QWORD * Settings::startGame[abi:cxx11](_QWORD *a1, Settings *a2) { int v2; // eax char v3; // al std::ostream *v4; // rax char v5; // al std::ostream *v6; // rax char canFitShips; // al char v8; // al std::ostream *v9; // rax char v10; // al std::ostream *v11; // rax char v12; // al std::ostream *v13; // rax v2 = pthread_mutex_lock(a2); if ( v2 ) std::__throw_system_error(v2); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Settings::startGame(): Checking conditions...", 45LL); v3 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v4 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v3); std::ostream::flush(v4); std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Calling canFitShips()...", 47LL); v5 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v5); std::ostream::flush(v6); canFitShips = Settings::canFitShips(a2); if ( *((_BYTE *)a2 + 88) ) { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Game has already been started.", 53LL); v8 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v9 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v8); std::ostream::flush(v9); *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "game has already been started", (long long)""); } else if ( canFitShips ) { *((_BYTE *)a2 + 88) = 1; std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Game started successfully.", 49LL); v10 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v10); std::ostream::flush(v11); *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "ok", (long long)""); } else { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Failed to fit all ships on the map.", 58LL); v12 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v13 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v12); std::ostream::flush(v13); *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "failed to fit all ships on the map", (long long)""); } pthread_mutex_unlock(a2); return a1; }
startGame[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00105500 TEST EAX,EAX JNZ 0x00106b58 LAB_00106975: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a245] MOV EDX,0x2d MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a273] MOV EDX,0x2f MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LAB_00106a01: MOV RDI,RBX CALL 0x00106c10 CMP byte ptr [RBX + 0x58],0x0 JZ 0x00106a77 LAB_00106a0f: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a2f0] MOV EDX,0x35 MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106a5c: LEA RSI,[0x11a326] LEA RDX,[0x11a343] MOV RDI,R14 CALL 0x00106106 JMP 0x00106b47 LAB_00106a77: TEST AL,AL JZ 0x00106ae4 MOV byte ptr [RBX + 0x58],0x1 LAB_00106a7f: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a3a2] MOV EDX,0x31 MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106acc: LEA RSI,[0x11a235] LEA RDX,[0x11a237] MOV RDI,R14 CALL 0x00106106 JMP 0x00106b47 LAB_00106ae4: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a344] MOV EDX,0x3a MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106b31: LEA RSI,[0x11a37f] LEA RDX,[0x11a3a1] MOV RDI,R14 CALL 0x00106106 LAB_00106b47: MOV RDI,RBX CALL 0x001052d0 MOV RAX,R14 POP RBX POP R14 POP R15 RET LAB_00106b58: MOV EDI,EAX CALL 0x00105260
/* Settings::startGame[abi:cxx11]() */ void Settings::startGame_abi_cxx11_(void) { char cVar1; int *puVar2; char cVar3; int iVar4; pthread_mutex_t *in_RSI; long *in_RDI; iVar4 = pthread_mutex_lock(in_RSI); puVar2 = PTR_cout_00124fa0; if (iVar4 == 0) { /* try { // try from 00106975 to 00106a00 has its CatchHandler @ 00106bfc */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Checking conditions...",0x2d); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); puVar2 = PTR_cout_00124fa0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Calling canFitShips()...",0x2f); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); /* try { // try from 00106a01 to 00106a08 has its CatchHandler @ 00106b6e */ cVar3 = canFitShips((Settings *)&in_RSI->__data); puVar2 = PTR_cout_00124fa0; cVar1 = (char)PTR_cout_00124fa0; if (*(char *)((long)in_RSI + 0x58) == '\0') { if (cVar3 == '\0') { /* try { // try from 00106ae4 to 00106b29 has its CatchHandler @ 00106bfa */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0, "Settings::startGame(): Failed to fit all ships on the map.",0x3a); std::ios::widen(cVar1 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106b31 to 00106b46 has its CatchHandler @ 00106b5f */ std::__cxx11::string::_M_construct<char_const*>(); } else { *(int1 *)((long)in_RSI + 0x58) = 1; puVar2 = PTR_cout_00124fa0; /* try { // try from 00106a7f to 00106ac4 has its CatchHandler @ 00106bfa */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Game started successfully.", 0x31); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106acc to 00106ae1 has its CatchHandler @ 00106b64 */ std::__cxx11::string::_M_construct<char_const*>(); } } else { /* try { // try from 00106a0f to 00106a54 has its CatchHandler @ 00106bfa */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0, "Settings::startGame(): Game has already been started.",0x35); std::ios::widen(cVar1 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106a5c to 00106a71 has its CatchHandler @ 00106b69 */ std::__cxx11::string::_M_construct<char_const*>(); } pthread_mutex_unlock(in_RSI); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar4); }
30,402
Settings::startGame[abi:cxx11]()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::startGame() { std::lock_guard<std::mutex> lock(settings_mutex); std::cout << "Settings::startGame(): Checking conditions..." << std::endl; std::cout << "Settings::startGame(): Calling canFitShips()..." << std::endl; bool fit = false; try { fit = canFitShips(); } catch (const std::exception& e) { std::cerr << "Settings::startGame(): Exception in canFitShips(): " << e.what() << std::endl; return "exception in canFitShips"; } if (start) { std::cout << "Settings::startGame(): Game has already been started." << std::endl; return "game has already been started"; } if (!fit) { std::cout << "Settings::startGame(): Failed to fit all ships on the map." << std::endl; return "failed to fit all ships on the map"; } start = true; std::cout << "Settings::startGame(): Game started successfully." << std::endl; return "ok"; }
O2
cpp
Settings::startGame[abi:cxx11](): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x6e34 movq 0x1ebf7(%rip), %rdi # 0x24f98 leaq 0x10e9d(%rip), %rsi # 0x17245 callq 0x5340 movq %rax, %rdi callq 0x5190 movq 0x1ebdc(%rip), %rdi # 0x24f98 leaq 0x10eb0(%rip), %rsi # 0x17273 callq 0x5340 movq %rax, %rdi callq 0x5190 movq %rbx, %rdi callq 0x6520 cmpb $0x0, 0x58(%rbx) je 0x640f movq 0x1ebb3(%rip), %rdi # 0x24f98 leaq 0x10f04(%rip), %rsi # 0x172f0 callq 0x5340 movq %rax, %rdi callq 0x5190 leaq 0x10f26(%rip), %rsi # 0x17326 leaq 0x6(%rsp), %rdx movq %r14, %rdi callq 0x6b2a jmp 0x6477 testb %al, %al je 0x6448 movb $0x1, 0x58(%rbx) movq 0x1eb7a(%rip), %rdi # 0x24f98 leaq 0x10f7d(%rip), %rsi # 0x173a2 callq 0x5340 movq %rax, %rdi callq 0x5190 leaq 0x10dfc(%rip), %rsi # 0x17235 leaq 0x4(%rsp), %rdx movq %r14, %rdi callq 0x6b2a jmp 0x6477 movq 0x1eb49(%rip), %rdi # 0x24f98 leaq 0x10eee(%rip), %rsi # 0x17344 callq 0x5340 movq %rax, %rdi callq 0x5190 leaq 0x10f15(%rip), %rsi # 0x1737f leaq 0x5(%rsp), %rdx movq %r14, %rdi callq 0x6b2a movq %rbx, %rdi callq 0x52c0 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x650c jmp 0x650c jmp 0x650c movq %rax, %r15 cmpl $0x1, %edx jne 0x650f movq %r15, %rdi callq 0x5140 movq %rax, %r15 movq 0x1eb3a(%rip), %rdi # 0x24fe8 leaq 0x10dee(%rip), %rsi # 0x172a3 callq 0x5340 movq %rax, %r12 movq (%r15), %rax movq %r15, %rdi callq *0x10(%rax) movq %r12, %rdi movq %rax, %rsi callq 0x5340 movq %rax, %rdi callq 0x5190 leaq 0x10df7(%rip), %rsi # 0x172d7 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x6b2a callq 0x5520 jmp 0x6477 jmp 0x650c jmp 0x64f8 movq %rax, %r15 callq 0x5520 jmp 0x650f movq %rax, %rdi callq 0x5b7c jmp 0x650c movq %rax, %r15 movq %rbx, %rdi callq 0x52c0 movq %r15, %rdi callq 0x5590 nop
_ZN8Settings9startGameB5cxx11Ev: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, rsi; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg; "Settings::startGame(): Checking conditi"... 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 rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_0; "Settings::startGame(): Calling canFitSh"... 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 rdi, rbx; this call _ZNK8Settings11canFitShipsEv; Settings::canFitShips(void) cmp byte ptr [rbx+58h], 0 jz short loc_640F mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_1; "Settings::startGame(): Game has already"... 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 &) lea rsi, aGameHasAlready; "game has already been started" lea rdx, [rsp+28h+var_22] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_6477 loc_640F: test al, al jz short loc_6448 mov byte ptr [rbx+58h], 1 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_2; "Settings::startGame(): Game started suc"... 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 &) lea rsi, aOk; "ok" lea rdx, [rsp+28h+var_24] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short loc_6477 loc_6448: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_3; "Settings::startGame(): Failed to fit al"... 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 &) lea rsi, aFailedToFitAll; "failed to fit all ships on the map" lea rdx, [rsp+28h+var_23] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_6477: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn jmp short loc_650C jmp short loc_650C jmp short loc_650C mov r15, rax cmp edx, 1 jnz short loc_650F mov rdi, r15; void * call ___cxa_begin_catch mov r15, rax mov rdi, cs:_ZSt4cerr_ptr lea rsi, aSettingsStartg_4; "Settings::startGame(): Exception in can"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r12, rax mov rax, [r15] mov rdi, r15 call qword ptr [rax+10h] mov rdi, r12 mov rsi, 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 &) lea rsi, aExceptionInCan; "exception in canFitShips" lea rdx, [rsp+28h+var_21] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) call ___cxa_end_catch jmp short loc_6477 jmp short loc_650C jmp short $+2 loc_64F8: mov r15, rax call ___cxa_end_catch jmp short loc_650F mov rdi, rax call __clang_call_terminate jmp short $+2 loc_650C: mov r15, rax loc_650F: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r15 call __Unwind_Resume
long long Settings::startGame[abi:cxx11](long long a1, std::mutex *a2) { long long v2; // rax long long v3; // rax long long v4; // rax char canFitShips; // al long long v6; // rax long long v7; // rax long long v8; // rax _DWORD v10[9]; // [rsp+0h] [rbp-24h] BYREF v10[0] = HIDWORD(v2); std::mutex::lock(a2); v3 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Checking conditions..."); std::endl<char,std::char_traits<char>>(v3); v4 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Calling canFitShips()..."); std::endl<char,std::char_traits<char>>(v4); canFitShips = Settings::canFitShips(a2); if ( *((_BYTE *)a2 + 88) ) { v6 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Game has already been started."); std::endl<char,std::char_traits<char>>(v6); std::string::basic_string<std::allocator<char>>(a1, "game has already been started", (char *)v10 + 2); } else if ( canFitShips ) { *((_BYTE *)a2 + 88) = 1; v7 = std::operator<<<std::char_traits<char>>(&std::cout, "Settings::startGame(): Game started successfully."); std::endl<char,std::char_traits<char>>(v7); std::string::basic_string<std::allocator<char>>(a1, "ok", v10); } else { v8 = std::operator<<<std::char_traits<char>>( &std::cout, "Settings::startGame(): Failed to fit all ships on the map."); std::endl<char,std::char_traits<char>>(v8); std::string::basic_string<std::allocator<char>>(a1, "failed to fit all ships on the map", (char *)v10 + 1); } pthread_mutex_unlock(a2); return a1; }
startGame[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00106e34 LAB_0010639a: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x117245] CALL 0x00105340 MOV RDI,RAX CALL 0x00105190 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x117273] CALL 0x00105340 MOV RDI,RAX CALL 0x00105190 LAB_001063d0: MOV RDI,RBX CALL 0x00106520 CMP byte ptr [RBX + 0x58],0x0 JZ 0x0010640f LAB_001063de: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x1172f0] CALL 0x00105340 MOV RDI,RAX CALL 0x00105190 LAB_001063f9: LEA RSI,[0x117326] LEA RDX,[RSP + 0x6] MOV RDI,R14 CALL 0x00106b2a JMP 0x00106477 LAB_0010640f: TEST AL,AL JZ 0x00106448 MOV byte ptr [RBX + 0x58],0x1 LAB_00106417: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x1173a2] CALL 0x00105340 MOV RDI,RAX CALL 0x00105190 LAB_00106432: LEA RSI,[0x117235] LEA RDX,[RSP + 0x4] MOV RDI,R14 CALL 0x00106b2a JMP 0x00106477 LAB_00106448: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x117344] CALL 0x00105340 MOV RDI,RAX CALL 0x00105190 LAB_00106463: LEA RSI,[0x11737f] LEA RDX,[RSP + 0x5] MOV RDI,R14 CALL 0x00106b2a LAB_00106477: MOV RDI,RBX CALL 0x001052c0 MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* Settings::startGame[abi:cxx11]() */ void Settings::startGame_abi_cxx11_(void) { char cVar1; ostream *poVar2; pthread_mutex_t *in_RSI; string *in_RDI; allocator local_24; allocator local_23; allocator local_22 [2]; std::mutex::lock(); /* try { // try from 0010639a to 001063cf has its CatchHandler @ 0010650c */ poVar2 = std::operator<<((ostream *)PTR_cout_00124f98, "Settings::startGame(): Checking conditions..."); std::endl<char,std::char_traits<char>>(poVar2); poVar2 = std::operator<<((ostream *)PTR_cout_00124f98, "Settings::startGame(): Calling canFitShips()..."); std::endl<char,std::char_traits<char>>(poVar2); /* try { // try from 001063d0 to 001063d7 has its CatchHandler @ 00106494 */ cVar1 = canFitShips((Settings *)&in_RSI->__data); if (*(char *)((long)in_RSI + 0x58) == '\0') { if (cVar1 == '\0') { /* try { // try from 00106448 to 00106462 has its CatchHandler @ 0010650a */ poVar2 = std::operator<<((ostream *)PTR_cout_00124f98, "Settings::startGame(): Failed to fit all ships on the map."); std::endl<char,std::char_traits<char>>(poVar2); /* try { // try from 00106463 to 00106476 has its CatchHandler @ 0010648e */ std::__cxx11::string::string<std::allocator<char>> (in_RDI,"failed to fit all ships on the map",&local_23); } else { *(int1 *)((long)in_RSI + 0x58) = 1; /* try { // try from 00106417 to 00106431 has its CatchHandler @ 0010650a */ poVar2 = std::operator<<((ostream *)PTR_cout_00124f98, "Settings::startGame(): Game started successfully."); std::endl<char,std::char_traits<char>>(poVar2); /* try { // try from 00106432 to 00106445 has its CatchHandler @ 00106490 */ std::__cxx11::string::string<std::allocator<char>>(in_RDI,"ok",&local_24); } } else { /* try { // try from 001063de to 001063f8 has its CatchHandler @ 0010650a */ poVar2 = std::operator<<((ostream *)PTR_cout_00124f98, "Settings::startGame(): Game has already been started."); std::endl<char,std::char_traits<char>>(poVar2); /* try { // try from 001063f9 to 0010640c has its CatchHandler @ 00106492 */ std::__cxx11::string::string<std::allocator<char>> (in_RDI,"game has already been started",local_22); } pthread_mutex_unlock(in_RSI); return; }
30,403
Settings::startGame[abi:cxx11]()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
std::string Settings::startGame() { std::lock_guard<std::mutex> lock(settings_mutex); std::cout << "Settings::startGame(): Checking conditions..." << std::endl; std::cout << "Settings::startGame(): Calling canFitShips()..." << std::endl; bool fit = false; try { fit = canFitShips(); } catch (const std::exception& e) { std::cerr << "Settings::startGame(): Exception in canFitShips(): " << e.what() << std::endl; return "exception in canFitShips"; } if (start) { std::cout << "Settings::startGame(): Game has already been started." << std::endl; return "game has already been started"; } if (!fit) { std::cout << "Settings::startGame(): Failed to fit all ships on the map." << std::endl; return "failed to fit all ships on the map"; } start = true; std::cout << "Settings::startGame(): Game started successfully." << std::endl; return "ok"; }
O3
cpp
Settings::startGame[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x5500 testl %eax, %eax jne 0x6afc movq 0x1e680(%rip), %r15 # 0x24fa0 leaq 0x1391e(%rip), %rsi # 0x1a245 movl $0x2d, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e64e(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 movq 0x1e63a(%rip), %r15 # 0x24fa0 leaq 0x13906(%rip), %rsi # 0x1a273 movl $0x2f, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e608(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 movq %rbx, %rdi callq 0x6bb4 cmpb $0x0, 0x58(%rbx) je 0x6a1b movq 0x1e5e6(%rip), %r15 # 0x24fa0 leaq 0x1392f(%rip), %rsi # 0x1a2f0 movl $0x35, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e5b4(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x1391f(%rip), %rsi # 0x1a326 leaq 0x13935(%rip), %rdx # 0x1a343 movq %r14, %rdi callq 0x60b6 jmp 0x6aeb testb %al, %al je 0x6a88 movb $0x1, 0x58(%rbx) movq 0x1e576(%rip), %r15 # 0x24fa0 leaq 0x13971(%rip), %rsi # 0x1a3a2 movl $0x31, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e544(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x137be(%rip), %rsi # 0x1a235 leaq 0x137b9(%rip), %rdx # 0x1a237 movq %r14, %rdi callq 0x60b6 jmp 0x6aeb movq 0x1e511(%rip), %r15 # 0x24fa0 leaq 0x138ae(%rip), %rsi # 0x1a344 movl $0x3a, %edx movq %r15, %rdi callq 0x5400 movq (%r15), %rax addq -0x18(%rax), %r15 movq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %esi movq 0x1e4df(%rip), %rdi # 0x24fa0 callq 0x5040 movq %rax, %rdi callq 0x5280 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x138a3(%rip), %rsi # 0x1a37f leaq 0x138be(%rip), %rdx # 0x1a3a1 movq %r14, %rdi callq 0x60b6 movq %rbx, %rdi callq 0x52d0 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movl %eax, %edi callq 0x5260 jmp 0x6ba0 jmp 0x6ba0 jmp 0x6ba0 movq %rax, %r15 cmpl $0x1, %edx jne 0x6ba3 movq %r15, %rdi callq 0x5150 movq %rax, %r15 movq 0x1e4b0(%rip), %rdi # 0x24fe0 leaq 0x1376c(%rip), %rsi # 0x1a2a3 movl $0x33, %edx callq 0x5400 movq (%r15), %rax movq %r15, %rdi callq *0x10(%rax) movq 0x1e48f(%rip), %rdi # 0x24fe0 movq %rax, %rsi callq 0x5360 movq %rax, %rdi callq 0x5190 leaq 0x10(%r14), %rax movq %rax, (%r14) leaq 0x13768(%rip), %rsi # 0x1a2d7 leaq 0x13779(%rip), %rdx # 0x1a2ef movq %r14, %rdi callq 0x60b6 callq 0x5570 jmp 0x6aeb jmp 0x6ba0 jmp 0x6b8c movq %rax, %r15 callq 0x5570 jmp 0x6ba3 movq %rax, %rdi callq 0x5f6c jmp 0x6ba0 movq %rax, %r15 movq %rbx, %rdi callq 0x52d0 movq %r15, %rdi callq 0x55e0 nop
_ZN8Settings9startGameB5cxx11Ev: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov rdi, rsi call _pthread_mutex_lock test eax, eax jnz loc_6AFC mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg; "Settings::startGame(): Checking conditi"... mov edx, 2Dh ; '-' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_0; "Settings::startGame(): Calling canFitSh"... mov edx, 2Fh ; '/' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, rbx; this call _ZNK8Settings11canFitShipsEv; Settings::canFitShips(void) cmp byte ptr [rbx+58h], 0 jz short loc_6A1B mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_1; "Settings::startGame(): Game has already"... mov edx, 35h ; '5' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aGameHasAlready; "game has already been started" lea rdx, aGameHasAlready+1Dh; "" mov rdi, r14 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) jmp loc_6AEB loc_6A1B: test al, al jz short loc_6A88 mov byte ptr [rbx+58h], 1 mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_2; "Settings::startGame(): Game started suc"... mov edx, 31h ; '1' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aOk; "ok" lea rdx, aOk+2; "" mov rdi, r14 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) jmp short loc_6AEB loc_6A88: mov r15, cs:_ZSt4cout_ptr lea rsi, aSettingsStartg_3; "Settings::startGame(): Failed to fit al"... mov edx, 3Ah ; ':' 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 rax, [r15] add r15, [rax-18h] mov rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, cs:_ZSt4cout_ptr; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [r14+10h] mov [r14], rax lea rsi, aFailedToFitAll; "failed to fit all ships on the map" lea rdx, aFailedToFitAll+22h; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_6AEB: mov rdi, rbx call _pthread_mutex_unlock mov rax, r14 pop rbx pop r14 pop r15 retn loc_6AFC: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp loc_6BA0 jmp loc_6BA0 jmp loc_6BA0 mov r15, rax cmp edx, 1 jnz loc_6BA3 mov rdi, r15; void * call ___cxa_begin_catch mov r15, rax mov rdi, cs:_ZSt4cerr_ptr lea rsi, aSettingsStartg_4; "Settings::startGame(): Exception in can"... mov edx, 33h ; '3' 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] mov rdi, r15 call qword ptr [rax+10h] mov rdi, cs:_ZSt4cerr_ptr mov rsi, 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 &) lea rax, [r14+10h] mov [r14], rax lea rsi, aExceptionInCan; "exception in canFitShips" lea rdx, aExceptionInCan+18h; "" mov rdi, r14 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) call ___cxa_end_catch jmp loc_6AEB jmp short loc_6BA0 jmp short $+2 loc_6B8C: mov r15, rax call ___cxa_end_catch jmp short loc_6BA3 mov rdi, rax call __clang_call_terminate jmp short $+2 loc_6BA0: mov r15, rax loc_6BA3: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r15 call __Unwind_Resume
_QWORD * Settings::startGame[abi:cxx11](_QWORD *a1, Settings *a2) { int v2; // eax char v3; // al std::ostream *v4; // rax char v5; // al std::ostream *v6; // rax char canFitShips; // al char v8; // al std::ostream *v9; // rax char v10; // al std::ostream *v11; // rax char v12; // al std::ostream *v13; // rax v2 = pthread_mutex_lock(a2); if ( v2 ) std::__throw_system_error(v2); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Settings::startGame(): Checking conditions...", 45LL); v3 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v4 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v3); std::ostream::flush(v4); std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Calling canFitShips()...", 47LL); v5 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v5); std::ostream::flush(v6); canFitShips = Settings::canFitShips(a2); if ( *((_BYTE *)a2 + 88) ) { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Game has already been started.", 53LL); v8 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v9 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v8); std::ostream::flush(v9); *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "game has already been started", (long long)""); } else if ( canFitShips ) { *((_BYTE *)a2 + 88) = 1; std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Game started successfully.", 49LL); v10 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v11 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v10); std::ostream::flush(v11); *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "ok", (long long)""); } else { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Settings::startGame(): Failed to fit all ships on the map.", 58LL); v12 = std::ios::widen((char *)&std::cout + *(_QWORD *)(std::cout - 24LL), 10LL); v13 = (std::ostream *)std::ostream::put((std::ostream *)&std::cout, v12); std::ostream::flush(v13); *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "failed to fit all ships on the map", (long long)""); } pthread_mutex_unlock(a2); return a1; }
startGame[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00105500 TEST EAX,EAX JNZ 0x00106afc LAB_00106919: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a245] MOV EDX,0x2d MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a273] MOV EDX,0x2f MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LAB_001069a5: MOV RDI,RBX CALL 0x00106bb4 CMP byte ptr [RBX + 0x58],0x0 JZ 0x00106a1b LAB_001069b3: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a2f0] MOV EDX,0x35 MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106a00: LEA RSI,[0x11a326] LEA RDX,[0x11a343] MOV RDI,R14 CALL 0x001060b6 JMP 0x00106aeb LAB_00106a1b: TEST AL,AL JZ 0x00106a88 MOV byte ptr [RBX + 0x58],0x1 LAB_00106a23: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a3a2] MOV EDX,0x31 MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106a70: LEA RSI,[0x11a235] LEA RDX,[0x11a237] MOV RDI,R14 CALL 0x001060b6 JMP 0x00106aeb LAB_00106a88: MOV R15,qword ptr [0x00124fa0] LEA RSI,[0x11a344] MOV EDX,0x3a MOV RDI,R15 CALL 0x00105400 MOV RAX,qword ptr [R15] ADD R15,qword ptr [RAX + -0x18] MOV RDI,R15 MOV ESI,0xa CALL 0x00105350 MOVSX ESI,AL MOV RDI,qword ptr [0x00124fa0] CALL 0x00105040 MOV RDI,RAX CALL 0x00105280 LEA RAX,[R14 + 0x10] MOV qword ptr [R14],RAX LAB_00106ad5: LEA RSI,[0x11a37f] LEA RDX,[0x11a3a1] MOV RDI,R14 CALL 0x001060b6 LAB_00106aeb: MOV RDI,RBX CALL 0x001052d0 MOV RAX,R14 POP RBX POP R14 POP R15 RET LAB_00106afc: MOV EDI,EAX CALL 0x00105260
/* Settings::startGame[abi:cxx11]() */ void Settings::startGame_abi_cxx11_(void) { char cVar1; int *puVar2; char cVar3; int iVar4; pthread_mutex_t *in_RSI; long *in_RDI; iVar4 = pthread_mutex_lock(in_RSI); puVar2 = PTR_cout_00124fa0; if (iVar4 == 0) { /* try { // try from 00106919 to 001069a4 has its CatchHandler @ 00106ba0 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Checking conditions...",0x2d); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); puVar2 = PTR_cout_00124fa0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Calling canFitShips()...",0x2f); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); /* try { // try from 001069a5 to 001069ac has its CatchHandler @ 00106b12 */ cVar3 = canFitShips((Settings *)&in_RSI->__data); puVar2 = PTR_cout_00124fa0; cVar1 = (char)PTR_cout_00124fa0; if (*(char *)((long)in_RSI + 0x58) == '\0') { if (cVar3 == '\0') { /* try { // try from 00106a88 to 00106acd has its CatchHandler @ 00106b9e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0, "Settings::startGame(): Failed to fit all ships on the map.",0x3a); std::ios::widen(cVar1 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106ad5 to 00106aea has its CatchHandler @ 00106b03 */ std::__cxx11::string::_M_construct<char_const*>(); } else { *(int1 *)((long)in_RSI + 0x58) = 1; puVar2 = PTR_cout_00124fa0; /* try { // try from 00106a23 to 00106a68 has its CatchHandler @ 00106b9e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Settings::startGame(): Game started successfully.", 0x31); std::ios::widen((char)puVar2 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106a70 to 00106a85 has its CatchHandler @ 00106b08 */ std::__cxx11::string::_M_construct<char_const*>(); } } else { /* try { // try from 001069b3 to 001069f8 has its CatchHandler @ 00106b9e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0, "Settings::startGame(): Game has already been started.",0x35); std::ios::widen(cVar1 + (char)*(int8 *)(*(long *)puVar2 + -0x18)); std::ostream::put((char)PTR_cout_00124fa0); std::ostream::flush(); *in_RDI = (long)(in_RDI + 2); /* try { // try from 00106a00 to 00106a15 has its CatchHandler @ 00106b0d */ std::__cxx11::string::_M_construct<char_const*>(); } pthread_mutex_unlock(in_RSI); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar4); }
30,404
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>>>::erase(__gnu_cxx::__normal_iterator<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>*, std::vector<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>, 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>>>>, __gnu_cxx::__normal_iterator<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>*, std::vector<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>, 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>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O3
cpp
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>>>::erase(__gnu_cxx::__normal_iterator<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>*, std::vector<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>, 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>>>>, __gnu_cxx::__normal_iterator<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>*, std::vector<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>, 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>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x94ad3 movq %rdx, %r12 movq %rdi, %r14 movq %rdx, %rbp subq %rbx, %rbp sarq $0x5, %rbp movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %rbp movq (%rdi), %rax movq %rax, (%rsp) movq %rdx, %r15 negq %r15 movq %rbx, %r13 cmpq 0x8(%r14), %r12 je 0x94aa6 movq %r13, %rdi callq 0x8d420 movq %r13, %rdi movq %r12, %rsi callq 0x94ae6 addq $0x60, %r13 addq $0x60, %r12 addq $-0x60, %r15 jmp 0x94a7f subq (%rsp), %rbx addq (%r14), %r15 negq %r15 sarq $0x5, %r15 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r15 subq %rbp, %r15 movq %r14, %rdi movq %r15, %rsi callq 0x94b72 addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz loc_94AD3 mov r12, rdx mov r14, rdi mov rbp, rdx sub rbp, rbx sar rbp, 5 mov rax, 0AAAAAAAAAAAAAAABh imul rbp, rax mov rax, [rdi] mov [rsp+38h+var_38], rax mov r15, rdx neg r15 mov r13, rbx loc_94A7F: cmp r12, [r14+8] jz short loc_94AA6 mov rdi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<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,minja::Value>::~pair() mov rdi, r13 mov rsi, r12 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<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,minja::Value>::pair(std::pair<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,minja::Value>&&) add r13, 60h ; '`' add r12, 60h ; '`' add r15, 0FFFFFFFFFFFFFFA0h jmp short loc_94A7F loc_94AA6: sub rbx, [rsp+38h+var_38] add r15, [r14] neg r15 sar r15, 5 mov rax, 0AAAAAAAAAAAAAAABh imul r15, rax sub r15, rbp mov rdi, r14 mov rsi, r15 call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<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,minja::Value>>::resize(ulong) add rbx, [r14] loc_94AD3: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long 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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<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,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r12 unsigned long long v5; // rbp long long v6; // r15 long long v7; // r13 long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = a3; v5 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5); v9 = *a1; v6 = -a3; v7 = a2; while ( v4 != a1[1] ) { std::pair<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,minja::Value>::~pair(v7); std::pair<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,minja::Value>::pair( v7, v4); v7 += 96LL; v4 += 96LL; v6 -= 96LL; } std::vector<std::pair<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,minja::Value>>::resize( a1, 0xAAAAAAAAAAAAAAABLL * (-(*a1 + v6) >> 5) - v5); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x00194ad3 MOV R12,RDX MOV R14,RDI MOV RBP,RDX SUB RBP,RBX SAR RBP,0x5 MOV RAX,-0x5555555555555555 IMUL RBP,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX MOV R15,RDX NEG R15 MOV R13,RBX LAB_00194a7f: CMP R12,qword ptr [R14 + 0x8] JZ 0x00194aa6 MOV RDI,R13 CALL 0x0018d420 MOV RDI,R13 MOV RSI,R12 CALL 0x00194ae6 ADD R13,0x60 ADD R12,0x60 ADD R15,-0x60 JMP 0x00194a7f LAB_00194aa6: SUB RBX,qword ptr [RSP] ADD R15,qword ptr [R14] NEG R15 SAR R15,0x5 MOV RAX,-0x5555555555555555 IMUL R15,RAX SUB R15,RBP MOV RDI,R14 MOV RSI,R15 CALL 0x00194b72 ADD RBX,qword ptr [R14] LAB_00194ad3: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* 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::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>, minja::Value, std::less<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<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, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value> > > >) */ pair<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,minja::Value> * __thiscall 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::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>,minja::Value,std::less<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<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,minja::Value>>> ::erase(ordered_map<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>,minja::Value,std::less<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<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,minja::Value>>> *this,pair<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,minja::Value> *param_2, pair<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,minja::Value> *param_3) { long lVar1; long lVar2; pair<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,minja::Value> *this_00; long lVar3; if (param_2 != param_3) { lVar2 = (long)param_3 - (long)param_2; lVar1 = *(long *)this; lVar3 = -(long)param_3; this_00 = param_2; for (; param_3 != *(pair<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,minja::Value> **)(this + 8); param_3 = param_3 + 0x60) { std:: pair<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,minja::Value> ::~pair(this_00); std:: pair<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,minja::Value> ::pair(this_00,param_3); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> ::resize((vector<std::pair<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,minja::Value>,std::allocator<std::pair<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,minja::Value>>> *)this,(-(lVar3 + *(long *)this) >> 5) * -0x5555555555555555 + (lVar2 >> 5) * 0x5555555555555555); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
30,405
init_one_value
eloqsql/mysys/my_getopt.c
static void init_one_value(const struct my_option *option, void *variable, longlong value) { DBUG_ENTER("init_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_BOOL: *((my_bool*) variable)= (my_bool) value; break; case GET_INT: *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL); break; case GET_ENUM: *((ulong*) variable)= (ulong) value; break; case GET_UINT: *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL); break; case GET_LONG: *((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL); break; case GET_ULONG: *((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL); break; case GET_LL: *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL); break; case GET_ULL: *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL); break; case GET_SET: case GET_FLAGSET: *((ulonglong*) variable)= (ulonglong) value; break; case GET_BIT: { ulonglong bit= (option->block_size >= 0 ? option->block_size : -option->block_size); if (option->block_size < 0) value= !value; if (value) (*(ulonglong*)variable)|= bit; else (*(ulonglong*)variable)&= ~bit; break; } case GET_DOUBLE: *((double*) variable)= getopt_ulonglong2double(value); break; case GET_STR: /* Do not clear variable value if it has no default value. The default value may already be set. NOTE: To avoid compiler warnings, we first cast longlong to intptr, so that the value has the same size as a pointer. */ if ((char*) (intptr) value) *((char**) variable)= (char*) (intptr) value; break; case GET_STR_ALLOC: /* Do not clear variable value if it has no default value. The default value may already be set. NOTE: To avoid compiler warnings, we first cast longlong to intptr, so that the value has the same size as a pointer. */ if ((char*) (intptr) value) { char **pstr= (char **) variable; my_free(*pstr); *pstr= my_strdup(key_memory_defaults, (char*) (intptr) value, MYF(MY_WME)); } break; default: /* dummy default to avoid compiler warnings */ break; } DBUG_VOID_RETURN; }
O3
c
init_one_value: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x30(%rdi), %rax andl $0x3f, %eax addq $-0x2, %rax cmpq $0xe, %rax ja 0x826b3 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %rsi leaq 0x42288(%rip), %rcx # 0xc4890 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %r14, (%rbx) jmp 0x826b3 movq %r14, %rdi xorl %edx, %edx callq 0x82b9f jmp 0x826b0 movq %r14, %rdi xorl %edx, %edx callq 0x82cc0 jmp 0x826b0 movq 0x60(%rsi), %rcx movq %rcx, %rax negq %rax cmovsq %rcx, %rax xorl %edx, %edx testq %r14, %r14 sete %dl testq %rcx, %rcx cmovnsq %r14, %rdx testq %rdx, %rdx je 0x826aa orq (%rbx), %rax jmp 0x826b0 movb %r14b, (%rbx) jmp 0x826b3 movl %r14d, %edi xorl %edx, %edx callq 0x82cc0 jmp 0x8269b testq %r14, %r14 je 0x826b3 movq (%rbx), %rdi callq 0x84732 leaq 0x36ee98(%rip), %rax # 0x3f1518 movl (%rax), %edi movl $0x10, %edx movq %r14, %rsi callq 0x847c8 jmp 0x826b0 movslq %r14d, %rdi xorl %edx, %edx callq 0x82b9f movl %eax, (%rbx) jmp 0x826b3 testq %r14, %r14 jne 0x82611 jmp 0x826b3 notq %rax andq (%rbx), %rax movq %rax, (%rbx) popq %rbx popq %r14 popq %rbp retq
init_one_value: push rbp mov rbp, rsp push r14 push rbx mov rax, [rdi+30h] and eax, 3Fh add rax, 0FFFFFFFFFFFFFFFEh; switch 15 cases cmp rax, 0Eh ja def_8260F; jumptable 000000000008260F default case, case 11 mov r14, rdx mov rbx, rsi mov rsi, rdi lea rcx, jpt_8260F movsxd rax, ds:(jpt_8260F - 0C4890h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_82611: mov [rbx], r14; jumptable 000000000008260F cases 12-15 jmp def_8260F; jumptable 000000000008260F default case, case 11 loc_82619: mov rdi, r14; jumptable 000000000008260F cases 5,7 xor edx, edx call getopt_ll_limit_value jmp loc_826B0 loc_82628: mov rdi, r14; jumptable 000000000008260F cases 6,8 xor edx, edx call getopt_ull_limit_value jmp short loc_826B0 loc_82634: mov rcx, [rsi+60h]; jumptable 000000000008260F case 16 mov rax, rcx neg rax cmovs rax, rcx xor edx, edx test r14, r14 setz dl test rcx, rcx cmovns rdx, r14 test rdx, rdx jz short loc_826AA or rax, [rbx] jmp short loc_826B0 loc_8265B: mov [rbx], r14b; jumptable 000000000008260F case 2 jmp short def_8260F; jumptable 000000000008260F default case, case 11 loc_82660: mov edi, r14d; jumptable 000000000008260F case 4 xor edx, edx call getopt_ull_limit_value jmp short loc_8269B loc_8266C: test r14, r14; jumptable 000000000008260F case 10 jz short def_8260F; jumptable 000000000008260F default case, case 11 mov rdi, [rbx] call my_free lea rax, key_memory_defaults mov edi, [rax] mov edx, 10h mov rsi, r14 call my_strdup jmp short loc_826B0 loc_82691: movsxd rdi, r14d; jumptable 000000000008260F case 3 xor edx, edx call getopt_ll_limit_value loc_8269B: mov [rbx], eax jmp short def_8260F; jumptable 000000000008260F default case, case 11 loc_8269F: test r14, r14; jumptable 000000000008260F case 9 jnz loc_82611; jumptable 000000000008260F cases 12-15 jmp short def_8260F; jumptable 000000000008260F default case, case 11 loc_826AA: not rax and rax, [rbx] loc_826B0: mov [rbx], rax def_8260F: pop rbx; jumptable 000000000008260F default case, case 11 pop r14 pop rbp retn
long long init_one_value(long long a1, long long *a2, _BOOL8 a3) { long long result; // rax long long v5; // rax _BOOL8 v6; // rdx result = (*(_QWORD *)(a1 + 48) & 0x3FLL) - 2; switch ( *(_QWORD *)(a1 + 48) & 0x3FLL ) { case 2LL: *(_BYTE *)a2 = a3; return result; case 3LL: result = getopt_ll_limit_value(a3, a1, 0LL); goto LABEL_16; case 4LL: result = getopt_ull_limit_value(a3, a1, 0LL); LABEL_16: *(_DWORD *)a2 = result; return result; case 5LL: case 7LL: result = getopt_ll_limit_value(a3, a1, 0LL); goto LABEL_20; case 6LL: case 8LL: result = getopt_ull_limit_value(a3, a1, 0LL); goto LABEL_20; case 9LL: if ( !a3 ) return result; goto LABEL_2; case 0xALL: if ( !a3 ) return result; my_free(*a2); result = my_strdup(key_memory_defaults, a3, 16LL); goto LABEL_20; case 0xCLL: case 0xDLL: case 0xELL: case 0xFLL: LABEL_2: *a2 = a3; return result; case 0x10LL: v5 = -*(_QWORD *)(a1 + 96); if ( *(long long *)(a1 + 96) > 0 ) v5 = *(_QWORD *)(a1 + 96); v6 = !a3; if ( *(long long *)(a1 + 96) >= 0 ) v6 = a3; if ( v6 ) result = *a2 | v5; else result = *a2 & ~v5; LABEL_20: *a2 = result; break; default: return result; } return result; }
init_one_value: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RAX,qword ptr [RDI + 0x30] AND EAX,0x3f ADD RAX,-0x2 CMP RAX,0xe JA 0x001826b3 MOV R14,RDX MOV RBX,RSI MOV RSI,RDI LEA RCX,[0x1c4890] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_c: MOV qword ptr [RBX],R14 JMP 0x001826b3 caseD_5: MOV RDI,R14 XOR EDX,EDX CALL 0x00182b9f JMP 0x001826b0 caseD_6: MOV RDI,R14 XOR EDX,EDX CALL 0x00182cc0 JMP 0x001826b0 caseD_10: MOV RCX,qword ptr [RSI + 0x60] MOV RAX,RCX NEG RAX CMOVS RAX,RCX XOR EDX,EDX TEST R14,R14 SETZ DL TEST RCX,RCX CMOVNS RDX,R14 TEST RDX,RDX JZ 0x001826aa OR RAX,qword ptr [RBX] JMP 0x001826b0 caseD_2: MOV byte ptr [RBX],R14B JMP 0x001826b3 caseD_4: MOV EDI,R14D XOR EDX,EDX CALL 0x00182cc0 JMP 0x0018269b caseD_a: TEST R14,R14 JZ 0x001826b3 MOV RDI,qword ptr [RBX] CALL 0x00184732 LEA RAX,[0x4f1518] MOV EDI,dword ptr [RAX] MOV EDX,0x10 MOV RSI,R14 CALL 0x001847c8 JMP 0x001826b0 caseD_3: MOVSXD RDI,R14D XOR EDX,EDX CALL 0x00182b9f LAB_0018269b: MOV dword ptr [RBX],EAX JMP 0x001826b3 caseD_9: TEST R14,R14 JNZ 0x00182611 JMP 0x001826b3 LAB_001826aa: NOT RAX AND RAX,qword ptr [RBX] LAB_001826b0: MOV qword ptr [RBX],RAX caseD_b: POP RBX POP R14 POP RBP RET
void init_one_value(long param_1,ulong *param_2,ulong param_3) { ulong uVar1; int4 uVar2; ulong uVar3; ulong uVar4; switch((uint)*(int8 *)(param_1 + 0x30) & 0x3f) { case 2: *(char *)param_2 = (char)param_3; return; case 3: uVar2 = getopt_ll_limit_value((long)(int)param_3,param_1,0); goto LAB_0018269b; case 4: uVar2 = getopt_ull_limit_value(param_3 & 0xffffffff,param_1,0); LAB_0018269b: *(int4 *)param_2 = uVar2; return; case 5: case 7: uVar3 = getopt_ll_limit_value(param_3,param_1,0); break; case 6: case 8: uVar3 = getopt_ull_limit_value(param_3,param_1,0); break; case 9: if (param_3 == 0) { return; } case 0xc: case 0xd: case 0xe: case 0xf: *param_2 = param_3; return; case 10: if (param_3 == 0) { return; } my_free(*param_2); uVar3 = my_strdup(key_memory_defaults,param_3,0x10); break; default: goto switchD_0018260f_caseD_b; case 0x10: uVar1 = *(ulong *)(param_1 + 0x60); uVar3 = -uVar1; if (0 < (long)uVar1) { uVar3 = uVar1; } uVar4 = (ulong)(param_3 == 0); if (-1 < (long)uVar1) { uVar4 = param_3; } if (uVar4 == 0) { uVar3 = ~uVar3 & *param_2; } else { uVar3 = uVar3 | *param_2; } } *param_2 = uVar3; switchD_0018260f_caseD_b: return; }
30,406
get_dynamic
eloqsql/mysys/array.c
void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx) { if (idx >= array->elements) { DBUG_PRINT("warning",("To big array idx: %d, array size is %d", idx,array->elements)); bzero(element,array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O0
c
get_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x30f79 jmp 0x30f61 jmp 0x30f63 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x24190 jmp 0x30fa2 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rsi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x24230 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
get_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov eax, [rbp+var_14] mov rcx, [rbp+var_8] cmp eax, [rcx+8] jb short loc_30F79 jmp short $+2 loc_30F61: jmp short $+2 loc_30F63: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax xor esi, esi call _memset jmp short loc_30FA2 loc_30F79: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_14] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax add rsi, rax mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax call _memcpy loc_30FA2: add rsp, 20h pop rbp retn
long long get_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20)); else return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); }
get_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x8] JC 0x00130f79 JMP 0x00130f61 LAB_00130f61: JMP 0x00130f63 LAB_00130f63: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX XOR ESI,ESI CALL 0x00124190 JMP 0x00130fa2 LAB_00130f79: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00124230 LAB_00130fa2: ADD RSP,0x20 POP RBP RET
void get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))), (ulong)*(uint *)((long)param_1 + 0x14)); } else { memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); } return; }
30,407
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
monkey531[P]llama/common/minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O2
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %r15 movq 0x18(%r15), %rcx movq 0x20(%r15), %rax cmpq %rcx, %rax je 0x6879b movl %edx, %ebp cmpb %bpl, (%rax) jne 0x6879b leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) andq $0x0, -0x8(%rdx) movb $0x0, (%rdx) xorl %edx, %edx movl $0x1a29, %r12d # imm = 0x1A29 leaq 0x4b680(%rip), %r13 # 0xb3dc4 leaq 0x8(%rsp), %r14 leaq 0x1(%rax), %rsi movq %rsi, 0x20(%r15) cmpq %rcx, %rsi je 0x687a1 movb (%rsi), %cl testb $0x1, %dl je 0x68778 movsbl %cl, %eax addl $-0x5c, %eax rorl %eax cmpl $0xc, %eax ja 0x68784 btl %eax, %r12d jae 0x68784 movl %eax, %eax movb (%rax,%r13), %cl jmp 0x68784 movb $0x1, %dl cmpb $0x5c, %cl je 0x68791 cmpb %bpl, %cl je 0x687c1 movsbl %cl, %esi movq %r14, %rdi callq 0x23770 xorl %edx, %edx movq 0x18(%r15), %rcx movq 0x20(%r15), %rax jmp 0x68749 andq $0x0, (%rbx) jmp 0x687af andq $0x0, (%rbx) leaq 0x8(%rsp), %rdi callq 0x242a8 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x2, %rax movq %rax, 0x20(%r15) leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x687ef jmp 0x687a5 jmp 0x687da movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x242a8 movq %rbx, %rdi callq 0x24030
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r15, [rsi] mov rcx, [r15+18h] mov rax, [r15+20h] cmp rax, rcx jz short loc_6879B mov ebp, edx cmp [rax], bpl jnz short loc_6879B lea rdx, [rsp+58h+var_40] mov [rdx-10h], rdx and qword ptr [rdx-8], 0 mov byte ptr [rdx], 0 xor edx, edx mov r12d, 1A29h lea r13, unk_B3DC4 lea r14, [rsp+58h+var_50] loc_68749: lea rsi, [rax+1] mov [r15+20h], rsi cmp rsi, rcx jz short loc_687A1 mov cl, [rsi] test dl, 1 jz short loc_68778 movsx eax, cl add eax, 0FFFFFFA4h ror eax, 1 cmp eax, 0Ch ja short loc_68784 bt r12d, eax jnb short loc_68784 mov eax, eax mov cl, [rax+r13] jmp short loc_68784 loc_68778: mov dl, 1 cmp cl, 5Ch ; '\' jz short loc_68791 cmp cl, bpl jz short loc_687C1 loc_68784: movsx esi, cl mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) xor edx, edx loc_68791: mov rcx, [r15+18h] mov rax, [r15+20h] jmp short loc_68749 loc_6879B: and qword ptr [rbx], 0 jmp short loc_687AF loc_687A1: and qword ptr [rbx], 0 loc_687A5: lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_687AF: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_687C1: add rax, 2 mov [r15+20h], rax lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZSt11make_uniqueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::string,std::string>(std::string &&) jmp short loc_687A5 jmp short $+2 loc_687DA: mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( _QWORD *a1, long long *a2, char a3) { long long v3; // r15 _BYTE *v4; // rcx _BYTE *v5; // rax long long v7; // rdx int v8; // r12d char v9; // cl unsigned int v10; // eax _QWORD v12[2]; // [rsp+8h] [rbp-50h] BYREF char v13; // [rsp+18h] [rbp-40h] BYREF v3 = *a2; v4 = *(_BYTE **)(*a2 + 24); v5 = *(_BYTE **)(*a2 + 32); if ( v5 == v4 || *v5 != a3 ) { *a1 = 0LL; return a1; } v12[0] = &v13; v12[1] = 0LL; v13 = 0; v7 = 0LL; v8 = 6697; while ( 1 ) { *(_QWORD *)(v3 + 32) = v5 + 1; if ( v5 + 1 == v4 ) { *a1 = 0LL; goto LABEL_15; } v9 = v5[1]; if ( (v7 & 1) != 0 ) { v10 = __ROR4__(v9 - 92, 1); if ( v10 <= 0xC ) { if ( _bittest(&v8, v10) ) v9 = byte_B3DC4[v10]; } goto LABEL_11; } LOBYTE(v7) = 1; if ( v9 == 92 ) goto LABEL_12; if ( v9 == a3 ) break; LABEL_11: std::string::push_back(v12, (unsigned int)v9); v7 = 0LL; LABEL_12: v4 = *(_BYTE **)(v3 + 24); v5 = *(_BYTE **)(v3 + 32); } *(_QWORD *)(v3 + 32) = v5 + 2; std::make_unique<std::string,std::string>(a1, v12, v7); LABEL_15: std::string::~string(v12); return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R15,qword ptr [RSI] MOV RCX,qword ptr [R15 + 0x18] MOV RAX,qword ptr [R15 + 0x20] CMP RAX,RCX JZ 0x0016879b MOV EBP,EDX CMP byte ptr [RAX],BPL JNZ 0x0016879b LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX AND qword ptr [RDX + -0x8],0x0 MOV byte ptr [RDX],0x0 XOR EDX,EDX MOV R12D,0x1a29 LEA R13,[0x1b3dc4] LEA R14,[RSP + 0x8] LAB_00168749: LEA RSI,[RAX + 0x1] MOV qword ptr [R15 + 0x20],RSI CMP RSI,RCX JZ 0x001687a1 MOV CL,byte ptr [RSI] TEST DL,0x1 JZ 0x00168778 MOVSX EAX,CL ADD EAX,-0x5c ROR EAX,0x1 CMP EAX,0xc JA 0x00168784 BT R12D,EAX JNC 0x00168784 MOV EAX,EAX MOV CL,byte ptr [RAX + R13*0x1] JMP 0x00168784 LAB_00168778: MOV DL,0x1 CMP CL,0x5c JZ 0x00168791 CMP CL,BPL JZ 0x001687c1 LAB_00168784: MOVSX ESI,CL MOV RDI,R14 CALL 0x00123770 XOR EDX,EDX LAB_00168791: MOV RCX,qword ptr [R15 + 0x18] MOV RAX,qword ptr [R15 + 0x20] JMP 0x00168749 LAB_0016879b: AND qword ptr [RBX],0x0 JMP 0x001687af LAB_001687a1: AND qword ptr [RBX],0x0 LAB_001687a5: LEA RDI,[RSP + 0x8] CALL 0x001242a8 LAB_001687af: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001687c1: ADD RAX,0x2 MOV qword ptr [R15 + 0x20],RAX LAB_001687c9: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001687ef LAB_001687d6: JMP 0x001687a5
/* operator()[abi:cxx11](char) const */ string * minja::Parser::parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_ (char param_1) { char *pcVar1; long lVar2; char *pcVar3; char *pcVar4; char in_DL; bool bVar5; long *in_RSI; int7 in_register_00000039; string *psVar6; int1 *local_50; int8 local_48; int1 local_40 [16]; psVar6 = (string *)CONCAT71(in_register_00000039,param_1); lVar2 = *in_RSI; pcVar4 = *(char **)(lVar2 + 0x18); pcVar3 = *(char **)(lVar2 + 0x20); if ((pcVar3 == pcVar4) || (*pcVar3 != in_DL)) { *(int8 *)psVar6 = 0; } else { local_50 = local_40; local_48 = 0; local_40[0] = 0; bVar5 = false; while( true ) { pcVar1 = pcVar3 + 1; *(char **)(lVar2 + 0x20) = pcVar1; if (pcVar1 == pcVar4) break; if (bVar5) { LAB_00168784: /* try { // try from 00168784 to 0016878e has its CatchHandler @ 001687da */ std::__cxx11::string::push_back((char)&local_50); bVar5 = false; } else { bVar5 = true; if (*pcVar1 != '\\') { if (*pcVar1 != in_DL) goto LAB_00168784; *(char **)(lVar2 + 0x20) = pcVar3 + 2; /* try { // try from 001687c9 to 001687d5 has its CatchHandler @ 001687d8 */ std::make_unique<std::__cxx11::string,std::__cxx11::string>(psVar6); goto LAB_001687a5; } } pcVar4 = *(char **)(lVar2 + 0x18); pcVar3 = *(char **)(lVar2 + 0x20); } *(int8 *)psVar6 = 0; LAB_001687a5: std::__cxx11::string::~string((string *)&local_50); } return psVar6; }
30,408
google::protobuf::compiler::(anonymous namespace)::AdjustExtensionRangesWithMaxEndNumber(google::protobuf::DescriptorProto*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/parser.cc
void AdjustExtensionRangesWithMaxEndNumber(DescriptorProto* message) { const bool is_message_set = IsMessageSetWireFormatMessage(*message); const int max_extension_number = is_message_set ? std::numeric_limits<int32_t>::max() : FieldDescriptor::kMaxNumber + 1; for (int i = 0; i < message->extension_range_size(); ++i) { if (message->extension_range(i).end() == kMaxRangeSentinel) { message->mutable_extension_range(i)->set_end(max_extension_number); } } }
O0
cpp
google::protobuf::compiler::(anonymous namespace)::AdjustExtensionRangesWithMaxEndNumber(google::protobuf::DescriptorProto*): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0x23d4d0 andb $0x1, %al movb %al, 0x1f(%rsp) movb 0x1f(%rsp), %al movb %al, 0x13(%rsp) callq 0x17d580 movb 0x13(%rsp), %dl movl %eax, %ecx movl $0x20000000, %eax # imm = 0x20000000 testb $0x1, %dl cmovnel %ecx, %eax movl %eax, 0x18(%rsp) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax movl %eax, 0xc(%rsp) movq 0x20(%rsp), %rdi callq 0x23eec0 movl %eax, %ecx movl 0xc(%rsp), %eax cmpl %ecx, %eax jge 0x2368b3 movq 0x20(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x2413b0 movq %rax, %rdi callq 0x2413d0 cmpl $-0x1, %eax jne 0x2368a4 movq 0x20(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x23f680 movq %rax, %rdi movl 0x18(%rsp), %esi callq 0x23f660 jmp 0x2368a6 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0x236853 addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf8compiler12_GLOBAL__N_137AdjustExtensionRangesWithMaxEndNumberEPNS0_15DescriptorProtoE: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rdi, [rsp+28h+var_8]; this call _ZN6google8protobuf8compiler12_GLOBAL__N_129IsMessageSetWireFormatMessageERKNS0_15DescriptorProtoE; google::protobuf::compiler::`anonymous namespace'::IsMessageSetWireFormatMessage(google::protobuf::DescriptorProto const&) and al, 1 mov [rsp+28h+var_9], al mov al, [rsp+28h+var_9] mov [rsp+28h+var_15], al call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void) mov dl, [rsp+28h+var_15] mov ecx, eax mov eax, 20000000h test dl, 1 cmovnz eax, ecx mov [rsp+28h+var_10], eax mov [rsp+28h+var_14], 0 loc_236853: mov eax, [rsp+28h+var_14] mov [rsp+28h+var_1C], eax mov rdi, [rsp+28h+var_8]; this call _ZNK6google8protobuf15DescriptorProto20extension_range_sizeEv; google::protobuf::DescriptorProto::extension_range_size(void) mov ecx, eax mov eax, [rsp+28h+var_1C] cmp eax, ecx jge short loc_2368B3 mov rdi, [rsp+28h+var_8]; this mov esi, [rsp+28h+var_14]; int call _ZNK6google8protobuf15DescriptorProto15extension_rangeEi; google::protobuf::DescriptorProto::extension_range(int) mov rdi, rax; this call _ZNK6google8protobuf30DescriptorProto_ExtensionRange3endEv; google::protobuf::DescriptorProto_ExtensionRange::end(void) cmp eax, 0FFFFFFFFh jnz short loc_2368A4 mov rdi, [rsp+28h+var_8]; this mov esi, [rsp+28h+var_14]; int call _ZN6google8protobuf15DescriptorProto23mutable_extension_rangeEi; google::protobuf::DescriptorProto::mutable_extension_range(int) mov rdi, rax; this mov esi, [rsp+28h+var_10]; int call _ZN6google8protobuf30DescriptorProto_ExtensionRange7set_endEi; google::protobuf::DescriptorProto_ExtensionRange::set_end(int) loc_2368A4: jmp short $+2 loc_2368A6: mov eax, [rsp+28h+var_14] add eax, 1 mov [rsp+28h+var_14], eax jmp short loc_236853 loc_2368B3: add rsp, 28h retn
long long google::protobuf::compiler::`anonymous namespace'::AdjustExtensionRangesWithMaxEndNumber( google::protobuf::compiler::_anonymous_namespace_ *this, google::protobuf::DescriptorProto *a2) { int v2; // ecx int v3; // eax int v4; // ecx long long result; // rax google::protobuf::DescriptorProto_ExtensionRange *v6; // rax google::protobuf::DescriptorProto_ExtensionRange *v7; // rax char v8; // [rsp+13h] [rbp-15h] int i; // [rsp+14h] [rbp-14h] int v10; // [rsp+18h] [rbp-10h] v8 = google::protobuf::compiler::`anonymous namespace'::IsMessageSetWireFormatMessage(this, a2) & 1; v2 = std::numeric_limits<int>::max(); v3 = 0x20000000; if ( (v8 & 1) != 0 ) v3 = v2; v10 = v3; for ( i = 0; ; ++i ) { v4 = google::protobuf::DescriptorProto::extension_range_size(this); result = (unsigned int)i; if ( i >= v4 ) break; v6 = (google::protobuf::DescriptorProto_ExtensionRange *)google::protobuf::DescriptorProto::extension_range(this, i); if ( (unsigned int)google::protobuf::DescriptorProto_ExtensionRange::end(v6) == -1 ) { v7 = (google::protobuf::DescriptorProto_ExtensionRange *)google::protobuf::DescriptorProto::mutable_extension_range( this, i); google::protobuf::DescriptorProto_ExtensionRange::set_end(v7, v10); } } return result; }
destroy<int>: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00236870 ADD RSP,0x18 RET
/* void std::allocator_traits<std::allocator<std::_Rb_tree_node<int> > >::destroy<int>(std::allocator<std::_Rb_tree_node<int> >&, int*) */ void std::allocator_traits<std::allocator<std::_Rb_tree_node<int>>>::destroy<int> (allocator *param_1,int *param_2) { __gnu_cxx::new_allocator<std::_Rb_tree_node<int>>::destroy<int>((int *)param_1); return; }
30,409
sp_get_polygon_mbr
eloqsql/storage/maria/ma_sp_key.c
static int sp_get_polygon_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_linear_rings; uint n_points; n_linear_rings = uint4korr((*wkb)); (*wkb) += 4; for (; n_linear_rings > 0; --n_linear_rings) { n_points = uint4korr((*wkb)); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } } return 0; }
O3
c
sp_get_polygon_mbr: pushq %rbp movq %rsp, %rbp movq (%rdi), %rcx movl (%rcx), %eax addq $0x4, %rcx movq %rcx, (%rdi) testl %eax, %eax je 0x707a4 addq $-0x8, %rsi movq (%rdi), %r8 movl (%r8), %ecx addq $0x4, %r8 movq %r8, (%rdi) testl %ecx, %ecx je 0x707a0 movb $0x1, %r8b xorl %r9d, %r9d movq (%rdi), %r10 cmpq %rsi, %r10 ja 0x707a8 movsd (%r10), %xmm0 addq $0x8, %r10 movq %r10, (%rdi) movsd (%rdx,%r9), %xmm1 ucomisd %xmm0, %xmm1 jbe 0x70777 movsd %xmm0, (%rdx,%r9) ucomisd 0x8(%rdx,%r9), %xmm0 jbe 0x7078a orq $0x8, %r9 movsd %xmm0, (%rdx,%r9) movl $0x10, %r9d testb $0x1, %r8b movl $0x0, %r8d jne 0x70751 decl %ecx jne 0x7074b decl %eax jne 0x7073a xorl %eax, %eax jmp 0x707ad movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbp retq nop
sp_get_polygon_mbr: push rbp mov rbp, rsp mov rcx, [rdi] mov eax, [rcx] add rcx, 4 mov [rdi], rcx test eax, eax jz short loc_707A4 add rsi, 0FFFFFFFFFFFFFFF8h loc_7073A: mov r8, [rdi] mov ecx, [r8] add r8, 4 mov [rdi], r8 test ecx, ecx jz short loc_707A0 loc_7074B: mov r8b, 1 xor r9d, r9d loc_70751: mov r10, [rdi] cmp r10, rsi ja short loc_707A8 movsd xmm0, qword ptr [r10] add r10, 8 mov [rdi], r10 movsd xmm1, qword ptr [rdx+r9] ucomisd xmm1, xmm0 jbe short loc_70777 movsd qword ptr [rdx+r9], xmm0 loc_70777: ucomisd xmm0, qword ptr [rdx+r9+8] jbe short loc_7078A or r9, 8 movsd qword ptr [rdx+r9], xmm0 loc_7078A: mov r9d, 10h test r8b, 1 mov r8d, 0 jnz short loc_70751 dec ecx jnz short loc_7074B loc_707A0: dec eax jnz short loc_7073A loc_707A4: xor eax, eax jmp short loc_707AD loc_707A8: mov eax, 0FFFFFFFFh loc_707AD: pop rbp retn
long long sp_get_polygon_mbr(double **a1, long long a2, long long a3) { int v3; // eax unsigned long long v4; // rsi int v5; // ecx char v6; // r8 long long v7; // r9 double *v8; // r10 double v9; // xmm0_8 bool v10; // zf v3 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v3 ) { v4 = a2 - 8; do { v5 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( v5 ) { while ( 2 ) { v6 = 1; v7 = 0LL; do { v8 = *a1; if ( (unsigned long long)*a1 > v4 ) return 0xFFFFFFFFLL; v9 = *v8; *a1 = v8 + 1; if ( *(double *)(a3 + v7) > v9 ) *(double *)(a3 + v7) = v9; if ( v9 > *(double *)(a3 + v7 + 8) ) *(double *)(a3 + (v7 | 8)) = v9; v7 = 16LL; v10 = (v6 & 1) == 0; v6 = 0; } while ( !v10 ); if ( --v5 ) continue; break; } } --v3; } while ( v3 ); } return 0LL; }
sp_get_polygon_mbr: PUSH RBP MOV RBP,RSP MOV RCX,qword ptr [RDI] MOV EAX,dword ptr [RCX] ADD RCX,0x4 MOV qword ptr [RDI],RCX TEST EAX,EAX JZ 0x001707a4 ADD RSI,-0x8 LAB_0017073a: MOV R8,qword ptr [RDI] MOV ECX,dword ptr [R8] ADD R8,0x4 MOV qword ptr [RDI],R8 TEST ECX,ECX JZ 0x001707a0 LAB_0017074b: MOV R8B,0x1 XOR R9D,R9D LAB_00170751: MOV R10,qword ptr [RDI] CMP R10,RSI JA 0x001707a8 MOVSD XMM0,qword ptr [R10] ADD R10,0x8 MOV qword ptr [RDI],R10 MOVSD XMM1,qword ptr [RDX + R9*0x1] UCOMISD XMM1,XMM0 JBE 0x00170777 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_00170777: UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8] JBE 0x0017078a OR R9,0x8 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_0017078a: MOV R9D,0x10 TEST R8B,0x1 MOV R8D,0x0 JNZ 0x00170751 DEC ECX JNZ 0x0017074b LAB_001707a0: DEC EAX JNZ 0x0017073a LAB_001707a4: XOR EAX,EAX JMP 0x001707ad LAB_001707a8: MOV EAX,0xffffffff LAB_001707ad: POP RBP RET
int8 sp_get_polygon_mbr(int8 *param_1,long param_2,long param_3) { double dVar1; double *pdVar2; bool bVar3; int iVar4; int iVar5; bool bVar6; ulong uVar7; iVar4 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; if (iVar4 != 0) { do { iVar5 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; for (; iVar5 != 0; iVar5 = iVar5 + -1) { uVar7 = 0; bVar3 = true; do { bVar6 = bVar3; pdVar2 = (double *)*param_1; if ((double *)(param_2 + -8) < pdVar2) { return 0xffffffff; } dVar1 = *pdVar2; *param_1 = pdVar2 + 1; if (dVar1 < *(double *)(param_3 + uVar7)) { *(double *)(param_3 + uVar7) = dVar1; } pdVar2 = (double *)(param_3 + 8 + uVar7); if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *(double *)(param_3 + (uVar7 | 8)) = dVar1; } uVar7 = 0x10; bVar3 = false; } while (bVar6); } iVar4 = iVar4 + -1; } while (iVar4 != 0); } return 0; }
30,410
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r13 movq %rsi, %rbx movl 0x10(%rbp), %r12d leaq -0x2c(%rbp), %rax movl %ecx, (%rax) leaq (%rsi,%rdx), %r14 addq %r8, %r9 movq %r14, %rdx movq %rax, %rcx callq 0xaadeb leaq (%rbx,%rax), %r15 testb $0x40, %r12b je 0xaaff8 subq %rax, %r13 jle 0xaaff8 movl -0x2c(%rbp), %eax testl %eax, %eax je 0xaaff8 leal (%rax,%rax,2), %r12d cmpq %r12, %r13 cmovbq %r13, %r12 movq %r15, %rdi xorl %esi, %esi movq %r12, %rdx callq 0x3a3a0 addq %r12, %r15 movl 0x10(%rbp), %r12d movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx xorl %ecx, %ecx callq 0x95d92 testb %r12b, %r12b jns 0xab025 cmpq %r14, %r15 jae 0xab025 movq %r14, %rdx subq %r15, %rdx movq %r15, %rdi xorl %esi, %esi callq 0x3a3a0 movq %r14, %r15 subq %rbx, %r15 movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, rdx mov rbx, rsi mov r12d, [rbp+arg_0] lea rax, [rbp+var_2C] mov [rax], ecx lea r14, [rsi+rdx] add r9, r8 mov rdx, r14 mov rcx, rax call my_strnxfrm_unicode_full_bin_internal lea r15, [rbx+rax] test r12b, 40h jz short loc_AAFF8 sub r13, rax jle short loc_AAFF8 mov eax, [rbp+var_2C] test eax, eax jz short loc_AAFF8 lea r12d, [rax+rax*2] cmp r13, r12 cmovb r12, r13 mov rdi, r15 xor esi, esi mov rdx, r12 call _memset add r15, r12 mov r12d, [rbp+arg_0] loc_AAFF8: mov rdi, rbx mov rsi, r15 mov edx, r12d xor ecx, ecx call my_strxfrm_desc_and_reverse test r12b, r12b jns short loc_AB025 cmp r15, r14 jnb short loc_AB025 mov rdx, r14 sub rdx, r15 mov rdi, r15 xor esi, esi call _memset mov r15, r14 loc_AB025: sub r15, rbx mov rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { unsigned int v8; // r12d _BYTE *v9; // r14 long long v10; // rax _BYTE *v11; // r15 bool v12; // cc unsigned long long v13; // r13 unsigned long long v14; // r12 int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF v8 = a7; v16[0] = a4; v9 = &a2[a3]; v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6); v11 = &a2[v10]; if ( (a7 & 0x40) != 0 ) { v12 = a3 <= v10; v13 = a3 - v10; if ( !v12 ) { if ( v16[0] ) { v14 = (unsigned int)(3 * v16[0]); if ( v13 < v14 ) v14 = v13; memset(v11, 0LL, v14); v11 += v14; v8 = a7; } } } my_strxfrm_desc_and_reverse(a2, v11, v8, 0); if ( (v8 & 0x80u) != 0 && v11 < v9 ) { memset(v11, 0LL, v9 - v11); v11 = v9; } return v11 - a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,RDX MOV RBX,RSI MOV R12D,dword ptr [RBP + 0x10] LEA RAX,[RBP + -0x2c] MOV dword ptr [RAX],ECX LEA R14,[RSI + RDX*0x1] ADD R9,R8 MOV RDX,R14 MOV RCX,RAX CALL 0x001aadeb LEA R15,[RBX + RAX*0x1] TEST R12B,0x40 JZ 0x001aaff8 SUB R13,RAX JLE 0x001aaff8 MOV EAX,dword ptr [RBP + -0x2c] TEST EAX,EAX JZ 0x001aaff8 LEA R12D,[RAX + RAX*0x2] CMP R13,R12 CMOVC R12,R13 MOV RDI,R15 XOR ESI,ESI MOV RDX,R12 CALL 0x0013a3a0 ADD R15,R12 MOV R12D,dword ptr [RBP + 0x10] LAB_001aaff8: MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D XOR ECX,ECX CALL 0x00195d92 TEST R12B,R12B JNS 0x001ab025 CMP R15,R14 JNC 0x001ab025 MOV RDX,R14 SUB RDX,R15 MOV RDI,R15 XOR ESI,ESI CALL 0x0013a3a0 MOV R15,R14 LAB_001ab025: SUB R15,RBX MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; ulong __n; ulong uVar3; void *__s; int local_34; pvVar1 = (void *)(param_2 + param_3); local_34 = param_4; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5); __s = (void *)(param_2 + lVar2); if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) && (local_34 != 0)) { __n = (ulong)(uint)(local_34 * 3); if (uVar3 < (uint)(local_34 * 3)) { __n = uVar3; } memset(__s,0,__n); __s = (void *)((long)__s + __n); } my_strxfrm_desc_and_reverse(param_2,__s,param_7,0); if (((char)param_7 < '\0') && (__s < pvVar1)) { memset(__s,0,(long)pvVar1 - (long)__s); __s = pvVar1; } return (long)__s - param_2; }
30,411
ma_tls_connect
eloqsql/libmariadb/libmariadb/secure/openssl.c
my_bool ma_tls_connect(MARIADB_TLS *ctls) { SSL *ssl = (SSL *)ctls->ssl; my_bool blocking, try_connect= 1; MYSQL *mysql; MARIADB_PVIO *pvio; int rc; #ifdef OPENSSL_USE_BIOMETHOD BIO_METHOD *bio_method= NULL; BIO *bio; #endif mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; /* Set socket to non blocking if not already set */ if (!(blocking= pvio->methods->is_blocking(pvio))) pvio->methods->blocking(pvio, FALSE, 0); SSL_clear(ssl); #ifdef OPENSSL_USE_BIOMETHOD bio= BIO_new(&ma_BIO_method); bio->ptr= pvio; SSL_set_bio(ssl, bio, bio); BIO_set_fd(bio, mysql_get_socket(mysql), BIO_NOCLOSE); #else SSL_set_fd(ssl, (int)mysql_get_socket(mysql)); #endif while (try_connect && (rc= SSL_connect(ssl)) == -1) { switch((SSL_get_error(ssl, rc))) { case SSL_ERROR_WANT_READ: if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1) try_connect= 0; break; case SSL_ERROR_WANT_WRITE: if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1) try_connect= 0; break; default: try_connect= 0; } } /* In case handshake failed or if a root certificate (ca) was specified, we need to check the result code of X509 verification. A detailed check of the peer certificate (hostname checking will follow later) */ if (rc != 1 || (mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) || (mysql->options.ssl_ca || mysql->options.ssl_capath)) { long x509_err= SSL_get_verify_result(ssl); if (x509_err != X509_V_OK) { my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), X509_verify_cert_error_string(x509_err)); /* restore blocking mode */ if (!blocking) pvio->methods->blocking(pvio, FALSE, 0); return 1; } else if (rc != 1) { ma_tls_set_error(mysql); return 1; } } pvio->ctls->ssl= ctls->ssl= (void *)ssl; return 0; }
O0
c
ma_tls_connect: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movb $0x1, -0x1a(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x13160 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x48(%rax), %rax movq 0x68(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax movb %al, -0x19(%rbp) cmpb $0x0, %al jne 0x3b647 movq -0x30(%rbp), %rax movq 0x48(%rax), %rax movq 0x38(%rax), %rax movq -0x30(%rbp), %rdi xorl %esi, %esi xorl %ecx, %ecx movl %ecx, %edx callq *%rax movq -0x18(%rbp), %rdi callq 0x130a0 movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi callq 0x26790 movq -0x48(%rbp), %rdi movl %eax, %esi callq 0x132a0 movsbl -0x1a(%rbp), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x49(%rbp) je 0x3b68f movq -0x18(%rbp), %rdi callq 0x13620 movl %eax, -0x34(%rbp) cmpl $-0x1, %eax sete %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0x3b69b jmp 0x3b71e movq -0x18(%rbp), %rdi movl -0x34(%rbp), %esi callq 0x13040 movl %eax, %ecx movl %ecx, -0x50(%rbp) subl $0x2, %eax je 0x3b6bd jmp 0x3b6b3 movl -0x50(%rbp), %eax subl $0x3, %eax je 0x3b6e9 jmp 0x3b715 movq -0x30(%rbp), %rax movq 0x48(%rax), %rax movq 0x30(%rax), %rax movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rcx movl 0x390(%rcx), %edx movl $0x1, %esi callq *%rax cmpl $0x1, %eax jge 0x3b6e7 movb $0x0, -0x1a(%rbp) jmp 0x3b719 movq -0x30(%rbp), %rax movq 0x48(%rax), %rax movq 0x30(%rax), %rax movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rcx movl 0x390(%rcx), %edx movl $0x1, %esi callq *%rax cmpl $0x1, %eax jge 0x3b713 movb $0x0, -0x1a(%rbp) jmp 0x3b719 movb $0x0, -0x1a(%rbp) jmp 0x3b66c cmpl $0x1, -0x34(%rbp) jne 0x3b75b movq -0x28(%rbp), %rax movq 0x368(%rax), %rax andq $0x40000000, %rax # imm = 0x40000000 cmpq $0x0, %rax jne 0x3b75b movq -0x28(%rbp), %rax cmpq $0x0, 0x410(%rax) jne 0x3b75b movq -0x28(%rbp), %rax cmpq $0x0, 0x418(%rax) je 0x3b7f8 movq -0x18(%rbp), %rdi callq 0x13190 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) je 0x3b7df movq -0x28(%rbp), %rax movq %rax, -0x68(%rbp) leaq 0x29a02(%rip), %rax # 0x65180 movq (%rax), %rax movq %rax, -0x60(%rbp) leaq 0x29a04(%rip), %rax # 0x65190 movq 0xd0(%rax), %rax movq %rax, -0x58(%rbp) movq -0x40(%rbp), %rdi callq 0x132e0 movq -0x68(%rbp), %rdi movq -0x60(%rbp), %rdx movq -0x58(%rbp), %rcx movq %rax, %r8 movl $0x7ea, %esi # imm = 0x7EA movb $0x0, %al callq 0x1a650 cmpb $0x0, -0x19(%rbp) jne 0x3b7d9 movq -0x30(%rbp), %rax movq 0x48(%rax), %rax movq 0x38(%rax), %rax movq -0x30(%rbp), %rdi xorl %esi, %esi xorl %ecx, %ecx movl %ecx, %edx callq *%rax movb $0x1, -0x1(%rbp) jmp 0x3b814 cmpl $0x1, -0x34(%rbp) je 0x3b7f4 movq -0x28(%rbp), %rdi callq 0x3b820 movb $0x1, -0x1(%rbp) jmp 0x3b814 jmp 0x3b7f6 jmp 0x3b7f8 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq 0x38(%rax), %rax movq %rcx, 0x10(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopl (%rax)
ma_tls_connect: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov [rbp+var_1A], 1 mov rdi, [rbp+var_18] xor esi, esi call _SSL_get_ex_data mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+48h] mov rax, [rax+68h] mov rdi, [rbp+var_30] call rax mov [rbp+var_19], al cmp al, 0 jnz short loc_3B647 mov rax, [rbp+var_30] mov rax, [rax+48h] mov rax, [rax+38h] mov rdi, [rbp+var_30] xor esi, esi xor ecx, ecx mov edx, ecx call rax loc_3B647: mov rdi, [rbp+var_18] call _SSL_clear mov rax, [rbp+var_18] mov [rbp+var_48], rax mov rdi, [rbp+var_28] call mysql_get_socket mov rdi, [rbp+var_48] mov esi, eax call _SSL_set_fd loc_3B66C: movsx ecx, [rbp+var_1A] xor eax, eax cmp ecx, 0 mov [rbp+var_49], al jz short loc_3B68F mov rdi, [rbp+var_18] call _SSL_connect mov [rbp+var_34], eax cmp eax, 0FFFFFFFFh setz al mov [rbp+var_49], al loc_3B68F: mov al, [rbp+var_49] test al, 1 jnz short loc_3B69B jmp loc_3B71E loc_3B69B: mov rdi, [rbp+var_18] mov esi, [rbp+var_34] call _SSL_get_error mov ecx, eax mov [rbp+var_50], ecx sub eax, 2 jz short loc_3B6BD jmp short $+2 loc_3B6B3: mov eax, [rbp+var_50] sub eax, 3 jz short loc_3B6E9 jmp short loc_3B715 loc_3B6BD: mov rax, [rbp+var_30] mov rax, [rax+48h] mov rax, [rax+30h] mov rdi, [rbp+var_30] mov rcx, [rbp+var_28] mov edx, [rcx+390h] mov esi, 1 call rax cmp eax, 1 jge short loc_3B6E7 mov [rbp+var_1A], 0 loc_3B6E7: jmp short loc_3B719 loc_3B6E9: mov rax, [rbp+var_30] mov rax, [rax+48h] mov rax, [rax+30h] mov rdi, [rbp+var_30] mov rcx, [rbp+var_28] mov edx, [rcx+390h] mov esi, 1 call rax cmp eax, 1 jge short loc_3B713 mov [rbp+var_1A], 0 loc_3B713: jmp short loc_3B719 loc_3B715: mov [rbp+var_1A], 0 loc_3B719: jmp loc_3B66C loc_3B71E: cmp [rbp+var_34], 1 jnz short loc_3B75B mov rax, [rbp+var_28] mov rax, [rax+368h] and rax, 40000000h cmp rax, 0 jnz short loc_3B75B mov rax, [rbp+var_28] cmp qword ptr [rax+410h], 0 jnz short loc_3B75B mov rax, [rbp+var_28] cmp qword ptr [rax+418h], 0 jz loc_3B7F8 loc_3B75B: mov rdi, [rbp+var_18] call _SSL_get_verify_result mov [rbp+var_40], rax cmp [rbp+var_40], 0 jz short loc_3B7DF mov rax, [rbp+var_28] mov [rbp+var_68], rax lea rax, SQLSTATE_UNKNOWN mov rax, [rax] mov [rbp+var_60], rax lea rax, client_errors mov rax, [rax+0D0h] mov [rbp+var_58], rax mov rdi, [rbp+var_40] call _X509_verify_cert_error_string mov rdi, [rbp+var_68] mov rdx, [rbp+var_60] mov rcx, [rbp+var_58] mov r8, rax mov esi, 7EAh mov al, 0 call my_set_error cmp [rbp+var_19], 0 jnz short loc_3B7D9 mov rax, [rbp+var_30] mov rax, [rax+48h] mov rax, [rax+38h] mov rdi, [rbp+var_30] xor esi, esi xor ecx, ecx mov edx, ecx call rax loc_3B7D9: mov [rbp+var_1], 1 jmp short loc_3B814 loc_3B7DF: cmp [rbp+var_34], 1 jz short loc_3B7F4 mov rdi, [rbp+var_28] call ma_tls_set_error mov [rbp+var_1], 1 jmp short loc_3B814 loc_3B7F4: jmp short $+2 loc_3B7F6: jmp short $+2 loc_3B7F8: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_30] mov rax, [rax+38h] mov [rax+10h], rcx mov [rbp+var_1], 0 loc_3B814: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
char ma_tls_connect(long long a1) { unsigned int socket; // eax long long v2; // rax char *v4; // [rsp+10h] [rbp-60h] char *v5; // [rsp+18h] [rbp-58h] int error; // [rsp+20h] [rbp-50h] bool v7; // [rsp+27h] [rbp-49h] long long verify_result; // [rsp+30h] [rbp-40h] unsigned int v9; // [rsp+3Ch] [rbp-34h] long long v10; // [rsp+40h] [rbp-30h] _QWORD *v11; // [rsp+48h] [rbp-28h] char v12; // [rsp+56h] [rbp-1Ah] char v13; // [rsp+57h] [rbp-19h] long long v14; // [rsp+58h] [rbp-18h] v14 = *(_QWORD *)(a1 + 16); v12 = 1; v11 = (_QWORD *)SSL_get_ex_data(v14, 0LL); v10 = *v11; v13 = (*(long long ( **)(_QWORD))(*(_QWORD *)(*v11 + 72LL) + 104LL))(*v11); if ( !v13 ) (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL); SSL_clear(v14); socket = mysql_get_socket((long long)v11); SSL_set_fd(v14, socket); while ( 1 ) { v7 = 0; if ( v12 ) { v9 = SSL_connect(v14); v7 = v9 == -1; } if ( !v7 ) break; error = SSL_get_error(v14, v9); if ( error == 2 ) { if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))( v10, 1LL, *((unsigned int *)v11 + 228)) < 1 ) v12 = 0; } else if ( error == 3 ) { if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))( v10, 1LL, *((unsigned int *)v11 + 228)) < 1 ) v12 = 0; } else { v12 = 0; } } if ( v9 == 1 && (v11[109] & 0x40000000LL) == 0 && !v11[130] && !v11[131] ) goto LABEL_26; verify_result = SSL_get_verify_result(v14); if ( !verify_result ) { if ( v9 != 1 ) { ma_tls_set_error(v11); return 1; } LABEL_26: *(_QWORD *)(a1 + 16) = v14; *(_QWORD *)(*(_QWORD *)(v10 + 56) + 16LL) = v14; return 0; } v4 = SQLSTATE_UNKNOWN; v5 = client_errors[26]; v2 = X509_verify_cert_error_string(verify_result); my_set_error((long long)v11, 0x7EAu, (long long)v4, (long long)v5, v2); if ( !v13 ) (*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL); return 1; }
ma_tls_connect: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x1a],0x1 MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI CALL 0x00113160 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x68] MOV RDI,qword ptr [RBP + -0x30] CALL RAX MOV byte ptr [RBP + -0x19],AL CMP AL,0x0 JNZ 0x0013b647 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x30] XOR ESI,ESI XOR ECX,ECX MOV EDX,ECX CALL RAX LAB_0013b647: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001130a0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00126790 MOV RDI,qword ptr [RBP + -0x48] MOV ESI,EAX CALL 0x001132a0 LAB_0013b66c: MOVSX ECX,byte ptr [RBP + -0x1a] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x49],AL JZ 0x0013b68f MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113620 MOV dword ptr [RBP + -0x34],EAX CMP EAX,-0x1 SETZ AL MOV byte ptr [RBP + -0x49],AL LAB_0013b68f: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x0013b69b JMP 0x0013b71e LAB_0013b69b: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x34] CALL 0x00113040 MOV ECX,EAX MOV dword ptr [RBP + -0x50],ECX SUB EAX,0x2 JZ 0x0013b6bd JMP 0x0013b6b3 LAB_0013b6b3: MOV EAX,dword ptr [RBP + -0x50] SUB EAX,0x3 JZ 0x0013b6e9 JMP 0x0013b715 LAB_0013b6bd: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RCX + 0x390] MOV ESI,0x1 CALL RAX CMP EAX,0x1 JGE 0x0013b6e7 MOV byte ptr [RBP + -0x1a],0x0 LAB_0013b6e7: JMP 0x0013b719 LAB_0013b6e9: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RCX + 0x390] MOV ESI,0x1 CALL RAX CMP EAX,0x1 JGE 0x0013b713 MOV byte ptr [RBP + -0x1a],0x0 LAB_0013b713: JMP 0x0013b719 LAB_0013b715: MOV byte ptr [RBP + -0x1a],0x0 LAB_0013b719: JMP 0x0013b66c LAB_0013b71e: CMP dword ptr [RBP + -0x34],0x1 JNZ 0x0013b75b MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x368] AND RAX,0x40000000 CMP RAX,0x0 JNZ 0x0013b75b MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x410],0x0 JNZ 0x0013b75b MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x418],0x0 JZ 0x0013b7f8 LAB_0013b75b: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113190 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JZ 0x0013b7df MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[0x165180] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX LEA RAX,[0x165190] MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x001132e0 MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x58] MOV R8,RAX MOV ESI,0x7ea MOV AL,0x0 CALL 0x0011a650 CMP byte ptr [RBP + -0x19],0x0 JNZ 0x0013b7d9 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x30] XOR ESI,ESI XOR ECX,ECX MOV EDX,ECX CALL RAX LAB_0013b7d9: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013b814 LAB_0013b7df: CMP dword ptr [RBP + -0x34],0x1 JZ 0x0013b7f4 MOV RDI,qword ptr [RBP + -0x28] CALL 0x0013b820 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013b814 LAB_0013b7f4: JMP 0x0013b7f6 LAB_0013b7f6: JMP 0x0013b7f8 LAB_0013b7f8: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0013b814: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int1 ma_tls_connect(long param_1) { SSL *ssl; long lVar1; bool bVar2; int *puVar3; int *puVar4; char cVar5; int iVar6; long *plVar7; long n; char *pcVar8; bool bVar9; int local_3c; ssl = *(SSL **)(param_1 + 0x10); bVar2 = true; plVar7 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar7; cVar5 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x68))(lVar1); if (cVar5 == '\0') { (**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0); } SSL_clear(ssl); iVar6 = mysql_get_socket(plVar7); SSL_set_fd(ssl,iVar6); while( true ) { bVar9 = false; if (bVar2) { local_3c = SSL_connect(ssl); bVar9 = local_3c == -1; } if (!bVar9) break; iVar6 = SSL_get_error(ssl,local_3c); if (iVar6 == 2) { iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]); if (iVar6 < 1) { bVar2 = false; } } else if (iVar6 == 3) { iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]); if (iVar6 < 1) { bVar2 = false; } } else { bVar2 = false; } } if ((((local_3c != 1) || ((plVar7[0x6d] & 0x40000000U) != 0)) || (plVar7[0x82] != 0)) || (plVar7[0x83] != 0)) { n = SSL_get_verify_result(ssl); puVar4 = PTR_s_TLS_SSL_error_____100s_00165260; puVar3 = SQLSTATE_UNKNOWN; if (n != 0) { pcVar8 = X509_verify_cert_error_string(n); my_set_error(plVar7,0x7ea,puVar3,puVar4,pcVar8); if (cVar5 == '\0') { (**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0); } return 1; } if (local_3c != 1) { ma_tls_set_error(plVar7); return 1; } } *(SSL **)(param_1 + 0x10) = ssl; *(SSL **)(*(long *)(lVar1 + 0x38) + 0x10) = ssl; return 0; }
30,412
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&)
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
gguf_kv(const std::string & key, const std::vector<std::string> & value) : key(key), is_array(true), type(GGUF_TYPE_STRING) { GGML_ASSERT(!key.empty()); data_string = value; }
O1
cpp
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r14 leaq 0x10(%rdi), %rbx movq %rbx, (%rdi) movq (%rsi), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx callq 0x17620 movb $0x1, 0x20(%r14) movl $0x8, 0x24(%r14) leaq 0x28(%r14), %rbp leaq 0x40(%r14), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movups %xmm0, 0x38(%r14) movups %xmm0, 0x48(%r14) cmpq $0x0, 0x8(%r13) je 0x48042 movq %r15, %rdi movq %r12, %rsi callq 0x181c0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x14fa4(%rip), %rdi # 0x5cfed leaq 0x4571(%rip), %rdx # 0x4c5c1 leaq 0x157c4(%rip), %rcx # 0x5d81b movl $0x9c, %esi xorl %eax, %eax callq 0x18ce0 movq %rax, %r12 movq %r15, %rdi callq 0x17c90 movq (%rbp), %rdi testq %rdi, %rdi je 0x48083 movq 0x38(%r14), %rsi subq %rdi, %rsi callq 0x180e0 movq %r14, %rdi movq %rbx, %rsi callq 0x1a5e0 movq %r12, %rdi callq 0x18ea0
_ZN7gguf_kvC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov r13, rsi mov r14, rdi lea rbx, [rdi+10h] mov [rdi], rbx mov rsi, [rsi] mov rdx, [r13+8] add rdx, rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [r14+20h], 1 mov dword ptr [r14+24h], 8 lea rbp, [r14+28h] lea r15, [r14+40h] xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 movups xmmword ptr [r14+38h], xmm0 movups xmmword ptr [r14+48h], xmm0 cmp qword ptr [r13+8], 0 jz short loc_48042 mov rdi, r15 mov rsi, r12 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_48042: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyEmpty; "!key.empty()" mov esi, 9Ch xor eax, eax call _ggml_abort mov r12, rax mov rdi, r15 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_48083 mov rsi, [r14+38h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_48083: mov rdi, r14 mov rsi, rbx call _ZN7gguf_kvC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE_cold_1; gguf_kv::gguf_kv(std::string const&,std::vector<std::string> const&) [clone] mov rdi, r12 call __Unwind_Resume
long long gguf_kv::gguf_kv(long long a1, _QWORD *a2, long long a3) { int v4; // r8d int v5; // r9d *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char *>(a1, *a2, *a2 + a2[1]); *(_BYTE *)(a1 + 32) = 1; *(_DWORD *)(a1 + 36) = 8; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; if ( !a2[1] ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 156, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"!key.empty()", v4, v5); return std::vector<std::string>::operator=(a1 + 64, a3); }
gguf_kv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV R13,RSI MOV R14,RDI LEA RBX,[RDI + 0x10] MOV qword ptr [RDI],RBX MOV RSI,qword ptr [RSI] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI CALL 0x00117620 MOV byte ptr [R14 + 0x20],0x1 MOV dword ptr [R14 + 0x24],0x8 LEA RBP,[R14 + 0x28] LEA R15,[R14 + 0x40] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOVUPS xmmword ptr [R14 + 0x38],XMM0 MOVUPS xmmword ptr [R14 + 0x48],XMM0 CMP qword ptr [R13 + 0x8],0x0 JZ 0x00148042 LAB_00148028: MOV RDI,R15 MOV RSI,R12 CALL 0x001181c0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00148042: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d81b] MOV ESI,0x9c XOR EAX,EAX CALL 0x00118ce0
/* gguf_kv::gguf_kv(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ void __thiscall gguf_kv::gguf_kv(gguf_kv *this,string *param_1,vector *param_2) { *(gguf_kv **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); this[0x20] = (gguf_kv)0x1; *(int4 *)(this + 0x24) = 8; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; if (*(long *)(param_1 + 8) != 0) { /* try { // try from 00148028 to 00148062 has its CatchHandler @ 00148063 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator= ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_2); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x9c,"GGML_ASSERT(%s) failed","!key.empty()"); }
30,413
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&)
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
gguf_kv(const std::string & key, const std::vector<std::string> & value) : key(key), is_array(true), type(GGUF_TYPE_STRING) { GGML_ASSERT(!key.empty()); data_string = value; }
O2
cpp
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx callq 0x1e2a0 movb $0x1, 0x20(%rbx) movl $0x8, 0x24(%rbx) leaq 0x28(%rbx), %r14 leaq 0x40(%rbx), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movups %xmm0, 0x38(%rbx) movups %xmm0, 0x48(%rbx) cmpq $0x0, 0x8(%r13) je 0x49d5d movq %r15, %rdi movq %r12, %rsi callq 0x1e950 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x154e9(%rip), %rdi # 0x5f24d leaq 0x486a(%rip), %rdx # 0x4e5d5 leaq 0x15deb(%rip), %rcx # 0x5fb5d movl $0x9c, %esi xorl %eax, %eax callq 0x1f9b0 movq %rax, %r12 movq %r15, %rdi callq 0x1e1b0 movq %r14, %rdi callq 0x1f8c0 movq %rbx, %rdi callq 0x1eab0 movq %r12, %rdi callq 0x1fc10 nop
_ZN7gguf_kvC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE: push r15 push r14 push r13 push r12 push rbx mov r12, rdx mov r13, rsi mov rbx, rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov byte ptr [rbx+20h], 1 mov dword ptr [rbx+24h], 8 lea r14, [rbx+28h] lea r15, [rbx+40h] xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 movups xmmword ptr [rbx+38h], xmm0 movups xmmword ptr [rbx+48h], xmm0 cmp qword ptr [r13+8], 0 jz short loc_49D5D mov rdi, r15 mov rsi, r12 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&) pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_49D5D: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyEmpty; "!key.empty()" mov esi, 9Ch xor eax, eax call _ggml_abort mov r12, rax mov rdi, r15 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base() mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12 call __Unwind_Resume
long long gguf_kv::gguf_kv( long long a1, long long a2, long long a3, double a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 char v17; // [rsp+0h] [rbp-28h] std::string::basic_string(); *(_BYTE *)(a1 + 32) = 1; *(_DWORD *)(a1 + 36) = 8; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; if ( !*(_QWORD *)(a2 + 8) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 156, (long long)"GGML_ASSERT(%s) failed", (long long)"!key.empty()", v12, v13, (__m128)0LL, a5, a6, a7, v14, v15, a10, a11, v17); return std::vector<std::string>::operator=(a1 + 64, a3); }
gguf_kv: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RDX MOV R13,RSI MOV RBX,RDI CALL 0x0011e2a0 MOV byte ptr [RBX + 0x20],0x1 MOV dword ptr [RBX + 0x24],0x8 LEA R14,[RBX + 0x28] LEA R15,[RBX + 0x40] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOVUPS xmmword ptr [RBX + 0x38],XMM0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 CMP qword ptr [R13 + 0x8],0x0 JZ 0x00149d5d LAB_00149d48: MOV RDI,R15 MOV RSI,R12 CALL 0x0011e950 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00149d5d: LEA RDI,[0x15f24d] LEA RDX,[0x14e5d5] LEA RCX,[0x15fb5d] MOV ESI,0x9c XOR EAX,EAX CALL 0x0011f9b0
/* gguf_kv::gguf_kv(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ void __thiscall gguf_kv::gguf_kv(gguf_kv *this,string *param_1,vector *param_2) { std::__cxx11::string::string((string *)this,param_1); this[0x20] = (gguf_kv)0x1; *(int4 *)(this + 0x24) = 8; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; if (*(long *)(param_1 + 8) != 0) { /* try { // try from 00149d48 to 00149d7d has its CatchHandler @ 00149d7e */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator= ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_2); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x9c,"GGML_ASSERT(%s) failed","!key.empty()"); }
30,414
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&)
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
gguf_kv(const std::string & key, const std::vector<std::string> & value) : key(key), is_array(true), type(GGUF_TYPE_STRING) { GGML_ASSERT(!key.empty()); data_string = value; }
O3
cpp
gguf_kv::gguf_kv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 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&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r14 leaq 0x10(%rdi), %rbx movq %rbx, (%rdi) movq (%rsi), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx callq 0x16620 movb $0x1, 0x20(%r14) movl $0x8, 0x24(%r14) leaq 0x28(%r14), %rbp leaq 0x40(%r14), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%r14) movups %xmm0, 0x38(%r14) movups %xmm0, 0x48(%r14) cmpq $0x0, 0x8(%r13) je 0x478a4 movq %r15, %rdi movq %r12, %rsi callq 0x171b0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x15c32(%rip), %rdi # 0x5d4dd leaq 0x4db3(%rip), %rdx # 0x4c665 leaq 0x16452(%rip), %rcx # 0x5dd0b movl $0x9c, %esi xorl %eax, %eax callq 0x17cd0 movq %rax, %r12 movq %r15, %rdi callq 0x16c90 movq (%rbp), %rdi testq %rdi, %rdi je 0x478e5 movq 0x38(%r14), %rsi subq %rdi, %rsi callq 0x170d0 movq %r14, %rdi movq %rbx, %rsi callq 0x192b7 movq %r12, %rdi callq 0x17e90
_ZN7gguf_kvC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdx mov r13, rsi mov r14, rdi lea rbx, [rdi+10h] mov [rdi], rbx mov rsi, [rsi] mov rdx, [r13+8] add rdx, rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov byte ptr [r14+20h], 1 mov dword ptr [r14+24h], 8 lea rbp, [r14+28h] lea r15, [r14+40h] xorps xmm0, xmm0 movups xmmword ptr [r14+28h], xmm0 movups xmmword ptr [r14+38h], xmm0 movups xmmword ptr [r14+48h], xmm0 cmp qword ptr [r13+8], 0 jz short loc_478A4 mov rdi, r15 mov rsi, r12 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEaSERKS7_; std::vector<std::string>::operator=(std::vector<std::string> const&) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_478A4: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyEmpty; "!key.empty()" mov esi, 9Ch xor eax, eax call _ggml_abort mov r12, rax mov rdi, r15 call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rbp+0]; void * test rdi, rdi jz short loc_478E5 mov rsi, [r14+38h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_478E5: mov rdi, r14 mov rsi, rbx call _ZN7gguf_kvC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EE_cold_1; gguf_kv::gguf_kv(std::string const&,std::vector<std::string> const&) [clone] mov rdi, r12 call __Unwind_Resume
long long gguf_kv::gguf_kv(long long a1, _QWORD *a2, long long a3) { int v4; // r8d int v5; // r9d *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char *>(a1, *a2, *a2 + a2[1]); *(_BYTE *)(a1 + 32) = 1; *(_DWORD *)(a1 + 36) = 8; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; if ( !a2[1] ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 156, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"!key.empty()", v4, v5); return std::vector<std::string>::operator=(a1 + 64, a3); }
gguf_kv: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV R13,RSI MOV R14,RDI LEA RBX,[RDI + 0x10] MOV qword ptr [RDI],RBX MOV RSI,qword ptr [RSI] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI CALL 0x00116620 MOV byte ptr [R14 + 0x20],0x1 MOV dword ptr [R14 + 0x24],0x8 LEA RBP,[R14 + 0x28] LEA R15,[R14 + 0x40] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x28],XMM0 MOVUPS xmmword ptr [R14 + 0x38],XMM0 MOVUPS xmmword ptr [R14 + 0x48],XMM0 CMP qword ptr [R13 + 0x8],0x0 JZ 0x001478a4 LAB_0014788a: MOV RDI,R15 MOV RSI,R12 CALL 0x001171b0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001478a4: LEA RDI,[0x15d4dd] LEA RDX,[0x14c665] LEA RCX,[0x15dd0b] MOV ESI,0x9c XOR EAX,EAX CALL 0x00117cd0
/* gguf_kv::gguf_kv(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ void __thiscall gguf_kv::gguf_kv(gguf_kv *this,string *param_1,vector *param_2) { *(gguf_kv **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); this[0x20] = (gguf_kv)0x1; *(int4 *)(this + 0x24) = 8; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; if (*(long *)(param_1 + 8) != 0) { /* try { // try from 0014788a to 001478c4 has its CatchHandler @ 001478c5 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator= ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_2); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x9c,"GGML_ASSERT(%s) failed","!key.empty()"); }
30,415
bf_log
bluesky950520[P]quickjs/libbf.c
int bf_log(bf_t *r, const bf_t *a, limb_t prec, bf_flags_t flags) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; assert(r != a); if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bf_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF) { if (a->sign) { bf_set_nan(r); return BF_ST_INVALID_OP; } else { bf_set_inf(r, 0); return 0; } } else { bf_set_inf(r, 1); return 0; } } if (a->sign) { bf_set_nan(r); return BF_ST_INVALID_OP; } bf_init(s, T); bf_set_ui(T, 1); if (bf_cmp_eq(a, T)) { bf_set_zero(r, 0); bf_delete(T); return 0; } bf_delete(T); return bf_ziv_rounding(r, a, prec, flags, bf_log_internal, NULL); }
O2
c
bf_log: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x18(%rsi) je 0x78373 cmpl $0x0, 0x8(%r14) je 0x783aa movq %rbx, %rdi callq 0x7317d pushq $0x1 popq %rbp jmp 0x78431 movq 0x10(%r14), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x7840b movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x78424 movq %rbx, %rdi callq 0x7317d jmp 0x7842f movl %ecx, %ebp movq %rdx, %r15 movq (%rbx), %rax leaq 0x8(%rsp), %r12 movq %rax, (%r12) andl $0x0, 0x8(%r12) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r12) pushq $0x1 popq %rsi movq %r12, %rdi callq 0x73106 movq %r14, %rdi movq %r12, %rsi callq 0x78470 testl %eax, %eax je 0x78440 xorl %ebp, %ebp movq %rbx, %rdi xorl %esi, %esi callq 0x731c2 leaq 0x8(%rsp), %rdi callq 0x7500e jmp 0x78431 cmpl $0x0, 0x8(%r14) jne 0x78363 xorl %ebp, %ebp movq %rbx, %rdi xorl %esi, %esi callq 0x731ec jmp 0x78431 pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x731ec xorl %ebp, %ebp movl %ebp, %eax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x8(%rsp), %rdi callq 0x7500e leaq 0x30(%rip), %r8 # 0x78481 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx xorl %r9d, %r9d addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x78034
bf_log: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+18h], 0 jz short loc_78373 cmp dword ptr [r14+8], 0 jz short loc_783AA loc_78363: mov rdi, rbx call bf_set_nan push 1 pop rbp jmp loc_78431 loc_78373: mov rax, [r14+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz loc_7840B mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz loc_78424 mov rdi, rbx call bf_set_nan jmp loc_7842F loc_783AA: mov ebp, ecx mov r15, rdx mov rax, [rbx] lea r12, [rsp+58h+var_50] mov [r12], rax and dword ptr [r12+8], 0 mov rax, 8000000000000000h mov [r12+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r12+18h], xmm0 push 1 pop rsi mov rdi, r12 call bf_set_ui mov rdi, r14 mov rsi, r12 call bf_cmp_eq_0 test eax, eax jz short loc_78440 xor ebp, ebp mov rdi, rbx xor esi, esi call bf_set_zero lea rdi, [rsp+58h+var_50] call bf_delete_0 jmp short loc_78431 loc_7840B: cmp dword ptr [r14+8], 0 jnz loc_78363 xor ebp, ebp mov rdi, rbx xor esi, esi call bf_set_inf jmp short loc_78431 loc_78424: push 1 pop rsi mov rdi, rbx call bf_set_inf loc_7842F: xor ebp, ebp loc_78431: mov eax, ebp add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_78440: lea rdi, [rsp+58h+var_50] call bf_delete_0 lea r8, bf_log_internal mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, ebp xor r9d, r9d add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp jmp bf_ziv_rounding
long long bf_log(long long *a1, long long a2, long long a3, unsigned int a4) { unsigned int v4; // ebp long long v5; // rax long long v9; // [rsp+8h] [rbp-50h] BYREF int v10; // [rsp+10h] [rbp-48h] unsigned long long v11; // [rsp+18h] [rbp-40h] __int128 v12; // [rsp+20h] [rbp-38h] if ( !*(_QWORD *)(a2 + 24) ) { v5 = *(_QWORD *)(a2 + 16); if ( v5 != 0x7FFFFFFFFFFFFFFELL ) { if ( v5 == 0x7FFFFFFFFFFFFFFFLL ) bf_set_nan((long long)a1); else bf_set_inf((long long)a1, 1); return 0; } if ( !*(_DWORD *)(a2 + 8) ) { v4 = 0; bf_set_inf((long long)a1, 0); return v4; } goto LABEL_3; } if ( *(_DWORD *)(a2 + 8) ) { LABEL_3: bf_set_nan((long long)a1); return 1; } v9 = *a1; v10 = 0; v11 = 0x8000000000000000LL; v12 = 0LL; bf_set_ui((long long)&v9, 1uLL); if ( (unsigned int)bf_cmp_eq_0(a2, &v9) ) { v4 = 0; bf_set_zero((long long)a1, 0); bf_delete_0(&v9); return v4; } bf_delete_0(&v9); return bf_ziv_rounding(a1, a2, a3, a4, (void ( *)(_QWORD *, long long, long long, long long))bf_log_internal, 0LL); }
bf_log: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI CMP qword ptr [RSI + 0x18],0x0 JZ 0x00178373 CMP dword ptr [R14 + 0x8],0x0 JZ 0x001783aa LAB_00178363: MOV RDI,RBX CALL 0x0017317d PUSH 0x1 POP RBP JMP 0x00178431 LAB_00178373: MOV RAX,qword ptr [R14 + 0x10] MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x0017840b MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x00178424 MOV RDI,RBX CALL 0x0017317d JMP 0x0017842f LAB_001783aa: MOV EBP,ECX MOV R15,RDX MOV RAX,qword ptr [RBX] LEA R12,[RSP + 0x8] MOV qword ptr [R12],RAX AND dword ptr [R12 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R12 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x18],XMM0 PUSH 0x1 POP RSI MOV RDI,R12 CALL 0x00173106 MOV RDI,R14 MOV RSI,R12 CALL 0x00178470 TEST EAX,EAX JZ 0x00178440 XOR EBP,EBP MOV RDI,RBX XOR ESI,ESI CALL 0x001731c2 LEA RDI,[RSP + 0x8] CALL 0x0017500e JMP 0x00178431 LAB_0017840b: CMP dword ptr [R14 + 0x8],0x0 JNZ 0x00178363 XOR EBP,EBP MOV RDI,RBX XOR ESI,ESI CALL 0x001731ec JMP 0x00178431 LAB_00178424: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x001731ec LAB_0017842f: XOR EBP,EBP LAB_00178431: MOV EAX,EBP ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00178440: LEA RDI,[RSP + 0x8] CALL 0x0017500e LEA R8,[0x178481] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP XOR R9D,R9D ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00178034
int8 bf_log(int8 *param_1,long param_2,int8 param_3,int4 param_4) { int iVar1; int8 uVar2; int8 local_50; int4 local_48; int8 local_40; int8 local_38; int8 uStack_30; if (*(long *)(param_2 + 0x18) == 0) { if (*(long *)(param_2 + 0x10) != 0x7ffffffffffffffe) { if (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff) { bf_set_nan(param_1); } else { bf_set_inf(param_1,1); } return 0; } if (*(int *)(param_2 + 8) == 0) { bf_set_inf(param_1,0); return 0; } } else if (*(int *)(param_2 + 8) == 0) { local_50 = *param_1; local_48 = 0; local_40 = 0x8000000000000000; local_38 = 0; uStack_30 = 0; bf_set_ui(&local_50,1); iVar1 = bf_cmp_eq(param_2,&local_50); if (iVar1 != 0) { bf_set_zero(param_1,0); bf_delete(&local_50); return 0; } bf_delete(&local_50); uVar2 = bf_ziv_rounding(param_1,param_2,param_3,param_4,bf_log_internal,0); return uVar2; } bf_set_nan(param_1); return 1; }
30,416
my_once_alloc
eloqsql/mysys/my_once.c
void* my_once_alloc(size_t Size, myf MyFlags) { size_t get_size, max_left; uchar* point; reg1 USED_MEM *next; reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); prev= &my_once_root_block; max_left=0; for (next=my_once_root_block ; next && next->left < Size ; next= next->next) { if (next->left > max_left) max_left=next->left; prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); if (max_left*4 < my_once_extra && get_size < my_once_extra) get_size=my_once_extra; /* Normal alloc */ if ((next = (USED_MEM*) malloc(get_size)) == 0) { my_errno=errno; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size); return((uchar*) 0); } DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); next->next= 0; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; } point= (uchar*) ((char*) next+ (next->size-next->left)); next->left-= Size; if (MyFlags & MY_ZEROFILL) bzero(point, Size); return((void*) point); }
O3
c
my_once_alloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x7, %r14 andq $-0x8, %r14 leaq 0xb6886d(%rip), %r13 # 0xc08680 movq (%r13), %rcx xorl %eax, %eax testq %rcx, %rcx je 0x9fe3e movq %rcx, %r13 movq 0x8(%rcx), %rcx cmpq %r14, %rcx jae 0x9fe87 cmpq %rax, %rcx cmovaq %rcx, %rax movq (%r13), %rcx testq %rcx, %rcx jne 0x9fe1e shlq $0x2, %rax leaq 0x18(%r14), %rcx leaq 0x2e5ce7(%rip), %rdx # 0x385b30 movl (%rdx), %edx cmpq %rdx, %rcx movq %rdx, %r15 cmovaq %rcx, %r15 cmpq %rdx, %rax cmovaeq %rcx, %r15 movq %r15, %rdi callq 0x29710 testq %rax, %rax je 0x9feb8 movq $0x0, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r13) movq 0x8(%rax), %rcx movq %rax, %r13 movq 0x10(%r13), %r12 subq %rcx, %r12 addq %r13, %r12 subq %r14, %rcx movq %rcx, 0x8(%r13) testb $0x20, %bl je 0x9fee4 movq %r12, %rdi xorl %esi, %esi movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292c0 callq 0x297b0 movl (%rax), %r14d callq 0xa16ee movl %r14d, (%rax) xorl %r12d, %r12d testb $0x18, %bl je 0x9fee4 movl $0x1004, %esi # imm = 0x1004 movl $0x5, %edi movq %r15, %rdx xorl %eax, %eax callq 0x9dda3 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_once_alloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h lea r13, my_once_root_block mov rcx, [r13+0] xor eax, eax test rcx, rcx jz short loc_9FE3E loc_9FE1E: mov r13, rcx mov rcx, [rcx+8] cmp rcx, r14 jnb short loc_9FE87 cmp rcx, rax cmova rax, rcx mov rcx, [r13+0] test rcx, rcx jnz short loc_9FE1E shl rax, 2 loc_9FE3E: lea rcx, [r14+18h] lea rdx, my_once_extra mov edx, [rdx] cmp rcx, rdx mov r15, rdx cmova r15, rcx cmp rax, rdx cmovnb r15, rcx mov rdi, r15 call _malloc test rax, rax jz short loc_9FEB8 mov qword ptr [rax], 0 mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r13+0], rax mov rcx, [rax+8] mov r13, rax loc_9FE87: mov r12, [r13+10h] sub r12, rcx add r12, r13 sub rcx, r14 mov [r13+8], rcx test bl, 20h jz short loc_9FEE4 mov rdi, r12 xor esi, esi mov rdx, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset loc_9FEB8: call ___errno_location mov r14d, [rax] call _my_thread_var mov [rax], r14d xor r12d, r12d test bl, 18h jz short loc_9FEE4 mov esi, 1004h mov edi, 5 mov rdx, r15 xor eax, eax call my_error loc_9FEE4: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_once_alloc(long long a1, const char *a2) { unsigned long long v2; // r14 _QWORD *v3; // r13 _QWORD *v4; // rcx unsigned long long v5; // rax unsigned long long v6; // rcx unsigned long long v7; // r15 _QWORD *v8; // rax char *v9; // r12 int v11; // r14d v2 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = &my_once_root_block; v4 = (_QWORD *)my_once_root_block; v5 = 0LL; if ( my_once_root_block ) { while ( 1 ) { v3 = v4; v6 = v4[1]; if ( v6 >= v2 ) break; if ( v6 > v5 ) v5 = v6; v4 = (_QWORD *)*v3; if ( !*v3 ) { v5 *= 4LL; goto LABEL_7; } } } else { LABEL_7: v7 = my_once_extra; if ( v2 + 24 > my_once_extra ) v7 = v2 + 24; if ( v5 >= my_once_extra ) v7 = v2 + 24; v8 = (_QWORD *)malloc(v7); if ( !v8 ) { v11 = *(_DWORD *)__errno_location(v7); *(_DWORD *)my_thread_var(v7, a2) = v11; v9 = 0LL; if ( ((unsigned __int8)a2 & 0x18) != 0 ) my_error(5u, 4100LL, v7); return (long long)v9; } *v8 = 0LL; v8[2] = v7; v8[1] = v7 - 24; *v3 = v8; v6 = v8[1]; v3 = v8; } v9 = (char *)v3 + v3[2] - v6; v3[1] = v6 - v2; if ( ((unsigned __int8)a2 & 0x20) != 0 ) return memset(v9, 0LL, v2); return (long long)v9; }
my_once_alloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD R14,0x7 AND R14,-0x8 LEA R13,[0xd08680] MOV RCX,qword ptr [R13] XOR EAX,EAX TEST RCX,RCX JZ 0x0019fe3e LAB_0019fe1e: MOV R13,RCX MOV RCX,qword ptr [RCX + 0x8] CMP RCX,R14 JNC 0x0019fe87 CMP RCX,RAX CMOVA RAX,RCX MOV RCX,qword ptr [R13] TEST RCX,RCX JNZ 0x0019fe1e SHL RAX,0x2 LAB_0019fe3e: LEA RCX,[R14 + 0x18] LEA RDX,[0x485b30] MOV EDX,dword ptr [RDX] CMP RCX,RDX MOV R15,RDX CMOVA R15,RCX CMP RAX,RDX CMOVNC R15,RCX MOV RDI,R15 CALL 0x00129710 TEST RAX,RAX JZ 0x0019feb8 MOV qword ptr [RAX],0x0 MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R13],RAX MOV RCX,qword ptr [RAX + 0x8] MOV R13,RAX LAB_0019fe87: MOV R12,qword ptr [R13 + 0x10] SUB R12,RCX ADD R12,R13 SUB RCX,R14 MOV qword ptr [R13 + 0x8],RCX TEST BL,0x20 JZ 0x0019fee4 MOV RDI,R12 XOR ESI,ESI MOV RDX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292c0 LAB_0019feb8: CALL 0x001297b0 MOV R14D,dword ptr [RAX] CALL 0x001a16ee MOV dword ptr [RAX],R14D XOR R12D,R12D TEST BL,0x18 JZ 0x0019fee4 MOV ESI,0x1004 MOV EDI,0x5 MOV RDX,R15 XOR EAX,EAX CALL 0x0019dda3 LAB_0019fee4: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * my_once_alloc(long param_1,ulong param_2) { int iVar1; int8 *puVar2; ulong uVar3; int8 *puVar4; int *piVar5; ulong uVar6; ulong uVar7; void *pvVar8; int8 *puVar9; ulong __n; ulong __size; __n = param_1 + 7U & 0xfffffffffffffff8; uVar3 = 0; puVar2 = my_once_root_block; puVar9 = &my_once_root_block; if (my_once_root_block != (int8 *)0x0) { do { puVar4 = puVar2; uVar6 = puVar4[1]; if (__n <= uVar6) goto LAB_0019fe87; if (uVar3 < uVar6) { uVar3 = uVar6; } puVar2 = (int8 *)*puVar4; } while ((int8 *)*puVar4 != (int8 *)0x0); uVar3 = uVar3 << 2; puVar9 = puVar4; } uVar6 = __n + 0x18; uVar7 = (ulong)my_once_extra; __size = uVar7; if (uVar7 < uVar6) { __size = uVar6; } if (uVar7 <= uVar3) { __size = uVar6; } puVar4 = (int8 *)malloc(__size); if (puVar4 == (int8 *)0x0) { piVar5 = __errno_location(); iVar1 = *piVar5; piVar5 = (int *)_my_thread_var(); *piVar5 = iVar1; pvVar8 = (void *)0x0; if ((param_2 & 0x18) != 0) { my_error(5,0x1004,__size); } } else { *puVar4 = 0; puVar4[2] = __size; puVar4[1] = __size - 0x18; *puVar9 = puVar4; uVar6 = puVar4[1]; LAB_0019fe87: pvVar8 = (void *)((puVar4[2] - uVar6) + (long)puVar4); puVar4[1] = uVar6 - __n; if ((param_2 & 0x20) != 0) { pvVar8 = memset(pvVar8,0,__n); return pvVar8; } } return pvVar8; }
30,417
innobase_mysql_print_thd(_IO_FILE*, THD*, unsigned int)
eloqsql/storage/innobase/handler/ha_innodb.cc
void innobase_mysql_print_thd( /*=====================*/ FILE* f, /*!< in: output stream */ THD* thd, /*!< in: MySQL THD object */ uint max_query_len) /*!< in: max query length to print, or 0 to use the default max length */ { char buffer[1024]; fputs(thd_get_error_context_description(thd, buffer, sizeof buffer, max_query_len), f); putc('\n', f); }
O0
cpp
innobase_mysql_print_thd(_IO_FILE*, THD*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x430, %rsp # imm = 0x430 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x418(%rbp) movq %rsi, -0x420(%rbp) movl %edx, -0x424(%rbp) movq -0x420(%rbp), %rdi movl -0x424(%rbp), %ecx leaq -0x410(%rbp), %rsi movl $0x400, %edx # imm = 0x400 callq 0xa9ee10 movq %rax, %rdi movq -0x418(%rbp), %rsi callq 0x775530 movq -0x418(%rbp), %rsi movl $0xa, %edi callq 0x776750 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x10a16e5 addq $0x430, %rsp # imm = 0x430 popq %rbp retq callq 0x7754c0 nopw (%rax,%rax)
_Z24innobase_mysql_print_thdP8_IO_FILEP3THDj: push rbp mov rbp, rsp sub rsp, 430h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_418], rdi mov [rbp+var_420], rsi mov [rbp+var_424], edx mov rdi, [rbp+var_420] mov ecx, [rbp+var_424] lea rsi, [rbp+var_410] mov edx, 400h call thd_get_error_context_description mov rdi, rax mov rsi, [rbp+var_418] call _fputs mov rsi, [rbp+var_418] mov edi, 0Ah call _putc mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_10A16E5 add rsp, 430h pop rbp retn loc_10A16E5: call ___stack_chk_fail
unsigned long long innobase_mysql_print_thd(long long a1, Statement *a2, unsigned int a3) { long long error_context_description; // rax char v5[1032]; // [rsp+20h] [rbp-410h] BYREF unsigned long long v6; // [rsp+428h] [rbp-8h] v6 = __readfsqword(0x28u); error_context_description = thd_get_error_context_description(a2, v5, 0x400u, a3); fputs(error_context_description, a1); putc(10LL, a1); return __readfsqword(0x28u); }
~table_socket_instances: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x01068170 ADD RSP,0x10 POP RBP RET
/* table_socket_instances::~table_socket_instances() */ void __thiscall table_socket_instances::~table_socket_instances(table_socket_instances *this) { PFS_engine_table::~PFS_engine_table((PFS_engine_table *)this); return; }
30,418
void extractFromMirroredHeap<float, int>(float*, long, long, int*)
iqtree3/utils/heapsort.h
void extractFromMirroredHeap ( V* valueArray , ptrdiff_t start, ptrdiff_t stop , S* satteliteArray) { // //Extracts a value (and some sattelite information) //from a radix 2 max heap. // ptrdiff_t fudge = 2 - start; for (--stop; start<=stop; --stop) { ptrdiff_t i = stop; V v = valueArray[i]; S s = satteliteArray[i]; ptrdiff_t j = start; while ( j < stop ) { if ( j + 1 < stop ) { j += ( valueArray[j] < valueArray[j+1] ) ? 1 : 0; } if ( valueArray[j] <= v ) { break; } valueArray[i] = valueArray[j]; satteliteArray[i] = satteliteArray[j]; i = j; j = i + i + fudge; } valueArray[i] = v; satteliteArray[i] = s; } }
O0
c
void extractFromMirroredHeap<float, int>(float*, long, long, int*): movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq %rdx, -0x18(%rsp) movq %rcx, -0x20(%rsp) movl $0x2, %eax subq -0x10(%rsp), %rax movq %rax, -0x28(%rsp) movq -0x18(%rsp), %rax addq $-0x1, %rax movq %rax, -0x18(%rsp) movq -0x10(%rsp), %rax cmpq -0x18(%rsp), %rax jg 0x61695 movq -0x18(%rsp), %rax movq %rax, -0x30(%rsp) movq -0x8(%rsp), %rax movq -0x30(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movsd %xmm0, -0x38(%rsp) movq -0x20(%rsp), %rax movq -0x30(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x3c(%rsp) movq -0x10(%rsp), %rax movq %rax, -0x48(%rsp) movq -0x48(%rsp), %rax cmpq -0x18(%rsp), %rax jge 0x6165c movq -0x48(%rsp), %rax addq $0x1, %rax cmpq -0x18(%rsp), %rax jge 0x615e4 movq -0x8(%rsp), %rax movq -0x48(%rsp), %rcx movsd (%rax,%rcx,8), %xmm1 movq -0x8(%rsp), %rax movq -0x48(%rsp), %rcx movsd 0x8(%rax,%rcx,8), %xmm0 xorl %eax, %eax movl $0x1, %ecx ucomisd %xmm1, %xmm0 cmoval %ecx, %eax cltq addq -0x48(%rsp), %rax movq %rax, -0x48(%rsp) movq -0x8(%rsp), %rax movq -0x48(%rsp), %rcx movsd (%rax,%rcx,8), %xmm1 movsd -0x38(%rsp), %xmm0 ucomisd %xmm1, %xmm0 jb 0x61601 jmp 0x6165c movq -0x8(%rsp), %rax movq -0x48(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movq -0x8(%rsp), %rax movq -0x30(%rsp), %rcx movsd %xmm0, (%rax,%rcx,8) movq -0x20(%rsp), %rax movq -0x48(%rsp), %rcx movl (%rax,%rcx,4), %edx movq -0x20(%rsp), %rax movq -0x30(%rsp), %rcx movl %edx, (%rax,%rcx,4) movq -0x48(%rsp), %rax movq %rax, -0x30(%rsp) movq -0x30(%rsp), %rax addq -0x30(%rsp), %rax addq -0x28(%rsp), %rax movq %rax, -0x48(%rsp) jmp 0x6158b movsd -0x38(%rsp), %xmm0 movq -0x8(%rsp), %rax movq -0x30(%rsp), %rcx movsd %xmm0, (%rax,%rcx,8) movl -0x3c(%rsp), %edx movq -0x20(%rsp), %rax movq -0x30(%rsp), %rcx movl %edx, (%rax,%rcx,4) movq -0x18(%rsp), %rax addq $-0x1, %rax movq %rax, -0x18(%rsp) jmp 0x61541 retq nopw %cs:(%rax,%rax)
_Z23extractFromMirroredHeapIdiEvPT_llPT0_: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_18], rdx mov [rsp+var_20], rcx mov eax, 2 sub rax, [rsp+var_10] mov [rsp+var_28], rax mov rax, [rsp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+var_18], rax loc_61541: mov rax, [rsp+var_10] cmp rax, [rsp+var_18] jg locret_61695 mov rax, [rsp+var_18] mov [rsp+var_30], rax mov rax, [rsp+var_8] mov rcx, [rsp+var_30] movsd xmm0, qword ptr [rax+rcx*8] movsd [rsp+var_38], xmm0 mov rax, [rsp+var_20] mov rcx, [rsp+var_30] mov eax, [rax+rcx*4] mov [rsp+var_3C], eax mov rax, [rsp+var_10] mov [rsp+var_48], rax loc_6158B: mov rax, [rsp+var_48] cmp rax, [rsp+var_18] jge loc_6165C mov rax, [rsp+var_48] add rax, 1 cmp rax, [rsp+var_18] jge short loc_615E4 mov rax, [rsp+var_8] mov rcx, [rsp+var_48] movsd xmm1, qword ptr [rax+rcx*8] mov rax, [rsp+var_8] mov rcx, [rsp+var_48] movsd xmm0, qword ptr [rax+rcx*8+8] xor eax, eax mov ecx, 1 ucomisd xmm0, xmm1 cmova eax, ecx cdqe add rax, [rsp+var_48] mov [rsp+var_48], rax loc_615E4: mov rax, [rsp+var_8] mov rcx, [rsp+var_48] movsd xmm1, qword ptr [rax+rcx*8] movsd xmm0, [rsp+var_38] ucomisd xmm0, xmm1 jb short loc_61601 jmp short loc_6165C loc_61601: mov rax, [rsp+var_8] mov rcx, [rsp+var_48] movsd xmm0, qword ptr [rax+rcx*8] mov rax, [rsp+var_8] mov rcx, [rsp+var_30] movsd qword ptr [rax+rcx*8], xmm0 mov rax, [rsp+var_20] mov rcx, [rsp+var_48] mov edx, [rax+rcx*4] mov rax, [rsp+var_20] mov rcx, [rsp+var_30] mov [rax+rcx*4], edx mov rax, [rsp+var_48] mov [rsp+var_30], rax mov rax, [rsp+var_30] add rax, [rsp+var_30] add rax, [rsp+var_28] mov [rsp+var_48], rax jmp loc_6158B loc_6165C: movsd xmm0, [rsp+var_38] mov rax, [rsp+var_8] mov rcx, [rsp+var_30] movsd qword ptr [rax+rcx*8], xmm0 mov edx, [rsp+var_3C] mov rax, [rsp+var_20] mov rcx, [rsp+var_30] mov [rax+rcx*4], edx mov rax, [rsp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+var_18], rax jmp loc_61541 locret_61695: retn
long long extractFromMirroredHeap<double,int>(long long a1, long long a2, long long a3, long long a4) { long long result; // rax long long j; // [rsp+0h] [rbp-48h] int v6; // [rsp+Ch] [rbp-3Ch] double v7; // [rsp+10h] [rbp-38h] long long v8; // [rsp+18h] [rbp-30h] long long i; // [rsp+30h] [rbp-18h] for ( i = a3 - 1; ; --i ) { result = a2; if ( a2 > i ) break; v8 = i; v7 = *(double *)(a1 + 8 * i); v6 = *(_DWORD *)(a4 + 4 * i); for ( j = a2; j < i; j = 2 - a2 + 2 * j ) { if ( j + 1 < i ) j += *(double *)(a1 + 8 * j + 8) > *(double *)(a1 + 8 * j); if ( v7 >= *(double *)(a1 + 8 * j) ) break; *(_QWORD *)(a1 + 8 * v8) = *(_QWORD *)(a1 + 8 * j); *(_DWORD *)(a4 + 4 * v8) = *(_DWORD *)(a4 + 4 * j); v8 = j; } *(double *)(a1 + 8 * v8) = v7; *(_DWORD *)(a4 + 4 * v8) = v6; } return result; }
extractFromMirroredHeap<double,int>: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX MOV qword ptr [RSP + -0x20],RCX MOV EAX,0x2 SUB RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x28],RAX MOV RAX,qword ptr [RSP + -0x18] ADD RAX,-0x1 MOV qword ptr [RSP + -0x18],RAX LAB_00161541: MOV RAX,qword ptr [RSP + -0x10] CMP RAX,qword ptr [RSP + -0x18] JG 0x00161695 MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RSP + -0x30],RAX MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x30] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOVSD qword ptr [RSP + -0x38],XMM0 MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x30] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + -0x3c],EAX MOV RAX,qword ptr [RSP + -0x10] MOV qword ptr [RSP + -0x48],RAX LAB_0016158b: MOV RAX,qword ptr [RSP + -0x48] CMP RAX,qword ptr [RSP + -0x18] JGE 0x0016165c MOV RAX,qword ptr [RSP + -0x48] ADD RAX,0x1 CMP RAX,qword ptr [RSP + -0x18] JGE 0x001615e4 MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x48] MOVSD XMM1,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x48] MOVSD XMM0,qword ptr [RAX + RCX*0x8 + 0x8] XOR EAX,EAX MOV ECX,0x1 UCOMISD XMM0,XMM1 CMOVA EAX,ECX CDQE ADD RAX,qword ptr [RSP + -0x48] MOV qword ptr [RSP + -0x48],RAX LAB_001615e4: MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x48] MOVSD XMM1,qword ptr [RAX + RCX*0x8] MOVSD XMM0,qword ptr [RSP + -0x38] UCOMISD XMM0,XMM1 JC 0x00161601 JMP 0x0016165c LAB_00161601: MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x48] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x30] MOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x48] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x30] MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,qword ptr [RSP + -0x48] MOV qword ptr [RSP + -0x30],RAX MOV RAX,qword ptr [RSP + -0x30] ADD RAX,qword ptr [RSP + -0x30] ADD RAX,qword ptr [RSP + -0x28] MOV qword ptr [RSP + -0x48],RAX JMP 0x0016158b LAB_0016165c: MOVSD XMM0,qword ptr [RSP + -0x38] MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RSP + -0x30] MOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EDX,dword ptr [RSP + -0x3c] MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x30] MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,qword ptr [RSP + -0x18] ADD RAX,-0x1 MOV qword ptr [RSP + -0x18],RAX JMP 0x00161541 LAB_00161695: RET
/* void extractFromMirroredHeap<double, int>(double*, long, long, int*) */ void extractFromMirroredHeap<double,int>(double *param_1,long param_2,long param_3,int *param_4) { double dVar1; int iVar2; long local_48; long local_30; long local_18; local_18 = param_3 + -1; do { if (local_18 < param_2) { return; } local_30 = local_18; dVar1 = param_1[local_18]; iVar2 = param_4[local_18]; for (local_48 = param_2; local_48 < local_18; local_48 = local_48 * 2 + (2 - param_2)) { if (local_48 + 1 < local_18) { local_48 = (int)(uint)(param_1[local_48] < param_1[local_48 + 1]) + local_48; } if (param_1[local_48] <= dVar1) break; param_1[local_30] = param_1[local_48]; param_4[local_30] = param_4[local_48]; local_30 = local_48; } param_1[local_30] = dVar1; param_4[local_30] = iVar2; local_18 = local_18 + -1; } while( true ); }
30,419
void extractFromMirroredHeap<float, int>(float*, long, long, int*)
iqtree3/utils/heapsort.h
void extractFromMirroredHeap ( V* valueArray , ptrdiff_t start, ptrdiff_t stop , S* satteliteArray) { // //Extracts a value (and some sattelite information) //from a radix 2 max heap. // ptrdiff_t fudge = 2 - start; for (--stop; start<=stop; --stop) { ptrdiff_t i = stop; V v = valueArray[i]; S s = satteliteArray[i]; ptrdiff_t j = start; while ( j < stop ) { if ( j + 1 < stop ) { j += ( valueArray[j] < valueArray[j+1] ) ? 1 : 0; } if ( valueArray[j] <= v ) { break; } valueArray[i] = valueArray[j]; satteliteArray[i] = satteliteArray[j]; i = j; j = i + i + fudge; } valueArray[i] = v; satteliteArray[i] = s; } }
O3
c
void extractFromMirroredHeap<float, int>(float*, long, long, int*): cmpq %rsi, %rdx jle 0x1f401 movss -0x4(%rdi,%rdx,4), %xmm0 movl -0x4(%rcx,%rdx,4), %eax decq %rdx movq %rsi, %r10 movq %rdx, %r8 cmpq %rsi, %rdx jle 0x1f3f9 leaq 0x1(%r10), %r9 cmpq %rdx, %r9 jge 0x1f3b6 movss 0x4(%rdi,%r10,4), %xmm1 xorl %r9d, %r9d ucomiss (%rdi,%r10,4), %xmm1 seta %r9b addq %r10, %r9 jmp 0x1f3b9 movq %r10, %r9 movss (%rdi,%r9,4), %xmm1 ucomiss %xmm1, %xmm0 jae 0x1f3e7 movss %xmm1, (%rdi,%r8,4) movl (%rcx,%r9,4), %r10d movl %r10d, (%rcx,%r8,4) leaq (%r9,%r9), %r10 subq %rsi, %r10 addq $0x2, %r10 movq %r9, %r8 cmpq %rdx, %r10 jl 0x1f395 jmp 0x1f3ea movq %r8, %r9 movss %xmm0, (%rdi,%r9,4) movl %eax, (%rcx,%r9,4) jmp 0x1f374 movss %xmm0, (%rdi,%rdx,4) movl %eax, (%rcx,%rdx,4) retq
_Z23extractFromMirroredHeapIfiEvPT_llPT0_: cmp rdx, rsi jle locret_1F401 movss xmm0, dword ptr [rdi+rdx*4-4] mov eax, [rcx+rdx*4-4] dec rdx mov r10, rsi mov r8, rdx cmp rdx, rsi jle short loc_1F3F9 loc_1F395: lea r9, [r10+1] cmp r9, rdx jge short loc_1F3B6 movss xmm1, dword ptr [rdi+r10*4+4] xor r9d, r9d ucomiss xmm1, dword ptr [rdi+r10*4] setnbe r9b add r9, r10 jmp short loc_1F3B9 loc_1F3B6: mov r9, r10 loc_1F3B9: movss xmm1, dword ptr [rdi+r9*4] ucomiss xmm0, xmm1 jnb short loc_1F3E7 movss dword ptr [rdi+r8*4], xmm1 mov r10d, [rcx+r9*4] mov [rcx+r8*4], r10d lea r10, [r9+r9] sub r10, rsi add r10, 2 mov r8, r9 cmp r10, rdx jl short loc_1F395 jmp short loc_1F3EA loc_1F3E7: mov r9, r8 loc_1F3EA: movss dword ptr [rdi+r9*4], xmm0 mov [rcx+r9*4], eax jmp _Z23extractFromMirroredHeapIfiEvPT_llPT0_; extractFromMirroredHeap<float,int>(float *,long,long,int *) loc_1F3F9: movss dword ptr [rdi+rdx*4], xmm0 mov [rcx+rdx*4], eax locret_1F401: retn
void extractFromMirroredHeap<float,int>(long long a1, long long a2, long long a3, long long a4) { float v4; // xmm0_4 int v5; // eax long long v6; // r10 long long v7; // r8 long long v8; // r9 float v9; // xmm1_4 while ( a3 > a2 ) { v4 = *(float *)(a1 + 4 * a3 - 4); v5 = *(_DWORD *)(a4 + 4 * a3-- - 4); v6 = a2; v7 = a3; if ( a3 <= a2 ) { *(float *)(a1 + 4 * a3) = v4; *(_DWORD *)(a4 + 4 * a3) = v5; return; } while ( 1 ) { v8 = v6 + 1 >= a3 ? v6 : v6 + (*(float *)(a1 + 4 * v6 + 4) > *(float *)(a1 + 4 * v6)); v9 = *(float *)(a1 + 4 * v8); if ( v4 >= v9 ) break; *(float *)(a1 + 4 * v7) = v9; *(_DWORD *)(a4 + 4 * v7) = *(_DWORD *)(a4 + 4 * v8); v6 = 2 * v8 - a2 + 2; v7 = v8; if ( v6 >= a3 ) goto LABEL_10; } v8 = v7; LABEL_10: *(float *)(a1 + 4 * v8) = v4; *(_DWORD *)(a4 + 4 * v8) = v5; } }
extractFromMirroredHeap<float,int>: CMP RDX,RSI JLE 0x0011f401 MOVSS XMM0,dword ptr [RDI + RDX*0x4 + -0x4] MOV EAX,dword ptr [RCX + RDX*0x4 + -0x4] DEC RDX MOV R10,RSI MOV R8,RDX CMP RDX,RSI JLE 0x0011f3f9 LAB_0011f395: LEA R9,[R10 + 0x1] CMP R9,RDX JGE 0x0011f3b6 MOVSS XMM1,dword ptr [RDI + R10*0x4 + 0x4] XOR R9D,R9D UCOMISS XMM1,dword ptr [RDI + R10*0x4] SETA R9B ADD R9,R10 JMP 0x0011f3b9 LAB_0011f3b6: MOV R9,R10 LAB_0011f3b9: MOVSS XMM1,dword ptr [RDI + R9*0x4] UCOMISS XMM0,XMM1 JNC 0x0011f3e7 MOVSS dword ptr [RDI + R8*0x4],XMM1 MOV R10D,dword ptr [RCX + R9*0x4] MOV dword ptr [RCX + R8*0x4],R10D LEA R10,[R9 + R9*0x1] SUB R10,RSI ADD R10,0x2 MOV R8,R9 CMP R10,RDX JL 0x0011f395 JMP 0x0011f3ea LAB_0011f3e7: MOV R9,R8 LAB_0011f3ea: MOVSS dword ptr [RDI + R9*0x4],XMM0 MOV dword ptr [RCX + R9*0x4],EAX JMP 0x0011f374 LAB_0011f3f9: MOVSS dword ptr [RDI + RDX*0x4],XMM0 MOV dword ptr [RCX + RDX*0x4],EAX LAB_0011f401: RET
/* void extractFromMirroredHeap<float, int>(float*, long, long, int*) */ void extractFromMirroredHeap<float,int>(float *param_1,long param_2,long param_3,int *param_4) { float fVar1; int iVar2; long lVar3; long lVar4; long lVar5; do { if (param_3 <= param_2) { return; } fVar1 = param_1[param_3 + -1]; iVar2 = param_4[param_3 + -1]; param_3 = param_3 + -1; lVar3 = param_3; lVar4 = param_2; if (param_3 <= param_2) { param_1[param_3] = fVar1; param_4[param_3] = iVar2; return; } do { if (lVar4 + 1 < param_3) { lVar4 = (ulong)(param_1[lVar4] <= param_1[lVar4 + 1] && param_1[lVar4 + 1] != param_1[lVar4] ) + lVar4; } if (param_1[lVar4] <= fVar1) break; param_1[lVar3] = param_1[lVar4]; param_4[lVar3] = param_4[lVar4]; lVar5 = (lVar4 * 2 - param_2) + 2; lVar3 = lVar4; lVar4 = lVar5; } while (lVar5 < param_3); param_1[lVar3] = fVar1; param_4[lVar3] = iVar2; } while( true ); }
30,420
mysql_stmt_attr_set
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: stmt->update_max_length= *(my_bool *)value; break; case STMT_ATTR_CURSOR_TYPE: if (*(ulong *)value > (unsigned long) CURSOR_TYPE_READ_ONLY) { SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } stmt->flags = *(ulong *)value; break; case STMT_ATTR_PREFETCH_ROWS: if (*(ulong *)value == 0) *(long *)value= MYSQL_DEFAULT_PREFETCH_ROWS; else stmt->prefetch_rows= *(long *)value; break; case STMT_ATTR_PREBIND_PARAMS: if (stmt->state > MYSQL_STMT_INITTED) { mysql_stmt_internal_reset(stmt, 1); net_stmt_close(stmt, 0); stmt->state= MYSQL_STMT_INITTED; stmt->params= 0; } stmt->prebind_params= stmt->param_count= *(unsigned int *)value; break; case STMT_ATTR_ARRAY_SIZE: stmt->array_size= *(unsigned int *)value; break; case STMT_ATTR_ROW_SIZE: stmt->row_size= *(size_t *)value; break; case STMT_ATTR_CB_RESULT: stmt->result_callback= (ps_result_callback)value; break; case STMT_ATTR_CB_PARAM: stmt->param_callback= (ps_param_callback)value; break; case STMT_ATTR_CB_USER_DATA: stmt->user_data= (void *)value; break; default: SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } return(0); }
O0
c
mysql_stmt_attr_set: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) testl %eax, %eax je 0x4c2b2 jmp 0x4c233 movl -0x24(%rbp), %eax subl $0x1, %eax je 0x4c2c7 jmp 0x4c241 movl -0x24(%rbp), %eax subl $0x2, %eax je 0x4c356 jmp 0x4c24f movl -0x24(%rbp), %eax subl $0xc8, %eax je 0x4c384 jmp 0x4c25f movl -0x24(%rbp), %eax subl $0xc9, %eax je 0x4c3da jmp 0x4c26f movl -0x24(%rbp), %eax subl $0xca, %eax je 0x4c3ef jmp 0x4c27f movl -0x24(%rbp), %eax subl $0xcc, %eax je 0x4c42b jmp 0x4c28f movl -0x24(%rbp), %eax subl $0xcd, %eax je 0x4c41a jmp 0x4c29f movl -0x24(%rbp), %eax subl $0xce, %eax je 0x4c406 jmp 0x4c43c movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x313(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rax cmpq $0x1, (%rax) jbe 0x4c342 jmp 0x4c2d3 movq -0x10(%rbp), %rax movl $0x806, 0x108(%rax) # imm = 0x806 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1e733d(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1e7323(%rip), %rax # 0x233640 movq 0x1b0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x4c4ae movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x48(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x4c36d movq -0x20(%rbp), %rax movq $0x1, (%rax) jmp 0x4c37f movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x318(%rax) jmp 0x4c4aa movq -0x10(%rbp), %rax cmpl $0x0, 0x50(%rax) jbe 0x4c3be movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x4c4c0 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x4c6d0 movq -0x10(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x70(%rax) movq -0x20(%rbp), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x378(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x368(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x370(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x388(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x390(%rax) jmp 0x4c4aa movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x380(%rax) jmp 0x4c4aa jmp 0x4c43e movq -0x10(%rbp), %rax movl $0x806, 0x108(%rax) # imm = 0x806 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x1e71d2(%rip), %rax # 0x233630 movq (%rax), %rsi movl $0x5, %edx callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x1e71b8(%rip), %rax # 0x233640 movq 0x1b0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x36140 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x4c4ae movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_attr_set: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov eax, [rbp+var_14] mov [rbp+var_24], eax test eax, eax jz loc_4C2B2 jmp short $+2 loc_4C233: mov eax, [rbp+var_24] sub eax, 1 jz loc_4C2C7 jmp short $+2 loc_4C241: mov eax, [rbp+var_24] sub eax, 2 jz loc_4C356 jmp short $+2 loc_4C24F: mov eax, [rbp+var_24] sub eax, 0C8h jz loc_4C384 jmp short $+2 loc_4C25F: mov eax, [rbp+var_24] sub eax, 0C9h jz loc_4C3DA jmp short $+2 loc_4C26F: mov eax, [rbp+var_24] sub eax, 0CAh jz loc_4C3EF jmp short $+2 loc_4C27F: mov eax, [rbp+var_24] sub eax, 0CCh jz loc_4C42B jmp short $+2 loc_4C28F: mov eax, [rbp+var_24] sub eax, 0CDh jz loc_4C41A jmp short $+2 loc_4C29F: mov eax, [rbp+var_24] sub eax, 0CEh jz loc_4C406 jmp loc_4C43C loc_4C2B2: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov [rax+313h], cl jmp loc_4C4AA loc_4C2C7: mov rax, [rbp+var_20] cmp qword ptr [rax], 1 jbe short loc_4C342 jmp short $+2 loc_4C2D3: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 806h 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+1B0h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_4C4AE loc_4C342: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+48h], rcx jmp loc_4C4AA loc_4C356: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_4C36D mov rax, [rbp+var_20] mov qword ptr [rax], 1 jmp short loc_4C37F loc_4C36D: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+318h], rcx loc_4C37F: jmp loc_4C4AA loc_4C384: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 0 jbe short loc_4C3BE mov rdi, [rbp+var_10] mov esi, 1 call mysql_stmt_internal_reset mov rdi, [rbp+var_10] xor esi, esi call net_stmt_close mov rax, [rbp+var_10] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+70h], 0 loc_4C3BE: mov rax, [rbp+var_20] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax+64h], ecx mov rax, [rbp+var_10] mov [rax+378h], ecx jmp loc_4C4AA loc_4C3DA: mov rax, [rbp+var_20] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax+368h], ecx jmp loc_4C4AA loc_4C3EF: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+370h], rcx jmp loc_4C4AA loc_4C406: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+388h], rcx jmp loc_4C4AA loc_4C41A: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+390h], rcx jmp short loc_4C4AA loc_4C42B: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+380h], rcx jmp short loc_4C4AA loc_4C43C: jmp short $+2 loc_4C43E: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 806h 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+1B0h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp short loc_4C4AE loc_4C4AA: mov [rbp+var_1], 0 loc_4C4AE: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mysql_stmt_attr_set(long long a1, int a2, _BYTE *a3) { int v3; // ecx if ( !a2 ) { *(_BYTE *)(a1 + 787) = *a3; return 0; } if ( a2 != 1 ) { switch ( a2 ) { case 2: if ( *(_QWORD *)a3 ) *(_QWORD *)(a1 + 792) = *(_QWORD *)a3; else *(_QWORD *)a3 = 1LL; break; case 200: if ( *(_DWORD *)(a1 + 80) ) { mysql_stmt_internal_reset(a1, 1LL); net_stmt_close(a1, 0LL); *(_DWORD *)(a1 + 80) = 0; *(_QWORD *)(a1 + 112) = 0LL; } v3 = *(_DWORD *)a3; *(_DWORD *)(a1 + 100) = *(_DWORD *)a3; *(_DWORD *)(a1 + 888) = v3; break; case 201: *(_DWORD *)(a1 + 872) = *(_DWORD *)a3; break; case 202: *(_QWORD *)(a1 + 880) = *(_QWORD *)a3; break; case 204: *(_QWORD *)(a1 + 896) = a3; break; case 205: *(_QWORD *)(a1 + 912) = a3; break; case 206: *(_QWORD *)(a1 + 904) = a3; break; default: goto LABEL_13; } return 0; } if ( *(_QWORD *)a3 <= 1uLL ) { *(_QWORD *)(a1 + 72) = *(_QWORD *)a3; return 0; } LABEL_13: *(_DWORD *)(a1 + 264) = 2054; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[54], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
mysql_stmt_attr_set: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX TEST EAX,EAX JZ 0x0014c2b2 JMP 0x0014c233 LAB_0014c233: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x1 JZ 0x0014c2c7 JMP 0x0014c241 LAB_0014c241: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x2 JZ 0x0014c356 JMP 0x0014c24f LAB_0014c24f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc8 JZ 0x0014c384 JMP 0x0014c25f LAB_0014c25f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc9 JZ 0x0014c3da JMP 0x0014c26f LAB_0014c26f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xca JZ 0x0014c3ef JMP 0x0014c27f LAB_0014c27f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcc JZ 0x0014c42b JMP 0x0014c28f LAB_0014c28f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcd JZ 0x0014c41a JMP 0x0014c29f LAB_0014c29f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xce JZ 0x0014c406 JMP 0x0014c43c LAB_0014c2b2: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x313],CL JMP 0x0014c4aa LAB_0014c2c7: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x1 JBE 0x0014c342 JMP 0x0014c2d3 LAB_0014c2d3: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x806 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0x1b0] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c4ae LAB_0014c342: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],RCX JMP 0x0014c4aa LAB_0014c356: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x0014c36d MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x1 JMP 0x0014c37f LAB_0014c36d: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x318],RCX LAB_0014c37f: JMP 0x0014c4aa LAB_0014c384: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x0 JBE 0x0014c3be MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0014c4c0 MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x0014c6d0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x70],0x0 LAB_0014c3be: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x378],ECX JMP 0x0014c4aa LAB_0014c3da: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x368],ECX JMP 0x0014c4aa LAB_0014c3ef: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x370],RCX JMP 0x0014c4aa LAB_0014c406: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x388],RCX JMP 0x0014c4aa LAB_0014c41a: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x390],RCX JMP 0x0014c4aa LAB_0014c42b: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x380],RCX JMP 0x0014c4aa LAB_0014c43c: JMP 0x0014c43e LAB_0014c43e: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x806 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x333630] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x333640] MOV RSI,qword ptr [RAX + 0x1b0] MOV EDX,0x200 CALL 0x00136140 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014c4ae LAB_0014c4aa: MOV byte ptr [RBP + -0x1],0x0 LAB_0014c4ae: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mysql_stmt_attr_set(long param_1,int param_2,ulong *param_3) { ulong uVar1; if (param_2 == 0) { *(char *)(param_1 + 0x313) = (char)*param_3; } else if (param_2 == 1) { if (1 < *param_3) { *(int4 *)(param_1 + 0x108) = 0x806; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_003337f0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } *(ulong *)(param_1 + 0x48) = *param_3; } else if (param_2 == 2) { if (*param_3 == 0) { *param_3 = 1; } else { *(ulong *)(param_1 + 0x318) = *param_3; } } else if (param_2 == 200) { if (*(int *)(param_1 + 0x50) != 0) { mysql_stmt_internal_reset(param_1,1); net_stmt_close(param_1,0); *(int4 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x70) = 0; } uVar1 = *param_3; *(int *)(param_1 + 100) = (int)uVar1; *(int *)(param_1 + 0x378) = (int)uVar1; } else if (param_2 == 0xc9) { *(int *)(param_1 + 0x368) = (int)*param_3; } else if (param_2 == 0xca) { *(ulong *)(param_1 + 0x370) = *param_3; } else if (param_2 == 0xcc) { *(ulong **)(param_1 + 0x380) = param_3; } else if (param_2 == 0xcd) { *(ulong **)(param_1 + 0x390) = param_3; } else { if (param_2 != 0xce) { *(int4 *)(param_1 + 0x108) = 0x806; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_003337f0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } *(ulong **)(param_1 + 0x388) = param_3; } return 0; }
30,421
mthd_stmt_get_param_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); free_rows(result); return(0); }
O0
c
mthd_stmt_get_param_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x4fa90 movq -0x28(%rbp), %rdi movl %eax, %edx movq -0x20(%rbp), %rax addl $0x7, %edx xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x4fa6f movb $0x1, -0x1(%rbp) jmp 0x4fa7c movq -0x18(%rbp), %rdi callq 0x3b740 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mthd_stmt_get_param_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_extended_type_info_rows mov rdi, [rbp+var_28] mov edx, eax mov rax, [rbp+var_20] add edx, 7 xor ecx, ecx mov esi, ecx call rax mov [rbp+var_18], rax cmp rax, 0 jnz short loc_4FA6F mov [rbp+var_1], 1 jmp short loc_4FA7C loc_4FA6F: mov rdi, [rbp+var_18] call free_rows mov [rbp+var_1], 0 loc_4FA7C: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mthd_stmt_get_param_metadata(long long a1) { int v1; // eax long long v3; // [rsp+8h] [rbp-28h] long long ( *v4)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] v4 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL); v3 = *(_QWORD *)(a1 + 56); v1 = ma_extended_type_info_rows(v3); v5 = v4(v3, 0LL, (unsigned int)(v1 + 7)); if ( !v5 ) return 1; free_rows(v5); return 0; }
mthd_stmt_get_param_metadata: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x0014fa90 MOV RDI,qword ptr [RBP + -0x28] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] ADD EDX,0x7 XOR ECX,ECX MOV ESI,ECX CALL RAX MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0014fa6f MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014fa7c LAB_0014fa6f: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0013b740 MOV byte ptr [RBP + -0x1],0x0 LAB_0014fa7c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool mthd_stmt_get_param_metadata(long param_1) { code *pcVar1; int8 uVar2; int iVar3; long lVar4; bool local_9; pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28); uVar2 = *(int8 *)(param_1 + 0x38); iVar3 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38)); lVar4 = (*pcVar1)(uVar2,0,iVar3 + 7); if (lVar4 != 0) { free_rows(lVar4); } local_9 = lVar4 == 0; return local_9; }
30,422
testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(const char* output_file) : output_file_(output_file) { if (output_file_.empty()) { GTEST_LOG_(FATAL) << "JSON output file may not be null"; } }
O1
cpp
testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2f894(%rip), %rax # 0x581a8 movq %rax, (%rdi) addq $0x8, %rdi leaq 0x3(%rsp), %rdx callq 0x81e0 cmpq $0x0, 0x10(%rbx) jne 0x28969 leaq 0x19dda(%rip), %rdx # 0x4270d leaq 0x4(%rsp), %rdi movl $0x3, %esi movl $0x11d1, %ecx # imm = 0x11D1 callq 0x16e72 movq 0x3069a(%rip), %rdi # 0x58fe8 leaq 0x1acc3(%rip), %rsi # 0x43618 movl $0x20, %edx callq 0x85b0 leaq 0x4(%rsp), %rdi callq 0x16fb4 addq $0x8, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x4(%rsp), %rdi callq 0x16fb4 jmp 0x28983 movq %rax, %r14 movq 0x8(%rbx), %rdi addq $0x18, %rbx cmpq %rbx, %rdi je 0x2899b movq (%rbx), %rsi incq %rsi callq 0x84e0 movq %r14, %rdi callq 0x8990 nop
_ZN7testing8internal25JsonUnitTestResultPrinterC2EPKc: push r14 push rbx push rax mov rbx, rdi lea rax, off_581A8 mov [rdi], rax add rdi, 8 lea rdx, [rsp+18h+var_15] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) cmp qword ptr [rbx+10h], 0 jnz short loc_28969 lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+18h+var_14] mov esi, 3 mov ecx, 11D1h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, cs:_ZSt4cerr_ptr lea rsi, aJsonOutputFile; "JSON output file may not be null" mov edx, 20h ; ' ' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+18h+var_14]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_28969: add rsp, 8 pop rbx pop r14 retn mov r14, rax lea rdi, [rsp+4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_28983 mov r14, rax loc_28983: mov rdi, [rbx+8]; void * add rbx, 18h cmp rdi, rbx jz short loc_2899B mov rsi, [rbx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2899B: mov rdi, r14 call __Unwind_Resume
void testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter( testing::internal::JsonUnitTestResultPrinter *this, const char *a2) { long long v2; // rax long long v3; // rdx long long v4; // rcx _QWORD v5[3]; // [rsp-2h] [rbp-18h] BYREF v5[0] = v2; *(_QWORD *)this = off_581A8; std::string::basic_string((char *)this + 8, a2, (char *)v5 + 3); if ( !*((_QWORD *)this + 2) ) { testing::internal::GTestLog::GTestLog( (_DWORD *)v5 + 1, 3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc", 4561); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "JSON output file may not be null", 32LL); testing::internal::GTestLog::~GTestLog( (testing::internal::GTestLog *)((char *)v5 + 4), (long long)"JSON output file may not be null", v3, v4); } }
JsonUnitTestResultPrinter: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x1581a8] MOV qword ptr [RDI],RAX ADD RDI,0x8 LEA RDX,[RSP + 0x3] CALL 0x001081e0 CMP qword ptr [RBX + 0x10],0x0 JNZ 0x00128969 LAB_0012892c: LEA RDX,[0x14270d] LEA RDI,[RSP + 0x4] MOV ESI,0x3 MOV ECX,0x11d1 CALL 0x00116e72 LAB_00128947: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x143618] MOV EDX,0x20 CALL 0x001085b0 LAB_0012895f: LEA RDI,[RSP + 0x4] CALL 0x00116fb4 LAB_00128969: ADD RSP,0x8 POP RBX POP R14 RET
/* testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter(char const*) */ void __thiscall testing::internal::JsonUnitTestResultPrinter::JsonUnitTestResultPrinter (JsonUnitTestResultPrinter *this,char *param_1) { allocator local_15; GTestLog local_14 [4]; *(int ***)this = &PTR__JsonUnitTestResultPrinter_001581a8; std::__cxx11::string::string((string *)(this + 8),param_1,&local_15); if (*(long *)(this + 0x10) == 0) { /* try { // try from 0012892c to 00128946 has its CatchHandler @ 00128980 */ GTestLog::GTestLog(local_14,3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc" ,0x11d1); /* try { // try from 00128947 to 0012895e has its CatchHandler @ 00128971 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8,"JSON output file may not be null",0x20); GTestLog::~GTestLog(local_14); } return; }
30,423
evmone::grow_memory(long, evmone::Memory&, unsigned long)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions.hpp
[[gnu::noinline]] inline int64_t grow_memory( int64_t gas_left, Memory& memory, uint64_t new_size) noexcept { // This implementation recomputes memory.size(). This value is already known to the caller // and can be passed as a parameter, but this make no difference to the performance. const auto new_words = num_words(new_size); const auto current_words = static_cast<int64_t>(memory.size() / word_size); const auto new_cost = 3 * new_words + new_words * new_words / 512; const auto current_cost = 3 * current_words + current_words * current_words / 512; const auto cost = new_cost - current_cost; gas_left -= cost; if (gas_left >= 0) [[likely]] memory.grow(static_cast<size_t>(new_words * word_size)); return gas_left; }
O3
cpp
evmone::grow_memory(long, evmone::Memory&, unsigned long): pushq %rbx movq %rdi, %rbx addq $0x1f, %rdx movq %rdx, %rax shrq $0x5, %rax movq 0x8(%rsi), %rcx shrq $0x5, %rcx movq %rcx, %rdi subq %rax, %rcx imulq %rax, %rax shrq $0x9, %rax imulq %rdi, %rdi shrq $0x9, %rdi leaq (%rcx,%rcx,2), %rcx subq %rax, %rbx addq %rdi, %rbx addq %rcx, %rbx js 0x41c7c andq $-0x20, %rdx movq %rsi, %rdi movq %rdx, %rsi callq 0x41c82 movq %rbx, %rax popq %rbx retq nop
_ZN6evmone11grow_memoryElRNS_6MemoryEm: push rbx mov rbx, rdi add rdx, 1Fh mov rax, rdx shr rax, 5 mov rcx, [rsi+8] shr rcx, 5 mov rdi, rcx sub rcx, rax imul rax, rax shr rax, 9 imul rdi, rdi shr rdi, 9 lea rcx, [rcx+rcx*2] sub rbx, rax add rbx, rdi add rbx, rcx js short loc_41C7C and rdx, 0FFFFFFFFFFFFFFE0h mov rdi, rsi; this mov rsi, rdx; unsigned __int64 call _ZN6evmone6Memory4growEm; evmone::Memory::grow(ulong) loc_41C7C: mov rax, rbx pop rbx retn
char * evmone::grow_memory(evmone *this, evmone::Memory *a2, evmone::Memory *a3) { unsigned long long v3; // rdx char *v4; // rbx v3 = (unsigned long long)a3 + 31; v4 = (char *)this + 3 * ((*((_QWORD *)a2 + 1) >> 5) - (v3 >> 5)) + (((*((_QWORD *)a2 + 1) >> 5) * (*((_QWORD *)a2 + 1) >> 5)) >> 9) - (((v3 >> 5) * (v3 >> 5)) >> 9); if ( (long long)v4 >= 0 ) evmone::Memory::grow(a2, v3 & 0xFFFFFFFFFFFFFFE0LL); return v4; }
grow_memory: PUSH RBX MOV RBX,RDI ADD RDX,0x1f MOV RAX,RDX SHR RAX,0x5 MOV RCX,qword ptr [RSI + 0x8] SHR RCX,0x5 MOV RDI,RCX SUB RCX,RAX IMUL RAX,RAX SHR RAX,0x9 IMUL RDI,RDI SHR RDI,0x9 LEA RCX,[RCX + RCX*0x2] SUB RBX,RAX ADD RBX,RDI ADD RBX,RCX JS 0x00141c7c AND RDX,-0x20 MOV RDI,RSI MOV RSI,RDX CALL 0x00141c82 LAB_00141c7c: MOV RAX,RBX POP RBX RET
/* evmone::grow_memory(long, evmone::Memory&, unsigned long) */ long evmone::grow_memory(long param_1,Memory *param_2,ulong param_3) { ulong uVar1; ulong uVar2; long lVar3; uVar1 = param_3 + 0x1f >> 5; uVar2 = *(ulong *)(param_2 + 8) >> 5; lVar3 = (param_1 - (uVar1 * uVar1 >> 9)) + (uVar2 * uVar2 >> 9) + (uVar2 - uVar1) * 3; if (-1 < lVar3) { Memory::grow(param_2,param_3 + 0x1f & 0xffffffffffffffe0); } return lVar3; }
30,424
Catch::ConsoleReporter::printOpenHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
void ConsoleReporter::printOpenHeader(std::string const& _name) { m_stream << lineOfChars('-') << '\n'; { auto guard = m_colour->guardColour( Colour::Headers ).engage( m_stream ); printHeaderString(_name); } }
O3
cpp
Catch::ConsoleReporter::printOpenHeader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0x20(%rdi), %r15 movl $0x4f, %r12d movq %r15, %rdi movl $0x2d, %esi callq 0x17630 decq %r12 jne 0x6a7d3 leaq 0x8(%rsp), %rsi movb $0xa, (%rsi) movl $0x1, %edx movq %r15, %rdi callq 0x17be0 movq 0x28(%r14), %rdx leaq 0x18(%rsp), %r15 movq %r15, %rdi movl $0x1, %esi callq 0x5bc9a movb $0x1, 0xc(%r15) movq (%r15), %rdi movl 0x8(%r15), %esi movq (%rdi), %rax callq *0x10(%rax) leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %r15 movq %r15, %rsi callq 0x5bca6 movq %r15, %rdi callq 0x5bce6 movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x6a87e leaq 0x8(%rsp), %rdi callq 0x5bce6 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi jmp 0x6a871 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x5bce6 movq %rbx, %rdi callq 0x17740
_ZN5Catch15ConsoleReporter15printOpenHeaderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 28h mov rbx, rsi mov r14, rdi mov r15, [rdi+20h] mov r12d, 4Fh ; 'O' loc_6A7D3: mov rdi, r15; this mov esi, 2Dh ; '-'; char call __ZNSo3putEc; std::ostream::put(char) dec r12 jnz short loc_6A7D3 lea rsi, [rsp+48h+var_40] mov byte ptr [rsi], 0Ah mov edx, 1 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 rdx, [r14+28h] lea r15, [rsp+48h+var_30] mov rdi, r15 mov esi, 1 call _ZN5Catch10ColourImpl11ColourGuardC2ENS_6Colour4CodeEPKS0_; Catch::ColourImpl::ColourGuard::ColourGuard(Catch::Colour::Code,Catch::ColourImpl const*) mov byte ptr [r15+0Ch], 1 mov rdi, [r15] mov esi, [r15+8] mov rax, [rdi] call qword ptr [rax+10h] lea rdi, [rsp+48h+var_40] lea r15, [rsp+48h+var_30] mov rsi, r15 call _ZN5Catch10ColourImpl11ColourGuardC2EOS1_; Catch::ColourImpl::ColourGuard::ColourGuard(Catch::ColourImpl::ColourGuard&&) mov rdi, r15; this call _ZN5Catch10ColourImpl11ColourGuardD2Ev; Catch::ColourImpl::ColourGuard::~ColourGuard() mov rdi, r14; int mov rsi, rbx; int xor edx, edx; int call _ZN5Catch15ConsoleReporter17printHeaderStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; Catch::ConsoleReporter::printHeaderString(std::string const&,ulong) lea rdi, [rsp+48h+var_40]; this call _ZN5Catch10ColourImpl11ColourGuardD2Ev; Catch::ColourImpl::ColourGuard::~ColourGuard() add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] jmp short loc_6A871 mov rbx, rax lea rdi, [rsp+arg_10]; this loc_6A871: call _ZN5Catch10ColourImpl11ColourGuardD2Ev; Catch::ColourImpl::ColourGuard::~ColourGuard() mov rdi, rbx call __Unwind_Resume
void Catch::ConsoleReporter::printOpenHeader(long long a1, int a2) { std::ostream *v2; // r15 long long v3; // r12 double v4; // xmm0_8 int v5; // ecx int v6; // r8d int v7; // r9d void *v8; // [rsp+0h] [rbp-48h] int v9; // [rsp+8h] [rbp-40h] BYREF long long v10; // [rsp+10h] [rbp-38h] long long v11; // [rsp+18h] [rbp-30h] BYREF unsigned int v12; // [rsp+20h] [rbp-28h] char v13; // [rsp+24h] [rbp-24h] v2 = *(std::ostream **)(a1 + 32); v3 = 79LL; do { std::ostream::put(v2, 45); --v3; } while ( v3 ); LOBYTE(v9) = 10; v4 = std::__ostream_insert<char,std::char_traits<char>>(v2, (const char *)&v9, 1LL); Catch::ColourImpl::ColourGuard::ColourGuard((long long)&v11, 1, *(_QWORD *)(a1 + 40)); v13 = 1; (*(void ( **)(long long, _QWORD, double))(*(_QWORD *)v11 + 16LL))(v11, v12, v4); Catch::ColourImpl::ColourGuard::ColourGuard((long long)&v9, (long long)&v11); Catch::ColourImpl::ColourGuard::~ColourGuard((Catch::ColourImpl::ColourGuard *)&v11); Catch::ConsoleReporter::printHeaderString(a1, a2, 0, v5, v6, v7, v8, v9, v10); Catch::ColourImpl::ColourGuard::~ColourGuard((Catch::ColourImpl::ColourGuard *)&v9); }
printOpenHeader: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x20] MOV R12D,0x4f LAB_0016a7d3: MOV RDI,R15 MOV ESI,0x2d CALL 0x00117630 DEC R12 JNZ 0x0016a7d3 LEA RSI,[RSP + 0x8] MOV byte ptr [RSI],0xa MOV EDX,0x1 MOV RDI,R15 CALL 0x00117be0 MOV RDX,qword ptr [R14 + 0x28] LEA R15,[RSP + 0x18] MOV RDI,R15 MOV ESI,0x1 CALL 0x0015bc9a MOV byte ptr [R15 + 0xc],0x1 MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RAX,qword ptr [RDI] LAB_0016a81f: CALL qword ptr [RAX + 0x10] LAB_0016a822: LEA RDI,[RSP + 0x8] LEA R15,[RSP + 0x18] MOV RSI,R15 CALL 0x0015bca6 MOV RDI,R15 CALL 0x0015bce6 LAB_0016a83c: MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL 0x0016a87e LAB_0016a849: LEA RDI,[RSP + 0x8] CALL 0x0015bce6 ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* Catch::ConsoleReporter::printOpenHeader(std::__cxx11::string const&) */ void __thiscall Catch::ConsoleReporter::printOpenHeader(ConsoleReporter *this,string *param_1) { ostream *poVar1; long lVar2; ColourGuard local_40 [16]; long *local_30; int4 local_28; int1 local_24; poVar1 = *(ostream **)(this + 0x20); lVar2 = 0x4f; do { std::ostream::put((char)poVar1); lVar2 = lVar2 + -1; } while (lVar2 != 0); local_40[0] = (ColourGuard)0xa; std::__ostream_insert<char,std::char_traits<char>>(poVar1,(char *)local_40,1); ColourImpl::ColourGuard::ColourGuard((ColourGuard *)&local_30,1,*(int8 *)(this + 0x28)); local_24 = 1; /* try { // try from 0016a81f to 0016a821 has its CatchHandler @ 0016a869 */ (**(code **)(*local_30 + 0x10))(local_30,local_28); ColourImpl::ColourGuard::ColourGuard(local_40,(ColourGuard *)&local_30); ColourImpl::ColourGuard::~ColourGuard((ColourGuard *)&local_30); /* try { // try from 0016a83c to 0016a848 has its CatchHandler @ 0016a85f */ printHeaderString(this,param_1,0); ColourImpl::ColourGuard::~ColourGuard(local_40); return; }
30,425
wt_thd_cond_timedwait
eloqsql/mysys/waiting_threads.c
int wt_thd_cond_timedwait(WT_THD *thd, mysql_mutex_t *mutex) { int ret= WT_TIMEOUT; struct timespec timeout; my_hrtime_t before, after, starttime; WT_RESOURCE *rc= thd->waiting_for; ulonglong end_wait_time; DBUG_ENTER("wt_thd_cond_timedwait"); DBUG_PRINT("wt", ("enter: thd=%s, rc=%p", thd->name, rc)); #ifndef DBUG_OFF if (rc->cond_mutex) DBUG_ASSERT(rc->cond_mutex == mutex); else rc->cond_mutex= mutex; mysql_mutex_assert_owner(mutex); #endif before= starttime= my_hrtime(); rc_wrlock(rc); if (rc->owners.elements == 0) ret= WT_OK; rc_unlock(rc); end_wait_time= starttime.val *1000 + (*thd->timeout_short)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (ret == WT_TIMEOUT && !thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); if (ret == WT_TIMEOUT && !thd->killed) { int r= deadlock(thd, thd, 0, *thd->deadlock_search_depth_long); if (r == WT_FREE_TO_GO) ret= WT_OK; else if (r != WT_OK) ret= WT_DEADLOCK; else if (*thd->timeout_long > *thd->timeout_short) { end_wait_time= starttime.val *1000 + (*thd->timeout_long)*1000000ULL; set_timespec_time_nsec(timeout, end_wait_time); if (!thd->killed) ret= mysql_cond_timedwait(&rc->cond, mutex, &timeout); } } after= my_hrtime(); if (stop_waiting(thd) == WT_DEADLOCK) /* if we're killed */ ret= WT_DEADLOCK; increment_wait_stats(after.val-before.val, ret); if (ret == WT_OK) increment_success_stats(); DBUG_RETURN(ret); }
O0
c
wt_thd_cond_timedwait: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x6e, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x48(%rbp) jmp 0xcb138 callq 0xbae70 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x48(%rbp), %rdi callq 0xcaec0 movq -0x48(%rbp), %rax cmpl $0x0, 0xe8(%rax) jne 0xcb16e movl $0x0, -0x14(%rbp) movq -0x48(%rbp), %rdi callq 0xcaef0 imulq $0x3e8, -0x40(%rbp), %rax # imm = 0x3E8 movq -0x8(%rbp), %rcx movq 0x38(%rcx), %rcx imulq $0xf4240, (%rcx), %rcx # imm = 0xF4240 addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x28(%rbp) movq -0x60(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x20(%rbp) cmpl $0x6e, -0x14(%rbp) jne 0xcb1f9 movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) jne 0xcb1f9 movq -0x48(%rbp), %rdi addq $0xa8, %rdi movq -0x10(%rbp), %rsi leaq -0x28(%rbp), %rdx leaq 0x5655a(%rip), %rcx # 0x121745 movl $0x42a, %r8d # imm = 0x42A callq 0xcb350 movl %eax, -0x14(%rbp) cmpl $0x6e, -0x14(%rbp) jne 0xcb2f0 movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) jne 0xcb2f0 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi movq -0x8(%rbp), %rax movq 0x50(%rax), %rax movq (%rax), %rax movl %eax, %ecx xorl %edx, %edx callq 0xcafa0 movl %eax, -0x64(%rbp) cmpl $-0x3, -0x64(%rbp) jne 0xcb242 movl $0x0, -0x14(%rbp) jmp 0xcb2ee cmpl $0x0, -0x64(%rbp) je 0xcb254 movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF jmp 0xcb2ec movq -0x8(%rbp), %rax movq 0x48(%rax), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx movq 0x38(%rcx), %rcx cmpq (%rcx), %rax jbe 0xcb2ea imulq $0x3e8, -0x40(%rbp), %rax # imm = 0x3E8 movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx imulq $0xf4240, (%rcx), %rcx # imm = 0xF4240 addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x28(%rbp) movq -0x70(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x20(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x60(%rax) jne 0xcb2e8 movq -0x48(%rbp), %rdi addq $0xa8, %rdi movq -0x10(%rbp), %rsi leaq -0x28(%rbp), %rdx leaq 0x5646b(%rip), %rcx # 0x121745 movl $0x437, %r8d # imm = 0x437 callq 0xcb350 movl %eax, -0x14(%rbp) jmp 0xcb2ea jmp 0xcb2ec jmp 0xcb2ee jmp 0xcb2f0 callq 0xbae70 movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rdi callq 0xcb0c0 cmpl $-0x1, %eax jne 0xcb316 movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF movq -0x38(%rbp), %rdi subq -0x30(%rbp), %rdi movl -0x14(%rbp), %esi callq 0xcb3d0 cmpl $0x0, -0x14(%rbp) jne 0xcb331 callq 0xcbb80 jmp 0xcb333 movl -0x14(%rbp), %eax movl %eax, -0x7c(%rbp) movl -0x7c(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
wt_thd_cond_timedwait: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 6Eh ; 'n' mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_48], rax jmp short $+2 loc_CB138: call my_hrtime mov [rbp+var_58], rax mov rax, [rbp+var_58] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_30], rax mov rdi, [rbp+var_48] call rc_wrlock mov rax, [rbp+var_48] cmp dword ptr [rax+0E8h], 0 jnz short loc_CB16E mov [rbp+var_14], 0 loc_CB16E: mov rdi, [rbp+var_48] call rc_unlock imul rax, [rbp+var_40], 3E8h mov rcx, [rbp+var_8] mov rcx, [rcx+38h] imul rcx, [rcx], 0F4240h add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_28], rax mov rax, [rbp+var_60] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_20], rdx cmp [rbp+var_14], 6Eh ; 'n' jnz short loc_CB1F9 mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jnz short loc_CB1F9 mov rdi, [rbp+var_48] add rdi, 0A8h mov rsi, [rbp+var_10] lea rdx, [rbp+var_28] lea rcx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 42Ah call inline_mysql_cond_timedwait_3 mov [rbp+var_14], eax loc_CB1F9: cmp [rbp+var_14], 6Eh ; 'n' jnz loc_CB2F0 mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jnz loc_CB2F0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] mov rax, [rbp+var_8] mov rax, [rax+50h] mov rax, [rax] mov ecx, eax xor edx, edx call deadlock mov [rbp+var_64], eax cmp [rbp+var_64], 0FFFFFFFDh jnz short loc_CB242 mov [rbp+var_14], 0 jmp loc_CB2EE loc_CB242: cmp [rbp+var_64], 0 jz short loc_CB254 mov [rbp+var_14], 0FFFFFFFFh jmp loc_CB2EC loc_CB254: mov rax, [rbp+var_8] mov rax, [rax+48h] mov rax, [rax] mov rcx, [rbp+var_8] mov rcx, [rcx+38h] cmp rax, [rcx] jbe short loc_CB2EA imul rax, [rbp+var_40], 3E8h mov rcx, [rbp+var_8] mov rcx, [rcx+48h] imul rcx, [rcx], 0F4240h add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_70], rax mov rax, [rbp+var_70] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_28], rax mov rax, [rbp+var_70] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_20], rdx mov rax, [rbp+var_8] cmp byte ptr [rax+60h], 0 jnz short loc_CB2E8 mov rdi, [rbp+var_48] add rdi, 0A8h mov rsi, [rbp+var_10] lea rdx, [rbp+var_28] lea rcx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 437h call inline_mysql_cond_timedwait_3 mov [rbp+var_14], eax loc_CB2E8: jmp short $+2 loc_CB2EA: jmp short $+2 loc_CB2EC: jmp short $+2 loc_CB2EE: jmp short $+2 loc_CB2F0: call my_hrtime mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_38], rax mov rdi, [rbp+var_8] call stop_waiting cmp eax, 0FFFFFFFFh jnz short loc_CB316 mov [rbp+var_14], 0FFFFFFFFh loc_CB316: mov rdi, [rbp+var_38] sub rdi, [rbp+var_30] mov esi, [rbp+var_14] call increment_wait_stats cmp [rbp+var_14], 0 jnz short loc_CB331 call increment_success_stats loc_CB331: jmp short $+2 loc_CB333: mov eax, [rbp+var_14] mov [rbp+var_7C], eax mov eax, [rbp+var_7C] add rsp, 80h pop rbp retn
long long wt_thd_cond_timedwait(long long a1, long long a2) { unsigned long long v3; // [rsp+10h] [rbp-70h] int v4; // [rsp+1Ch] [rbp-64h] unsigned long long v5; // [rsp+20h] [rbp-60h] long long v6; // [rsp+38h] [rbp-48h] unsigned long long v7; // [rsp+40h] [rbp-40h] unsigned long long v8; // [rsp+48h] [rbp-38h] unsigned long long v9; // [rsp+58h] [rbp-28h] BYREF unsigned long long v10; // [rsp+60h] [rbp-20h] unsigned int v11; // [rsp+6Ch] [rbp-14h] long long v12; // [rsp+70h] [rbp-10h] long long v13; // [rsp+78h] [rbp-8h] v13 = a1; v12 = a2; v11 = 110; v6 = *(_QWORD *)(a1 + 40); v7 = my_hrtime(); rc_wrlock(v6); if ( !*(_DWORD *)(v6 + 232) ) v11 = 0; rc_unlock(v6); v5 = 1000000LL * **(_QWORD **)(v13 + 56) + 1000 * v7; v9 = v5 / 0x3B9ACA00; v10 = v5 % 0x3B9ACA00; if ( v11 == 110 && !*(_BYTE *)(v13 + 96) ) v11 = inline_mysql_cond_timedwait_3( v6 + 168, v12, &v9, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 1066LL); if ( v11 == 110 && !*(_BYTE *)(v13 + 96) ) { v4 = deadlock(v13, v13, 0, **(_QWORD **)(v13 + 80)); if ( v4 == -3 ) { v11 = 0; } else if ( v4 ) { v11 = -1; } else if ( **(_QWORD **)(v13 + 72) > **(_QWORD **)(v13 + 56) ) { v3 = 1000000LL * **(_QWORD **)(v13 + 72) + 1000 * v7; v9 = v3 / 0x3B9ACA00; v10 = v3 % 0x3B9ACA00; if ( !*(_BYTE *)(v13 + 96) ) v11 = inline_mysql_cond_timedwait_3( v6 + 168, v12, &v9, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 1079LL); } } v8 = my_hrtime(); if ( (unsigned int)stop_waiting(v13) == -1 ) v11 = -1; increment_wait_stats(v8 - v7, v11); if ( !v11 ) increment_success_stats(); return v11; }
wt_thd_cond_timedwait: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x6e MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x48],RAX JMP 0x001cb138 LAB_001cb138: CALL 0x001bae70 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x48] CALL 0x001caec0 MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0xe8],0x0 JNZ 0x001cb16e MOV dword ptr [RBP + -0x14],0x0 LAB_001cb16e: MOV RDI,qword ptr [RBP + -0x48] CALL 0x001caef0 IMUL RAX,qword ptr [RBP + -0x40],0x3e8 MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x38] IMUL RCX,qword ptr [RCX],0xf4240 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x20],RDX CMP dword ptr [RBP + -0x14],0x6e JNZ 0x001cb1f9 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JNZ 0x001cb1f9 MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0xa8 MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x28] LEA RCX,[0x221745] MOV R8D,0x42a CALL 0x001cb350 MOV dword ptr [RBP + -0x14],EAX LAB_001cb1f9: CMP dword ptr [RBP + -0x14],0x6e JNZ 0x001cb2f0 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JNZ 0x001cb2f0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RAX] MOV ECX,EAX XOR EDX,EDX CALL 0x001cafa0 MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x64],-0x3 JNZ 0x001cb242 MOV dword ptr [RBP + -0x14],0x0 JMP 0x001cb2ee LAB_001cb242: CMP dword ptr [RBP + -0x64],0x0 JZ 0x001cb254 MOV dword ptr [RBP + -0x14],0xffffffff JMP 0x001cb2ec LAB_001cb254: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x38] CMP RAX,qword ptr [RCX] JBE 0x001cb2ea IMUL RAX,qword ptr [RBP + -0x40],0x3e8 MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] IMUL RCX,qword ptr [RCX],0xf4240 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x60],0x0 JNZ 0x001cb2e8 MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0xa8 MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x28] LEA RCX,[0x221745] MOV R8D,0x437 CALL 0x001cb350 MOV dword ptr [RBP + -0x14],EAX LAB_001cb2e8: JMP 0x001cb2ea LAB_001cb2ea: JMP 0x001cb2ec LAB_001cb2ec: JMP 0x001cb2ee LAB_001cb2ee: JMP 0x001cb2f0 LAB_001cb2f0: CALL 0x001bae70 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001cb0c0 CMP EAX,-0x1 JNZ 0x001cb316 MOV dword ptr [RBP + -0x14],0xffffffff LAB_001cb316: MOV RDI,qword ptr [RBP + -0x38] SUB RDI,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x14] CALL 0x001cb3d0 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001cb331 CALL 0x001cbb80 LAB_001cb331: JMP 0x001cb333 LAB_001cb333: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x7c],EAX MOV EAX,dword ptr [RBP + -0x7c] ADD RSP,0x80 POP RBP RET
int wt_thd_cond_timedwait(long param_1,int8 param_2) { int iVar1; long lVar2; long lVar3; ulong local_30; ulong local_28; int local_1c; int8 local_18; long local_10; local_1c = 0x6e; lVar3 = *(long *)(param_1 + 0x28); local_18 = param_2; local_10 = param_1; lVar2 = my_hrtime(); rc_wrlock(lVar3); if (*(int *)(lVar3 + 0xe8) == 0) { local_1c = 0; } rc_unlock(lVar3); local_28 = lVar2 * 1000 + **(long **)(local_10 + 0x38) * 1000000; local_30 = local_28 / 1000000000; local_28 = local_28 % 1000000000; if ((local_1c == 0x6e) && (*(char *)(local_10 + 0x60) == '\0')) { local_1c = inline_mysql_cond_timedwait (lVar3 + 0xa8,local_18,&local_30, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c",0x42a); } if ((local_1c == 0x6e) && (*(char *)(local_10 + 0x60) == '\0')) { iVar1 = deadlock(local_10,local_10,0,**(ulong **)(local_10 + 0x50) & 0xffffffff); if (iVar1 == -3) { local_1c = 0; } else if (iVar1 == 0) { if (**(ulong **)(local_10 + 0x38) < **(ulong **)(local_10 + 0x48)) { local_28 = lVar2 * 1000 + **(long **)(local_10 + 0x48) * 1000000; local_30 = local_28 / 1000000000; local_28 = local_28 % 1000000000; if (*(char *)(local_10 + 0x60) == '\0') { local_1c = inline_mysql_cond_timedwait (lVar3 + 0xa8,local_18,&local_30, "/workspace/llm4binary/github2025/eloqsql/mysys/waiting_threads.c", 0x437); } } } else { local_1c = -1; } } lVar3 = my_hrtime(); iVar1 = stop_waiting(local_10); if (iVar1 == -1) { local_1c = -1; } increment_wait_stats(lVar3 - lVar2,local_1c); if (local_1c == 0) { increment_success_stats(); } return local_1c; }
30,426
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
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> 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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x590b4 movq %rbx, %rdi movl $0x1, %esi callq 0x590b4 movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x58a56 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x589aa leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x58ab4 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x595e6 movq -0x18(%r14), %rax testq %rax, %rax je 0xa55cd leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xa55e4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xa5628 jmp 0xa5628 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x59086 jmp 0xa560f movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0xa5633 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa5633 movq %rax, %rdi callq 0x21535 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x590b4 movq %rbx, %rdi callq 0x5e5a2 movq %r14, %rdi callq 0x1bf90 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 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, rbx 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 r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; 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> &)>::function(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> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,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) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_A55CD lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_A55CD: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A55E4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_A55E4: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_A5628 jmp short loc_A5628 mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_A560F mov r14, rax loc_A560F: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A5633 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_A5633 loc_A5628: mov rdi, rax call __clang_call_terminate mov r14, rax loc_A5633: mov rdi, rbx 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, 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>::parse<std::string>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); 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); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( &v11, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x001590b4 MOV RDI,RBX MOV ESI,0x1 CALL 0x001590b4 MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001a556d: MOV RDI,RSP MOV RSI,R13 CALL 0x00158a56 ADD R12,R15 LAB_001a557b: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x001589aa LAB_001a5596: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00158ab4 LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x001595e6 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001a55cd LAB_001a55be: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a55cd: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001a55e4 LAB_001a55d7: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a55e4: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 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>::parse<std::__cxx11::string >(std::__cxx11::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::__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>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string> (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,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *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; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001a556d to 001a5577 has its CatchHandler @ 001a5630 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 001a557b to 001a5595 has its CatchHandler @ 001a560c */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001a5596 to 001a55a7 has its CatchHandler @ 001a55fd */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001a55be to 001a55cc has its CatchHandler @ 001a55fb */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 001a55d7 to 001a55e3 has its CatchHandler @ 001a55f9 */ (*local_108)(afStack_118,afStack_118,3); } return this; }
30,427
Refpos_container_sorted_array::alloc()
eloqsql/sql/rowid_filter.h
bool alloc() { array= new Dynamic_array<char> (PSI_INSTRUMENT_MEM, elem_size * max_elements, elem_size * max_elements/sizeof(char) + 1); return array == NULL; }
O3
c
Refpos_container_sorted_array::alloc(): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movl $0x28, %edi callq 0x4002f0 movq %rax, %rbx movl (%r14), %r8d imull 0x4(%r14), %r8d leal 0x1(%r8), %r9d movq $0x0, (%rsp) xorl %edi, %edi movq %rax, %rsi movl $0x1, %edx xorl %ecx, %ecx callq 0x88e888 movq %rbx, 0x8(%r14) xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 movl $0x28, %esi movq %rbx, %rdi callq 0x400200 movq %r14, %rdi callq 0x400f10 nop
_ZN29Refpos_container_sorted_array5allocEv: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov r14, rdi mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov r8d, [r14] imul r8d, [r14+4] lea r9d, [r8+1] mov [rsp+20h+var_20], 0 xor edi, edi mov rsi, rax mov edx, 1 xor ecx, ecx call init_dynamic_array2 mov [r14+8], rbx xor eax, eax add rsp, 10h pop rbx pop r14 pop rbp retn mov r14, rax mov esi, 28h ; '('; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
long long Refpos_container_sorted_array::alloc(Refpos_container_sorted_array *this) { long long v1; // rbx v1 = operator new(0x28uLL); init_dynamic_array2( 0, v1, 1, 0, *((_DWORD *)this + 1) * *(_DWORD *)this, *((_DWORD *)this + 1) * *(_DWORD *)this + 1, 0LL); *((_QWORD *)this + 1) = v1; return 0LL; }
cond_is_datetime_is_null: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0xc8] CMP EAX,0x1 JNZ 0x00648d0e MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x630] CMP EAX,0xa JNZ 0x00648d0e MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00658450 LAB_00648d0e: XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
/* cond_is_datetime_is_null(Item*) */ int8 cond_is_datetime_is_null(Item *param_1) { int iVar1; int8 uVar2; iVar1 = (**(code **)(*(long *)param_1 + 200))(); if (iVar1 == 1) { iVar1 = (**(code **)(*(long *)param_1 + 0x630))(param_1); if (iVar1 == 10) { uVar2 = Item_func_isnull::arg_is_datetime_notnull_field((Item_func_isnull *)param_1); return uVar2; } } return 0; }
30,428
GetClipboardImage
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
Image GetClipboardImage(void) { Image image = {0}; unsigned long long int dataSize = 0; void* fileData = NULL; #ifdef _WIN32 int width, height; fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize); #else TRACELOG(LOG_WARNING, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS"); #endif if (fileData == NULL) { TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data."); } else { image = LoadImageFromMemory(".bmp", fileData, (int)dataSize); } return image; }
O1
c
GetClipboardImage: pushq %rbx movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) leaq 0x71d2c(%rip), %rsi # 0xe5a58 movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 leaq 0x71d72(%rip), %rsi # 0xe5ab1 movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 movq %rbx, %rax popq %rbx retq
GetClipboardImage: push rbx mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 lea rsi, aClipboardImage; "Clipboard image: PLATFORM_DESKTOP_GLFW "... mov edi, 4 xor eax, eax call TraceLog lea rsi, aClipboardImage_0; "Clipboard image: Couldn't get clipboard"... mov edi, 4 xor eax, eax call TraceLog mov rax, rbx pop rbx retn
long long GetClipboardImage(long long a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; TraceLog( 4, (unsigned int)"Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS", a3, a4, a5, a6); TraceLog(4, (unsigned int)"Clipboard image: Couldn't get clipboard data.", v6, v7, v8, v9); return a1; }
GetClipboardImage: PUSH RBX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LEA RSI,[0x1e5a58] MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 LEA RSI,[0x1e5ab1] MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 MOV RAX,RBX POP RBX RET
int8 * GetClipboardImage(int8 *param_1) { *param_1 = 0; param_1[1] = 0; param_1[2] = 0; TraceLog(4, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn\'t implement `GetClipboardImage` for this OS" ); TraceLog(4,"Clipboard image: Couldn\'t get clipboard data."); return param_1; }
30,429
GetClipboardImage
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
Image GetClipboardImage(void) { Image image = {0}; unsigned long long int dataSize = 0; void* fileData = NULL; #ifdef _WIN32 int width, height; fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize); #else TRACELOG(LOG_WARNING, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS"); #endif if (fileData == NULL) { TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data."); } else { image = LoadImageFromMemory(".bmp", fileData, (int)dataSize); } return image; }
O2
c
GetClipboardImage: pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x66d01(%rip), %rsi # 0xc5c58 pushq $0x4 popq %rbp movl %ebp, %edi xorl %eax, %eax callq 0xa128b leaq 0x66d47(%rip), %rsi # 0xc5cb1 movl %ebp, %edi xorl %eax, %eax callq 0xa128b movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
GetClipboardImage: push rbp push rbx push rax mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea rsi, aClipboardImage; "Clipboard image: PLATFORM_DESKTOP_GLFW "... push 4 pop rbp mov edi, ebp xor eax, eax call TraceLog lea rsi, aClipboardImage_0; "Clipboard image: Couldn't get clipboard"... mov edi, ebp xor eax, eax call TraceLog mov rax, rbx add rsp, 8 pop rbx pop rbp retn
long long GetClipboardImage(long long a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; TraceLog( 4, (unsigned int)"Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS", a3, a4, a5, a6); TraceLog(4, (unsigned int)"Clipboard image: Couldn't get clipboard data.", v6, v7, v8, v9); return a1; }
GetClipboardImage: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LEA RSI,[0x1c5c58] PUSH 0x4 POP RBP MOV EDI,EBP XOR EAX,EAX CALL 0x001a128b LEA RSI,[0x1c5cb1] MOV EDI,EBP XOR EAX,EAX CALL 0x001a128b MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET
int8 * GetClipboardImage(int8 *param_1) { *param_1 = 0; param_1[1] = 0; param_1[2] = 0; TraceLog(4, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn\'t implement `GetClipboardImage` for this OS" ); TraceLog(4,"Clipboard image: Couldn\'t get clipboard data."); return param_1; }
30,430
GetClipboardImage
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
Image GetClipboardImage(void) { Image image = {0}; unsigned long long int dataSize = 0; void* fileData = NULL; #ifdef _WIN32 int width, height; fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize); #else TRACELOG(LOG_WARNING, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS"); #endif if (fileData == NULL) { TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data."); } else { image = LoadImageFromMemory(".bmp", fileData, (int)dataSize); } return image; }
O3
c
GetClipboardImage: pushq %rbx movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) leaq 0x6f596(%rip), %rsi # 0xdfad0 movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 leaq 0x6f5dc(%rip), %rsi # 0xdfb29 movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 movq %rbx, %rax popq %rbx retq
GetClipboardImage: push rbx mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 lea rsi, aClipboardImage; "Clipboard image: PLATFORM_DESKTOP_GLFW "... mov edi, 4 xor eax, eax call TraceLog lea rsi, aClipboardImage_0; "Clipboard image: Couldn't get clipboard"... mov edi, 4 xor eax, eax call TraceLog mov rax, rbx pop rbx retn
long long GetClipboardImage(long long a1, long long a2, int a3, int a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; TraceLog( 4, (unsigned int)"Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS", a3, a4, a5, a6); TraceLog(4, (unsigned int)"Clipboard image: Couldn't get clipboard data.", v6, v7, v8, v9); return a1; }
GetClipboardImage: PUSH RBX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LEA RSI,[0x1dfad0] MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 LEA RSI,[0x1dfb29] MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 MOV RAX,RBX POP RBX RET
int8 * GetClipboardImage(int8 *param_1) { *param_1 = 0; param_1[1] = 0; param_1[2] = 0; TraceLog(4, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn\'t implement `GetClipboardImage` for this OS" ); TraceLog(4,"Clipboard image: Couldn\'t get clipboard data."); return param_1; }
30,431
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; }
O2
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, %r15 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r13 movq %rsi, %rdi movq %rdx, %rsi xorl %edx, %edx callq 0x20d50 movq %rax, %r14 movq %r13, %rdi callq 0x80234 leaq 0xf799(%rip), %rsi # 0x8d4fc movq %r13, 0x8(%rsp) movq %r13, %rdi callq 0x20ce0 cmpq $-0x1, %r14 je 0x7df65 movq 0x8(%r12), %r12 leaq 0x50(%rsp), %rdi movq %rbx, %rsi xorl %edx, %edx movq %r14, %rcx callq 0x20710 subq %r15, %r14 addq %r12, %r14 movq 0x8(%rsp), %rax leaq 0x20(%rax), %rdi leaq 0x50(%rsp), %r15 movq %r15, %rsi callq 0x20820 movq %r15, %rdi callq 0x20d88 leaq 0x50(%rsp), %rdi pushq $-0x1 popq %rcx movq %rbx, %rsi movq %r14, %rdx callq 0x20710 xorps %xmm0, %xmm0 leaq 0xb0(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rsi pushq $0x1 popq %rcx xorl %r8d, %r8d callq 0x5ee1a leaq 0xb0(%rsp), %rdi callq 0x633c0 leaq 0x50(%rsp), %r15 movq %r15, %rdi callq 0x20d88 leaq 0x20(%rsp), %r12 leaq 0x10(%rsp), %rbx movq %r12, %rdi movq %rbx, %rsi callq 0x49c02 leaq 0xd8(%rsp), %rdi movq %rbx, %rsi callq 0x49e6e movq 0x8(%rsp), %rax leaq 0x40(%rax), %rbx leaq 0x40(%rsp), %rbp movq %r12, %rdi leaq 0xd8(%rsp), %rsi callq 0x496a6 testb %al, %al je 0x7df54 movq %r12, %rdi callq 0x498a0 movq %rax, %r13 movq %rax, %rdi leaq 0x12591(%rip), %rsi # 0x903fa callq 0x5f454 movq %rax, %r14 movq %r13, %rdi leaq 0x12b32(%rip), %rsi # 0x909ad callq 0x5f454 movq %r15, %rdi movq %rax, %rsi callq 0x3dfb0 cmpb $0x3, (%r14) jne 0x7dea0 leaq 0x70(%rsp), %rdi movq %r14, %rsi callq 0x3dfb0 jmp 0x7deb9 leaq 0x70(%rsp), %rdi movq %r14, %rsi pushq $-0x1 popq %rdx pushq $0x20 popq %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x2d1ce movq %r13, %rdi leaq 0xfaa6(%rip), %rsi # 0x8d969 callq 0x5f432 testb %al, %al je 0x7dee8 movq %r13, %rdi leaq 0xfa93(%rip), %rsi # 0x8d969 callq 0x5f454 movq %rbp, %rdi movq %rax, %rsi callq 0x2c1ce jmp 0x7def7 movq %rbp, %rdi leaq 0xee03(%rip), %rsi # 0x8ccf5 callq 0x6cba4 leaq 0x90(%rsp), %rdi movq %rbp, %rsi callq 0x3dfb0 movq %rbx, %rdi movq %r15, %rsi callq 0x802da movq %r15, %rdi callq 0x6f54a movq %rbp, %rdi callq 0x466b8 movq 0x20(%rsp), %rax movzbl (%rax), %eax cmpl $0x2, %eax je 0x7df3f cmpl $0x1, %eax jne 0x7df4a addq $0x30, 0x28(%rsp) jmp 0x7de3c addq $0x10, 0x30(%rsp) jmp 0x7de3c incq 0x38(%rsp) jmp 0x7de3c leaq 0x10(%rsp), %rdi callq 0x466b8 movq 0x8(%rsp), %r14 jmp 0x7df76 movq 0x8(%rsp), %r14 leaq 0x20(%r14), %rdi movq %rbx, %rsi callq 0x203d0 movq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7dfad movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x633c0 leaq 0x50(%rsp), %rdi callq 0x20d88 jmp 0x7e005 jmp 0x7dfad jmp 0x7dfad movq %rax, %rbx jmp 0x7e005 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x6f54a xorl %ebp, %ebp jmp 0x7dfc9 movq %rax, %rbx movb $0x1, %bpl leaq 0x40(%rsp), %rdi callq 0x466b8 testb %bpl, %bpl jne 0x7dfe2 jmp 0x7dffb movq %rax, %rbx jmp 0x7dfec movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x20d88 leaq 0x50(%rsp), %rdi callq 0x20d88 jmp 0x7dffb movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x466b8 movq 0x8(%rsp), %rdi callq 0x2c39e movq %rbx, %rdi callq 0x20ba0
_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 r15, rcx mov r12, rdx mov rbx, rsi mov r13, rdi mov rdi, rsi mov rsi, rdx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_m; std::string::find(std::string const&,ulong) mov r14, rax mov rdi, r13; this call _ZN15common_chat_msgC2Ev; common_chat_msg::common_chat_msg(void) lea rsi, aYouAreAHelpful+12h; "assistant" mov [rsp+128h+var_120], r13 mov rdi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) cmp r14, 0FFFFFFFFFFFFFFFFh jz loc_7DF65 mov r12, [r12+8] lea rdi, [rsp+128h+var_D8] mov rsi, rbx xor edx, edx mov rcx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) sub r14, r15 add r14, r12 mov rax, [rsp+128h+var_120] lea rdi, [rax+20h] lea r15, [rsp+128h+var_D8] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_D8] push 0FFFFFFFFFFFFFFFFh pop rcx mov rsi, rbx mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_78] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rdi, [rsp+128h+var_118] lea rsi, [rsp+128h+var_D8] push 1 pop rcx 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) lea rdi, [rsp+128h+var_78]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea r15, [rsp+128h+var_D8] mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea r12, [rsp+128h+var_108] lea rbx, [rsp+128h+var_118] mov rdi, r12 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) lea rdi, [rsp+128h+var_50] mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void) mov rax, [rsp+128h+var_120] lea rbx, [rax+40h] lea rbp, [rsp+128h+var_E8] loc_7DE3C: mov rdi, r12 lea rsi, [rsp+128h+var_50] call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ test al, al jz loc_7DF54 mov rdi, r12 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 r13, 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 r14, rax mov rdi, r13 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, r15 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 [r14], 3 jnz short loc_7DEA0 lea rdi, [rsp+128h+var_B8] mov rsi, r14 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_7DEB9 loc_7DEA0: lea rdi, [rsp+128h+var_B8] mov rsi, r14 push 0FFFFFFFFFFFFFFFFh pop rdx push 20h ; ' ' pop rcx 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_7DEB9: mov rdi, r13 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_7DEE8 mov rdi, r13 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, rbp 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_7DEF7 loc_7DEE8: mov rdi, rbp lea rsi, aEndIndexOutOfB+19h; "" 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_7DEF7: lea rdi, [rsp+128h+var_98] 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 mov rdi, rbx mov rsi, r15 call _ZNSt6vectorI16common_tool_callSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_tool_call>::emplace_back<common_tool_call>(common_tool_call &&) mov rdi, r15; this call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call() mov rdi, rbp 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_108] movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_7DF3F cmp eax, 1 jnz short loc_7DF4A add [rsp+128h+var_100], 30h ; '0' jmp loc_7DE3C loc_7DF3F: add [rsp+128h+var_F8], 10h jmp loc_7DE3C loc_7DF4A: inc [rsp+128h+var_F0] jmp loc_7DE3C loc_7DF54: 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() mov r14, [rsp+128h+var_120] jmp short loc_7DF76 loc_7DF65: mov r14, [rsp+128h+var_120] lea rdi, [r14+20h] mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_7DF76: mov rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_7DFAD mov rbx, rax lea rdi, [rsp+arg_A8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7E005 jmp short loc_7DFAD jmp short $+2 loc_7DFAD: mov rbx, rax jmp short loc_7E005 mov rbx, rax lea rdi, [rsp+arg_48]; this call _ZN16common_tool_callD2Ev; common_tool_call::~common_tool_call() xor ebp, ebp jmp short loc_7DFC9 mov rbx, rax mov bpl, 1 loc_7DFC9: lea rdi, [rsp+arg_38] 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() test bpl, bpl jnz short loc_7DFE2 jmp short loc_7DFFB mov rbx, rax jmp short loc_7DFEC mov rbx, rax loc_7DFE2: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_7DFEC: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7DFFB mov rbx, rax loc_7DFFB: lea rdi, [rsp+arg_8] 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_7E005: mov rdi, [rsp+arg_0]; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() mov rdi, rbx call __Unwind_Resume
common_chat_msg * parse_prefixed_json_tool_call_array( common_chat_msg *this, long long a2, long long a3, long long a4) { long long v6; // r14 long long v7; // r12 long long v8; // r13 _BYTE *v9; // r14 long long v10; // rax long long v11; // rax int v12; // eax common_chat_msg *v13; // r14 void *v15[2]; // [rsp+10h] [rbp-118h] BYREF unsigned __int8 *v16; // [rsp+20h] [rbp-108h] BYREF long long v17; // [rsp+28h] [rbp-100h] long long v18; // [rsp+30h] [rbp-F8h] long long v19; // [rsp+38h] [rbp-F0h] void *v20[2]; // [rsp+40h] [rbp-E8h] BYREF long long v21[4]; // [rsp+50h] [rbp-D8h] BYREF _BYTE v22[32]; // [rsp+70h] [rbp-B8h] BYREF _BYTE v23[32]; // [rsp+90h] [rbp-98h] BYREF _BYTE v24[40]; // [rsp+B0h] [rbp-78h] BYREF _BYTE v25[80]; // [rsp+D8h] [rbp-50h] BYREF v6 = std::string::find(a2, a3, 0LL); common_chat_msg::common_chat_msg(this); std::string::assign(this, "assistant"); if ( v6 == -1 ) { v13 = this; std::string::_M_assign((char *)this + 32, a2); } else { v7 = *(_QWORD *)(a3 + 8); std::string::substr(v21, a2, 0LL, v6); std::string::operator=((char *)this + 32, v21); std::string::~string(v21); std::string::substr(v21, a2, v7 + v6 - a4, -1LL); memset(v24, 0, 32); 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>( (char *)v15, v21, (long long)v24, 1u, 0); std::_Function_base::~_Function_base((std::_Function_base *)v24); std::string::~string(v21); 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)&v16, (long long)v15); 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>::cend( (long long)v25, (long long)v15); while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)&v16) ) { v8 = 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*(&v16); v9 = (_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>( v8, (long long)"arguments"); 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>::operator[]<char const>( v8, (long long)"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)v21, v10); if ( *v9 == 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)v9); 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)v9, -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_(v8) ) { 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>( v8, (long long)"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( (long long)v20, v11); } 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 *)v20); } 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)v23, (long long)v20); std::vector<common_tool_call>::emplace_back<common_tool_call>((char *)this + 64, v21); common_tool_call::~common_tool_call((common_tool_call *)v21); 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(v20); v12 = *v16; if ( v12 == 2 ) { v18 += 16LL; } else if ( v12 == 1 ) { v17 += 48LL; } else { ++v19; } } 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 this; } return v13; }
parse_prefixed_json_tool_call_array: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R12,RDX MOV RBX,RSI MOV R13,RDI MOV RDI,RSI MOV RSI,RDX XOR EDX,EDX CALL 0x00120d50 MOV R14,RAX MOV RDI,R13 CALL 0x00180234 LAB_0017dd5c: LEA RSI,[0x18d4fc] MOV qword ptr [RSP + 0x8],R13 MOV RDI,R13 CALL 0x00120ce0 CMP R14,-0x1 JZ 0x0017df65 MOV R12,qword ptr [R12 + 0x8] LAB_0017dd7f: LEA RDI,[RSP + 0x50] MOV RSI,RBX XOR EDX,EDX MOV RCX,R14 CALL 0x00120710 SUB R14,R15 ADD R14,R12 MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RAX + 0x20] LEA R15,[RSP + 0x50] MOV RSI,R15 CALL 0x00120820 MOV RDI,R15 CALL 0x00120d88 LAB_0017ddb5: LEA RDI,[RSP + 0x50] PUSH -0x1 POP RCX MOV RSI,RBX MOV RDX,R14 CALL 0x00120710 XORPS XMM0,XMM0 LEA RDX,[RSP + 0xb0] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_0017ddda: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x50] PUSH 0x1 POP RCX XOR R8D,R8D CALL 0x0015ee1a LEA RDI,[RSP + 0xb0] CALL 0x001633c0 LEA R15,[RSP + 0x50] MOV RDI,R15 CALL 0x00120d88 LEA R12,[RSP + 0x20] LEA RBX,[RSP + 0x10] MOV RDI,R12 MOV RSI,RBX CALL 0x00149c02 LEA RDI,[RSP + 0xd8] MOV RSI,RBX CALL 0x00149e6e MOV RAX,qword ptr [RSP + 0x8] LEA RBX,[RAX + 0x40] LEA RBP,[RSP + 0x40] LAB_0017de3c: MOV RDI,R12 LEA RSI,[RSP + 0xd8] CALL 0x001496a6 TEST AL,AL JZ 0x0017df54 MOV RDI,R12 CALL 0x001498a0 MOV R13,RAX MOV RDI,RAX LEA RSI,[0x1903fa] CALL 0x0015f454 MOV R14,RAX MOV RDI,R13 LEA RSI,[0x1909ad] CALL 0x0015f454 MOV RDI,R15 MOV RSI,RAX CALL 0x0013dfb0 CMP byte ptr [R14],0x3 JNZ 0x0017dea0 LAB_0017de91: LEA RDI,[RSP + 0x70] MOV RSI,R14 CALL 0x0013dfb0 JMP 0x0017deb9 LAB_0017dea0: LEA RDI,[RSP + 0x70] MOV RSI,R14 PUSH -0x1 POP RDX PUSH 0x20 POP RCX XOR R8D,R8D XOR R9D,R9D CALL 0x0012d1ce LAB_0017deb9: MOV RDI,R13 LEA RSI,[0x18d969] CALL 0x0015f432 TEST AL,AL JZ 0x0017dee8 MOV RDI,R13 LEA RSI,[0x18d969] CALL 0x0015f454 MOV RDI,RBP MOV RSI,RAX CALL 0x0012c1ce JMP 0x0017def7 LAB_0017dee8: MOV RDI,RBP LEA RSI,[0x18ccf5] CALL 0x0016cba4 LAB_0017def7: LEA RDI,[RSP + 0x90] MOV RSI,RBP CALL 0x0013dfb0 LAB_0017df07: MOV RDI,RBX MOV RSI,R15 CALL 0x001802da MOV RDI,R15 CALL 0x0016f54a MOV RDI,RBP CALL 0x001466b8 MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0017df3f CMP EAX,0x1 JNZ 0x0017df4a ADD qword ptr [RSP + 0x28],0x30 JMP 0x0017de3c LAB_0017df3f: ADD qword ptr [RSP + 0x30],0x10 JMP 0x0017de3c LAB_0017df4a: INC qword ptr [RSP + 0x38] JMP 0x0017de3c LAB_0017df54: LEA RDI,[RSP + 0x10] CALL 0x001466b8 MOV R14,qword ptr [RSP + 0x8] JMP 0x0017df76 LAB_0017df65: MOV R14,qword ptr [RSP + 0x8] LEA RDI,[R14 + 0x20] LAB_0017df6e: MOV RSI,RBX CALL 0x001203d0 LAB_0017df76: MOV RAX,R14 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; char *pcVar3; 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 [16]; char *local_108; long local_100; long local_f8; long local_f0; 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_e8 [16]; string local_d8 [32]; int1 local_b8 [32]; int1 local_98 [32]; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int1 local_50 [32]; lVar2 = std::__cxx11::string::find(param_2,param_3); common_chat_msg::common_chat_msg((common_chat_msg *)param_1); /* try { // try from 0017dd5c to 0017dd6f has its CatchHandler @ 0017dfad */ std::__cxx11::string::assign((char *)param_1); if (lVar2 == -1) { /* try { // try from 0017df6e to 0017df75 has its CatchHandler @ 0017df8b */ std::__cxx11::string::_M_assign(param_1 + 0x20); } else { /* try { // try from 0017dd7f to 0017dd90 has its CatchHandler @ 0017dfab */ std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2); std::__cxx11::string::operator=(param_1 + 0x20,local_d8); std::__cxx11::string::~string(local_d8); /* try { // try from 0017ddb5 to 0017ddc7 has its CatchHandler @ 0017dfa9 */ std::__cxx11::string::substr((ulong)local_d8,(ulong)param_2); local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; /* try { // try from 0017ddda to 0017ddee has its CatchHandler @ 0017df8d */ 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_d8,&local_78,1,0); std::_Function_base::~_Function_base((_Function_base *)&local_78); std::__cxx11::string::~string(local_d8); 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(); 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> ::cend(); while( true ) { /* try { // try from 0017de3c to 0017de8a has its CatchHandler @ 0017dff8 */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_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_108,local_50); if (cVar1 == '\0') break; 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_108); pcVar3 = 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 (local_d8,pbVar4); if (*pcVar3 == '\x03') { /* try { // try from 0017de91 to 0017deb8 has its CatchHandler @ 0017dfda */ _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_b8,pcVar3); } 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_b8,pcVar3,0xffffffffffffffff,0x20,0,0); } /* try { // try from 0017deb9 to 0017def6 has its CatchHandler @ 0017dfdf */ 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_e8,""); } else { 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,"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_e8,pbVar4); } /* try { // try from 0017def7 to 0017df06 has its CatchHandler @ 0017dfc3 */ _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_98,local_e8); /* try { // try from 0017df07 to 0017df11 has its CatchHandler @ 0017dfb2 */ 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_d8); common_tool_call::~common_tool_call((common_tool_call *)local_d8); 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_e8); if (*local_108 == '\x02') { local_f8 = local_f8 + 0x10; } else if (*local_108 == '\x01') { local_100 = local_100 + 0x30; } else { local_f0 = local_f0 + 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_118); } return param_1; }
30,432
Execute_load_log_event::Execute_load_log_event(unsigned char const*, unsigned int, Format_description_log_event const*)
eloqsql/sql/log_event.cc
Execute_load_log_event:: Execute_load_log_event(const uchar *buf, uint len, const Format_description_log_event* description_event) :Log_event(buf, description_event), file_id(0) { uint8 common_header_len= description_event->common_header_len; uint8 exec_load_header_len= description_event->post_header_len[EXEC_LOAD_EVENT-1]; if (len < (uint)(common_header_len+exec_load_header_len)) return; file_id= uint4korr(buf + common_header_len + EL_FILE_ID_OFFSET); }
O0
cpp
Execute_load_log_event::Execute_load_log_event(unsigned char const*, unsigned int, Format_description_log_event const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xd474b0 movq -0x30(%rbp), %rax leaq 0xd4a2c9(%rip), %rcx # 0x1a96e60 addq $0x10, %rcx movq %rcx, (%rax) movl $0x0, 0x6c(%rax) movq -0x20(%rbp), %rax movb 0xad(%rax), %al movb %al, -0x21(%rbp) movq -0x20(%rbp), %rax movq 0xb0(%rax), %rax movb 0x9(%rax), %al movb %al, -0x22(%rbp) movl -0x14(%rbp), %eax movzbl -0x21(%rbp), %ecx movzbl -0x22(%rbp), %edx addl %edx, %ecx cmpl %ecx, %eax jae 0xd4cbd6 jmp 0xd4cbeb movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movzbl -0x21(%rbp), %edx movslq %edx, %rdx movl (%rcx,%rdx), %ecx movl %ecx, 0x6c(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN22Execute_load_log_eventC2EPKhjPK28Format_description_log_event: push rbp; Alternative name is 'Execute_load_log_event::Execute_load_log_event(unsigned char const*, unsigned int, Format_description_log_event const*)' mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov rdi, [rbp+var_8]; this mov [rbp+var_30], rdi mov rsi, [rbp+var_10]; unsigned __int8 * mov rdx, [rbp+var_20]; Format_description_log_event * call _ZN9Log_eventC2EPKhPK28Format_description_log_event; Log_event::Log_event(uchar const*,Format_description_log_event const*) mov rax, [rbp+var_30] lea rcx, _ZTV22Execute_load_log_event; `vtable for'Execute_load_log_event add rcx, 10h mov [rax], rcx mov dword ptr [rax+6Ch], 0 mov rax, [rbp+var_20] mov al, [rax+0ADh] mov [rbp+var_21], al mov rax, [rbp+var_20] mov rax, [rax+0B0h] mov al, [rax+9] mov [rbp+var_22], al mov eax, [rbp+var_14] movzx ecx, [rbp+var_21] movzx edx, [rbp+var_22] add ecx, edx cmp eax, ecx jnb short loc_D4CBD6 jmp short loc_D4CBEB loc_D4CBD6: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] movzx edx, [rbp+var_21] movsxd rdx, edx mov ecx, [rcx+rdx] mov [rax+6Ch], ecx loc_D4CBEB: add rsp, 30h pop rbp retn
void Execute_load_log_event::Execute_load_log_event( Execute_load_log_event *this, const unsigned __int8 *a2, unsigned int a3, const Format_description_log_event *a4) { unsigned __int8 v4; // [rsp+Fh] [rbp-21h] Log_event::Log_event(this, a2, a4); *(_QWORD *)this = &`vtable for'Execute_load_log_event + 2; *((_DWORD *)this + 27) = 0; v4 = *((_BYTE *)a4 + 173); if ( a3 >= *(unsigned __int8 *)(*((_QWORD *)a4 + 22) + 9LL) + (unsigned int)v4 ) *((_DWORD *)this + 27) = *(_DWORD *)&a2[v4]; }
get_case_expr_addr: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xb0 CALL 0x0092dd80 MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x3 ADD RAX,RCX ADD RSP,0x10 POP RBP RET
/* sp_rcontext::get_case_expr_addr(int) const */ long __thiscall sp_rcontext::get_case_expr_addr(sp_rcontext *this,int param_1) { long lVar1; lVar1 = Bounds_checked_array<Item_cache*>::array ((Bounds_checked_array<Item_cache*> *)(this + 0xb0)); return lVar1 + (long)param_1 * 8; }
30,433
my_ll10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *db, *de; long long_val; int sl= 0; ulonglong uval= (ulonglong) val; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; } } p= &buffer[sizeof(buffer)-1]; *p='\0'; if (uval == 0) { *--p= '0'; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p= '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p= (char) ('0' + (long_val - quo*10)); long_val= quo; } cnv: if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst -db); }
O0
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) movl %ecx, -0x6c(%rbp) movq %r8, -0x78(%rbp) movl $0x0, -0x9c(%rbp) movq -0x78(%rbp), %rax movq %rax, -0xa8(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0x57dd9 cmpq $0x0, -0x78(%rbp) jge 0x57dd7 movl $0x1, -0x9c(%rbp) xorl %eax, %eax subq -0xa8(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x57dd9 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xa8(%rbp) jne 0x57e0e movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x30, -0x1(%rax) jmp 0x57eec jmp 0x57e10 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0xa8(%rbp) jbe 0x57e80 movq -0xa8(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0xb0(%rbp) movq -0xa8(%rbp), %rax imulq $0xa, -0xb0(%rbp), %rcx subq %rcx, %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax addl $0x30, %eax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xb0(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x57e10 movq -0xa8(%rbp), %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x98(%rbp) je 0x57eea movq -0x98(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0xc0(%rbp) movq -0x98(%rbp), %rax imulq $0xa, -0xc0(%rbp), %rcx subq %rcx, %rax addq $0x30, %rax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xc0(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x57e8e jmp 0x57eec cmpl $0x0, -0x9c(%rbp) je 0x57f08 movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x2d, -0x1(%rax) movq -0x60(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x60(%rbp), %rax addq -0x68(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x90(%rbp), %rcx movb %al, -0xc5(%rbp) jae 0x57f4a movq -0x80(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0xc5(%rbp) movb -0xc5(%rbp), %al testb $0x1, %al jne 0x57f56 jmp 0x57fb8 movq -0x58(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x58(%rbp), %rdi movq -0x80(%rbp), %rcx movsbq (%rcx), %rsi movq -0x60(%rbp), %rdx movq -0x90(%rbp), %rcx callq *%rax movl %eax, -0xc4(%rbp) cmpl $0x0, -0xc4(%rbp) jle 0x57fa3 movl -0xc4(%rbp), %ecx movq -0x60(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0x57fa5 jmp 0x57fb8 jmp 0x57fa7 movq -0x80(%rbp), %rax addq $0x1, %rax movq %rax, -0x80(%rbp) jmp 0x57f22 movl -0x60(%rbp), %eax movl -0x88(%rbp), %ecx subl %ecx, %eax cltq movq %rax, -0xd0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x57fee movq -0xd0(%rbp), %rax addq $0xd0, %rsp popq %rbp retq callq 0x242a0 nopw %cs:(%rax,%rax)
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov [rbp+var_6C], ecx mov [rbp+var_78], r8 mov [rbp+var_9C], 0 mov rax, [rbp+var_78] mov [rbp+var_A8], rax cmp [rbp+var_6C], 0 jge short loc_57DD9 cmp [rbp+var_78], 0 jge short loc_57DD7 mov [rbp+var_9C], 1 xor eax, eax sub rax, [rbp+var_A8] mov [rbp+var_A8], rax loc_57DD7: jmp short $+2 loc_57DD9: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_80], rax mov rax, [rbp+var_80] mov byte ptr [rax], 0 cmp [rbp+var_A8], 0 jnz short loc_57E0E mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 30h ; '0' jmp loc_57EEC loc_57E0E: jmp short $+2 loc_57E10: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_A8], rax jbe short loc_57E80 mov rax, [rbp+var_A8] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_B0], rax mov rax, [rbp+var_A8] imul rcx, [rbp+var_B0], 0Ah sub rax, rcx mov [rbp+var_B4], eax mov eax, [rbp+var_B4] add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_B0] mov [rbp+var_A8], rax jmp short loc_57E10 loc_57E80: mov rax, [rbp+var_A8] mov [rbp+var_98], rax loc_57E8E: cmp [rbp+var_98], 0 jz short loc_57EEA mov rax, [rbp+var_98] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_C0], rax mov rax, [rbp+var_98] imul rcx, [rbp+var_C0], 0Ah sub rax, rcx add rax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_C0] mov [rbp+var_98], rax jmp short loc_57E8E loc_57EEA: jmp short $+2 loc_57EEC: cmp [rbp+var_9C], 0 jz short loc_57F08 mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 2Dh ; '-' loc_57F08: mov rax, [rbp+var_60] mov [rbp+var_88], rax mov rax, [rbp+var_60] add rax, [rbp+var_68] mov [rbp+var_90], rax loc_57F22: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_90] mov [rbp+var_C5], al jnb short loc_57F4A mov rax, [rbp+var_80] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_C5], al loc_57F4A: mov al, [rbp+var_C5] test al, 1 jnz short loc_57F56 jmp short loc_57FB8 loc_57F56: mov rax, [rbp+var_58] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_58] mov rcx, [rbp+var_80] movsx rsi, byte ptr [rcx] mov rdx, [rbp+var_60] mov rcx, [rbp+var_90] call rax mov [rbp+var_C4], eax cmp [rbp+var_C4], 0 jle short loc_57FA3 mov ecx, [rbp+var_C4] mov rax, [rbp+var_60] movsxd rcx, ecx add rax, rcx mov [rbp+var_60], rax jmp short loc_57FA5 loc_57FA3: jmp short loc_57FB8 loc_57FA5: jmp short $+2 loc_57FA7: mov rax, [rbp+var_80] add rax, 1 mov [rbp+var_80], rax jmp loc_57F22 loc_57FB8: mov eax, dword ptr [rbp+var_60] mov ecx, dword ptr [rbp+var_88] sub eax, ecx cdqe mov [rbp+var_D0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_57FEE mov rax, [rbp+var_D0] add rsp, 0D0h pop rbp retn loc_57FEE: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, long long a5) { char *v5; // rax char *v6; // rax char *v7; // rax bool v9; // [rsp+Bh] [rbp-C5h] int v10; // [rsp+Ch] [rbp-C4h] unsigned long long v11; // [rsp+28h] [rbp-A8h] int v12; // [rsp+34h] [rbp-9Ch] signed long long i; // [rsp+38h] [rbp-98h] unsigned long long v14; // [rsp+40h] [rbp-90h] char *v15; // [rsp+50h] [rbp-80h] unsigned long long v16; // [rsp+70h] [rbp-60h] char v17; // [rsp+BFh] [rbp-11h] BYREF char v18; // [rsp+C0h] [rbp-10h] BYREF unsigned long long v19; // [rsp+C8h] [rbp-8h] v19 = __readfsqword(0x28u); v16 = a2; v12 = 0; v11 = a5; if ( a4 < 0 && a5 < 0 ) { v12 = 1; v11 = -a5; } v15 = &v18; v18 = 0; if ( v11 ) { while ( v11 > 0x7FFFFFFFFFFFFFFFLL ) { v5 = v15--; *(v5 - 1) = v11 % 0xA + 48; v11 /= 0xAuLL; } for ( i = v11; i; i /= 10LL ) { v6 = v15--; *(v6 - 1) = i % 10 + 48; } } else { v15 = &v17; v17 = 48; } if ( v12 ) { v7 = v15--; *(v7 - 1) = 45; } v14 = a3 + a2; while ( 1 ) { v9 = 0; if ( v16 < v14 ) v9 = *v15 != 0; if ( !v9 ) break; v10 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v15, v16, v14); if ( v10 <= 0 ) break; v16 += v10; ++v15; } return (int)v16 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX MOV dword ptr [RBP + -0x6c],ECX MOV qword ptr [RBP + -0x78],R8 MOV dword ptr [RBP + -0x9c],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa8],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x00157dd9 CMP qword ptr [RBP + -0x78],0x0 JGE 0x00157dd7 MOV dword ptr [RBP + -0x9c],0x1 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa8],RAX LAB_00157dd7: JMP 0x00157dd9 LAB_00157dd9: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xa8],0x0 JNZ 0x00157e0e MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x30 JMP 0x00157eec LAB_00157e0e: JMP 0x00157e10 LAB_00157e10: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0xa8],RAX JBE 0x00157e80 MOV RAX,qword ptr [RBP + -0xa8] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0xb0],0xa SUB RAX,RCX MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0xa8],RAX JMP 0x00157e10 LAB_00157e80: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x98],RAX LAB_00157e8e: CMP qword ptr [RBP + -0x98],0x0 JZ 0x00157eea MOV RAX,qword ptr [RBP + -0x98] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x98] IMUL RCX,qword ptr [RBP + -0xc0],0xa SUB RAX,RCX ADD RAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x98],RAX JMP 0x00157e8e LAB_00157eea: JMP 0x00157eec LAB_00157eec: CMP dword ptr [RBP + -0x9c],0x0 JZ 0x00157f08 MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x2d LAB_00157f08: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x90],RAX LAB_00157f22: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0xc5],AL JNC 0x00157f4a MOV RAX,qword ptr [RBP + -0x80] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xc5],AL LAB_00157f4a: MOV AL,byte ptr [RBP + -0xc5] TEST AL,0x1 JNZ 0x00157f56 JMP 0x00157fb8 LAB_00157f56: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x80] MOVSX RSI,byte ptr [RCX] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x90] CALL RAX MOV dword ptr [RBP + -0xc4],EAX CMP dword ptr [RBP + -0xc4],0x0 JLE 0x00157fa3 MOV ECX,dword ptr [RBP + -0xc4] MOV RAX,qword ptr [RBP + -0x60] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x00157fa5 LAB_00157fa3: JMP 0x00157fb8 LAB_00157fa5: JMP 0x00157fa7 LAB_00157fa7: MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0x80],RAX JMP 0x00157f22 LAB_00157fb8: MOV EAX,dword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x88] SUB EAX,ECX CDQE MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00157fee MOV RAX,qword ptr [RBP + -0xd0] ADD RSP,0xd0 POP RBP RET LAB_00157fee: CALL 0x001242a0
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { int iVar1; long in_FS_OFFSET; bool bVar2; ulong local_b0; ulong local_a0; int local_90; char *local_88; ulong local_68; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; local_b0 = param_5; if ((param_4 < 0) && (bVar2 = (long)param_5 < 0, bVar2)) { local_b0 = -param_5; } local_88 = local_19 + 1; local_19[1] = 0; if (local_b0 == 0) { local_88 = local_19; local_19[0] = '0'; } else { while (0x7fffffffffffffff < local_b0) { local_88[-1] = (char)local_b0 + (char)(local_b0 / 10) * -10 + '0'; local_b0 = local_b0 / 10; local_88 = local_88 + -1; } local_a0 = local_b0; while (local_a0 != 0) { local_88[-1] = (char)local_a0 + (char)((long)local_a0 / 10) * -10 + '0'; local_a0 = (long)local_a0 / 10; local_88 = local_88 + -1; } } if (bVar2) { local_88[-1] = '-'; local_88 = local_88 + -1; } local_68 = param_2; while( true ) { bVar2 = false; if (local_68 < param_2 + param_3) { bVar2 = *local_88 != '\0'; } if ((!bVar2) || (iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*local_88,local_68,param_2 + param_3), iVar1 < 1)) break; local_68 = local_68 + (long)iVar1; local_88 = local_88 + 1; } local_90 = (int)param_2; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)((int)local_68 - local_90); }
30,434
my_ll10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *db, *de; long long_val; int sl= 0; ulonglong uval= (ulonglong) val; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; } } p= &buffer[sizeof(buffer)-1]; *p='\0'; if (uval == 0) { *--p= '0'; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p= '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p= (char) ('0' + (long_val - quo*10)); long_val= quo; } cnv: if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst -db); }
O3
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %sil orb %al, %sil movq %r8, %rcx negq %rcx testb %sil, %sil cmovneq %r8, %rcx movb $0x0, -0x40(%rbp) testq %rcx, %rcx je 0x45616 movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD js 0x45621 leaq -0x40(%rbp), %r13 jmp 0x45641 leaq -0x41(%rbp), %r13 movb $0x30, (%r13) jmp 0x45665 movq %rcx, %rax mulq %rdi shrq $0x3, %rdx leaq -0x41(%rbp), %r13 imull $0xf6, %edx, %eax addl %eax, %ecx addb $0x30, %cl movb %cl, (%r13) movq %rdx, %rcx movq %rcx, %rax mulq %rdi shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %ecx, %eax addb $0x30, %al movb %al, -0x1(%r13) decq %r13 cmpq $0x9, %rcx movq %rdx, %rcx ja 0x45641 testb %sil, %sil jne 0x45672 movb $0x2d, -0x1(%r13) decq %r13 movq %rbx, %r12 testq %r14, %r14 jle 0x456ae addq %rbx, %r14 movq %rbx, %r12 movsbq (%r13), %rsi testq %rsi, %rsi je 0x456ae movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rdx movq %r14, %rcx callq *0x30(%rax) testl %eax, %eax jle 0x456ae movl %eax, %eax addq %rax, %r12 incq %r13 cmpq %r14, %r12 jb 0x45680 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x456d2 subl %ebx, %r12d movslq %r12d, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x242e0
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax test ecx, ecx setns al test r8, r8 setns sil or sil, al mov rcx, r8 neg rcx test sil, sil cmovnz rcx, r8 mov [rbp+var_40], 0 test rcx, rcx jz short loc_45616 mov rdi, 0CCCCCCCCCCCCCCCDh js short loc_45621 lea r13, [rbp+var_40] jmp short loc_45641 loc_45616: lea r13, [rbp+var_41] mov byte ptr [r13+0], 30h ; '0' jmp short loc_45665 loc_45621: mov rax, rcx mul rdi shr rdx, 3 lea r13, [rbp+var_41] imul eax, edx, 0F6h add ecx, eax add cl, 30h ; '0' mov [r13+0], cl mov rcx, rdx loc_45641: mov rax, rcx mul rdi shr rdx, 3 imul eax, edx, 0F6h add eax, ecx add al, 30h ; '0' mov [r13-1], al dec r13 cmp rcx, 9 mov rcx, rdx ja short loc_45641 loc_45665: test sil, sil jnz short loc_45672 mov byte ptr [r13-1], 2Dh ; '-' dec r13 loc_45672: mov r12, rbx test r14, r14 jle short loc_456AE add r14, rbx mov r12, rbx loc_45680: movsx rsi, byte ptr [r13+0] test rsi, rsi jz short loc_456AE mov rax, [r15+0B8h] mov rdi, r15 mov rdx, r12 mov rcx, r14 call qword ptr [rax+30h] test eax, eax jle short loc_456AE mov eax, eax add r12, rax inc r13 cmp r12, r14 jb short loc_45680 loc_456AE: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_456D2 sub r12d, ebx movsxd rax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_456D2: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5) { bool v6; // si unsigned long long v7; // rcx char *v8; // r13 bool v9; // cc unsigned long long v10; // r12 unsigned long long v11; // r14 int v12; // eax char v14; // [rsp+3Fh] [rbp-41h] BYREF char v15; // [rsp+40h] [rbp-40h] BYREF unsigned long long v16; // [rsp+50h] [rbp-30h] v16 = __readfsqword(0x28u); v6 = a4 >= 0 || a5 >= 0; v7 = -a5; if ( v6 ) v7 = a5; v15 = 0; if ( v7 ) { if ( (v7 & 0x8000000000000000LL) != 0LL ) { v8 = &v14; v14 = v7 % 0xA + 48; v7 /= 0xAuLL; } else { v8 = &v15; } do { *--v8 = v7 % 0xA + 48; v9 = v7 <= 9; v7 /= 0xAuLL; } while ( !v9 ); } else { v8 = &v14; v14 = 48; } if ( !v6 ) *--v8 = 45; LODWORD(v10) = a2; if ( a3 > 0 ) { v11 = a2 + a3; v10 = a2; do { if ( !*v8 ) break; v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v8, v10, v11); if ( v12 <= 0 ) break; v10 += (unsigned int)v12; ++v8; } while ( v10 < v11 ); } return (int)v10 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS SIL OR SIL,AL MOV RCX,R8 NEG RCX TEST SIL,SIL CMOVNZ RCX,R8 MOV byte ptr [RBP + -0x40],0x0 TEST RCX,RCX JZ 0x00145616 MOV RDI,-0x3333333333333333 JS 0x00145621 LEA R13,[RBP + -0x40] JMP 0x00145641 LAB_00145616: LEA R13,[RBP + -0x41] MOV byte ptr [R13],0x30 JMP 0x00145665 LAB_00145621: MOV RAX,RCX MUL RDI SHR RDX,0x3 LEA R13,[RBP + -0x41] IMUL EAX,EDX,0xf6 ADD ECX,EAX ADD CL,0x30 MOV byte ptr [R13],CL MOV RCX,RDX LAB_00145641: MOV RAX,RCX MUL RDI SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,ECX ADD AL,0x30 MOV byte ptr [R13 + -0x1],AL DEC R13 CMP RCX,0x9 MOV RCX,RDX JA 0x00145641 LAB_00145665: TEST SIL,SIL JNZ 0x00145672 MOV byte ptr [R13 + -0x1],0x2d DEC R13 LAB_00145672: MOV R12,RBX TEST R14,R14 JLE 0x001456ae ADD R14,RBX MOV R12,RBX LAB_00145680: MOVSX RSI,byte ptr [R13] TEST RSI,RSI JZ 0x001456ae MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x001456ae MOV EAX,EAX ADD R12,RAX INC R13 CMP R12,R14 JC 0x00145680 LAB_001456ae: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001456d2 SUB R12D,EBX MOVSXD RAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001456d2: CALL 0x001242e0
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { bool bVar1; uint uVar2; ulong uVar3; ulong uVar4; char *pcVar5; long in_FS_OFFSET; char local_49 [17]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = -param_5; if ((long)param_5 >= 0 || param_4 >= 0) { uVar4 = param_5; } local_49[1] = 0; if (uVar4 == 0) { pcVar5 = local_49; local_49[0] = '0'; } else { if ((long)uVar4 < 0) { uVar3 = uVar4 / 10; pcVar5 = local_49; local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0'; } else { pcVar5 = local_49 + 1; uVar3 = uVar4; } do { pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0'; pcVar5 = pcVar5 + -1; bVar1 = 9 < uVar3; uVar3 = uVar3 / 10; } while (bVar1); } if ((long)param_5 < 0 && param_4 < 0) { pcVar5[-1] = '-'; pcVar5 = pcVar5 + -1; } uVar4 = param_2; if (0 < param_3) { do { if ((long)*pcVar5 == 0) break; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*pcVar5,uVar4,param_3 + param_2); if ((int)uVar2 < 1) break; uVar4 = uVar4 + uVar2; pcVar5 = pcVar5 + 1; } while (uVar4 < param_3 + param_2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return (long)((int)uVar4 - (int)param_2); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,435
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O1
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x95124 testb %al, %al je 0x9e90c movq %r12, %rdi movq %r14, %rsi callq 0x94f26 movq %rbx, %rdi movq %rax, %rsi callq 0x8f540 jmp 0x9e95f movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x9e923 movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x9e95f leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x59472 movq %r14, %rdi movl $0x1, %esi callq 0x59472 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9E90C mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_9E95F loc_9E90C: mov rsi, [r15+68h] test rsi, rsi jz short loc_9E923 mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_9E95F loc_9E923: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 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) loc_9E95F: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( (unsigned __int8)minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 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 *)this + 64); 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 *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x00195124 TEST AL,AL JZ 0x0019e90c MOV RDI,R12 MOV RSI,R14 CALL 0x00194f26 MOV RDI,RBX MOV RSI,RAX CALL 0x0018f540 JMP 0x0019e95f LAB_0019e90c: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x0019e923 MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x0019e95f LAB_0019e923: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00159472 MOV RDI,R14 MOV ESI,0x1 CALL 0x00159472 LAB_0019e95f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); 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(bVar3); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX); Value::Value(param_1,pVVar2); } return param_1; }
30,436
mz_zip_reader_init_internal
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint flags) { (void)flags; if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (!pZip->m_pAlloc) pZip->m_pAlloc = miniz_def_alloc_func; if (!pZip->m_pFree) pZip->m_pFree = miniz_def_free_func; if (!pZip->m_pRealloc) pZip->m_pRealloc = miniz_def_realloc_func; pZip->m_archive_size = 0; pZip->m_central_directory_file_ofs = 0; pZip->m_total_files = 0; pZip->m_last_error = MZ_ZIP_NO_ERROR; if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32)); pZip->m_pState->m_init_flags = flags; pZip->m_pState->m_zip64 = MZ_FALSE; pZip->m_pState->m_zip64_has_extended_info_fields = MZ_FALSE; pZip->m_zip_mode = MZ_ZIP_MODE_READING; return MZ_TRUE; }
O0
c
mz_zip_reader_init_internal: subq $0x38, %rsp movq %rdi, 0x10(%rsp) movl %esi, 0xc(%rsp) cmpq $0x0, 0x10(%rsp) je 0xfe0bc movq 0x10(%rsp), %rax cmpq $0x0, 0x68(%rax) jne 0xfe0bc movq 0x10(%rsp), %rax cmpl $0x0, 0x14(%rax) je 0xfe0ef movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x18, 0x2c(%rsp) cmpq $0x0, 0x30(%rsp) je 0xfe0e2 movl 0x2c(%rsp), %ecx movq 0x30(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x18(%rsp) jmp 0xfe261 movq 0x10(%rsp), %rax cmpq $0x0, 0x28(%rax) jne 0xfe10b movq 0x10(%rsp), %rax leaq -0x9d07(%rip), %rcx # 0xf4400 movq %rcx, 0x28(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x30(%rax) jne 0xfe127 movq 0x10(%rsp), %rax leaq -0x9cf3(%rip), %rcx # 0xf4430 movq %rcx, 0x30(%rax) movq 0x10(%rsp), %rax cmpq $0x0, 0x38(%rax) jne 0xfe143 movq 0x10(%rsp), %rax leaq -0x9cef(%rip), %rcx # 0xf4450 movq %rcx, 0x38(%rax) movq 0x10(%rsp), %rax movq $0x0, (%rax) movq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movq 0x10(%rsp), %rax movl $0x0, 0x10(%rax) movq 0x10(%rsp), %rax movl $0x0, 0x1c(%rax) movq 0x10(%rsp), %rax movq 0x28(%rax), %rax movq 0x10(%rsp), %rcx movq 0x40(%rcx), %rdi movl $0x1, %esi movl $0x98, %edx callq *%rax movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x68(%rax) xorl %eax, %eax cmpq %rcx, %rax jne 0xfe1d8 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) movl $0x10, 0x1c(%rsp) cmpq $0x0, 0x20(%rsp) je 0xfe1cb movl 0x1c(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, 0x1c(%rax) movl $0x0, 0x18(%rsp) jmp 0xfe261 movq 0x10(%rsp), %rax movq 0x68(%rax), %rdi xorl %esi, %esi movl $0x98, %edx callq 0xb390 movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl $0x1, 0x18(%rax) movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl $0x4, 0x38(%rax) movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl $0x4, 0x58(%rax) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl %ecx, 0x60(%rax) movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl $0x0, 0x64(%rax) movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl $0x0, 0x68(%rax) movq 0x10(%rsp), %rax movl $0x1, 0x14(%rax) movl $0x1, 0x18(%rsp) movl 0x18(%rsp), %eax addq $0x38, %rsp retq nopw (%rax,%rax)
mz_zip_reader_init_internal: sub rsp, 38h mov [rsp+38h+var_28], rdi mov [rsp+38h+var_2C], esi cmp [rsp+38h+var_28], 0 jz short loc_FE0BC mov rax, [rsp+38h+var_28] cmp qword ptr [rax+68h], 0 jnz short loc_FE0BC mov rax, [rsp+38h+var_28] cmp dword ptr [rax+14h], 0 jz short loc_FE0EF loc_FE0BC: mov rax, [rsp+38h+var_28] mov [rsp+38h+var_8], rax mov [rsp+38h+var_C], 18h cmp [rsp+38h+var_8], 0 jz short loc_FE0E2 mov ecx, [rsp+38h+var_C] mov rax, [rsp+38h+var_8] mov [rax+1Ch], ecx loc_FE0E2: mov [rsp+38h+var_20], 0 jmp loc_FE261 loc_FE0EF: mov rax, [rsp+38h+var_28] cmp qword ptr [rax+28h], 0 jnz short loc_FE10B mov rax, [rsp+38h+var_28] lea rcx, miniz_def_alloc_func mov [rax+28h], rcx loc_FE10B: mov rax, [rsp+38h+var_28] cmp qword ptr [rax+30h], 0 jnz short loc_FE127 mov rax, [rsp+38h+var_28] lea rcx, miniz_def_free_func mov [rax+30h], rcx loc_FE127: mov rax, [rsp+38h+var_28] cmp qword ptr [rax+38h], 0 jnz short loc_FE143 mov rax, [rsp+38h+var_28] lea rcx, miniz_def_realloc_func mov [rax+38h], rcx loc_FE143: mov rax, [rsp+38h+var_28] mov qword ptr [rax], 0 mov rax, [rsp+38h+var_28] mov qword ptr [rax+8], 0 mov rax, [rsp+38h+var_28] mov dword ptr [rax+10h], 0 mov rax, [rsp+38h+var_28] mov dword ptr [rax+1Ch], 0 mov rax, [rsp+38h+var_28] mov rax, [rax+28h] mov rcx, [rsp+38h+var_28] mov rdi, [rcx+40h] mov esi, 1 mov edx, 98h call rax mov rcx, rax mov rax, [rsp+38h+var_28] mov [rax+68h], rcx xor eax, eax cmp rax, rcx jnz short loc_FE1D8 mov rax, [rsp+38h+var_28] mov [rsp+38h+var_18], rax mov [rsp+38h+var_1C], 10h cmp [rsp+38h+var_18], 0 jz short loc_FE1CB mov ecx, [rsp+38h+var_1C] mov rax, [rsp+38h+var_18] mov [rax+1Ch], ecx loc_FE1CB: mov [rsp+38h+var_20], 0 jmp loc_FE261 loc_FE1D8: mov rax, [rsp+38h+var_28] mov rdi, [rax+68h] xor esi, esi mov edx, 98h call _memset mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov dword ptr [rax+18h], 1 mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov dword ptr [rax+38h], 4 mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov dword ptr [rax+58h], 4 mov ecx, [rsp+38h+var_2C] mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov [rax+60h], ecx mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov dword ptr [rax+64h], 0 mov rax, [rsp+38h+var_28] mov rax, [rax+68h] mov dword ptr [rax+68h], 0 mov rax, [rsp+38h+var_28] mov dword ptr [rax+14h], 1 mov [rsp+38h+var_20], 1 loc_FE261: mov eax, [rsp+38h+var_20] add rsp, 38h retn
long long mz_zip_reader_init_internal(long long a1, int a2) { long long v2; // rax if ( !a1 || *(_QWORD *)(a1 + 104) || *(_DWORD *)(a1 + 20) ) { if ( a1 ) *(_DWORD *)(a1 + 28) = 24; return 0; } else { if ( !*(_QWORD *)(a1 + 40) ) *(_QWORD *)(a1 + 40) = miniz_def_alloc_func; if ( !*(_QWORD *)(a1 + 48) ) *(_QWORD *)(a1 + 48) = miniz_def_free_func; if ( !*(_QWORD *)(a1 + 56) ) *(_QWORD *)(a1 + 56) = miniz_def_realloc_func; *(_QWORD *)a1 = 0LL; *(_QWORD *)(a1 + 8) = 0LL; *(_DWORD *)(a1 + 16) = 0; *(_DWORD *)(a1 + 28) = 0; v2 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 40))(*(_QWORD *)(a1 + 64), 1LL, 152LL); *(_QWORD *)(a1 + 104) = v2; if ( v2 ) { memset(*(_QWORD *)(a1 + 104), 0LL, 152LL); *(_DWORD *)(*(_QWORD *)(a1 + 104) + 24LL) = 1; *(_DWORD *)(*(_QWORD *)(a1 + 104) + 56LL) = 4; *(_DWORD *)(*(_QWORD *)(a1 + 104) + 88LL) = 4; *(_DWORD *)(*(_QWORD *)(a1 + 104) + 96LL) = a2; *(_DWORD *)(*(_QWORD *)(a1 + 104) + 100LL) = 0; *(_DWORD *)(*(_QWORD *)(a1 + 104) + 104LL) = 0; *(_DWORD *)(a1 + 20) = 1; return 1; } else { *(_DWORD *)(a1 + 28) = 16; return 0; } } }
mz_zip_reader_init_internal: SUB RSP,0x38 MOV qword ptr [RSP + 0x10],RDI MOV dword ptr [RSP + 0xc],ESI CMP qword ptr [RSP + 0x10],0x0 JZ 0x001fe0bc MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x001fe0bc MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x14],0x0 JZ 0x001fe0ef LAB_001fe0bc: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x18 CMP qword ptr [RSP + 0x30],0x0 JZ 0x001fe0e2 MOV ECX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX + 0x1c],ECX LAB_001fe0e2: MOV dword ptr [RSP + 0x18],0x0 JMP 0x001fe261 LAB_001fe0ef: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x001fe10b MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x1f4400] MOV qword ptr [RAX + 0x28],RCX LAB_001fe10b: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x30],0x0 JNZ 0x001fe127 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x1f4430] MOV qword ptr [RAX + 0x30],RCX LAB_001fe127: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x001fe143 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x1f4450] MOV qword ptr [RAX + 0x38],RCX LAB_001fe143: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x1c],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RCX + 0x40] MOV ESI,0x1 MOV EDX,0x98 CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x68],RCX XOR EAX,EAX CMP RAX,RCX JNZ 0x001fe1d8 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x1c],0x10 CMP qword ptr [RSP + 0x20],0x0 JZ 0x001fe1cb MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0x1c],ECX LAB_001fe1cb: MOV dword ptr [RSP + 0x18],0x0 JMP 0x001fe261 LAB_001fe1d8: MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x68] XOR ESI,ESI MOV EDX,0x98 CALL 0x0010b390 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x18],0x1 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x38],0x4 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x58],0x4 MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x64],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV dword ptr [RAX + 0x68],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x14],0x1 MOV dword ptr [RSP + 0x18],0x1 LAB_001fe261: MOV EAX,dword ptr [RSP + 0x18] ADD RSP,0x38 RET
int4 mz_zip_reader_init_internal(int8 *param_1,int4 param_2) { long lVar1; int4 local_20; if (((param_1 == (int8 *)0x0) || (param_1[0xd] != 0)) || (*(int *)((long)param_1 + 0x14) != 0)) { if (param_1 != (int8 *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 0x18; } local_20 = 0; } else { if (param_1[5] == 0) { param_1[5] = miniz_def_alloc_func; } if (param_1[6] == 0) { param_1[6] = miniz_def_free_func; } if (param_1[7] == 0) { param_1[7] = miniz_def_realloc_func; } *param_1 = 0; param_1[1] = 0; *(int4 *)(param_1 + 2) = 0; *(int4 *)((long)param_1 + 0x1c) = 0; lVar1 = (*(code *)param_1[5])(param_1[8],1,0x98); param_1[0xd] = lVar1; if (lVar1 == 0) { if (param_1 != (int8 *)0x0) { *(int4 *)((long)param_1 + 0x1c) = 0x10; } local_20 = 0; } else { memset((void *)param_1[0xd],0,0x98); *(int4 *)(param_1[0xd] + 0x18) = 1; *(int4 *)(param_1[0xd] + 0x38) = 4; *(int4 *)(param_1[0xd] + 0x58) = 4; *(int4 *)(param_1[0xd] + 0x60) = param_2; *(int4 *)(param_1[0xd] + 100) = 0; *(int4 *)(param_1[0xd] + 0x68) = 0; *(int4 *)((long)param_1 + 0x14) = 1; local_20 = 1; } } return local_20; }
30,437
mz_zip_reader_init_internal
7CodeWizard[P]stablediffusion/thirdparty/miniz.h
static mz_bool mz_zip_reader_init_internal(mz_zip_archive *pZip, mz_uint flags) { (void)flags; if ((!pZip) || (pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_INVALID)) return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); if (!pZip->m_pAlloc) pZip->m_pAlloc = miniz_def_alloc_func; if (!pZip->m_pFree) pZip->m_pFree = miniz_def_free_func; if (!pZip->m_pRealloc) pZip->m_pRealloc = miniz_def_realloc_func; pZip->m_archive_size = 0; pZip->m_central_directory_file_ofs = 0; pZip->m_total_files = 0; pZip->m_last_error = MZ_ZIP_NO_ERROR; if (NULL == (pZip->m_pState = (mz_zip_internal_state *)pZip->m_pAlloc( pZip->m_pAlloc_opaque, 1, sizeof(mz_zip_internal_state)))) return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); memset(pZip->m_pState, 0, sizeof(mz_zip_internal_state)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir, sizeof(mz_uint8)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_central_dir_offsets, sizeof(mz_uint32)); MZ_ZIP_ARRAY_SET_ELEMENT_SIZE(&pZip->m_pState->m_sorted_central_dir_offsets, sizeof(mz_uint32)); pZip->m_pState->m_init_flags = flags; pZip->m_pState->m_zip64 = MZ_FALSE; pZip->m_pState->m_zip64_has_extended_info_fields = MZ_FALSE; pZip->m_zip_mode = MZ_ZIP_MODE_READING; return MZ_TRUE; }
O1
c
mz_zip_reader_init_internal: pushq %rbp pushq %r14 pushq %rbx xorl %r14d, %r14d testq %rdi, %rdi je 0x83606 movq %rdi, %rbx cmpq $0x0, 0x68(%rdi) jne 0x835fa cmpl $0x0, 0x14(%rbx) je 0x8360e testq %rbx, %rbx je 0x83606 movl $0x18, 0x1c(%rbx) movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movl %esi, %ebp cmpq $0x0, 0x28(%rbx) jne 0x83622 leaq -0x4a81(%rip), %rax # 0x7eb9d movq %rax, 0x28(%rbx) cmpq $0x0, 0x30(%rbx) jne 0x83634 leaq -0x4a87(%rip), %rax # 0x7eba9 movq %rax, 0x30(%rbx) cmpq $0x0, 0x38(%rbx) jne 0x83646 leaq -0x4a91(%rip), %rax # 0x7ebb1 movq %rax, 0x38(%rbx) xorl %r14d, %r14d movl %r14d, 0x1c(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movl %r14d, 0x10(%rbx) movq 0x40(%rbx), %rdi movl $0x1, %esi movl $0x98, %edx callq *0x28(%rbx) movq %rax, 0x68(%rbx) testq %rax, %rax je 0x836ad movl $0x98, %edx movq %rax, %rdi xorl %esi, %esi callq 0xa300 movq 0x68(%rbx), %rax movl $0x1, %r14d movl %r14d, 0x18(%rax) movl $0x4, %ecx movl %ecx, 0x38(%rax) movl %ecx, 0x58(%rax) movl %ebp, 0x60(%rax) movq $0x0, 0x64(%rax) movl %r14d, 0x14(%rbx) jmp 0x83606 movl $0x10, 0x1c(%rbx) jmp 0x83606
mz_zip_reader_init_internal: push rbp push r14 push rbx xor r14d, r14d test rdi, rdi jz short loc_83606 mov rbx, rdi cmp qword ptr [rdi+68h], 0 jnz short loc_835FA cmp dword ptr [rbx+14h], 0 jz short loc_8360E loc_835FA: test rbx, rbx jz short loc_83606 mov dword ptr [rbx+1Ch], 18h loc_83606: mov eax, r14d pop rbx pop r14 pop rbp retn loc_8360E: mov ebp, esi cmp qword ptr [rbx+28h], 0 jnz short loc_83622 lea rax, miniz_def_alloc_func mov [rbx+28h], rax loc_83622: cmp qword ptr [rbx+30h], 0 jnz short loc_83634 lea rax, miniz_def_free_func mov [rbx+30h], rax loc_83634: cmp qword ptr [rbx+38h], 0 jnz short loc_83646 lea rax, miniz_def_realloc_func mov [rbx+38h], rax loc_83646: xor r14d, r14d mov [rbx+1Ch], r14d xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov [rbx+10h], r14d mov rdi, [rbx+40h] mov esi, 1 mov edx, 98h call qword ptr [rbx+28h] mov [rbx+68h], rax test rax, rax jz short loc_836AD mov edx, 98h mov rdi, rax xor esi, esi call _memset mov rax, [rbx+68h] mov r14d, 1 mov [rax+18h], r14d mov ecx, 4 mov [rax+38h], ecx mov [rax+58h], ecx mov [rax+60h], ebp mov qword ptr [rax+64h], 0 mov [rbx+14h], r14d jmp loc_83606 loc_836AD: mov dword ptr [rbx+1Ch], 10h jmp loc_83606
long long mz_zip_reader_init_internal(long long a1, int a2) { unsigned int v2; // r14d long long v4; // rax long long v5; // rax v2 = 0; if ( a1 ) { if ( *(_QWORD *)(a1 + 104) || *(_DWORD *)(a1 + 20) ) { *(_DWORD *)(a1 + 28) = 24; } else { if ( !*(_QWORD *)(a1 + 40) ) *(_QWORD *)(a1 + 40) = miniz_def_alloc_func; if ( !*(_QWORD *)(a1 + 48) ) *(_QWORD *)(a1 + 48) = miniz_def_free_func; if ( !*(_QWORD *)(a1 + 56) ) *(_QWORD *)(a1 + 56) = miniz_def_realloc_func; v2 = 0; *(_DWORD *)(a1 + 28) = 0; *(_OWORD *)a1 = 0LL; *(_DWORD *)(a1 + 16) = 0; v4 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 40))(*(_QWORD *)(a1 + 64), 1LL, 152LL); *(_QWORD *)(a1 + 104) = v4; if ( v4 ) { memset(v4, 0LL, 152LL); v5 = *(_QWORD *)(a1 + 104); v2 = 1; *(_DWORD *)(v5 + 24) = 1; *(_DWORD *)(v5 + 56) = 4; *(_DWORD *)(v5 + 88) = 4; *(_DWORD *)(v5 + 96) = a2; *(_QWORD *)(v5 + 100) = 0LL; *(_DWORD *)(a1 + 20) = 1; } else { *(_DWORD *)(a1 + 28) = 16; } } } return v2; }
30,438
verify_segment_integrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int verify_segment_integrity(segment_t *s, int repair) { if (!s) return 0; int errors = 0; // Basic check - magic number (always performed) if (s->magic != SEGMENT_MAGIC) { HEAP_LOG("CORRUPTION: Invalid magic number in segment %p: 0x%08X != 0x%08X\n", s, s->magic, SEGMENT_MAGIC); errors++; if (repair) { s->magic = SEGMENT_MAGIC; HEAP_LOG("Repaired: Reset magic number for segment %p\n", s); } } // Size sanity check (basic) if (s->size <= 0 || s->size > MAX_REASONABLE_BLOCKS) { HEAP_LOG("CORRUPTION: Unreasonable size in segment %p: %d blocks\n", s, s->size); errors++; if (repair && s->next) { // Try to determine reasonable size from distance to next segment uintptr_t next_addr = (uintptr_t)(s->next); uintptr_t this_addr = (uintptr_t)(s); int corrected_size = (next_addr - this_addr) / BLOCK_SIZE; if (corrected_size > 0 && corrected_size <= MAX_REASONABLE_BLOCKS) { s->size = corrected_size; HEAP_LOG("Repaired: Corrected size for segment %p to %d blocks based on next segment\n", s, s->size); } } } // Stop here if only basic checks are enabled if (integrity_check_level < 2) return errors; // Get the integrity structure - ВАЖНО: добавлен детальный вывод для отладки segment_integrity_t *integrity = get_segment_integrity(s); if (!integrity) { HEAP_LOG("WARNING: Could not get integrity structure for segment %p\n", s); if (repair) { HEAP_LOG("Attempting to initialize integrity for segment %p\n", s); initialize_segment_integrity(s); integrity = get_segment_integrity(s); } if (!integrity) { HEAP_LOG("CRITICAL: Cannot perform integrity checks - no integrity structure available\n"); return errors; } } HEAP_LOG("Checking integrity for segment %p: header_guard=0x%08X, checksum=0x%08X\n", s, integrity->header_guard, integrity->checksum); // Check header guard if (integrity->header_guard != HEADER_GUARD_VALUE) { HEAP_LOG("CORRUPTION: Invalid header guard in segment %p: 0x%08X != 0x%08X\n", s, integrity->header_guard, HEADER_GUARD_VALUE); errors++; if (repair) { integrity->header_guard = HEADER_GUARD_VALUE; HEAP_LOG("Repaired: Reset header guard for segment %p\n", s); } } // Check checksum uint32_t current_checksum = calculate_segment_checksum(s); if (integrity->checksum != current_checksum) { HEAP_LOG("CORRUPTION: Invalid checksum in segment %p: 0x%08X != 0x%08X\n", s, integrity->checksum, current_checksum); errors++; if (repair) { integrity->checksum = current_checksum; HEAP_LOG("Repaired: Reset checksum for segment %p\n", s); } } // Check footer guard only if level 3 checks are enabled if (integrity_check_level >= 3) { uint32_t *footer = get_segment_footer(s); if (footer) { HEAP_LOG("Footer guard check for segment %p: current=0x%08X, expected=0x%08X\n", s, *footer, FOOTER_GUARD_VALUE); if (*footer != FOOTER_GUARD_VALUE) { HEAP_LOG("CORRUPTION: Invalid footer guard in segment %p: 0x%08X != 0x%08X\n", s, *footer, FOOTER_GUARD_VALUE); errors++; if (repair) { *footer = FOOTER_GUARD_VALUE; HEAP_LOG("Repaired: Reset footer guard for segment %p\n", s); } } } else { HEAP_LOG("WARNING: Could not get footer pointer for segment %p\n", s); } // Linked list checks - добавлена проверка на null if (s->next) { HEAP_LOG("Checking next segment link: %p->next = %p, %p->next->prev = %p\n", s, s->next, s->next, s->next->prev); if (s->next->prev != s) { HEAP_LOG("CORRUPTION: Broken linked list: s->next->prev != s for segment %p\n", s); errors++; if (repair) { s->next->prev = s; HEAP_LOG("Repaired: Fixed broken linked list for segment %p\n", s); } } } if (s->prev) { HEAP_LOG("Checking prev segment link: %p->prev = %p, %p->prev->next = %p\n", s, s->prev, s->prev, s->prev->next); if (s->prev->next != s) { HEAP_LOG("CORRUPTION: Broken linked list: s->prev->next != s for segment %p\n", s); errors++; if (repair) { s->prev->next = s; HEAP_LOG("Repaired: Fixed broken linked list for segment %p\n", s); } } } // Check that segment is within heap bounds uintptr_t heap_start = (uintptr_t)(memory); uintptr_t heap_end = heap_start + HEAP_SIZE; uintptr_t segment_addr = (uintptr_t)(s); if (segment_addr < heap_start || segment_addr >= heap_end) { HEAP_LOG("CORRUPTION: Segment %p is outside heap bounds [%p-%p]\n", s, (void*)heap_start, (void*)heap_end); errors++; // Cannot repair this automatically } } return errors; }
O3
c
verify_segment_integrity: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx testq %rdi, %rdi je 0x1e32 movl %esi, %ebp movq %rdi, %r14 xorl %ebx, %ebx cmpl $0xcafebafe, 0x28(%rdi) # imm = 0xCAFEBAFE je 0x1df8 testl %ebp, %ebp je 0x1e39 movl $0xcafebafe, 0x28(%r14) # imm = 0xCAFEBAFE movl $0x1, %ebx leaq 0x4(%r14), %r15 movl $0xffffbfff, %eax # imm = 0xFFFFBFFF addl 0x4(%r14), %eax cmpl $0xffffc000, %eax # imm = 0xFFFFC000 jae 0x1e50 incl %ebx testl %ebp, %ebp je 0x1e50 movq 0x8(%r14), %rax testq %rax, %rax je 0x1e50 subq %r14, %rax shrq $0xc, %rax leal -0x1(%rax), %ecx cmpl $0x3fff, %ecx # imm = 0x3FFF ja 0x1e50 movl %eax, (%r15) jmp 0x1e50 xorl %ebx, %ebx jmp 0x1f5a leaq 0x4(%r14), %r15 movl $0xffffbfff, %eax # imm = 0xFFFFBFFF addl 0x4(%r14), %eax xorl %ebx, %ebx cmpl $0xffffc000, %eax # imm = 0xFFFFC000 adcl $0x1, %ebx cmpl $0x2, 0x320d(%rip) # 0x5064 jl 0x1f5a movq %r14, %r12 addq $0x30, %r12 je 0x1f4e leaq 0x3f(%r14), %rax andq $-0x10, %rax leaq 0x3c(%r14), %rcx cmpq %rax, %rcx ja 0x1f4e cmpl $0xfeedface, (%r12) # imm = 0xFEEDFACE je 0x1e97 incl %ebx testl %ebp, %ebp je 0x1e97 movl $0xfeedface, (%r12) # imm = 0xFEEDFACE movq %r14, %rdi callq 0x1cf1 cmpl %eax, 0x34(%r14) je 0x1eb0 incl %ebx testl %ebp, %ebp je 0x1eb0 movl %eax, 0x4(%r12) cmpl $0x3, 0x31ad(%rip) # 0x5064 jl 0x1f5a movl (%r15), %eax leal -0x4001(%rax), %ecx cmpl $0xffffc000, %ecx # imm = 0xFFFFC000 jb 0x1efa shlq $0xc, %rax addq %r14, %rax subq $0x4, %rax setb %cl cmpq %r14, %rax setbe %dl orb %cl, %dl jne 0x1efa cmpl $0xdeadc0de, (%rax) # imm = 0xDEADC0DE je 0x1efa incl %ebx testl %ebp, %ebp je 0x1efa movl $0xdeadc0de, (%rax) # imm = 0xDEADC0DE movq 0x8(%r14), %rax testq %rax, %rax je 0x1f13 cmpq %r14, 0x10(%rax) je 0x1f13 incl %ebx testl %ebp, %ebp je 0x1f13 movq %r14, 0x10(%rax) movq 0x10(%r14), %rax testq %rax, %rax je 0x1f2c cmpq %r14, 0x8(%rax) je 0x1f2c incl %ebx testl %ebp, %ebp je 0x1f2c movq %r14, 0x8(%rax) leaq 0x10316d(%rip), %rax # 0x1050a0 cmpq %rax, %r14 setb %cl addq $0x4000000, %rax # imm = 0x4000000 cmpq %rax, %r14 setae %al orb %cl, %al movzbl %al, %eax addl %eax, %ebx jmp 0x1f5a testl %ebp, %ebp je 0x1f5a movq %r14, %rdi callq 0x1bd7 movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
verify_segment_integrity: push rbp push r15 push r14 push r12 push rbx test rdi, rdi jz short loc_1E32 mov ebp, esi mov r14, rdi xor ebx, ebx cmp dword ptr [rdi+28h], 0CAFEBAFEh jz short loc_1DF8 test ebp, ebp jz short loc_1E39 mov dword ptr [r14+28h], 0CAFEBAFEh mov ebx, 1 loc_1DF8: lea r15, [r14+4] mov eax, 0FFFFBFFFh add eax, [r14+4] cmp eax, 0FFFFC000h jnb short loc_1E50 inc ebx test ebp, ebp jz short loc_1E50 mov rax, [r14+8] test rax, rax jz short loc_1E50 sub rax, r14 shr rax, 0Ch lea ecx, [rax-1] cmp ecx, 3FFFh ja short loc_1E50 mov [r15], eax jmp short loc_1E50 loc_1E32: xor ebx, ebx jmp loc_1F5A loc_1E39: lea r15, [r14+4] mov eax, 0FFFFBFFFh add eax, [r14+4] xor ebx, ebx cmp eax, 0FFFFC000h adc ebx, 1 loc_1E50: cmp cs:integrity_check_level, 2 jl loc_1F5A mov r12, r14 add r12, 30h ; '0' jz loc_1F4E lea rax, [r14+3Fh] and rax, 0FFFFFFFFFFFFFFF0h lea rcx, [r14+3Ch] cmp rcx, rax ja loc_1F4E cmp dword ptr [r12], 0FEEDFACEh jz short loc_1E97 inc ebx test ebp, ebp jz short loc_1E97 mov dword ptr [r12], 0FEEDFACEh loc_1E97: mov rdi, r14 call calculate_segment_checksum cmp [r14+34h], eax jz short loc_1EB0 inc ebx test ebp, ebp jz short loc_1EB0 mov [r12+4], eax loc_1EB0: cmp cs:integrity_check_level, 3 jl loc_1F5A mov eax, [r15] lea ecx, [rax-4001h] cmp ecx, 0FFFFC000h jb short loc_1EFA shl rax, 0Ch add rax, r14 sub rax, 4 setb cl cmp rax, r14 setbe dl or dl, cl jnz short loc_1EFA cmp dword ptr [rax], 0DEADC0DEh jz short loc_1EFA inc ebx test ebp, ebp jz short loc_1EFA mov dword ptr [rax], 0DEADC0DEh loc_1EFA: mov rax, [r14+8] test rax, rax jz short loc_1F13 cmp [rax+10h], r14 jz short loc_1F13 inc ebx test ebp, ebp jz short loc_1F13 mov [rax+10h], r14 loc_1F13: mov rax, [r14+10h] test rax, rax jz short loc_1F2C cmp [rax+8], r14 jz short loc_1F2C inc ebx test ebp, ebp jz short loc_1F2C mov [rax+8], r14 loc_1F2C: lea rax, memory cmp r14, rax setb cl add rax, 4000000h cmp r14, rax setnb al or al, cl movzx eax, al add ebx, eax jmp short loc_1F5A loc_1F4E: test ebp, ebp jz short loc_1F5A mov rdi, r14 call initialize_segment_integrity loc_1F5A: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long verify_segment_integrity(unsigned long long a1, int a2) { unsigned int v2; // ebx _DWORD *v3; // r15 long long v4; // rax unsigned long long v5; // rax _DWORD *v6; // r12 int v7; // eax long long v8; // rax unsigned long long v9; // rax bool v10; // cf _DWORD *v11; // rax long long v12; // rax long long v13; // rax if ( !a1 ) return 0; v2 = 0; if ( *(_DWORD *)(a1 + 40) == -889275650 ) goto LABEL_5; if ( a2 ) { *(_DWORD *)(a1 + 40) = -889275650; v2 = 1; LABEL_5: v3 = (_DWORD *)(a1 + 4); if ( (unsigned int)(*(_DWORD *)(a1 + 4) - 16385) < 0xFFFFC000 ) { ++v2; if ( a2 ) { v4 = *(_QWORD *)(a1 + 8); if ( v4 ) { v5 = (v4 - a1) >> 12; if ( (unsigned int)(v5 - 1) <= 0x3FFF ) *v3 = v5; } } } goto LABEL_12; } v3 = (_DWORD *)(a1 + 4); v2 = ((unsigned int)(*(_DWORD *)(a1 + 4) - 16385) < 0xFFFFC000) + 1; LABEL_12: if ( integrity_check_level >= 2 ) { v6 = (_DWORD *)(a1 + 48); if ( a1 == -48LL || a1 + 60 > ((a1 + 63) & 0xFFFFFFFFFFFFFFF0LL) ) { if ( a2 ) initialize_segment_integrity(a1); } else { if ( *v6 != -17958194 ) { ++v2; if ( a2 ) *v6 = -17958194; } v7 = calculate_segment_checksum((long long *)a1); if ( *(_DWORD *)(a1 + 52) != v7 ) { ++v2; if ( a2 ) *(_DWORD *)(a1 + 52) = v7; } if ( integrity_check_level >= 3 ) { v8 = (unsigned int)*v3; if ( (unsigned int)(v8 - 16385) >= 0xFFFFC000 ) { v9 = a1 + (v8 << 12); v10 = v9 < 4; v11 = (_DWORD *)(v9 - 4); if ( !v10 && (unsigned long long)v11 > a1 && *v11 != -559038242 ) { ++v2; if ( a2 ) *v11 = -559038242; } } v12 = *(_QWORD *)(a1 + 8); if ( v12 ) { if ( *(_QWORD *)(v12 + 16) != a1 ) { ++v2; if ( a2 ) *(_QWORD *)(v12 + 16) = a1; } } v13 = *(_QWORD *)(a1 + 16); if ( v13 ) { if ( *(_QWORD *)(v13 + 8) != a1 ) { ++v2; if ( a2 ) *(_QWORD *)(v13 + 8) = a1; } } v2 += a1 < (unsigned long long)&memory || a1 >= (unsigned long long)&memory + 0x4000000; } } } return v2; }
verify_segment_integrity: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX TEST RDI,RDI JZ 0x00101e32 MOV EBP,ESI MOV R14,RDI XOR EBX,EBX CMP dword ptr [RDI + 0x28],0xcafebafe JZ 0x00101df8 TEST EBP,EBP JZ 0x00101e39 MOV dword ptr [R14 + 0x28],0xcafebafe MOV EBX,0x1 LAB_00101df8: LEA R15,[R14 + 0x4] MOV EAX,0xffffbfff ADD EAX,dword ptr [R14 + 0x4] CMP EAX,0xffffc000 JNC 0x00101e50 INC EBX TEST EBP,EBP JZ 0x00101e50 MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x00101e50 SUB RAX,R14 SHR RAX,0xc LEA ECX,[RAX + -0x1] CMP ECX,0x3fff JA 0x00101e50 MOV dword ptr [R15],EAX JMP 0x00101e50 LAB_00101e32: XOR EBX,EBX JMP 0x00101f5a LAB_00101e39: LEA R15,[R14 + 0x4] MOV EAX,0xffffbfff ADD EAX,dword ptr [R14 + 0x4] XOR EBX,EBX CMP EAX,0xffffc000 ADC EBX,0x1 LAB_00101e50: CMP dword ptr [0x00105064],0x2 JL 0x00101f5a MOV R12,R14 ADD R12,0x30 JZ 0x00101f4e LEA RAX,[R14 + 0x3f] AND RAX,-0x10 LEA RCX,[R14 + 0x3c] CMP RCX,RAX JA 0x00101f4e CMP dword ptr [R12],0xfeedface JZ 0x00101e97 INC EBX TEST EBP,EBP JZ 0x00101e97 MOV dword ptr [R12],0xfeedface LAB_00101e97: MOV RDI,R14 CALL 0x00101cf1 CMP dword ptr [R14 + 0x34],EAX JZ 0x00101eb0 INC EBX TEST EBP,EBP JZ 0x00101eb0 MOV dword ptr [R12 + 0x4],EAX LAB_00101eb0: CMP dword ptr [0x00105064],0x3 JL 0x00101f5a MOV EAX,dword ptr [R15] LEA ECX,[RAX + -0x4001] CMP ECX,0xffffc000 JC 0x00101efa SHL RAX,0xc ADD RAX,R14 SUB RAX,0x4 SETC CL CMP RAX,R14 SETBE DL OR DL,CL JNZ 0x00101efa CMP dword ptr [RAX],0xdeadc0de JZ 0x00101efa INC EBX TEST EBP,EBP JZ 0x00101efa MOV dword ptr [RAX],0xdeadc0de LAB_00101efa: MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x00101f13 CMP qword ptr [RAX + 0x10],R14 JZ 0x00101f13 INC EBX TEST EBP,EBP JZ 0x00101f13 MOV qword ptr [RAX + 0x10],R14 LAB_00101f13: MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x00101f2c CMP qword ptr [RAX + 0x8],R14 JZ 0x00101f2c INC EBX TEST EBP,EBP JZ 0x00101f2c MOV qword ptr [RAX + 0x8],R14 LAB_00101f2c: LEA RAX,[0x2050a0] CMP R14,RAX SETC CL ADD RAX,0x4000000 CMP R14,RAX SETNC AL OR AL,CL MOVZX EAX,AL ADD EBX,EAX JMP 0x00101f5a LAB_00101f4e: TEST EBP,EBP JZ 0x00101f5a MOV RDI,R14 CALL 0x00101bd7 LAB_00101f5a: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
char verify_segment_integrity(int *param_1,int param_2) { long lVar1; int iVar2; char cVar3; int *piVar4; if (param_1 == (int *)0x0) { return '\0'; } cVar3 = '\0'; if (param_1[10] != -0x35014502) { if (param_2 == 0) { cVar3 = (param_1[1] - 0x4001U < 0xffffc000) + '\x01'; goto LAB_00101e50; } param_1[10] = -0x35014502; cVar3 = '\x01'; } if ((((param_1[1] - 0x4001U < 0xffffc000) && (cVar3 = cVar3 + '\x01', param_2 != 0)) && (*(long *)(param_1 + 2) != 0)) && (iVar2 = (int)((ulong)(*(long *)(param_1 + 2) - (long)param_1) >> 0xc), iVar2 - 1U < 0x4000)) { param_1[1] = iVar2; } LAB_00101e50: if (1 < integrity_check_level) { piVar4 = param_1 + 0xc; if ((piVar4 == (int *)0x0) || ((int *)((long)param_1 + 0x3fU & 0xfffffffffffffff0) < param_1 + 0xf)) { if (param_2 != 0) { initialize_segment_integrity(param_1); } } else { if ((*piVar4 != -0x1120532) && (cVar3 = cVar3 + '\x01', param_2 != 0)) { *piVar4 = -0x1120532; } iVar2 = calculate_segment_checksum(param_1); if ((param_1[0xd] != iVar2) && (cVar3 = cVar3 + '\x01', param_2 != 0)) { param_1[0xd] = iVar2; } if (2 < integrity_check_level) { if ((((0xffffbfff < param_1[1] - 0x4001U) && (piVar4 = param_1 + (ulong)(uint)param_1[1] * 0x400 + -1, param_1 < piVar4 && (int *)0x3 < param_1 + (ulong)(uint)param_1[1] * 0x400)) && (*piVar4 != -0x21523f22)) && (cVar3 = cVar3 + '\x01', param_2 != 0)) { *piVar4 = -0x21523f22; } lVar1 = *(long *)(param_1 + 2); if (((lVar1 != 0) && (*(int **)(lVar1 + 0x10) != param_1)) && (cVar3 = cVar3 + '\x01', param_2 != 0)) { *(int **)(lVar1 + 0x10) = param_1; } lVar1 = *(long *)(param_1 + 4); if (((lVar1 != 0) && (*(int **)(lVar1 + 8) != param_1)) && (cVar3 = cVar3 + '\x01', param_2 != 0)) { *(int **)(lVar1 + 8) = param_1; } cVar3 = cVar3 + (memory + 0x3ffffff < param_1 || param_1 < memory); } } } return cVar3; }
30,439
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> testing::internal::StreamableToString<wchar_t*>(wchar_t* const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-message.h
std::string StreamableToString(const T& streamable) { return (Message() << streamable).GetString(); }
O1
c
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> testing::internal::StreamableToString<wchar_t*>(wchar_t* const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x1cd64 movq (%r14), %rsi movq %r15, %rdi callq 0x1ce64 movq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1cfc7 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3cafc movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3cb1c movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x8990
_ZN7testing8internal18StreamableToStringIPwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi lea r15, [rsp+28h+var_20] mov rdi, r15; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rsi, [r14] mov rdi, r15 call _ZN7testing7MessagelsEPw; testing::Message::operator<<(wchar_t *) mov rsi, [rsp+28h+var_20] mov rdi, rbx call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_3CAFC mov rax, [rdi] call qword ptr [rax+8] loc_3CAFC: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_3CB1C mov rax, [rdi] call qword ptr [rax+8] loc_3CB1C: mov rdi, rbx call __Unwind_Resume
long long testing::internal::StreamableToString<wchar_t *>(long long a1) { long long v2[4]; // [rsp+8h] [rbp-20h] BYREF testing::Message::Message((testing::Message *)v2); testing::Message::operator<<(v2); testing::internal::StringStreamToString(a1, v2[0]); if ( v2[0] ) (*(void ( **)(long long))(*(_QWORD *)v2[0] + 8LL))(v2[0]); return a1; }
StreamableToString<wchar_t*>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0011cd64 MOV RSI,qword ptr [R14] LAB_0013cad7: MOV RDI,R15 CALL 0x0011ce64 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x0011cfc7 LAB_0013caec: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0013cafc MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0013cafc: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* std::__cxx11::string testing::internal::StreamableToString<wchar_t*>(wchar_t* const&) */ internal * __thiscall testing::internal::StreamableToString<wchar_t*>(internal *this,wchar_t **param_1) { long *local_20; Message::Message((Message *)&local_20); /* try { // try from 0013cad7 to 0013caeb has its CatchHandler @ 0013cb09 */ Message::operator<<((Message *)&local_20,*param_1); StringStreamToString((stringstream *)this); if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } return this; }
30,440
delete_dir_entry
eloqsql/storage/maria/ma_blockrec.c
static int delete_dir_entry(MARIA_SHARE *share, uchar *buff, uint record_number, uint *empty_space_res) { uint block_size= share->block_size; uint number_of_records= (uint) buff[DIR_COUNT_OFFSET]; uint length, empty_space; uchar *dir; DBUG_ENTER("delete_dir_entry"); DBUG_PRINT("enter", ("record_number: %u number_of_records: %u", record_number, number_of_records)); #ifdef SANITY_CHECKS if (record_number >= number_of_records || record_number > ((block_size - LSN_SIZE - PAGE_TYPE_SIZE - 1 - PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE)) { DBUG_PRINT("error", ("record_number: %u number_of_records: %u", record_number, number_of_records)); DBUG_RETURN(-1); } #endif check_directory(share, buff, block_size, 0, (uint) -1); empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET); dir= dir_entry_pos(buff, block_size, record_number); length= uint2korr(dir + 2); /* Length of entry we just deleted */ DBUG_ASSERT(uint2korr(dir) != 0 && length < block_size); if (record_number == number_of_records - 1) { /* Delete this entry and all following free directory entries */ uchar *end= buff + block_size - PAGE_SUFFIX_SIZE; number_of_records--; dir+= DIR_ENTRY_SIZE; empty_space+= DIR_ENTRY_SIZE; /* Unlink and free the next empty ones */ while (dir < end && dir[0] == 0 && dir[1] == 0) { number_of_records--; if (dir[2] == END_OF_DIR_FREE_LIST) buff[DIR_FREE_OFFSET]= dir[3]; else { uchar *prev_entry= dir_entry_pos(buff, block_size, (uint) dir[2]); DBUG_ASSERT(uint2korr(prev_entry) == 0 && prev_entry[3] == number_of_records); prev_entry[3]= dir[3]; } if (dir[3] != END_OF_DIR_FREE_LIST) { uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT(uint2korr(next_entry) == 0 && next_entry[2] == number_of_records); next_entry[2]= dir[2]; } dir+= DIR_ENTRY_SIZE; empty_space+= DIR_ENTRY_SIZE; } if (number_of_records == 0) { /* All entries on page deleted */ DBUG_PRINT("info", ("Page marked as unallocated")); buff[PAGE_TYPE_OFFSET]= UNALLOCATED_PAGE; #ifdef IDENTICAL_PAGES_AFTER_RECOVERY { dir= dir_entry_pos(buff, block_size, record_number); bzero(dir, (record_number+1) * DIR_ENTRY_SIZE); } #endif *empty_space_res= block_size; DBUG_RETURN(1); } buff[DIR_COUNT_OFFSET]= (uchar) number_of_records; } else { /* Update directory */ dir[0]= dir[1]= 0; dir[2]= END_OF_DIR_FREE_LIST; if ((dir[3]= buff[DIR_FREE_OFFSET]) != END_OF_DIR_FREE_LIST) { /* Relink next entry to point to newly freed entry */ uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT(uint2korr(next_entry) == 0 && next_entry[2] == END_OF_DIR_FREE_LIST); next_entry[2]= record_number; } buff[DIR_FREE_OFFSET]= record_number; } empty_space+= length; int2store(buff + EMPTY_SPACE_OFFSET, empty_space); buff[PAGE_TYPE_OFFSET]|= (uchar) PAGE_CAN_BE_COMPACTED; *empty_space_res= empty_space; check_directory(share, buff, block_size, 0, empty_space); DBUG_RETURN(0); }
O0
c
delete_dir_entry: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax movzbl 0x8(%rax), %eax movl %eax, -0x30(%rbp) jmp 0x33fa1 movl -0x1c(%rbp), %eax cmpl -0x30(%rbp), %eax jae 0x33fc2 movl -0x1c(%rbp), %eax movl -0x2c(%rbp), %ecx subl $0x7, %ecx subl $0x1, %ecx subl $0x1, %ecx subl $0x4, %ecx shrl $0x2, %ecx cmpl %ecx, %eax jbe 0x33fd4 jmp 0x33fc4 jmp 0x33fc6 jmp 0x33fc8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x341f7 movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax movl %eax, -0x38(%rbp) movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x1c(%rbp), %edx callq 0x2e640 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movzwl 0x2(%rax), %eax movl %eax, -0x34(%rbp) jmp 0x33fff movl -0x1c(%rbp), %eax movl -0x30(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jne 0x34153 movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx addq %rcx, %rax addq $-0x4, %rax movq %rax, -0x48(%rbp) movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) movq -0x40(%rbp), %rax addq $0x4, %rax movq %rax, -0x40(%rbp) movl -0x38(%rbp), %eax addl $0x4, %eax movl %eax, -0x38(%rbp) movq -0x40(%rbp), %rcx xorl %eax, %eax cmpq -0x48(%rbp), %rcx movb %al, -0x69(%rbp) jae 0x34071 movq -0x40(%rbp), %rax movzbl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x69(%rbp) jne 0x34071 movq -0x40(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x0, %eax sete %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x3407d jmp 0x3411e movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) movq -0x40(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xff, %eax jne 0x340a5 movq -0x40(%rbp), %rax movb 0x3(%rax), %cl movq -0x18(%rbp), %rax movb %cl, 0x9(%rax) jmp 0x340cd movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x40(%rbp), %rax movzbl 0x2(%rax), %edx callq 0x2e640 movq %rax, -0x50(%rbp) jmp 0x340bf movq -0x40(%rbp), %rax movb 0x3(%rax), %cl movq -0x50(%rbp), %rax movb %cl, 0x3(%rax) movq -0x40(%rbp), %rax movzbl 0x3(%rax), %eax cmpl $0xff, %eax je 0x34104 movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x40(%rbp), %rax movzbl 0x3(%rax), %edx callq 0x2e640 movq %rax, -0x58(%rbp) jmp 0x340f6 movq -0x40(%rbp), %rax movb 0x2(%rax), %cl movq -0x58(%rbp), %rax movb %cl, 0x2(%rax) movq -0x40(%rbp), %rax addq $0x4, %rax movq %rax, -0x40(%rbp) movl -0x38(%rbp), %eax addl $0x4, %eax movl %eax, -0x38(%rbp) jmp 0x34040 cmpl $0x0, -0x30(%rbp) jne 0x34145 jmp 0x34126 jmp 0x34128 movq -0x18(%rbp), %rax movb $0x0, 0x7(%rax) movl -0x2c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x341f7 movl -0x30(%rbp), %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x8(%rax) jmp 0x341b4 movq -0x40(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x40(%rbp), %rax movb $0x0, (%rax) movq -0x40(%rbp), %rax movb $-0x1, 0x2(%rax) movq -0x18(%rbp), %rax movb 0x9(%rax), %al movq -0x40(%rbp), %rcx movb %al, 0x3(%rcx) movzbl %al, %eax cmpl $0xff, %eax je 0x341a8 movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x40(%rbp), %rax movzbl 0x3(%rax), %edx callq 0x2e640 movq %rax, -0x60(%rbp) jmp 0x3419c movl -0x1c(%rbp), %eax movb %al, %cl movq -0x60(%rbp), %rax movb %cl, 0x2(%rax) movl -0x1c(%rbp), %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x9(%rax) movl -0x34(%rbp), %eax addl -0x38(%rbp), %eax movl %eax, -0x38(%rbp) movq -0x18(%rbp), %rax addq $0xa, %rax movq %rax, -0x68(%rbp) movl -0x38(%rbp), %eax movw %ax, %cx movq -0x68(%rbp), %rax movw %cx, (%rax) movq -0x18(%rbp), %rax movzbl 0x7(%rax), %ecx orl $0x80, %ecx movb %cl, 0x7(%rax) movl -0x38(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq
delete_dir_entry: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov eax, [rax+7BCh] mov [rbp+var_2C], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+8] mov [rbp+var_30], eax jmp short $+2 loc_33FA1: mov eax, [rbp+var_1C] cmp eax, [rbp+var_30] jnb short loc_33FC2 mov eax, [rbp+var_1C] mov ecx, [rbp+var_2C] sub ecx, 7 sub ecx, 1 sub ecx, 1 sub ecx, 4 shr ecx, 2 cmp eax, ecx jbe short loc_33FD4 loc_33FC2: jmp short $+2 loc_33FC4: jmp short $+2 loc_33FC6: jmp short $+2 loc_33FC8: mov [rbp+var_4], 0FFFFFFFFh jmp loc_341F7 loc_33FD4: mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] mov [rbp+var_38], eax mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov edx, [rbp+var_1C] call dir_entry_pos mov [rbp+var_40], rax mov rax, [rbp+var_40] movzx eax, word ptr [rax+2] mov [rbp+var_34], eax jmp short $+2 loc_33FFF: mov eax, [rbp+var_1C] mov ecx, [rbp+var_30] sub ecx, 1 cmp eax, ecx jnz loc_34153 mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] add rax, rcx add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_48], rax mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax mov rax, [rbp+var_40] add rax, 4 mov [rbp+var_40], rax mov eax, [rbp+var_38] add eax, 4 mov [rbp+var_38], eax loc_34040: mov rcx, [rbp+var_40] xor eax, eax cmp rcx, [rbp+var_48] mov [rbp+var_69], al jnb short loc_34071 mov rax, [rbp+var_40] movzx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_69], al jnz short loc_34071 mov rax, [rbp+var_40] movzx eax, byte ptr [rax+1] cmp eax, 0 setz al mov [rbp+var_69], al loc_34071: mov al, [rbp+var_69] test al, 1 jnz short loc_3407D jmp loc_3411E loc_3407D: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax mov rax, [rbp+var_40] movzx eax, byte ptr [rax+2] cmp eax, 0FFh jnz short loc_340A5 mov rax, [rbp+var_40] mov cl, [rax+3] mov rax, [rbp+var_18] mov [rax+9], cl jmp short loc_340CD loc_340A5: mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov rax, [rbp+var_40] movzx edx, byte ptr [rax+2] call dir_entry_pos mov [rbp+var_50], rax jmp short $+2 loc_340BF: mov rax, [rbp+var_40] mov cl, [rax+3] mov rax, [rbp+var_50] mov [rax+3], cl loc_340CD: mov rax, [rbp+var_40] movzx eax, byte ptr [rax+3] cmp eax, 0FFh jz short loc_34104 mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov rax, [rbp+var_40] movzx edx, byte ptr [rax+3] call dir_entry_pos mov [rbp+var_58], rax jmp short $+2 loc_340F6: mov rax, [rbp+var_40] mov cl, [rax+2] mov rax, [rbp+var_58] mov [rax+2], cl loc_34104: mov rax, [rbp+var_40] add rax, 4 mov [rbp+var_40], rax mov eax, [rbp+var_38] add eax, 4 mov [rbp+var_38], eax jmp loc_34040 loc_3411E: cmp [rbp+var_30], 0 jnz short loc_34145 jmp short $+2 loc_34126: jmp short $+2 loc_34128: mov rax, [rbp+var_18] mov byte ptr [rax+7], 0 mov ecx, [rbp+var_2C] mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_4], 1 jmp loc_341F7 loc_34145: mov eax, [rbp+var_30] mov cl, al mov rax, [rbp+var_18] mov [rax+8], cl jmp short loc_341B4 loc_34153: mov rax, [rbp+var_40] mov byte ptr [rax+1], 0 mov rax, [rbp+var_40] mov byte ptr [rax], 0 mov rax, [rbp+var_40] mov byte ptr [rax+2], 0FFh mov rax, [rbp+var_18] mov al, [rax+9] mov rcx, [rbp+var_40] mov [rcx+3], al movzx eax, al cmp eax, 0FFh jz short loc_341A8 mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov rax, [rbp+var_40] movzx edx, byte ptr [rax+3] call dir_entry_pos mov [rbp+var_60], rax jmp short $+2 loc_3419C: mov eax, [rbp+var_1C] mov cl, al mov rax, [rbp+var_60] mov [rax+2], cl loc_341A8: mov eax, [rbp+var_1C] mov cl, al mov rax, [rbp+var_18] mov [rax+9], cl loc_341B4: mov eax, [rbp+var_34] add eax, [rbp+var_38] mov [rbp+var_38], eax mov rax, [rbp+var_18] add rax, 0Ah mov [rbp+var_68], rax mov eax, [rbp+var_38] mov cx, ax mov rax, [rbp+var_68] mov [rax], cx mov rax, [rbp+var_18] movzx ecx, byte ptr [rax+7] or ecx, 80h mov [rax+7], cl mov ecx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_4], 0 loc_341F7: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long delete_dir_entry(long long a1, long long a2, unsigned int a3, unsigned int *a4) { unsigned __int8 v4; // al bool v6; // [rsp+7h] [rbp-69h] long long v7; // [rsp+30h] [rbp-40h] _BYTE *v8; // [rsp+30h] [rbp-40h] int v9; // [rsp+38h] [rbp-38h] unsigned int v10; // [rsp+38h] [rbp-38h] int v11; // [rsp+3Ch] [rbp-34h] unsigned int v12; // [rsp+40h] [rbp-30h] unsigned int v13; // [rsp+40h] [rbp-30h] unsigned int v14; // [rsp+44h] [rbp-2Ch] v14 = *(_DWORD *)(a1 + 1980); v12 = *(unsigned __int8 *)(a2 + 8); if ( a3 < v12 && a3 <= (v14 - 13) >> 2 ) { v9 = *(unsigned __int16 *)(a2 + 10); v7 = dir_entry_pos(a2, v14, a3); v11 = *(unsigned __int16 *)(v7 + 2); if ( a3 == v12 - 1 ) { v13 = v12 - 1; v8 = (_BYTE *)(v7 + 4); for ( v9 += 4; ; v9 += 4 ) { v6 = 0; if ( (unsigned long long)v8 < (unsigned long long)v14 + a2 - 4 ) { v6 = 0; if ( !*v8 ) v6 = v8[1] == 0; } if ( !v6 ) break; --v13; if ( (unsigned __int8)v8[2] == 255 ) *(_BYTE *)(a2 + 9) = v8[3]; else *(_BYTE *)(dir_entry_pos(a2, v14, (unsigned __int8)v8[2]) + 3) = v8[3]; if ( (unsigned __int8)v8[3] != 255 ) *(_BYTE *)(dir_entry_pos(a2, v14, (unsigned __int8)v8[3]) + 2) = v8[2]; v8 += 4; } if ( !v13 ) { *(_BYTE *)(a2 + 7) = 0; *a4 = v14; return 1; } *(_BYTE *)(a2 + 8) = v13; } else { *(_BYTE *)(v7 + 1) = 0; *(_BYTE *)v7 = 0; *(_BYTE *)(v7 + 2) = -1; v4 = *(_BYTE *)(a2 + 9); *(_BYTE *)(v7 + 3) = v4; if ( v4 != 255 ) *(_BYTE *)(dir_entry_pos(a2, v14, *(unsigned __int8 *)(v7 + 3)) + 2) = a3; *(_BYTE *)(a2 + 9) = a3; } v10 = v9 + v11; *(_WORD *)(a2 + 10) = v10; *(_BYTE *)(a2 + 7) |= 0x80u; *a4 = v10; return 0; } return (unsigned int)-1; }
delete_dir_entry: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RBP + -0x30],EAX JMP 0x00133fa1 LAB_00133fa1: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x30] JNC 0x00133fc2 MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0x2c] SUB ECX,0x7 SUB ECX,0x1 SUB ECX,0x1 SUB ECX,0x4 SHR ECX,0x2 CMP EAX,ECX JBE 0x00133fd4 LAB_00133fc2: JMP 0x00133fc4 LAB_00133fc4: JMP 0x00133fc6 LAB_00133fc6: JMP 0x00133fc8 LAB_00133fc8: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001341f7 LAB_00133fd4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x38],EAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x0012e640 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x2] MOV dword ptr [RBP + -0x34],EAX JMP 0x00133fff LAB_00133fff: MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0x30] SUB ECX,0x1 CMP EAX,ECX JNZ 0x00134153 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] ADD RAX,RCX ADD RAX,-0x4 MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x38] ADD EAX,0x4 MOV dword ptr [RBP + -0x38],EAX LAB_00134040: MOV RCX,qword ptr [RBP + -0x40] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x69],AL JNC 0x00134071 MOV RAX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x69],AL JNZ 0x00134071 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x0 SETZ AL MOV byte ptr [RBP + -0x69],AL LAB_00134071: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0013407d JMP 0x0013411e LAB_0013407d: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xff JNZ 0x001340a5 MOV RAX,qword ptr [RBP + -0x40] MOV CL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x9],CL JMP 0x001340cd LAB_001340a5: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x40] MOVZX EDX,byte ptr [RAX + 0x2] CALL 0x0012e640 MOV qword ptr [RBP + -0x50],RAX JMP 0x001340bf LAB_001340bf: MOV RAX,qword ptr [RBP + -0x40] MOV CL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX + 0x3],CL LAB_001340cd: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,byte ptr [RAX + 0x3] CMP EAX,0xff JZ 0x00134104 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x40] MOVZX EDX,byte ptr [RAX + 0x3] CALL 0x0012e640 MOV qword ptr [RBP + -0x58],RAX JMP 0x001340f6 LAB_001340f6: MOV RAX,qword ptr [RBP + -0x40] MOV CL,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x58] MOV byte ptr [RAX + 0x2],CL LAB_00134104: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x38] ADD EAX,0x4 MOV dword ptr [RBP + -0x38],EAX JMP 0x00134040 LAB_0013411e: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x00134145 JMP 0x00134126 LAB_00134126: JMP 0x00134128 LAB_00134128: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7],0x0 MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001341f7 LAB_00134145: MOV EAX,dword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x8],CL JMP 0x001341b4 LAB_00134153: MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x1],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x2],0xff MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x9] MOV RCX,qword ptr [RBP + -0x40] MOV byte ptr [RCX + 0x3],AL MOVZX EAX,AL CMP EAX,0xff JZ 0x001341a8 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x40] MOVZX EDX,byte ptr [RAX + 0x3] CALL 0x0012e640 MOV qword ptr [RBP + -0x60],RAX JMP 0x0013419c LAB_0013419c: MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX + 0x2],CL LAB_001341a8: MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x9],CL LAB_001341b4: MOV EAX,dword ptr [RBP + -0x34] ADD EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0xa MOV qword ptr [RBP + -0x68],RAX MOV EAX,dword ptr [RBP + -0x38] MOV CX,AX MOV RAX,qword ptr [RBP + -0x68] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RAX + 0x7] OR ECX,0x80 MOV byte ptr [RAX + 0x7],CL MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 LAB_001341f7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int4 delete_dir_entry(long param_1,long param_2,uint param_3,uint *param_4) { char cVar1; ushort uVar2; uint uVar3; char *pcVar4; long lVar5; bool bVar6; char *local_48; uint local_40; uint local_38; int4 local_c; uVar3 = *(uint *)(param_1 + 0x7bc); local_38 = (uint)*(byte *)(param_2 + 8); if ((param_3 < local_38) && (param_3 <= uVar3 - 0xd >> 2)) { local_40 = (uint)*(ushort *)(param_2 + 10); local_48 = (char *)dir_entry_pos(param_2,uVar3,param_3); uVar2 = *(ushort *)(local_48 + 2); if (param_3 == local_38 - 1) { while( true ) { pcVar4 = local_48; local_38 = local_38 - 1; local_40 = local_40 + 4; local_48 = pcVar4 + 4; bVar6 = false; if ((local_48 < (char *)(param_2 + (ulong)uVar3 + -4)) && (bVar6 = false, *local_48 == '\0') ) { bVar6 = pcVar4[5] == '\0'; } if (!bVar6) break; if (pcVar4[6] == -1) { *(char *)(param_2 + 9) = pcVar4[7]; } else { lVar5 = dir_entry_pos(param_2,uVar3,pcVar4[6]); *(char *)(lVar5 + 3) = pcVar4[7]; } if (pcVar4[7] != -1) { lVar5 = dir_entry_pos(param_2,uVar3,pcVar4[7]); *(char *)(lVar5 + 2) = pcVar4[6]; } } if (local_38 == 0) { *(int1 *)(param_2 + 7) = 0; *param_4 = uVar3; return 1; } *(char *)(param_2 + 8) = (char)local_38; } else { local_48[1] = '\0'; *local_48 = '\0'; local_48[2] = -1; cVar1 = *(char *)(param_2 + 9); local_48[3] = cVar1; if (cVar1 != -1) { lVar5 = dir_entry_pos(param_2,uVar3,local_48[3]); *(char *)(lVar5 + 2) = (char)param_3; } *(char *)(param_2 + 9) = (char)param_3; } *(short *)(param_2 + 10) = (short)(uVar2 + local_40); *(byte *)(param_2 + 7) = *(byte *)(param_2 + 7) | 0x80; *param_4 = uVar2 + local_40; local_c = 0; } else { local_c = 0xffffffff; } return local_c; }
30,441
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; }
O0
c
mysql_close_start: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3f479 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x3f479 movq -0x10(%rbp), %rdi callq 0x3f1a0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x3f477 movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x3f489 jmp 0x3f479 movq -0x10(%rbp), %rdi callq 0x23500 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_start: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jz short loc_3F479 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_3F479 mov rdi, [rbp+var_10] call mysql_close_slow_part_start mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_3F477 mov eax, [rbp+var_14] mov [rbp+var_4], eax jmp short loc_3F489 loc_3F477: jmp short $+2 loc_3F479: mov rdi, [rbp+var_10] call mysql_close mov [rbp+var_4], 0 loc_3F489: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mysql_close_start(_QWORD *a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] if ( a1 && *a1 && (v2 = mysql_close_slow_part_start((long long)a1)) != 0 ) { return v2; } else { mysql_close((long long)a1); return 0; } }
mysql_close_start: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013f479 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x0013f479 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013f1a0 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0013f477 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX JMP 0x0013f489 LAB_0013f477: JMP 0x0013f479 LAB_0013f479: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00123500 MOV dword ptr [RBP + -0x4],0x0 LAB_0013f489: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int mysql_close_start(long *param_1) { int local_c; if (((param_1 == (long *)0x0) || (*param_1 == 0)) || (local_c = mysql_close_slow_part_start(param_1), local_c == 0)) { mysql_close(param_1); local_c = 0; } return local_c; }
30,442
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 %r14 pushq %rbx movq %rdi, %rbx movq 0x480(%rdi), %rax movq 0x28(%rax), %r14 cmpb $0x0, 0x15(%r14) je 0x2d6bf movb $0x1, 0x14(%r14) movl %esi, 0x4(%r14) leaq 0x38(%r14), %rdi callq 0x31297 movb $0x0, 0x14(%r14) testl %eax, %eax jle 0x2d713 movl (%r14), %r14d jmp 0x2d71f movl $0x7de, 0x90(%rbx) # imm = 0x7DE leaq 0x297(%rbx), %rdi leaq 0x216b9(%rip), %rax # 0x4ed90 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x29c(%rbx) leaq 0x97(%rbx), %rdi leaq 0x216a4(%rip), %rax # 0x4eda0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movb %r14b, 0x296(%rbx) jmp 0x2d71f movb $0x0, 0x15(%r14) xorl %r14d, %r14d testl %eax, %eax js 0x2d727 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movl $0x7d8, 0x90(%rbx) # imm = 0x7D8 leaq 0x297(%rbx), %rdi leaq 0x21651(%rip), %rax # 0x4ed90 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x29c(%rbx) leaq 0x97(%rbx), %rdi leaq 0x2163c(%rip), %rax # 0x4eda0 movq 0x40(%rax), %rsi jmp 0x2d700
mysql_close_slow_part_cont: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov rax, [rdi+480h] mov r14, [rax+28h] cmp byte ptr [r14+15h], 0 jz short loc_2D6BF mov byte ptr [r14+14h], 1 mov [r14+4], esi lea rdi, [r14+38h] call my_context_continue mov byte ptr [r14+14h], 0 test eax, eax jle short loc_2D713 mov r14d, [r14] jmp short loc_2D71F loc_2D6BF: mov dword ptr [rbx+90h], 7DEh lea rdi, [rbx+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+29Ch], r14b lea rdi, [rbx+97h] lea rax, client_errors mov rsi, [rax+70h] loc_2D700: mov edx, 1FFh call _strncpy mov [rbx+296h], r14b jmp short loc_2D71F loc_2D713: mov byte ptr [r14+15h], 0 xor r14d, r14d test eax, eax js short loc_2D727 loc_2D71F: mov eax, r14d pop rbx pop r14 pop rbp retn loc_2D727: mov dword ptr [rbx+90h], 7D8h lea rdi, [rbx+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+29Ch], r14b lea rdi, [rbx+97h] lea rax, client_errors mov rsi, [rax+40h] jmp short loc_2D700
long long mysql_close_slow_part_cont(long long a1, unsigned int a2) { unsigned int *v3; // r14 int v4; // eax unsigned int v5; // r14d long long v6; // rdi char *v7; // rsi v3 = *(unsigned int **)(*(_QWORD *)(a1 + 1152) + 40LL); if ( !*((_BYTE *)v3 + 21) ) { *(_DWORD *)(a1 + 144) = 2014; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); v5 = 0; *(_BYTE *)(a1 + 668) = 0; v6 = a1 + 151; v7 = client_errors[14]; LABEL_5: strncpy(v6, v7, 511LL); *(_BYTE *)(a1 + 662) = 0; return v5; } *((_BYTE *)v3 + 20) = 1; v3[1] = a2; v4 = my_context_continue(v3 + 14); *((_BYTE *)v3 + 20) = 0; if ( v4 <= 0 ) { *((_BYTE *)v3 + 21) = 0; v5 = 0; if ( v4 >= 0 ) return v5; *(_DWORD *)(a1 + 144) = 2008; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); v5 = 0; *(_BYTE *)(a1 + 668) = 0; v6 = a1 + 151; v7 = client_errors[8]; goto LABEL_5; } return *v3; }
mysql_close_slow_part_cont: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x480] MOV R14,qword ptr [RAX + 0x28] CMP byte ptr [R14 + 0x15],0x0 JZ 0x0012d6bf MOV byte ptr [R14 + 0x14],0x1 MOV dword ptr [R14 + 0x4],ESI LEA RDI,[R14 + 0x38] CALL 0x00131297 MOV byte ptr [R14 + 0x14],0x0 TEST EAX,EAX JLE 0x0012d713 MOV R14D,dword ptr [R14] JMP 0x0012d71f LAB_0012d6bf: MOV dword ptr [RBX + 0x90],0x7de LEA RDI,[RBX + 0x297] LEA RAX,[0x14ed90] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x29c],R14B LEA RDI,[RBX + 0x97] LEA RAX,[0x14eda0] MOV RSI,qword ptr [RAX + 0x70] LAB_0012d700: MOV EDX,0x1ff CALL 0x00113220 MOV byte ptr [RBX + 0x296],R14B JMP 0x0012d71f LAB_0012d713: MOV byte ptr [R14 + 0x15],0x0 XOR R14D,R14D TEST EAX,EAX JS 0x0012d727 LAB_0012d71f: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_0012d727: MOV dword ptr [RBX + 0x90],0x7d8 LEA RDI,[RBX + 0x297] LEA RAX,[0x14ed90] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x29c],R14B LEA RDI,[RBX + 0x97] LEA RAX,[0x14eda0] MOV RSI,qword ptr [RAX + 0x40] JMP 0x0012d700
int4 mysql_close_slow_part_cont(long param_1,int4 param_2) { int4 *puVar1; int iVar2; char *__src; puVar1 = *(int4 **)(*(long *)(param_1 + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(param_1 + 0x90) = 0x7de; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; __src = PTR_s_Commands_out_of_sync__you_can_t_r_0014ee10; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_2; iVar2 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (0 < iVar2) { return *puVar1; } *(int1 *)((long)puVar1 + 0x15) = 0; if (-1 < iVar2) { return 0; } *(int4 *)(param_1 + 0x90) = 0x7d8; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; __src = PTR_s_Client_run_out_of_memory_0014ede0; } strncpy((char *)(param_1 + 0x97),__src,0x1ff); *(int1 *)(param_1 + 0x296) = 0; return 0; }
30,443
write_hook_for_undo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { DBUG_ASSERT(trn->trid != 0); trn->undo_lsn= *lsn; if (unlikely(LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn) == 0)) trn->first_undo_lsn= trn->undo_lsn | LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn); return 0; /* when we implement purging, we will specialize this hook: UNDO_PURGE records will additionally set trn->undo_purge_lsn */ }
O0
c
write_hook_for_undo: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) jmp 0x55da9 movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rcx movabsq $0xffffffffffffff, %rax # imm = 0xFFFFFFFFFFFFFF andq 0xa0(%rcx), %rax cmpq $0x0, %rax sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x55e1d movq -0x10(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rdx movabsq $-0x100000000000000, %rax # imm = 0xFF00000000000000 andq 0xa0(%rdx), %rax orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) xorl %eax, %eax popq %rbp retq nopw %cs:(%rax,%rax)
write_hook_for_undo: push rbp mov rbp, rsp mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 jmp short $+2 loc_55DA9: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+98h], rcx mov rcx, [rbp+var_10] mov rax, 0FFFFFFFFFFFFFFh and rax, [rcx+0A0h] cmp rax, 0 setz 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_55E1D mov rax, [rbp+var_10] mov rcx, [rax+98h] mov rdx, [rbp+var_10] mov rax, 0FF00000000000000h and rax, [rdx+0A0h] or rcx, rax mov rax, [rbp+var_10] mov [rax+0A0h], rcx loc_55E1D: xor eax, eax pop rbp retn
long long write_hook_for_undo(long long a1, long long a2, long long a3, _QWORD *a4) { *(_QWORD *)(a2 + 152) = *a4; if ( (*(_QWORD *)(a2 + 160) & 0xFFFFFFFFFFFFFFLL) == 0 ) *(_QWORD *)(a2 + 160) = *(_QWORD *)(a2 + 160) & 0xFF00000000000000LL | *(_QWORD *)(a2 + 152); return 0LL; }
write_hook_for_undo: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 JMP 0x00155da9 LAB_00155da9: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,0xffffffffffffff AND RAX,qword ptr [RCX + 0xa0] CMP RAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00155e1d MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x98] MOV RDX,qword ptr [RBP + -0x10] MOV RAX,-0x100000000000000 AND RAX,qword ptr [RDX + 0xa0] OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX LAB_00155e1d: XOR EAX,EAX POP RBP RET
int8 write_hook_for_undo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { *(int8 *)(param_2 + 0x98) = *param_4; if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0x98) | *(ulong *)(param_2 + 0xa0) & 0xff00000000000000; } return 0; }
30,444
mi_writeinfo
eloqsql/storage/myisam/mi_locking.c
int _mi_writeinfo(register MI_INFO *info, uint operation) { int error,olderror; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_writeinfo"); DBUG_PRINT("info",("operation: %u tot_locks: %u", operation, share->tot_locks)); error=0; if (share->tot_locks == 0) { olderror=my_errno; /* Remember last error */ if (operation) { /* Two threads can't be here */ share->state.process= share->last_process= share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; if ((error=mi_state_info_write(share->kfile, &share->state, 1))) olderror=my_errno; #ifdef _WIN32 if (myisam_flush) { if (share->file_map) my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC); mysql_file_sync(share->kfile, 0); mysql_file_sync(info->dfile, 0); } #endif } if (!(operation & WRITEINFO_NO_UNLOCK) && my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF, MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error) DBUG_RETURN(1); my_errno=olderror; } else if (operation) share->changed= 1; /* Mark keyfile changed */ DBUG_RETURN(error); }
O0
c
mi_writeinfo: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x3d50c movl $0x0, -0x18(%rbp) movq -0x28(%rbp), %rax cmpl $0x0, 0x368(%rax) jne 0x3d61d callq 0x8d620 movl (%rax), %eax movl %eax, -0x1c(%rbp) cmpl $0x0, -0x14(%rbp) je 0x3d5c9 movq -0x28(%rbp), %rax movq 0x300(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x308(%rax) movq -0x28(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movq 0x150(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x158(%rax) movq -0x28(%rbp), %rax movq %rcx, 0x70(%rax) movq -0x10(%rbp), %rax movq 0x160(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x160(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x168(%rax) movq -0x28(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x28(%rbp), %rax movl 0x350(%rax), %edi movq -0x28(%rbp), %rsi movl $0x1, %edx callq 0x433a0 movl %eax, -0x18(%rbp) cmpl $0x0, %eax je 0x3d5c7 callq 0x8d620 movl (%rax), %eax movl %eax, -0x1c(%rbp) jmp 0x3d5c9 movl -0x14(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x3d60b movq -0x28(%rbp), %rax movl 0x350(%rax), %edi movl $0x2, %esi xorl %eax, %eax movl %eax, %ecx movl $0x30, %r8d movq %rcx, %rdx callq 0x8a600 cmpl $0x0, %eax je 0x3d60b cmpl $0x0, -0x18(%rbp) jne 0x3d60b jmp 0x3d602 movl $0x1, -0x4(%rbp) jmp 0x3d638 movl -0x1c(%rbp), %eax movl %eax, -0x2c(%rbp) callq 0x8d620 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) jmp 0x3d630 cmpl $0x0, -0x14(%rbp) je 0x3d62e movq -0x28(%rbp), %rax movb $0x1, 0x37f(%rax) jmp 0x3d630 jmp 0x3d632 movl -0x18(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_writeinfo: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax jmp short $+2 loc_3D50C: mov [rbp+var_18], 0 mov rax, [rbp+var_28] cmp dword ptr [rax+368h], 0 jnz loc_3D61D call _my_thread_var mov eax, [rax] mov [rbp+var_1C], eax cmp [rbp+var_14], 0 jz loc_3D5C9 mov rax, [rbp+var_28] mov rcx, [rax+300h] mov rax, [rbp+var_28] mov [rax+308h], rcx mov rax, [rbp+var_28] mov [rax+68h], rcx mov rax, [rbp+var_10] mov rcx, [rax+150h] mov rax, [rbp+var_10] mov [rax+158h], rcx mov rax, [rbp+var_28] mov [rax+70h], rcx mov rax, [rbp+var_10] mov rcx, [rax+160h] add rcx, 1 mov [rax+160h], rcx mov rax, [rbp+var_10] mov [rax+168h], rcx mov rax, [rbp+var_28] mov [rax+78h], rcx mov rax, [rbp+var_28] mov edi, [rax+350h] mov rsi, [rbp+var_28] mov edx, 1 call mi_state_info_write mov [rbp+var_18], eax cmp eax, 0 jz short loc_3D5C7 call _my_thread_var mov eax, [rax] mov [rbp+var_1C], eax loc_3D5C7: jmp short $+2 loc_3D5C9: mov eax, [rbp+var_14] and eax, 2 cmp eax, 0 jnz short loc_3D60B mov rax, [rbp+var_28] mov edi, [rax+350h] mov esi, 2 xor eax, eax mov ecx, eax mov r8d, 30h ; '0' mov rdx, rcx call my_lock cmp eax, 0 jz short loc_3D60B cmp [rbp+var_18], 0 jnz short loc_3D60B jmp short $+2 loc_3D602: mov [rbp+var_4], 1 jmp short loc_3D638 loc_3D60B: mov eax, [rbp+var_1C] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx jmp short loc_3D630 loc_3D61D: cmp [rbp+var_14], 0 jz short loc_3D62E mov rax, [rbp+var_28] mov byte ptr [rax+37Fh], 1 loc_3D62E: jmp short $+2 loc_3D630: jmp short $+2 loc_3D632: mov eax, [rbp+var_18] mov [rbp+var_4], eax loc_3D638: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_writeinfo(_QWORD *a1, const char *a2) { long long v2; // rcx long long v3; // rcx long long v4; // rcx long long v6; // [rsp+8h] [rbp-28h] int v7; // [rsp+14h] [rbp-1Ch] unsigned int v8; // [rsp+18h] [rbp-18h] char v9; // [rsp+1Ch] [rbp-14h] v9 = (char)a2; v6 = *a1; v8 = 0; if ( *(_DWORD *)(*a1 + 872LL) ) { if ( (_DWORD)a2 ) *(_BYTE *)(v6 + 895) = 1; return v8; } v7 = *(_DWORD *)my_thread_var(a1, a2); if ( (_DWORD)a2 ) { v2 = *(_QWORD *)(v6 + 768); *(_QWORD *)(v6 + 776) = v2; *(_QWORD *)(v6 + 104) = v2; v3 = a1[42]; a1[43] = v3; *(_QWORD *)(v6 + 112) = v3; v4 = a1[44] + 1LL; a1[44] = v4; a1[45] = v4; *(_QWORD *)(v6 + 120) = v4; a1 = (_QWORD *)*(unsigned int *)(v6 + 848); a2 = (const char *)v6; v8 = mi_state_info_write(a1, v6, 1LL); if ( v8 ) v7 = *(_DWORD *)my_thread_var(a1, (const char *)v6); } if ( (v9 & 2) != 0 || (a1 = (_QWORD *)*(unsigned int *)(v6 + 848), a2 = (_BYTE *)(&dword_0 + 2), !(unsigned int)my_lock(a1, 2LL, 0LL, 0LL, 48LL)) || v8 ) { *(_DWORD *)my_thread_var(a1, a2) = v7; return v8; } return 1; }
_mi_writeinfo: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x0013d50c LAB_0013d50c: MOV dword ptr [RBP + -0x18],0x0 MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x0013d61d CALL 0x0018d620 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0013d5c9 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x300] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x308],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x68],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x150] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x158],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x160] ADD RCX,0x1 MOV qword ptr [RAX + 0x160],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x168],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RBP + -0x28] MOV EDI,dword ptr [RAX + 0x350] MOV RSI,qword ptr [RBP + -0x28] MOV EDX,0x1 CALL 0x001433a0 MOV dword ptr [RBP + -0x18],EAX CMP EAX,0x0 JZ 0x0013d5c7 CALL 0x0018d620 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX LAB_0013d5c7: JMP 0x0013d5c9 LAB_0013d5c9: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0013d60b MOV RAX,qword ptr [RBP + -0x28] MOV EDI,dword ptr [RAX + 0x350] MOV ESI,0x2 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x30 MOV RDX,RCX CALL 0x0018a600 CMP EAX,0x0 JZ 0x0013d60b CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0013d60b JMP 0x0013d602 LAB_0013d602: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013d638 LAB_0013d60b: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x2c],EAX CALL 0x0018d620 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX JMP 0x0013d630 LAB_0013d61d: CMP dword ptr [RBP + -0x14],0x0 JZ 0x0013d62e MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x37f],0x1 LAB_0013d62e: JMP 0x0013d630 LAB_0013d630: JMP 0x0013d632 LAB_0013d632: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x4],EAX LAB_0013d638: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int _mi_writeinfo(long *param_1,uint param_2) { long lVar1; int iVar2; int4 *puVar3; long lVar4; int4 local_24; int local_20; lVar1 = *param_1; local_20 = 0; if (*(int *)(lVar1 + 0x368) == 0) { puVar3 = (int4 *)_my_thread_var(); local_24 = *puVar3; if (param_2 != 0) { *(int8 *)(lVar1 + 0x308) = *(int8 *)(lVar1 + 0x300); *(int8 *)(lVar1 + 0x68) = *(int8 *)(lVar1 + 0x300); param_1[0x2b] = param_1[0x2a]; *(long *)(lVar1 + 0x70) = param_1[0x2a]; lVar4 = param_1[0x2c] + 1; param_1[0x2c] = lVar4; param_1[0x2d] = lVar4; *(long *)(lVar1 + 0x78) = lVar4; local_20 = mi_state_info_write(*(int4 *)(lVar1 + 0x350),lVar1,1); if (local_20 != 0) { puVar3 = (int4 *)_my_thread_var(); local_24 = *puVar3; } } if ((((param_2 & 2) == 0) && (iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x30), iVar2 != 0)) && (local_20 == 0) ) { return 1; } puVar3 = (int4 *)_my_thread_var(); *puVar3 = local_24; } else if (param_2 != 0) { *(int1 *)(lVar1 + 0x37f) = 1; } return local_20; }
30,445
my_bitmap_free
eloqsql/mysys/my_bitmap.c
void my_bitmap_free(MY_BITMAP *map) { DBUG_ENTER("my_bitmap_free"); if (map->bitmap) { if (map->mutex) mysql_mutex_destroy(map->mutex); my_free(map->bitmap); map->bitmap=0; } DBUG_VOID_RETURN; }
O0
c
my_bitmap_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0xee0d5 movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0xee0be movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0xee0e0 movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0xf3bb0 movq -0x8(%rbp), %rax movq $0x0, (%rax) jmp 0xee0d7 jmp 0xee0d9 addq $0x10, %rsp popq %rbp retq nop
my_bitmap_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_EE0D5 mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_EE0BE mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_destroy_8 loc_EE0BE: mov rax, [rbp+var_8] mov rdi, [rax] call my_free mov rax, [rbp+var_8] mov qword ptr [rax], 0 loc_EE0D5: jmp short $+2 loc_EE0D7: jmp short $+2 loc_EE0D9: add rsp, 10h pop rbp retn
_QWORD * my_bitmap_free(_QWORD *a1) { _QWORD *result; // rax result = a1; if ( *a1 ) { if ( a1[2] ) inline_mysql_mutex_destroy_8(a1[2]); my_free(*a1); result = a1; *a1 = 0LL; } return result; }
my_bitmap_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001ee0d5 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001ee0be MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001ee0e0 LAB_001ee0be: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] CALL 0x001f3bb0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 LAB_001ee0d5: JMP 0x001ee0d7 LAB_001ee0d7: JMP 0x001ee0d9 LAB_001ee0d9: ADD RSP,0x10 POP RBP RET
void my_bitmap_free(long *param_1) { if (*param_1 != 0) { if (param_1[2] != 0) { inline_mysql_mutex_destroy(param_1[2]); } my_free(*param_1); *param_1 = 0; } return; }
30,446
wqueue_add_and_wait
eloqsql/mysys/wqueue.c
void wqueue_add_and_wait(WQUEUE *wqueue, struct st_my_thread_var *thread, mysql_mutex_t *lock) { DBUG_ENTER("wqueue_add_and_wait"); DBUG_PRINT("enter", ("thread: %p cond: %p mutex: %p", thread, &thread->suspend, lock)); wqueue_add_to_queue(wqueue, thread); do { DBUG_PRINT("info", ("wait... cond: %p mutex: %p", &thread->suspend, lock)); mysql_cond_wait(&thread->suspend, lock); DBUG_PRINT("info", ("wait done cond: %p mutex: %p next: %p", &thread->suspend, lock, thread->next)); } while (thread->next); DBUG_VOID_RETURN; }
O0
c
wqueue_add_and_wait: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0xff956 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xff620 jmp 0xff965 jmp 0xff967 movq -0x10(%rbp), %rdi addq $0x8, %rdi movq -0x18(%rbp), %rsi leaq 0x54e86(%rip), %rdx # 0x154800 movl $0xeb, %ecx callq 0xff9a0 jmp 0xff986 jmp 0xff988 movq -0x10(%rbp), %rax cmpq $0x0, 0x88(%rax) jne 0xff963 jmp 0xff998 jmp 0xff99a addq $0x20, %rsp popq %rbp retq
wqueue_add_and_wait: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_FF956: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call wqueue_add_to_queue loc_FF963: jmp short $+2 loc_FF965: jmp short $+2 loc_FF967: mov rdi, [rbp+var_10] add rdi, 8 mov rsi, [rbp+var_18] lea rdx, aWorkspaceLlm4b_42; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0EBh call inline_mysql_cond_wait_5 jmp short $+2 loc_FF986: jmp short $+2 loc_FF988: mov rax, [rbp+var_10] cmp qword ptr [rax+88h], 0 jnz short loc_FF963 jmp short $+2 loc_FF998: jmp short $+2 loc_FF99A: add rsp, 20h pop rbp retn
long long wqueue_add_and_wait(_QWORD *a1, long long a2, long long a3) { long long result; // rax wqueue_add_to_queue(a1, a2); do { inline_mysql_cond_wait_5(a2 + 8, a3, "/workspace/llm4binary/github2025/eloqsql/mysys/wqueue.c", 235LL); result = a2; } while ( *(_QWORD *)(a2 + 136) ); return result; }
wqueue_add_and_wait: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x001ff956 LAB_001ff956: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001ff620 LAB_001ff963: JMP 0x001ff965 LAB_001ff965: JMP 0x001ff967 LAB_001ff967: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x18] LEA RDX,[0x254800] MOV ECX,0xeb CALL 0x001ff9a0 JMP 0x001ff986 LAB_001ff986: JMP 0x001ff988 LAB_001ff988: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x88],0x0 JNZ 0x001ff963 JMP 0x001ff998 LAB_001ff998: JMP 0x001ff99a LAB_001ff99a: ADD RSP,0x20 POP RBP RET
void wqueue_add_and_wait(int8 param_1,long param_2,int8 param_3) { wqueue_add_to_queue(param_1,param_2); do { inline_mysql_cond_wait (param_2 + 8,param_3,"/workspace/llm4binary/github2025/eloqsql/mysys/wqueue.c",0xeb); } while (*(long *)(param_2 + 0x88) != 0); return; }
30,447
my_thread_global_end
eloqsql/mysys/my_thr_init.c
void my_thread_global_end(void) { struct timespec abstime; my_bool all_threads_killed= 1; set_timespec(abstime, my_thread_end_wait_time); mysql_mutex_lock(&THR_LOCK_threads); while (THR_thread_count > 0) { int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads, &abstime); if (error == ETIMEDOUT || error == ETIME) { #ifdef HAVE_PTHREAD_KILL /* We shouldn't give an error here, because if we don't have pthread_kill(), programs like mysqld can't ensure that all threads are killed when we enter here. */ if (THR_thread_count) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); #endif all_threads_killed= 0; break; } } mysql_mutex_unlock(&THR_LOCK_threads); my_thread_destroy_common_mutex(); /* Only destroy the mutex & conditions if we don't have other threads around that could use them. */ if (all_threads_killed) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done= 0; }
O0
c
my_thread_global_end: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb $0x1, -0x11(%rbp) callq 0xf00a0 movq %rax, -0x28(%rbp) imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8 leaq 0x1c9944(%rip), %rcx # 0x2bfc48 movl (%rcx), %ecx imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00 addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x8(%rbp) leaq 0xb8d1e9(%rip), %rdi # 0xc83528 leaq 0x5e2bb(%rip), %rsi # 0x154601 movl $0xce, %edx callq 0xf63f0 leaq 0xb8cfd1(%rip), %rax # 0xc83328 cmpl $0x0, (%rax) jbe 0xf63c4 leaq 0xb8d255(%rip), %rdi # 0xc835b8 leaq 0xb8d1be(%rip), %rsi # 0xc83528 leaq -0x10(%rbp), %rdx leaq 0x5e28c(%rip), %rcx # 0x154601 movl $0xd2, %r8d callq 0xf6460 movl %eax, -0x2c(%rbp) cmpl $0x6e, -0x2c(%rbp) je 0xf638f cmpl $0x3e, -0x2c(%rbp) jne 0xf63c2 leaq 0xb8cf92(%rip), %rax # 0xc83328 cmpl $0x0, (%rax) je 0xf63bc movq 0x1c6c36(%rip), %rax # 0x2bcfd8 movq (%rax), %rdi leaq 0xb8cf7c(%rip), %rax # 0xc83328 movl (%rax), %edx leaq 0x5e289(%rip), %rsi # 0x15463e movb $0x0, %al callq 0x2a180 movb $0x0, -0x11(%rbp) jmp 0xf63c4 jmp 0xf6350 leaq 0xb8d15d(%rip), %rdi # 0xc83528 callq 0xf64e0 callq 0xf5dc0 cmpb $0x0, -0x11(%rbp) je 0xf63e0 callq 0xf5e70 movb $0x0, 0xb8d209(%rip) # 0xc835f0 addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_thread_global_end: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_11], 1 call my_hrtime mov [rbp+var_28], rax imul rax, [rbp+var_28], 3E8h lea rcx, my_thread_end_wait_time mov ecx, [rcx] imul rcx, 3B9ACA00h add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_10], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_8], rdx lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0CEh call inline_mysql_mutex_lock_26 loc_F6350: lea rax, THR_thread_count cmp dword ptr [rax], 0 jbe short loc_F63C4 lea rdi, THR_COND_threads lea rsi, THR_LOCK_threads lea rdx, [rbp+var_10] lea rcx, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 0D2h call inline_mysql_cond_timedwait_1 mov [rbp+var_2C], eax cmp [rbp+var_2C], 6Eh ; 'n' jz short loc_F638F cmp [rbp+var_2C], 3Eh ; '>' jnz short loc_F63C2 loc_F638F: lea rax, THR_thread_count cmp dword ptr [rax], 0 jz short loc_F63BC mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, THR_thread_count mov edx, [rax] lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"... mov al, 0 call _fprintf loc_F63BC: mov [rbp+var_11], 0 jmp short loc_F63C4 loc_F63C2: jmp short loc_F6350 loc_F63C4: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock_27 call my_thread_destroy_common_mutex cmp [rbp+var_11], 0 jz short loc_F63E0 call my_thread_destroy_internal_mutex loc_F63E0: mov cs:my_thread_global_init_done, 0 add rsp, 30h pop rbp retn
long long my_thread_global_end() { long long result; // rax int v1; // [rsp+4h] [rbp-2Ch] unsigned long long v2; // [rsp+10h] [rbp-20h] char v3; // [rsp+1Fh] [rbp-11h] _QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF v3 = 1; v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime(); v4[0] = v2 / 0x3B9ACA00; v4[1] = v2 % 0x3B9ACA00; inline_mysql_mutex_lock_26(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL); while ( THR_thread_count ) { v1 = inline_mysql_cond_timedwait_1( &THR_COND_threads, &THR_LOCK_threads, v4, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 210LL); if ( v1 == 110 || v1 == 62 ) { if ( THR_thread_count ) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); v3 = 0; break; } } inline_mysql_mutex_unlock_27(&THR_LOCK_threads); result = my_thread_destroy_common_mutex(); if ( v3 ) result = my_thread_destroy_internal_mutex(); my_thread_global_init_done = 0; return result; }
my_thread_global_end: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV byte ptr [RBP + -0x11],0x1 CALL 0x001f00a0 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x28],0x3e8 LEA RCX,[0x3bfc48] MOV ECX,dword ptr [RCX] IMUL RCX,RCX,0x3b9aca00 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x8],RDX LEA RDI,[0xd83528] LEA RSI,[0x254601] MOV EDX,0xce CALL 0x001f63f0 LAB_001f6350: LEA RAX,[0xd83328] CMP dword ptr [RAX],0x0 JBE 0x001f63c4 LEA RDI,[0xd835b8] LEA RSI,[0xd83528] LEA RDX,[RBP + -0x10] LEA RCX,[0x254601] MOV R8D,0xd2 CALL 0x001f6460 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x6e JZ 0x001f638f CMP dword ptr [RBP + -0x2c],0x3e JNZ 0x001f63c2 LAB_001f638f: LEA RAX,[0xd83328] CMP dword ptr [RAX],0x0 JZ 0x001f63bc MOV RAX,qword ptr [0x003bcfd8] MOV RDI,qword ptr [RAX] LEA RAX,[0xd83328] MOV EDX,dword ptr [RAX] LEA RSI,[0x25463e] MOV AL,0x0 CALL 0x0012a180 LAB_001f63bc: MOV byte ptr [RBP + -0x11],0x0 JMP 0x001f63c4 LAB_001f63c2: JMP 0x001f6350 LAB_001f63c4: LEA RDI,[0xd83528] CALL 0x001f64e0 CALL 0x001f5dc0 CMP byte ptr [RBP + -0x11],0x0 JZ 0x001f63e0 CALL 0x001f5e70 LAB_001f63e0: MOV byte ptr [0x00d835f0],0x0 ADD RSP,0x30 POP RBP RET
void my_thread_global_end(void) { bool bVar1; int iVar2; long lVar3; ulong local_18; ulong local_10; bVar1 = true; lVar3 = my_hrtime(); local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000; local_18 = local_10 / 1000000000; local_10 = local_10 % 1000000000; inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce); do { if (THR_thread_count == 0) goto LAB_001f63c4; iVar2 = inline_mysql_cond_timedwait (THR_COND_threads,THR_LOCK_threads,&local_18, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2); } while ((iVar2 != 0x6e) && (iVar2 != 0x3e)); if (THR_thread_count != 0) { fprintf(*(FILE **)PTR_stderr_003bcfd8, "Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count); } bVar1 = false; LAB_001f63c4: inline_mysql_mutex_unlock(THR_LOCK_threads); my_thread_destroy_common_mutex(); if (bVar1) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done = 0; return; }
30,448
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus) { static_assert(kAlpha >= -60, "internal error"); static_assert(kGamma <= -32, "internal error"); // Generates the digits (and the exponent) of a decimal floating-point // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. // // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // Grisu2 generates the digits of M+ from left to right and stops as soon as // V is in [M-,M+]. JSON_ASSERT(M_plus.e >= kAlpha); JSON_ASSERT(M_plus.e <= kGamma); std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): // // M+ = f * 2^e // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e // = ((p1 ) * 2^-e + (p2 )) * 2^e // = p1 + p2 * 2^e const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e // 1) // // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] JSON_ASSERT(p1 > 0); std::uint32_t pow10{}; const int k = find_largest_pow10(p1, pow10); // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) // // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) // // M+ = p1 + p2 * 2^e // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e // = d[k-1] * 10^(k-1) + ( rest) * 2^e // // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) // // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] // // but stop as soon as // // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e int n = k; while (n > 0) { // Invariants: // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) // pow10 = 10^(n-1) <= p1 < 10^n // const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) // // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) // p1 = r; n--; // // M+ = buffer * 10^n + (p1 + p2 * 2^e) // pow10 = 10^n // // Now check if enough digits have been generated. // Compute // // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e // // Note: // Since rest and delta share the same exponent e, it suffices to // compare the significands. const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; if (rest <= delta) { // V = buffer * 10^n, with M- <= V <= M+. decimal_exponent += n; // We may now just stop. But instead look if the buffer could be // decremented to bring V closer to w. // // pow10 = 10^n is now 1 ulp in the decimal representation V. // The rounding procedure works with diyfp's with an implicit // exponent of e. // // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e // const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; grisu2_round(buffer, length, dist, delta, rest, ten_n); return; } pow10 /= 10; // // pow10 = 10^(n-1) <= p1 < 10^n // Invariants restored. } // 2) // // The digits of the integral part have been generated: // // M+ = d[k-1]...d[1]d[0] + p2 * 2^e // = buffer + p2 * 2^e // // Now generate the digits of the fractional part p2 * 2^e. // // Note: // No decimal point is generated: the exponent is adjusted instead. // // p2 actually represents the fraction // // p2 * 2^e // = p2 / 2^-e // = d[-1] / 10^1 + d[-2] / 10^2 + ... // // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) // // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) // // using // // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) // = ( d) * 2^-e + ( r) // // or // 10^m * p2 * 2^e = d + r * 2^e // // i.e. // // M+ = buffer + p2 * 2^e // = buffer + 10^-m * (d + r * 2^e) // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e // // and stop as soon as 10^-m * r * 2^e <= delta * 2^e JSON_ASSERT(p2 > delta); int m = 0; for (;;) { // Invariant: // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e // = buffer * 10^-m + 10^-m * (p2 ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e // // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e // p2 = r; m++; // // M+ = buffer * 10^-m + 10^-m * p2 * 2^e // Invariant restored. // Check if enough digits have been generated. // // 10^-m * p2 * 2^e <= delta * 2^e // p2 * 2^e <= 10^m * delta * 2^e // p2 <= 10^m * delta delta *= 10; dist *= 10; if (p2 <= delta) { break; } } // V = buffer * 10^-m, with M- <= V <= M+. decimal_exponent -= m; // 1 ulp in the decimal representation is now 10^-m. // Since delta and dist are now scaled by 10^m, we need to do the // same with ulp in order to keep the units in sync. // // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e // const std::uint64_t ten_m = one.f; grisu2_round(buffer, length, dist, delta, p2, ten_m); // By construction this algorithm generates the shortest possible decimal // number (Loitsch, Theorem 6.2) which rounds back to w. // For an input number of precision p, at least // // N = 1 + ceil(p * log_10(2)) // // decimal digits are sufficient to identify all binary floating-point // numbers (Matula, "In-and-Out conversions"). // This implies that the algorithm does not produce more than N decimal // digits. // // N = 17 for p = 53 (IEEE double precision) // N = 9 for p = 24 (IEEE single precision) }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, 0x10(%rsp) movq %rcx, 0x38(%rsp) movl %r8d, 0x40(%rsp) movl 0x98(%rsp), %eax cmpl $-0x3d, %eax jle 0xbc649 movq %rsi, 0x18(%rsp) movq %rdi, 0x20(%rsp) cmpl $-0x1f, %eax jge 0xbc665 leaq 0x90(%rsp), %rbx leaq 0x80(%rsp), %r15 leaq 0x38(%rsp), %rsi movq %rbx, %rdi callq 0xbc6ba movq %rax, %r12 movq %rbx, %rdi movq %r15, %rsi callq 0xbc6ba xorl %r11d, %r11d subl 0x8(%rbx), %r11d movl $0x1, %esi movl %r11d, %ecx shlq %cl, %rsi movq (%rbx), %r13 movq %r13, %rdx shrq %cl, %rdx testl %edx, %edx je 0xbc681 movq %rax, %r15 movq %rsi, 0x28(%rsp) leaq -0x1(%rsi), %rax cmpl $0x3b9ac9ff, %edx # imm = 0x3B9AC9FF movq 0x20(%rsp), %rdi movq 0x18(%rsp), %r10 movq %rax, 0x8(%rsp) jbe 0xbc40e movl $0xa, %r14d movl $0x3b9aca00, %r8d # imm = 0x3B9ACA00 jmp 0xbc4bc cmpl $0x5f5e0ff, %edx # imm = 0x5F5E0FF jbe 0xbc427 movl $0x9, %r14d movl $0x5f5e100, %r8d # imm = 0x5F5E100 jmp 0xbc4bc cmpl $0x98967f, %edx # imm = 0x98967F jbe 0xbc43d movl $0x8, %r14d movl $0x989680, %r8d # imm = 0x989680 jmp 0xbc4bc cmpl $0xf423f, %edx # imm = 0xF423F jbe 0xbc453 movl $0x7, %r14d movl $0xf4240, %r8d # imm = 0xF4240 jmp 0xbc4bc cmpl $0x1869f, %edx # imm = 0x1869F jbe 0xbc469 movl $0x6, %r14d movl $0x186a0, %r8d # imm = 0x186A0 jmp 0xbc4bc cmpl $0x270f, %edx # imm = 0x270F jbe 0xbc47f movl $0x5, %r14d movl $0x2710, %r8d # imm = 0x2710 jmp 0xbc4bc cmpl $0x3e7, %edx # imm = 0x3E7 jbe 0xbc495 movl $0x4, %r14d movl $0x3e8, %r8d # imm = 0x3E8 jmp 0xbc4bc cmpl $0x63, %edx jbe 0xbc4a8 movl $0x3, %r14d movl $0x64, %r8d jmp 0xbc4bc xorl %r14d, %r14d cmpl $0xa, %edx setae %r14b leal (%r14,%r14,8), %r8d incl %r8d incl %r14d andq 0x8(%rsp), %r13 testl %r14d, %r14d jle 0xbc564 movl %edx, %eax xorl %edx, %edx divl %r8d cmpl $0xa, %eax jae 0xbc628 orb $0x30, %al movslq (%r10), %rsi leal 0x1(%rsi), %ecx movl %ecx, (%r10) movl %edx, %ebp movl %r11d, %ecx shlq %cl, %rbp movb %al, (%rdi,%rsi) addq %r13, %rbp movl %r8d, %r9d cmpq %r12, %rbp jbe 0xbc50d movl $0xcccccccd, %eax # imm = 0xCCCCCCCD imulq %rax, %r9 shrq $0x23, %r9 movl %r9d, %r8d jmp 0xbc556 movq 0x10(%rsp), %rcx movl (%rcx), %eax addl %r14d, %eax decl %eax movl %eax, (%rcx) movl %r11d, %ecx shlq %cl, %r9 movq %rdx, 0x30(%rsp) movl (%r10), %esi movq %r15, %rdx movq %r12, %rcx movl %r8d, 0x4(%rsp) movq %rbp, %r8 movq %r11, %rbx callq 0xbc704 movl 0x4(%rsp), %r8d movq 0x30(%rsp), %rdx movq %rbx, %r11 movq 0x18(%rsp), %r10 movq 0x20(%rsp), %rdi decl %r14d cmpq %r12, %rbp ja 0xbc4c1 jmp 0xbc5e1 cmpq %r12, %r13 jbe 0xbc69d xorl %eax, %eax movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A movq 0x8(%rsp), %r9 cmpq %rdx, %r13 jae 0xbc5f0 addq %r13, %r13 leaq (%r13,%r13,4), %r13 movq %r13, %rsi movl %r11d, %ecx shrq %cl, %rsi cmpq $0xa, %rsi jae 0xbc60c andq %r9, %r13 orb $0x30, %sil movslq (%r10), %rcx leal 0x1(%rcx), %r8d movl %r8d, (%r10) movb %sil, (%rdi,%rcx) addq %r12, %r12 leaq (%r12,%r12,4), %r12 addq %r15, %r15 leaq (%r15,%r15,4), %r15 decl %eax cmpq %r12, %r13 ja 0xbc57e movq 0x10(%rsp), %rcx addl %eax, (%rcx) movl (%r10), %esi movq %r15, %rdx movq %r12, %rcx movq %r13, %r8 movq 0x28(%rsp), %r9 callq 0xbc704 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x34cdc(%rip), %rdi # 0xf12d3 leaq 0x2ee1e(%rip), %rdx # 0xeb41c leaq 0x3a4af(%rip), %rcx # 0xf6ab4 movl $0x4505, %esi # imm = 0x4505 jmp 0xbc642 leaq 0x34cc0(%rip), %rdi # 0xf12d3 leaq 0x2ee02(%rip), %rdx # 0xeb41c leaq 0x3a481(%rip), %rcx # 0xf6aa2 movl $0x450e, %esi # imm = 0x450E jmp 0xbc642 leaq 0x34ca4(%rip), %rdi # 0xf12d3 leaq 0x2ede6(%rip), %rdx # 0xeb41c leaq 0x3a465(%rip), %rcx # 0xf6aa2 movl $0x44a3, %esi # imm = 0x44A3 xorl %eax, %eax callq 0x1c130 leaq 0x34c83(%rip), %rdi # 0xf12d3 leaq 0x2edc5(%rip), %rdx # 0xeb41c leaq 0x3a417(%rip), %rcx # 0xf6a75 movl $0x4469, %esi # imm = 0x4469 jmp 0xbc642 leaq 0x34c67(%rip), %rdi # 0xf12d3 leaq 0x2eda9(%rip), %rdx # 0xeb41c leaq 0x3a40e(%rip), %rcx # 0xf6a88 movl $0x446a, %esi # imm = 0x446A jmp 0xbc642 leaq 0x34c4b(%rip), %rdi # 0xf12d3 leaq 0x2ed8d(%rip), %rdx # 0xeb41c leaq 0x3a405(%rip), %rcx # 0xf6a9b movl $0x447f, %esi # imm = 0x447F jmp 0xbc642 leaq 0x34c2f(%rip), %rdi # 0xf12d3 leaq 0x2ed71(%rip), %rdx # 0xeb41c leaq 0x3a3f7(%rip), %rcx # 0xf6aa9 movl $0x44fa, %esi # imm = 0x44FA jmp 0xbc642 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_68], rdx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_38], r8d mov eax, [rsp+78h+arg_18] cmp eax, 0FFFFFFC3h jle loc_BC649 mov [rsp+78h+var_60], rsi mov [rsp+78h+var_58], rdi cmp eax, 0FFFFFFE1h jge loc_BC665 lea rbx, [rsp+78h+arg_10] lea r15, [rsp+78h+arg_0] lea rsi, [rsp+78h+var_40] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r12, rax mov rdi, rbx mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) xor r11d, r11d sub r11d, [rbx+8] mov esi, 1 mov ecx, r11d shl rsi, cl mov r13, [rbx] mov rdx, r13 shr rdx, cl test edx, edx jz loc_BC681 mov r15, rax mov [rsp+78h+var_50], rsi lea rax, [rsi-1] cmp edx, 3B9AC9FFh mov rdi, [rsp+78h+var_58]; this mov r10, [rsp+78h+var_60] mov [rsp+78h+var_70], rax jbe short loc_BC40E mov r14d, 0Ah mov r8d, 3B9ACA00h jmp loc_BC4BC loc_BC40E: cmp edx, 5F5E0FFh jbe short loc_BC427 mov r14d, 9 mov r8d, 5F5E100h jmp loc_BC4BC loc_BC427: cmp edx, 98967Fh jbe short loc_BC43D mov r14d, 8 mov r8d, 989680h jmp short loc_BC4BC loc_BC43D: cmp edx, 0F423Fh jbe short loc_BC453 mov r14d, 7 mov r8d, 0F4240h jmp short loc_BC4BC loc_BC453: cmp edx, 1869Fh jbe short loc_BC469 mov r14d, 6 mov r8d, 186A0h jmp short loc_BC4BC loc_BC469: cmp edx, 270Fh jbe short loc_BC47F mov r14d, 5 mov r8d, 2710h jmp short loc_BC4BC loc_BC47F: cmp edx, 3E7h jbe short loc_BC495 mov r14d, 4 mov r8d, 3E8h jmp short loc_BC4BC loc_BC495: cmp edx, 63h ; 'c' jbe short loc_BC4A8 mov r14d, 3 mov r8d, 64h ; 'd' jmp short loc_BC4BC loc_BC4A8: xor r14d, r14d cmp edx, 0Ah setnb r14b lea r8d, [r14+r14*8] inc r8d inc r14d loc_BC4BC: and r13, [rsp+78h+var_70] loc_BC4C1: test r14d, r14d jle loc_BC564 mov eax, edx xor edx, edx div r8d cmp eax, 0Ah jnb loc_BC628 or al, 30h movsxd rsi, dword ptr [r10] lea ecx, [rsi+1] mov [r10], ecx mov ebp, edx mov ecx, r11d shl rbp, cl mov [rdi+rsi], al add rbp, r13 mov r9d, r8d cmp rbp, r12 jbe short loc_BC50D mov eax, 0CCCCCCCDh imul r9, rax shr r9, 23h mov r8d, r9d jmp short loc_BC556 loc_BC50D: mov rcx, [rsp+78h+var_68] mov eax, [rcx] add eax, r14d dec eax mov [rcx], eax mov ecx, r11d shl r9, cl; unsigned __int64 mov [rsp+78h+var_48], rdx mov esi, [r10]; char * mov rdx, r15; int mov rcx, r12; unsigned __int64 mov [rsp+78h+var_74], r8d mov r8, rbp; unsigned __int64 mov rbx, r11 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) mov r8d, [rsp+78h+var_74] mov rdx, [rsp+78h+var_48] mov r11, rbx mov r10, [rsp+78h+var_60] mov rdi, [rsp+78h+var_58] loc_BC556: dec r14d cmp rbp, r12 ja loc_BC4C1 jmp short loc_BC5E1 loc_BC564: cmp r13, r12 jbe loc_BC69D xor eax, eax mov rdx, 199999999999999Ah mov r9, [rsp+78h+var_70] loc_BC57E: cmp r13, rdx jnb short loc_BC5F0 add r13, r13 lea r13, [r13+r13*4+0] mov rsi, r13 mov ecx, r11d shr rsi, cl cmp rsi, 0Ah jnb short loc_BC60C and r13, r9 or sil, 30h movsxd rcx, dword ptr [r10] lea r8d, [rcx+1] mov [r10], r8d mov [rdi+rcx], sil add r12, r12 lea r12, [r12+r12*4] add r15, r15 lea r15, [r15+r15*4] dec eax cmp r13, r12 ja short loc_BC57E mov rcx, [rsp+78h+var_68] add [rcx], eax mov esi, [r10]; char * mov rdx, r15; int mov rcx, r12; unsigned __int64 mov r8, r13; unsigned __int64 mov r9, [rsp+78h+var_50]; unsigned __int64 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) loc_BC5E1: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_BC5F0: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"... mov esi, 4505h jmp short loc_BC642 loc_BC60C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 450Eh jmp short loc_BC642 loc_BC628: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 44A3h loc_BC642: xor eax, eax call _ggml_abort loc_BC649: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKalpha; "M_plus.e >= kAlpha" mov esi, 4469h jmp short loc_BC642 loc_BC665: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKgamma; "M_plus.e <= kGamma" mov esi, 446Ah jmp short loc_BC642 loc_BC681: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP10; "p1 > 0" mov esi, 447Fh jmp short loc_BC642 loc_BC69D: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2Delta; "p2 > delta" mov esi, 44FAh jmp short loc_BC642
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a1, unsigned int *a2, _DWORD *a3, long long a4, int a5, long long a6, char a7, int a8, unsigned long long a9, int a10) { unsigned long long v10; // r12 int v11; // eax long long v12; // r11 unsigned long long v13; // rdx int v14; // r15d unsigned int *v15; // r10 int v16; // r14d unsigned int v17; // r8d BOOL v18; // r14d unsigned long long v19; // r13 unsigned int v20; // eax unsigned int v21; // eax long long v22; // rsi unsigned long long v23; // rbp long long result; // rax long long v25; // rbx int v26; // eax unsigned long long v27; // r13 unsigned long long v28; // rsi long long v29; // rcx unsigned long long v30; // [rsp+0h] [rbp-78h] long long v31; // [rsp+8h] [rbp-70h] nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v34; // [rsp+20h] [rbp-58h] long long v35; // [rsp+28h] [rbp-50h] int v36; // [rsp+30h] [rbp-48h] long long v37; // [rsp+38h] [rbp-40h] BYREF int v38; // [rsp+40h] [rbp-38h] v37 = a4; v38 = a5; if ( a10 <= -61 ) goto LABEL_38; v34 = a1; if ( a10 >= -31 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17514LL, "GGML_ASSERT(%s) failed", "M_plus.e <= kGamma"); goto LABEL_38; } v10 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v37); v11 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7); v12 = (unsigned int)-a10; v13 = a9 >> -(char)a10; if ( !(_DWORD)v13 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17535LL, "GGML_ASSERT(%s) failed", "p1 > 0"); goto LABEL_38; } v14 = v11; v35 = 1LL << -(char)a10; v15 = a2; v31 = v35 - 1; if ( (unsigned int)v13 <= 0x3B9AC9FF ) { if ( (unsigned int)v13 <= 0x5F5E0FF ) { if ( (unsigned int)v13 <= 0x98967F ) { if ( (unsigned int)v13 <= 0xF423F ) { if ( (unsigned int)v13 <= 0x1869F ) { if ( (unsigned int)v13 <= 0x270F ) { if ( (unsigned int)v13 <= 0x3E7 ) { if ( (unsigned int)v13 <= 0x63 ) { v18 = (unsigned int)v13 >= 0xA; v17 = 9 * v18 + 1; v16 = v18 + 1; } else { v16 = 3; v17 = 100; } } else { v16 = 4; v17 = 1000; } } else { v16 = 5; v17 = 10000; } } else { v16 = 6; v17 = 100000; } } else { v16 = 7; v17 = 1000000; } } else { v16 = 8; v17 = 10000000; } } else { v16 = 9; v17 = 100000000; } } else { v16 = 10; v17 = 1000000000; } v19 = v31 & a9; do { if ( v16 <= 0 ) { if ( v19 <= v10 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17658LL, "GGML_ASSERT(%s) failed", "p2 > delta"); goto LABEL_38; } v26 = 0; while ( v19 < 0x199999999999999ALL ) { v27 = 10 * v19; v28 = v27 >> v12; if ( v27 >> v12 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17678LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_38; } v19 = v31 & v27; v29 = (int)*v15; *v15 = v29 + 1; *((_BYTE *)a1 + v29) = v28 | 0x30; v10 *= 10LL; v14 *= 10; --v26; if ( v19 <= v10 ) { *a3 += v26; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(a1, (char *)*v15, v14, v10, v19, v35, v30); } } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17669LL, "GGML_ASSERT(%s) failed", "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"); while ( 1 ) LABEL_38: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17513LL, "GGML_ASSERT(%s) failed", "M_plus.e >= kAlpha"); } v20 = v13; LODWORD(v13) = (unsigned int)v13 % v17; v21 = v20 / v17; if ( v21 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17571LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_38; } v22 = (int)*v15; *v15 = v22 + 1; *((_BYTE *)a1 + v22) = v21 | 0x30; v23 = v19 + ((unsigned long long)(unsigned int)v13 << v12); if ( v23 <= v10 ) { *a3 = v16 + *a3 - 1; v36 = v13; HIDWORD(v30) = v17; v25 = v12; result = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( a1, (char *)*v15, v14, v10, v23, (unsigned long long)v17 << v12, v30); v17 = HIDWORD(v30); LODWORD(v13) = v36; v12 = v25; v15 = a2; a1 = v34; } else { result = 3435973837LL; v17 /= 0xAu; } --v16; } while ( v23 > v10 ); return result; }
grisu2_digit_gen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x38],RCX MOV dword ptr [RSP + 0x40],R8D MOV EAX,dword ptr [RSP + 0x98] CMP EAX,-0x3d JLE 0x001bc649 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDI CMP EAX,-0x1f JGE 0x001bc665 LEA RBX,[RSP + 0x90] LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x38] MOV RDI,RBX CALL 0x001bc6ba MOV R12,RAX MOV RDI,RBX MOV RSI,R15 CALL 0x001bc6ba XOR R11D,R11D SUB R11D,dword ptr [RBX + 0x8] MOV ESI,0x1 MOV ECX,R11D SHL RSI,CL MOV R13,qword ptr [RBX] MOV RDX,R13 SHR RDX,CL TEST EDX,EDX JZ 0x001bc681 MOV R15,RAX MOV qword ptr [RSP + 0x28],RSI LEA RAX,[RSI + -0x1] CMP EDX,0x3b9ac9ff MOV RDI,qword ptr [RSP + 0x20] MOV R10,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX JBE 0x001bc40e MOV R14D,0xa MOV R8D,0x3b9aca00 JMP 0x001bc4bc LAB_001bc40e: CMP EDX,0x5f5e0ff JBE 0x001bc427 MOV R14D,0x9 MOV R8D,0x5f5e100 JMP 0x001bc4bc LAB_001bc427: CMP EDX,0x98967f JBE 0x001bc43d MOV R14D,0x8 MOV R8D,0x989680 JMP 0x001bc4bc LAB_001bc43d: CMP EDX,0xf423f JBE 0x001bc453 MOV R14D,0x7 MOV R8D,0xf4240 JMP 0x001bc4bc LAB_001bc453: CMP EDX,0x1869f JBE 0x001bc469 MOV R14D,0x6 MOV R8D,0x186a0 JMP 0x001bc4bc LAB_001bc469: CMP EDX,0x270f JBE 0x001bc47f MOV R14D,0x5 MOV R8D,0x2710 JMP 0x001bc4bc LAB_001bc47f: CMP EDX,0x3e7 JBE 0x001bc495 MOV R14D,0x4 MOV R8D,0x3e8 JMP 0x001bc4bc LAB_001bc495: CMP EDX,0x63 JBE 0x001bc4a8 MOV R14D,0x3 MOV R8D,0x64 JMP 0x001bc4bc LAB_001bc4a8: XOR R14D,R14D CMP EDX,0xa SETNC R14B LEA R8D,[R14 + R14*0x8] INC R8D INC R14D LAB_001bc4bc: AND R13,qword ptr [RSP + 0x8] LAB_001bc4c1: TEST R14D,R14D JLE 0x001bc564 MOV EAX,EDX XOR EDX,EDX DIV R8D CMP EAX,0xa JNC 0x001bc628 OR AL,0x30 MOVSXD RSI,dword ptr [R10] LEA ECX,[RSI + 0x1] MOV dword ptr [R10],ECX MOV EBP,EDX MOV ECX,R11D SHL RBP,CL MOV byte ptr [RDI + RSI*0x1],AL ADD RBP,R13 MOV R9D,R8D CMP RBP,R12 JBE 0x001bc50d MOV EAX,0xcccccccd IMUL R9,RAX SHR R9,0x23 MOV R8D,R9D JMP 0x001bc556 LAB_001bc50d: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RCX] ADD EAX,R14D DEC EAX MOV dword ptr [RCX],EAX MOV ECX,R11D SHL R9,CL MOV qword ptr [RSP + 0x30],RDX MOV ESI,dword ptr [R10] MOV RDX,R15 MOV RCX,R12 MOV dword ptr [RSP + 0x4],R8D MOV R8,RBP MOV RBX,R11 CALL 0x001bc704 MOV R8D,dword ptr [RSP + 0x4] MOV RDX,qword ptr [RSP + 0x30] MOV R11,RBX MOV R10,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x20] LAB_001bc556: DEC R14D CMP RBP,R12 JA 0x001bc4c1 JMP 0x001bc5e1 LAB_001bc564: CMP R13,R12 JBE 0x001bc69d XOR EAX,EAX MOV RDX,0x199999999999999a MOV R9,qword ptr [RSP + 0x8] LAB_001bc57e: CMP R13,RDX JNC 0x001bc5f0 ADD R13,R13 LEA R13,[R13 + R13*0x4] MOV RSI,R13 MOV ECX,R11D SHR RSI,CL CMP RSI,0xa JNC 0x001bc60c AND R13,R9 OR SIL,0x30 MOVSXD RCX,dword ptr [R10] LEA R8D,[RCX + 0x1] MOV dword ptr [R10],R8D MOV byte ptr [RDI + RCX*0x1],SIL ADD R12,R12 LEA R12,[R12 + R12*0x4] ADD R15,R15 LEA R15,[R15 + R15*0x4] DEC EAX CMP R13,R12 JA 0x001bc57e MOV RCX,qword ptr [RSP + 0x10] ADD dword ptr [RCX],EAX MOV ESI,dword ptr [R10] MOV RDX,R15 MOV RCX,R12 MOV R8,R13 MOV R9,qword ptr [RSP + 0x28] CALL 0x001bc704 LAB_001bc5e1: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001bc5f0: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6ab4] MOV ESI,0x4505 JMP 0x001bc642 LAB_001bc60c: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6aa2] MOV ESI,0x450e JMP 0x001bc642 LAB_001bc628: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6aa2] MOV ESI,0x44a3 LAB_001bc642: XOR EAX,EAX CALL 0x0011c130 LAB_001bc649: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6a75] MOV ESI,0x4469 JMP 0x001bc642 LAB_001bc665: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6a88] MOV ESI,0x446a JMP 0x001bc642 LAB_001bc681: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6a9b] MOV ESI,0x447f JMP 0x001bc642 LAB_001bc69d: LEA RDI,[0x1f12d3] LEA RDX,[0x1eb41c] LEA RCX,[0x1f6aa9] MOV ESI,0x44fa JMP 0x001bc642
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen (char *param_1,int *param_2,int *param_3,int8 param_4,int4 param_5) { ulong uVar1; int iVar2; ulong uVar3; ulong uVar4; byte bVar5; char *pcVar6; uint uVar7; ulong uVar8; ulong uVar9; ulong uVar10; int8 uVar11; uint uVar12; ulong uVar13; int iVar14; ulong in_stack_00000018; int in_stack_00000020; int8 local_40; int4 local_38; local_40 = param_4; local_38 = param_5; if (in_stack_00000020 < -0x3c) { pcVar6 = "M_plus.e >= kAlpha"; uVar11 = 0x4469; } else if (in_stack_00000020 < -0x1f) { uVar3 = diyfp::sub((diyfp *)&stack0x00000018,(diyfp *)&local_40); uVar4 = diyfp::sub((diyfp *)&stack0x00000018,&stack0x00000008); bVar5 = -(char)in_stack_00000020; uVar10 = 1L << (bVar5 & 0x3f); uVar8 = in_stack_00000018 >> (bVar5 & 0x3f); uVar7 = (uint)uVar8; if (uVar7 == 0) { pcVar6 = "p1 > 0"; uVar11 = 0x447f; } else { uVar1 = uVar10 - 1; if (uVar7 < 1000000000) { if (uVar7 < 100000000) { if (uVar7 < 10000000) { if (uVar7 < 1000000) { if (uVar7 < 100000) { if (uVar7 < 10000) { if (uVar7 < 1000) { if (uVar7 < 100) { uVar12 = (uint)(9 < uVar7) * 9 + 1; iVar14 = (9 < uVar7) + 1; } else { iVar14 = 3; uVar12 = 100; } } else { iVar14 = 4; uVar12 = 1000; } } else { iVar14 = 5; uVar12 = 10000; } } else { iVar14 = 6; uVar12 = 100000; } } else { iVar14 = 7; uVar12 = 1000000; } } else { iVar14 = 8; uVar12 = 10000000; } } else { iVar14 = 9; uVar12 = 100000000; } } else { iVar14 = 10; uVar12 = 1000000000; } uVar13 = in_stack_00000018 & uVar1; while (0 < iVar14) { uVar9 = (uVar8 & 0xffffffff) / (ulong)uVar12; uVar8 = (uVar8 & 0xffffffff) % (ulong)uVar12; if (9 < (uint)uVar9) { pcVar6 = "d <= 9"; uVar11 = 0x44a3; goto LAB_001bc642; } iVar2 = *param_2; *param_2 = iVar2 + 1; param_1[iVar2] = (byte)uVar9 | 0x30; uVar9 = (uVar8 << (bVar5 & 0x3f)) + uVar13; if (uVar3 < uVar9) { uVar12 = uVar12 / 10; } else { *param_3 = *param_3 + iVar14 + -1; grisu2_round(param_1,*param_2,uVar4,uVar3,uVar9,(ulong)uVar12 << (bVar5 & 0x3f)); } iVar14 = iVar14 + -1; if (uVar9 <= uVar3) { return; } } if (uVar3 < uVar13) { iVar14 = 0; while( true ) { if (0x1999999999999999 < uVar13) { pcVar6 = "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"; uVar11 = 0x4505; goto LAB_001bc642; } uVar8 = uVar13 * 10 >> (bVar5 & 0x3f); if (9 < uVar8) break; uVar13 = uVar13 * 10 & uVar1; iVar2 = *param_2; *param_2 = iVar2 + 1; param_1[iVar2] = (byte)uVar8 | 0x30; uVar3 = uVar3 * 10; uVar4 = uVar4 * 10; iVar14 = iVar14 + -1; if (uVar13 <= uVar3) { *param_3 = *param_3 + iVar14; grisu2_round(param_1,*param_2,uVar4,uVar3,uVar13,uVar10); return; } } pcVar6 = "d <= 9"; uVar11 = 0x450e; } else { pcVar6 = "p2 > delta"; uVar11 = 0x44fa; } } } else { pcVar6 = "M_plus.e <= kGamma"; uVar11 = 0x446a; } LAB_001bc642: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar11, "GGML_ASSERT(%s) failed",pcVar6); }
30,449
ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/dom/bold.cpp
void Render(Screen& screen) override { for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { screen.PixelAt(x, y).bold = true; } } Node::Render(screen); }
O0
cpp
ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movl 0x54(%rax), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rcx movl -0x14(%rbp), %eax cmpl 0x58(%rcx), %eax jg 0x7f721 movq -0x20(%rbp), %rax movl 0x4c(%rax), %eax movl %eax, -0x18(%rbp) movq -0x20(%rbp), %rcx movl -0x18(%rbp), %eax cmpl 0x50(%rcx), %eax jg 0x7f714 movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi movl -0x14(%rbp), %edx callq 0x882f0 movb (%rax), %cl andb $-0x3, %cl orb $0x2, %cl movb %cl, (%rax) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0x7f6e4 jmp 0x7f716 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x7f6ce movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x446a0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN5ftxui12_GLOBAL__N_14Bold6RenderERNS_6ScreenE: 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_20], rax mov eax, [rax+54h] mov [rbp+var_14], eax loc_7F6CE: mov rcx, [rbp+var_20] mov eax, [rbp+var_14] cmp eax, [rcx+58h] jg short loc_7F721 mov rax, [rbp+var_20] mov eax, [rax+4Ch] mov [rbp+var_18], eax loc_7F6E4: mov rcx, [rbp+var_20] mov eax, [rbp+var_18] cmp eax, [rcx+50h] jg short loc_7F714 mov rdi, [rbp+var_10]; this mov esi, [rbp+var_18]; int mov edx, [rbp+var_14]; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov cl, [rax] and cl, 0FDh or cl, 2 mov [rax], cl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_7F6E4 loc_7F714: jmp short $+2 loc_7F716: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax jmp short loc_7F6CE loc_7F721: mov rdi, [rbp+var_20]; this mov rsi, [rbp+var_10]; ftxui::Screen * call _ZN5ftxui4Node6RenderERNS_6ScreenE; ftxui::Node::Render(ftxui::Screen &) add rsp, 20h pop rbp retn
bool ftxui::`anonymous namespace'::Bold::Render(ftxui::_anonymous_namespace_::Bold *this, ftxui::Screen *a2) { _BYTE *v2; // rax int j; // [rsp+8h] [rbp-18h] int i; // [rsp+Ch] [rbp-14h] for ( i = *((_DWORD *)this + 21); i <= *((_DWORD *)this + 22); ++i ) { for ( j = *((_DWORD *)this + 19); j <= *((_DWORD *)this + 20); ++j ) { v2 = (_BYTE *)ftxui::Screen::PixelAt(a2, j, i); *v2 = *v2 & 0xFD | 2; } } return ftxui::Node::Render(this, a2); }
Render: 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 + -0x20],RAX MOV EAX,dword ptr [RAX + 0x54] MOV dword ptr [RBP + -0x14],EAX LAB_0017f6ce: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RCX + 0x58] JG 0x0017f721 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x4c] MOV dword ptr [RBP + -0x18],EAX LAB_0017f6e4: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x50] JG 0x0017f714 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x14] CALL 0x001882f0 MOV CL,byte ptr [RAX] AND CL,0xfd OR CL,0x2 MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x0017f6e4 LAB_0017f714: JMP 0x0017f716 LAB_0017f716: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX JMP 0x0017f6ce LAB_0017f721: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001446a0 ADD RSP,0x20 POP RBP RET
/* ftxui::(anonymous namespace)::Bold::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::Bold::Render(Bold *this,Screen *param_1) { byte *pbVar1; int local_20; int local_1c; for (local_1c = *(int *)(this + 0x54); local_1c <= *(int *)(this + 0x58); local_1c = local_1c + 1) { for (local_20 = *(int *)(this + 0x4c); local_20 <= *(int *)(this + 0x50); local_20 = local_20 + 1) { pbVar1 = (byte *)Screen::PixelAt(param_1,local_20,local_1c); *pbVar1 = *pbVar1 & 0xfd | 2; } } Node::Render((Node *)this,param_1); return; }
30,450
my_b_flush_io_cache
eloqsql/mysys/mf_iocache.c
int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock) { size_t length; my_bool append_cache= (info->type == SEQ_READ_APPEND); DBUG_ENTER("my_b_flush_io_cache"); DBUG_PRINT("enter", ("cache: %p", info)); if (!append_cache) need_append_buffer_lock= 0; if (info->type == WRITE_CACHE || append_cache) { if (info->file == -1) { if (real_open_cached_file(info)) DBUG_RETURN((info->error= -1)); } LOCK_APPEND_BUFFER; if ((length=(size_t) (info->write_pos - info->write_buffer))) { if (append_cache) { if (mysql_file_write(info->file, info->write_buffer, length, info->myflags | MY_NABP)) { info->error= -1; DBUG_RETURN(-1); } info->end_of_file+= info->write_pos - info->append_read_pos; info->append_read_pos= info->write_buffer; DBUG_ASSERT(info->end_of_file == mysql_file_tell(info->file, MYF(0))); } else { int res= info->write_function(info, info->write_buffer, length); if (res) DBUG_RETURN(res); set_if_bigger(info->end_of_file, info->pos_in_file); } info->write_end= (info->write_buffer + info->buffer_length - ((info->pos_in_file + length) & (IO_SIZE - 1))); info->write_pos= info->write_buffer; ++info->disk_writes; UNLOCK_APPEND_BUFFER; DBUG_RETURN(info->error); } } UNLOCK_APPEND_BUFFER; DBUG_RETURN(0); }
O3
c
my_b_flush_io_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %esi, %r14d movq %rdi, %rbx movl 0xb0(%rdi), %r15d xorl %r12d, %r12d cmpl $0x3, %r15d cmovnel %r12d, %r14d movl %r15d, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x95212 cmpl $-0x1, 0xd4(%rbx) je 0x9523c testl %r14d, %r14d je 0x9518e leaq 0x50(%rbx), %rdi cmpq $0x0, 0x90(%rbx) jne 0x952ff callq 0x29220 movq 0x30(%rbx), %r13 movq 0x40(%rbx), %rax subq %r13, %rax je 0x95212 cmpl $0x3, %r15d jne 0x9525e movq %rax, -0x30(%rbp) movl 0xd4(%rbx), %esi movq 0xf8(%rbx), %r12 orq $0x4, %r12 leaq 0x2f0e4f(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %esi, %r15d movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x95315 movl %r15d, %edi movq %r13, %rsi movq -0x30(%rbp), %rdx movq %r12, %rcx callq 0x2f004 movq %rax, %r12 testq %r12, %r12 jne 0x9524c movq 0x40(%rbx), %rax subq 0x38(%rbx), %rax addq %rax, 0x8(%rbx) movq (%rbx), %rax movq 0x30(%rbx), %rcx movq %rcx, 0x38(%rbx) jmp 0x95288 testl %r14d, %r14d je 0x952d8 movq 0x90(%rbx), %rdi addq $0x50, %rbx testq %rdi, %rdi jne 0x952ea movq %rbx, %rdi callq 0x291e0 jmp 0x952d8 movq %rbx, %rdi callq 0xa8726 testb %al, %al je 0x95172 movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0x952d8 movq %rbx, %rdi movq %r13, %rsi movq %rax, %r15 movq %rax, %rdx callq *0xa8(%rbx) movl %eax, %r12d testl %eax, %eax jne 0x952d8 movq %r15, -0x30(%rbp) movq (%rbx), %rax cmpq %rax, 0x8(%rbx) jae 0x95288 movq %rax, 0x8(%rbx) movq 0x30(%rbx), %rcx movq 0xe8(%rbx), %rdx addq %rcx, %rdx addl -0x30(%rbp), %eax andl $0xfff, %eax # imm = 0xFFF incq 0xb8(%rbx) subq %rax, %rdx movq %rdx, 0x48(%rbx) movq %rcx, 0x40(%rbx) testl %r14d, %r14d je 0x952d1 leaq 0x50(%rbx), %r14 movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0x95379 movq %r14, %rdi callq 0x291e0 movl 0xe4(%rbx), %r12d movl %r12d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2f0d1f(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x9522f leaq 0x46d22(%rip), %rsi # 0xdc028 movl $0x6ad, %edx # imm = 0x6AD callq 0x2eb8f jmp 0x9518e movq %rax, %rcx leaq 0x2f0cf1(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x46cff(%rip), %rdx # 0xdc028 movq %rcx, -0x38(%rbp) movq %rcx, %rdi movq -0x30(%rbp), %rsi movl $0x6b4, %ecx # imm = 0x6B4 callq *0x210(%rax) movl %r15d, %edi movq %r13, %rsi movq -0x30(%rbp), %r15 movq %r15, %rdx movq %r12, %rcx callq 0x2f004 movq %rax, %r12 xorl %esi, %esi testq %rax, %rax cmoveq %r15, %rsi leaq 0x2f0ca9(%rip), %rax # 0x386010 movq (%rax), %rax movq -0x38(%rbp), %rdi callq *0x218(%rax) jmp 0x951f4 leaq 0x2f0c90(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x952c9
my_b_flush_io_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14d, esi mov rbx, rdi mov r15d, [rdi+0B0h] xor r12d, r12d cmp r15d, 3 cmovnz r14d, r12d mov eax, r15d and eax, 0FFFFFFFEh cmp eax, 2 jnz loc_95212 cmp dword ptr [rbx+0D4h], 0FFFFFFFFh jz loc_9523C loc_95172: test r14d, r14d jz short loc_9518E lea rdi, [rbx+50h] cmp qword ptr [rbx+90h], 0 jnz loc_952FF call _pthread_mutex_lock loc_9518E: mov r13, [rbx+30h] mov rax, [rbx+40h] sub rax, r13 jz short loc_95212 cmp r15d, 3 jnz loc_9525E mov [rbp+var_30], rax mov esi, [rbx+0D4h] mov r12, [rbx+0F8h] or r12, 4 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov r15d, esi mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz loc_95315 mov edi, r15d mov rsi, r13 mov rdx, [rbp+var_30] mov rcx, r12 call my_write mov r12, rax loc_951F4: test r12, r12 jnz short loc_9524C mov rax, [rbx+40h] sub rax, [rbx+38h] add [rbx+8], rax mov rax, [rbx] mov rcx, [rbx+30h] mov [rbx+38h], rcx jmp short loc_95288 loc_95212: test r14d, r14d jz loc_952D8 mov rdi, [rbx+90h] add rbx, 50h ; 'P' test rdi, rdi jnz loc_952EA loc_9522F: mov rdi, rbx call _pthread_mutex_unlock jmp loc_952D8 loc_9523C: mov rdi, rbx call real_open_cached_file test al, al jz loc_95172 loc_9524C: mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov r12d, 0FFFFFFFFh jmp short loc_952D8 loc_9525E: mov rdi, rbx mov rsi, r13 mov r15, rax mov rdx, rax call qword ptr [rbx+0A8h] mov r12d, eax test eax, eax jnz short loc_952D8 mov [rbp+var_30], r15 mov rax, [rbx] cmp [rbx+8], rax jnb short loc_95288 mov [rbx+8], rax loc_95288: mov rcx, [rbx+30h] mov rdx, [rbx+0E8h] add rdx, rcx add eax, dword ptr [rbp+var_30] and eax, 0FFFh inc qword ptr [rbx+0B8h] sub rdx, rax mov [rbx+48h], rdx mov [rbx+40h], rcx test r14d, r14d jz short loc_952D1 lea r14, [rbx+50h] mov rdi, [rbx+90h] test rdi, rdi jnz loc_95379 loc_952C9: mov rdi, r14 call _pthread_mutex_unlock loc_952D1: mov r12d, [rbx+0E4h] loc_952D8: mov eax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_952EA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_9522F loc_952FF: lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 6ADh call psi_mutex_lock jmp loc_9518E loc_95315: mov rcx, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov [rbp+var_38], rcx mov rdi, rcx mov rsi, [rbp+var_30] mov ecx, 6B4h call qword ptr [rax+210h] mov edi, r15d mov rsi, r13 mov r15, [rbp+var_30] mov rdx, r15 mov rcx, r12 call my_write mov r12, rax xor esi, esi test rax, rax cmovz rsi, r15 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_38] call qword ptr [rax+218h] jmp loc_951F4 loc_95379: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_952C9
long long my_b_flush_io_cache(long long *a1, int a2) { int v4; // r15d unsigned int v5; // r12d long long v6; // rdi long long v7; // r13 long long v8; // rax long long v9; // r12 unsigned int v10; // r15d long long v11; // rax long long v12; // r12 long long v13; // rax long long v14; // rdi long long *v15; // rbx long long v16; // r15 long long v17; // rcx long long v18; // rdx long long v19; // rax unsigned int v21; // edi long long v22; // r15 long long v23; // rsi _BYTE v24[72]; // [rsp+0h] [rbp-80h] BYREF long long v25; // [rsp+48h] [rbp-38h] long long v26; // [rsp+50h] [rbp-30h] v4 = *((_DWORD *)a1 + 44); v5 = 0; if ( v4 != 3 ) a2 = 0; if ( (v4 & 0xFFFFFFFE) != 2 ) goto LABEL_14; if ( *((_DWORD *)a1 + 53) == -1 && (unsigned __int8)real_open_cached_file(a1) ) { LABEL_19: *((_DWORD *)a1 + 57) = -1; return (unsigned int)-1; } if ( a2 ) { v6 = (long long)(a1 + 10); if ( a1[18] ) psi_mutex_lock(v6, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x6ADu); else pthread_mutex_lock(v6); } v7 = a1[6]; v8 = a1[8] - v7; if ( v8 ) { if ( v4 == 3 ) { v26 = a1[8] - v7; v9 = a1[31] | 4; v10 = *((_DWORD *)a1 + 53); v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v24, v10, 7LL); if ( v11 ) { v25 = v11; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v11, v26, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1716LL); v21 = v10; v22 = v26; v12 = my_write(v21, v7, v26, v9); v23 = 0LL; if ( !v12 ) v23 = v22; ((void ( *)(long long, long long))PSI_server[67])(v25, v23); } else { v12 = my_write(v10, v7, v26, v9); } if ( v12 ) goto LABEL_19; a1[1] += a1[8] - a1[7]; v13 = *a1; a1[7] = a1[6]; } else { v16 = a1[8] - v7; v5 = ((long long ( *)(long long *, long long, long long))a1[21])(a1, a1[6], v8); if ( v5 ) return v5; v26 = v16; v13 = *a1; if ( a1[1] < (unsigned long long)*a1 ) a1[1] = v13; } v17 = a1[6]; v18 = v17 + a1[29]; v19 = ((_WORD)v26 + (_WORD)v13) & 0xFFF; ++a1[23]; a1[9] = v18 - v19; a1[8] = v17; if ( a2 ) { if ( a1[18] ) PSI_server[44](); pthread_mutex_unlock(a1 + 10); } return *((unsigned int *)a1 + 57); } else { LABEL_14: if ( a2 ) { v14 = a1[18]; v15 = a1 + 10; if ( v14 ) PSI_server[44](); pthread_mutex_unlock(v15); } } return v5; }
my_b_flush_io_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14D,ESI MOV RBX,RDI MOV R15D,dword ptr [RDI + 0xb0] XOR R12D,R12D CMP R15D,0x3 CMOVNZ R14D,R12D MOV EAX,R15D AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00195212 CMP dword ptr [RBX + 0xd4],-0x1 JZ 0x0019523c LAB_00195172: TEST R14D,R14D JZ 0x0019518e LEA RDI,[RBX + 0x50] CMP qword ptr [RBX + 0x90],0x0 JNZ 0x001952ff CALL 0x00129220 LAB_0019518e: MOV R13,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x40] SUB RAX,R13 JZ 0x00195212 CMP R15D,0x3 JNZ 0x0019525e MOV qword ptr [RBP + -0x30],RAX MOV ESI,dword ptr [RBX + 0xd4] MOV R12,qword ptr [RBX + 0xf8] OR R12,0x4 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV R15D,ESI MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00195315 MOV EDI,R15D MOV RSI,R13 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,R12 CALL 0x0012f004 MOV R12,RAX LAB_001951f4: TEST R12,R12 JNZ 0x0019524c MOV RAX,qword ptr [RBX + 0x40] SUB RAX,qword ptr [RBX + 0x38] ADD qword ptr [RBX + 0x8],RAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x38],RCX JMP 0x00195288 LAB_00195212: TEST R14D,R14D JZ 0x001952d8 MOV RDI,qword ptr [RBX + 0x90] ADD RBX,0x50 TEST RDI,RDI JNZ 0x001952ea LAB_0019522f: MOV RDI,RBX CALL 0x001291e0 JMP 0x001952d8 LAB_0019523c: MOV RDI,RBX CALL 0x001a8726 TEST AL,AL JZ 0x00195172 LAB_0019524c: MOV dword ptr [RBX + 0xe4],0xffffffff MOV R12D,0xffffffff JMP 0x001952d8 LAB_0019525e: MOV RDI,RBX MOV RSI,R13 MOV R15,RAX MOV RDX,RAX CALL qword ptr [RBX + 0xa8] MOV R12D,EAX TEST EAX,EAX JNZ 0x001952d8 MOV qword ptr [RBP + -0x30],R15 MOV RAX,qword ptr [RBX] CMP qword ptr [RBX + 0x8],RAX JNC 0x00195288 MOV qword ptr [RBX + 0x8],RAX LAB_00195288: MOV RCX,qword ptr [RBX + 0x30] MOV RDX,qword ptr [RBX + 0xe8] ADD RDX,RCX ADD EAX,dword ptr [RBP + -0x30] AND EAX,0xfff INC qword ptr [RBX + 0xb8] SUB RDX,RAX MOV qword ptr [RBX + 0x48],RDX MOV qword ptr [RBX + 0x40],RCX TEST R14D,R14D JZ 0x001952d1 LEA R14,[RBX + 0x50] MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x00195379 LAB_001952c9: MOV RDI,R14 CALL 0x001291e0 LAB_001952d1: MOV R12D,dword ptr [RBX + 0xe4] LAB_001952d8: MOV EAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001952ea: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0019522f LAB_001952ff: LEA RSI,[0x1dc028] MOV EDX,0x6ad CALL 0x0012eb8f JMP 0x0019518e LAB_00195315: MOV RCX,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dc028] MOV qword ptr [RBP + -0x38],RCX MOV RDI,RCX MOV RSI,qword ptr [RBP + -0x30] MOV ECX,0x6b4 CALL qword ptr [RAX + 0x210] MOV EDI,R15D MOV RSI,R13 MOV R15,qword ptr [RBP + -0x30] MOV RDX,R15 MOV RCX,R12 CALL 0x0012f004 MOV R12,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R15 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x38] CALL qword ptr [RAX + 0x218] JMP 0x001951f4 LAB_00195379: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001952c9
int my_b_flush_io_cache(ulong *param_1,int param_2) { uint uVar1; int4 uVar2; ulong uVar3; char cVar4; int iVar5; long lVar6; long lVar7; ulong uVar8; long lVar9; int1 local_88 [72]; long local_40; long local_38; uVar1 = (uint)param_1[0x16]; if (uVar1 != 3) { param_2 = 0; } if ((uVar1 & 0xfffffffe) == 2) { if ((*(int *)((long)param_1 + 0xd4) == -1) && (cVar4 = real_open_cached_file(param_1), cVar4 != '\0')) { LAB_0019524c: *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return -1; } if (param_2 != 0) { if (param_1[0x12] == 0) { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 10)); } else { psi_mutex_lock((pthread_mutex_t *)(param_1 + 10), "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x6ad); } } uVar8 = param_1[6]; local_38 = param_1[8] - uVar8; if (local_38 != 0) { if (uVar1 == 3) { uVar2 = *(int4 *)((long)param_1 + 0xd4); uVar3 = param_1[0x1f]; lVar6 = (**(code **)(PSI_server + 0x158))(local_88,uVar2,7); if (lVar6 == 0) { lVar7 = my_write(uVar2,uVar8,local_38,uVar3 | 4); } else { local_40 = lVar6; (**(code **)(PSI_server + 0x210)) (lVar6,local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x6b4); lVar6 = local_38; lVar7 = my_write(uVar2,uVar8,local_38,uVar3 | 4); lVar9 = 0; if (lVar7 == 0) { lVar9 = lVar6; } (**(code **)(PSI_server + 0x218))(local_40,lVar9); } if (lVar7 != 0) goto LAB_0019524c; param_1[1] = param_1[1] + (param_1[8] - param_1[7]); uVar8 = *param_1; param_1[7] = param_1[6]; } else { iVar5 = (*(code *)param_1[0x15])(param_1,uVar8,local_38); if (iVar5 != 0) { return iVar5; } uVar8 = *param_1; if (param_1[1] < uVar8) { param_1[1] = uVar8; } } param_1[0x17] = param_1[0x17] + 1; param_1[9] = (param_1[0x1d] + param_1[6]) - (ulong)((int)uVar8 + (int)local_38 & 0xfff); param_1[8] = param_1[6]; if (param_2 != 0) { if (param_1[0x12] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 10)); } return *(int *)((long)param_1 + 0xe4); } } if (param_2 != 0) { if (param_1[0x12] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 10)); } return 0; }
30,451
js_string_charCodeAt
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_charCodeAt(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue val, ret; JSString *p; int idx, c; val = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(val)) return val; p = JS_VALUE_GET_STRING(val); if (JS_ToInt32Sat(ctx, &idx, argv[0])) { JS_FreeValue(ctx, val); return JS_EXCEPTION; } if (idx < 0 || idx >= p->len) { ret = JS_NAN; } else { c = string_get(p, idx); ret = js_int32(c); } JS_FreeValue(ctx, val); return ret; }
O1
c
js_string_charCodeAt: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %r8, %r12 movq %rdi, %r14 callq 0x425ff movq %rdx, %rbx movq %rax, 0x8(%rsp) cmpl $0x6, %ebx jne 0x7af55 movq %rax, %r15 jmp 0x7af9e movq 0x8(%rsp), %r13 movq (%r12), %rdx movq 0x8(%r12), %rcx movq %rdx, (%rsp) cmpl $-0x9, %ecx jb 0x7af72 movq (%rsp), %rax incl (%rax) movq %rsp, %rsi movq %r14, %rdi callq 0x276c3 testl %eax, %eax je 0x7afb2 movl $0x6, %r12d xorl %r15d, %r15d movq 0x8(%rsp), %rsi movq 0x18(%r14), %rdi movq %rbx, %rdx callq 0x1d8c6 movq %r12, %rbx movq %r15, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movabsq $0x7ff8000000000000, %r15 # imm = 0x7FF8000000000000 movslq (%rsp), %rax movl $0x7, %r12d testq %rax, %rax js 0x7af8a movq 0x4(%r13), %rcx movl %ecx, %edx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF cmpl %edx, %eax jge 0x7af8a testl %ecx, %ecx js 0x7afe7 movzbl 0x18(%r13,%rax), %r15d jmp 0x7afed movzwl 0x18(%r13,%rax,2), %r15d xorl %r12d, %r12d jmp 0x7af8a
js_string_charCodeAt: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, r8 mov r14, rdi call JS_ToStringCheckObject mov rbx, rdx mov [rsp+38h+var_30], rax cmp ebx, 6 jnz short loc_7AF55 mov r15, rax jmp short loc_7AF9E loc_7AF55: mov r13, [rsp+38h+var_30] mov rdx, [r12] mov rcx, [r12+8] mov [rsp+38h+var_38], rdx cmp ecx, 0FFFFFFF7h jb short loc_7AF72 mov rax, [rsp+38h+var_38] inc dword ptr [rax] loc_7AF72: mov rsi, rsp mov rdi, r14 call JS_ToInt32SatFree test eax, eax jz short loc_7AFB2 mov r12d, 6 xor r15d, r15d loc_7AF8A: mov rsi, [rsp+38h+var_30] mov rdi, [r14+18h] mov rdx, rbx call JS_FreeValueRT mov rbx, r12 loc_7AF9E: mov rax, r15 mov rdx, rbx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_7AFB2: mov r15, 7FF8000000000000h movsxd rax, dword ptr [rsp+38h+var_38] mov r12d, 7 test rax, rax js short loc_7AF8A mov rcx, [r13+4] mov edx, ecx and edx, 7FFFFFFFh cmp eax, edx jge short loc_7AF8A test ecx, ecx js short loc_7AFE7 movzx r15d, byte ptr [r13+rax+18h] jmp short loc_7AFED loc_7AFE7: movzx r15d, word ptr [r13+rax*2+18h] loc_7AFED: xor r12d, r12d jmp short loc_7AF8A
_DWORD * js_string_charCodeAt( 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) { _DWORD *v15; // rax long long v16; // rdx long long v17; // rbx long long v18; // r15 _DWORD *v19; // r13 long long v20; // rdx long long v21; // rcx _DWORD *v23; // [rsp+0h] [rbp-38h] BYREF _DWORD *v24; // [rsp+8h] [rbp-30h] v15 = (_DWORD *)JS_ToStringCheckObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; v24 = v15; if ( (_DWORD)v16 == 6 ) return v15; v19 = v24; v20 = *a5; v21 = a5[1]; v23 = (_DWORD *)*a5; if ( (unsigned int)v21 >= 0xFFFFFFF7 ) ++*v23; if ( (unsigned int)JS_ToInt32SatFree(a1, (int *)&v23, v20, v21) ) { v18 = 0LL; } else { v18 = 0x7FF8000000000000LL; if ( (int)v23 >= 0LL && (int)v23 < (v19[1] & 0x7FFFFFFF) ) { if ( (int)*(_QWORD *)(v19 + 1) < 0 ) v18 = *((unsigned __int16 *)v19 + (int)v23 + 12); else v18 = *((unsigned __int8 *)v19 + (int)v23 + 24); } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v17); return (_DWORD *)v18; }
js_string_charCodeAt: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R12,R8 MOV R14,RDI CALL 0x001425ff MOV RBX,RDX MOV qword ptr [RSP + 0x8],RAX CMP EBX,0x6 JNZ 0x0017af55 MOV R15,RAX JMP 0x0017af9e LAB_0017af55: MOV R13,qword ptr [RSP + 0x8] MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [RSP],RDX CMP ECX,-0x9 JC 0x0017af72 MOV RAX,qword ptr [RSP] INC dword ptr [RAX] LAB_0017af72: MOV RSI,RSP MOV RDI,R14 CALL 0x001276c3 TEST EAX,EAX JZ 0x0017afb2 MOV R12D,0x6 XOR R15D,R15D LAB_0017af8a: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [R14 + 0x18] MOV RDX,RBX CALL 0x0011d8c6 MOV RBX,R12 LAB_0017af9e: MOV RAX,R15 MOV RDX,RBX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0017afb2: MOV R15,0x7ff8000000000000 MOVSXD RAX,dword ptr [RSP] MOV R12D,0x7 TEST RAX,RAX JS 0x0017af8a MOV RCX,qword ptr [R13 + 0x4] MOV EDX,ECX AND EDX,0x7fffffff CMP EAX,EDX JGE 0x0017af8a TEST ECX,ECX JS 0x0017afe7 MOVZX R15D,byte ptr [R13 + RAX*0x1 + 0x18] JMP 0x0017afed LAB_0017afe7: MOVZX R15D,word ptr [R13 + RAX*0x2 + 0x18] LAB_0017afed: XOR R12D,R12D JMP 0x0017af8a
int1 [16] js_string_charCodeAt(long param_1) { int iVar1; long lVar3; uint uVar4; int8 *in_R8; int8 uVar5; ulong uVar6; int1 auVar7 [16]; int *local_38; long local_30; long lVar2; auVar7 = JS_ToStringCheckObject(); auVar7._8_8_ = auVar7._8_8_; lVar2 = auVar7._0_8_; if (auVar7._8_4_ != 6) { local_38 = (int *)*in_R8; if (0xfffffff6 < (uint)in_R8[1]) { *local_38 = *local_38 + 1; } local_30 = lVar2; iVar1 = JS_ToInt32SatFree(param_1,&local_38); if (iVar1 == 0) { uVar6 = 0x7ff8000000000000; lVar3 = (long)(int)local_38; uVar5 = 7; if ((-1 < lVar3) && (uVar4 = (uint)*(int8 *)(lVar2 + 4), (int)local_38 < (int)(uVar4 & 0x7fffffff))) { if ((int)uVar4 < 0) { uVar6 = (ulong)*(ushort *)(lVar2 + 0x18 + lVar3 * 2); } else { uVar6 = (ulong)*(byte *)(lVar2 + 0x18 + lVar3); } uVar5 = 0; } } else { uVar5 = 6; uVar6 = 0; } auVar7._8_8_ = uVar5; auVar7._0_8_ = uVar6; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_30,auVar7._8_8_); } return auVar7; }
30,452
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 0x1a8b4b(%rip), %rcx # 0x1d5b18 movq (%rcx), %rcx cmpl (%rcx), %eax jne 0x2cfea leaq 0x1a8b3d(%rip), %rax # 0x1d5b18 movq (%rax), %rax movq %rax, -0x2f8(%rbp) jmp 0x2d0bc leaq 0x3687b3(%rip), %rdi # 0x3957a4 leaq -0x548(%rip), %rsi # 0x2cab0 callq 0x24280 cmpl $0x800, -0x2fc(%rbp) # imm = 0x800 jae 0x2d035 leaq -0xb8(%rbp), %rdi callq 0x2c0d0 movl -0x2fc(%rbp), %esi movq -0x308(%rbp), %rdx leaq -0xb8(%rbp), %rdi callq 0x2d100 movq %rax, -0x310(%rbp) cmpq $0x0, -0x310(%rbp) jne 0x2d0ae movq -0x308(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2d0ae leaq -0x2d0(%rbp), %rdi callq 0x2c770 movq %rax, %rdi leaq 0x52dbc(%rip), %rsi # 0x7fe22 callq 0x242d0 movb $0x23, -0x2f0(%rbp) movl -0x2fc(%rbp), %eax movl %eax, %edi leaq -0x2f0(%rbp), %rsi addq $0x1, %rsi movl $0xa, %edx callq 0x79b50 leaq -0x2f0(%rbp), %rdx leaq -0x2d0(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x34df0 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 0x2d0ec movq -0x318(%rbp), %rax addq $0x320, %rsp # imm = 0x320 popq %rbp retq callq 0x24330 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_2CFEA lea rax, default_charset_info mov rax, [rax] mov [rbp+var_2F8], rax jmp loc_2D0BC loc_2CFEA: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp [rbp+var_2FC], 800h jnb short loc_2D035 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_2D035: cmp [rbp+var_310], 0 jnz short loc_2D0AE mov rax, [rbp+var_308] and rax, 10h cmp rax, 0 jz short loc_2D0AE 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_2D0AE: mov rax, [rbp+var_310] mov [rbp+var_2F8], rax loc_2D0BC: 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_2D0EC mov rax, [rbp+var_318] add rsp, 320h pop rbp retn loc_2D0EC: 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,[0x2d5b18] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX] JNZ 0x0012cfea LEA RAX,[0x2d5b18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x2f8],RAX JMP 0x0012d0bc LAB_0012cfea: LEA RDI,[0x4957a4] LEA RSI,[0x12cab0] CALL 0x00124280 CMP dword ptr [RBP + -0x2fc],0x800 JNC 0x0012d035 LEA RDI,[RBP + -0xb8] CALL 0x0012c0d0 MOV ESI,dword ptr [RBP + -0x2fc] MOV RDX,qword ptr [RBP + -0x308] LEA RDI,[RBP + -0xb8] CALL 0x0012d100 MOV qword ptr [RBP + -0x310],RAX LAB_0012d035: CMP qword ptr [RBP + -0x310],0x0 JNZ 0x0012d0ae MOV RAX,qword ptr [RBP + -0x308] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012d0ae LEA RDI,[RBP + -0x2d0] CALL 0x0012c770 MOV RDI,RAX LEA RSI,[0x17fe22] CALL 0x001242d0 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 0x00179b50 LEA RDX,[RBP + -0x2f0] LEA RCX,[RBP + -0x2d0] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00134df0 LAB_0012d0ae: MOV RAX,qword ptr [RBP + -0x310] MOV qword ptr [RBP + -0x2f8],RAX LAB_0012d0bc: 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 0x0012d0ec MOV RAX,qword ptr [RBP + -0x318] ADD RSP,0x320 POP RBP RET LAB_0012d0ec: CALL 0x00124330
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(); }
30,453
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 0x2c9012(%rip), %rax # 0x2f3ad8 movq (%rax), %r15 cmpl %edi, (%r15) je 0x2abcd movq %rsi, %r14 movl %edi, %ebx leaq 0x348122(%rip), %rdi # 0x372c00 leaq -0x382(%rip), %rsi # 0x2a763 callq 0x242a0 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x2ab62 leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x29f96 movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x29fa5 movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x29fc0 movq %rax, 0x90(%rdi) leaq -0x2677(%rip), %rax # 0x284b6 movq %rax, 0x98(%rdi) leaq 0x2c8f95(%rip), %rax # 0x2f3ad0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x29fde movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x2abf2 movq %rax, %r15 jmp 0x2ab65 xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x2abcd leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x2a523 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 0x5c516 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2e7bf movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2abed movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x24370
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_2ABCD mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_2AB62 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_2AB65 loc_2AB62: xor r15d, r15d loc_2AB65: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_2ABCD 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_2ABCD: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2ABED mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_2ABED: 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,[0x3f3ad8] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x0012abcd MOV R14,RSI MOV EBX,EDI LEA RDI,[0x472c00] LEA RSI,[0x12a763] CALL 0x001242a0 CMP EBX,0x7ff JA 0x0012ab62 LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x129f96] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x129fa5] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x129fc0] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1284b6] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3f3ad0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x129fde] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x0012abf2 MOV R15,RAX JMP 0x0012ab65 LAB_0012ab62: XOR R15D,R15D LAB_0012ab65: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x0012abcd LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x0012a523 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 0x0015c516 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012e7bf LAB_0012abcd: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012abed MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_0012abed: CALL 0x00124370
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(); }
30,454
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&)
ng-log[P]ng-log/src/logging.cc
void MakeCheckOpValueString(std::ostream* os, const char& v) { if (v >= 32 && v <= 126) { (*os) << "'" << v << "'"; } else { (*os) << "char value " << static_cast<short>(v); } }
O3
cpp
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movb (%rsi), %al addb $-0x7f, %al cmpb $-0x5f, %al jae 0xf049 leaq 0x14b26(%rip), %rsi # 0x23b4d movl $0xb, %edx movq %rbx, %rdi callq 0x7600 movsbl (%r14), %esi movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x7490 leaq 0x1493e(%rip), %r15 # 0x2398e movl $0x1, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x7600 movb (%r14), %al leaq 0xf(%rsp), %rsi movb %al, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x7600 movl $0x1, %edx movq %rax, %rdi movq %r15, %rsi callq 0x7600 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5nglog8internal22MakeCheckOpValueStringIcEEvPSoRKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov al, [rsi] add al, 81h cmp al, 0A1h jnb short loc_F049 lea rsi, aUnsignedCharVa+9; "char value " mov edx, 0Bh mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) movsx esi, byte ptr [r14] mov rdi, rbx add rsp, 10h pop rbx pop r14 pop r15 jmp __ZNSolsEs; std::ostream::operator<<(short) loc_F049: lea r15, aDataNumCharsTo+59h; "'" mov edx, 1 mov rdi, rbx mov rsi, 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 al, [r14] lea rsi, [rsp+28h+var_19] mov [rsi], al mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 10h pop rbx pop r14 pop r15 retn
long long nglog::internal::MakeCheckOpValueString<char>(long long a1, char *a2) { long long v3; // rax _BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF if ( (unsigned __int8)(*a2 - 127) >= 0xA1u ) { std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL); v4[0] = *a2; v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL); return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(a1, "char value ", 11LL); return std::ostream::operator<<(a1, (unsigned int)*a2); } }
MakeCheckOpValueString<char>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [RSI] ADD AL,0x81 CMP AL,0xa1 JNC 0x0010f049 LEA RSI,[0x123b4d] MOV EDX,0xb MOV RDI,RBX CALL 0x00107600 MOVSX ESI,byte ptr [R14] MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x00107490 LAB_0010f049: LEA R15,[0x12398e] MOV EDX,0x1 MOV RDI,RBX MOV RSI,R15 CALL 0x00107600 MOV AL,byte ptr [R14] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL MOV EDX,0x1 MOV RDI,RBX CALL 0x00107600 MOV EDX,0x1 MOV RDI,RAX MOV RSI,R15 CALL 0x00107600 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&) */ void nglog::internal::MakeCheckOpValueString<char>(ostream *param_1,char *param_2) { ostream *poVar1; char local_19; if ((byte)(*param_2 + 0x81U) < 0xa1) { std::__ostream_insert<char,std::char_traits<char>>(param_1,"char value ",0xb); std::ostream::operator<<(param_1,(short)*param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1); local_19 = *param_2; poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,&local_19,1); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1); return; }
30,455
getopt_ll
eloqsql/mysys/my_getopt.c
static longlong getopt_ll(char *arg, const struct my_option *optp, int *err) { longlong num=eval_num_suffix_ll(arg, err, (char*) optp->name); return getopt_ll_limit_value(num, optp, NULL); }
O3
c
getopt_ll: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq %rax, -0x30(%rbp) xorl %r15d, %r15d movl %r15d, (%rdx) callq 0x2a7f0 movq %rax, %r13 movl %r15d, (%rax) leaq -0x38(%rbp), %rsi movq %r14, %rdi movl $0xa, %edx callq 0x2a760 cmpl $0x22, (%r13) jne 0xa871a leaq 0x2eaaae(%rip), %rcx # 0x3931a8 leaq 0x40260(%rip), %rsi # 0xe8961 xorl %r13d, %r13d xorl %edi, %edi movq %r14, %rdx xorl %eax, %eax callq *(%rcx) movl $0x1, (%r12) jmp 0xa87de movq -0x38(%rbp), %rdx movb (%rdx), %cl movzbl %cl, %esi cmpl $0x53, %esi jle 0xa8740 leal -0x65(%rsi), %edi cmpl $0xb, %edi ja 0xa8764 leaq 0x4512d(%rip), %rsi # 0xed864 movslq (%rsi,%rdi,4), %rdi addq %rsi, %rdi jmpq *%rdi leal -0x45(%rsi), %edi cmpl $0xb, %edi ja 0xa87a2 leaq 0x450e5(%rip), %rsi # 0xed834 movslq (%rsi,%rdi,4), %rdi addq %rsi, %rdi jmpq *%rdi movabsq $0x1000000000000000, %r13 # imm = 0x1000000000000000 jmp 0xa87ac cmpl $0x54, %esi je 0xa8772 cmpl $0x74, %esi jne 0xa87fa movabsq $0x10000000000, %r13 # imm = 0x10000000000 jmp 0xa87ac movabsq $0x4000000000000, %r13 # imm = 0x4000000000000 jmp 0xa87ac movl $0x400, %r13d # imm = 0x400 jmp 0xa87ac movl $0x40000000, %r13d # imm = 0x40000000 jmp 0xa87ac movl $0x100000, %r13d # imm = 0x100000 jmp 0xa87ac movl $0x1, %r13d testl %esi, %esi jne 0xa87fa imulq %rax, %r13 cmpl $0x0, (%r12) je 0xa87de movq 0x2e87ea(%rip), %rax # 0x390fa8 movq (%rax), %rdi movsbl %cl, %ecx leaq 0x401b4(%rip), %rdx # 0xe897f movl $0x1, %esi movq -0x30(%rbp), %r8 movq %r14, %r9 xorl %eax, %eax callq 0x2a1f0 movq %r13, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0xa7a33 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, (%r12) movb (%rdx), %cl xorl %r13d, %r13d jmp 0xa87b7
getopt_ll: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov rbx, rsi mov r14, rdi mov rax, [rsi] mov [rbp+var_30], rax xor r15d, r15d mov [rdx], r15d call ___errno_location mov r13, rax mov [rax], r15d lea rsi, [rbp+var_38] mov rdi, r14 mov edx, 0Ah call ___isoc23_strtol cmp dword ptr [r13+0], 22h ; '"' jnz short loc_A871A lea rcx, my_getopt_error_reporter lea rsi, aIncorrectInteg; "Incorrect integer value: '%s'" xor r13d, r13d xor edi, edi mov rdx, r14 xor eax, eax call qword ptr [rcx] mov dword ptr [r12], 1 jmp loc_A87DE loc_A871A: mov rdx, [rbp+var_38] mov cl, [rdx] movzx esi, cl cmp esi, 53h ; 'S' jle short loc_A8740 lea edi, [rsi-65h]; switch 12 cases cmp edi, 0Bh ja short def_A873E; jumptable 00000000000A873E default case lea rsi, jpt_A873E movsxd rdi, ds:(jpt_A873E - 0ED864h)[rsi+rdi*4] add rdi, rsi jmp rdi; switch jump loc_A8740: lea edi, [rsi-45h]; switch 12 cases cmp edi, 0Bh ja short def_A8756; jumptable 00000000000A8756 default case lea rsi, jpt_A8756 movsxd rdi, ds:(jpt_A8756 - 0ED834h)[rsi+rdi*4] add rdi, rsi jmp rdi; switch jump loc_A8758: mov r13, 1000000000000000h; jumptable 00000000000A873E case 101 jmp short loc_A87AC def_A873E: cmp esi, 54h ; 'T'; jumptable 00000000000A873E default case jz short loc_A8772 cmp esi, 74h ; 't' jnz loc_A87FA; jumptable 00000000000A873E cases 102,104-106,108,110,111 loc_A8772: mov r13, 10000000000h jmp short loc_A87AC loc_A877E: mov r13, 4000000000000h; jumptable 00000000000A873E case 112 jmp short loc_A87AC loc_A878A: mov r13d, 400h; jumptable 00000000000A873E case 107 jmp short loc_A87AC loc_A8792: mov r13d, 40000000h; jumptable 00000000000A873E case 103 jmp short loc_A87AC loc_A879A: mov r13d, offset xmmword_100000; jumptable 00000000000A873E case 109 jmp short loc_A87AC def_A8756: mov r13d, 1; jumptable 00000000000A8756 default case test esi, esi jnz short loc_A87FA; jumptable 00000000000A873E cases 102,104-106,108,110,111 loc_A87AC: imul r13, rax cmp dword ptr [r12], 0 jz short loc_A87DE loc_A87B7: mov rax, cs:stderr_ptr mov rdi, [rax] movsx ecx, cl lea rdx, aUnknownSuffixC; "Unknown suffix '%c' used for variable '"... mov esi, 1 mov r8, [rbp+var_30] mov r9, r14 xor eax, eax call ___fprintf_chk loc_A87DE: mov rdi, r13 mov rsi, rbx xor edx, edx call getopt_ll_limit_value add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A87FA: mov dword ptr [r12], 1; jumptable 00000000000A873E cases 102,104-106,108,110,111 mov cl, [rdx] xor r13d, r13d jmp short loc_A87B7
long long getopt_ll(const char *a1, const char **a2, _DWORD *a3) { _DWORD *v5; // r13 long long v6; // rax long long v7; // r13 char *v8; // rdx char v9; // cl unsigned int v10; // esi long long v11; // r13 char *v13; // [rsp+8h] [rbp-38h] BYREF const char *v14; // [rsp+10h] [rbp-30h] v14 = *a2; *a3 = 0; v5 = (_DWORD *)__errno_location(a1); *v5 = 0; v6 = __isoc23_strtol(a1, &v13, 10LL); if ( *v5 == 34 ) { v7 = 0LL; my_getopt_error_reporter(0, "Incorrect integer value: '%s'", a1); *a3 = 1; return getopt_ll_limit_value(v7, (long long)a2, 0LL); } v8 = v13; v9 = *v13; v10 = (unsigned __int8)*v13; if ( v10 <= 0x53 ) { switch ( *v13 ) { case 'E': LABEL_6: v11 = 0x1000000000000000LL; goto LABEL_15; case 'F': case 'H': case 'I': case 'J': case 'L': case 'N': case 'O': break; case 'G': LABEL_12: v11 = 0x40000000LL; goto LABEL_15; case 'K': LABEL_11: v11 = 1024LL; goto LABEL_15; case 'M': LABEL_13: v11 = (long long)&xmmword_100000; goto LABEL_15; case 'P': LABEL_10: v11 = 0x4000000000000LL; goto LABEL_15; default: v11 = 1LL; if ( !*v13 ) goto LABEL_15; break; } LABEL_18: *a3 = 1; v9 = *v8; v7 = 0LL; goto LABEL_16; } switch ( *v13 ) { case 'e': goto LABEL_6; case 'f': case 'h': case 'i': case 'j': case 'l': case 'n': case 'o': goto LABEL_18; case 'g': goto LABEL_12; case 'k': goto LABEL_11; case 'm': goto LABEL_13; case 'p': goto LABEL_10; default: if ( v10 != 84 && v10 != 116 ) goto LABEL_18; v11 = 0x10000000000LL; break; } LABEL_15: v7 = v6 * v11; if ( *a3 ) LABEL_16: __fprintf_chk(stderr, 1LL, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", (unsigned int)v9, v14, a1); return getopt_ll_limit_value(v7, (long long)a2, 0LL); }
getopt_ll: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RBP + -0x30],RAX XOR R15D,R15D MOV dword ptr [RDX],R15D CALL 0x0012a7f0 MOV R13,RAX MOV dword ptr [RAX],R15D LEA RSI,[RBP + -0x38] MOV RDI,R14 MOV EDX,0xa CALL 0x0012a760 CMP dword ptr [R13],0x22 JNZ 0x001a871a LEA RCX,[0x4931a8] LEA RSI,[0x1e8961] XOR R13D,R13D XOR EDI,EDI MOV RDX,R14 XOR EAX,EAX CALL qword ptr [RCX] MOV dword ptr [R12],0x1 JMP 0x001a87de LAB_001a871a: MOV RDX,qword ptr [RBP + -0x38] MOV CL,byte ptr [RDX] MOVZX ESI,CL CMP ESI,0x53 JLE 0x001a8740 LEA EDI,[RSI + -0x65] CMP EDI,0xb JA 0x001a8764 LEA RSI,[0x1ed864] MOVSXD RDI,dword ptr [RSI + RDI*0x4] ADD RDI,RSI switchD: JMP RDI LAB_001a8740: LEA EDI,[RSI + -0x45] CMP EDI,0xb JA 0x001a87a2 LEA RSI,[0x1ed834] MOVSXD RDI,dword ptr [RSI + RDI*0x4] ADD RDI,RSI switchD: JMP RDI caseD_65: MOV R13,0x1000000000000000 JMP 0x001a87ac default: CMP ESI,0x54 JZ 0x001a8772 CMP ESI,0x74 JNZ 0x001a87fa LAB_001a8772: MOV R13,0x10000000000 JMP 0x001a87ac caseD_70: MOV R13,0x4000000000000 JMP 0x001a87ac caseD_6b: MOV R13D,0x400 JMP 0x001a87ac caseD_67: MOV R13D,0x40000000 JMP 0x001a87ac caseD_6d: MOV R13D,0x100000 JMP 0x001a87ac default: MOV R13D,0x1 TEST ESI,ESI JNZ 0x001a87fa LAB_001a87ac: IMUL R13,RAX CMP dword ptr [R12],0x0 JZ 0x001a87de LAB_001a87b7: MOV RAX,qword ptr [0x00490fa8] MOV RDI,qword ptr [RAX] MOVSX ECX,CL LEA RDX,[0x1e897f] MOV ESI,0x1 MOV R8,qword ptr [RBP + -0x30] MOV R9,R14 XOR EAX,EAX CALL 0x0012a1f0 LAB_001a87de: MOV RDI,R13 MOV RSI,RBX XOR EDX,EDX CALL 0x001a7a33 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET caseD_66: MOV dword ptr [R12],0x1 MOV CL,byte ptr [RDX] XOR R13D,R13D JMP 0x001a87b7
void getopt_ll(int8 param_1,int8 *param_2,int *param_3) { int *piVar1; long lVar2; byte bVar3; long lVar4; byte *local_40; int8 local_38; local_38 = *param_2; *param_3 = 0; piVar1 = __errno_location(); *piVar1 = 0; lVar2 = __isoc23_strtol(param_1,&local_40,10); if (*piVar1 == 0x22) { lVar4 = 0; (*(code *)my_getopt_error_reporter)(0,"Incorrect integer value: \'%s\'",param_1); *param_3 = 1; goto LAB_001a87de; } bVar3 = *local_40; if (bVar3 < 0x54) { switch(bVar3) { case 0x45: goto switchD_001a873e_caseD_65; case 0x46: case 0x48: case 0x49: case 0x4a: case 0x4c: case 0x4e: case 0x4f: break; case 0x47: goto switchD_001a873e_caseD_67; case 0x4b: goto switchD_001a873e_caseD_6b; case 0x4d: goto switchD_001a873e_caseD_6d; case 0x50: goto switchD_001a873e_caseD_70; default: lVar4 = 1; if (bVar3 == 0) goto LAB_001a87ac; } switchD_001a873e_caseD_66: *param_3 = 1; bVar3 = *local_40; lVar4 = 0; } else { switch(bVar3) { case 0x65: switchD_001a873e_caseD_65: lVar4 = 0x1000000000000000; break; case 0x66: case 0x68: case 0x69: case 0x6a: case 0x6c: case 0x6e: case 0x6f: goto switchD_001a873e_caseD_66; case 0x67: switchD_001a873e_caseD_67: lVar4 = 0x40000000; break; case 0x6b: switchD_001a873e_caseD_6b: lVar4 = 0x400; break; case 0x6d: switchD_001a873e_caseD_6d: lVar4 = 0x100000; break; case 0x70: switchD_001a873e_caseD_70: lVar4 = 0x4000000000000; break; default: if ((bVar3 != 0x54) && (bVar3 != 0x74)) goto switchD_001a873e_caseD_66; lVar4 = 0x10000000000; } LAB_001a87ac: lVar4 = lVar4 * lVar2; if (*param_3 == 0) goto LAB_001a87de; } __fprintf_chk(*(int8 *)PTR_stderr_00490fa8,1, "Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')\n",(int)(char)bVar3, local_38,param_1); LAB_001a87de: getopt_ll_limit_value(lVar4,param_2,0); return; }
30,456
translog_sync
eloqsql/storage/maria/ma_loghandler.c
void translog_sync() { DBUG_ENTER("ma_translog_sync"); /* The following is only true if initalization of translog succeded */ if (log_descriptor.open_files.elements != 0) { uint32 max= get_current_logfile()->number; uint32 min; min= soft_sync_min; if (!min) min= max; translog_sync_files(min, max, sync_log_dir >= TRANSLOG_SYNC_DIR_ALWAYS); } DBUG_VOID_RETURN; }
O3
c
translog_sync: cmpl $0x0, 0x39d269(%rip) # 0x40c090 je 0x6ee52 pushq %rbp movq %rsp, %rbp callq 0x70e90 movl (%rax), %esi movl 0xb9df52(%rip), %edi # 0xc0cd8c testl %edi, %edi cmovel %esi, %edi xorl %edx, %edx cmpq $0x2, 0x322ce7(%rip) # 0x391b30 setae %dl popq %rbp jmp 0x6e196 retq
translog_sync: cmp cs:dword_40C090, 0 jz short locret_6EE52 push rbp mov rbp, rsp call get_current_logfile mov esi, [rax] mov edi, cs:soft_sync_min test edi, edi cmovz edi, esi xor edx, edx cmp cs:sync_log_dir, 2 setnb dl pop rbp jmp translog_sync_files locret_6EE52: retn
void translog_sync() { unsigned int v0; // esi unsigned int v1; // edi if ( dword_40C090 ) { v0 = *(_DWORD *)get_current_logfile(); v1 = soft_sync_min; if ( !soft_sync_min ) v1 = v0; translog_sync_files(v1, v0, (unsigned long long)sync_log_dir >= 2); } }
translog_sync: CMP dword ptr [0x0050c090],0x0 JZ 0x0016ee52 PUSH RBP MOV RBP,RSP CALL 0x00170e90 MOV ESI,dword ptr [RAX] MOV EDI,dword ptr [0x00d0cd8c] TEST EDI,EDI CMOVZ EDI,ESI XOR EDX,EDX CMP qword ptr [0x00491b30],0x2 SETNC DL POP RBP JMP 0x0016e196 LAB_0016ee52: RET
void translog_sync(void) { int iVar1; int *piVar2; if (DAT_0050c090 != 0) { piVar2 = (int *)get_current_logfile(); iVar1 = soft_sync_min; if (soft_sync_min == 0) { iVar1 = *piVar2; } translog_sync_files(iVar1,*piVar2,1 < sync_log_dir); return; } return; }
30,457
testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-death-test.cc
static ::std::string FormatDeathTestOutput(const ::std::string& output) { ::std::string ret; for (size_t at = 0;;) { const size_t line_end = output.find('\n', at); ret += "[ DEATH ] "; if (line_end == ::std::string::npos) { ret += output.substr(at); break; } ret += output.substr(at, line_end + 1 - at); at = line_end + 1; } return ret; }
O2
cpp
testing::internal::FormatDeathTestOutput(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 $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) xorl %ebp, %ebp leaq 0x2604c(%rip), %r15 # 0x34b5c leaq 0x8(%rsp), %r12 movq %r14, %rdi pushq $0xa popq %rsi movq %rbp, %rdx callq 0x8730 movq %rax, %r13 movq %rbx, %rdi movq %r15, %rsi callq 0x8a60 cmpq $-0x1, %r13 je 0xeb66 incq %r13 movq %r13, %rcx subq %rbp, %rcx movq %r12, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x8520 movq %rbx, %rdi movq %r12, %rsi callq 0x8a90 movq %r12, %rdi callq 0x8ad8 movq %r13, %rbp jmp 0xeb15 leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rcx movq %r14, %rsi movq %rbp, %rdx callq 0x8520 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x8a90 leaq 0x8(%rsp), %rdi callq 0x8ad8 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xeba8 jmp 0xebb7 jmp 0xebb7 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x8ad8 jmp 0xebba movq %rax, %r14 movq %rbx, %rdi callq 0x8ad8 movq %r14, %rdi callq 0x89a0
_ZN7testing8internalL21FormatDeathTestOutputERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 xor ebp, ebp lea r15, aDeath; "[ DEATH ] " lea r12, [rsp+58h+var_50] loc_EB15: mov rdi, r14 push 0Ah pop rsi mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov r13, rax mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) cmp r13, 0FFFFFFFFFFFFFFFFh jz short loc_EB66 inc r13 mov rcx, r13 sub rcx, rbp mov rdi, r12 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rbp, r13 jmp short loc_EB15 loc_EB66: lea rdi, [rsp+58h+var_50] push 0FFFFFFFFFFFFFFFFh pop rcx mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_EBA8 jmp short loc_EBB7 jmp short loc_EBB7 loc_EBA8: mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_EBBA loc_EBB7: mov r14, rax loc_EBBA: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long testing::internal::FormatDeathTestOutput(long long a1, long long a2) { long long i; // rbp long long v3; // r13 long long v4; // r13 _BYTE v6[80]; // [rsp+8h] [rbp-50h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; for ( i = 0LL; ; i = v4 ) { v3 = std::string::find(a2, 10LL, i); std::string::append(a1, "[ DEATH ] "); if ( v3 == -1 ) break; v4 = v3 + 1; std::string::substr(v6, a2, i, v4 - i); std::string::append(a1, v6); std::string::~string(v6); } std::string::substr(v6, a2, i, -1LL); std::string::append(a1, v6); std::string::~string(v6); return a1; }
FormatDeathTestOutput: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 XOR EBP,EBP LEA R15,[0x134b5c] LEA R12,[RSP + 0x8] LAB_0010eb15: MOV RDI,R14 PUSH 0xa POP RSI MOV RDX,RBP CALL 0x00108730 MOV R13,RAX LAB_0010eb26: MOV RDI,RBX MOV RSI,R15 CALL 0x00108a60 CMP R13,-0x1 JZ 0x0010eb66 INC R13 MOV RCX,R13 SUB RCX,RBP LAB_0010eb40: MOV RDI,R12 MOV RSI,R14 MOV RDX,RBP CALL 0x00108520 LAB_0010eb4e: MOV RDI,RBX MOV RSI,R12 CALL 0x00108a90 MOV RDI,R12 CALL 0x00108ad8 MOV RBP,R13 JMP 0x0010eb15 LAB_0010eb66: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RCX MOV RSI,R14 MOV RDX,RBP CALL 0x00108520 LAB_0010eb79: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00108a90 LAB_0010eb86: LEA RDI,[RSP + 0x8] CALL 0x00108ad8 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::FormatDeathTestOutput(std::__cxx11::string const&) */ internal * __thiscall testing::internal::FormatDeathTestOutput(internal *this,string *param_1) { long lVar1; string local_50 [32]; *(internal **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (internal)0x0; while( true ) { lVar1 = std::__cxx11::string::find((char)param_1,10); /* try { // try from 0010eb26 to 0010eb30 has its CatchHandler @ 0010ebb7 */ std::__cxx11::string::append((char *)this); if (lVar1 == -1) break; /* try { // try from 0010eb40 to 0010eb4d has its CatchHandler @ 0010eba6 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0010eb4e to 0010eb58 has its CatchHandler @ 0010eba8 */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_50); } /* try { // try from 0010eb66 to 0010eb78 has its CatchHandler @ 0010eba4 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0010eb79 to 0010eb85 has its CatchHandler @ 0010eba2 */ std::__cxx11::string::append((string *)this); std::__cxx11::string::~string(local_50); return this; }
30,458
minja::Value::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
Value get(const Value& key) { if (array_) { if (!key.is_number_integer()) { return Value(); } auto index = key.get<int>(); return array_->at(index < 0 ? array_->size() + index : index); } else if (object_) { if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); auto it = object_->find(key.primitive_); if (it == object_->end()) return Value(); return it->second; } return Value(); }
O1
cpp
minja::Value::get(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x10(%rsi) je 0x912e0 movb 0x40(%r15), %al addb $-0x5, %al cmpb $0x2, %al jae 0x91397 movq %r15, %rdi callq 0x91598 movq 0x10(%r14), %rdx movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD testl %eax, %eax js 0x9133d movl %eax, %esi jmp 0x91352 movq 0x20(%r14), %r13 testq %r13, %r13 je 0x91397 cmpq $0x0, 0x10(%r15) jne 0x913f3 cmpq $0x0, 0x20(%r15) jne 0x913f3 cmpq $0x0, 0x30(%r15) jne 0x913f3 movq (%r13), %r12 movq 0x8(%r13), %rsi cmpq %rsi, %r12 je 0x9137f addq $0x40, %r15 movq %r12, %rdi movq %r15, %rsi callq 0x8df71 testb %al, %al jne 0x9137c addq $0x60, %r12 movq 0x8(%r13), %rsi cmpq %rsi, %r12 jne 0x9131f jmp 0x9137f movq 0x8(%rdx), %rdi subq (%rdx), %rdi sarq $0x4, %rdi imulq %rcx, %rdi movslq %eax, %rsi addq %rdi, %rsi movq (%rdx), %rax movq 0x8(%rdx), %rdx subq %rax, %rdx sarq $0x4, %rdx imulq %rcx, %rdx cmpq %rsi, %rdx jbe 0x913e5 leaq (%rsi,%rsi,4), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rbx, %rdi movq %rax, %rsi jmp 0x91390 movq %r12, %rsi movq 0x20(%r14), %rax cmpq 0x8(%rax), %rsi je 0x91397 addq $0x10, %rsi movq %rbx, %rdi callq 0x8e64c jmp 0x913d3 leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x5869e movq %r14, %rdi movl $0x1, %esi callq 0x5869e movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x62f10(%rip), %rdi # 0xf42fc xorl %eax, %eax callq 0x1bd00 movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x87128 leaq 0x62d73(%rip), %rsi # 0xf418e leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x78f1b movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0x9eba5(%rip), %rsi # 0x12ffe8 movq 0x9eb06(%rip), %rdx # 0x12ff50 movq %rbx, %rdi callq 0x1bf00 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x91478 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x91478 movq %rax, %r14 movb $0x1, %bpl leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9149b movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x9149b movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x914a8 movq %rbx, %rdi callq 0x1b660 movq %r14, %rdi callq 0x1bf90
_ZN5minja5Value3getERKS0_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rdx mov r14, rsi mov rbx, rdi cmp qword ptr [rsi+10h], 0 jz short loc_912E0 mov al, [r15+40h] add al, 0FBh cmp al, 2 jnb loc_91397 mov rdi, r15 call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) mov rdx, [r14+10h] mov rcx, 0CCCCCCCCCCCCCCCDh test eax, eax js short loc_9133D mov esi, eax jmp short loc_91352 loc_912E0: mov r13, [r14+20h] test r13, r13 jz loc_91397 cmp qword ptr [r15+10h], 0 jnz loc_913F3 cmp qword ptr [r15+20h], 0 jnz loc_913F3 cmp qword ptr [r15+30h], 0 jnz loc_913F3 mov r12, [r13+0] mov rsi, [r13+8] cmp r12, rsi jz short loc_9137F add r15, 40h ; '@' loc_9131F: mov rdi, r12 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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&) test al, al jnz short loc_9137C add r12, 60h ; '`' mov rsi, [r13+8] cmp r12, rsi jnz short loc_9131F jmp short loc_9137F loc_9133D: mov rdi, [rdx+8] sub rdi, [rdx] sar rdi, 4 imul rdi, rcx movsxd rsi, eax add rsi, rdi loc_91352: mov rax, [rdx] mov rdx, [rdx+8] sub rdx, rax sar rdx, 4 imul rdx, rcx cmp rdx, rsi jbe short loc_913E5 lea rcx, [rsi+rsi*4] shl rcx, 4 add rax, rcx mov rdi, rbx mov rsi, rax jmp short loc_91390 loc_9137C: mov rsi, r12 loc_9137F: mov rax, [r14+20h] cmp rsi, [rax+8] jz short loc_91397 add rsi, 10h; minja::Value * mov rdi, rbx; this loc_91390: call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_913D3 loc_91397: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 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) loc_913D3: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_913E5: 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_913F3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+78h+var_70] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_91478 mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_91478 mov r14, rax mov bpl, 1 loc_91478: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9149B mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9149B mov r14, rax mov bpl, 1 loc_9149B: test bpl, bpl jz short loc_914A8 mov rdi, rbx; void * call ___cxa_free_exception loc_914A8: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::Value::get(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4) { int v5; // eax long long *v6; // rdx unsigned long long v7; // rsi unsigned __int8 **v8; // r13 unsigned __int8 *v9; // r12 unsigned __int8 *v10; // rsi unsigned __int8 *v11; // r15 long long v12; // rax unsigned long long v13; // rdx const minja::Value *v14; // rsi void *exception; // rbx _BYTE v17[16]; // [rsp+8h] [rbp-70h] BYREF _BYTE v18[16]; // [rsp+28h] [rbp-50h] BYREF if ( *((_QWORD *)a2 + 2) ) { if ( (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) < 2u ) { v5 = minja::Value::get<int>(a3); v6 = (long long *)*((_QWORD *)a2 + 2); if ( v5 < 0 ) v7 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4) + v5; else v7 = (unsigned int)v5; v12 = *v6; v13 = 0xCCCCCCCCCCCCCCCDLL * ((v6[1] - *v6) >> 4); if ( v13 <= v7 ) std::__throw_out_of_range_fmt( "vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v7, v13); v14 = (const minja::Value *)(80 * v7 + v12); goto LABEL_20; } LABEL_21: *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 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 *)this + 64); 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 *)this + 64); return this; } v8 = (unsigned __int8 **)*((_QWORD *)a2 + 4); if ( !v8 ) goto LABEL_21; if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v17, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v18, (long long)"Unashable type: ", (long long)v17); std::runtime_error::runtime_error(exception, v18); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = *v8; v10 = v8[1]; if ( *v8 != v10 ) { v11 = (unsigned __int8 *)(a3 + 64); while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v9, v11, a4) ) { v9 += 96; v10 = v8[1]; if ( v9 == v10 ) goto LABEL_18; } v10 = v9; } LABEL_18: if ( v10 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) ) goto LABEL_21; v14 = (const minja::Value *)(v10 + 16); LABEL_20: minja::Value::Value(this, v14); return this; }
get: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RSI + 0x10],0x0 JZ 0x001912e0 MOV AL,byte ptr [R15 + 0x40] ADD AL,0xfb CMP AL,0x2 JNC 0x00191397 MOV RDI,R15 CALL 0x00191598 MOV RDX,qword ptr [R14 + 0x10] MOV RCX,-0x3333333333333333 TEST EAX,EAX JS 0x0019133d MOV ESI,EAX JMP 0x00191352 LAB_001912e0: MOV R13,qword ptr [R14 + 0x20] TEST R13,R13 JZ 0x00191397 CMP qword ptr [R15 + 0x10],0x0 JNZ 0x001913f3 CMP qword ptr [R15 + 0x20],0x0 JNZ 0x001913f3 CMP qword ptr [R15 + 0x30],0x0 JNZ 0x001913f3 MOV R12,qword ptr [R13] MOV RSI,qword ptr [R13 + 0x8] CMP R12,RSI JZ 0x0019137f ADD R15,0x40 LAB_0019131f: MOV RDI,R12 MOV RSI,R15 CALL 0x0018df71 TEST AL,AL JNZ 0x0019137c ADD R12,0x60 MOV RSI,qword ptr [R13 + 0x8] CMP R12,RSI JNZ 0x0019131f JMP 0x0019137f LAB_0019133d: MOV RDI,qword ptr [RDX + 0x8] SUB RDI,qword ptr [RDX] SAR RDI,0x4 IMUL RDI,RCX MOVSXD RSI,EAX ADD RSI,RDI LAB_00191352: MOV RAX,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] SUB RDX,RAX SAR RDX,0x4 IMUL RDX,RCX CMP RDX,RSI JBE 0x001913e5 LEA RCX,[RSI + RSI*0x4] SHL RCX,0x4 ADD RAX,RCX MOV RDI,RBX MOV RSI,RAX JMP 0x00191390 LAB_0019137c: MOV RSI,R12 LAB_0019137f: MOV RAX,qword ptr [R14 + 0x20] CMP RSI,qword ptr [RAX + 0x8] JZ 0x00191397 ADD RSI,0x10 MOV RDI,RBX LAB_00191390: CALL 0x0018e64c JMP 0x001913d3 LAB_00191397: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015869e MOV RDI,R14 MOV ESI,0x1 CALL 0x0015869e LAB_001913d3: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001913e5: LEA RDI,[0x1f42fc] XOR EAX,EAX CALL 0x0011bd00 LAB_001913f3: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_00191400: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00187128 LAB_00191414: LEA RSI,[0x1f418e] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00178f1b MOV BPL,0x1 LAB_0019142d: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,RBX CALL 0x0011bf00
/* minja::Value::get(minja::Value const&) */ Value * minja::Value::get(Value *param_1) { long *plVar1; char cVar2; uint uVar3; Value *pVVar4; runtime_error *this; Value *in_RDX; ulong uVar5; long in_RSI; ulong uVar6; basic_json *pbVar7; bool bVar8; basic_json *pbVar9; int1 local_70 [32]; string local_50 [32]; if (*(long *)(in_RSI + 0x10) == 0) { plVar1 = *(long **)(in_RSI + 0x20); if (plVar1 != (long *)0x0) { if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) || (*(long *)(in_RDX + 0x30) != 0)) goto LAB_001913f3; pbVar7 = (basic_json *)plVar1[1]; if ((basic_json *)*plVar1 != pbVar7) { pbVar9 = (basic_json *)*plVar1; do { pbVar7 = pbVar9; cVar2 = nlohmann::json_abi_v3_11_3::operator==(pbVar7,(basic_json *)(in_RDX + 0x40)); if (cVar2 != '\0') break; pbVar9 = pbVar7 + 0x60; pbVar7 = (basic_json *)plVar1[1]; } while (pbVar9 != pbVar7); } if (pbVar7 != *(basic_json **)(*(long *)(in_RSI + 0x20) + 8)) { pVVar4 = (Value *)(pbVar7 + 0x10); goto LAB_00191390; } } } else if ((byte)((char)in_RDX[0x40] - 5U) < 2) { uVar3 = get<int>(in_RDX); plVar1 = *(long **)(in_RSI + 0x10); if ((int)uVar3 < 0) { uVar6 = (long)(int)uVar3 + (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333; } else { uVar6 = (ulong)uVar3; } uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333; if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) { pVVar4 = (Value *)(*plVar1 + uVar6 * 0x50); LAB_00191390: Value(param_1,pVVar4); return param_1; } std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); LAB_001913f3: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00191400 to 00191413 has its CatchHandler @ 00191495 */ dump_abi_cxx11_((int)local_70,SUB81(in_RSI,0)); /* try { // try from 00191414 to 00191429 has its CatchHandler @ 00191472 */ std::operator+((char *)local_50,(string *)"Unashable type: "); /* try { // try from 0019142d to 00191451 has its CatchHandler @ 00191452 */ std::runtime_error::runtime_error(this,local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } bVar8 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar8); 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(bVar8); return param_1; }
30,459
mi_get_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) { uint nod_flag; DBUG_ENTER("_mi_get_key"); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { bmove((uchar*) key,(uchar*) keypos,keyinfo->keylength+nod_flag); DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+=2+nod_flag; key[0]=0; /* safety */ while (page <= keypos) { *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, *return_key_length)); DBUG_RETURN(page); }
O0
c
mi_get_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc6833 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x40(%rbp) jmp 0xc683a xorl %eax, %eax movl %eax, -0x40(%rbp) jmp 0xc683a movl -0x40(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0xc688d movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rax movzwl 0x12(%rax), %eax addl -0x3c(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a140 movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movzwl 0x12(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xc691a movl -0x3c(%rbp), %ecx addl $0x2, %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax ja 0xc690a movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpl $0x0, (%rax) jne 0xc6908 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xb34c0 callq 0xfea30 movl $0x7e, (%rax) movq $0x0, -0x8(%rbp) jmp 0xc691a jmp 0xc68a7 jmp 0xc690c jmp 0xc690e jmp 0xc6910 jmp 0xc6912 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_get_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C6833 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_40], eax jmp short loc_C683A loc_C6833: xor eax, eax mov [rbp+var_40], eax jmp short $+2 loc_C683A: mov eax, [rbp+var_40] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 28h cmp eax, 0 jnz short loc_C688D mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov rax, [rbp+var_18] movzx eax, word ptr [rax+12h] add eax, [rbp+var_3C] mov eax, eax mov edx, eax call _memmove mov rax, [rbp+var_30] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+12h] movsxd rcx, ecx add rax, rcx mov ecx, [rbp+var_3C] add rax, rcx mov [rbp+var_8], rax jmp loc_C691A loc_C688D: mov ecx, [rbp+var_3C] add ecx, 2 mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_C68A7: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] ja short loc_C690A mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_3C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_38] cmp dword ptr [rax], 0 jnz short loc_C6908 mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_8], 0 jmp short loc_C691A loc_C6908: jmp short loc_C68A7 loc_C690A: jmp short $+2 loc_C690C: jmp short $+2 loc_C690E: jmp short $+2 loc_C6910: jmp short $+2 loc_C6912: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_C691A: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
_BYTE * mi_get_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { const char *v6; // rsi unsigned int v8; // [rsp+0h] [rbp-40h] _BYTE *v12; // [rsp+20h] [rbp-20h] BYREF long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; if ( (*a3 & 0x80) != 0 ) v8 = *(_DWORD *)(*(_QWORD *)v14 + 380LL); else v8 = 0; if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 ) { v12 += v8 + 2; *a4 = 0; while ( (unsigned long long)v12 <= a5 ) { *a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v8, &v12, a4); if ( !*a6 ) { v6 = *(const char **)(*(_QWORD *)v14 + 616LL); mi_report_error(126, (long long)v6); *(_DWORD *)my_thread_var(126LL, v6) = 126; return 0LL; } } return v12; } else { memmove(a4, a5, v8 + *(unsigned __int16 *)(v13 + 18)); return (_BYTE *)(v8 + *(unsigned __int16 *)(v13 + 18) + a5); } }
_mi_get_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c6833 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x40],EAX JMP 0x001c683a LAB_001c6833: XOR EAX,EAX MOV dword ptr [RBP + -0x40],EAX JMP 0x001c683a LAB_001c683a: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x28 CMP EAX,0x0 JNZ 0x001c688d MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x12] ADD EAX,dword ptr [RBP + -0x3c] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a140 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0x12] MOVSXD RCX,ECX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001c691a LAB_001c688d: MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_001c68a7: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JA 0x001c690a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX],0x0 JNZ 0x001c6908 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001b34c0 CALL 0x001fea30 MOV dword ptr [RAX],0x7e MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c691a LAB_001c6908: JMP 0x001c68a7 LAB_001c690a: JMP 0x001c690c LAB_001c690c: JMP 0x001c690e LAB_001c690e: JMP 0x001c6910 LAB_001c6910: JMP 0x001c6912 LAB_001c6912: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_001c691a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
byte * _mi_get_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5, int *param_6) { int iVar1; int4 *puVar2; uint local_48; byte *local_28; long local_20; long *local_18; byte *local_10; if ((*param_3 & 0x80) == 0) { local_48 = 0; } else { local_48 = *(uint *)(*param_1 + 0x17c); } local_20 = param_2; local_18 = param_1; if ((*(ushort *)(param_2 + 10) & 0x28) == 0) { local_28 = param_3; memmove(param_4,param_5,(ulong)(*(ushort *)(param_2 + 0x12) + local_48)); local_10 = param_5 + (ulong)local_48 + (long)(int)(uint)*(ushort *)(local_20 + 0x12); } else { local_28 = param_3 + (local_48 + 2); *param_4 = 0; do { if (param_5 < local_28) { return local_28; } iVar1 = (**(code **)(local_20 + 0x48))(local_20,local_48,&local_28,param_4); *param_6 = iVar1; } while (*param_6 != 0); mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_10 = (byte *)0x0; } return local_10; }
30,460
Player::checkIsDead()
GhostEscape/src/player.cpp
void Player::checkIsDead() { if (!stats_->getIsAlive()){ effect_->setActive(true); effect_->setPosition(getPosition()); setActive(false); game_.playSound("assets/sound/female-scream-02-89290.mp3"); } }
O3
cpp
Player::checkIsDead(): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq 0x68(%rdi), %rax cmpb $0x0, 0x78(%rax) jne 0xd236 movq %rdi, %rbx movq 0xa0(%rdi), %r14 movb $0x1, 0x48(%r14) movq (%rdi), %rax callq *0x50(%rax) leaq -0x38(%rbp), %rsi movlps %xmm0, (%rsi) movq %r14, %rdi callq 0x8e18 movb $0x0, 0x48(%rbx) movq 0x10(%rbx), %r15 leaq -0x28(%rbp), %r14 movq %r14, -0x10(%r14) leaq 0x32c3(%rip), %rsi # 0x104b7 leaq 0x32e3(%rip), %rdx # 0x104de leaq -0x38(%rbp), %rbx movq %rbx, %rdi callq 0x6b6c movq (%r15), %rdi movq %rbx, %rsi callq 0x6ff6 movl $0xffffffff, %edi # imm = 0xFFFFFFFF movq %rax, %rsi xorl %edx, %edx callq 0x5130 movq -0x38(%rbp), %rdi cmpq %r14, %rdi je 0xd236 movq -0x28(%rbp), %rsi incq %rsi callq 0x53d0 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq -0x38(%rbp), %rdi cmpq %r14, %rdi je 0xd259 movq -0x28(%rbp), %rsi incq %rsi callq 0x53d0 movq %rbx, %rdi callq 0x5600 nop
_ZN6Player11checkIsDeadEv: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 28h mov rax, [rdi+68h] cmp byte ptr [rax+78h], 0 jnz short loc_D236 mov rbx, rdi mov r14, [rdi+0A0h] mov byte ptr [r14+48h], 1 mov rax, [rdi] call qword ptr [rax+50h] lea rsi, [rbp+var_38] movlps qword ptr [rsi], xmm0 mov rdi, r14 call _ZN11ObjectWorld11setPositionERKN3glm3vecILi2EfLNS0_9qualifierE0EEE; ObjectWorld::setPosition(glm::vec<2,float,(glm::qualifier)0> const&) mov byte ptr [rbx+48h], 0 mov r15, [rbx+10h] lea r14, [rbp+var_28] mov [r14-10h], r14 lea rsi, aAssetsSoundFem; "assets/sound/female-scream-02-89290.mp3" lea rdx, aAssetsSoundFem+27h; "" lea rbx, [rbp+var_38] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rdi, [r15] mov rsi, rbx call _ZN10AssetStore8getSoundERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AssetStore::getSound(std::string const&) mov edi, 0FFFFFFFFh mov rsi, rax xor edx, edx call _Mix_PlayChannel mov rdi, [rbp+var_38]; void * cmp rdi, r14 jz short loc_D236 mov rsi, [rbp+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D236: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rbp+var_38]; void * cmp rdi, r14 jz short loc_D259 mov rsi, [rbp+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D259: mov rdi, rbx call __Unwind_Resume
void Player::checkIsDead(Player *this, __m128 a2) { long long v2; // r14 long long *v3; // r15 long long Sound; // rax void *v5[2]; // [rsp+8h] [rbp-38h] BYREF _QWORD v6[5]; // [rsp+18h] [rbp-28h] BYREF if ( !*(_BYTE *)(*((_QWORD *)this + 13) + 120LL) ) { v2 = *((_QWORD *)this + 20); *(_BYTE *)(v2 + 72) = 1; *(double *)a2.m128_u64 = (*(double ( **)(Player *))(*(_QWORD *)this + 80LL))(this); _mm_storel_ps((double *)v5, a2); ObjectWorld::setPosition(v2, (unsigned long long *)v5); *((_BYTE *)this + 72) = 0; v3 = (long long *)*((_QWORD *)this + 2); v5[0] = v6; std::string::_M_construct<char const*>((long long)v5, "assets/sound/female-scream-02-89290.mp3", (long long)""); Sound = AssetStore::getSound(*v3, (const char **)v5); Mix_PlayChannel(0xFFFFFFFFLL, Sound, 0LL); if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); } }
checkIsDead: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI + 0x68] CMP byte ptr [RAX + 0x78],0x0 JNZ 0x0010d236 MOV RBX,RDI MOV R14,qword ptr [RDI + 0xa0] MOV byte ptr [R14 + 0x48],0x1 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x50] LEA RSI,[RBP + -0x38] MOVLPS qword ptr [RSI],XMM0 MOV RDI,R14 CALL 0x00108e18 MOV byte ptr [RBX + 0x48],0x0 MOV R15,qword ptr [RBX + 0x10] LEA R14,[RBP + -0x28] MOV qword ptr [R14 + -0x10],R14 LEA RSI,[0x1104b7] LEA RDX,[0x1104de] LEA RBX,[RBP + -0x38] MOV RDI,RBX CALL 0x00106b6c MOV RDI,qword ptr [R15] LAB_0010d20a: MOV RSI,RBX CALL 0x00106ff6 MOV EDI,0xffffffff MOV RSI,RAX XOR EDX,EDX CALL 0x00105130 LAB_0010d221: MOV RDI,qword ptr [RBP + -0x38] CMP RDI,R14 JZ 0x0010d236 MOV RSI,qword ptr [RBP + -0x28] INC RSI CALL 0x001053d0 LAB_0010d236: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* Player::checkIsDead() */ void __thiscall Player::checkIsDead(Player *this) { ObjectWorld *this_00; int8 *puVar1; int8 uVar2; long *local_40 [2]; long local_30 [2]; if (*(char *)(*(long *)(this + 0x68) + 0x78) == '\0') { this_00 = *(ObjectWorld **)(this + 0xa0); this_00[0x48] = (ObjectWorld)0x1; local_40[0] = (long *)(**(code **)(*(long *)this + 0x50))(); ObjectWorld::setPosition(this_00,(vec *)local_40); this[0x48] = (Player)0x0; puVar1 = *(int8 **)(this + 0x10); local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*> ((string *)local_40,"assets/sound/female-scream-02-89290.mp3",""); /* try { // try from 0010d20a to 0010d220 has its CatchHandler @ 0010d241 */ uVar2 = AssetStore::getSound((AssetStore *)*puVar1,(string *)local_40); Mix_PlayChannel(0xffffffff,uVar2,0); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } } return; }
30,461
common_log::add(ggml_log_level, char const*, __va_list_tag*)
monkey531[P]llama/common/log.cpp
void add(enum ggml_log_level level, const char * fmt, va_list args) { std::lock_guard<std::mutex> lock(mtx); if (!running) { // discard messages while the worker thread is paused return; } auto & entry = entries[tail]; { // cannot use args twice, so make a copy in case we need to expand the buffer va_list args_copy; va_copy(args_copy, args); #if 1 const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args); if (n >= entry.msg.size()) { entry.msg.resize(n + 1); vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy); } #else // hack for bolding arguments std::stringstream ss; for (int i = 0; fmt[i] != 0; i++) { if (fmt[i] == '%') { ss << LOG_COL_BOLD; while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++]; ss << LOG_COL_DEFAULT; if (fmt[i] == 0) break; } ss << fmt[i]; } const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args); if (n >= entry.msg.size()) { entry.msg.resize(n + 1); vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy); } #endif va_end(args_copy); } entry.level = level; entry.prefix = prefix; entry.timestamp = 0; if (timestamps) { entry.timestamp = t_us() - t_start; } entry.is_end = false; tail = (tail + 1) % entries.size(); if (tail == head) { // expand the buffer std::vector<common_log_entry> new_entries(2*entries.size()); size_t new_tail = 0; do { new_entries[new_tail] = std::move(entries[head]); head = (head + 1) % entries.size(); new_tail = (new_tail + 1); } while (head != tail); head = 0; tail = new_tail; for (size_t i = tail; i < new_entries.size(); i++) { new_entries[i].msg.resize(256); } entries = std::move(new_entries); } cv.notify_one(); }
O2
cpp
common_log::add(ggml_log_level, char const*, __va_list_tag*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx callq 0x8420c cmpb $0x1, 0x6a(%rbx) jne 0x83c7f movl %ebp, 0xc(%rsp) movq 0x78(%rbx), %r13 imulq $0x30, 0x98(%rbx), %rbp movq %r13, %r12 addq %rbp, %r12 movq 0x10(%r15), %rax movq %rax, 0x20(%rsp) movups (%r15), %xmm0 movaps %xmm0, 0x10(%rsp) movq 0x10(%r13,%rbp), %rdi movq 0x18(%r13,%rbp), %rsi subq %rdi, %rsi movq %r14, %rdx movq %r15, %rcx callq 0x21dd0 movslq %eax, %rsi movq 0x18(%r13,%rbp), %rax subq 0x10(%r13,%rbp), %rax cmpq %rsi, %rax ja 0x83b35 leaq 0x10(,%rbp), %rdi addq %r13, %rdi incq %rsi callq 0x5945c movq 0x10(%r12), %rdi movq 0x18(%r12), %rsi subq %rdi, %rsi leaq 0x10(%rsp), %rcx movq %r14, %rdx callq 0x21dd0 movl 0xc(%rsp), %eax movl %eax, (%r12) movb 0x68(%rbx), %al movb %al, 0x4(%r12) andq $0x0, 0x8(%r12) cmpb $0x1, 0x69(%rbx) jne 0x83b5f callq 0x8390e subq 0x70(%rbx), %rax movq %rax, 0x8(%r12) movb $0x0, 0x28(%r12) movq 0x80(%rbx), %rax movq 0x98(%rbx), %rcx incq %rcx subq 0x78(%rbx), %rax pushq $0x30 popq %r15 cqto idivq %r15 movq %rax, %rsi movq %rcx, %rax xorl %edx, %edx divq %rsi movq %rdx, 0x98(%rbx) cmpq 0x90(%rbx), %rdx jne 0x83c76 addq %rsi, %rsi leaq 0x10(%rsp), %rdi leaq 0xb(%rsp), %rdx callq 0x846fc leaq 0x78(%rbx), %r14 movq 0x78(%rbx), %rdi movq 0x90(%rbx), %rdx pushq $0x10 popq %r12 xorl %r13d, %r13d imulq $0x30, %rdx, %rsi addq %rdi, %rsi movq 0x10(%rsp), %rax leaq (%rax,%r12), %rdi addq $-0x10, %rdi callq 0x8474e movq 0x90(%rbx), %rcx incq %rcx movq 0x78(%rbx), %rdi movq 0x80(%rbx), %rax subq %rdi, %rax cqto idivq %r15 movq %rax, %rsi movq %rcx, %rax xorl %edx, %edx divq %rsi movq %rdx, 0x90(%rbx) incq %r13 addq $0x30, %r12 cmpq 0x98(%rbx), %rdx jne 0x83bca andq $0x0, 0x90(%rbx) movq %r13, 0x98(%rbx) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rax subq %rdi, %rax cqto idivq %r15 cmpq %rax, %r13 jae 0x83c5e addq %r12, %rdi movl $0x100, %esi # imm = 0x100 callq 0x5945c incq %r13 addq $0x30, %r12 jmp 0x83c31 leaq 0x10(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x8482c movq %r15, %rdi callq 0x83f18 leaq 0x30(%rbx), %rdi callq 0x213b0 movq %rbx, %rdi callq 0x21560 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x83c98 movq %rax, %r14 jmp 0x83caa movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x83f18 movq %rbx, %rdi callq 0x21560 movq %r14, %rdi callq 0x21be0
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi call _ZNSt5mutex4lockEv; std::mutex::lock(void) cmp byte ptr [rbx+6Ah], 1 jnz loc_83C7F mov [rsp+58h+var_4C], ebp mov r13, [rbx+78h] imul rbp, [rbx+98h], 30h ; '0' mov r12, r13 add r12, rbp mov rax, [r15+10h] mov [rsp+58h+var_38], rax movups xmm0, xmmword ptr [r15] movaps [rsp+58h+var_48], xmm0 mov rdi, [r13+rbp+10h] mov rsi, [r13+rbp+18h] sub rsi, rdi mov rdx, r14 mov rcx, r15 call vsnprintf movsxd rsi, eax mov rax, [r13+rbp+18h] sub rax, [r13+rbp+10h] cmp rax, rsi ja short loc_83B35 lea rdi, ds:10h[rbp] add rdi, r13 inc rsi call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) mov rdi, [r12+10h] mov rsi, [r12+18h] sub rsi, rdi lea rcx, [rsp+58h+var_48] mov rdx, r14 call vsnprintf loc_83B35: mov eax, [rsp+58h+var_4C] mov [r12], eax mov al, [rbx+68h] mov [r12+4], al and qword ptr [r12+8], 0 cmp byte ptr [rbx+69h], 1 jnz short loc_83B5F call _ZL4t_usv; t_us(void) sub rax, [rbx+70h] mov [r12+8], rax loc_83B5F: mov byte ptr [r12+28h], 0 mov rax, [rbx+80h] mov rcx, [rbx+98h] inc rcx sub rax, [rbx+78h] push 30h ; '0' pop r15 cqo idiv r15 mov rsi, rax mov rax, rcx xor edx, edx div rsi mov [rbx+98h], rdx cmp rdx, [rbx+90h] jnz loc_83C76 add rsi, rsi lea rdi, [rsp+58h+var_48] lea rdx, [rsp+58h+var_4D] call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&) lea r14, [rbx+78h] mov rdi, [rbx+78h] mov rdx, [rbx+90h] push 10h pop r12 xor r13d, r13d loc_83BCA: imul rsi, rdx, 30h ; '0' add rsi, rdi mov rax, qword ptr [rsp+58h+var_48] lea rdi, [rax+r12] add rdi, 0FFFFFFFFFFFFFFF0h call _ZN16common_log_entryaSEOS_; common_log_entry::operator=(common_log_entry&&) mov rcx, [rbx+90h] inc rcx mov rdi, [rbx+78h] mov rax, [rbx+80h] sub rax, rdi cqo idiv r15 mov rsi, rax mov rax, rcx xor edx, edx div rsi mov [rbx+90h], rdx inc r13 add r12, 30h ; '0' cmp rdx, [rbx+98h] jnz short loc_83BCA and qword ptr [rbx+90h], 0 mov [rbx+98h], r13 loc_83C31: mov rdi, qword ptr [rsp+58h+var_48] mov rax, qword ptr [rsp+58h+var_48+8] sub rax, rdi cqo idiv r15 cmp r13, rax jnb short loc_83C5E add rdi, r12 mov esi, 100h call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong) inc r13 add r12, 30h ; '0' jmp short loc_83C31 loc_83C5E: lea r15, [rsp+58h+var_48] mov rdi, r14 mov rsi, r15 call _ZNSt6vectorI16common_log_entrySaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<common_log_entry>::_M_move_assign(std::vector<common_log_entry>&&,std::integral_constant<bool,true>) mov rdi, r15 call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() loc_83C76: lea rdi, [rbx+30h]; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) loc_83C7F: mov rdi, rbx call _pthread_mutex_unlock add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_83C98: mov r14, rax jmp short loc_83CAA mov r14, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector() loc_83CAA: mov rdi, rbx call _pthread_mutex_unlock mov rdi, r14 call __Unwind_Resume
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4) { long long v7; // r13 long long v8; // rbp long long v9; // r12 std::chrono::_V2::system_clock *v10; // rdi unsigned long long v11; // rsi unsigned long long v12; // rsi unsigned long long v13; // rdx long long v14; // rdi unsigned long long v15; // rdx long long v16; // r12 unsigned long long v17; // r13 char v19; // [rsp+Bh] [rbp-4Dh] BYREF int v20; // [rsp+Ch] [rbp-4Ch] __int128 v21; // [rsp+10h] [rbp-48h] BYREF long long v22; // [rsp+20h] [rbp-38h] std::mutex::lock((std::mutex *)a1); if ( *(_BYTE *)(a1 + 106) == 1 ) { v20 = a2; v7 = *(_QWORD *)(a1 + 120); v8 = 48LL * *(_QWORD *)(a1 + 152); v9 = v8 + v7; v22 = *((_QWORD *)a4 + 2); v21 = *a4; v10 = *(std::chrono::_V2::system_clock **)(v7 + v8 + 16); v11 = (int)vsnprintf(v10, *(_QWORD *)(v7 + v8 + 24) - (_QWORD)v10, a3, a4); if ( *(_QWORD *)(v7 + v8 + 24) - *(_QWORD *)(v7 + v8 + 16) <= v11 ) { std::vector<char>::resize((_QWORD *)(v7 + v8 + 16), v11 + 1); v10 = *(std::chrono::_V2::system_clock **)(v9 + 16); vsnprintf(v10, *(_QWORD *)(v9 + 24) - (_QWORD)v10, a3, &v21); } *(_DWORD *)v9 = v20; *(_BYTE *)(v9 + 4) = *(_BYTE *)(a1 + 104); *(_QWORD *)(v9 + 8) = 0LL; if ( *(_BYTE *)(a1 + 105) == 1 ) *(_QWORD *)(v9 + 8) = t_us(v10) - *(_QWORD *)(a1 + 112); *(_BYTE *)(v9 + 40) = 0; v12 = (*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120)) / 48LL; v13 = (*(_QWORD *)(a1 + 152) + 1LL) % v12; *(_QWORD *)(a1 + 152) = v13; if ( v13 == *(_QWORD *)(a1 + 144) ) { std::vector<common_log_entry>::vector(&v21, 2 * v12, &v19); v14 = *(_QWORD *)(a1 + 120); v15 = *(_QWORD *)(a1 + 144); v16 = 16LL; v17 = 0LL; do { common_log_entry::operator=(v21 + v16 - 16, v14 + 48 * v15); v14 = *(_QWORD *)(a1 + 120); v15 = (*(_QWORD *)(a1 + 144) + 1LL) % (unsigned long long)((*(_QWORD *)(a1 + 128) - v14) / 48); *(_QWORD *)(a1 + 144) = v15; ++v17; v16 += 48LL; } while ( v15 != *(_QWORD *)(a1 + 152) ); *(_QWORD *)(a1 + 144) = 0LL; *(_QWORD *)(a1 + 152) = v17; while ( v17 < (*((_QWORD *)&v21 + 1) - (_QWORD)v21) / 48LL ) { std::vector<char>::resize((_QWORD *)(v16 + v21), 0x100uLL); ++v17; v16 += 48LL; } std::vector<common_log_entry>::_M_move_assign(a1 + 120, &v21, (*((_QWORD *)&v21 + 1) - (_QWORD)v21) % 48LL); std::vector<common_log_entry>::~vector(&v21); } std::condition_variable::notify_one((std::condition_variable *)(a1 + 48)); } return pthread_mutex_unlock(a1); }
add: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI CALL 0x0018420c CMP byte ptr [RBX + 0x6a],0x1 JNZ 0x00183c7f MOV dword ptr [RSP + 0xc],EBP MOV R13,qword ptr [RBX + 0x78] IMUL RBP,qword ptr [RBX + 0x98],0x30 MOV R12,R13 ADD R12,RBP MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RSP + 0x20],RAX MOVUPS XMM0,xmmword ptr [R15] MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10] MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18] SUB RSI,RDI MOV RDX,R14 MOV RCX,R15 CALL 0x00121dd0 MOVSXD RSI,EAX MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18] SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10] CMP RAX,RSI JA 0x00183b35 LEA RDI,[0x10 + RBP*0x1] ADD RDI,R13 INC RSI LAB_00183b16: CALL 0x0015945c MOV RDI,qword ptr [R12 + 0x10] MOV RSI,qword ptr [R12 + 0x18] SUB RSI,RDI LEA RCX,[RSP + 0x10] MOV RDX,R14 CALL 0x00121dd0 LAB_00183b35: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [R12],EAX MOV AL,byte ptr [RBX + 0x68] MOV byte ptr [R12 + 0x4],AL AND qword ptr [R12 + 0x8],0x0 CMP byte ptr [RBX + 0x69],0x1 JNZ 0x00183b5f CALL 0x0018390e SUB RAX,qword ptr [RBX + 0x70] MOV qword ptr [R12 + 0x8],RAX LAB_00183b5f: MOV byte ptr [R12 + 0x28],0x0 MOV RAX,qword ptr [RBX + 0x80] MOV RCX,qword ptr [RBX + 0x98] INC RCX SUB RAX,qword ptr [RBX + 0x78] PUSH 0x30 POP R15 CQO IDIV R15 MOV RSI,RAX MOV RAX,RCX XOR EDX,EDX DIV RSI MOV qword ptr [RBX + 0x98],RDX CMP RDX,qword ptr [RBX + 0x90] JNZ 0x00183c76 ADD RSI,RSI LAB_00183ba5: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xb] CALL 0x001846fc LEA R14,[RBX + 0x78] MOV RDI,qword ptr [RBX + 0x78] MOV RDX,qword ptr [RBX + 0x90] PUSH 0x10 POP R12 XOR R13D,R13D LAB_00183bca: IMUL RSI,RDX,0x30 ADD RSI,RDI MOV RAX,qword ptr [RSP + 0x10] LEA RDI,[RAX + R12*0x1] ADD RDI,-0x10 CALL 0x0018474e MOV RCX,qword ptr [RBX + 0x90] INC RCX MOV RDI,qword ptr [RBX + 0x78] MOV RAX,qword ptr [RBX + 0x80] SUB RAX,RDI CQO IDIV R15 MOV RSI,RAX MOV RAX,RCX XOR EDX,EDX DIV RSI MOV qword ptr [RBX + 0x90],RDX INC R13 ADD R12,0x30 CMP RDX,qword ptr [RBX + 0x98] JNZ 0x00183bca AND qword ptr [RBX + 0x90],0x0 MOV qword ptr [RBX + 0x98],R13 LAB_00183c31: MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RDI CQO IDIV R15 CMP R13,RAX JNC 0x00183c5e ADD RDI,R12 LAB_00183c4b: MOV ESI,0x100 CALL 0x0015945c LAB_00183c55: INC R13 ADD R12,0x30 JMP 0x00183c31 LAB_00183c5e: LEA R15,[RSP + 0x10] MOV RDI,R14 MOV RSI,R15 CALL 0x0018482c MOV RDI,R15 CALL 0x00183f18 LAB_00183c76: LEA RDI,[RBX + 0x30] CALL 0x001213b0 LAB_00183c7f: MOV RDI,RBX CALL 0x00121560 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */ void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4) { char *__s; int iVar1; long lVar2; ulong uVar3; ulong uVar4; long lVar5; int4 *puVar6; allocator local_4d; int4 local_4c; long local_48; long lStack_40; long local_38; std::mutex::lock((mutex *)this); if (this[0x6a] == (common_log)0x1) { lVar2 = *(long *)(this + 0x78); lVar5 = *(long *)(this + 0x98) * 0x30; puVar6 = (int4 *)(lVar2 + lVar5); local_38 = param_4[2]; local_48 = *param_4; lStack_40 = param_4[1]; __s = *(char **)(lVar2 + 0x10 + lVar5); local_4c = param_2; iVar1 = vsnprintf(__s,*(long *)(lVar2 + 0x18 + lVar5) - (long)__s,param_3,param_4); if ((ulong)(*(long *)(lVar2 + 0x18 + lVar5) - *(long *)(lVar2 + 0x10 + lVar5)) <= (ulong)(long)iVar1) { /* try { // try from 00183b16 to 00183b1a has its CatchHandler @ 00183c98 */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(lVar5 + 0x10 + lVar2),(long)iVar1 + 1); vsnprintf(*(char **)(puVar6 + 4),*(long *)(puVar6 + 6) - (long)*(char **)(puVar6 + 4),param_3, &local_48); } *puVar6 = local_4c; *(common_log *)(puVar6 + 1) = this[0x68]; *(int8 *)(puVar6 + 2) = 0; if (this[0x69] == (common_log)0x1) { lVar2 = t_us(); *(long *)(puVar6 + 2) = lVar2 - *(long *)(this + 0x70); } *(int1 *)(puVar6 + 10) = 0; uVar3 = (*(long *)(this + 0x80) - *(long *)(this + 0x78)) / 0x30; uVar4 = (*(long *)(this + 0x98) + 1U) % uVar3; *(ulong *)(this + 0x98) = uVar4; if (uVar4 == *(ulong *)(this + 0x90)) { /* try { // try from 00183ba5 to 00183bb3 has its CatchHandler @ 00183c96 */ std::vector<common_log_entry,std::allocator<common_log_entry>>::vector ((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,uVar3 * 2, &local_4d); lVar2 = *(long *)(this + 0x78); uVar3 = *(ulong *)(this + 0x90); lVar5 = 0x10; uVar4 = 0; do { common_log_entry::operator= ((common_log_entry *)(local_48 + lVar5 + -0x10), (common_log_entry *)(uVar3 * 0x30 + lVar2)); lVar2 = *(long *)(this + 0x78); uVar3 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - lVar2) / 0x30); *(ulong *)(this + 0x90) = uVar3; uVar4 = uVar4 + 1; lVar5 = lVar5 + 0x30; } while (uVar3 != *(ulong *)(this + 0x98)); *(int8 *)(this + 0x90) = 0; *(ulong *)(this + 0x98) = uVar4; while( true ) { if ((ulong)((lStack_40 - local_48) / 0x30) <= uVar4) break; /* try { // try from 00183c4b to 00183c54 has its CatchHandler @ 00183c9d */ std::vector<char,std::allocator<char>>::resize ((vector<char,std::allocator<char>> *)(local_48 + lVar5),0x100); uVar4 = uVar4 + 1; lVar5 = lVar5 + 0x30; } std::vector<common_log_entry,std::allocator<common_log_entry>>::_M_move_assign (this + 0x78,(vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48, (lStack_40 - local_48) % 0x30); std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector ((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48); } std::condition_variable::notify_one(); } pthread_mutex_unlock((pthread_mutex_t *)this); return; }
30,462
alaya::RawSpace<unsigned char, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::set_metric_function()
AlayaLite/include/space/raw_space.hpp
void set_metric_function() { switch (metric_) { case MetricType::L2: distance_calu_func_ = l2_sqr<DataType, DistanceType>; break; case MetricType::IP: case MetricType::COS: distance_calu_func_ = ip_sqr<DataType, DistanceType>; break; default: break; } }
O0
cpp
alaya::RawSpace<unsigned char, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int>>::set_metric_function(): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x18(%rsp) movl (%rax), %eax movl %eax, -0xc(%rsp) testl %eax, %eax je 0x28be8 jmp 0x28bdb movl -0xc(%rsp), %eax decl %eax subl $0x2, %eax jb 0x28bfa jmp 0x28c0c movq -0x18(%rsp), %rax leaq -0x324(%rip), %rcx # 0x288d0 movq %rcx, 0x8(%rax) jmp 0x28c0e movq -0x18(%rsp), %rax leaq 0x214a(%rip), %rcx # 0x2ad50 movq %rcx, 0x8(%rax) jmp 0x28c0e jmp 0x28c0e retq nop
_ZN5alaya8RawSpaceIhfjNS_17SequentialStorageIhjEEE19set_metric_functionEv: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov [rsp+var_18], rax mov eax, [rax] mov [rsp+var_C], eax test eax, eax jz short loc_28BE8 jmp short $+2 loc_28BDB: mov eax, [rsp+var_C] dec eax sub eax, 2 jb short loc_28BFA jmp short loc_28C0C loc_28BE8: mov rax, [rsp+var_18] lea rcx, _ZN5alaya6l2_sqrIhfEET0_PT_S3_m; alaya::l2_sqr<uchar,float>(uchar *,uchar *,ulong) mov [rax+8], rcx jmp short locret_28C0E loc_28BFA: mov rax, [rsp+var_18] lea rcx, _ZN5alaya6ip_sqrIhfEET0_PT_S3_m; alaya::ip_sqr<uchar,float>(uchar *,uchar *,ulong) mov [rax+8], rcx jmp short locret_28C0E loc_28C0C: jmp short $+2 locret_28C0E: retn
long long alaya::RawSpace<unsigned char,float,unsigned int,alaya::SequentialStorage<unsigned char,unsigned int>>::set_metric_function( int *a1) { long long result; // rax int v2; // [rsp+Ch] [rbp-Ch] v2 = *a1; if ( *a1 ) { result = (unsigned int)(v2 - 3); if ( (unsigned int)(v2 - 1) < 2 ) { result = (long long)a1; *((_QWORD *)a1 + 1) = alaya::ip_sqr<unsigned char,float>; } } else { result = (long long)a1; *((_QWORD *)a1 + 1) = alaya::l2_sqr<unsigned char,float>; } return result; }
set_metric_function: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x18],RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + -0xc],EAX TEST EAX,EAX JZ 0x00128be8 JMP 0x00128bdb LAB_00128bdb: MOV EAX,dword ptr [RSP + -0xc] DEC EAX SUB EAX,0x2 JC 0x00128bfa JMP 0x00128c0c LAB_00128be8: MOV RAX,qword ptr [RSP + -0x18] LEA RCX,[0x1288d0] MOV qword ptr [RAX + 0x8],RCX JMP 0x00128c0e LAB_00128bfa: MOV RAX,qword ptr [RSP + -0x18] LEA RCX,[0x12ad50] MOV qword ptr [RAX + 0x8],RCX JMP 0x00128c0e LAB_00128c0c: JMP 0x00128c0e LAB_00128c0e: RET
/* alaya::RawSpace<unsigned char, float, unsigned int, alaya::SequentialStorage<unsigned char, unsigned int> >::set_metric_function() */ RawSpace<unsigned_char,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> * __thiscall alaya:: RawSpace<unsigned_char,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>>:: set_metric_function(RawSpace<unsigned_char,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *this) { int iVar1; RawSpace<unsigned_char,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *pRVar2; iVar1 = *(int *)this; if (iVar1 == 0) { *(code **)(this + 8) = l2_sqr<unsigned_char,float>; pRVar2 = this; } else { pRVar2 = (RawSpace<unsigned_char,float,unsigned_int,alaya::SequentialStorage<unsigned_char,unsigned_int>> *)(ulong)(iVar1 - 3); if (iVar1 - 1U < 2) { *(code **)(this + 8) = ip_sqr<unsigned_char,float>; pRVar2 = this; } } return pRVar2; }
30,463
link_block
eloqsql/mysys/mf_keycache.c
static void link_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block, my_bool hot, my_bool at_end) { BLOCK_LINK *ins; BLOCK_LINK **pins; DBUG_ASSERT((block->status & ~BLOCK_CHANGED) == (BLOCK_READ | BLOCK_IN_USE)); DBUG_ASSERT(block->hash_link); /*backptr to block NULL from free_block()*/ DBUG_ASSERT(!block->requests); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->next_used); DBUG_ASSERT(!block->prev_used); if (!hot && keycache->waiting_for_block.last_thread) { /* Signal that in the LRU warm sub-chain an available block has appeared */ struct st_my_thread_var *last_thread= keycache->waiting_for_block.last_thread; struct st_my_thread_var *first_thread= last_thread->next; struct st_my_thread_var *next_thread= first_thread; HASH_LINK *hash_link= (HASH_LINK *) first_thread->keycache_link; struct st_my_thread_var *thread; do { thread= next_thread; next_thread= thread->next; /* We notify about the event all threads that ask for the same page as the first thread in the queue */ if ((HASH_LINK *) thread->keycache_link == hash_link) { KEYCACHE_DBUG_PRINT("link_block: signal", ("thread %ld", (ulong) thread->id)); keycache_pthread_cond_signal(&thread->suspend); unlink_from_queue(&keycache->waiting_for_block, thread); block->requests++; } } while (thread != last_thread); hash_link->block= block; /* NOTE: We assigned the block to the hash_link and signalled the requesting thread(s). But it is possible that other threads runs first. These threads see the hash_link assigned to a block which is assigned to another hash_link and not marked BLOCK_IN_SWITCH. This can be a problem for functions that do not select the block via its hash_link: flush and free. They do only see a block which is in a "normal" state and don't know that it will be evicted soon. We cannot set BLOCK_IN_SWITCH here because only one of the requesting threads must handle the eviction. All others must wait for it to complete. If we set the flag here, the threads would not know who is in charge of the eviction. Without the flag, the first thread takes the stick and sets the flag. But we need to note in the block that is has been selected for eviction. It must not be freed. The evicting thread will not expect the block in the free list. Before freeing we could also check if block->requests > 1. But I think including another flag in the check of block->status is slightly more efficient and probably easier to read. */ block->status|= BLOCK_IN_EVICTION; KEYCACHE_THREAD_TRACE("link_block: after signaling"); #if defined(KEYCACHE_DEBUG) KEYCACHE_DBUG_PRINT("link_block", ("linked,unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); #endif return; } pins= hot ? &keycache->used_ins : &keycache->used_last; ins= *pins; if (ins) { ins->next_used->prev_used= &block->next_used; block->next_used= ins->next_used; block->prev_used= &ins->next_used; ins->next_used= block; if (at_end) *pins= block; } else { /* The LRU ring is empty. Let the block point to itself. */ keycache->used_last= keycache->used_ins= block->next_used= block; block->prev_used= &block->next_used; } KEYCACHE_THREAD_TRACE("link_block"); #if defined(KEYCACHE_DEBUG) keycache->blocks_available++; KEYCACHE_DBUG_PRINT("link_block", ("linked block %u:%1u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), at_end, block->status, block->requests, keycache->blocks_available)); KEYCACHE_DBUG_ASSERT((ulong) keycache->blocks_available <= keycache->blocks_used); #endif }
O3
c
link_block: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r12 testb %dl, %dl je 0x986d0 leaq 0xb8(%r12), %r9 leaq 0xb0(%r12), %r10 xorl %r8d, %r8d testb %dl, %dl setne %r8b movq %r9, %rax cmoveq %r10, %rax movq 0xb0(%r12,%r8,8), %rdx testq %rdx, %rdx je 0x98792 movq (%rdx), %rdi movq %r14, 0x8(%rdi) movq (%rdx), %rdi movq %rdi, (%r14) movq %rdx, 0x8(%r14) movq %r14, (%rdx) testb %cl, %cl je 0x987aa movq %r14, (%rax) jmp 0x987aa movq 0x120(%r12), %r15 testq %r15, %r15 je 0x9867b movq 0x88(%r15), %r13 movq 0xa8(%r13), %rax movq %rax, -0x30(%rbp) movq 0x88(%r13), %rbx cmpq %rax, 0xa8(%r13) jne 0x9876f movq 0x38(%r13), %rdi testq %rdi, %rdi jne 0x9877d leaq 0x8(%r13), %rdi callq 0x295c0 movq 0x88(%r13), %rax cmpq %r13, %rax je 0x98752 movq 0x90(%r13), %rcx movq %rcx, 0x90(%rax) movq 0x88(%r13), %rax movq %rax, (%rcx) cmpq %r13, 0x120(%r12) jne 0x9875c movq 0x90(%r13), %rax movq $-0x88, %rcx addq %rcx, %rax jmp 0x98754 xorl %eax, %eax movq %rax, 0x120(%r12) movq $0x0, 0x88(%r13) incl 0x38(%r14) movq -0x30(%rbp), %rax cmpq %r15, %r13 movq %rbx, %r13 jne 0x986ef jmp 0x987a1 leaq 0x2ed88c(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x170(%rax) jmp 0x98708 movq %r14, (%r14) movq %r14, (%r9) movq %r14, (%r10) movq %r14, 0x8(%r14) jmp 0x987aa movq %r14, 0x10(%rax) orb $-0x80, 0x50(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
link_block_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov r12, rdi test dl, dl jz short loc_986D0 loc_9867B: lea r9, [r12+0B8h] lea r10, [r12+0B0h] xor r8d, r8d test dl, dl setnz r8b mov rax, r9 cmovz rax, r10 mov rdx, [r12+r8*8+0B0h] test rdx, rdx jz loc_98792 mov rdi, [rdx] mov [rdi+8], r14 mov rdi, [rdx] mov [r14], rdi mov [r14+8], rdx mov [rdx], r14 test cl, cl jz loc_987AA mov [rax], r14 jmp loc_987AA loc_986D0: mov r15, [r12+120h] test r15, r15 jz short loc_9867B mov r13, [r15+88h] mov rax, [r13+0A8h] mov [rbp+var_30], rax loc_986EF: mov rbx, [r13+88h] cmp [r13+0A8h], rax jnz short loc_9876F mov rdi, [r13+38h] test rdi, rdi jnz short loc_9877D loc_98708: lea rdi, [r13+8] call _pthread_cond_signal mov rax, [r13+88h] cmp rax, r13 jz short loc_98752 mov rcx, [r13+90h] mov [rax+90h], rcx mov rax, [r13+88h] mov [rcx], rax cmp [r12+120h], r13 jnz short loc_9875C mov rax, [r13+90h] mov rcx, 0FFFFFFFFFFFFFF78h add rax, rcx jmp short loc_98754 loc_98752: xor eax, eax loc_98754: mov [r12+120h], rax loc_9875C: mov qword ptr [r13+88h], 0 inc dword ptr [r14+38h] mov rax, [rbp+var_30] loc_9876F: cmp r13, r15 mov r13, rbx jnz loc_986EF jmp short loc_987A1 loc_9877D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp loc_98708 loc_98792: mov [r14], r14 mov [r9], r14 mov [r10], r14 mov [r14+8], r14 jmp short loc_987AA loc_987A1: mov [rax+10h], r14 or byte ptr [r14+50h], 80h loc_987AA: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * link_block_0(_QWORD *a1, long long a2, char a3, char a4) { _QWORD *result; // rax long long v5; // rdx _QWORD *v6; // r15 _QWORD *v7; // r13 _QWORD *v8; // rbx _QWORD *v9; // rax _QWORD *v10; // rcx long long v11; // rax bool v12; // zf _QWORD *v13; // [rsp+0h] [rbp-30h] if ( !a3 ) { v6 = (_QWORD *)a1[36]; if ( v6 ) { v7 = (_QWORD *)v6[17]; result = (_QWORD *)v7[21]; v13 = result; while ( 1 ) { v8 = (_QWORD *)v7[17]; if ( (_QWORD *)v7[21] == result ) break; LABEL_18: v12 = v7 == v6; v7 = v8; if ( v12 ) { result[2] = a2; *(_BYTE *)(a2 + 80) |= 0x80u; return result; } } if ( v7[7] ) PSI_server[46](); pthread_cond_signal(v7 + 1); v9 = (_QWORD *)v7[17]; if ( v9 == v7 ) { v11 = 0LL; } else { v10 = (_QWORD *)v7[18]; v9[18] = v10; *v10 = v7[17]; if ( (_QWORD *)a1[36] != v7 ) { LABEL_17: v7[17] = 0LL; ++*(_DWORD *)(a2 + 56); result = v13; goto LABEL_18; } v11 = v7[18] - 136LL; } a1[36] = v11; goto LABEL_17; } } result = a1 + 23; if ( !a3 ) result = a1 + 22; v5 = a1[(a3 != 0) + 22]; if ( v5 ) { *(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2; *(_QWORD *)a2 = *(_QWORD *)v5; *(_QWORD *)(a2 + 8) = v5; *(_QWORD *)v5 = a2; if ( a4 ) *result = a2; } else { *(_QWORD *)a2 = a2; a1[23] = a2; a1[22] = a2; *(_QWORD *)(a2 + 8) = a2; } return result; }
link_block: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV R12,RDI TEST DL,DL JZ 0x001986d0 LAB_0019867b: LEA R9,[R12 + 0xb8] LEA R10,[R12 + 0xb0] XOR R8D,R8D TEST DL,DL SETNZ R8B MOV RAX,R9 CMOVZ RAX,R10 MOV RDX,qword ptr [R12 + R8*0x8 + 0xb0] TEST RDX,RDX JZ 0x00198792 MOV RDI,qword ptr [RDX] MOV qword ptr [RDI + 0x8],R14 MOV RDI,qword ptr [RDX] MOV qword ptr [R14],RDI MOV qword ptr [R14 + 0x8],RDX MOV qword ptr [RDX],R14 TEST CL,CL JZ 0x001987aa MOV qword ptr [RAX],R14 JMP 0x001987aa LAB_001986d0: MOV R15,qword ptr [R12 + 0x120] TEST R15,R15 JZ 0x0019867b MOV R13,qword ptr [R15 + 0x88] MOV RAX,qword ptr [R13 + 0xa8] MOV qword ptr [RBP + -0x30],RAX LAB_001986ef: MOV RBX,qword ptr [R13 + 0x88] CMP qword ptr [R13 + 0xa8],RAX JNZ 0x0019876f MOV RDI,qword ptr [R13 + 0x38] TEST RDI,RDI JNZ 0x0019877d LAB_00198708: LEA RDI,[R13 + 0x8] CALL 0x001295c0 MOV RAX,qword ptr [R13 + 0x88] CMP RAX,R13 JZ 0x00198752 MOV RCX,qword ptr [R13 + 0x90] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [R13 + 0x88] MOV qword ptr [RCX],RAX CMP qword ptr [R12 + 0x120],R13 JNZ 0x0019875c MOV RAX,qword ptr [R13 + 0x90] MOV RCX,-0x88 ADD RAX,RCX JMP 0x00198754 LAB_00198752: XOR EAX,EAX LAB_00198754: MOV qword ptr [R12 + 0x120],RAX LAB_0019875c: MOV qword ptr [R13 + 0x88],0x0 INC dword ptr [R14 + 0x38] MOV RAX,qword ptr [RBP + -0x30] LAB_0019876f: CMP R13,R15 MOV R13,RBX JNZ 0x001986ef JMP 0x001987a1 LAB_0019877d: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00198708 LAB_00198792: MOV qword ptr [R14],R14 MOV qword ptr [R9],R14 MOV qword ptr [R10],R14 MOV qword ptr [R14 + 0x8],R14 JMP 0x001987aa LAB_001987a1: MOV qword ptr [RAX + 0x10],R14 OR byte ptr [R14 + 0x50],0x80 LAB_001987aa: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void link_block(long param_1,long *param_2,char param_3,char param_4) { long *plVar1; long lVar2; long lVar3; long lVar4; int8 *puVar5; long lVar6; long lVar7; bool bVar8; if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) { lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8); lVar7 = *(long *)(lVar2 + 0x88); do { lVar4 = *(long *)(lVar7 + 0x88); if (*(long *)(lVar7 + 0xa8) == lVar3) { if (*(long *)(lVar7 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(lVar7 + 8)); if (*(long *)(lVar7 + 0x88) == lVar7) { lVar6 = 0; LAB_00198754: *(long *)(param_1 + 0x120) = lVar6; } else { puVar5 = *(int8 **)(lVar7 + 0x90); *(int8 **)(*(long *)(lVar7 + 0x88) + 0x90) = puVar5; *puVar5 = *(int8 *)(lVar7 + 0x88); if (*(long *)(param_1 + 0x120) == lVar7) { lVar6 = *(long *)(lVar7 + 0x90) + -0x88; goto LAB_00198754; } } *(int8 *)(lVar7 + 0x88) = 0; *(int *)(param_2 + 7) = (int)param_2[7] + 1; } bVar8 = lVar7 != lVar2; lVar7 = lVar4; } while (bVar8); *(long **)(lVar3 + 0x10) = param_2; *(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 0x80; } else { puVar5 = (int8 *)(param_1 + 0xb8); if (param_3 == '\0') { puVar5 = (int8 *)(param_1 + 0xb0); } plVar1 = *(long **)(param_1 + 0xb0 + (ulong)(param_3 != '\0') * 8); if (plVar1 == (long *)0x0) { *param_2 = (long)param_2; *(int8 *)(param_1 + 0xb8) = param_2; *(int8 *)(param_1 + 0xb0) = param_2; param_2[1] = (long)param_2; } else { *(long **)(*plVar1 + 8) = param_2; *param_2 = *plVar1; param_2[1] = (long)plVar1; *plVar1 = (long)param_2; if (param_4 != '\0') { *puVar5 = param_2; } } } return; }
30,464
Elevetor::out_to_inside(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::out_to_inside(int newstair,int direct_) { endstair = newstair; if(direct_ == 1){ up_out->erase( std::remove(up_out->begin(),up_out->end(),newstair), up_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); }else{ down_out->erase( std::remove(down_out->begin(),down_out->end(),newstair), down_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); } if(status == 3){ //需要修改目的地 return 2; }else if(status == 1){ //无需修改目的地,但需要启动去寻找目标 return 1; }else{ //通常不会出现此情况 return 0; } }
O0
cpp
Elevetor::out_to_inside(int, int): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xb0(%rbp) movl -0x14(%rbp), %ecx movl %ecx, 0x44(%rax) cmpl $0x1, -0x18(%rbp) jne 0x1238e movq -0xb0(%rbp), %rax movq 0x10(%rax), %rcx movq %rcx, -0xb8(%rbp) movq 0x10(%rax), %rdi callq 0x12f00 movq %rax, %rcx movq -0xb0(%rbp), %rax movq %rcx, -0x30(%rbp) movq 0x10(%rax), %rdi callq 0x12f40 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi leaq -0x14(%rbp), %rdx callq 0x12eb0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rsi leaq -0x20(%rbp), %rdi callq 0x12f80 movq -0xb0(%rbp), %rax movq 0x10(%rax), %rdi callq 0x12f40 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rsi leaq -0x40(%rbp), %rdi callq 0x12f80 movq -0xb8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x12e10 movq -0xb0(%rbp), %rdi movq %rax, -0x50(%rbp) addq $0x68, %rdi movl -0x14(%rbp), %esi callq 0x12fc0 movq -0xb0(%rbp), %rdi addq $0x68, %rdi callq 0x12f00 movq -0xb0(%rbp), %rdi movq %rax, -0x58(%rbp) addq $0x68, %rdi callq 0x12f40 movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi callq 0x12ff0 jmp 0x12482 movq -0xb0(%rbp), %rax movq 0x18(%rax), %rcx movq %rcx, -0xc0(%rbp) movq 0x18(%rax), %rdi callq 0x12f00 movq %rax, %rcx movq -0xb0(%rbp), %rax movq %rcx, -0x78(%rbp) movq 0x18(%rax), %rdi callq 0x12f40 movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rdi movq -0x80(%rbp), %rsi leaq -0x14(%rbp), %rdx callq 0x12eb0 movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rsi leaq -0x68(%rbp), %rdi callq 0x12f80 movq -0xb0(%rbp), %rax movq 0x18(%rax), %rdi callq 0x12f40 movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rsi leaq -0x88(%rbp), %rdi callq 0x12f80 movq -0xc0(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x12e10 movq -0xb0(%rbp), %rdi movq %rax, -0x98(%rbp) addq $0x68, %rdi movl -0x14(%rbp), %esi callq 0x12fc0 movq -0xb0(%rbp), %rdi addq $0x68, %rdi callq 0x12f00 movq -0xb0(%rbp), %rdi movq %rax, -0xa0(%rbp) addq $0x68, %rdi callq 0x12f40 movq %rax, -0xa8(%rbp) movq -0xa0(%rbp), %rdi movq -0xa8(%rbp), %rsi callq 0x12ff0 movq -0xb0(%rbp), %rax cmpl $0x3, 0x4c(%rax) jne 0x12498 movl $0x2, -0x4(%rbp) jmp 0x124b5 movq -0xb0(%rbp), %rax cmpl $0x1, 0x4c(%rax) jne 0x124ae movl $0x1, -0x4(%rbp) jmp 0x124b5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN8Elevetor13out_to_insideEii: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] mov [rbp+var_B0], rax mov ecx, [rbp+var_14] mov [rax+44h], ecx cmp [rbp+var_18], 1 jnz loc_1238E mov rax, [rbp+var_B0] mov rcx, [rax+10h] mov [rbp+var_B8], rcx mov rdi, [rax+10h] call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov rcx, rax mov rax, [rbp+var_B0] mov [rbp+var_30], rcx mov rdi, [rax+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] lea rdx, [rbp+var_14] call _ZSt6removeIN5QListIiE8iteratorEiET_S3_S3_RKT0_; std::remove<QList<int>::iterator,int>(QList<int>::iterator,QList<int>::iterator,int const&) mov [rbp+var_28], rax mov rsi, [rbp+var_28] lea rdi, [rbp+var_20] call _ZN5QListIiE14const_iteratorC2ENS0_8iteratorE; QList<int>::const_iterator::const_iterator(QList<int>::iterator) mov rax, [rbp+var_B0] mov rdi, [rax+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_48], rax mov rsi, [rbp+var_48] lea rdi, [rbp+var_40] call _ZN5QListIiE14const_iteratorC2ENS0_8iteratorE; QList<int>::const_iterator::const_iterator(QList<int>::iterator) mov rdi, [rbp+var_B8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_40] call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov rdi, [rbp+var_B0] mov [rbp+var_50], rax add rdi, 68h ; 'h' mov esi, [rbp+var_14] call _ZN5QListIiE9push_backEi; QList<int>::push_back(int) mov rdi, [rbp+var_B0] add rdi, 68h ; 'h' call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov rdi, [rbp+var_B0] mov [rbp+var_58], rax add rdi, 68h ; 'h' call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_60], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] call _ZSt4sortIN5QListIiE8iteratorEEvT_S3_; std::sort<QList<int>::iterator>(QList<int>::iterator,QList<int>::iterator) jmp loc_12482 loc_1238E: mov rax, [rbp+var_B0] mov rcx, [rax+18h] mov [rbp+var_C0], rcx mov rdi, [rax+18h] call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov rcx, rax mov rax, [rbp+var_B0] mov [rbp+var_78], rcx mov rdi, [rax+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_80], rax mov rdi, [rbp+var_78] mov rsi, [rbp+var_80] lea rdx, [rbp+var_14] call _ZSt6removeIN5QListIiE8iteratorEiET_S3_S3_RKT0_; std::remove<QList<int>::iterator,int>(QList<int>::iterator,QList<int>::iterator,int const&) mov [rbp+var_70], rax mov rsi, [rbp+var_70] lea rdi, [rbp+var_68] call _ZN5QListIiE14const_iteratorC2ENS0_8iteratorE; QList<int>::const_iterator::const_iterator(QList<int>::iterator) mov rax, [rbp+var_B0] mov rdi, [rax+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_90], rax mov rsi, [rbp+var_90] lea rdi, [rbp+var_88] call _ZN5QListIiE14const_iteratorC2ENS0_8iteratorE; QList<int>::const_iterator::const_iterator(QList<int>::iterator) mov rdi, [rbp+var_C0] mov rsi, [rbp+var_68] mov rdx, [rbp+var_88] call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov rdi, [rbp+var_B0] mov [rbp+var_98], rax add rdi, 68h ; 'h' mov esi, [rbp+var_14] call _ZN5QListIiE9push_backEi; QList<int>::push_back(int) mov rdi, [rbp+var_B0] add rdi, 68h ; 'h' call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov rdi, [rbp+var_B0] mov [rbp+var_A0], rax add rdi, 68h ; 'h' call _ZN5QListIiE3endEv; QList<int>::end(void) mov [rbp+var_A8], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_A8] call _ZSt4sortIN5QListIiE8iteratorEEvT_S3_; std::sort<QList<int>::iterator>(QList<int>::iterator,QList<int>::iterator) loc_12482: mov rax, [rbp+var_B0] cmp dword ptr [rax+4Ch], 3 jnz short loc_12498 mov [rbp+var_4], 2 jmp short loc_124B5 loc_12498: mov rax, [rbp+var_B0] cmp dword ptr [rax+4Ch], 1 jnz short loc_124AE mov [rbp+var_4], 1 jmp short loc_124B5 loc_124AE: mov [rbp+var_4], 0 loc_124B5: mov eax, [rbp+var_4] add rsp, 0C0h pop rbp retn
long long Elevetor::out_to_inside(Elevetor *this, unsigned int a2, int a3) { long long v4; // [rsp+0h] [rbp-C0h] long long v5; // [rsp+8h] [rbp-B8h] long long v6; // [rsp+18h] [rbp-A8h] long long v7; // [rsp+20h] [rbp-A0h] long long v8; // [rsp+30h] [rbp-90h] long long v9; // [rsp+38h] [rbp-88h] BYREF long long v10; // [rsp+40h] [rbp-80h] long long v11; // [rsp+48h] [rbp-78h] long long v12; // [rsp+50h] [rbp-70h] long long v13; // [rsp+58h] [rbp-68h] BYREF long long v14; // [rsp+60h] [rbp-60h] long long v15; // [rsp+68h] [rbp-58h] long long v16; // [rsp+70h] [rbp-50h] long long v17; // [rsp+78h] [rbp-48h] long long v18; // [rsp+80h] [rbp-40h] BYREF long long v19; // [rsp+88h] [rbp-38h] long long v20; // [rsp+90h] [rbp-30h] long long v21; // [rsp+98h] [rbp-28h] long long v22; // [rsp+A0h] [rbp-20h] BYREF int v23; // [rsp+A8h] [rbp-18h] unsigned int v24; // [rsp+ACh] [rbp-14h] BYREF Elevetor *v25; // [rsp+B0h] [rbp-10h] v25 = this; v24 = a2; v23 = a3; *((_DWORD *)this + 17) = a2; if ( v23 == 1 ) { v5 = *((_QWORD *)this + 2); v20 = QList<int>::begin(v5); v19 = QList<int>::end(*((_QWORD *)this + 2)); v21 = std::remove<QList<int>::iterator,int>(v20, v19, &v24); QList<int>::const_iterator::const_iterator(&v22, v21); v17 = QList<int>::end(*((_QWORD *)this + 2)); QList<int>::const_iterator::const_iterator(&v18, v17); v16 = QList<int>::erase(v5, v22, v18); QList<int>::push_back((char *)this + 104, v24); v15 = QList<int>::begin((char *)this + 104); v14 = QList<int>::end((char *)this + 104); std::sort<QList<int>::iterator>(v15, v14); } else { v4 = *((_QWORD *)this + 3); v11 = QList<int>::begin(v4); v10 = QList<int>::end(*((_QWORD *)this + 3)); v12 = std::remove<QList<int>::iterator,int>(v11, v10, &v24); QList<int>::const_iterator::const_iterator(&v13, v12); v8 = QList<int>::end(*((_QWORD *)this + 3)); QList<int>::const_iterator::const_iterator(&v9, v8); QList<int>::erase(v4, v13, v9); QList<int>::push_back((char *)this + 104, v24); v7 = QList<int>::begin((char *)this + 104); v6 = QList<int>::end((char *)this + 104); std::sort<QList<int>::iterator>(v7, v6); } if ( *((_DWORD *)this + 19) == 3 ) return 2; else return *((_DWORD *)this + 19) == 1; }
out_to_inside: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xb0],RAX MOV ECX,dword ptr [RBP + -0x14] MOV dword ptr [RAX + 0x44],ECX CMP dword ptr [RBP + -0x18],0x1 JNZ 0x0011238e MOV RAX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xb8],RCX MOV RDI,qword ptr [RAX + 0x10] CALL 0x00112f00 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x30],RCX MOV RDI,qword ptr [RAX + 0x10] CALL 0x00112f40 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] LEA RDX,[RBP + -0x14] CALL 0x00112eb0 MOV qword ptr [RBP + -0x28],RAX MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x20] CALL 0x00112f80 MOV RAX,qword ptr [RBP + -0xb0] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00112f40 MOV qword ptr [RBP + -0x48],RAX MOV RSI,qword ptr [RBP + -0x48] LEA RDI,[RBP + -0x40] CALL 0x00112f80 MOV RDI,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00112e10 MOV RDI,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x50],RAX ADD RDI,0x68 MOV ESI,dword ptr [RBP + -0x14] CALL 0x00112fc0 MOV RDI,qword ptr [RBP + -0xb0] ADD RDI,0x68 CALL 0x00112f00 MOV RDI,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x58],RAX ADD RDI,0x68 CALL 0x00112f40 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x60] CALL 0x00112ff0 JMP 0x00112482 LAB_0011238e: MOV RAX,qword ptr [RBP + -0xb0] MOV RCX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0xc0],RCX MOV RDI,qword ptr [RAX + 0x18] CALL 0x00112f00 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x78],RCX MOV RDI,qword ptr [RAX + 0x18] CALL 0x00112f40 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x78] MOV RSI,qword ptr [RBP + -0x80] LEA RDX,[RBP + -0x14] CALL 0x00112eb0 MOV qword ptr [RBP + -0x70],RAX MOV RSI,qword ptr [RBP + -0x70] LEA RDI,[RBP + -0x68] CALL 0x00112f80 MOV RAX,qword ptr [RBP + -0xb0] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00112f40 MOV qword ptr [RBP + -0x90],RAX MOV RSI,qword ptr [RBP + -0x90] LEA RDI,[RBP + -0x88] CALL 0x00112f80 MOV RDI,qword ptr [RBP + -0xc0] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x88] CALL 0x00112e10 MOV RDI,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x98],RAX ADD RDI,0x68 MOV ESI,dword ptr [RBP + -0x14] CALL 0x00112fc0 MOV RDI,qword ptr [RBP + -0xb0] ADD RDI,0x68 CALL 0x00112f00 MOV RDI,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0xa0],RAX ADD RDI,0x68 CALL 0x00112f40 MOV qword ptr [RBP + -0xa8],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0xa8] CALL 0x00112ff0 LAB_00112482: MOV RAX,qword ptr [RBP + -0xb0] CMP dword ptr [RAX + 0x4c],0x3 JNZ 0x00112498 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001124b5 LAB_00112498: MOV RAX,qword ptr [RBP + -0xb0] CMP dword ptr [RAX + 0x4c],0x1 JNZ 0x001124ae MOV dword ptr [RBP + -0x4],0x1 JMP 0x001124b5 LAB_001124ae: MOV dword ptr [RBP + -0x4],0x0 LAB_001124b5: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xc0 POP RBP RET
/* Elevetor::out_to_inside(int, int) */ int4 __thiscall Elevetor::out_to_inside(Elevetor *this,int param_1,int param_2) { QList<int> *pQVar1; int8 uVar2; int8 uVar3; int8 local_90; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; int8 local_28; int local_20; int local_1c; Elevetor *local_18; int4 local_c; *(int *)(this + 0x44) = param_1; local_20 = param_2; local_1c = param_1; local_18 = this; if (param_2 == 1) { pQVar1 = *(QList<int> **)(this + 0x10); local_38 = QList<int>::begin(*(QList<int> **)(this + 0x10)); local_40 = QList<int>::end(*(QList<int> **)(this + 0x10)); local_30 = std::remove<QList<int>::iterator,int>(local_38,local_40,&local_1c); QList<int>::const_iterator::const_iterator((const_iterator *)&local_28,local_30); local_50 = QList<int>::end(*(QList<int> **)(this + 0x10)); QList<int>::const_iterator::const_iterator((const_iterator *)&local_48,local_50); local_58 = QList<int>::erase(pQVar1,local_28,local_48); QList<int>::push_back((QList<int> *)(this + 0x68),local_1c); local_60 = QList<int>::begin((QList<int> *)(this + 0x68)); local_68 = QList<int>::end((QList<int> *)(this + 0x68)); std::sort<QList<int>::iterator>(local_60,local_68); } else { pQVar1 = *(QList<int> **)(this + 0x18); local_80 = QList<int>::begin(*(QList<int> **)(this + 0x18)); local_88 = QList<int>::end(*(QList<int> **)(this + 0x18)); local_78 = std::remove<QList<int>::iterator,int>(local_80,local_88,&local_1c); QList<int>::const_iterator::const_iterator((const_iterator *)&local_70,local_78); uVar2 = QList<int>::end(*(QList<int> **)(this + 0x18)); QList<int>::const_iterator::const_iterator((const_iterator *)&local_90,uVar2); QList<int>::erase(pQVar1,local_70,local_90); QList<int>::push_back((QList<int> *)(this + 0x68),local_1c); uVar2 = QList<int>::begin((QList<int> *)(this + 0x68)); uVar3 = QList<int>::end((QList<int> *)(this + 0x68)); std::sort<QList<int>::iterator>(uVar2,uVar3); } if (*(int *)(this + 0x4c) == 3) { local_c = 2; } else if (*(int *)(this + 0x4c) == 1) { local_c = 1; } else { local_c = 0; } return local_c; }
30,465
Elevetor::out_to_inside(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::out_to_inside(int newstair,int direct_) { endstair = newstair; if(direct_ == 1){ up_out->erase( std::remove(up_out->begin(),up_out->end(),newstair), up_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); }else{ down_out->erase( std::remove(down_out->begin(),down_out->end(),newstair), down_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); } if(status == 3){ //需要修改目的地 return 2; }else if(status == 1){ //无需修改目的地,但需要启动去寻找目标 return 1; }else{ //通常不会出现此情况 return 0; } }
O1
cpp
Elevetor::out_to_inside(int, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %esi, 0x4(%rsp) movl %esi, 0x44(%rdi) leaq 0x68(%rdi), %r14 cmpl $0x1, %edx jne 0x8f24 movq 0x10(%rbx), %r15 movq %r15, %rdi callq 0x9576 movq %rax, %r12 movq 0x10(%rbx), %rdi callq 0x959e leaq 0x4(%rsp), %r13 movq %r12, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x99b2 movq %rax, %r12 movq 0x10(%rbx), %rdi callq 0x959e movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x94de movl (%r13), %eax leaq 0x8(%rsp), %rdx jmp 0x8f72 movq 0x18(%rbx), %r15 movq %r15, %rdi callq 0x9576 movq %rax, %r12 movq 0x18(%rbx), %rdi callq 0x959e leaq 0x4(%rsp), %r13 movq %r12, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x99b2 movq %rax, %r12 movq 0x18(%rbx), %rdi callq 0x959e movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x94de movl (%r13), %eax leaq 0xc(%rsp), %rdx movl %eax, (%rdx) movq 0x78(%rbx), %rsi movq %r14, %rdi callq 0x9a90 movq %r14, %rdi callq 0x9576 movq %rax, %r15 movq %r14, %rdi callq 0x959e cmpq %rax, %r15 je 0x8fc5 movq %rax, %r14 subq %r15, %rax sarq $0x2, %rax bsrq %rax, %rdx xorl $0x3f, %edx addl %edx, %edx xorq $0x7e, %rdx movq %r15, %rdi movq %r14, %rsi callq 0x9d83 movq %r15, %rdi movq %r14, %rsi callq 0x9e66 movl 0x4c(%rbx), %eax xorl %ecx, %ecx cmpl $0x1, %eax sete %cl cmpl $0x3, %eax movl $0x2, %eax cmovnel %ecx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN8Elevetor13out_to_insideEii: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi mov [rsp+38h+var_34], esi mov [rdi+44h], esi lea r14, [rdi+68h] cmp edx, 1 jnz short loc_8F24 mov r15, [rbx+10h] mov rdi, r15 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r12, rax mov rdi, [rbx+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) lea r13, [rsp+38h+var_34] mov rdi, r12 mov rsi, rax mov rdx, r13 call _ZSt11__remove_ifIN5QListIiE8iteratorEN9__gnu_cxx5__ops16_Iter_equals_valIKiEEET_S8_S8_T0_; std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>) mov r12, rax mov rdi, [rbx+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, r12 mov rdx, rax call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov eax, [r13+0] lea rdx, [rsp+38h+var_30] jmp short loc_8F72 loc_8F24: mov r15, [rbx+18h] mov rdi, r15 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r12, rax mov rdi, [rbx+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) lea r13, [rsp+38h+var_34] mov rdi, r12 mov rsi, rax mov rdx, r13 call _ZSt11__remove_ifIN5QListIiE8iteratorEN9__gnu_cxx5__ops16_Iter_equals_valIKiEEET_S8_S8_T0_; std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>) mov r12, rax mov rdi, [rbx+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, r12 mov rdx, rax call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov eax, [r13+0] lea rdx, [rsp+38h+var_2C] loc_8F72: mov [rdx], eax mov rsi, [rbx+78h] mov rdi, r14 call _ZN9QtPrivate12QPodArrayOpsIiE7emplaceIJRiEEEvxDpOT_; QtPrivate::QPodArrayOps<int>::emplace<int &>(long long,int &) mov rdi, r14 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r15, rax mov rdi, r14 call _ZN5QListIiE3endEv; QList<int>::end(void) cmp r15, rax jz short loc_8FC5 mov r14, rax sub rax, r15 sar rax, 2 bsr rdx, rax xor edx, 3Fh add edx, edx xor rdx, 7Eh mov rdi, r15 mov rsi, r14 call _ZSt16__introsort_loopIN5QListIiE8iteratorExN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_T1_; std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter) mov rdi, r15 mov rsi, r14 call _ZSt22__final_insertion_sortIN5QListIiE8iteratorEN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_; std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter) loc_8FC5: mov eax, [rbx+4Ch] xor ecx, ecx cmp eax, 1 setz cl cmp eax, 3 mov eax, 2 cmovnz eax, ecx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long Elevetor::out_to_inside(Elevetor *this, int a2, int a3) { char *v3; // r14 long long v4; // r15 long long v5; // r12 long long v6; // rax long long v7; // r12 long long v8; // rax int v9; // eax char *v10; // rdx long long v11; // r15 long long v12; // r12 long long v13; // rax long long v14; // r12 long long v15; // rax long long v16; // r15 long long v17; // rax long long v18; // r14 unsigned long long v19; // rdx int v20; // eax BOOL v21; // ecx bool v22; // zf long long result; // rax int v24; // [rsp+4h] [rbp-34h] BYREF char v25; // [rsp+8h] [rbp-30h] BYREF char v26; // [rsp+Ch] [rbp-2Ch] BYREF v24 = a2; *((_DWORD *)this + 17) = a2; v3 = (char *)this + 104; if ( a3 == 1 ) { v4 = *((_QWORD *)this + 2); v5 = QList<int>::begin(v4); v6 = QList<int>::end(*((_QWORD *)this + 2)); v7 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(v5, v6, &v24); v8 = QList<int>::end(*((_QWORD *)this + 2)); QList<int>::erase(v4, v7, v8); v9 = v24; v10 = &v25; } else { v11 = *((_QWORD *)this + 3); v12 = QList<int>::begin(v11); v13 = QList<int>::end(*((_QWORD *)this + 3)); v14 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(v12, v13, &v24); v15 = QList<int>::end(*((_QWORD *)this + 3)); QList<int>::erase(v11, v14, v15); v9 = v24; v10 = &v26; } *(_DWORD *)v10 = v9; QtPrivate::QPodArrayOps<int>::emplace<int &>(v3, *((_QWORD *)this + 15), v10); v16 = QList<int>::begin(v3); v17 = QList<int>::end(v3); if ( v16 != v17 ) { v18 = v17; _BitScanReverse64(&v19, (v17 - v16) >> 2); std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>( v16, v17, (2 * ((unsigned int)v19 ^ 0x3F)) ^ 0x7ELL); std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(v16, v18); } v20 = *((_DWORD *)this + 19); v21 = v20 == 1; v22 = v20 == 3; result = 2LL; if ( !v22 ) return v21; return result; }
out_to_inside: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV dword ptr [RSP + 0x4],ESI MOV dword ptr [RDI + 0x44],ESI LEA R14,[RDI + 0x68] CMP EDX,0x1 JNZ 0x00108f24 MOV R15,qword ptr [RBX + 0x10] MOV RDI,R15 CALL 0x00109576 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x10] CALL 0x0010959e LEA R13,[RSP + 0x4] MOV RDI,R12 MOV RSI,RAX MOV RDX,R13 CALL 0x001099b2 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x10] CALL 0x0010959e MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x001094de MOV EAX,dword ptr [R13] LEA RDX,[RSP + 0x8] JMP 0x00108f72 LAB_00108f24: MOV R15,qword ptr [RBX + 0x18] MOV RDI,R15 CALL 0x00109576 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x18] CALL 0x0010959e LEA R13,[RSP + 0x4] MOV RDI,R12 MOV RSI,RAX MOV RDX,R13 CALL 0x001099b2 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x18] CALL 0x0010959e MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x001094de MOV EAX,dword ptr [R13] LEA RDX,[RSP + 0xc] LAB_00108f72: MOV dword ptr [RDX],EAX MOV RSI,qword ptr [RBX + 0x78] MOV RDI,R14 CALL 0x00109a90 MOV RDI,R14 CALL 0x00109576 MOV R15,RAX MOV RDI,R14 CALL 0x0010959e CMP R15,RAX JZ 0x00108fc5 MOV R14,RAX SUB RAX,R15 SAR RAX,0x2 BSR RDX,RAX XOR EDX,0x3f ADD EDX,EDX XOR RDX,0x7e MOV RDI,R15 MOV RSI,R14 CALL 0x00109d83 MOV RDI,R15 MOV RSI,R14 CALL 0x00109e66 LAB_00108fc5: MOV EAX,dword ptr [RBX + 0x4c] XOR ECX,ECX CMP EAX,0x1 SETZ CL CMP EAX,0x3 MOV EAX,0x2 CMOVNZ EAX,ECX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Elevetor::out_to_inside(int, int) */ int1 __thiscall Elevetor::out_to_inside(Elevetor *this,int param_1,int param_2) { QPodArrayOps<int> *this_00; QList<int> *pQVar1; long lVar2; int1 uVar3; int8 uVar4; int8 uVar5; long lVar6; long lVar7; ulong uVar8; int *piVar9; int local_34; int local_30; int local_2c; *(int *)(this + 0x44) = param_1; this_00 = (QPodArrayOps<int> *)(this + 0x68); local_34 = param_1; if (param_2 == 1) { pQVar1 = *(QList<int> **)(this + 0x10); uVar4 = QList<int>::begin(pQVar1); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x10)); uVar4 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int_const>> (uVar4,uVar5,&local_34); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x10)); QList<int>::erase(pQVar1,uVar4,uVar5); piVar9 = &local_30; } else { pQVar1 = *(QList<int> **)(this + 0x18); uVar4 = QList<int>::begin(pQVar1); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x18)); uVar4 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int_const>> (uVar4,uVar5,&local_34); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x18)); QList<int>::erase(pQVar1,uVar4,uVar5); piVar9 = &local_2c; } *piVar9 = local_34; QtPrivate::QPodArrayOps<int>::emplace<int&>(this_00,*(longlong *)(this + 0x78),piVar9); lVar6 = QList<int>::begin((QList<int> *)this_00); lVar7 = QList<int>::end((QList<int> *)this_00); if (lVar6 != lVar7) { uVar8 = lVar7 - lVar6 >> 2; lVar2 = 0x3f; if (uVar8 != 0) { for (; uVar8 >> lVar2 == 0; lVar2 = lVar2 + -1) { } } std::__introsort_loop<QList<int>::iterator,long_long,__gnu_cxx::__ops::_Iter_less_iter> (lVar6,lVar7,((uint)lVar2 ^ 0x3f) * 2 ^ 0x7e); std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(lVar6,lVar7) ; } uVar3 = 2; if (*(int *)(this + 0x4c) != 3) { uVar3 = *(int *)(this + 0x4c) == 1; } return uVar3; }
30,466
Elevetor::out_to_inside(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::out_to_inside(int newstair,int direct_) { endstair = newstair; if(direct_ == 1){ up_out->erase( std::remove(up_out->begin(),up_out->end(),newstair), up_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); }else{ down_out->erase( std::remove(down_out->begin(),down_out->end(),newstair), down_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); } if(status == 3){ //需要修改目的地 return 2; }else if(status == 1){ //无需修改目的地,但需要启动去寻找目标 return 1; }else{ //通常不会出现此情况 return 0; } }
O2
cpp
Elevetor::out_to_inside(int, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0xc(%rsp), %r14 movl %esi, (%r14) movl %esi, 0x44(%rdi) xorl %r13d, %r13d cmpl $0x1, %edx setne %r13b movq 0x10(%rdi,%r13,8), %r15 movq %r15, %rdi callq 0x8712 movq %rax, %r12 movq 0x10(%rbx,%r13,8), %rdi callq 0x8722 movq %r12, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x8b58 movq %rax, %r12 movq 0x10(%rbx,%r13,8), %rdi callq 0x8722 movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x86e2 movl (%r14), %esi leaq 0x68(%rbx), %r14 movq %r14, %rdi callq 0x8c20 movq %r14, %rdi callq 0x8712 movq %rax, %r15 movq %r14, %rdi callq 0x8722 movq %r15, %rdi movq %rax, %rsi callq 0x8f24 movl 0x4c(%rbx), %eax xorl %ecx, %ecx cmpl $0x1, %eax sete %cl cmpl $0x3, %eax pushq $0x2 popq %rax cmovnel %ecx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN8Elevetor13out_to_insideEii: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi lea r14, [rsp+38h+var_2C] mov [r14], esi mov [rdi+44h], esi xor r13d, r13d cmp edx, 1 setnz r13b mov r15, [rdi+r13*8+10h] mov rdi, r15 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r12, rax mov rdi, [rbx+r13*8+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r12 mov rsi, rax mov rdx, r14 call _ZSt11__remove_ifIN5QListIiE8iteratorEN9__gnu_cxx5__ops16_Iter_equals_valIKiEEET_S8_S8_T0_; std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>) mov r12, rax mov rdi, [rbx+r13*8+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, r12 mov rdx, rax call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov esi, [r14] lea r14, [rbx+68h] mov rdi, r14 call _ZN5QListIiE6appendEi; QList<int>::append(int) mov rdi, r14 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r15, rax mov rdi, r14 call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, rax call _ZSt6__sortIN5QListIiE8iteratorEN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_; std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter) mov eax, [rbx+4Ch] xor ecx, ecx cmp eax, 1 setz cl cmp eax, 3 push 2 pop rax cmovnz eax, ecx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long Elevetor::out_to_inside(Elevetor *this, unsigned int a2, int a3) { _BOOL8 v3; // r13 long long v4; // r15 long long v5; // r12 long long v6; // rax long long v7; // r12 long long v8; // rax long long v9; // r15 long long v10; // rax int v11; // eax BOOL v12; // ecx bool v13; // zf long long result; // rax *((_DWORD *)this + 17) = a2; v3 = a3 != 1; v4 = *((_QWORD *)this + v3 + 2); v5 = QList<int>::begin(v4); v6 = QList<int>::end(*((_QWORD *)this + v3 + 2)); v7 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(v5, v6); v8 = QList<int>::end(*((_QWORD *)this + v3 + 2)); QList<int>::erase(v4, v7, v8); QList<int>::append((char *)this + 104, a2); v9 = QList<int>::begin((char *)this + 104); v10 = QList<int>::end((char *)this + 104); std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(v9, v10); v11 = *((_DWORD *)this + 19); v12 = v11 == 1; v13 = v11 == 3; result = 2LL; if ( !v13 ) return v12; return result; }
out_to_inside: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA R14,[RSP + 0xc] MOV dword ptr [R14],ESI MOV dword ptr [RDI + 0x44],ESI XOR R13D,R13D CMP EDX,0x1 SETNZ R13B MOV R15,qword ptr [RDI + R13*0x8 + 0x10] MOV RDI,R15 CALL 0x00108712 MOV R12,RAX MOV RDI,qword ptr [RBX + R13*0x8 + 0x10] CALL 0x00108722 MOV RDI,R12 MOV RSI,RAX MOV RDX,R14 CALL 0x00108b58 MOV R12,RAX MOV RDI,qword ptr [RBX + R13*0x8 + 0x10] CALL 0x00108722 MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x001086e2 MOV ESI,dword ptr [R14] LEA R14,[RBX + 0x68] MOV RDI,R14 CALL 0x00108c20 MOV RDI,R14 CALL 0x00108712 MOV R15,RAX MOV RDI,R14 CALL 0x00108722 MOV RDI,R15 MOV RSI,RAX CALL 0x00108f24 MOV EAX,dword ptr [RBX + 0x4c] XOR ECX,ECX CMP EAX,0x1 SETZ CL CMP EAX,0x3 PUSH 0x2 POP RAX CMOVNZ EAX,ECX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Elevetor::out_to_inside(int, int) */ int1 __thiscall Elevetor::out_to_inside(Elevetor *this,int param_1,int param_2) { QList<int> *pQVar1; int1 uVar2; int8 uVar3; int8 uVar4; ulong uVar5; int local_2c; *(int *)(this + 0x44) = param_1; uVar5 = (ulong)(param_2 != 1); pQVar1 = *(QList<int> **)(this + uVar5 * 8 + 0x10); local_2c = param_1; uVar3 = QList<int>::begin(pQVar1); uVar4 = QList<int>::end(*(QList<int> **)(this + uVar5 * 8 + 0x10)); uVar3 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int_const>> (uVar3,uVar4,&local_2c); uVar4 = QList<int>::end(*(QList<int> **)(this + uVar5 * 8 + 0x10)); QList<int>::erase(pQVar1,uVar3,uVar4); pQVar1 = (QList<int> *)(this + 0x68); QList<int>::append(pQVar1,local_2c); uVar3 = QList<int>::begin(pQVar1); uVar4 = QList<int>::end(pQVar1); std::__sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(uVar3,uVar4); uVar2 = 2; if (*(int *)(this + 0x4c) != 3) { uVar2 = *(int *)(this + 0x4c) == 1; } return uVar2; }
30,467
Elevetor::out_to_inside(int, int)
LeafBlue[P]myElevetor/elevetor.cpp
int Elevetor::out_to_inside(int newstair,int direct_) { endstair = newstair; if(direct_ == 1){ up_out->erase( std::remove(up_out->begin(),up_out->end(),newstair), up_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); }else{ down_out->erase( std::remove(down_out->begin(),down_out->end(),newstair), down_out->end() ); action_list.push_back(newstair); std::sort(action_list.begin(),action_list.end()); } if(status == 3){ //需要修改目的地 return 2; }else if(status == 1){ //无需修改目的地,但需要启动去寻找目标 return 1; }else{ //通常不会出现此情况 return 0; } }
O3
cpp
Elevetor::out_to_inside(int, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movl %esi, 0x4(%rsp) movl %esi, 0x44(%rdi) leaq 0x68(%rdi), %r14 cmpl $0x1, %edx jne 0x8e1a movq 0x10(%rbx), %r15 movq %r15, %rdi callq 0x94aa movq %rax, %r12 movq 0x10(%rbx), %rdi callq 0x94d2 leaq 0x4(%rsp), %r13 movq %r12, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x9890 movq %rax, %r12 movq 0x10(%rbx), %rdi callq 0x94d2 movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x9400 movl (%r13), %eax leaq 0x8(%rsp), %rdx jmp 0x8e68 movq 0x18(%rbx), %r15 movq %r15, %rdi callq 0x94aa movq %rax, %r12 movq 0x18(%rbx), %rdi callq 0x94d2 leaq 0x4(%rsp), %r13 movq %r12, %rdi movq %rax, %rsi movq %r13, %rdx callq 0x9890 movq %rax, %r12 movq 0x18(%rbx), %rdi callq 0x94d2 movq %r15, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x9400 movl (%r13), %eax leaq 0xc(%rsp), %rdx movl %eax, (%rdx) movq 0x78(%rbx), %rsi movq %r14, %rdi callq 0x997a movq %r14, %rdi callq 0x94aa movq %rax, %r15 movq %r14, %rdi callq 0x94d2 cmpq %rax, %r15 je 0x8ebb movq %rax, %r14 subq %r15, %rax sarq $0x2, %rax bsrq %rax, %rdx xorl $0x3f, %edx addl %edx, %edx xorq $0x7e, %rdx movq %r15, %rdi movq %r14, %rsi callq 0x9c2b movq %r15, %rdi movq %r14, %rsi callq 0x9d0e movl 0x4c(%rbx), %eax xorl %ecx, %ecx cmpl $0x1, %eax sete %cl cmpl $0x3, %eax movl $0x2, %eax cmovnel %ecx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN8Elevetor13out_to_insideEii: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rdi mov [rsp+38h+var_34], esi mov [rdi+44h], esi lea r14, [rdi+68h] cmp edx, 1 jnz short loc_8E1A mov r15, [rbx+10h] mov rdi, r15 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r12, rax mov rdi, [rbx+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) lea r13, [rsp+38h+var_34] mov rdi, r12 mov rsi, rax mov rdx, r13 call _ZSt11__remove_ifIN5QListIiE8iteratorEN9__gnu_cxx5__ops16_Iter_equals_valIKiEEET_S8_S8_T0_; std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>) mov r12, rax mov rdi, [rbx+10h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, r12 mov rdx, rax call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov eax, [r13+0] lea rdx, [rsp+38h+var_30] jmp short loc_8E68 loc_8E1A: mov r15, [rbx+18h] mov rdi, r15 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r12, rax mov rdi, [rbx+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) lea r13, [rsp+38h+var_34] mov rdi, r12 mov rsi, rax mov rdx, r13 call _ZSt11__remove_ifIN5QListIiE8iteratorEN9__gnu_cxx5__ops16_Iter_equals_valIKiEEET_S8_S8_T0_; std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>) mov r12, rax mov rdi, [rbx+18h] call _ZN5QListIiE3endEv; QList<int>::end(void) mov rdi, r15 mov rsi, r12 mov rdx, rax call _ZN5QListIiE5eraseENS0_14const_iteratorES1_; QList<int>::erase(QList<int>::const_iterator,QList<int>::const_iterator) mov eax, [r13+0] lea rdx, [rsp+38h+var_2C] loc_8E68: mov [rdx], eax mov rsi, [rbx+78h] mov rdi, r14 call _ZN9QtPrivate12QPodArrayOpsIiE7emplaceIJRiEEEvxDpOT_; QtPrivate::QPodArrayOps<int>::emplace<int &>(long long,int &) mov rdi, r14 call _ZN5QListIiE5beginEv; QList<int>::begin(void) mov r15, rax mov rdi, r14 call _ZN5QListIiE3endEv; QList<int>::end(void) cmp r15, rax jz short loc_8EBB mov r14, rax sub rax, r15 sar rax, 2 bsr rdx, rax xor edx, 3Fh add edx, edx xor rdx, 7Eh mov rdi, r15 mov rsi, r14 call _ZSt16__introsort_loopIN5QListIiE8iteratorExN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_T1_; std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter) mov rdi, r15 mov rsi, r14 call _ZSt22__final_insertion_sortIN5QListIiE8iteratorEN9__gnu_cxx5__ops15_Iter_less_iterEEvT_S6_T0_; std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(QList<int>::iterator,QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter) loc_8EBB: mov eax, [rbx+4Ch] xor ecx, ecx cmp eax, 1 setz cl cmp eax, 3 mov eax, 2 cmovnz eax, ecx add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long Elevetor::out_to_inside(Elevetor *this, int a2, int a3) { char *v3; // r14 long long v4; // r15 long long v5; // r12 long long v6; // rax long long v7; // r12 long long v8; // rax int v9; // eax char *v10; // rdx long long v11; // r15 long long v12; // r12 long long v13; // rax long long v14; // r12 long long v15; // rax long long v16; // r15 long long v17; // rax long long v18; // r14 unsigned long long v19; // rdx int v20; // eax BOOL v21; // ecx bool v22; // zf long long result; // rax int v24; // [rsp+4h] [rbp-34h] BYREF char v25; // [rsp+8h] [rbp-30h] BYREF char v26; // [rsp+Ch] [rbp-2Ch] BYREF v24 = a2; *((_DWORD *)this + 17) = a2; v3 = (char *)this + 104; if ( a3 == 1 ) { v4 = *((_QWORD *)this + 2); v5 = QList<int>::begin(v4); v6 = QList<int>::end(*((_QWORD *)this + 2)); v7 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(v5, v6, &v24); v8 = QList<int>::end(*((_QWORD *)this + 2)); QList<int>::erase(v4, v7, v8); v9 = v24; v10 = &v25; } else { v11 = *((_QWORD *)this + 3); v12 = QList<int>::begin(v11); v13 = QList<int>::end(*((_QWORD *)this + 3)); v14 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int const>>(v12, v13, &v24); v15 = QList<int>::end(*((_QWORD *)this + 3)); QList<int>::erase(v11, v14, v15); v9 = v24; v10 = &v26; } *(_DWORD *)v10 = v9; QtPrivate::QPodArrayOps<int>::emplace<int &>(v3, *((_QWORD *)this + 15), v10); v16 = QList<int>::begin(v3); v17 = QList<int>::end(v3); if ( v16 != v17 ) { v18 = v17; _BitScanReverse64(&v19, (v17 - v16) >> 2); std::__introsort_loop<QList<int>::iterator,long long,__gnu_cxx::__ops::_Iter_less_iter>( v16, v17, (2 * ((unsigned int)v19 ^ 0x3F)) ^ 0x7ELL); std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(v16, v18); } v20 = *((_DWORD *)this + 19); v21 = v20 == 1; v22 = v20 == 3; result = 2LL; if ( !v22 ) return v21; return result; }
out_to_inside: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV dword ptr [RSP + 0x4],ESI MOV dword ptr [RDI + 0x44],ESI LEA R14,[RDI + 0x68] CMP EDX,0x1 JNZ 0x00108e1a MOV R15,qword ptr [RBX + 0x10] MOV RDI,R15 CALL 0x001094aa MOV R12,RAX MOV RDI,qword ptr [RBX + 0x10] CALL 0x001094d2 LEA R13,[RSP + 0x4] MOV RDI,R12 MOV RSI,RAX MOV RDX,R13 CALL 0x00109890 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x10] CALL 0x001094d2 MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x00109400 MOV EAX,dword ptr [R13] LEA RDX,[RSP + 0x8] JMP 0x00108e68 LAB_00108e1a: MOV R15,qword ptr [RBX + 0x18] MOV RDI,R15 CALL 0x001094aa MOV R12,RAX MOV RDI,qword ptr [RBX + 0x18] CALL 0x001094d2 LEA R13,[RSP + 0x4] MOV RDI,R12 MOV RSI,RAX MOV RDX,R13 CALL 0x00109890 MOV R12,RAX MOV RDI,qword ptr [RBX + 0x18] CALL 0x001094d2 MOV RDI,R15 MOV RSI,R12 MOV RDX,RAX CALL 0x00109400 MOV EAX,dword ptr [R13] LEA RDX,[RSP + 0xc] LAB_00108e68: MOV dword ptr [RDX],EAX MOV RSI,qword ptr [RBX + 0x78] MOV RDI,R14 CALL 0x0010997a MOV RDI,R14 CALL 0x001094aa MOV R15,RAX MOV RDI,R14 CALL 0x001094d2 CMP R15,RAX JZ 0x00108ebb MOV R14,RAX SUB RAX,R15 SAR RAX,0x2 BSR RDX,RAX XOR EDX,0x3f ADD EDX,EDX XOR RDX,0x7e MOV RDI,R15 MOV RSI,R14 CALL 0x00109c2b MOV RDI,R15 MOV RSI,R14 CALL 0x00109d0e LAB_00108ebb: MOV EAX,dword ptr [RBX + 0x4c] XOR ECX,ECX CMP EAX,0x1 SETZ CL CMP EAX,0x3 MOV EAX,0x2 CMOVNZ EAX,ECX ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Elevetor::out_to_inside(int, int) */ int1 __thiscall Elevetor::out_to_inside(Elevetor *this,int param_1,int param_2) { QPodArrayOps<int> *this_00; QList<int> *pQVar1; long lVar2; int1 uVar3; int8 uVar4; int8 uVar5; long lVar6; long lVar7; ulong uVar8; int *piVar9; int local_34; int local_30; int local_2c; *(int *)(this + 0x44) = param_1; this_00 = (QPodArrayOps<int> *)(this + 0x68); local_34 = param_1; if (param_2 == 1) { pQVar1 = *(QList<int> **)(this + 0x10); uVar4 = QList<int>::begin(pQVar1); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x10)); uVar4 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int_const>> (uVar4,uVar5,&local_34); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x10)); QList<int>::erase(pQVar1,uVar4,uVar5); piVar9 = &local_30; } else { pQVar1 = *(QList<int> **)(this + 0x18); uVar4 = QList<int>::begin(pQVar1); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x18)); uVar4 = std::__remove_if<QList<int>::iterator,__gnu_cxx::__ops::_Iter_equals_val<int_const>> (uVar4,uVar5,&local_34); uVar5 = QList<int>::end(*(QList<int> **)(this + 0x18)); QList<int>::erase(pQVar1,uVar4,uVar5); piVar9 = &local_2c; } *piVar9 = local_34; QtPrivate::QPodArrayOps<int>::emplace<int&>(this_00,*(longlong *)(this + 0x78),piVar9); lVar6 = QList<int>::begin((QList<int> *)this_00); lVar7 = QList<int>::end((QList<int> *)this_00); if (lVar6 != lVar7) { uVar8 = lVar7 - lVar6 >> 2; lVar2 = 0x3f; if (uVar8 != 0) { for (; uVar8 >> lVar2 == 0; lVar2 = lVar2 + -1) { } } std::__introsort_loop<QList<int>::iterator,long_long,__gnu_cxx::__ops::_Iter_less_iter> (lVar6,lVar7,((uint)lVar2 ^ 0x3f) * 2 ^ 0x7e); std::__final_insertion_sort<QList<int>::iterator,__gnu_cxx::__ops::_Iter_less_iter>(lVar6,lVar7) ; } uVar3 = 2; if (*(int *)(this + 0x4c) != 3) { uVar3 = *(int *)(this + 0x4c) == 1; } return uVar3; }
30,468
merkle_get_data
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static bytes_t merkle_get_data(merkle_proof_data_t* proof, gindex_t idx) { for (uint32_t i = 0; i < proof->leafes_len; i++) { if (proof->leafes_gindex[i] == idx) return bytes_slice(proof->leafes_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } for (uint32_t i = 0; i < proof->witnesses_len; i++) { if (proof->witnesses_gindex[i] == idx) return bytes_slice(proof->witnesses_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } return NULL_BYTES; }
O0
c
merkle_get_data: pushq %rbp movq %rsp, %rbp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x38(%rcx), %eax jae 0x1e301 movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax cmpq -0x20(%rbp), %rax jne 0x1e2f4 movl $0x20, -0x10(%rbp) movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movl -0x24(%rbp), %ecx shll $0x5, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x1e365 jmp 0x1e2f6 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x1e2b3 movl $0x0, -0x28(%rbp) movl -0x28(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0x1e356 movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movl -0x28(%rbp), %ecx movq (%rax,%rcx,8), %rax cmpq -0x20(%rbp), %rax jne 0x1e349 movl $0x20, -0x10(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movl -0x28(%rbp), %ecx shll $0x5, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x1e365 jmp 0x1e34b movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x1e308 movl $0x0, -0x10(%rbp) movq $0x0, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx popq %rbp retq nop
merkle_get_data: push rbp mov rbp, rsp mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_24], 0 loc_1E2B3: mov eax, [rbp+var_24] mov rcx, [rbp+var_18] cmp eax, [rcx+38h] jnb short loc_1E301 mov rax, [rbp+var_18] mov rax, [rax+30h] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] cmp rax, [rbp+var_20] jnz short loc_1E2F4 mov [rbp+var_10], 20h ; ' ' mov rax, [rbp+var_18] mov rax, [rax+28h] mov ecx, [rbp+var_24] shl ecx, 5 mov ecx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_1E365 loc_1E2F4: jmp short $+2 loc_1E2F6: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_1E2B3 loc_1E301: mov [rbp+var_28], 0 loc_1E308: mov eax, [rbp+var_28] mov rcx, [rbp+var_18] cmp eax, [rcx+18h] jnb short loc_1E356 mov rax, [rbp+var_18] mov rax, [rax+10h] mov ecx, [rbp+var_28] mov rax, [rax+rcx*8] cmp rax, [rbp+var_20] jnz short loc_1E349 mov [rbp+var_10], 20h ; ' ' mov rax, [rbp+var_18] mov rax, [rax+8] mov ecx, [rbp+var_28] shl ecx, 5 mov ecx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_1E365 loc_1E349: jmp short $+2 loc_1E34B: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_1E308 loc_1E356: mov [rbp+var_10], 0 mov [rbp+var_8], 0 loc_1E365: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] pop rbp retn
long long merkle_get_data(long long a1, long long a2) { unsigned int j; // [rsp+0h] [rbp-28h] unsigned int i; // [rsp+4h] [rbp-24h] for ( i = 0; i < *(_DWORD *)(a1 + 56); ++i ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8LL * i) == a2 ) return 32; } for ( j = 0; j < *(_DWORD *)(a1 + 24); ++j ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * j) == a2 ) return 32; } return 0; }
merkle_get_data: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV dword ptr [RBP + -0x24],0x0 LAB_0011e2b3: MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x38] JNC 0x0011e301 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0011e2f4 MOV dword ptr [RBP + -0x10],0x20 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV ECX,dword ptr [RBP + -0x24] SHL ECX,0x5 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0011e365 LAB_0011e2f4: JMP 0x0011e2f6 LAB_0011e2f6: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0011e2b3 LAB_0011e301: MOV dword ptr [RBP + -0x28],0x0 LAB_0011e308: MOV EAX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x18] JNC 0x0011e356 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + RCX*0x8] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0011e349 MOV dword ptr [RBP + -0x10],0x20 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x28] SHL ECX,0x5 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0011e365 LAB_0011e349: JMP 0x0011e34b LAB_0011e34b: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x0011e308 LAB_0011e356: MOV dword ptr [RBP + -0x10],0x0 MOV qword ptr [RBP + -0x8],0x0 LAB_0011e365: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] POP RBP RET
int1 [16] merkle_get_data(long param_1,long param_2) { int1 auVar1 [16]; int4 local_30; int4 local_2c; int4 local_18; int8 local_10; for (local_2c = 0; local_2c < *(uint *)(param_1 + 0x38); local_2c = local_2c + 1) { if (*(long *)(*(long *)(param_1 + 0x30) + (ulong)local_2c * 8) == param_2) { local_18 = 0x20; local_10 = *(long *)(param_1 + 0x28) + (ulong)(local_2c << 5); goto LAB_0011e365; } } local_30 = 0; do { if (*(uint *)(param_1 + 0x18) <= local_30) { local_18 = 0; local_10 = 0; LAB_0011e365: auVar1._4_4_ = 0; auVar1._0_4_ = local_18; auVar1._8_8_ = local_10; return auVar1; } if (*(long *)(*(long *)(param_1 + 0x10) + (ulong)local_30 * 8) == param_2) { local_18 = 0x20; local_10 = *(long *)(param_1 + 8) + (ulong)(local_30 << 5); goto LAB_0011e365; } local_30 = local_30 + 1; } while( true ); }
30,469
merkle_get_data
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static bytes_t merkle_get_data(merkle_proof_data_t* proof, gindex_t idx) { for (uint32_t i = 0; i < proof->leafes_len; i++) { if (proof->leafes_gindex[i] == idx) return bytes_slice(proof->leafes_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } for (uint32_t i = 0; i < proof->witnesses_len; i++) { if (proof->witnesses_gindex[i] == idx) return bytes_slice(proof->witnesses_data, i * BYTES_PER_CHUNK, BYTES_PER_CHUNK); } return NULL_BYTES; }
O1
c
merkle_get_data: movl 0x38(%rdi), %eax testl %eax, %eax setne %cl je 0x16013 movq 0x30(%rdi), %r8 xorl %edx, %edx cmpq %rsi, (%r8) je 0x1600b leal -0x1(%rax), %ecx xorl %r9d, %r9d cmpl %r9d, %ecx je 0x16011 addl $0x20, %edx leaq 0x1(%r9), %r10 cmpq %rsi, 0x8(%r8,%r9,8) movq %r10, %r9 jne 0x15fed cmpl %eax, %r10d setb %cl movl %edx, %edx addq 0x28(%rdi), %rdx jmp 0x16013 xorl %ecx, %ecx movl $0x20, %eax testb %cl, %cl jne 0x16044 movl 0x18(%rdi), %ecx testq %rcx, %rcx je 0x16040 movq 0x10(%rdi), %rdx xorl %r8d, %r8d xorl %r9d, %r9d cmpq %rsi, (%rdx,%r8,8) je 0x16045 addl $0x20, %r9d incq %r8 cmpl %r8d, %ecx jne 0x1602e xorl %eax, %eax xorl %edx, %edx retq movl %r9d, %edx addq 0x8(%rdi), %rdx retq nopl (%rax)
merkle_get_data: mov eax, [rdi+38h] test eax, eax setnz cl jz short loc_16013 mov r8, [rdi+30h] xor edx, edx cmp [r8], rsi jz short loc_1600B lea ecx, [rax-1] xor r9d, r9d loc_15FED: cmp ecx, r9d jz short loc_16011 add edx, 20h ; ' ' lea r10, [r9+1] cmp [r8+r9*8+8], rsi mov r9, r10 jnz short loc_15FED cmp r10d, eax setb cl mov edx, edx loc_1600B: add rdx, [rdi+28h] jmp short loc_16013 loc_16011: xor ecx, ecx loc_16013: mov eax, 20h ; ' ' test cl, cl jnz short locret_16044 mov ecx, [rdi+18h] test rcx, rcx jz short loc_16040 mov rdx, [rdi+10h] xor r8d, r8d xor r9d, r9d loc_1602E: cmp [rdx+r8*8], rsi jz short loc_16045 add r9d, 20h ; ' ' inc r8 cmp ecx, r8d jnz short loc_1602E loc_16040: xor eax, eax xor edx, edx locret_16044: retn loc_16045: mov edx, r9d add rdx, [rdi+8] retn
long long merkle_get_data(long long a1, long long a2) { unsigned int v2; // eax bool v3; // cl _QWORD *v4; // r8 int v5; // edx long long v6; // r9 unsigned int v7; // r10d long long result; // rax long long v10; // r8 int v11; // r9d v2 = *(_DWORD *)(a1 + 56); v3 = v2 != 0; if ( v2 ) { v4 = *(_QWORD **)(a1 + 48); v5 = 0; if ( *v4 != a2 ) { v6 = 0LL; while ( v2 - 1 != (_DWORD)v6 ) { v5 += 32; v7 = v6 + 1; if ( v4[++v6] == a2 ) { v3 = v7 < v2; goto LABEL_9; } } v3 = 0; } } LABEL_9: result = 32LL; if ( !v3 ) { if ( *(_DWORD *)(a1 + 24) ) { v10 = 0LL; v11 = 0; while ( *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v10) != a2 ) { v11 += 32; if ( *(_DWORD *)(a1 + 24) == (_DWORD)++v10 ) return 0LL; } } else { return 0LL; } } return result; }
merkle_get_data: MOV EAX,dword ptr [RDI + 0x38] TEST EAX,EAX SETNZ CL JZ 0x00116013 MOV R8,qword ptr [RDI + 0x30] XOR EDX,EDX CMP qword ptr [R8],RSI JZ 0x0011600b LEA ECX,[RAX + -0x1] XOR R9D,R9D LAB_00115fed: CMP ECX,R9D JZ 0x00116011 ADD EDX,0x20 LEA R10,[R9 + 0x1] CMP qword ptr [R8 + R9*0x8 + 0x8],RSI MOV R9,R10 JNZ 0x00115fed CMP R10D,EAX SETC CL MOV EDX,EDX LAB_0011600b: ADD RDX,qword ptr [RDI + 0x28] JMP 0x00116013 LAB_00116011: XOR ECX,ECX LAB_00116013: MOV EAX,0x20 TEST CL,CL JNZ 0x00116044 MOV ECX,dword ptr [RDI + 0x18] TEST RCX,RCX JZ 0x00116040 MOV RDX,qword ptr [RDI + 0x10] XOR R8D,R8D XOR R9D,R9D LAB_0011602e: CMP qword ptr [RDX + R8*0x8],RSI JZ 0x00116045 ADD R9D,0x20 INC R8 CMP ECX,R8D JNZ 0x0011602e LAB_00116040: XOR EAX,EAX XOR EDX,EDX LAB_00116044: RET LAB_00116045: MOV EDX,R9D ADD RDX,qword ptr [RDI + 0x8] RET
int1 [16] merkle_get_data(long param_1,long param_2,ulong param_3) { long lVar1; long lVar2; int8 uVar3; uint uVar4; long lVar5; uint uVar6; bool bVar7; int1 auVar8 [16]; int1 auVar9 [16]; uVar6 = *(uint *)(param_1 + 0x38); bVar7 = uVar6 != 0; if (bVar7) { param_3 = 0; if (**(long **)(param_1 + 0x30) != param_2) { lVar5 = 0; do { if (uVar6 - 1 == (int)lVar5) { bVar7 = false; goto LAB_00116013; } uVar4 = (int)param_3 + 0x20; param_3 = (ulong)uVar4; lVar1 = lVar5 + 1; lVar2 = lVar5 + 1; lVar5 = lVar1; } while ((*(long **)(param_1 + 0x30))[lVar2] != param_2); bVar7 = (uint)lVar1 < uVar6; param_3 = (ulong)uVar4; } param_3 = param_3 + *(long *)(param_1 + 0x28); } LAB_00116013: uVar3 = 0x20; if (!bVar7) { if (*(int *)(param_1 + 0x18) != 0) { lVar5 = 0; uVar6 = 0; do { if (*(long *)(*(long *)(param_1 + 0x10) + lVar5 * 8) == param_2) { auVar9._8_8_ = (ulong)uVar6 + *(long *)(param_1 + 8); auVar9._0_8_ = 0x20; return auVar9; } uVar6 = uVar6 + 0x20; lVar5 = lVar5 + 1; } while (*(int *)(param_1 + 0x18) != (int)lVar5); } uVar3 = 0; param_3 = 0; } auVar8._8_8_ = param_3; auVar8._0_8_ = uVar3; return auVar8; }
30,470
ma_log_suffix
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_log_suffix(MARIA_PAGE *ma_page, uint org_length, uint new_length) { LSN lsn; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4]; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 10 + 7 + 2], *log_pos; uchar *buff= ma_page->buff; int diff; uint translog_parts, extra_length; MARIA_HA *info= ma_page->info; pgcache_page_no_t page= ma_page->pos / info->s->block_size; DBUG_ENTER("_ma_log_suffix"); DBUG_PRINT("enter", ("page: %lu org_length: %u new_length: %u", (ulong) page, org_length, new_length)); DBUG_ASSERT(ma_page->size == new_length); DBUG_ASSERT(ma_page->org_size == org_length); log_pos= log_data + FILEID_STORE_SIZE; page_store(log_pos, page); log_pos+= PAGE_STORE_SIZE; /* Store keypage_flag */ *log_pos++= KEY_OP_SET_PAGEFLAG; *log_pos++= _ma_get_keypage_flag(info->s, buff); if ((diff= (int) (new_length - org_length)) < 0) { log_pos[0]= KEY_OP_DEL_SUFFIX; int2store(log_pos+1, -diff); log_pos+= 3; translog_parts= 1; extra_length= 0; } else { log_pos[0]= KEY_OP_ADD_SUFFIX; int2store(log_pos+1, diff); log_pos+= 3; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= buff + org_length; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= (uint) diff; translog_parts= 2; extra_length= (uint) diff; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); _ma_log_key_changes(ma_page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ ma_page->org_size= ma_page->size; DBUG_RETURN(translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length + extra_length, TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)); }
O0
c
ma_log_suffix: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x38(%rbp) movl %esi, -0x3c(%rbp) movl %edx, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0xc0(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0xd8(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq -0xd8(%rbp), %rcx movq (%rcx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0xe0(%rbp) jmp 0x465a5 jmp 0x465a7 jmp 0x465a9 jmp 0x465ab jmp 0x465ad leaq -0x30(%rbp), %rax addq $0x2, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0xe0(%rbp), %rax movl %eax, %ecx movq -0xe8(%rbp), %rax movl %ecx, (%rax) movq -0xe0(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xe8(%rbp), %rax movb %cl, 0x4(%rax) movq -0xb8(%rbp), %rax addq $0x5, %rax movq %rax, -0xb8(%rbp) movq -0xb8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xb8(%rbp) movb $0xa, (%rax) movq -0xc0(%rbp), %rax movq -0xd8(%rbp), %rcx movq (%rcx), %rcx movl 0x744(%rcx), %ecx subl $0x2, %ecx subl $0x1, %ecx movl %ecx, %ecx movb (%rax,%rcx), %cl movq -0xb8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xb8(%rbp) movb %cl, (%rax) movl -0x40(%rbp), %eax subl -0x3c(%rbp), %eax movl %eax, -0xc4(%rbp) cmpl $0x0, %eax jge 0x466c0 movq -0xb8(%rbp), %rax movb $0x7, (%rax) movq -0xb8(%rbp), %rax addq $0x1, %rax movq %rax, -0xf0(%rbp) xorl %eax, %eax subl -0xc4(%rbp), %eax movw %ax, %cx movq -0xf0(%rbp), %rax movw %cx, (%rax) movq -0xb8(%rbp), %rax addq $0x3, %rax movq %rax, -0xb8(%rbp) movl $0x1, -0xc8(%rbp) movl $0x0, -0xcc(%rbp) jmp 0x46732 movq -0xb8(%rbp), %rax movb $0x6, (%rax) movq -0xb8(%rbp), %rax addq $0x1, %rax movq %rax, -0xf8(%rbp) movl -0xc4(%rbp), %eax movw %ax, %cx movq -0xf8(%rbp), %rax movw %cx, (%rax) movq -0xb8(%rbp), %rax addq $0x3, %rax movq %rax, -0xb8(%rbp) movq -0xc0(%rbp), %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x80(%rbp) movl -0xc4(%rbp), %eax movq %rax, -0x78(%rbp) movl $0x2, -0xc8(%rbp) movl -0xc4(%rbp), %eax movl %eax, -0xcc(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x90(%rbp) movq -0xb8(%rbp), %rax leaq -0x30(%rbp), %rcx subq %rcx, %rax movl %eax, %eax movq %rax, -0x88(%rbp) movq -0x38(%rbp), %rax movl 0x20(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x24(%rax) movq -0xd8(%rbp), %rax movq 0x8(%rax), %rdx movq -0xd8(%rbp), %rcx movq -0x88(%rbp), %rax movl %eax, %r8d addl -0xcc(%rbp), %r8d movl -0xc8(%rbp), %r9d addl $0x2, %r9d leaq -0xb0(%rbp), %r10 leaq -0x30(%rbp), %rax leaq -0x48(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0xa9a60 movb %al, -0xf9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x467e5 movb -0xf9(%rbp), %al addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x2c290 nopw (%rax,%rax)
_ma_log_suffix: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_38], rdi mov [rbp+var_3C], esi mov [rbp+var_40], edx mov rax, [rbp+var_38] mov rax, [rax+10h] mov [rbp+var_C0], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_D8], rax mov rax, [rbp+var_38] mov rax, [rax+18h] mov rcx, [rbp+var_D8] mov rcx, [rcx] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_E0], rax jmp short $+2 loc_465A5: jmp short $+2 loc_465A7: jmp short $+2 loc_465A9: jmp short $+2 loc_465AB: jmp short $+2 loc_465AD: lea rax, [rbp+var_30] add rax, 2 mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov [rbp+var_E8], rax mov rax, [rbp+var_E0] mov ecx, eax mov rax, [rbp+var_E8] mov [rax], ecx mov rax, [rbp+var_E0] shr rax, 20h mov cl, al mov rax, [rbp+var_E8] mov [rax+4], cl mov rax, [rbp+var_B8] add rax, 5 mov [rbp+var_B8], rax mov rax, [rbp+var_B8] mov rcx, rax add rcx, 1 mov [rbp+var_B8], rcx mov byte ptr [rax], 0Ah mov rax, [rbp+var_C0] mov rcx, [rbp+var_D8] mov rcx, [rcx] mov ecx, [rcx+744h] sub ecx, 2 sub ecx, 1 mov ecx, ecx mov cl, [rax+rcx] mov rax, [rbp+var_B8] mov rdx, rax add rdx, 1 mov [rbp+var_B8], rdx mov [rax], cl mov eax, [rbp+var_40] sub eax, [rbp+var_3C] mov [rbp+var_C4], eax cmp eax, 0 jge short loc_466C0 mov rax, [rbp+var_B8] mov byte ptr [rax], 7 mov rax, [rbp+var_B8] add rax, 1 mov [rbp+var_F0], rax xor eax, eax sub eax, [rbp+var_C4] mov cx, ax mov rax, [rbp+var_F0] mov [rax], cx mov rax, [rbp+var_B8] add rax, 3 mov [rbp+var_B8], rax mov [rbp+var_C8], 1 mov [rbp+var_CC], 0 jmp short loc_46732 loc_466C0: mov rax, [rbp+var_B8] mov byte ptr [rax], 6 mov rax, [rbp+var_B8] add rax, 1 mov [rbp+var_F8], rax mov eax, [rbp+var_C4] mov cx, ax mov rax, [rbp+var_F8] mov [rax], cx mov rax, [rbp+var_B8] add rax, 3 mov [rbp+var_B8], rax mov rax, [rbp+var_C0] mov ecx, [rbp+var_3C] add rax, rcx mov [rbp+var_80], rax mov eax, [rbp+var_C4] mov [rbp+var_78], rax mov [rbp+var_C8], 2 mov eax, [rbp+var_C4] mov [rbp+var_CC], eax loc_46732: lea rax, [rbp+var_30] mov [rbp+var_90], rax mov rax, [rbp+var_B8] lea rcx, [rbp+var_30] sub rax, rcx mov eax, eax mov [rbp+var_88], rax mov rax, [rbp+var_38] mov ecx, [rax+20h] mov rax, [rbp+var_38] mov [rax+24h], ecx mov rax, [rbp+var_D8] mov rdx, [rax+8] mov rcx, [rbp+var_D8] mov rax, [rbp+var_88] mov r8d, eax add r8d, [rbp+var_CC] mov r9d, [rbp+var_C8] add r9d, 2 lea r10, [rbp+var_B0] lea rax, [rbp+var_30] lea rdi, [rbp+var_48] mov esi, 0Ch xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record mov [rbp+var_F9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_467E5 mov al, [rbp+var_F9] add rsp, 120h pop rbp retn loc_467E5: call ___stack_chk_fail
char ma_log_suffix(_QWORD *a1, unsigned int a2, int a3) { unsigned long long v4; // [rsp+40h] [rbp-E0h] _QWORD *v5; // [rsp+48h] [rbp-D8h] int v6; // [rsp+54h] [rbp-CCh] int v7; // [rsp+58h] [rbp-C8h] long long v8; // [rsp+60h] [rbp-C0h] _BYTE v9[32]; // [rsp+70h] [rbp-B0h] BYREF _BYTE *v10; // [rsp+90h] [rbp-90h] long long v11; // [rsp+98h] [rbp-88h] long long v12; // [rsp+A0h] [rbp-80h] long long v13; // [rsp+A8h] [rbp-78h] char v14; // [rsp+D8h] [rbp-48h] BYREF int v15; // [rsp+E0h] [rbp-40h] unsigned int v16; // [rsp+E4h] [rbp-3Ch] _QWORD *v17; // [rsp+E8h] [rbp-38h] _BYTE v18[2]; // [rsp+F0h] [rbp-30h] BYREF int v19; // [rsp+F2h] [rbp-2Eh] char v20; // [rsp+F6h] [rbp-2Ah] char v21; // [rsp+F7h] [rbp-29h] char v22; // [rsp+F8h] [rbp-28h] char v23; // [rsp+F9h] [rbp-27h] __int16 v24; // [rsp+FAh] [rbp-26h] _BYTE v25[36]; // [rsp+FCh] [rbp-24h] BYREF long long savedregs; // [rsp+120h] [rbp+0h] BYREF *(_QWORD *)&v25[28] = __readfsqword(0x28u); v17 = a1; v16 = a2; v15 = a3; v8 = a1[2]; v5 = (_QWORD *)*a1; v4 = a1[3] / (unsigned long long)*(unsigned int *)(*(_QWORD *)*a1 + 1980LL); v19 = v4; v20 = BYTE4(v4); v21 = 10; v22 = *(_BYTE *)(v8 + (unsigned int)(*(_DWORD *)(*v5 + 1860LL) - 3)); if ( (int)(a3 - a2) >= 0 ) { v23 = 6; v24 = a3 - a2; v12 = v16 + v8; v13 = a3 - a2; v7 = 2; v6 = a3 - a2; } else { v23 = 7; v24 = a2 - a3; v7 = 1; v6 = 0; } v10 = v18; v11 = (unsigned int)v25 - ((unsigned int)&savedregs - 48); *((_DWORD *)v17 + 9) = *((_DWORD *)v17 + 8); return translog_write_record( (unsigned int)&v14, 12, v5[1], (_DWORD)v5, v6 + (int)v11, v7 + 2, (long long)v9, (long long)v18, 0LL); }
_ma_log_suffix: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x38],RDI MOV dword ptr [RBP + -0x3c],ESI MOV dword ptr [RBP + -0x40],EDX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xe0],RAX JMP 0x001465a5 LAB_001465a5: JMP 0x001465a7 LAB_001465a7: JMP 0x001465a9 LAB_001465a9: JMP 0x001465ab LAB_001465ab: JMP 0x001465ad LAB_001465ad: LEA RAX,[RBP + -0x30] ADD RAX,0x2 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0xe8],RAX MOV RAX,qword ptr [RBP + -0xe0] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xe8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0xe0] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xe8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x5 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xb8],RCX MOV byte ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xd8] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX + 0x744] SUB ECX,0x2 SUB ECX,0x1 MOV ECX,ECX MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0xb8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xb8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x40] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0xc4],EAX CMP EAX,0x0 JGE 0x001466c0 MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX],0x7 MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x1 MOV qword ptr [RBP + -0xf0],RAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0xc4] MOV CX,AX MOV RAX,qword ptr [RBP + -0xf0] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x3 MOV qword ptr [RBP + -0xb8],RAX MOV dword ptr [RBP + -0xc8],0x1 MOV dword ptr [RBP + -0xcc],0x0 JMP 0x00146732 LAB_001466c0: MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX],0x6 MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x1 MOV qword ptr [RBP + -0xf8],RAX MOV EAX,dword ptr [RBP + -0xc4] MOV CX,AX MOV RAX,qword ptr [RBP + -0xf8] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0xb8] ADD RAX,0x3 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0xc0] MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0xc4] MOV qword ptr [RBP + -0x78],RAX MOV dword ptr [RBP + -0xc8],0x2 MOV EAX,dword ptr [RBP + -0xc4] MOV dword ptr [RBP + -0xcc],EAX LAB_00146732: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0xb8] LEA RCX,[RBP + -0x30] SUB RAX,RCX MOV EAX,EAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0xd8] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0xd8] MOV RAX,qword ptr [RBP + -0x88] MOV R8D,EAX ADD R8D,dword ptr [RBP + -0xcc] MOV R9D,dword ptr [RBP + -0xc8] ADD R9D,0x2 LEA R10,[RBP + -0xb0] LEA RAX,[RBP + -0x30] LEA RDI,[RBP + -0x48] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x001a9a60 MOV byte ptr [RBP + -0xf9],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001467e5 MOV AL,byte ptr [RBP + -0xf9] ADD RSP,0x120 POP RBP RET LAB_001467e5: CALL 0x0012c290
int8 _ma_log_suffix(long *param_1,uint param_2,int param_3) { long *plVar1; int1 uVar2; uint uVar3; ulong uVar4; long in_FS_OFFSET; uint local_d4; int local_d0; int1 *local_c0; int1 local_b8 [32]; int1 *local_98; ulong local_90; long local_88; ulong local_80; int1 local_50 [8]; int local_48; uint local_44; long *local_40; int1 local_38 [2]; int4 local_36; int1 local_32; int1 local_31; int1 local_30; int1 local_2f; short local_2e; int1 auStack_2c [28]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); plVar1 = (long *)*param_1; uVar4 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc); local_36 = (int4)uVar4; local_32 = (int1)(uVar4 >> 0x20); local_31 = 10; local_30 = *(int1 *)(param_1[2] + (ulong)(*(int *)(*plVar1 + 0x744) - 3)); local_d4 = param_3 - param_2; local_2e = (short)local_d4; if ((int)local_d4 < 0) { local_2f = 7; local_2e = -local_2e; local_d0 = 1; local_d4 = 0; } else { local_2f = 6; local_88 = param_1[2] + (ulong)param_2; local_80 = (ulong)local_d4; local_d0 = 2; } local_c0 = auStack_2c; local_98 = local_38; uVar3 = (int)local_c0 - (int)local_38; local_90 = (ulong)uVar3; *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_48 = param_3; local_44 = param_2; local_40 = param_1; uVar2 = translog_write_record (local_50,0xc,plVar1[1],plVar1,uVar3 + local_d4,local_d0 + 2,local_b8,local_38,0 ); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar2); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,471
decode_pos
eloqsql/storage/maria/ma_packrec.c
static uint decode_pos(MARIA_BIT_BUFF *bit_buff, MARIA_DECODE_TREE *decode_tree) { uint16 *pos=decode_tree->table; for (;;) { if (get_bit(bit_buff)) pos++; if (*pos & IS_CHAR) return (uint) (*pos & ~IS_CHAR); pos+= *pos; } }
O0
c
decode_pos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x4de4a movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x4de6e jmp 0x4de7a movq -0x8(%rbp), %rdi callq 0x4c6d0 movq -0x8(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x4de7a movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0x4de9d movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0xffff7fff, %eax # imm = 0xFFFF7FFF addq $0x20, %rsp popq %rbp retq movq -0x18(%rbp), %rax movzwl (%rax), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x4de1b nopw (%rax,%rax)
decode_pos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_4DE1B: mov rax, [rbp+var_8] cmp dword ptr [rax+4], 0 jz short loc_4DE4A mov rax, [rbp+var_8] mov eax, [rax] mov rdx, [rbp+var_8] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_4DE6E jmp short loc_4DE7A loc_4DE4A: mov rdi, [rbp+var_8] call fill_buffer mov rax, [rbp+var_8] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_8] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_4DE7A loc_4DE6E: mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_18], rax loc_4DE7A: mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jz short loc_4DE9D mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 0FFFF7FFFh add rsp, 20h pop rbp retn loc_4DE9D: mov rax, [rbp+var_18] movzx ecx, word ptr [rax] mov rax, [rbp+var_18] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_18], rax jmp loc_4DE1B
long long decode_pos(int *a1, _WORD **a2) { int v2; // eax int v3; // ecx _WORD *i; // [rsp+8h] [rbp-18h] for ( i = *a2; ; i += (unsigned __int16)*i ) { if ( !a1[1] ) { fill_buffer((long long)a1); a1[1] = 31; if ( *a1 >= 0 ) goto LABEL_7; LABEL_6: ++i; goto LABEL_7; } v2 = *a1; v3 = a1[1] - 1; a1[1] = v3; if ( ((1 << v3) & v2) != 0 ) goto LABEL_6; LABEL_7: if ( (*i & 0x8000) != 0 ) break; } return *i & 0x7FFF; }
decode_pos: 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 + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_0014de1b: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0014de4a MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0014de6e JMP 0x0014de7a LAB_0014de4a: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014c6d0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0014de7a LAB_0014de6e: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x18],RAX LAB_0014de7a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JZ 0x0014de9d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0xffff7fff ADD RSP,0x20 POP RBP RET LAB_0014de9d: MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0014de1b
ushort decode_pos(uint *param_1,int8 *param_2) { uint uVar1; ushort *local_20; local_20 = (ushort *)*param_2; while( true ) { if (param_1[1] == 0) { fill_buffer(param_1); param_1[1] = 0x1f; uVar1 = *param_1 & 0x80000000; } else { uVar1 = param_1[1]; param_1[1] = uVar1 - 1; uVar1 = *param_1 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 != 0) { local_20 = local_20 + 1; } if ((*local_20 & 0x8000) != 0) break; local_20 = local_20 + (int)(uint)*local_20; } return *local_20 & 0x7fff; }
30,472
my_getwd
eloqsql/mysys/my_getwd.c
int my_getwd(char * buf, size_t size, myf MyFlags) { char * pos; DBUG_ENTER("my_getwd"); DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu", buf, (uint) size, MyFlags)); if (size < 1) DBUG_RETURN(-1); if (curr_dir[0]) /* Current pos is saved here */ (void) strmake(buf,&curr_dir[0],size-1); else { #if defined(HAVE_GETCWD) if (size < 2) DBUG_RETURN(-1); if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME) { my_errno=errno; my_error(EE_GETWD,MYF(ME_BELL),errno); DBUG_RETURN(-1); } #elif defined(HAVE_GETWD) { char pathname[MAXPATHLEN]; getwd(pathname); strmake(buf,pathname,size-1); } #else #error "No way to get current directory" #endif if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ { pos[0]= FN_LIBCHAR; pos[1]=0; } (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); } DBUG_RETURN(0); }
O0
c
my_getwd: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x89dc6 cmpq $0x1, -0x18(%rbp) jae 0x89ddb jmp 0x89dcf movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x89eba leaq 0x382dfe(%rip), %rax # 0x40cbe0 cmpb $0x0, (%rax) je 0x89e04 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x382de6(%rip), %rsi # 0x40cbe0 callq 0xd5860 jmp 0x89eb1 cmpq $0x2, -0x18(%rbp) jae 0x89e19 jmp 0x89e0d movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x89eba movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax subq $0x2, %rax movl %eax, %eax movl %eax, %esi callq 0x383d0 cmpq $0x0, %rax jne 0x89e77 movq -0x20(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x89e77 callq 0x389e0 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x8ca30 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) callq 0x389e0 movl (%rax), %edx movl $0x10, %edi movl $0x4, %esi movb $0x0, %al callq 0x85630 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x89eba movq -0x10(%rbp), %rdi callq 0xd57e0 movq %rax, -0x28(%rbp) movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x89e9c movq -0x28(%rbp), %rax movb $0x2f, (%rax) movq -0x28(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x10(%rbp), %rsi leaq 0x382d39(%rip), %rdi # 0x40cbe0 movl $0x1ff, %edx # imm = 0x1FF callq 0xd5860 jmp 0x89eb3 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_getwd: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_89DC6: cmp [rbp+var_18], 1 jnb short loc_89DDB jmp short $+2 loc_89DCF: mov [rbp+var_4], 0FFFFFFFFh jmp loc_89EBA loc_89DDB: lea rax, curr_dir cmp byte ptr [rax], 0 jz short loc_89E04 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, curr_dir call strmake jmp loc_89EB1 loc_89E04: cmp [rbp+var_18], 2 jnb short loc_89E19 jmp short $+2 loc_89E0D: mov [rbp+var_4], 0FFFFFFFFh jmp loc_89EBA loc_89E19: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] sub rax, 2 mov eax, eax mov esi, eax call _getcwd cmp rax, 0 jnz short loc_89E77 mov rax, [rbp+var_20] and rax, 10h cmp rax, 0 jz short loc_89E77 call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx call ___errno_location mov edx, [rax] mov edi, 10h mov esi, 4 mov al, 0 call my_error mov [rbp+var_4], 0FFFFFFFFh jmp short loc_89EBA loc_89E77: mov rdi, [rbp+var_10] call strend mov [rbp+var_28], rax movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_89E9C mov rax, [rbp+var_28] mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_28] mov byte ptr [rax+1], 0 loc_89E9C: mov rsi, [rbp+var_10] lea rdi, curr_dir mov edx, 1FFh call strmake loc_89EB1: jmp short $+2 loc_89EB3: mov [rbp+var_4], 0 loc_89EBA: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_getwd(long long a1, unsigned long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+4h] [rbp-2Ch] _BYTE *v6; // [rsp+8h] [rbp-28h] if ( a2 ) { if ( curr_dir[0] ) { strmake(a1, curr_dir, a2 - 1); } else { if ( a2 < 2 ) return (unsigned int)-1; if ( !getcwd(a1, (unsigned int)(a2 - 2)) && (a3 & 0x10) != 0 ) { v5 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v5; v3 = (unsigned int *)__errno_location(a1); my_error(0x10u, 4LL, *v3); return (unsigned int)-1; } v6 = (_BYTE *)strend(a1); if ( *(v6 - 1) != 47 ) { *v6 = 47; v6[1] = 0; } strmake(curr_dir, a1, 511LL); } return 0; } return (unsigned int)-1; }
my_getwd: 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 JMP 0x00189dc6 LAB_00189dc6: CMP qword ptr [RBP + -0x18],0x1 JNC 0x00189ddb JMP 0x00189dcf LAB_00189dcf: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00189eba LAB_00189ddb: LEA RAX,[0x50cbe0] CMP byte ptr [RAX],0x0 JZ 0x00189e04 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] SUB RDX,0x1 LEA RSI,[0x50cbe0] CALL 0x001d5860 JMP 0x00189eb1 LAB_00189e04: CMP qword ptr [RBP + -0x18],0x2 JNC 0x00189e19 JMP 0x00189e0d LAB_00189e0d: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00189eba LAB_00189e19: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x2 MOV EAX,EAX MOV ESI,EAX CALL 0x001383d0 CMP RAX,0x0 JNZ 0x00189e77 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x10 CMP RAX,0x0 JZ 0x00189e77 CALL 0x001389e0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x0018ca30 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX CALL 0x001389e0 MOV EDX,dword ptr [RAX] MOV EDI,0x10 MOV ESI,0x4 MOV AL,0x0 CALL 0x00185630 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00189eba LAB_00189e77: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001d57e0 MOV qword ptr [RBP + -0x28],RAX MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x00189e9c MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],0x0 LAB_00189e9c: MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x50cbe0] MOV EDX,0x1ff CALL 0x001d5860 LAB_00189eb1: JMP 0x00189eb3 LAB_00189eb3: MOV dword ptr [RBP + -0x4],0x0 LAB_00189eba: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_getwd(char *param_1,ulong param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int1 *puVar4; if (param_2 == 0) { return 0xffffffff; } if (curr_dir == '\0') { if (param_2 < 2) { return 0xffffffff; } pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2)); if ((pcVar2 == (char *)0x0) && ((param_3 & 0x10) != 0)) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; piVar3 = __errno_location(); my_error(0x10,4,*piVar3); return 0xffffffff; } puVar4 = (int1 *)strend(param_1); if (puVar4[-1] != '/') { *puVar4 = 0x2f; puVar4[1] = 0; } strmake(&curr_dir,param_1,0x1ff); } else { strmake(param_1,&curr_dir,param_2 - 1); } return 0; }
30,473
lf_alloc_init
eloqsql/mysys/lf_alloc-pin.c
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset) { lf_pinbox_init(&allocator->pinbox, free_ptr_offset, (lf_pinbox_free_func *)alloc_free, allocator); allocator->top= 0; allocator->mallocs= 0; allocator->element_size= size; allocator->constructor= 0; allocator->destructor= 0; DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset); }
O0
c
lf_alloc_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rdi movl -0x10(%rbp), %esi movq -0x8(%rbp), %rcx leaq 0x4c(%rip), %rdx # 0xfc820 callq 0xfc110 movq -0x8(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x54(%rax) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) jmp 0xfc814 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
lf_alloc_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rdi, [rbp+var_8] mov esi, [rbp+var_10] mov rcx, [rbp+var_8] lea rdx, alloc_free call lf_pinbox_init mov rax, [rbp+var_8] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+54h], 0 mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov [rax+50h], ecx mov rax, [rbp+var_8] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 jmp short $+2 loc_FC814: add rsp, 10h pop rbp retn
long long lf_alloc_init(long long a1, int a2, int a3) { long long result; // rax lf_pinbox_init(a1, a3, (long long)alloc_free, a1); *(_QWORD *)(a1 + 72) = 0LL; *(_DWORD *)(a1 + 84) = 0; *(_DWORD *)(a1 + 80) = a2; *(_QWORD *)(a1 + 88) = 0LL; result = a1; *(_QWORD *)(a1 + 96) = 0LL; return result; }
lf_alloc_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] LEA RDX,[0x1fc820] CALL 0x001fc110 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x54],0x0 MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 JMP 0x001fc814 LAB_001fc814: ADD RSP,0x10 POP RBP RET
void lf_alloc_init(long param_1,int4 param_2,int4 param_3) { lf_pinbox_init(param_1,param_3,alloc_free,param_1); *(int8 *)(param_1 + 0x48) = 0; *(int4 *)(param_1 + 0x54) = 0; *(int4 *)(param_1 + 0x50) = param_2; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return; }
30,474
resize_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static int resize_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { uint i; uint partitions= keycache->partitions; my_bool cleanup= use_mem == 0; int blocks= -1; int err= 0; DBUG_ENTER("partitioned_resize_key_cache"); if (cleanup) { end_partitioned_key_cache(keycache, 0); DBUG_RETURN(-1); } for (i= 0; i < partitions; i++) { err|= prepare_resize_simple_key_cache(keycache->partition_array[i], 1); } if (!err) blocks= init_partitioned_key_cache(keycache, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size); if (blocks > 0) { for (i= 0; i < partitions; i++) { keycache_pthread_mutex_lock(&keycache->partition_array[i]->cache_lock); finish_resize_simple_key_cache(keycache->partition_array[i]); } } DBUG_RETURN(blocks); }
O3
c
resize_partitioned_key_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movl 0x1c(%rdi), %r13d testq %rdx, %rdx je 0x9b858 movq %rdx, %r15 testq %r13, %r13 je 0x9b7ea movl %esi, -0x2c(%rbp) movl %ecx, -0x30(%rbp) movl %r8d, -0x34(%rbp) movl %r9d, -0x38(%rbp) xorl %r14d, %r14d xorl %r12d, %r12d movq 0x8(%rbx), %rax movq (%rax,%r14,8), %rdi movl $0x1, %esi callq 0x9ab5a orl %eax, %r12d incq %r14 cmpq %r14, %r13 jne 0x9b7b0 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testl %r12d, %r12d movl -0x38(%rbp), %r9d movl -0x34(%rbp), %r8d movl -0x30(%rbp), %ecx movl -0x2c(%rbp), %esi jne 0x9b87d movq %rbx, %rdi movq %r15, %rdx callq 0x9b520 movl %eax, %r14d testl %eax, %eax setg %al testl %r13d, %r13d setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x9b87d xorl %r12d, %r12d leaq 0x41e35(%rip), %r15 # 0xdd649 movq 0x8(%rbx), %rax movq (%rax,%r12,8), %rax leaq 0xc0(%rax), %rdi cmpq $0x0, 0x100(%rax) jne 0x9b849 callq 0x29220 movq 0x8(%rbx), %rax movq (%rax,%r12,8), %rdi callq 0x9ad3e incq %r12 cmpq %r12, %r13 jne 0x9b814 jmp 0x9b87d movq %r15, %rsi movl $0x14a9, %edx # imm = 0x14A9 callq 0x2eb8f jmp 0x9b832 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testq %r13, %r13 je 0x9b87d xorl %r15d, %r15d movq 0x8(%rbx), %rax movq (%rax,%r15,8), %rdi xorl %esi, %esi callq 0x9aa46 incq %r15 cmpq %r15, %r13 jne 0x9b866 movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
resize_partitioned_key_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13d, [rdi+1Ch] test rdx, rdx jz loc_9B858 mov r15, rdx test r13, r13 jz short loc_9B7EA mov [rbp+var_2C], esi mov [rbp+var_30], ecx mov [rbp+var_34], r8d mov [rbp+var_38], r9d xor r14d, r14d xor r12d, r12d loc_9B7B0: mov rax, [rbx+8] mov rdi, [rax+r14*8] mov esi, 1 call prepare_resize_simple_key_cache or r12d, eax inc r14 cmp r13, r14 jnz short loc_9B7B0 mov r14d, 0FFFFFFFFh test r12d, r12d mov r9d, [rbp+var_38] mov r8d, [rbp+var_34] mov ecx, [rbp+var_30] mov esi, [rbp+var_2C] jnz loc_9B87D loc_9B7EA: mov rdi, rbx mov rdx, r15 call init_partitioned_key_cache mov r14d, eax test eax, eax setnle al test r13d, r13d setnz cl and cl, al cmp cl, 1 jnz short loc_9B87D xor r12d, r12d lea r15, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... loc_9B814: mov rax, [rbx+8] mov rax, [rax+r12*8] lea rdi, [rax+0C0h] cmp qword ptr [rax+100h], 0 jnz short loc_9B849 call _pthread_mutex_lock loc_9B832: mov rax, [rbx+8] mov rdi, [rax+r12*8] call finish_resize_simple_key_cache inc r12 cmp r13, r12 jnz short loc_9B814 jmp short loc_9B87D loc_9B849: mov rsi, r15 mov edx, 14A9h call psi_mutex_lock jmp short loc_9B832 loc_9B858: mov r14d, 0FFFFFFFFh test r13, r13 jz short loc_9B87D xor r15d, r15d loc_9B866: mov rax, [rbx+8] mov rdi, [rax+r15*8] xor esi, esi call end_simple_key_cache inc r15 cmp r13, r15 jnz short loc_9B866 loc_9B87D: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long resize_partitioned_key_cache( long long a1, unsigned int a2, unsigned long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { long long v7; // r13 long long v9; // r14 int v10; // r12d int inited; // r14d long long v12; // r12 long long v13; // rax long long v14; // rdi long long v15; // r15 unsigned int v17; // [rsp+8h] [rbp-38h] unsigned int v18; // [rsp+Ch] [rbp-34h] unsigned int v19; // [rsp+10h] [rbp-30h] v7 = *(unsigned int *)(a1 + 28); if ( a3 ) { if ( !*(_DWORD *)(a1 + 28) ) goto LABEL_19; v19 = a4; v18 = a5; v17 = a6; v9 = 0LL; v10 = 0; do v10 |= prepare_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v9++), 1); while ( v7 != v9 ); inited = -1; a6 = v17; a5 = v18; a4 = v19; if ( !v10 ) { LABEL_19: inited = init_partitioned_key_cache((char *)a1, a2, a3, a4, a5, a6); if ( inited > 0 && (_DWORD)v7 != 0 ) { v12 = 0LL; do { v13 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12); v14 = v13 + 192; if ( *(_QWORD *)(v13 + 256) ) psi_mutex_lock(v14, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x14A9u); else pthread_mutex_lock(v14); finish_resize_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v12++)); } while ( v7 != v12 ); } } } else { inited = -1; if ( *(_DWORD *)(a1 + 28) ) { v15 = 0LL; do end_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v15++), 0); while ( v7 != v15 ); } } return (unsigned int)inited; }
resize_partitioned_key_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13D,dword ptr [RDI + 0x1c] TEST RDX,RDX JZ 0x0019b858 MOV R15,RDX TEST R13,R13 JZ 0x0019b7ea MOV dword ptr [RBP + -0x2c],ESI MOV dword ptr [RBP + -0x30],ECX MOV dword ptr [RBP + -0x34],R8D MOV dword ptr [RBP + -0x38],R9D XOR R14D,R14D XOR R12D,R12D LAB_0019b7b0: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R14*0x8] MOV ESI,0x1 CALL 0x0019ab5a OR R12D,EAX INC R14 CMP R13,R14 JNZ 0x0019b7b0 MOV R14D,0xffffffff TEST R12D,R12D MOV R9D,dword ptr [RBP + -0x38] MOV R8D,dword ptr [RBP + -0x34] MOV ECX,dword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x2c] JNZ 0x0019b87d LAB_0019b7ea: MOV RDI,RBX MOV RDX,R15 CALL 0x0019b520 MOV R14D,EAX TEST EAX,EAX SETG AL TEST R13D,R13D SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x0019b87d XOR R12D,R12D LEA R15,[0x1dd649] LAB_0019b814: MOV RAX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + R12*0x8] LEA RDI,[RAX + 0xc0] CMP qword ptr [RAX + 0x100],0x0 JNZ 0x0019b849 CALL 0x00129220 LAB_0019b832: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R12*0x8] CALL 0x0019ad3e INC R12 CMP R13,R12 JNZ 0x0019b814 JMP 0x0019b87d LAB_0019b849: MOV RSI,R15 MOV EDX,0x14a9 CALL 0x0012eb8f JMP 0x0019b832 LAB_0019b858: MOV R14D,0xffffffff TEST R13,R13 JZ 0x0019b87d XOR R15D,R15D LAB_0019b866: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R15*0x8] XOR ESI,ESI CALL 0x0019aa46 INC R15 CMP R13,R15 JNZ 0x0019b866 LAB_0019b87d: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int resize_partitioned_key_cache (long param_1,ulong param_2,long param_3,ulong param_4,ulong param_5,ulong param_6) { pthread_mutex_t *__mutex; uint uVar1; long lVar2; uint uVar3; int iVar4; uint uVar5; ulong uVar6; ulong uVar7; uVar1 = *(uint *)(param_1 + 0x1c); uVar6 = (ulong)uVar1; if (param_3 == 0) { iVar4 = -1; if (uVar6 != 0) { uVar7 = 0; do { end_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),0); uVar7 = uVar7 + 1; } while (uVar6 != uVar7); } } else { if (uVar6 != 0) { uVar7 = 0; uVar5 = 0; do { uVar3 = prepare_resize_simple_key_cache (*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8),1); uVar5 = uVar5 | uVar3; uVar7 = uVar7 + 1; } while (uVar6 != uVar7); param_6 = param_6 & 0xffffffff; param_5 = param_5 & 0xffffffff; param_4 = param_4 & 0xffffffff; param_2 = param_2 & 0xffffffff; if (uVar5 != 0) { return -1; } } iVar4 = init_partitioned_key_cache(param_1,param_2,param_3,param_4,param_5,param_6); if (uVar1 != 0 && 0 < iVar4) { uVar7 = 0; do { lVar2 = *(long *)(*(long *)(param_1 + 8) + uVar7 * 8); __mutex = (pthread_mutex_t *)(lVar2 + 0xc0); if (*(long *)(lVar2 + 0x100) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x14a9); } finish_resize_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar7 * 8)); uVar7 = uVar7 + 1; } while (uVar6 != uVar7); } } return iVar4; }
30,475
PFS_buffer_scalable_container<PFS_thread, 256, 256, PFS_thread_array, PFS_thread_allocator>::deallocate(PFS_thread*)
eloqsql/storage/perfschema/pfs_buffer_container.h
void deallocate(value_type *safe_pfs) { /* Find the containing page */ PFS_opaque_container_page *opaque_page= safe_pfs->m_page; array_type *page= reinterpret_cast<array_type *> (opaque_page); /* Mark the object free */ safe_pfs->m_lock.allocated_to_free(); /* Flag the containing page as not full. */ page->m_full= false; /* Flag the overall container as not full. */ m_full= false; }
O0
c
PFS_buffer_scalable_container<PFS_thread, 256, 256, PFS_thread_array, PFS_thread_allocator>::deallocate(PFS_thread*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x7d8(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi addq $0x7e0, %rdi # imm = 0x7E0 callq 0x37d90 movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx movb $0x0, (%rcx) movb $0x0, 0x9(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN29PFS_buffer_scalable_containerI8PFS_hostLi128ELi128E14PFS_host_array18PFS_host_allocatorE10deallocateEPS0_: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+7D8h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rdi, [rbp+var_10] add rdi, 7E0h; this call _ZN8pfs_lock17allocated_to_freeEv; pfs_lock::allocated_to_free(void) mov rax, [rbp+var_28] mov rcx, [rbp+var_20] mov byte ptr [rcx], 0 mov byte ptr [rax+9], 0 add rsp, 30h pop rbp retn
long long PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate( long long a1, long long a2) { long long result; // rax _BYTE *v3; // [rsp+10h] [rbp-20h] v3 = *(_BYTE **)(a2 + 2008); pfs_lock::allocated_to_free((pfs_lock *)(a2 + 2016)); result = a1; *v3 = 0; *(_BYTE *)(a1 + 9) = 0; return result; }
deallocate: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x7d8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x7e0 CALL 0x00137d90 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] MOV byte ptr [RCX],0x0 MOV byte ptr [RAX + 0x9],0x0 ADD RSP,0x30 POP RBP RET
/* PFS_buffer_scalable_container<PFS_host, 128, 128, PFS_host_array, PFS_host_allocator>::deallocate(PFS_host*) */ void __thiscall PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate (PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator> *this, PFS_host *param_1) { int1 *puVar1; puVar1 = *(int1 **)(param_1 + 0x7d8); pfs_lock::allocated_to_free((pfs_lock *)(param_1 + 0x7e0)); *puVar1 = 0; this[9] = (PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>)0x0; return; }
30,476
blst_sk_inverse
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_sk_inverse(pow256 ret, const pow256 a) { const union { long one; char little; } is_endian = { 1 }; if (((size_t)a|(size_t)ret)%sizeof(limb_t) == 0 && is_endian.little) { limb_t *out = (limb_t *)ret; mul_mont_sparse_256(out, (const limb_t *)a, BLS12_381_rRR, BLS12_381_r, r0); reciprocal_fr(out, out); from_mont_256(out, out, BLS12_381_r, r0); } else { vec256 out; limbs_from_le_bytes(out, a, 32); mul_mont_sparse_256(out, out, BLS12_381_rRR, BLS12_381_r, r0); reciprocal_fr(out, out); from_mont_256(out, out, BLS12_381_r, r0); le_bytes_from_limbs(ret, out, 32); vec_zero(out, sizeof(out)); } }
O3
c
blst_sk_inverse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movabsq $-0x100000001, %r14 # imm = 0xFFFFFFFEFFFFFFFF movl %esi, %eax orl %ebx, %eax testb $0x7, %al je 0x655ae movl $0x1f, %eax xorl %ecx, %ecx shlq $0x8, %rcx movzbl (%rsi,%rax), %edx orq %rdx, %rcx movq %rax, %rdx andq $-0x8, %rdx movq %rcx, -0x40(%rbp,%rdx) addq $-0x1, %rax jb 0x65503 leaq 0x27a29(%rip), %rdx # 0x8cf50 leaq 0x27512(%rip), %r15 # 0x8ca40 leaq -0x40(%rbp), %r12 movq %r12, %rdi movq %r12, %rsi movq %r15, %rcx movq %r14, %r8 callq 0x76040 movq %r12, %rdi movq %r12, %rsi callq 0x6278a movq %r12, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x76460 cmpq %rbx, %r12 je 0x65589 xorl %eax, %eax movq -0x40(%rbp,%rax,8), %rdx xorl %ecx, %ecx movb %dl, (%rbx,%rcx) incq %rcx shrq $0x8, %rdx cmpq $0x8, %rcx jne 0x6556d incq %rax addq %rcx, %rbx cmpq $0x4, %rax jne 0x65566 xorl %eax, %eax movq $0x0, -0x40(%rbp,%rax,8) incq %rax cmpq $0x4, %rax jne 0x6558b leaq -0x40(%rbp), %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x2799b(%rip), %rdx # 0x8cf50 leaq 0x27484(%rip), %r15 # 0x8ca40 movq %rbx, %rdi movq %r15, %rcx movq %r14, %r8 callq 0x76040 movq %rbx, %rdi movq %rbx, %rsi callq 0x6278a movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r14, %rcx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x76460
blst_sk_inverse: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdi mov r14, 0FFFFFFFEFFFFFFFFh mov eax, esi or eax, ebx test al, 7 jz loc_655AE mov eax, 1Fh xor ecx, ecx loc_65503: shl rcx, 8 movzx edx, byte ptr [rsi+rax] or rcx, rdx mov rdx, rax and rdx, 0FFFFFFFFFFFFFFF8h mov [rbp+rdx+var_40], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_65503 lea rdx, BLS12_381_rRR lea r15, BLS12_381_r lea r12, [rbp+var_40] mov rdi, r12 mov rsi, r12 mov rcx, r15 mov r8, r14 call mul_mont_sparse_256 mov rdi, r12 mov rsi, r12 call reciprocal_fr mov rdi, r12 mov rsi, r12 mov rdx, r15 mov rcx, r14 call from_mont_256 cmp r12, rbx jz short loc_65589 xor eax, eax loc_65566: mov rdx, [rbp+rax*8+var_40] xor ecx, ecx loc_6556D: mov [rbx+rcx], dl inc rcx shr rdx, 8 cmp rcx, 8 jnz short loc_6556D inc rax add rbx, rcx cmp rax, 4 jnz short loc_65566 loc_65589: xor eax, eax loc_6558B: mov [rbp+rax*8+var_40], 0 inc rax cmp rax, 4 jnz short loc_6558B lea rax, [rbp+var_40] add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_655AE: lea rdx, BLS12_381_rRR lea r15, BLS12_381_r mov rdi, rbx mov rcx, r15 mov r8, r14 call mul_mont_sparse_256 mov rdi, rbx mov rsi, rbx call reciprocal_fr mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r14 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp jmp from_mont_256
_QWORD * blst_sk_inverse(_QWORD *a1, long long a2) { _QWORD *v2; // rbx long long v3; // rax unsigned long long v4; // rcx long long i; // rax unsigned long long v7; // rdx long long j; // rcx long long k; // rax _QWORD v11[8]; // [rsp+0h] [rbp-40h] BYREF v2 = a1; if ( (((unsigned __int8)a1 | (unsigned __int8)a2) & 7) != 0 ) { v3 = 31LL; v4 = 0LL; do { v4 = *(unsigned __int8 *)(a2 + v3) | (v4 << 8); *(_QWORD *)((char *)v11 + (v3 & 0xFFFFFFFFFFFFFFF8LL)) = v4; } while ( v3-- != 0 ); mul_mont_sparse_256(v11, v11, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); reciprocal_fr((long long)v11, (long long)v11); from_mont_256(v11, v11, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); if ( v11 != a1 ) { for ( i = 0LL; i != 4; ++i ) { v7 = v11[i]; for ( j = 0LL; j != 8; ++j ) { *((_BYTE *)v2 + j) = v7; v7 >>= 8; } ++v2; } } for ( k = 0LL; k != 4; ++k ) v11[k] = 0LL; return v11; } else { mul_mont_sparse_256(a1, a2, &BLS12_381_rRR, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); reciprocal_fr((long long)a1, (long long)a1); return (_QWORD *)from_mont_256(a1, a1, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); } }
blst_sk_inverse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV R14,-0x100000001 MOV EAX,ESI OR EAX,EBX TEST AL,0x7 JZ 0x001655ae MOV EAX,0x1f XOR ECX,ECX LAB_00165503: SHL RCX,0x8 MOVZX EDX,byte ptr [RSI + RAX*0x1] OR RCX,RDX MOV RDX,RAX AND RDX,-0x8 MOV qword ptr [RBP + RDX*0x1 + -0x40],RCX ADD RAX,-0x1 JC 0x00165503 LEA RDX,[0x18cf50] LEA R15,[0x18ca40] LEA R12,[RBP + -0x40] MOV RDI,R12 MOV RSI,R12 MOV RCX,R15 MOV R8,R14 CALL 0x00176040 MOV RDI,R12 MOV RSI,R12 CALL 0x0016278a MOV RDI,R12 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x00176460 CMP R12,RBX JZ 0x00165589 XOR EAX,EAX LAB_00165566: MOV RDX,qword ptr [RBP + RAX*0x8 + -0x40] XOR ECX,ECX LAB_0016556d: MOV byte ptr [RBX + RCX*0x1],DL INC RCX SHR RDX,0x8 CMP RCX,0x8 JNZ 0x0016556d INC RAX ADD RBX,RCX CMP RAX,0x4 JNZ 0x00165566 LAB_00165589: XOR EAX,EAX LAB_0016558b: MOV qword ptr [RBP + RAX*0x8 + -0x40],0x0 INC RAX CMP RAX,0x4 JNZ 0x0016558b LEA RAX,[RBP + -0x40] ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001655ae: LEA RDX,[0x18cf50] LEA R15,[0x18ca40] MOV RDI,RBX MOV RCX,R15 MOV R8,R14 CALL 0x00176040 MOV RDI,RBX MOV RSI,RBX CALL 0x0016278a MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R14 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x00176460
ulong * blst_sk_inverse(ulong *param_1,long param_2) { ulong uVar1; long lVar2; ulong *puVar3; ulong uVar4; long lVar5; bool bVar6; ulong local_48 [4]; if ((((uint)param_2 | (uint)param_1) & 7) != 0) { uVar1 = 0x1f; uVar4 = 0; do { uVar4 = uVar4 << 8 | (ulong)*(byte *)(param_2 + uVar1); *(ulong *)((long)local_48 + (uVar1 & 0xfffffffffffffff8)) = uVar4; bVar6 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar6); mul_mont_sparse_256(local_48,local_48,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); reciprocal_fr(local_48,local_48); from_mont_256(local_48,local_48,BLS12_381_r); if (local_48 != param_1) { lVar2 = 0; do { uVar1 = local_48[lVar2]; lVar5 = 0; do { *(char *)((long)param_1 + lVar5) = (char)uVar1; lVar5 = lVar5 + 1; uVar1 = uVar1 >> 8; } while (lVar5 != 8); lVar2 = lVar2 + 1; param_1 = param_1 + 1; } while (lVar2 != 4); } lVar2 = 0; do { local_48[lVar2] = 0; lVar2 = lVar2 + 1; } while (lVar2 != 4); return local_48; } mul_mont_sparse_256(param_1,param_2,BLS12_381_rRR,BLS12_381_r,0xfffffffeffffffff); reciprocal_fr(param_1,param_1); puVar3 = (ulong *)from_mont_256(param_1,param_1,BLS12_381_r,0xfffffffeffffffff); return puVar3; }
30,477
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O0
c
my_stat: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x38d96 cmpq $0x0, -0x18(%rbp) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x24(%rbp) testb $0x1, %al jne 0x38daf jmp 0x38dd4 leaq 0x359022(%rip), %rax # 0x391dd8 movl (%rax), %edi movq -0x20(%rbp), %rdx movl $0x90, %esi callq 0x2b560 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x38dd2 jmp 0x38e1b jmp 0x38dd4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x255d0 cmpl $0x0, %eax jne 0x38df2 jmp 0x38de8 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x38e61 jmp 0x38df4 jmp 0x38df6 callq 0x25050 movl (%rax), %eax movl %eax, -0x28(%rbp) callq 0x2c180 movl -0x28(%rbp), %ecx movl %ecx, (%rax) cmpl $0x0, -0x24(%rbp) je 0x38e19 movq -0x18(%rbp), %rdi callq 0x2b8e0 jmp 0x38e1b movq -0x20(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x38e57 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x2c180 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0xd, %edi movl $0x4, %esi movb $0x0, %al callq 0x37670 movq $0x0, -0x8(%rbp) jmp 0x38e61 jmp 0x38e59 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_stat: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_38D96: cmp [rbp+var_18], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_24], ecx test al, 1 jnz short loc_38DAF jmp short loc_38DD4 loc_38DAF: lea rax, key_memory_MY_STAT mov edi, [rax] mov rdx, [rbp+var_20] mov esi, 90h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_38DD2 jmp short loc_38E1B loc_38DD2: jmp short $+2 loc_38DD4: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _stat64 cmp eax, 0 jnz short loc_38DF2 jmp short $+2 loc_38DE8: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_38E61 loc_38DF2: jmp short $+2 loc_38DF4: jmp short $+2 loc_38DF6: call ___errno_location mov eax, [rax] mov [rbp+var_28], eax call _my_thread_var mov ecx, [rbp+var_28] mov [rax], ecx cmp [rbp+var_24], 0 jz short loc_38E19 mov rdi, [rbp+var_18] call my_free loc_38E19: jmp short $+2 loc_38E1B: mov rax, [rbp+var_20] and rax, 18h cmp rax, 0 jz short loc_38E57 mov rax, [rbp+var_10] mov [rbp+var_30], rax call _my_thread_var mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 0Dh mov esi, 4 mov al, 0 call my_error mov [rbp+var_8], 0 jmp short loc_38E61 loc_38E57: jmp short $+2 loc_38E59: mov [rbp+var_8], 0 loc_38E61: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long my_stat(long long a1, long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+8h] [rbp-28h] long long v7; // [rsp+18h] [rbp-18h] v7 = a2; if ( a2 || (v7 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 ) { if ( !(unsigned int)stat64(a1, v7) ) return v7; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( !a2 ) my_free(v7); } if ( (a3 & 0x18) != 0 ) { v3 = (unsigned int *)my_thread_var(); my_error(0xDu, 4LL, a1, *v3); } return 0LL; }
my_stat: 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 JMP 0x00138d96 LAB_00138d96: CMP qword ptr [RBP + -0x18],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x24],ECX TEST AL,0x1 JNZ 0x00138daf JMP 0x00138dd4 LAB_00138daf: LEA RAX,[0x491dd8] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV ESI,0x90 CALL 0x0012b560 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00138dd2 JMP 0x00138e1b LAB_00138dd2: JMP 0x00138dd4 LAB_00138dd4: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001255d0 CMP EAX,0x0 JNZ 0x00138df2 JMP 0x00138de8 LAB_00138de8: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x00138e61 LAB_00138df2: JMP 0x00138df4 LAB_00138df4: JMP 0x00138df6 LAB_00138df6: CALL 0x00125050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x28],EAX CALL 0x0012c180 MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00138e19 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012b8e0 LAB_00138e19: JMP 0x00138e1b LAB_00138e1b: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x18 CMP RAX,0x0 JZ 0x00138e57 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x0012c180 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0xd MOV ESI,0x4 MOV AL,0x0 CALL 0x00137670 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00138e61 LAB_00138e57: JMP 0x00138e59 LAB_00138e59: MOV qword ptr [RBP + -0x8],0x0 LAB_00138e61: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; int *piVar2; int4 *puVar3; stat64 *local_20; local_20 = param_2; if ((param_2 != (stat64 *)0x0) || (local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) { iVar1 = stat64(param_1,local_20); if (iVar1 == 0) { return local_20; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(local_20); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
30,478
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O3
c
my_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %r14 testq %rsi, %rsi jne 0x30bf4 leaq 0x33d59b(%rip), %rax # 0x36e178 movl (%rax), %edi movl $0x90, %esi movq %r15, %rdx callq 0x29781 movq %rax, %r14 testq %rax, %rax je 0x30c20 movq %rbx, %rdi movq %r14, %rsi callq 0x24620 testl %eax, %eax je 0x30c49 callq 0x24060 movl (%rax), %r13d callq 0x2a19e movl %r13d, (%rax) testq %r12, %r12 jne 0x30c20 movq %r14, %rdi callq 0x299ae testb $0x18, %r15b je 0x30c46 callq 0x2a19e movl (%rax), %ecx xorl %r14d, %r14d movl $0x4, %esi movl $0xd, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x2fcb7 jmp 0x30c49 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_stat: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, rsi test rsi, rsi jnz short loc_30BF4 lea rax, key_memory_MY_STAT mov edi, [rax] mov esi, 90h mov rdx, r15 call my_malloc mov r14, rax test rax, rax jz short loc_30C20 loc_30BF4: mov rdi, rbx mov rsi, r14 call _stat64 test eax, eax jz short loc_30C49 call ___errno_location mov r13d, [rax] call _my_thread_var mov [rax], r13d test r12, r12 jnz short loc_30C20 mov rdi, r14 call my_free loc_30C20: test r15b, 18h jz short loc_30C46 call _my_thread_var mov ecx, [rax] xor r14d, r14d mov esi, 4 mov edi, 0Dh mov rdx, rbx xor eax, eax call my_error jmp short loc_30C49 loc_30C46: xor r14d, r14d loc_30C49: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_stat(long long a1, long long a2, char a3) { long long v4; // r14 int v5; // r13d unsigned int *v6; // rax v4 = a2; if ( a2 || (v4 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 ) { if ( !(unsigned int)stat64(a1, v4) ) return v4; v5 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v5; if ( !a2 ) my_free(v4); } if ( (a3 & 0x18) == 0 ) return 0LL; v6 = (unsigned int *)my_thread_var(); v4 = 0LL; my_error(0xDu, 4, a1, *v6); return v4; }
my_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,RSI TEST RSI,RSI JNZ 0x00130bf4 LEA RAX,[0x46e178] MOV EDI,dword ptr [RAX] MOV ESI,0x90 MOV RDX,R15 CALL 0x00129781 MOV R14,RAX TEST RAX,RAX JZ 0x00130c20 LAB_00130bf4: MOV RDI,RBX MOV RSI,R14 CALL 0x00124620 TEST EAX,EAX JZ 0x00130c49 CALL 0x00124060 MOV R13D,dword ptr [RAX] CALL 0x0012a19e MOV dword ptr [RAX],R13D TEST R12,R12 JNZ 0x00130c20 MOV RDI,R14 CALL 0x001299ae LAB_00130c20: TEST R15B,0x18 JZ 0x00130c46 CALL 0x0012a19e MOV ECX,dword ptr [RAX] XOR R14D,R14D MOV ESI,0x4 MOV EDI,0xd MOV RDX,RBX XOR EAX,EAX CALL 0x0012fcb7 JMP 0x00130c49 LAB_00130c46: XOR R14D,R14D LAB_00130c49: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; stat64 *__buf; int *piVar2; int4 *puVar3; __buf = param_2; if ((param_2 != (stat64 *)0x0) || (__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) { iVar1 = stat64(param_1,__buf); if (iVar1 == 0) { return __buf; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(__buf); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
30,479
ma_send
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
static ssize_t ma_send(my_socket socket, const uchar *buffer, size_t length, int flags) { ssize_t r; #if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32) struct sigaction act, oldact; act.sa_handler= SIG_IGN; sigaction(SIGPIPE, &act, &oldact); #endif do { r = send(socket, (const char *)buffer, IF_WIN((int)length,length), flags); } while (r == -1 && IS_SOCKET_EINTR(socket_errno)); #if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32) sigaction(SIGPIPE, &oldact, NULL); #endif return r; }
O0
c
ma_send: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx callq 0x36360 movq %rax, -0x28(%rbp) xorl %eax, %eax cmpq $-0x1, -0x28(%rbp) movb %al, -0x29(%rbp) jne 0x679e7 callq 0x369b0 cmpl $0x4, (%rax) sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x679b6 movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ma_send: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx loc_679B6: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] call _send mov [rbp+var_28], rax xor eax, eax cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh mov [rbp+var_29], al jnz short loc_679E7 call ___errno_location cmp dword ptr [rax], 4 setz al mov [rbp+var_29], al loc_679E7: mov al, [rbp+var_29] test al, 1 jnz short loc_679B6 mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long ma_send(unsigned int a1, long long a2, long long a3, unsigned int a4) { bool v5; // [rsp+7h] [rbp-29h] long long v6; // [rsp+8h] [rbp-28h] do { v6 = send(a1, a2, a3, a4); v5 = 0; if ( v6 == -1 ) v5 = *(_DWORD *)__errno_location(a1) == 4; } while ( v5 ); return v6; }
ma_send: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX LAB_001679b6: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] CALL 0x00136360 MOV qword ptr [RBP + -0x28],RAX XOR EAX,EAX CMP qword ptr [RBP + -0x28],-0x1 MOV byte ptr [RBP + -0x29],AL JNZ 0x001679e7 CALL 0x001369b0 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001679e7: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001679b6 MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
ssize_t ma_send(int param_1,void *param_2,size_t param_3,int param_4) { ssize_t sVar1; int *piVar2; bool bVar3; do { sVar1 = send(param_1,param_2,param_3,param_4); bVar3 = false; if (sVar1 == -1) { piVar2 = __errno_location(); bVar3 = *piVar2 == 4; } } while (bVar3); return sVar1; }
30,480
my_mb_wc_filename
eloqsql/strings/ctype-utf8.c
static int my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int byte1, byte2; if (s >= e) return MY_CS_TOOSMALL; if (*s < 128 && filename_safe_char[*s]) { *pwc= *s; return 1; } if (*s != MY_FILENAME_ESCAPE) return MY_CS_ILSEQ; if (s + 3 > e) return MY_CS_TOOSMALL3; byte1= s[1]; if (byte1 == 0) return MY_CS_ILSEQ; /* avoid possible out-of-bounds read */ byte2= s[2]; if (byte1 >= 0x30 && byte1 <= 0x7F && byte2 >= 0x30 && byte2 <= 0x7F) { int code= (byte1 - 0x30) * 80 + byte2 - 0x30; if (code < 5994 && touni[code]) { *pwc= touni[code]; return 3; } if (byte1 == '@' && byte2 == '@') { *pwc= 0; return 3; } } if (s + 4 > e) return MY_CS_TOOSMALL4; if ((byte1= hexlo(byte1)) >= 0 && (byte2= hexlo(byte2)) >= 0) { int byte3= hexlo(s[3]); int byte4= hexlo(s[3] ? s[4] : 0); if (byte3 >=0 && byte4 >=0) { *pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4; return 5; } } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_filename: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x13237be movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x13239ae movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x1323801 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x396784(%rip), %rax # 0x16b9f60 movsbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0x1323801 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x13239ae movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0x40, %eax je 0x1323819 movl $0x0, -0x4(%rbp) jmp 0x13239ae movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x1323833 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x13239ae movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) jne 0x1323850 movl $0x0, -0x4(%rbp) jmp 0x13239ae movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax movl %eax, -0x30(%rbp) cmpl $0x30, -0x2c(%rbp) jl 0x13238f3 cmpl $0x7f, -0x2c(%rbp) jg 0x13238f3 cmpl $0x30, -0x30(%rbp) jl 0x13238f3 cmpl $0x7f, -0x30(%rbp) jg 0x13238f3 movl -0x2c(%rbp), %eax subl $0x30, %eax imull $0x50, %eax, %eax addl -0x30(%rbp), %eax subl $0x30, %eax movl %eax, -0x34(%rbp) cmpl $0x176a, -0x34(%rbp) # imm = 0x176A jge 0x13238ce movslq -0x34(%rbp), %rcx leaq 0x39673f(%rip), %rax # 0x16b9fe0 movzwl (%rax,%rcx,2), %eax cmpl $0x0, %eax je 0x13238ce movslq -0x34(%rbp), %rcx leaq 0x39672b(%rip), %rax # 0x16b9fe0 movzwl (%rax,%rcx,2), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x13239ae cmpl $0x40, -0x2c(%rbp) jne 0x13238f1 cmpl $0x40, -0x30(%rbp) jne 0x13238f1 movq -0x18(%rbp), %rax movq $0x0, (%rax) movl $0x3, -0x4(%rbp) jmp 0x13239ae jmp 0x13238f3 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x132390d movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x13239ae movl -0x2c(%rbp), %edi callq 0x1323dd0 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jl 0x13239a7 movl -0x30(%rbp), %edi callq 0x1323dd0 movl %eax, -0x30(%rbp) cmpl $0x0, %eax jl 0x13239a7 movq -0x20(%rbp), %rax movzbl 0x3(%rax), %edi callq 0x1323dd0 movl %eax, -0x38(%rbp) movq -0x20(%rbp), %rax movzbl 0x3(%rax), %eax cmpl $0x0, %eax je 0x132395b movq -0x20(%rbp), %rax movzbl 0x4(%rax), %eax movl %eax, -0x40(%rbp) jmp 0x1323962 xorl %eax, %eax movl %eax, -0x40(%rbp) jmp 0x1323962 movl -0x40(%rbp), %edi callq 0x1323dd0 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x38(%rbp) jl 0x13239a5 cmpl $0x0, -0x3c(%rbp) jl 0x13239a5 movl -0x2c(%rbp), %eax shll $0xc, %eax movl -0x30(%rbp), %ecx shll $0x8, %ecx addl %ecx, %eax movl -0x38(%rbp), %ecx shll $0x4, %ecx addl %ecx, %eax addl -0x3c(%rbp), %eax movslq %eax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x5, -0x4(%rbp) jmp 0x13239ae jmp 0x13239a7 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
my_mb_wc_filename: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_13237BE mov [rbp+var_4], 0FFFFFF9Bh jmp loc_13239AE loc_13237BE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_1323801 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax lea rax, filename_safe_char movsx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_1323801 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_13239AE loc_1323801: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 40h ; '@' jz short loc_1323819 mov [rbp+var_4], 0 jmp loc_13239AE loc_1323819: mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_1323833 mov [rbp+var_4], 0FFFFFF99h jmp loc_13239AE loc_1323833: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jnz short loc_1323850 mov [rbp+var_4], 0 jmp loc_13239AE loc_1323850: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] mov [rbp+var_30], eax cmp [rbp+var_2C], 30h ; '0' jl loc_13238F3 cmp [rbp+var_2C], 7Fh jg loc_13238F3 cmp [rbp+var_30], 30h ; '0' jl short loc_13238F3 cmp [rbp+var_30], 7Fh jg short loc_13238F3 mov eax, [rbp+var_2C] sub eax, 30h ; '0' imul eax, 50h ; 'P' add eax, [rbp+var_30] sub eax, 30h ; '0' mov [rbp+var_34], eax cmp [rbp+var_34], 176Ah jge short loc_13238CE movsxd rcx, [rbp+var_34] lea rax, touni movzx eax, word ptr [rax+rcx*2] cmp eax, 0 jz short loc_13238CE movsxd rcx, [rbp+var_34] lea rax, touni movzx eax, word ptr [rax+rcx*2] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_13239AE loc_13238CE: cmp [rbp+var_2C], 40h ; '@' jnz short loc_13238F1 cmp [rbp+var_30], 40h ; '@' jnz short loc_13238F1 mov rax, [rbp+var_18] mov qword ptr [rax], 0 mov [rbp+var_4], 3 jmp loc_13239AE loc_13238F1: jmp short $+2 loc_13238F3: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_132390D mov [rbp+var_4], 0FFFFFF98h jmp loc_13239AE loc_132390D: mov edi, [rbp+var_2C] call hexlo mov [rbp+var_2C], eax cmp eax, 0 jl loc_13239A7 mov edi, [rbp+var_30] call hexlo mov [rbp+var_30], eax cmp eax, 0 jl short loc_13239A7 mov rax, [rbp+var_20] movzx edi, byte ptr [rax+3] call hexlo mov [rbp+var_38], eax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+3] cmp eax, 0 jz short loc_132395B mov rax, [rbp+var_20] movzx eax, byte ptr [rax+4] mov [rbp+var_40], eax jmp short loc_1323962 loc_132395B: xor eax, eax mov [rbp+var_40], eax jmp short $+2 loc_1323962: mov edi, [rbp+var_40] call hexlo mov [rbp+var_3C], eax cmp [rbp+var_38], 0 jl short loc_13239A5 cmp [rbp+var_3C], 0 jl short loc_13239A5 mov eax, [rbp+var_2C] shl eax, 0Ch mov ecx, [rbp+var_30] shl ecx, 8 add eax, ecx mov ecx, [rbp+var_38] shl ecx, 4 add eax, ecx add eax, [rbp+var_3C] movsxd rcx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 5 jmp short loc_13239AE loc_13239A5: jmp short $+2 loc_13239A7: mov [rbp+var_4], 0 loc_13239AE: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long my_mb_wc_filename(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { unsigned int v5; // [rsp+0h] [rbp-40h] int v6; // [rsp+4h] [rbp-3Ch] int v7; // [rsp+8h] [rbp-38h] int v8; // [rsp+Ch] [rbp-34h] unsigned int v9; // [rsp+10h] [rbp-30h] int v10; // [rsp+10h] [rbp-30h] int v11; // [rsp+14h] [rbp-2Ch] int v12; // [rsp+14h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( *a3 < 0x80u && filename_safe_char[*a3] ) { *a2 = *a3; return 1; } else if ( *a3 == 64 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { v11 = a3[1]; if ( a3[1] ) { v9 = a3[2]; if ( a3[1] >= 0x30u && a3[1] <= 0x7Fu && a3[2] >= 0x30u && a3[2] <= 0x7Fu ) { v8 = v9 + 80 * (v11 - 48) - 48; if ( v8 < 5994 && touni[v8] ) { *a2 = touni[v8]; return 3; } if ( v11 == 64 && v9 == 64 ) { *a2 = 0LL; return 3; } } if ( (unsigned long long)(a3 + 4) <= a4 ) { v12 = hexlo(a3[1]); if ( v12 < 0 ) return 0; v10 = hexlo(v9); if ( v10 < 0 ) return 0; v7 = hexlo(a3[3]); v5 = a3[3] ? a3[4] : 0; v6 = hexlo(v5); if ( v7 < 0 || v6 < 0 ) { return 0; } else { *a2 = v6 + 16 * v7 + (v10 << 8) + (v12 << 12); return 5; } } else { return (unsigned int)-104; } } else { return 0; } } else { return (unsigned int)-103; } } else { return 0; } } else { return (unsigned int)-101; } }
rtr_store_parent_path: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOV RDI,qword ptr [RAX + 0x8] CALL 0x01268500 MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_013237cc: CMP qword ptr [RBP + -0x30],0x1 JC 0x01323875 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x30] SUB RSI,0x1 CALL 0x01268530 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x20] JBE 0x01323813 JMP 0x01323875 LAB_01323813: MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX + 0xd0],0x3 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x98],RCX MOV RDI,qword ptr [RBP + -0x48] CALL 0x010cd530 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x01323862 MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x28] CALL 0x01268a10 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x01323864 LAB_01323862: JMP 0x01323875 LAB_01323864: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,-0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x013237cc LAB_01323875: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x50 POP RBP RET
/* rtr_store_parent_path(buf_block_t const*, btr_cur_t*, unsigned long, unsigned long, mtr_t*) */ long rtr_store_parent_path (buf_block_t *param_1,btr_cur_t *param_2,ulong param_3,ulong param_4,mtr_t *param_5) { btr_pcur_t *pbVar1; long lVar2; buf_block_t *pbVar3; long local_40; long local_38; local_38 = std::vector<node_visit_t,ut_allocator<node_visit_t,true>>::size (*(vector<node_visit_t,ut_allocator<node_visit_t,true>> **) (*(long *)(param_2 + 0x90) + 8)); local_40 = 0; while( true ) { if (local_38 == 0) { return local_40; } lVar2 = std::vector<node_visit_t,ut_allocator<node_visit_t,true>>::operator[] (*(vector<node_visit_t,ut_allocator<node_visit_t,true>> **) (*(long *)(param_2 + 0x90) + 8),local_38 - 1); pbVar1 = *(btr_pcur_t **)(lVar2 + 0x18); if (param_4 < *(ulong *)(lVar2 + 8)) break; *(int4 *)(pbVar1 + 0xd0) = 3; *(ulong *)(pbVar1 + 0x98) = param_3; pbVar3 = (buf_block_t *)btr_pcur_get_block(pbVar1); if (pbVar3 != param_1) { return local_40; } btr_pcur_store_position(pbVar1,param_5); local_40 = local_40 + 1; local_38 = local_38 + -1; } return local_40; }
30,481
spdlog::logger::sink_it_(spdlog::details::log_msg const&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/logger-inl.h
SPDLOG_INLINE void logger::sink_it_(const details::log_msg &msg) { for (auto &sink : sinks_) { if (sink->should_log(msg.level)) { SPDLOG_TRY { sink->log(msg); } SPDLOG_LOGGER_CATCH() } }
O0
c
spdlog::logger::sink_it_(spdlog::details::log_msg const&): subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x18(%rsp) addq $0x28, %rax movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rdi callq 0xd2bf0 movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rdi callq 0xd2c60 movq %rax, 0x90(%rsp) leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xd2c20 testb $0x1, %al jne 0xd2e98 jmp 0xd30a2 leaq 0x98(%rsp), %rdi callq 0xd2c90 movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rdi callq 0xd2ca0 movq %rax, %rdi movq 0xa8(%rsp), %rax movl 0x10(%rax), %esi callq 0xd30f0 testb $0x1, %al jne 0xd2ed6 jmp 0xd308e movq 0x88(%rsp), %rdi callq 0xd2ca0 movq %rax, %rdi movq 0xa8(%rsp), %rsi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax jmp 0xd2ef9 jmp 0xd2f90 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) movl 0x7c(%rsp), %eax movl $0x2, %ecx cmpl %ecx, %eax jne 0xd2f95 movq 0x80(%rsp), %rdi callq 0x1a020 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq %rax, 0x8(%rsp) leaq 0x27(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x19dd0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1c7d0 jmp 0xd2f66 movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xd3190 jmp 0xd2f77 leaq 0x28(%rsp), %rdi callq 0x19e70 leaq 0x27(%rsp), %rdi callq 0x19de0 callq 0x1a050 jmp 0xd308e movq 0x80(%rsp), %rdi callq 0x1a020 leaq 0x57(%rsp), %rdi movq %rdi, (%rsp) callq 0x19dd0 movq (%rsp), %rdx leaq 0x3f906(%rip), %rsi # 0x1128c1 leaq 0x58(%rsp), %rdi callq 0x1c7d0 jmp 0xd2fc7 movq 0x18(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xd3190 jmp 0xd2fd8 leaq 0x58(%rsp), %rdi callq 0x19e70 leaq 0x57(%rsp), %rdi callq 0x19de0 callq 0x1a040 jmp 0xd30e2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xd3024 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x58(%rsp), %rdi callq 0x19e70 leaq 0x57(%rsp), %rdi callq 0x19de0 jmp 0xd3041 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) callq 0x1a050 jmp 0xd3048 jmp 0xd30cd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xd307b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x28(%rsp), %rdi callq 0x19e70 leaq 0x27(%rsp), %rdi callq 0x19de0 callq 0x1a050 jmp 0xd308c jmp 0xd30cd jmp 0xd3090 leaq 0x98(%rsp), %rdi callq 0xd2cb0 jmp 0xd2e7a movq 0x18(%rsp), %rdi movq 0xa8(%rsp), %rsi callq 0xd33c0 testb $0x1, %al jne 0xd30ba jmp 0xd30c5 movq 0x18(%rsp), %rdi movq (%rdi), %rax callq *0x20(%rax) addq $0xb8, %rsp retq movq 0x80(%rsp), %rdi callq 0x19e80 movq %rax, %rdi callq 0x1d880 nopw %cs:(%rax,%rax)
_ZN6spdlog6logger8sink_it_ERKNS_7details7log_msgE: sub rsp, 0B8h mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov rax, [rsp+0B8h+var_8] mov [rsp+0B8h+var_A0], rax add rax, 28h ; '(' mov [rsp+0B8h+var_18], rax mov rdi, [rsp+0B8h+var_18] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE5beginEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::begin(void) mov [rsp+0B8h+var_20], rax mov rdi, [rsp+0B8h+var_18] call _ZNSt6vectorISt10shared_ptrIN6spdlog5sinks4sinkEESaIS4_EE3endEv; std::vector<std::shared_ptr<spdlog::sinks::sink>>::end(void) mov [rsp+0B8h+var_28], rax loc_D2E7A: lea rdi, [rsp+0B8h+var_20] lea rsi, [rsp+0B8h+var_28] call _ZN9__gnu_cxxneIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>> const&) test al, 1 jnz short loc_D2E98 jmp loc_D30A2 loc_D2E98: lea rdi, [rsp+0B8h+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator*(void) mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_30] call _ZNKSt19__shared_ptr_accessIN6spdlog5sinks4sinkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rsp+0B8h+var_10] mov esi, [rax+10h] call _ZNK6spdlog5sinks4sink10should_logENS_5level10level_enumE; spdlog::sinks::sink::should_log(spdlog::level::level_enum) test al, 1 jnz short loc_D2ED6 jmp loc_D308E loc_D2ED6: mov rdi, [rsp+0B8h+var_30] call _ZNKSt19__shared_ptr_accessIN6spdlog5sinks4sinkELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rsi, [rsp+0B8h+var_10] mov rax, [rdi] mov rax, [rax+10h] call rax jmp short $+2 loc_D2EF9: jmp loc_D2F90 mov rcx, rax mov eax, edx mov [rsp+0B8h+var_38], rcx mov [rsp+0B8h+var_3C], eax mov eax, [rsp+0B8h+var_3C] mov ecx, 2 cmp eax, ecx jnz short loc_D2F95 mov rdi, [rsp+0B8h+var_38]; void * call ___cxa_begin_catch mov [rsp+0B8h+var_70], rax mov rdi, [rsp+0B8h+var_70] mov rax, [rdi] mov rax, [rax+10h] call rax mov [rsp+0B8h+var_B0], rax lea rdi, [rsp+0B8h+var_91] mov [rsp+0B8h+var_A8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+0B8h+var_B0] mov rdx, [rsp+0B8h+var_A8] lea rdi, [rsp+0B8h+var_90] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_D2F66: mov rdi, [rsp+0B8h+var_A0] lea rsi, [rsp+0B8h+var_90] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_D2F77: lea rdi, [rsp+0B8h+var_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0B8h+var_91] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch loc_D2F90: jmp loc_D308E loc_D2F95: mov rdi, [rsp+0B8h+var_38]; void * call ___cxa_begin_catch lea rdi, [rsp+0B8h+var_61] mov [rsp+0B8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0B8h+var_B8] lea rsi, aRethrowingUnkn; "Rethrowing unknown exception in logger" lea rdi, [rsp+0B8h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_D2FC7: mov rdi, [rsp+0B8h+var_A0] lea rsi, [rsp+0B8h+var_60] call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&) jmp short $+2 loc_D2FD8: lea rdi, [rsp+0B8h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0B8h+var_61] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_rethrow jmp loc_D30E2 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_D3024 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D3024: lea rdi, [rsp+arg_4F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_D3041 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax loc_D3041: call ___cxa_end_catch jmp short $+2 loc_D3048: jmp loc_D30CD mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_D307B mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D307B: lea rdi, [rsp+arg_1F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() call ___cxa_end_catch jmp short $+2 loc_D308C: jmp short loc_D30CD loc_D308E: jmp short $+2 loc_D3090: lea rdi, [rsp+0B8h+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN6spdlog5sinks4sinkEESt6vectorIS5_SaIS5_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<spdlog::sinks::sink> *,std::vector<std::shared_ptr<spdlog::sinks::sink>>>::operator++(void) jmp loc_D2E7A loc_D30A2: mov rdi, [rsp+0B8h+var_A0] mov rsi, [rsp+0B8h+var_10] call _ZN6spdlog6logger13should_flush_ERKNS_7details7log_msgE; spdlog::logger::should_flush_(spdlog::details::log_msg const&) test al, 1 jnz short loc_D30BA jmp short loc_D30C5 loc_D30BA: mov rdi, [rsp+0B8h+var_A0] mov rax, [rdi] call qword ptr [rax+20h] loc_D30C5: add rsp, 0B8h retn loc_D30CD: mov rdi, [rsp+arg_78] call __Unwind_Resume mov rdi, rax call __clang_call_terminate loc_D30E2: nop word ptr [rax+rax+00000000h]
sink_it_: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV qword ptr [RSP + 0xa8],RSI MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x18],RAX ADD RAX,0x28 MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001d2bf0 MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001d2c60 MOV qword ptr [RSP + 0x90],RAX LAB_001d2e7a: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x90] CALL 0x001d2c20 TEST AL,0x1 JNZ 0x001d2e98 JMP 0x001d30a2 LAB_001d2e98: LEA RDI,[RSP + 0x98] CALL 0x001d2c90 MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x88] CALL 0x001d2ca0 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0xa8] MOV ESI,dword ptr [RAX + 0x10] CALL 0x001d30f0 TEST AL,0x1 JNZ 0x001d2ed6 JMP 0x001d308e LAB_001d2ed6: MOV RDI,qword ptr [RSP + 0x88] CALL 0x001d2ca0 MOV RDI,RAX MOV RSI,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x10] LAB_001d2ef5: CALL RAX LAB_001d2ef7: JMP 0x001d2ef9 LAB_001d2ef9: JMP 0x001d2f90 LAB_001d2f90: JMP 0x001d308e LAB_001d308e: JMP 0x001d3090 LAB_001d3090: LEA RDI,[RSP + 0x98] CALL 0x001d2cb0 JMP 0x001d2e7a LAB_001d30a2: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0xa8] CALL 0x001d33c0 TEST AL,0x1 JNZ 0x001d30ba JMP 0x001d30c5 LAB_001d30ba: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] LAB_001d30c5: ADD RSP,0xb8 RET
/* spdlog::logger::sink_it_(spdlog::details::log_msg const&) */ void __thiscall spdlog::logger::sink_it_(logger *this,log_msg *param_1) { bool bVar1; __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *this_00; sink *psVar2; long *plVar3; ulong uVar4; int8 local_28; int8 local_20; vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *local_18; log_msg *local_10; logger *local_8; local_18 = (vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> *)(this + 0x28); local_10 = param_1; local_8 = this; local_20 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::begin(local_18); local_28 = std:: vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>> ::end(local_18); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_20,(__normal_iterator *)&local_28), bVar1) { this_00 = (__shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator*((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_20); psVar2 = (sink *)std:: __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(this_00); uVar4 = sinks::sink::should_log(psVar2,*(int4 *)(local_10 + 0x10)); if ((uVar4 & 1) != 0) { plVar3 = (long *)std:: __shared_ptr_access<spdlog::sinks::sink,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(this_00); /* try { // try from 001d2ef5 to 001d2ef6 has its CatchHandler @ 001d2efe */ (**(code **)(*plVar3 + 0x10))(plVar3,local_10); } __gnu_cxx:: __normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> ::operator++((__normal_iterator<std::shared_ptr<spdlog::sinks::sink>*,std::vector<std::shared_ptr<spdlog::sinks::sink>,std::allocator<std::shared_ptr<spdlog::sinks::sink>>>> *)&local_20); } uVar4 = should_flush_(this,local_10); if ((uVar4 & 1) != 0) { (**(code **)(*(long *)this + 0x20))(); } return; }
30,482
parse_lora_request(std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
llama.cpp/examples/server/utils.hpp
static std::vector<common_adapter_lora_info> parse_lora_request( const std::vector<common_adapter_lora_info> & lora_base, const json & data) { std::vector<common_adapter_lora_info> lora(lora_base); int max_idx = lora.size(); // clear existing value for (auto & entry : lora) { entry.scale = 0.0f; } // set value for (const auto & entry : data) { int id = json_value(entry, "id", -1); float scale = json_value(entry, "scale", 0.0f); if (0 <= id && id < max_idx) { lora[id].scale = scale; } else { throw std::runtime_error("invalid adapter id"); } } return lora; }
O3
cpp
parse_lora_request(std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdx, %r15 movq %rdi, %rbx callq 0x5c03c movq (%rbx), %rcx movq %rbx, 0x10(%rsp) movq 0x8(%rbx), %rax movq %rax, %rsi subq %rcx, %rsi shrq $0x4, %rsi subq %rcx, %rax je 0x38627 addq $-0x30, %rax movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB mulq %rdx movq %rdx, %xmm0 shrq $0x5, %rdx addq $0x4, %rdx andq $-0x4, %rdx pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1] psrlq $0x5, %xmm0 addq $0xb0, %rcx xorl %eax, %eax movdqa 0x138c75(%rip), %xmm1 # 0x1711c0 movdqa 0x138c7d(%rip), %xmm2 # 0x1711d0 movdqa 0x138c85(%rip), %xmm3 # 0x1711e0 pxor %xmm3, %xmm0 pcmpeqd %xmm4, %xmm4 movq %rax, %xmm5 pshufd $0x44, %xmm5, %xmm5 # xmm5 = xmm5[0,1,0,1] movdqa %xmm5, %xmm6 por %xmm2, %xmm6 pxor %xmm3, %xmm6 movdqa %xmm6, %xmm7 pcmpgtd %xmm0, %xmm7 pcmpeqd %xmm0, %xmm6 pshufd $0xf5, %xmm6, %xmm8 # xmm8 = xmm6[1,1,3,3] pand %xmm7, %xmm8 pshufd $0xf5, %xmm7, %xmm6 # xmm6 = xmm7[1,1,3,3] por %xmm8, %xmm6 movd %xmm6, %edi notl %edi testb $0x1, %dil je 0x385b0 movl $0x0, -0x90(%rcx) pxor %xmm4, %xmm6 pextrw $0x4, %xmm6, %edi testb $0x1, %dil je 0x385c6 movl $0x0, -0x60(%rcx) por %xmm1, %xmm5 pxor %xmm3, %xmm5 movdqa %xmm5, %xmm6 pcmpgtd %xmm0, %xmm6 pcmpeqd %xmm0, %xmm5 pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3] pand %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3] por %xmm7, %xmm5 pxor %xmm4, %xmm5 pextrw $0x0, %xmm5, %edi testb $0x1, %dil je 0x38602 movl $0x0, -0x30(%rcx) pextrw $0x4, %xmm5, %edi testb $0x1, %dil je 0x38613 movl $0x0, (%rcx) addq $0x4, %rax addq $0xc0, %rcx cmpq %rax, %rdx jne 0x38563 imull $0xaaaaaaab, %esi, %eax # imm = 0xAAAAAAAB movl %eax, 0x8(%rsp) leaq 0x58(%rsp), %r14 movq %r15, (%r14) pxor %xmm0, %xmm0 movdqu %xmm0, 0x8(%r14) movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000 movq %rbx, 0x18(%r14) movq %r14, %rdi callq 0x80fd0 leaq 0x38(%rsp), %rdi movq %r15, (%rdi) pxor %xmm0, %xmm0 movdqu %xmm0, 0x8(%rdi) movq %rbx, 0x18(%rdi) callq 0x81042 leaq 0x28(%rsp), %r12 leaq 0x18(%rsp), %rbp leaq 0x4(%rsp), %rbx movq %r14, %rdi leaq 0x38(%rsp), %rsi callq 0x810a8 testb %al, %al jne 0x38773 movq %r14, %rdi callq 0x7db04 movq %rax, %r13 movq %r12, 0x18(%rsp) movq %rbp, %rdi leaq 0x13e3f9(%rip), %rsi # 0x176aaa leaq 0x13e3f4(%rip), %rdx # 0x176aac callq 0x52736 movl $0xffffffff, 0x4(%rsp) # imm = 0xFFFFFFFF movq %r13, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x2fb44 movl %eax, %r15d movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0x386ed movq 0x28(%rsp), %rsi incq %rsi callq 0x251b0 movq %r12, 0x18(%rsp) movq %rbp, %rdi leaq 0x145924(%rip), %rsi # 0x17e020 leaq 0x145922(%rip), %rdx # 0x17e025 callq 0x52736 movl $0x0, 0x4(%rsp) movq %r13, %rdi movq %rbp, %rsi movq %rbx, %rdx callq 0x3838e movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0x38741 movq 0x28(%rsp), %rsi incq %rsi movd %xmm0, 0xc(%rsp) callq 0x251b0 movd 0xc(%rsp), %xmm0 testl %r15d, %r15d js 0x38782 cmpl 0x8(%rsp), %r15d jge 0x38782 movl %r15d, %eax movq 0x10(%rsp), %rcx movq (%rcx), %rcx leaq (%rax,%rax,2), %rax shlq $0x4, %rax movd %xmm0, 0x20(%rcx,%rax) movq %r14, %rdi callq 0x7de8a jmp 0x38682 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x25790 movq %rax, %r14 leaq 0x13e304(%rip), %rsi # 0x176a9a movq %rax, %rdi callq 0x254f0 movq 0x1a4813(%rip), %rsi # 0x1dcfb8 movq 0x1a47c4(%rip), %rdx # 0x1dcf70 movq %r14, %rdi callq 0x25c00 jmp 0x387e7 movq %rax, %rbx movq %r14, %rdi callq 0x26150 jmp 0x387ea jmp 0x387c9 jmp 0x387e7 jmp 0x387e7 movq %rax, %rbx movq 0x18(%rsp), %rdi cmpq %r12, %rdi je 0x387ea movq 0x28(%rsp), %rsi incq %rsi callq 0x251b0 jmp 0x387ea jmp 0x387e7 movq %rax, %rbx movq 0x10(%rsp), %rdi callq 0x4a7a8 movq %rbx, %rdi callq 0x25ca0
_ZL18parse_lora_requestRKSt6vectorI24common_adapter_lora_infoSaIS0_EERKN8nlohmann16json_abi_v3_11_310basic_jsonINS6_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS6_14adl_serializerES_IhSaIhEEvEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r15, rdx mov rbx, rdi call _ZNSt6vectorI24common_adapter_lora_infoSaIS0_EEC2ERKS2_; std::vector<common_adapter_lora_info>::vector(std::vector<common_adapter_lora_info> const&) mov rcx, [rbx] mov [rsp+0A8h+var_98], rbx mov rax, [rbx+8] mov rsi, rax sub rsi, rcx shr rsi, 4 sub rax, rcx jz loc_38627 add rax, 0FFFFFFFFFFFFFFD0h mov rdx, 0AAAAAAAAAAAAAAABh mul rdx movq xmm0, rdx shr rdx, 5 add rdx, 4 and rdx, 0FFFFFFFFFFFFFFFCh pshufd xmm0, xmm0, 44h ; 'D' psrlq xmm0, 5 add rcx, 0B0h xor eax, eax movdqa xmm1, cs:xmmword_1711C0 movdqa xmm2, cs:xmmword_1711D0 movdqa xmm3, cs:xmmword_1711E0 pxor xmm0, xmm3 pcmpeqd xmm4, xmm4 loc_38563: movq xmm5, rax pshufd xmm5, xmm5, 44h ; 'D' movdqa xmm6, xmm5 por xmm6, xmm2 pxor xmm6, xmm3 movdqa xmm7, xmm6 pcmpgtd xmm7, xmm0 pcmpeqd xmm6, xmm0 pshufd xmm8, xmm6, 0F5h pand xmm8, xmm7 pshufd xmm6, xmm7, 0F5h por xmm6, xmm8 movd edi, xmm6 not edi test dil, 1 jz short loc_385B0 mov dword ptr [rcx-90h], 0 loc_385B0: pxor xmm6, xmm4 pextrw edi, xmm6, 4 test dil, 1 jz short loc_385C6 mov dword ptr [rcx-60h], 0 loc_385C6: por xmm5, xmm1 pxor xmm5, xmm3 movdqa xmm6, xmm5 pcmpgtd xmm6, xmm0 pcmpeqd xmm5, xmm0 pshufd xmm7, xmm5, 0F5h pand xmm7, xmm6 pshufd xmm5, xmm6, 0F5h por xmm5, xmm7 pxor xmm5, xmm4 pextrw edi, xmm5, 0 test dil, 1 jz short loc_38602 mov dword ptr [rcx-30h], 0 loc_38602: pextrw edi, xmm5, 4 test dil, 1 jz short loc_38613 mov dword ptr [rcx], 0 loc_38613: add rax, 4 add rcx, 0C0h cmp rdx, rax jnz loc_38563 loc_38627: imul eax, esi, 0AAAAAAABh mov [rsp+0A8h+var_A0], eax lea r14, [rsp+0A8h+var_50] mov [r14], r15 pxor xmm0, xmm0 movdqu xmmword ptr [r14+8], xmm0 mov rbx, 8000000000000000h mov [r14+18h], rbx mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void) lea rdi, [rsp+0A8h+var_70] mov [rdi], r15 pxor xmm0, xmm0 movdqu xmmword ptr [rdi+8], xmm0 mov [rdi+18h], rbx call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_end(void) lea r12, [rsp+0A8h+var_80] lea rbp, [rsp+0A8h+var_90] lea rbx, [rsp+0A8h+var_A4] loc_38682: mov rdi, r14 lea rsi, [rsp+0A8h+var_70] 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_38773 mov rdi, r14 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 r13, rax mov [rsp+0A8h+var_90], r12 mov rdi, rbp lea rsi, aInvalidAdapter+10h; "id" lea rdx, aInvalidAdapter+12h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov [rsp+0A8h+var_A4], 0FFFFFFFFh mov rdi, r13 mov rsi, rbp mov rdx, rbx call _ZL10json_valueIiET_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_RKS0_; json_value<int>(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::string const&,int const&) mov r15d, eax mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_386ED mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_386ED: mov [rsp+0A8h+var_90], r12 mov rdi, rbp lea rsi, aRopeScale+7; "scale" lea rdx, aRopeScale+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov [rsp+0A8h+var_A4], 0 mov rdi, r13 mov rsi, rbp mov rdx, rbx call _ZL10json_valueIfET_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_RKS0_; json_value<float>(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::string const&,float const&) mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_38741 mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 movd [rsp+0A8h+var_9C], xmm0 call __ZdlPvm; operator delete(void *,ulong) movd xmm0, [rsp+0A8h+var_9C] loc_38741: test r15d, r15d js short loc_38782 cmp r15d, [rsp+0A8h+var_A0] jge short loc_38782 mov eax, r15d mov rcx, [rsp+0A8h+var_98] mov rcx, [rcx] lea rax, [rax+rax*2] shl rax, 4 movd dword ptr [rcx+rax+20h], xmm0 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; 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) jmp loc_38682 loc_38773: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_38782: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aInvalidAdapter; "invalid adapter id" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_387E7 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_387EA jmp short loc_387C9 jmp short loc_387E7 jmp short loc_387E7 loc_387C9: mov rbx, rax mov rdi, [rsp+0A8h+var_90]; void * cmp rdi, r12 jz short loc_387EA mov rsi, [rsp+0A8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_387EA jmp short $+2 loc_387E7: mov rbx, rax loc_387EA: mov rdi, [rsp+0A8h+var_98] call _ZNSt6vectorI24common_adapter_lora_infoSaIS0_EED2Ev; std::vector<common_adapter_lora_info>::~vector() mov rdi, rbx call __Unwind_Resume
long long parse_lora_request(_QWORD *a1, long long a2, long long a3) { long long v4; // rcx unsigned long long v5; // rsi long long v6; // rax unsigned long long v7; // rdx __m128i v8; // xmm0 _DWORD *v9; // rcx unsigned long long v10; // rax __m128i si128; // xmm1 __m128i v12; // xmm2 __m128i v13; // xmm3 __m128i v14; // xmm0 __m128i v15; // xmm5 __m128i v16; // xmm6 __m128i v17; // xmm7 __m128i v18; // xmm6 __m128i v19; // xmm5 __m128i v20; // xmm6 __m128i v21; // xmm5 __m128i v22; // xmm0 long long result; // rax long long v24; // r13 int v25; // r15d std::runtime_error *exception; // r14 unsigned int v27; // [rsp+4h] [rbp-A4h] BYREF int v28; // [rsp+8h] [rbp-A0h] unsigned int v29; // [rsp+Ch] [rbp-9Ch] _QWORD *v30; // [rsp+10h] [rbp-98h] void *v31[2]; // [rsp+18h] [rbp-90h] BYREF _QWORD v32[2]; // [rsp+28h] [rbp-80h] BYREF long long v33; // [rsp+38h] [rbp-70h] BYREF __int128 v34; // [rsp+40h] [rbp-68h] unsigned long long v35; // [rsp+50h] [rbp-58h] long long v36; // [rsp+58h] [rbp-50h] BYREF __int128 v37; // [rsp+60h] [rbp-48h] unsigned long long v38; // [rsp+70h] [rbp-38h] std::vector<common_adapter_lora_info>::vector(); v4 = *a1; v30 = a1; v5 = (unsigned long long)(a1[1] - v4) >> 4; v6 = a1[1] - v4; if ( v6 ) { v7 = ((v6 - 48) / 0x30uLL + 4) & 0xFFFFFFFFFFFFFFFCLL; v8 = _mm_srli_epi64( _mm_shuffle_epi32( (__m128i)((0xAAAAAAAAAAAAAAABLL * (unsigned __int128)(unsigned long long)(v6 - 48)) >> 64), 68), 5u); v9 = (_DWORD *)(v4 + 176); v10 = 0LL; si128 = _mm_load_si128((const __m128i *)&xmmword_1711C0); v12 = _mm_load_si128((const __m128i *)&xmmword_1711D0); v13 = _mm_load_si128((const __m128i *)&xmmword_1711E0); v14 = _mm_xor_si128(v8, v13); do { v15 = _mm_shuffle_epi32((__m128i)v10, 68); v16 = _mm_xor_si128(_mm_or_si128(v15, v12), v13); v17 = _mm_cmpgt_epi32(v16, v14); v18 = _mm_or_si128( _mm_shuffle_epi32(v17, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v16, v14), 245), v17)); if ( (~_mm_cvtsi128_si32(v18) & 1) != 0 ) *(v9 - 36) = 0; if ( (_mm_extract_epi16(_mm_xor_si128(v18, (__m128i)-1LL), 4) & 1) != 0 ) *(v9 - 24) = 0; v19 = _mm_xor_si128(_mm_or_si128(v15, si128), v13); v20 = _mm_cmpgt_epi32(v19, v14); v21 = _mm_xor_si128( _mm_or_si128( _mm_shuffle_epi32(v20, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v19, v14), 245), v20)), (__m128i)-1LL); if ( (_mm_extract_epi16(v21, 0) & 1) != 0 ) *(v9 - 12) = 0; if ( (_mm_extract_epi16(v21, 4) & 1) != 0 ) *v9 = 0; v10 += 4LL; v9 += 48; } while ( v7 != v10 ); } v28 = -1431655765 * v5; v36 = a3; v37 = 0LL; v38 = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(&v36); v33 = a3; v22 = 0LL; v34 = 0LL; v35 = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_end(&v33); while ( 1 ) { result = 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_( &v36, &v33); if ( (_BYTE)result ) break; v24 = 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*(&v36); v31[0] = v32; std::string::_M_construct<char const*>(v31, "id", ""); v27 = -1; v25 = json_value<int>(v24, (long long)v31, &v27); if ( v31[0] != v32 ) operator delete(v31[0], v32[0] + 1LL); v31[0] = v32; std::string::_M_construct<char const*>(v31, "scale", ""); v27 = 0; *(float *)v22.m128i_i32 = json_value<float>(v24, (long long)v31, (long long)&v27); if ( v31[0] != v32 ) { v29 = _mm_cvtsi128_si32(v22); operator delete(v31[0], v32[0] + 1LL); v22 = _mm_cvtsi32_si128(v29); } if ( v25 < 0 || v25 >= v28 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "invalid adapter id"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_DWORD *)(*v30 + 48LL * (unsigned int)v25 + 32) = _mm_cvtsi128_si32(v22); 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++(&v36); } return result; }
parse_lora_request: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R15,RDX MOV RBX,RDI CALL 0x0015c03c MOV RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x10],RBX MOV RAX,qword ptr [RBX + 0x8] MOV RSI,RAX SUB RSI,RCX SHR RSI,0x4 SUB RAX,RCX JZ 0x00138627 ADD RAX,-0x30 MOV RDX,-0x5555555555555555 MUL RDX MOVQ XMM0,RDX SHR RDX,0x5 ADD RDX,0x4 AND RDX,-0x4 PSHUFD XMM0,XMM0,0x44 PSRLQ XMM0,0x5 ADD RCX,0xb0 XOR EAX,EAX MOVDQA XMM1,xmmword ptr [0x002711c0] MOVDQA XMM2,xmmword ptr [0x002711d0] MOVDQA XMM3,xmmword ptr [0x002711e0] PXOR XMM0,XMM3 PCMPEQD XMM4,XMM4 LAB_00138563: MOVQ XMM5,RAX PSHUFD XMM5,XMM5,0x44 MOVDQA XMM6,XMM5 POR XMM6,XMM2 PXOR XMM6,XMM3 MOVDQA XMM7,XMM6 PCMPGTD XMM7,XMM0 PCMPEQD XMM6,XMM0 PSHUFD XMM8,XMM6,0xf5 PAND XMM8,XMM7 PSHUFD XMM6,XMM7,0xf5 POR XMM6,XMM8 MOVD EDI,XMM6 NOT EDI TEST DIL,0x1 JZ 0x001385b0 MOV dword ptr [RCX + -0x90],0x0 LAB_001385b0: PXOR XMM6,XMM4 PEXTRW EDI,XMM6,0x4 TEST DIL,0x1 JZ 0x001385c6 MOV dword ptr [RCX + -0x60],0x0 LAB_001385c6: POR XMM5,XMM1 PXOR XMM5,XMM3 MOVDQA XMM6,XMM5 PCMPGTD XMM6,XMM0 PCMPEQD XMM5,XMM0 PSHUFD XMM7,XMM5,0xf5 PAND XMM7,XMM6 PSHUFD XMM5,XMM6,0xf5 POR XMM5,XMM7 PXOR XMM5,XMM4 PEXTRW EDI,XMM5,0x0 TEST DIL,0x1 JZ 0x00138602 MOV dword ptr [RCX + -0x30],0x0 LAB_00138602: PEXTRW EDI,XMM5,0x4 TEST DIL,0x1 JZ 0x00138613 MOV dword ptr [RCX],0x0 LAB_00138613: ADD RAX,0x4 ADD RCX,0xc0 CMP RDX,RAX JNZ 0x00138563 LAB_00138627: IMUL EAX,ESI,-0x55555555 MOV dword ptr [RSP + 0x8],EAX LEA R14,[RSP + 0x58] MOV qword ptr [R14],R15 PXOR XMM0,XMM0 MOVDQU xmmword ptr [R14 + 0x8],XMM0 MOV RBX,-0x8000000000000000 MOV qword ptr [R14 + 0x18],RBX MOV RDI,R14 CALL 0x00180fd0 LEA RDI,[RSP + 0x38] MOV qword ptr [RDI],R15 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [RDI + 0x18],RBX CALL 0x00181042 LEA R12,[RSP + 0x28] LEA RBP,[RSP + 0x18] LEA RBX,[RSP + 0x4] LAB_00138682: MOV RDI,R14 LEA RSI,[RSP + 0x38] CALL 0x001810a8 TEST AL,AL JNZ 0x00138773 LAB_00138697: MOV RDI,R14 CALL 0x0017db04 MOV R13,RAX MOV qword ptr [RSP + 0x18],R12 LAB_001386a7: MOV RDI,RBP LEA RSI,[0x276aaa] LEA RDX,[0x276aac] CALL 0x00152736 MOV dword ptr [RSP + 0x4],0xffffffff LAB_001386c5: MOV RDI,R13 MOV RSI,RBP MOV RDX,RBX CALL 0x0012fb44 MOV R15D,EAX MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R12 JZ 0x001386ed MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001251b0 LAB_001386ed: MOV qword ptr [RSP + 0x18],R12 LAB_001386f2: MOV RDI,RBP LEA RSI,[0x27e020] LEA RDX,[0x27e025] CALL 0x00152736 MOV dword ptr [RSP + 0x4],0x0 LAB_00138710: MOV RDI,R13 MOV RSI,RBP MOV RDX,RBX CALL 0x0013838e MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R12 JZ 0x00138741 MOV RSI,qword ptr [RSP + 0x28] INC RSI MOVD dword ptr [RSP + 0xc],XMM0 CALL 0x001251b0 MOVD XMM0,dword ptr [RSP + 0xc] LAB_00138741: TEST R15D,R15D JS 0x00138782 CMP R15D,dword ptr [RSP + 0x8] JGE 0x00138782 MOV EAX,R15D MOV RCX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RCX] LEA RAX,[RAX + RAX*0x2] SHL RAX,0x4 MOVD dword ptr [RCX + RAX*0x1 + 0x20],XMM0 LAB_00138766: MOV RDI,R14 CALL 0x0017de8a LAB_0013876e: JMP 0x00138682 LAB_00138773: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00138782: MOV EDI,0x10 CALL 0x00125790 MOV R14,RAX LAB_0013878f: LEA RSI,[0x276a9a] MOV RDI,RAX CALL 0x001254f0 LAB_0013879e: MOV RSI,qword ptr [0x002dcfb8] MOV RDX,qword ptr [0x002dcf70] MOV RDI,R14 CALL 0x00125c00
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* parse_lora_request(std::vector<common_adapter_lora_info, std::allocator<common_adapter_lora_info> > const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void parse_lora_request(vector *param_1,basic_json *param_2) { long lVar1; long lVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; char cVar6; uint uVar7; long lVar8; ulong uVar9; ulong uVar10; basic_json *pbVar11; runtime_error *this; int4 *puVar12; int4 uVar13; float fVar14; int4 uVar17; int iVar18; int1 auVar16 [16]; int1 auVar19 [16]; int iVar21; int1 auVar20 [16]; float local_a4; int local_a0; float local_9c; vector *local_98; long *local_90 [2]; long local_80 [2]; 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_70 [8]; int1 local_68 [16]; int8 local_58; 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_50 [8]; int1 local_48 [16]; int8 local_38; int1 auVar15 [16]; std::vector<common_adapter_lora_info,std::allocator<common_adapter_lora_info>>::vector ((vector<common_adapter_lora_info,std::allocator<common_adapter_lora_info>> *)param_1, (vector *)param_2); auVar5 = _DAT_002711e0; auVar4 = _DAT_002711d0; auVar3 = _DAT_002711c0; lVar1 = *(long *)param_1; lVar2 = *(long *)(param_1 + 8); lVar8 = lVar2 - lVar1; if (lVar8 != 0) { uVar9 = lVar8 - 0x30; auVar20._8_8_ = 0; auVar20._0_8_ = uVar9; uVar13 = SUB164(auVar20 * ZEXT816(0xaaaaaaaaaaaaaaab),8); uVar17 = (int4)(uVar9 / 0x180000000); auVar15._0_8_ = CONCAT44(uVar17,uVar13); auVar15._8_4_ = uVar13; auVar15._12_4_ = uVar17; auVar16._0_8_ = auVar15._0_8_ >> 5; auVar16._8_8_ = auVar15._8_8_ >> 5; puVar12 = (int4 *)(lVar1 + 0xb0); uVar10 = 0; auVar16 = auVar16 ^ _DAT_002711e0; do { auVar19._8_4_ = (int)uVar10; auVar19._0_8_ = uVar10; auVar19._12_4_ = (int)(uVar10 >> 0x20); auVar20 = (auVar19 | auVar4) ^ auVar5; iVar18 = auVar16._4_4_; if ((bool)(~(auVar20._4_4_ == iVar18 && auVar16._0_4_ < auVar20._0_4_ || iVar18 < auVar20._4_4_) & 1)) { puVar12[-0x24] = 0; } if ((auVar20._12_4_ != auVar16._12_4_ || auVar20._8_4_ <= auVar16._8_4_) && auVar20._12_4_ <= auVar16._12_4_) { puVar12[-0x18] = 0; } auVar20 = (auVar19 | auVar3) ^ auVar5; iVar21 = auVar20._4_4_; if (iVar21 <= iVar18 && (iVar21 != iVar18 || auVar20._0_4_ <= auVar16._0_4_)) { puVar12[-0xc] = 0; *puVar12 = 0; } uVar10 = uVar10 + 4; puVar12 = puVar12 + 0x30; } while ((uVar9 / 0x30 + 4 & 0xfffffffffffffffc) != uVar10); } local_a0 = (int)((ulong)(lVar2 - lVar1) >> 4) * -0x55555555; local_48 = (int1 [16])0x0; local_38 = 0x8000000000000000; local_98 = param_1; 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> ::set_begin(local_50); local_68 = (int1 [16])0x0; local_58 = 0x8000000000000000; nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::set_end(local_70); while( true ) { /* try { // try from 00138682 to 0013868e has its CatchHandler @ 001387e7 */ cVar6 = _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_50,local_70); if (cVar6 != '\0') { return; } /* try { // try from 00138697 to 0013869e has its CatchHandler @ 001387c5 */ pbVar11 = (basic_json *) 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*(local_50); local_90[0] = local_80; /* try { // try from 001386a7 to 001386bc has its CatchHandler @ 001387c7 */ std::__cxx11::string::_M_construct<char_const*>((string *)local_90,"id",""); local_a4 = -NAN; /* try { // try from 001386c5 to 001386d2 has its CatchHandler @ 001387c9 */ uVar7 = json_value<int>(pbVar11,(string *)local_90,(int *)&local_a4); if (local_90[0] != local_80) { operator_delete(local_90[0],local_80[0] + 1); } local_90[0] = local_80; /* try { // try from 001386f2 to 00138707 has its CatchHandler @ 001387e5 */ std::__cxx11::string::_M_construct<char_const*>((string *)local_90,"scale",""); local_a4 = 0.0; /* try { // try from 00138710 to 0013871d has its CatchHandler @ 001387c3 */ fVar14 = json_value<float>(pbVar11,(string *)local_90,&local_a4); if (local_90[0] != local_80) { local_9c = fVar14; operator_delete(local_90[0],local_80[0] + 1); fVar14 = local_9c; } if (((int)uVar7 < 0) || (local_a0 <= (int)uVar7)) break; *(float *)(*(long *)local_98 + 0x20 + (ulong)uVar7 * 0x30) = fVar14; /* try { // try from 00138766 to 0013876d has its CatchHandler @ 001387e7 */ 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++(local_50); } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013878f to 0013879d has its CatchHandler @ 001387b6 */ std::runtime_error::runtime_error(this,"invalid adapter id"); /* try { // try from 0013879e to 001387b3 has its CatchHandler @ 001387b4 */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_002dcfb8,PTR__runtime_error_002dcf70); }
30,483
ggml_backend_sched_new
ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp
ggml_backend_sched_t ggml_backend_sched_new( ggml_backend_t * backends, ggml_backend_buffer_type_t * bufts, int n_backends, size_t graph_size, bool parallel) { GGML_ASSERT(n_backends > 0); GGML_ASSERT(n_backends <= GGML_SCHED_MAX_BACKENDS); GGML_ASSERT(ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU); struct ggml_backend_sched * sched = (ggml_backend_sched *) calloc(1, sizeof(struct ggml_backend_sched)); const char * GGML_SCHED_DEBUG = getenv("GGML_SCHED_DEBUG"); sched->debug = GGML_SCHED_DEBUG ? atoi(GGML_SCHED_DEBUG) : 0; sched->n_backends = n_backends; sched->n_copies = parallel ? GGML_SCHED_MAX_COPIES : 1; // initialize hash table // FIXME: needs to be size*2 to account for leafs (do it in graph_split instead) sched->hash_set = ggml_hash_set_new(graph_size); sched->hv_tensor_backend_ids = (int *) malloc(sched->hash_set.size * sizeof(sched->hv_tensor_backend_ids[0])); sched->hv_tensor_copies = (ggml_tensor **) malloc(sched->hash_set.size * sched->n_backends * sched->n_copies * sizeof(struct ggml_tensor *)); const size_t ggml_sched_max_splits = graph_size; // at most there is one split for each node in the graph const size_t nodes_size = graph_size + ggml_sched_max_splits*GGML_SCHED_MAX_SPLIT_INPUTS*2; sched->node_backend_ids = (int *) calloc(nodes_size, sizeof(sched->node_backend_ids[0])); sched->leaf_backend_ids = (int *) calloc(nodes_size, sizeof(sched->leaf_backend_ids[0])); sched->prev_node_backend_ids = (int *) calloc(nodes_size, sizeof(sched->prev_node_backend_ids[0])); sched->prev_leaf_backend_ids = (int *) calloc(nodes_size, sizeof(sched->prev_leaf_backend_ids[0])); sched->context_buffer_size = ggml_sched_max_splits*GGML_SCHED_MAX_SPLIT_INPUTS*2*sizeof(struct ggml_tensor) + ggml_graph_overhead_custom(graph_size, false); sched->context_buffer = (char *) malloc(sched->context_buffer_size); const int initial_splits_capacity = 16; sched->splits = (ggml_backend_sched_split *) calloc(initial_splits_capacity, sizeof(sched->splits[0])); sched->splits_capacity = initial_splits_capacity; for (int b = 0; b < n_backends; b++) { sched->backends[b] = backends[b]; sched->bufts[b] = bufts ? bufts[b] : ggml_backend_get_default_buffer_type(backends[b]); GGML_ASSERT(ggml_backend_supports_buft(backends[b], sched->bufts[b])); if (sched->n_copies > 1) { for (int c = 0; c < sched->n_copies; c++) { sched->events[b][c] = ggml_backend_event_new(backends[b]->device); } } } sched->galloc = ggml_gallocr_new_n(sched->bufts, n_backends); ggml_backend_sched_reset(sched); return sched; }
O2
cpp
ggml_backend_sched_new: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r8d, 0x14(%rsp) testl %edx, %edx jle 0x2b129 movl %edx, %ebx cmpl $0x11, %edx jae 0x2b145 movq %rcx, %r12 movq %rsi, %r14 movq %rdi, %r15 movl %ebx, %eax movq %rax, 0x28(%rsp) movq -0x8(%rdi,%rax,8), %rax movq 0x70(%rax), %rdi callq *0x18(%rdi) testl %eax, %eax jne 0x2b161 pushq $0x1 popq %rdi movl $0x448, %esi # imm = 0x448 callq 0x1cf30 movq %rax, 0x18(%rsp) leaq 0x237bb(%rip), %rdi # 0x4e69f callq 0x1dc00 testq %rax, %rax movq %r12, 0x8(%rsp) je 0x2aefd movq %rax, %rdi callq 0x1e440 jmp 0x2aeff xorl %eax, %eax movq 0x18(%rsp), %r12 movl %eax, 0x440(%r12) movl %ebx, 0x24(%rsp) movl %ebx, 0x4(%r12) movzbl 0x14(%rsp), %ebx leal 0x1(%rbx,%rbx,2), %ebp movl %ebp, 0x1b8(%r12) leaq 0x30(%rsp), %r13 movq %r13, %rdi movq 0x8(%rsp), %rsi callq 0x1c260 movq 0x10(%r13), %rax movq %rax, 0x120(%r12) movups (%r13), %xmm0 movups %xmm0, 0x110(%r12) movq 0x110(%r12), %r13 leaq (,%r13,4), %rdi callq 0x1de80 movq %rax, 0x128(%r12) imulq 0x28(%rsp), %r13 shlq $0x3, %r13 addb %bl, %bl movl %ebx, %ecx shlq %cl, %r13 movq %r13, %rdi callq 0x1de80 movq %rax, 0x130(%r12) movq 0x8(%rsp), %r13 imulq $0x15, %r13, %rbx pushq $0x4 popq %rsi movq %rbx, %rdi callq 0x1cf30 movq %rax, 0x138(%r12) movq %rbx, %rdi pushq $0x4 popq %rsi callq 0x1cf30 movq %rax, 0x140(%r12) movq %rbx, %rdi pushq $0x4 popq %rsi callq 0x1cf30 movq %rax, 0x148(%r12) movq %rbx, %rdi pushq $0x4 popq %rsi callq 0x1cf30 movq %rax, 0x150(%r12) movq %r13, %rdi imulq $0x1a40, %r13, %r13 # imm = 0x1A40 xorl %ebx, %ebx xorl %esi, %esi callq 0x1e010 addq %rax, %r13 movq %r13, 0x438(%r12) movq %r13, %rdi callq 0x1de80 movq %rax, 0x430(%r12) pushq $0x10 popq %rdi movl $0xb8, %esi callq 0x1cf30 movq %rax, 0x1a8(%r12) movl $0x10, 0x1b4(%r12) leaq 0x88(%r12), %rax movq %rax, 0x8(%rsp) addq $0x1c0, %r12 # imm = 0x1C0 cmpq 0x28(%rsp), %rbx je 0x2b0d4 movq (%r15,%rbx,8), %rax movq 0x18(%rsp), %rcx movq %rax, 0x8(%rcx,%rbx,8) testq %r14, %r14 je 0x2b06c movq (%r14,%rbx,8), %rsi jmp 0x2b07a movq 0x70(%rax), %rdi callq *0x30(%rdi) movq %rax, %rsi movq (%r15,%rbx,8), %rax movq %r14, %r13 movq 0x8(%rsp), %rcx movq %rsi, (%rcx,%rbx,8) movq 0x70(%rax), %rdi callq *0x50(%rdi) testb %al, %al je 0x2b108 cmpb $0x0, 0x14(%rsp) je 0x2b0c5 xorl %r14d, %r14d cmpq %rbp, %r14 jae 0x2b0c5 movq (%r15,%rbx,8), %rax movq 0x70(%rax), %rdi testq %rdi, %rdi je 0x2b0ba movq 0x60(%rdi), %rax testq %rax, %rax je 0x2b0ba callq *%rax jmp 0x2b0bc xorl %eax, %eax movq %rax, (%r12,%r14,8) incq %r14 jmp 0x2b09b incq %rbx addq $0x20, %r12 movq %r13, %r14 jmp 0x2b048 movq 0x8(%rsp), %rdi movl 0x24(%rsp), %esi callq 0x1edf0 movq 0x18(%rsp), %rbx movq %rax, 0x108(%rbx) movq %rbx, %rdi callq 0x1ced0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x231c3(%rip), %rdi # 0x4e2d2 leaq 0x204b8(%rip), %rdx # 0x4b5ce leaq 0x23593(%rip), %rcx # 0x4e6b0 movl $0x5d2, %esi # imm = 0x5D2 xorl %eax, %eax callq 0x1e770 leaq 0x231a2(%rip), %rdi # 0x4e2d2 leaq 0x20497(%rip), %rdx # 0x4b5ce leaq 0x234c3(%rip), %rcx # 0x4e601 movl $0x5b0, %esi # imm = 0x5B0 jmp 0x2b122 leaq 0x23186(%rip), %rdi # 0x4e2d2 leaq 0x2047b(%rip), %rdx # 0x4b5ce leaq 0x234b6(%rip), %rcx # 0x4e610 movl $0x5b1, %esi # imm = 0x5B1 jmp 0x2b122 leaq 0x2316a(%rip), %rdi # 0x4e2d2 leaq 0x2045f(%rip), %rdx # 0x4b5ce leaq 0x234c0(%rip), %rcx # 0x4e636 movl $0x5b2, %esi # imm = 0x5B2 jmp 0x2b122
ggml_backend_sched_new: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_64], r8d test edx, edx jle loc_2B129 mov ebx, edx cmp edx, 11h jnb loc_2B145 mov r12, rcx mov r14, rsi mov r15, rdi mov eax, ebx mov [rsp+78h+var_50], rax mov rax, [rdi+rax*8-8] mov rdi, [rax+70h] call qword ptr [rdi+18h] test eax, eax jnz loc_2B161 push 1 pop rdi mov esi, 448h call _calloc mov [rsp+78h+var_60], rax lea rdi, aGgmlSchedDebug; "GGML_SCHED_DEBUG" call _getenv test rax, rax mov [rsp+78h+var_70], r12 jz short loc_2AEFD mov rdi, rax call _atoi jmp short loc_2AEFF loc_2AEFD: xor eax, eax loc_2AEFF: mov r12, [rsp+78h+var_60] mov [r12+440h], eax mov [rsp+78h+var_54], ebx mov [r12+4], ebx movzx ebx, byte ptr [rsp+78h+var_64] lea ebp, [rbx+rbx*2+1] mov [r12+1B8h], ebp lea r13, [rsp+78h+var_48] mov rdi, r13 mov rsi, [rsp+78h+var_70] call _ggml_hash_set_new mov rax, [r13+10h] mov [r12+120h], rax movups xmm0, xmmword ptr [r13+0] movups xmmword ptr [r12+110h], xmm0 mov r13, [r12+110h] lea rdi, ds:0[r13*4] call _malloc mov [r12+128h], rax imul r13, [rsp+78h+var_50] shl r13, 3 add bl, bl mov ecx, ebx shl r13, cl mov rdi, r13 call _malloc mov [r12+130h], rax mov r13, [rsp+78h+var_70] imul rbx, r13, 15h push 4 pop rsi mov rdi, rbx call _calloc mov [r12+138h], rax mov rdi, rbx push 4 pop rsi call _calloc mov [r12+140h], rax mov rdi, rbx push 4 pop rsi call _calloc mov [r12+148h], rax mov rdi, rbx push 4 pop rsi call _calloc mov [r12+150h], rax mov rdi, r13 imul r13, 1A40h xor ebx, ebx xor esi, esi call _ggml_graph_overhead_custom add r13, rax mov [r12+438h], r13 mov rdi, r13 call _malloc mov [r12+430h], rax push 10h pop rdi mov esi, 0B8h call _calloc mov [r12+1A8h], rax mov dword ptr [r12+1B4h], 10h lea rax, [r12+88h] mov [rsp+78h+var_70], rax add r12, 1C0h loc_2B048: cmp rbx, [rsp+78h+var_50] jz loc_2B0D4 mov rax, [r15+rbx*8] mov rcx, [rsp+78h+var_60] mov [rcx+rbx*8+8], rax test r14, r14 jz short loc_2B06C mov rsi, [r14+rbx*8] jmp short loc_2B07A loc_2B06C: mov rdi, [rax+70h] call qword ptr [rdi+30h] mov rsi, rax mov rax, [r15+rbx*8] loc_2B07A: mov r13, r14 mov rcx, [rsp+78h+var_70] mov [rcx+rbx*8], rsi mov rdi, [rax+70h] call qword ptr [rdi+50h] test al, al jz short loc_2B108 cmp byte ptr [rsp+78h+var_64], 0 jz short loc_2B0C5 xor r14d, r14d loc_2B09B: cmp r14, rbp jnb short loc_2B0C5 mov rax, [r15+rbx*8] mov rdi, [rax+70h] test rdi, rdi jz short loc_2B0BA mov rax, [rdi+60h] test rax, rax jz short loc_2B0BA call rax jmp short loc_2B0BC loc_2B0BA: xor eax, eax loc_2B0BC: mov [r12+r14*8], rax inc r14 jmp short loc_2B09B loc_2B0C5: inc rbx add r12, 20h ; ' ' mov r14, r13 jmp loc_2B048 loc_2B0D4: mov rdi, [rsp+78h+var_70] mov esi, [rsp+78h+var_54] call _ggml_gallocr_new_n mov rbx, [rsp+78h+var_60] mov [rbx+108h], rax mov rdi, rbx call _ggml_backend_sched_reset mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2B108: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlBackendSup_1; "ggml_backend_supports_buft(backends[b],"... mov esi, 5D2h loc_2B122: xor eax, eax call _ggml_abort loc_2B129: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNBackends0; "n_backends > 0" mov esi, 5B0h jmp short loc_2B122 loc_2B145: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNBackendsGgmlS; "n_backends <= GGML_SCHED_MAX_BACKENDS" mov esi, 5B1h jmp short loc_2B122 loc_2B161: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlBackendDev_12; "ggml_backend_dev_type(ggml_backend_get_"... mov esi, 5B2h jmp short loc_2B122
long long ggml_backend_sched_new( long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v18; // rax double v19; // xmm4_8 double v20; // xmm5_8 int v21; // eax unsigned long long v22; // rbp long long v23; // r13 long long v24; // rbx unsigned long long v25; // r13 long long v26; // r12 long long v27; // rax long long v28; // rsi long long v29; // r13 unsigned long long i; // r14 long long v31; // rdi long long (*v32)(void); // rax long long v33; // rax const char *v35; // rcx int v36; // esi char v37; // [rsp+0h] [rbp-78h] long long v38; // [rsp+8h] [rbp-70h] unsigned __int8 v39; // [rsp+14h] [rbp-64h] long long v40; // [rsp+18h] [rbp-60h] int v41; // [rsp+24h] [rbp-54h] long long v42; // [rsp+28h] [rbp-50h] __m128 v43; // [rsp+30h] [rbp-48h] BYREF long long v44; // [rsp+40h] [rbp-38h] v39 = a5; if ( (int)a3 <= 0 ) { v35 = "n_backends > 0"; v36 = 1456; goto LABEL_24; } if ( a3 >= 0x11 ) { v35 = "n_backends <= GGML_SCHED_MAX_BACKENDS"; v36 = 1457; goto LABEL_24; } v42 = a3; if ( (*(unsigned int (**)(void))(*(_QWORD *)(*(_QWORD *)(a1 + 8LL * a3 - 8) + 112LL) + 24LL))() ) { v35 = "ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU"; v36 = 1458; LABEL_24: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp", v36, (long long)"GGML_ASSERT(%s) failed", (long long)v35, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v37); } v40 = calloc(1LL, 1096LL); v18 = getenv("GGML_SCHED_DEBUG"); if ( v18 ) v21 = atoi(v18); else v21 = 0; *(_DWORD *)(v40 + 1088) = v21; v41 = a3; *(_DWORD *)(v40 + 4) = a3; v22 = 3 * (unsigned int)v39 + 1; *(_DWORD *)(v40 + 440) = v22; ggml_hash_set_new((long long *)&v43, a4, a7, a8, a9, a10, v19, v20, a13, a14); *(_QWORD *)(v40 + 288) = v44; a7 = v43; *(__m128 *)(v40 + 272) = v43; v23 = *(_QWORD *)(v40 + 272); *(_QWORD *)(v40 + 296) = malloc(4 * v23); *(_QWORD *)(v40 + 304) = malloc((8 * v42 * v23) << (2 * v39)); *(_QWORD *)(v40 + 312) = calloc(21 * a4, 4LL); *(_QWORD *)(v40 + 320) = calloc(21 * a4, 4LL); *(_QWORD *)(v40 + 328) = calloc(21 * a4, 4LL); *(_QWORD *)(v40 + 336) = calloc(21 * a4, 4LL); v24 = 0LL; v25 = ggml_graph_overhead_custom(a4) + 6720 * a4; *(_QWORD *)(v40 + 1080) = v25; *(_QWORD *)(v40 + 1072) = malloc(v25); *(_QWORD *)(v40 + 424) = calloc(16LL, 184LL); *(_DWORD *)(v40 + 436) = 16; v38 = v40 + 136; v26 = v40 + 448; while ( v24 != v42 ) { v27 = *(_QWORD *)(a1 + 8 * v24); *(_QWORD *)(v40 + 8 * v24 + 8) = v27; if ( a2 ) { v28 = *(_QWORD *)(a2 + 8 * v24); } else { v28 = (*(long long (**)(void))(*(_QWORD *)(v27 + 112) + 48LL))(); v27 = *(_QWORD *)(a1 + 8 * v24); } v29 = a2; *(_QWORD *)(v38 + 8 * v24) = v28; if ( !(*(unsigned __int8 (**)(void))(*(_QWORD *)(v27 + 112) + 80LL))() ) { v35 = "ggml_backend_supports_buft(backends[b], sched->bufts[b])"; v36 = 1490; goto LABEL_24; } if ( v39 ) { for ( i = 0LL; i < v22; ++i ) { v31 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v24) + 112LL); if ( v31 && (v32 = *(long long (**)(void))(v31 + 96)) != 0LL ) v33 = v32(); else v33 = 0LL; *(_QWORD *)(v26 + 8 * i) = v33; } } ++v24; v26 += 32LL; a2 = v29; } *(_QWORD *)(v40 + 264) = ggml_gallocr_new_n( v38, v41, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14); ggml_backend_sched_reset(v40); return v40; }
ggml_backend_sched_new: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV dword ptr [RSP + 0x14],R8D TEST EDX,EDX JLE 0x0012b129 MOV EBX,EDX CMP EDX,0x11 JNC 0x0012b145 MOV R12,RCX MOV R14,RSI MOV R15,RDI MOV EAX,EBX MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RDI + RAX*0x8 + -0x8] MOV RDI,qword ptr [RAX + 0x70] CALL qword ptr [RDI + 0x18] TEST EAX,EAX JNZ 0x0012b161 PUSH 0x1 POP RDI MOV ESI,0x448 CALL 0x0011cf30 MOV qword ptr [RSP + 0x18],RAX LEA RDI,[0x14e69f] CALL 0x0011dc00 TEST RAX,RAX MOV qword ptr [RSP + 0x8],R12 JZ 0x0012aefd MOV RDI,RAX CALL 0x0011e440 JMP 0x0012aeff LAB_0012aefd: XOR EAX,EAX LAB_0012aeff: MOV R12,qword ptr [RSP + 0x18] MOV dword ptr [R12 + 0x440],EAX MOV dword ptr [RSP + 0x24],EBX MOV dword ptr [R12 + 0x4],EBX MOVZX EBX,byte ptr [RSP + 0x14] LEA EBP,[RBX + RBX*0x2 + 0x1] MOV dword ptr [R12 + 0x1b8],EBP LEA R13,[RSP + 0x30] MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x8] CALL 0x0011c260 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [R12 + 0x120],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [R12 + 0x110],XMM0 MOV R13,qword ptr [R12 + 0x110] LEA RDI,[R13*0x4] CALL 0x0011de80 MOV qword ptr [R12 + 0x128],RAX IMUL R13,qword ptr [RSP + 0x28] SHL R13,0x3 ADD BL,BL MOV ECX,EBX SHL R13,CL MOV RDI,R13 CALL 0x0011de80 MOV qword ptr [R12 + 0x130],RAX MOV R13,qword ptr [RSP + 0x8] IMUL RBX,R13,0x15 PUSH 0x4 POP RSI MOV RDI,RBX CALL 0x0011cf30 MOV qword ptr [R12 + 0x138],RAX MOV RDI,RBX PUSH 0x4 POP RSI CALL 0x0011cf30 MOV qword ptr [R12 + 0x140],RAX MOV RDI,RBX PUSH 0x4 POP RSI CALL 0x0011cf30 MOV qword ptr [R12 + 0x148],RAX MOV RDI,RBX PUSH 0x4 POP RSI CALL 0x0011cf30 MOV qword ptr [R12 + 0x150],RAX MOV RDI,R13 IMUL R13,R13,0x1a40 XOR EBX,EBX XOR ESI,ESI CALL 0x0011e010 ADD R13,RAX MOV qword ptr [R12 + 0x438],R13 MOV RDI,R13 CALL 0x0011de80 MOV qword ptr [R12 + 0x430],RAX PUSH 0x10 POP RDI MOV ESI,0xb8 CALL 0x0011cf30 MOV qword ptr [R12 + 0x1a8],RAX MOV dword ptr [R12 + 0x1b4],0x10 LEA RAX,[R12 + 0x88] MOV qword ptr [RSP + 0x8],RAX ADD R12,0x1c0 LAB_0012b048: CMP RBX,qword ptr [RSP + 0x28] JZ 0x0012b0d4 MOV RAX,qword ptr [R15 + RBX*0x8] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RCX + RBX*0x8 + 0x8],RAX TEST R14,R14 JZ 0x0012b06c MOV RSI,qword ptr [R14 + RBX*0x8] JMP 0x0012b07a LAB_0012b06c: MOV RDI,qword ptr [RAX + 0x70] CALL qword ptr [RDI + 0x30] MOV RSI,RAX MOV RAX,qword ptr [R15 + RBX*0x8] LAB_0012b07a: MOV R13,R14 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + RBX*0x8],RSI MOV RDI,qword ptr [RAX + 0x70] CALL qword ptr [RDI + 0x50] TEST AL,AL JZ 0x0012b108 CMP byte ptr [RSP + 0x14],0x0 JZ 0x0012b0c5 XOR R14D,R14D LAB_0012b09b: CMP R14,RBP JNC 0x0012b0c5 MOV RAX,qword ptr [R15 + RBX*0x8] MOV RDI,qword ptr [RAX + 0x70] TEST RDI,RDI JZ 0x0012b0ba MOV RAX,qword ptr [RDI + 0x60] TEST RAX,RAX JZ 0x0012b0ba CALL RAX JMP 0x0012b0bc LAB_0012b0ba: XOR EAX,EAX LAB_0012b0bc: MOV qword ptr [R12 + R14*0x8],RAX INC R14 JMP 0x0012b09b LAB_0012b0c5: INC RBX ADD R12,0x20 MOV R14,R13 JMP 0x0012b048 LAB_0012b0d4: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x24] CALL 0x0011edf0 MOV RBX,qword ptr [RSP + 0x18] MOV qword ptr [RBX + 0x108],RAX MOV RDI,RBX CALL 0x0011ced0 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012b108: LEA RDI,[0x14e2d2] LEA RDX,[0x14b5ce] LEA RCX,[0x14e6b0] MOV ESI,0x5d2 LAB_0012b122: XOR EAX,EAX CALL 0x0011e770 LAB_0012b129: LEA RDI,[0x14e2d2] LEA RDX,[0x14b5ce] LEA RCX,[0x14e601] MOV ESI,0x5b0 JMP 0x0012b122 LAB_0012b145: LEA RDI,[0x14e2d2] LEA RDX,[0x14b5ce] LEA RCX,[0x14e610] MOV ESI,0x5b1 JMP 0x0012b122 LAB_0012b161: LEA RDI,[0x14e2d2] LEA RDX,[0x14b5ce] LEA RCX,[0x14e636] MOV ESI,0x5b2 JMP 0x0012b122
void * ggml_backend_sched_new(long param_1,long param_2,uint param_3,long param_4,byte param_5) { ulong uVar1; code *pcVar2; char cVar3; int iVar4; void *pvVar5; char *pcVar6; void *pvVar7; long lVar8; long lVar9; int8 uVar10; ulong uVar11; size_t sVar12; ulong uVar13; ulong uVar14; int8 local_48; int8 uStack_40; int8 local_38; if ((int)param_3 < 1) { pcVar6 = "n_backends > 0"; uVar10 = 0x5b0; } else { uVar11 = (ulong)param_3; if (param_3 < 0x11) { iVar4 = (**(code **)(*(long *)(*(long *)(param_1 + -8 + uVar11 * 8) + 0x70) + 0x18))(); if (iVar4 == 0) { pvVar5 = calloc(1,0x448); pcVar6 = getenv("GGML_SCHED_DEBUG"); if (pcVar6 == (char *)0x0) { iVar4 = 0; } else { iVar4 = atoi(pcVar6); } *(int *)((long)pvVar5 + 0x440) = iVar4; *(uint *)((long)pvVar5 + 4) = param_3; uVar1 = (ulong)param_5 * 3 + 1; *(int *)((long)pvVar5 + 0x1b8) = (int)uVar1; ggml_hash_set_new(&local_48,param_4); *(int8 *)((long)pvVar5 + 0x120) = local_38; *(int8 *)((long)pvVar5 + 0x110) = local_48; *(int8 *)((long)pvVar5 + 0x118) = uStack_40; lVar8 = *(long *)((long)pvVar5 + 0x110); pvVar7 = malloc(lVar8 * 4); *(void **)((long)pvVar5 + 0x128) = pvVar7; pvVar7 = malloc(lVar8 * uVar11 * 8 << (param_5 * '\x02' & 0x3f)); *(void **)((long)pvVar5 + 0x130) = pvVar7; sVar12 = param_4 * 0x15; pvVar7 = calloc(sVar12,4); *(void **)((long)pvVar5 + 0x138) = pvVar7; pvVar7 = calloc(sVar12,4); *(void **)((long)pvVar5 + 0x140) = pvVar7; pvVar7 = calloc(sVar12,4); *(void **)((long)pvVar5 + 0x148) = pvVar7; pvVar7 = calloc(sVar12,4); *(void **)((long)pvVar5 + 0x150) = pvVar7; uVar13 = 0; lVar8 = ggml_graph_overhead_custom(param_4,0); sVar12 = param_4 * 0x1a40 + lVar8; *(size_t *)((long)pvVar5 + 0x438) = sVar12; pvVar7 = malloc(sVar12); *(void **)((long)pvVar5 + 0x430) = pvVar7; pvVar7 = calloc(0x10,0xb8); *(void **)((long)pvVar5 + 0x1a8) = pvVar7; *(int4 *)((long)pvVar5 + 0x1b4) = 0x10; lVar8 = (long)pvVar5 + 0x1c0; while( true ) { if (uVar13 == uVar11) { uVar10 = ggml_gallocr_new_n((long)pvVar5 + 0x88,param_3); *(int8 *)((long)pvVar5 + 0x108) = uVar10; ggml_backend_sched_reset(pvVar5); return pvVar5; } lVar9 = *(long *)(param_1 + uVar13 * 8); *(long *)((long)pvVar5 + uVar13 * 8 + 8) = lVar9; if (param_2 == 0) { uVar10 = (**(code **)(*(long *)(lVar9 + 0x70) + 0x30))(); lVar9 = *(long *)(param_1 + uVar13 * 8); } else { uVar10 = *(int8 *)(param_2 + uVar13 * 8); } *(int8 *)((long)pvVar5 + 0x88 + uVar13 * 8) = uVar10; cVar3 = (**(code **)(*(long *)(lVar9 + 0x70) + 0x50))(); if (cVar3 == '\0') break; if (param_5 != 0) { for (uVar14 = 0; uVar14 < uVar1; uVar14 = uVar14 + 1) { lVar9 = *(long *)(*(long *)(param_1 + uVar13 * 8) + 0x70); if ((lVar9 == 0) || (pcVar2 = *(code **)(lVar9 + 0x60), pcVar2 == (code *)0x0)) { uVar10 = 0; } else { uVar10 = (*pcVar2)(); } *(int8 *)(lVar8 + uVar14 * 8) = uVar10; } } uVar13 = uVar13 + 1; lVar8 = lVar8 + 0x20; } pcVar6 = "ggml_backend_supports_buft(backends[b], sched->bufts[b])"; uVar10 = 0x5d2; } else { pcVar6 = "ggml_backend_dev_type(ggml_backend_get_device(backends[n_backends - 1])) == GGML_BACKEND_DEVICE_TYPE_CPU" ; uVar10 = 0x5b2; } } else { pcVar6 = "n_backends <= GGML_SCHED_MAX_BACKENDS"; uVar10 = 0x5b1; } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-backend.cpp", uVar10,"GGML_ASSERT(%s) failed",pcVar6); }
30,484
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O3
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, %rax xorl %edi, %edi movq %rdi, %rcx cmpq %rdi, %rdx je 0x92950 movb (%rsi,%rcx), %r8b movb %r8b, (%rax,%rcx) leaq 0x1(%rcx), %rdi testb %r8b, %r8b jne 0x92935 jmp 0x92954 movb $0x0, (%rax,%rcx) addq %rcx, %rax popq %rbp retq nopl (%rax)
strmake: push rbp mov rbp, rsp mov rax, rdi xor edi, edi loc_92935: mov rcx, rdi cmp rdx, rdi jz short loc_92950 mov r8b, [rsi+rcx] mov [rax+rcx], r8b lea rdi, [rcx+1] test r8b, r8b jnz short loc_92935 jmp short loc_92954 loc_92950: mov byte ptr [rax+rcx], 0 loc_92954: add rax, rcx pop rbp retn
long long strmake(long long a1, long long a2, long long a3) { long long v4; // rdi long long v5; // rcx char v6; // r8 v4 = 0LL; while ( 1 ) { v5 = v4; if ( a3 == v4 ) break; v6 = *(_BYTE *)(a2 + v4); *(_BYTE *)(a1 + v4++) = v6; if ( !v6 ) return v5 + a1; } *(_BYTE *)(a1 + v4) = 0; return v5 + a1; }
strmake: PUSH RBP MOV RBP,RSP MOV RAX,RDI XOR EDI,EDI LAB_00192935: MOV RCX,RDI CMP RDX,RDI JZ 0x00192950 MOV R8B,byte ptr [RSI + RCX*0x1] MOV byte ptr [RAX + RCX*0x1],R8B LEA RDI,[RCX + 0x1] TEST R8B,R8B JNZ 0x00192935 JMP 0x00192954 LAB_00192950: MOV byte ptr [RAX + RCX*0x1],0x0 LAB_00192954: ADD RAX,RCX POP RBP RET
long strmake(long param_1,long param_2,long param_3) { char cVar1; long lVar2; long lVar3; lVar2 = 0; do { lVar3 = lVar2; if (param_3 == lVar3) { *(int1 *)(param_1 + lVar3) = 0; break; } cVar1 = *(char *)(param_2 + lVar3); *(char *)(param_1 + lVar3) = cVar1; lVar2 = lVar3 + 1; } while (cVar1 != '\0'); return param_1 + lVar3; }
30,485
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>::getShared()
reaction/include/reaction/dataSource.h
auto getShared() { return getPtr()->getShared(); }
O3
c
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person>>::getShared(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0xa0b4 movq (%r14), %rsi addq $0x8, %rsi movq %rbx, %rdi callq 0x5fc4 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7bcf callq 0x4f16 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x7bec callq 0x4f16 movq %rbx, %rdi callq 0x2270
_ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEE9getSharedEv: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyE6PersonJEEEE6getPtrEv; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>>::getPtr(void) mov rsi, [r14] add rsi, 8 mov rdi, rbx call _ZNSt12__shared_ptrIN8reaction16ObserverDataNodeELN9__gnu_cxx12_Lock_policyE2EEC2IS1_vEERKSt10__weak_ptrIT_LS3_2EE; std::__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<reaction::ObserverDataNode,void>(std::__weak_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2> const&) mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_7BCF call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BCF: mov rax, rbx add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_7BEC call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7BEC: mov rdi, rbx call __Unwind_Resume
_QWORD * reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>>::getShared( _QWORD *a1, long long a2) { long long v3; // [rsp+8h] [rbp-20h] BYREF volatile signed __int32 *v4; // [rsp+10h] [rbp-18h] reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>>::getPtr( &v3, a2); std::__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<reaction::ObserverDataNode,void>( a1, (_QWORD *)(v3 + 8)); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); return a1; }
getShared: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0010a0b4 MOV RSI,qword ptr [R14] ADD RSI,0x8 LAB_00107bb8: MOV RDI,RBX CALL 0x00105fc4 LAB_00107bc0: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00107bcf CALL 0x00104f16 LAB_00107bcf: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger, reaction::DirectFailureStrategy, Person> >::getShared() */ DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>> * __thiscall reaction:: DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>>:: getShared(DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,Person>> *this) { int8 local_20; int8 local_18; getPtr(); /* try { // try from 00107bb8 to 00107bbf has its CatchHandler @ 00107bda */ std::__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<reaction::ObserverDataNode,void> ((__shared_ptr<reaction::ObserverDataNode,(__gnu_cxx::_Lock_policy)2> *)this, (__weak_ptr *)(local_20 + 8)); if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18); } return this; }
30,486
my_numcells_eucjpms
eloqsql/strings/ctype-eucjpms.c
static size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b == 0x8E) { clen++; b+= 2; } else if (*b == 0x8F) { clen+= 2; b+= 3; } else if (*b & 0x80) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_eucjpms: cmpq %rdx, %rsi jae 0x535e9 pushq %rbp movq %rsp, %rbp xorl %eax, %eax movzbl (%rsi), %edi cmpl $0x8e, %edi je 0x535c2 cmpl $0x8f, %edi jne 0x535ce movl $0x3, %edi movl $0x2, %ecx jmp 0x535dc movl $0x2, %edi movl $0x1, %ecx jmp 0x535dc xorl %ecx, %ecx testb %dil, %dil sets %cl incq %rcx movq %rcx, %rdi addq %rcx, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0x535a3 popq %rbp retq xorl %eax, %eax retq
my_numcells_eucjpms: cmp rsi, rdx jnb short loc_535E9 push rbp mov rbp, rsp xor eax, eax loc_535A3: movzx edi, byte ptr [rsi] cmp edi, 8Eh jz short loc_535C2 cmp edi, 8Fh jnz short loc_535CE mov edi, 3 mov ecx, 2 jmp short loc_535DC loc_535C2: mov edi, 2 mov ecx, 1 jmp short loc_535DC loc_535CE: xor ecx, ecx test dil, dil sets cl inc rcx mov rdi, rcx loc_535DC: add rax, rcx add rsi, rdi cmp rsi, rdx jb short loc_535A3 pop rbp retn loc_535E9: xor eax, eax retn
long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long result; // rax int v4; // edi long long v5; // rdi long long v6; // rcx if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = *a2; if ( v4 == 142 ) { v5 = 2LL; v6 = 1LL; } else if ( v4 == 143 ) { v5 = 3LL; v6 = 2LL; } else { v6 = ((v4 & 0x80u) != 0) + 1LL; v5 = v6; } result += v6; a2 += v5; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_eucjpms: CMP RSI,RDX JNC 0x001535e9 PUSH RBP MOV RBP,RSP XOR EAX,EAX LAB_001535a3: MOVZX EDI,byte ptr [RSI] CMP EDI,0x8e JZ 0x001535c2 CMP EDI,0x8f JNZ 0x001535ce MOV EDI,0x3 MOV ECX,0x2 JMP 0x001535dc LAB_001535c2: MOV EDI,0x2 MOV ECX,0x1 JMP 0x001535dc LAB_001535ce: XOR ECX,ECX TEST DIL,DIL SETS CL INC RCX MOV RDI,RCX LAB_001535dc: ADD RAX,RCX ADD RSI,RDI CMP RSI,RDX JC 0x001535a3 POP RBP RET LAB_001535e9: XOR EAX,EAX RET
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3) { char cVar1; long lVar2; long lVar3; long lVar4; if (param_2 < param_3) { lVar2 = 0; do { cVar1 = *param_2; if (cVar1 == -0x72) { lVar4 = 2; lVar3 = 1; } else if (cVar1 == -0x71) { lVar3 = 2; lVar4 = 3; } else { lVar3 = (ulong)(cVar1 < '\0') + 1; lVar4 = lVar3; } lVar2 = lVar2 + lVar3; param_2 = param_2 + lVar4; } while (param_2 < param_3); return lVar2; } return 0; }
30,487
js_dataview_getValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_getValue(JSContext *ctx, JSValue this_obj, int argc, JSValue *argv, int class_id) { JSTypedArray *ta; JSArrayBuffer *abuf; BOOL littleEndian, is_swap; int size; uint8_t *ptr; uint32_t v; uint64_t pos; ta = JS_GetOpaque2(ctx, this_obj, JS_CLASS_DATAVIEW); if (!ta) return JS_EXCEPTION; size = 1 << typed_array_size_log2(class_id); if (JS_ToIndex(ctx, &pos, argv[0])) return JS_EXCEPTION; littleEndian = argc > 1 && JS_ToBool(ctx, argv[1]); is_swap = littleEndian ^ !is_be(); abuf = ta->buffer->u.array_buffer; if (abuf->detached) return JS_ThrowTypeErrorDetachedArrayBuffer(ctx); // order matters: this check should come before the next one if ((pos + size) > ta->length) return JS_ThrowRangeError(ctx, "out of bound"); // test262 expects a TypeError for this and V8, in its infinite wisdom, // throws a "detached array buffer" exception, but IMO that doesn't make // sense because the buffer is not in fact detached, it's still there if ((int64_t)ta->offset + ta->length > abuf->byte_length) return JS_ThrowTypeError(ctx, "out of bound"); ptr = abuf->data + ta->offset + pos; switch(class_id) { case JS_CLASS_INT8_ARRAY: return js_int32(*(int8_t *)ptr); case JS_CLASS_UINT8_ARRAY: return js_int32(*(uint8_t *)ptr); case JS_CLASS_INT16_ARRAY: v = get_u16(ptr); if (is_swap) v = bswap16(v); return js_int32((int16_t)v); case JS_CLASS_UINT16_ARRAY: v = get_u16(ptr); if (is_swap) v = bswap16(v); return js_int32(v); case JS_CLASS_INT32_ARRAY: v = get_u32(ptr); if (is_swap) v = bswap32(v); return js_int32(v); case JS_CLASS_UINT32_ARRAY: v = get_u32(ptr); if (is_swap) v = bswap32(v); return js_uint32(v); case JS_CLASS_BIG_INT64_ARRAY: { uint64_t v; v = get_u64(ptr); if (is_swap) v = bswap64(v); return JS_NewBigInt64(ctx, v); } break; case JS_CLASS_BIG_UINT64_ARRAY: { uint64_t v; v = get_u64(ptr); if (is_swap) v = bswap64(v); return JS_NewBigUint64(ctx, v); } break; case JS_CLASS_FLOAT16_ARRAY: { uint16_t v; v = get_u16(ptr); if (is_swap) v = bswap16(v); return js_float64(fromfp16(v)); } case JS_CLASS_FLOAT32_ARRAY: { union { float f; uint32_t i; } u; v = get_u32(ptr); if (is_swap) v = bswap32(v); u.i = v; return js_float64(u.f); } case JS_CLASS_FLOAT64_ARRAY: { union { double f; uint64_t i; } u; u.i = get_u64(ptr); if (is_swap) u.i = bswap64(u.i); return js_float64(u.f); } default: abort(); } return JS_EXCEPTION; // pacify compiler }
O2
c
js_dataview_getValue: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r14d movq %r8, %r13 movl %ecx, %ebp movq %rdi, %r15 pushq $0x21 popq %rcx callq 0x24db7 pushq $0x6 popq %rdx testq %rax, %rax je 0x724a9 movq %rax, %r12 movslq %r14d, %rax leaq 0x15682(%rip), %rcx # 0x87aef movb -0x15(%rax,%rcx), %cl pushq $0x1 popq %rbx shll %cl, %ebx movq (%r13), %rdx movq 0x8(%r13), %rcx movq %rsp, %rsi movq %r15, %rdi callq 0x25230 testl %eax, %eax jne 0x724c9 cmpl $0x2, %ebp jl 0x724b0 movq 0x10(%r13), %rsi movq 0x18(%r13), %rdx movq %r15, %rdi callq 0x24e1f testl %eax, %eax setne %al jmp 0x724b2 xorl %r14d, %r14d xorl %ecx, %ecx jmp 0x724d1 xorl %eax, %eax movq 0x18(%r12), %rcx movq 0x30(%rcx), %rsi cmpb $0x0, 0x8(%rsi) je 0x724e6 movq %r15, %rdi callq 0x35cd1 xorl %r14d, %r14d xorl %ecx, %ecx pushq $0x6 popq %rdx movl %r14d, %eax orq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rsp), %rcx movslq %ebx, %rdx addq %rcx, %rdx movl 0x24(%r12), %edi cmpq %rdi, %rdx jbe 0x72510 leaq 0x1a3e5(%rip), %rsi # 0x8c8e6 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x1e863 jmp 0x724cc movl 0x20(%r12), %edx addq %rdx, %rdi movslq (%rsi), %r8 cmpq %r8, %rdi jle 0x72536 leaq 0x1a3bf(%rip), %rsi # 0x8c8e6 xorl %r14d, %r14d movq %r15, %rdi xorl %eax, %eax callq 0x201fd jmp 0x724cc addl $-0x16, %r14d cmpl $0xa, %r14d ja 0x72681 addq 0x10(%rsi), %rdx leaq 0x154b5(%rip), %rsi # 0x87a04 movslq (%rsi,%r14,4), %rdi addq %rsi, %rdi jmpq *%rdi movsbq (%rdx,%rcx), %r14 jmp 0x725d2 movl (%rdx,%rcx), %ecx movl %ecx, %r14d bswapl %r14d testb %al, %al cmovnel %ecx, %r14d jmp 0x725d2 movl (%rdx,%rcx), %ecx movl %ecx, %edx bswapl %edx testb %al, %al cmovnel %ecx, %edx movd %edx, %xmm0 cvtss2sd %xmm0, %xmm0 jmp 0x72668 movzwl (%rdx,%rcx), %ecx movl %ecx, %edx rolw $0x8, %dx testb %al, %al cmovnel %ecx, %edx movswq %dx, %r14 jmp 0x725d2 movzwl (%rdx,%rcx), %ecx movl %ecx, %edx rolw $0x8, %dx testb %al, %al cmovnel %ecx, %edx movzwl %dx, %r14d jmp 0x725d2 movq (%rdx,%rcx), %rcx movq %rcx, %rsi bswapq %rsi testb %al, %al cmovneq %rcx, %rsi movq %r15, %rdi callq 0x259aa jmp 0x7262a movzbl (%rdx,%rcx), %r14d xorl %ecx, %ecx xorl %edx, %edx jmp 0x724d1 movl (%rdx,%rcx), %ecx movl %ecx, %edx bswapl %edx testb %al, %al cmovnel %ecx, %edx xorl %eax, %eax testl %edx, %edx cvtsi2sd %rdx, %xmm0 movq %xmm0, %r14 cmovnsq %rdx, %r14 pushq $0x7 popq %rdx cmovnsq %rax, %rdx movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000 andq %r14, %rcx jmp 0x724d1 movq (%rdx,%rcx), %rcx movq %rcx, %rsi bswapq %rsi testb %al, %al cmovneq %rcx, %rsi movq %r15, %rdi callq 0x25906 movq %rax, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x724d1 movq (%rdx,%rcx), %rcx movq %rcx, %r14 bswapq %r14 testb %al, %al cmovneq %rcx, %r14 jmp 0x7266d movzwl (%rdx,%rcx), %ecx movl %ecx, %edx rolw $0x8, %dx testb %al, %al cmovnel %ecx, %edx movzwl %dx, %edi callq 0x39d27 movq %xmm0, %r14 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx pushq $0x7 jmp 0x724d0 callq 0xe090
js_dataview_getValue: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, r9d mov r13, r8 mov ebp, ecx mov r15, rdi push 21h ; '!' pop rcx call JS_GetOpaque2 push 6 pop rdx test rax, rax jz short loc_724A9 mov r12, rax movsxd rax, r14d lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] push 1 pop rbx shl ebx, cl mov rdx, [r13+0] mov rcx, [r13+8] mov rsi, rsp mov rdi, r15 call JS_ToIndex test eax, eax jnz short loc_724C9 cmp ebp, 2 jl short loc_724B0 mov rsi, [r13+10h] mov rdx, [r13+18h] mov rdi, r15 call JS_ToBool test eax, eax setnz al jmp short loc_724B2 loc_724A9: xor r14d, r14d xor ecx, ecx jmp short loc_724D1 loc_724B0: xor eax, eax loc_724B2: mov rcx, [r12+18h] mov rsi, [rcx+30h] cmp byte ptr [rsi+8], 0 jz short loc_724E6 mov rdi, r15 call JS_ThrowTypeErrorDetachedArrayBuffer loc_724C9: xor r14d, r14d loc_724CC: xor ecx, ecx push 6 loc_724D0: pop rdx loc_724D1: mov eax, r14d or rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_724E6: mov rcx, [rsp+38h+var_38] movsxd rdx, ebx add rdx, rcx mov edi, [r12+24h] cmp rdx, rdi jbe short loc_72510 lea rsi, aOutOfBound; "out of bound" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowRangeError jmp short loc_724CC loc_72510: mov edx, [r12+20h] add rdi, rdx movsxd r8, dword ptr [rsi] cmp rdi, r8 jle short loc_72536 lea rsi, aOutOfBound; "out of bound" xor r14d, r14d mov rdi, r15 xor eax, eax call JS_ThrowTypeError jmp short loc_724CC loc_72536: add r14d, 0FFFFFFEAh; switch 11 cases cmp r14d, 0Ah ja def_72556; jumptable 0000000000072556 default case add rdx, [rsi+10h] lea rsi, jpt_72556 movsxd rdi, ds:(jpt_72556 - 87A04h)[rsi+r14*4] add rdi, rsi jmp rdi; switch jump loc_72558: movsx r14, byte ptr [rdx+rcx]; jumptable 0000000000072556 case 22 jmp short loc_725D2 loc_7255F: mov ecx, [rdx+rcx]; jumptable 0000000000072556 case 26 mov r14d, ecx bswap r14d test al, al cmovnz r14d, ecx jmp short loc_725D2 loc_72570: mov ecx, [rdx+rcx]; jumptable 0000000000072556 case 31 mov edx, ecx bswap edx test al, al cmovnz edx, ecx movd xmm0, edx cvtss2sd xmm0, xmm0 jmp loc_72668 loc_72589: movzx ecx, word ptr [rdx+rcx]; jumptable 0000000000072556 case 24 mov edx, ecx rol dx, 8 test al, al cmovnz edx, ecx movsx r14, dx jmp short loc_725D2 loc_7259E: movzx ecx, word ptr [rdx+rcx]; jumptable 0000000000072556 case 25 mov edx, ecx rol dx, 8 test al, al cmovnz edx, ecx movzx r14d, dx jmp short loc_725D2 loc_725B3: mov rcx, [rdx+rcx]; jumptable 0000000000072556 case 29 mov rsi, rcx bswap rsi test al, al cmovnz rsi, rcx mov rdi, r15 call JS_NewBigUint64 jmp short loc_7262A loc_725CD: movzx r14d, byte ptr [rdx+rcx]; jumptable 0000000000072556 case 23 loc_725D2: xor ecx, ecx xor edx, edx jmp loc_724D1 loc_725DB: mov ecx, [rdx+rcx]; jumptable 0000000000072556 case 27 mov edx, ecx bswap edx test al, al cmovnz edx, ecx xor eax, eax test edx, edx cvtsi2sd xmm0, rdx movq r14, xmm0 cmovns r14, rdx push 7 pop rdx cmovns rdx, rax mov rcx, 7FFFFFFF00000000h and rcx, r14 jmp loc_724D1 loc_72612: mov rcx, [rdx+rcx]; jumptable 0000000000072556 case 28 mov rsi, rcx bswap rsi test al, al cmovnz rsi, rcx mov rdi, r15 call JS_NewBigInt64 loc_7262A: mov r14, rax mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp loc_724D1 loc_7263F: mov rcx, [rdx+rcx]; jumptable 0000000000072556 case 32 mov r14, rcx bswap r14 test al, al cmovnz r14, rcx jmp short loc_7266D loc_72651: movzx ecx, word ptr [rdx+rcx]; jumptable 0000000000072556 case 30 mov edx, ecx rol dx, 8 test al, al cmovnz edx, ecx movzx edi, dx call fromfp16 loc_72668: movq r14, xmm0 loc_7266D: mov rcx, 0FFFFFFFF00000000h and rcx, r14 push 7 jmp loc_724D0 def_72556: call _abort; jumptable 0000000000072556 default case
unsigned long long js_dataview_getValue( long long a1, long long a2, int a3, int a4, long long a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long v14; // rax long long Opaque2; // rax double v20; // xmm4_8 double v21; // xmm5_8 long long v22; // r12 int v23; // ebx long long v24; // rdx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 bool v29; // al double v30; // r14 unsigned long long v31; // rcx long long v32; // rcx int *v33; // rsi unsigned long long v35; // rdx unsigned long long v36; // rdi long long v37; // rdx const char *v38; // rdi long long v39; // r8 long long v40; // rdx unsigned int v41; // ecx float v42; // edx __int16 v43; // cx __int16 v44; // dx unsigned __int16 v45; // cx unsigned __int16 v46; // dx long long v47; // rsi long long v48; // rax unsigned int v49; // ecx double v50; // rdx long long v51; // rsi __int16 v52; // cx __int16 v53; // dx long long v54[7]; // [rsp+0h] [rbp-38h] BYREF v54[0] = v14; Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x21u); if ( Opaque2 ) { v22 = Opaque2; v23 = 1 << typed_array_size_log2[a6 - 21]; if ( (unsigned int)JS_ToIndex(a1, v54, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), a7, a8, a9, a10, v20, v21, a13, a14) ) { LABEL_9: LODWORD(v30) = 0; LABEL_10: v31 = 0LL; return v31 | LODWORD(v30); } v29 = a4 >= 2 && (unsigned int)JS_ToBool(a1, *(_QWORD *)(a5 + 16), *(_QWORD *)(a5 + 24)) != 0; v32 = *(_QWORD *)(v22 + 24); v33 = *(int **)(v32 + 48); if ( *((_BYTE *)v33 + 8) ) { JS_ThrowTypeErrorDetachedArrayBuffer( a1, a7, a8, a9, a10, v27, v28, a13, a14, (long long)v33, v24, v32, v25, v26, v54[0]); goto LABEL_9; } v35 = v54[0] + v23; v36 = *(unsigned int *)(v22 + 36); if ( v35 > v36 ) { LODWORD(v30) = 0; JS_ThrowRangeError( a1, (long long)"out of bound", v35, v54[0], v25, v26, a7, a8, a9, a10, v27, v28, a13, a14, v54[0]); goto LABEL_10; } v37 = *(unsigned int *)(v22 + 32); v38 = (const char *)(v37 + v36); v39 = *v33; if ( (long long)v38 > v39 ) { LODWORD(v30) = 0; JS_ThrowTypeError(a1, (long long)"out of bound", v37, v54[0], v39, v26, a7, a8, a9, a10, v27, v28, a13, a14, v54[0]); goto LABEL_10; } v40 = *((_QWORD *)v33 + 2) + v37; switch ( a6 ) { case 22: LODWORD(v30) = *(char *)(v40 + v54[0]); goto LABEL_34; case 23: LODWORD(v30) = *(unsigned __int8 *)(v40 + v54[0]); goto LABEL_34; case 24: v43 = *(_WORD *)(v40 + v54[0]); v44 = __ROL2__(v43, 8); if ( v29 ) v44 = v43; LODWORD(v30) = v44; goto LABEL_34; case 25: v45 = *(_WORD *)(v40 + v54[0]); v46 = __ROL2__(v45, 8); if ( v29 ) v46 = v45; LODWORD(v30) = v46; goto LABEL_34; case 26: LODWORD(v30) = _byteswap_ulong(*(_DWORD *)(v40 + v54[0])); if ( v29 ) LODWORD(v30) = *(_DWORD *)(v40 + v54[0]); LABEL_34: v31 = 0LL; return v31 | LODWORD(v30); case 27: v49 = *(_DWORD *)(v40 + v54[0]); *(_QWORD *)&v50 = _byteswap_ulong(v49); if ( v29 ) *(_QWORD *)&v50 = v49; v30 = (double)SLODWORD(v50); if ( SLODWORD(v50) >= 0 ) v30 = v50; v31 = *(_QWORD *)&v30 & 0x7FFFFFFF00000000LL; return v31 | LODWORD(v30); case 28: v51 = _byteswap_uint64(*(_QWORD *)(v40 + v54[0])); if ( v29 ) v51 = *(_QWORD *)(v40 + v54[0]); v48 = JS_NewBigInt64(a1, v51); goto LABEL_43; case 29: v47 = _byteswap_uint64(*(_QWORD *)(v40 + v54[0])); if ( v29 ) v47 = *(_QWORD *)(v40 + v54[0]); v48 = JS_NewBigUint64(a1, v47); LABEL_43: LODWORD(v30) = v48; v31 = v48 & 0xFFFFFFFF00000000LL; return v31 | LODWORD(v30); case 30: v52 = *(_WORD *)(v40 + v54[0]); v53 = __ROL2__(v52, 8); if ( v29 ) v53 = v52; fromfp16(v53); goto LABEL_50; case 31: v41 = *(unsigned int *)(v40 + v54[0]); v42 = COERCE_FLOAT(_byteswap_ulong(v41)); if ( v29 ) v42 = *(float *)&v41; *(double *)a7.m128_u64 = v42; LABEL_50: v30 = *(double *)a7.m128_u64; break; case 32: v30 = COERCE_DOUBLE(_byteswap_uint64(*(_QWORD *)(v40 + v54[0]))); if ( v29 ) v30 = *(double *)(v40 + v54[0]); break; default: abort(v38, v33, v40); } v31 = *(_QWORD *)&v30 & 0xFFFFFFFF00000000LL; } else { LODWORD(v30) = 0; v31 = 0LL; } return v31 | LODWORD(v30); }
js_dataview_getValue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,R9D MOV R13,R8 MOV EBP,ECX MOV R15,RDI PUSH 0x21 POP RCX CALL 0x00124db7 PUSH 0x6 POP RDX TEST RAX,RAX JZ 0x001724a9 MOV R12,RAX MOVSXD RAX,R14D LEA RCX,[0x187aef] MOV CL,byte ptr [RAX + RCX*0x1 + -0x15] PUSH 0x1 POP RBX SHL EBX,CL MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] MOV RSI,RSP MOV RDI,R15 CALL 0x00125230 TEST EAX,EAX JNZ 0x001724c9 CMP EBP,0x2 JL 0x001724b0 MOV RSI,qword ptr [R13 + 0x10] MOV RDX,qword ptr [R13 + 0x18] MOV RDI,R15 CALL 0x00124e1f TEST EAX,EAX SETNZ AL JMP 0x001724b2 LAB_001724a9: XOR R14D,R14D XOR ECX,ECX JMP 0x001724d1 LAB_001724b0: XOR EAX,EAX LAB_001724b2: MOV RCX,qword ptr [R12 + 0x18] MOV RSI,qword ptr [RCX + 0x30] CMP byte ptr [RSI + 0x8],0x0 JZ 0x001724e6 MOV RDI,R15 CALL 0x00135cd1 LAB_001724c9: XOR R14D,R14D LAB_001724cc: XOR ECX,ECX PUSH 0x6 LAB_001724d0: POP RDX LAB_001724d1: MOV EAX,R14D OR RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001724e6: MOV RCX,qword ptr [RSP] MOVSXD RDX,EBX ADD RDX,RCX MOV EDI,dword ptr [R12 + 0x24] CMP RDX,RDI JBE 0x00172510 LEA RSI,[0x18c8e6] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x0011e863 JMP 0x001724cc LAB_00172510: MOV EDX,dword ptr [R12 + 0x20] ADD RDI,RDX MOVSXD R8,dword ptr [RSI] CMP RDI,R8 JLE 0x00172536 LEA RSI,[0x18c8e6] XOR R14D,R14D MOV RDI,R15 XOR EAX,EAX CALL 0x001201fd JMP 0x001724cc LAB_00172536: ADD R14D,-0x16 CMP R14D,0xa JA 0x00172681 ADD RDX,qword ptr [RSI + 0x10] LEA RSI,[0x187a04] MOVSXD RDI,dword ptr [RSI + R14*0x4] ADD RDI,RSI switchD: JMP RDI caseD_16: MOVSX R14,byte ptr [RDX + RCX*0x1] JMP 0x001725d2 caseD_1a: MOV ECX,dword ptr [RDX + RCX*0x1] MOV R14D,ECX BSWAP R14D TEST AL,AL CMOVNZ R14D,ECX JMP 0x001725d2 caseD_1f: MOV ECX,dword ptr [RDX + RCX*0x1] MOV EDX,ECX BSWAP EDX TEST AL,AL CMOVNZ EDX,ECX MOVD XMM0,EDX CVTSS2SD XMM0,XMM0 JMP 0x00172668 caseD_18: MOVZX ECX,word ptr [RDX + RCX*0x1] MOV EDX,ECX ROL DX,0x8 TEST AL,AL CMOVNZ EDX,ECX MOVSX R14,DX JMP 0x001725d2 caseD_19: MOVZX ECX,word ptr [RDX + RCX*0x1] MOV EDX,ECX ROL DX,0x8 TEST AL,AL CMOVNZ EDX,ECX MOVZX R14D,DX JMP 0x001725d2 caseD_1d: MOV RCX,qword ptr [RDX + RCX*0x1] MOV RSI,RCX BSWAP RSI TEST AL,AL CMOVNZ RSI,RCX MOV RDI,R15 CALL 0x001259aa JMP 0x0017262a caseD_17: MOVZX R14D,byte ptr [RDX + RCX*0x1] LAB_001725d2: XOR ECX,ECX XOR EDX,EDX JMP 0x001724d1 caseD_1b: MOV ECX,dword ptr [RDX + RCX*0x1] MOV EDX,ECX BSWAP EDX TEST AL,AL CMOVNZ EDX,ECX XOR EAX,EAX TEST EDX,EDX CVTSI2SD XMM0,RDX MOVQ R14,XMM0 CMOVNS R14,RDX PUSH 0x7 POP RDX CMOVNS RDX,RAX MOV RCX,0x7fffffff00000000 AND RCX,R14 JMP 0x001724d1 caseD_1c: MOV RCX,qword ptr [RDX + RCX*0x1] MOV RSI,RCX BSWAP RSI TEST AL,AL CMOVNZ RSI,RCX MOV RDI,R15 CALL 0x00125906 LAB_0017262a: MOV R14,RAX MOV RCX,-0x100000000 AND RCX,RAX JMP 0x001724d1 caseD_20: MOV RCX,qword ptr [RDX + RCX*0x1] MOV R14,RCX BSWAP R14 TEST AL,AL CMOVNZ R14,RCX JMP 0x0017266d caseD_1e: MOVZX ECX,word ptr [RDX + RCX*0x1] MOV EDX,ECX ROL DX,0x8 TEST AL,AL CMOVNZ EDX,ECX MOVZX EDI,DX CALL 0x00139d27 LAB_00172668: MOVQ R14,XMM0 LAB_0017266d: MOV RCX,-0x100000000 AND RCX,R14 PUSH 0x7 JMP 0x001724d0 LAB_00172681: CALL 0x0010e090
ulong js_dataview_getValue (int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5,int param_6) { byte bVar1; ushort uVar2; float fVar3; uint uVar4; int *piVar5; double dVar6; uint uVar7; int iVar8; long in_RAX; long lVar9; ulong uVar10; ushort uVar11; float fVar12; ulong uVar13; bool bVar14; double dVar15; long local_38; local_38 = in_RAX; lVar9 = JS_GetOpaque2(); if (lVar9 == 0) { dVar15 = 0.0; uVar10 = 0; goto LAB_001724d1; } bVar1 = "toSorted"[(long)param_6 + 6]; iVar8 = JS_ToIndex(param_1,&local_38,*param_5,param_5[1]); if (iVar8 != 0) { LAB_001724cc: dVar15 = 0.0; uVar10 = 0; goto LAB_001724d1; } if (param_4 < 2) { bVar14 = false; } else { iVar8 = JS_ToBool(param_1,param_5[2],param_5[3]); bVar14 = iVar8 != 0; } piVar5 = *(int **)(*(long *)(lVar9 + 0x18) + 0x30); if ((char)piVar5[2] != '\0') { JS_ThrowTypeErrorDetachedArrayBuffer(param_1); goto LAB_001724cc; } if ((ulong)*(uint *)(lVar9 + 0x24) < (ulong)((1 << (bVar1 & 0x1f)) + local_38)) { JS_ThrowRangeError(param_1,"out of bound"); goto LAB_001724cc; } if ((long)*piVar5 < (long)((ulong)*(uint *)(lVar9 + 0x24) + (ulong)*(uint *)(lVar9 + 0x20))) { JS_ThrowTypeError(param_1,"out of bound"); goto LAB_001724cc; } if (10 < param_6 - 0x16U) { /* WARNING: Subroutine does not return */ abort(); } lVar9 = (ulong)*(uint *)(lVar9 + 0x20) + *(long *)(piVar5 + 4); switch(param_6) { case 0x16: dVar15 = (double)(long)*(char *)(lVar9 + local_38); break; case 0x17: dVar15 = (double)(ulong)*(byte *)(lVar9 + local_38); break; case 0x18: uVar2 = *(ushort *)(lVar9 + local_38); uVar11 = uVar2 << 8 | uVar2 >> 8; if (bVar14) { uVar11 = uVar2; } dVar15 = (double)(long)(short)uVar11; break; case 0x19: uVar2 = *(ushort *)(lVar9 + local_38); uVar11 = uVar2 << 8 | uVar2 >> 8; if (bVar14) { uVar11 = uVar2; } dVar15 = (double)(ulong)uVar11; break; case 0x1a: uVar4 = *(uint *)(lVar9 + local_38); uVar7 = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; if (bVar14) { uVar7 = uVar4; } dVar15 = (double)(ulong)uVar7; break; case 0x1b: uVar4 = *(uint *)(lVar9 + local_38); uVar7 = uVar4 >> 0x18 | (uVar4 & 0xff0000) >> 8 | (uVar4 & 0xff00) << 8 | uVar4 << 0x18; if (bVar14) { uVar7 = uVar4; } dVar15 = (double)uVar7; if (-1 < (int)uVar7) { dVar15 = (double)(ulong)uVar7; } uVar10 = (ulong)dVar15 & 0x7fffffff00000000; goto LAB_001724d1; case 0x1c: uVar10 = *(ulong *)(lVar9 + local_38); uVar13 = uVar10 >> 0x38 | (uVar10 & 0xff000000000000) >> 0x28 | (uVar10 & 0xff0000000000) >> 0x18 | (uVar10 & 0xff00000000) >> 8 | (uVar10 & 0xff000000) << 8 | (uVar10 & 0xff0000) << 0x18 | (uVar10 & 0xff00) << 0x28 | uVar10 << 0x38; if (bVar14) { uVar13 = uVar10; } dVar15 = (double)JS_NewBigInt64(param_1,uVar13); goto LAB_0017262a; case 0x1d: uVar10 = *(ulong *)(lVar9 + local_38); uVar13 = uVar10 >> 0x38 | (uVar10 & 0xff000000000000) >> 0x28 | (uVar10 & 0xff0000000000) >> 0x18 | (uVar10 & 0xff00000000) >> 8 | (uVar10 & 0xff000000) << 8 | (uVar10 & 0xff0000) << 0x18 | (uVar10 & 0xff00) << 0x28 | uVar10 << 0x38; if (bVar14) { uVar13 = uVar10; } dVar15 = (double)JS_NewBigUint64(param_1,uVar13); LAB_0017262a: uVar10 = (ulong)dVar15 & 0xffffffff00000000; goto LAB_001724d1; case 0x1e: uVar2 = *(ushort *)(lVar9 + local_38); uVar11 = uVar2 << 8 | uVar2 >> 8; if (bVar14) { uVar11 = uVar2; } dVar15 = (double)fromfp16(uVar11,&switchD_00172556::switchdataD_00187a04,uVar11); goto LAB_0017266d; case 0x1f: fVar3 = *(float *)(lVar9 + local_38); fVar12 = (float)((uint)fVar3 >> 0x18 | ((uint)fVar3 & 0xff0000) >> 8 | ((uint)fVar3 & 0xff00) << 8 | (int)fVar3 << 0x18); if (bVar14) { fVar12 = fVar3; } dVar15 = (double)fVar12; goto LAB_0017266d; case 0x20: dVar6 = *(double *)(lVar9 + local_38); dVar15 = (double)((ulong)dVar6 >> 0x38 | ((ulong)dVar6 & 0xff000000000000) >> 0x28 | ((ulong)dVar6 & 0xff0000000000) >> 0x18 | ((ulong)dVar6 & 0xff00000000) >> 8 | ((ulong)dVar6 & 0xff000000) << 8 | ((ulong)dVar6 & 0xff0000) << 0x18 | ((ulong)dVar6 & 0xff00) << 0x28 | (long)dVar6 << 0x38); if (bVar14) { dVar15 = dVar6; } LAB_0017266d: uVar10 = (ulong)dVar15 & 0xffffffff00000000; goto LAB_001724d1; } uVar10 = 0; LAB_001724d1: return (ulong)dVar15 & 0xffffffff | uVar10; }
30,488
alaya::FindExactGTTest_EmptyData_Test::TestBody()
AlayaLite/tests/utils/evaluate_test.cpp
TEST(FindExactGTTest, EmptyData) { std::vector<float> queries = {1.0, 2.0, 3.0}; std::vector<float> data; uint32_t dim = 3; uint32_t topk = 1; auto result = find_exact_gt(queries, data, dim, topk); EXPECT_TRUE(result.empty()); }
O0
cpp
alaya::FindExactGTTest_EmptyData_Test::TestBody(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x29540 movq 0x8(%rsp), %rdi movl $0x10, %esi callq 0x146e0 addq $0x18, %rsp retq nopl (%rax)
_ZN5alaya30FindExactGTTest_EmptyData_TestD0Ev: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this mov [rsp+18h+var_10], rdi call _ZN5alaya30FindExactGTTest_EmptyData_TestD2Ev; alaya::FindExactGTTest_EmptyData_Test::~FindExactGTTest_EmptyData_Test() mov rdi, [rsp+18h+var_10]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 18h retn
void alaya::FindExactGTTest_EmptyData_Test::~FindExactGTTest_EmptyData_Test( alaya::FindExactGTTest_EmptyData_Test *this) { alaya::FindExactGTTest_EmptyData_Test::~FindExactGTTest_EmptyData_Test(this); operator delete(this, 0x10uLL); }
~FindExactGTTest_EmptyData_Test: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x00129540 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x10 CALL 0x001146e0 ADD RSP,0x18 RET
/* alaya::FindExactGTTest_EmptyData_Test::~FindExactGTTest_EmptyData_Test() */ void __thiscall alaya::FindExactGTTest_EmptyData_Test::~FindExactGTTest_EmptyData_Test (FindExactGTTest_EmptyData_Test *this) { ~FindExactGTTest_EmptyData_Test(this); operator_delete(this,0x10); return; }
30,489
my_message_stderr
eloqsql/mysys/my_mess.c
void my_message_stderr(uint error __attribute__((unused)), const char *str, myf MyFlags) { DBUG_ENTER("my_message_stderr"); DBUG_PRINT("enter",("message: %s",str)); (void) fflush(stdout); if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY)) DBUG_VOID_RETURN; if (MyFlags & ME_BELL) (void) fputc('\007', stderr); if (my_progname) { (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); } (void)fputs(str,stderr); (void)fputc('\n',stderr); (void)fflush(stderr); DBUG_VOID_RETURN; }
O0
c
my_message_stderr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x592d5 movq 0x1b9ce4(%rip), %rax # 0x212fc0 movq (%rax), %rdi callq 0x263a0 movq -0x18(%rbp), %rax andq $0x480, %rax # imm = 0x480 cmpq $0x0, %rax je 0x592fb jmp 0x592f6 jmp 0x59391 movq -0x18(%rbp), %rax andq $0x4, %rax cmpq $0x0, %rax je 0x5931d movq 0x1b9cd0(%rip), %rax # 0x212fe0 movq (%rax), %rsi movl $0x7, %edi callq 0x26410 leaq 0x3b4fcc(%rip), %rax # 0x40e2f0 cmpq $0x0, (%rax) je 0x59359 leaq 0x3b4fbf(%rip), %rax # 0x40e2f0 movq (%rax), %rdi movq 0x1b9ca5(%rip), %rax # 0x212fe0 movq (%rax), %rsi callq 0x26370 movq 0x1b9c96(%rip), %rax # 0x212fe0 movq (%rax), %rsi leaq 0x5634a(%rip), %rdi # 0xaf69e callq 0x26370 movq -0x10(%rbp), %rdi movq 0x1b9c7c(%rip), %rax # 0x212fe0 movq (%rax), %rsi callq 0x26370 movq 0x1b9c6d(%rip), %rax # 0x212fe0 movq (%rax), %rsi movl $0xa, %edi callq 0x26410 movq 0x1b9c59(%rip), %rax # 0x212fe0 movq (%rax), %rdi callq 0x263a0 jmp 0x59391 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_message_stderr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_592D5: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, [rbp+var_18] and rax, 480h cmp rax, 0 jz short loc_592FB jmp short $+2 loc_592F6: jmp loc_59391 loc_592FB: mov rax, [rbp+var_18] and rax, 4 cmp rax, 0 jz short loc_5931D mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 7 call _fputc loc_5931D: lea rax, my_progname cmp qword ptr [rax], 0 jz short loc_59359 lea rax, my_progname mov rdi, [rax] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] lea rdi, asc_AF69E; ": " call _fputs loc_59359: mov rdi, [rbp+var_10] mov rax, cs:stderr_ptr mov rsi, [rax] call _fputs mov rax, cs:stderr_ptr mov rsi, [rax] mov edi, 0Ah call _fputc mov rax, cs:stderr_ptr mov rdi, [rax] call _fflush jmp short $+2 loc_59391: add rsp, 20h pop rbp retn
long long my_message_stderr(long long a1, long long a2, __int16 a3) { long long result; // rax fflush(stdout); result = a3 & 0x480; if ( (a3 & 0x480) == 0 ) { if ( (a3 & 4) != 0 ) fputc(7LL, stderr); if ( my_progname ) { fputs(my_progname, stderr); fputs(": ", stderr); } fputs(a2, stderr); fputc(10LL, stderr); return fflush(stderr); } return result; }
my_message_stderr: 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 JMP 0x001592d5 LAB_001592d5: MOV RAX,qword ptr [0x00312fc0] MOV RDI,qword ptr [RAX] CALL 0x001263a0 MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x480 CMP RAX,0x0 JZ 0x001592fb JMP 0x001592f6 LAB_001592f6: JMP 0x00159391 LAB_001592fb: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x4 CMP RAX,0x0 JZ 0x0015931d MOV RAX,qword ptr [0x00312fe0] MOV RSI,qword ptr [RAX] MOV EDI,0x7 CALL 0x00126410 LAB_0015931d: LEA RAX,[0x50e2f0] CMP qword ptr [RAX],0x0 JZ 0x00159359 LEA RAX,[0x50e2f0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [0x00312fe0] MOV RSI,qword ptr [RAX] CALL 0x00126370 MOV RAX,qword ptr [0x00312fe0] MOV RSI,qword ptr [RAX] LEA RDI,[0x1af69e] CALL 0x00126370 LAB_00159359: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [0x00312fe0] MOV RSI,qword ptr [RAX] CALL 0x00126370 MOV RAX,qword ptr [0x00312fe0] MOV RSI,qword ptr [RAX] MOV EDI,0xa CALL 0x00126410 MOV RAX,qword ptr [0x00312fe0] MOV RDI,qword ptr [RAX] CALL 0x001263a0 JMP 0x00159391 LAB_00159391: ADD RSP,0x20 POP RBP RET
void my_message_stderr(int8 param_1,char *param_2,ulong param_3) { fflush(*(FILE **)PTR_stdout_00312fc0); if ((param_3 & 0x480) == 0) { if ((param_3 & 4) != 0) { fputc(7,*(FILE **)PTR_stderr_00312fe0); } if (my_progname != (char *)0x0) { fputs(my_progname,*(FILE **)PTR_stderr_00312fe0); fputs(": ",*(FILE **)PTR_stderr_00312fe0); } fputs(param_2,*(FILE **)PTR_stderr_00312fe0); fputc(10,*(FILE **)PTR_stderr_00312fe0); fflush(*(FILE **)PTR_stderr_00312fe0); } return; }
30,490
nglog::tools::ProgramInvocationShortName()
ng-log[P]ng-log/src/utilities.cc
const char* ProgramInvocationShortName() { if (g_program_invocation_short_name != nullptr) { return g_program_invocation_short_name; } #if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME) return program_invocation_short_name; #elif defined(HAVE_GETPROGNAME) return getprogname(); #elif defined(HAVE___PROGNAME) return __progname; #elif defined(HAVE___ARGV) return const_basename(__argv[0]); #else return "UNKNOWN"; #endif }
O2
cpp
nglog::tools::ProgramInvocationShortName(): movq 0x25364(%rip), %rax # 0x42b60 testq %rax, %rax jne 0x1d80b movq 0x12788(%rip), %rax # 0x2ff90 movq (%rax), %rax retq
_ZN5nglog5tools26ProgramInvocationShortNameEv: mov rax, cs:_ZN5nglogL31g_program_invocation_short_nameE; nglog::g_program_invocation_short_name test rax, rax jnz short locret_1D80B mov rax, cs:program_invocation_short_name_ptr mov rax, [rax] locret_1D80B: retn
long long nglog::tools::ProgramInvocationShortName(nglog::tools *this) { long long result; // rax result = nglog::g_program_invocation_short_name; if ( !nglog::g_program_invocation_short_name ) return program_invocation_short_name; return result; }
ProgramInvocationShortName: MOV RAX,qword ptr [0x00142b60] TEST RAX,RAX JNZ 0x0011d80b MOV RAX,qword ptr [0x0012ff90] MOV RAX,qword ptr [RAX] LAB_0011d80b: RET
/* nglog::tools::ProgramInvocationShortName() */ long nglog::tools::ProgramInvocationShortName(void) { long lVar1; lVar1 = g_program_invocation_short_name; if (g_program_invocation_short_name == 0) { lVar1 = *(long *)PTR_program_invocation_short_name_0012ff90; } return lVar1; }
30,491
JS_ObjectDefineProperties
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_ObjectDefineProperties(JSContext *ctx, JSValue obj, JSValue properties) { JSValue props, desc; JSObject *p; JSPropertyEnum *atoms; uint32_t len, i; int ret = -1; if (!JS_IsObject(obj)) { JS_ThrowTypeError(ctx, "Object.defineProperties called on non-object"); return -1; } desc = JS_UNDEFINED; props = JS_ToObject(ctx, properties); if (JS_IsException(props)) return -1; p = JS_VALUE_GET_OBJ(props); if (JS_GetOwnPropertyNamesInternal(ctx, &atoms, &len, p, JS_GPN_ENUM_ONLY | JS_GPN_STRING_MASK | JS_GPN_SYMBOL_MASK) < 0) goto exception; // XXX: ECMA specifies that all descriptions should be validated before // modifying the object. This would require allocating an array // JSPropertyDescriptor and use 2 separate loops. for(i = 0; i < len; i++) { JS_FreeValue(ctx, desc); desc = JS_GetProperty(ctx, props, atoms[i].atom); if (JS_IsException(desc)) goto exception; if (JS_DefinePropertyDesc(ctx, obj, atoms[i].atom, desc, JS_PROP_THROW | JS_PROP_DEFINE_PROPERTY) < 0) goto exception; } ret = 0; exception: js_free_prop_enum(ctx, atoms, len); JS_FreeValue(ctx, props); JS_FreeValue(ctx, desc); return ret; }
O1
c
JS_ObjectDefineProperties: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, 0x28(%rsp) movq %rdi, %rbx movq %rdx, 0x30(%rsp) cmpl $-0x1, %edx jne 0x75267 movq %rbx, %rdi movq %rcx, %rsi movq %r8, %rdx callq 0x2ae39 movq %rax, 0x8(%rsp) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rdx, 0x10(%rsp) cmpl $0x6, %edx je 0x752b9 movq 0x8(%rsp), %rcx leaq 0x18(%rsp), %rsi leaq 0x4(%rsp), %rdx movq %rbx, %rdi movl $0x13, %r8d callq 0x27619 movl $0x3, %r13d movl $0xffffffff, %r14d # imm = 0xFFFFFFFF xorl %ebp, %ebp testl %eax, %eax js 0x75286 movl 0x4(%rsp), %eax movq %rax, 0x20(%rsp) testq %rax, %rax je 0x75262 movq 0x18(%rsp), %r14 movq 0x8(%rsp), %r12 xorl %r15d, %r15d xorl %ebp, %ebp movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x21922 movl 0x4(%r14,%r15,8), %ecx movq %rbx, %rdi movq %r12, %rsi movq 0x10(%rsp), %rdx movq %r12, %r8 movq %rdx, %r9 pushq $0x0 pushq $0x0 callq 0x26fff addq $0x10, %rsp movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x75280 movl 0x4(%r14,%r15,8), %ecx subq $0x8, %rsp movq %rbx, %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbp, %r8 movq %r13, %r9 pushq $0x44000 # imm = 0x44000 callq 0x752cb addq $0x10, %rsp testl %eax, %eax js 0x75280 incq %r15 cmpq %r15, 0x20(%rsp) jne 0x751ec xorl %r14d, %r14d jmp 0x75286 leaq 0x309df(%rip), %rsi # 0xa5c4d movq %rbx, %rdi xorl %eax, %eax callq 0x265c3 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x752b9 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq 0x18(%rsp), %rsi movl 0x4(%rsp), %edx movq %rbx, %rdi callq 0x27ed5 movq 0x8(%rsp), %rsi movq 0x18(%rbx), %rdi movq 0x10(%rsp), %rdx callq 0x21922 movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x21922 movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ObjectDefineProperties: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rsp+68h+var_40], rsi mov rbx, rdi mov [rsp+68h+var_38], rdx cmp edx, 0FFFFFFFFh jnz loc_75267 mov rdi, rbx mov rsi, rcx mov rdx, r8 call JS_ToObject mov [rsp+68h+var_60], rax mov r14d, 0FFFFFFFFh mov [rsp+68h+var_58], rdx cmp edx, 6 jz loc_752B9 mov rcx, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_64] mov rdi, rbx mov r8d, 13h call JS_GetOwnPropertyNamesInternal mov r13d, 3 mov r14d, 0FFFFFFFFh xor ebp, ebp test eax, eax js loc_75286 mov eax, [rsp+68h+var_64] mov [rsp+68h+var_48], rax test rax, rax jz loc_75262 mov r14, [rsp+68h+var_50] mov r12, [rsp+68h+var_60] xor r15d, r15d xor ebp, ebp loc_751EC: mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov ecx, [r14+r15*8+4] mov rdi, rbx mov rsi, r12 mov rdx, [rsp+68h+var_58] mov r8, r12 mov r9, rdx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rbp, rax mov r13, rdx cmp r13d, 6 jz short loc_75280 mov ecx, [r14+r15*8+4] sub rsp, 8 mov rdi, rbx mov rsi, [rsp+70h+var_40] mov rdx, [rsp+70h+var_38] mov r8, rbp mov r9, r13 push offset loc_44000 call JS_DefinePropertyDesc add rsp, 10h test eax, eax js short loc_75280 inc r15 cmp [rsp+68h+var_48], r15 jnz short loc_751EC loc_75262: xor r14d, r14d jmp short loc_75286 loc_75267: lea rsi, aObjectDefinepr; "Object.defineProperties called on non-o"... mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14d, 0FFFFFFFFh jmp short loc_752B9 loc_75280: mov r14d, 0FFFFFFFFh loc_75286: mov rsi, [rsp+68h+var_50] mov edx, [rsp+68h+var_64] mov rdi, rbx call js_free_prop_enum mov rsi, [rsp+68h+var_60] mov rdi, [rbx+18h] mov rdx, [rsp+68h+var_58] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT loc_752B9: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_ObjectDefineProperties( 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) { unsigned int v14; // r14d long long v15; // rdx long long v16; // r13 _DWORD *v17; // rbp long long v18; // r14 _DWORD *v19; // r12 long long v20; // r15 unsigned long long PropertyInternal2; // rax long long v22; // rdx char v24; // [rsp+0h] [rbp-68h] unsigned int v25; // [rsp+4h] [rbp-64h] BYREF _DWORD *v26; // [rsp+8h] [rbp-60h] long long v27; // [rsp+10h] [rbp-58h] long long v28; // [rsp+18h] [rbp-50h] BYREF long long v29; // [rsp+20h] [rbp-48h] long long v30; // [rsp+28h] [rbp-40h] long long v31; // [rsp+30h] [rbp-38h] v30 = a2; v31 = a3; if ( (_DWORD)a3 == -1 ) { v26 = JS_ToObject(a1, a4, a5, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v14 = -1; v27 = v15; if ( (_DWORD)v15 != 6 ) { v16 = 3LL; v14 = -1; v17 = 0LL; if ( (int)JS_GetOwnPropertyNamesInternal(a1, &v28, &v25, (long long)v26, 19) >= 0 ) { v29 = v25; if ( v25 ) { v18 = v28; v19 = v26; v20 = 0LL; v17 = 0LL; while ( 1 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v16); PropertyInternal2 = JS_GetPropertyInternal2( a1, (long long)v19, v27, *(_DWORD *)(v18 + 8 * v20 + 4), (long long)v19, v27, 0LL, 0); v17 = (_DWORD *)PropertyInternal2; v16 = v22; if ( (_DWORD)v22 == 6 || (int)JS_DefinePropertyDesc( a1, v30, v31, *(_DWORD *)(v18 + 8 * v20 + 4), PropertyInternal2, v22, (unsigned int)&loc_44000) < 0 ) { break; } if ( v29 == ++v20 ) goto LABEL_9; } v14 = -1; } else { LABEL_9: v14 = 0; } } js_free_prop_enum(a1, v28, v25); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v16); } } else { JS_ThrowTypeError( a1, (long long)"Object.defineProperties called on non-object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v24); return (unsigned int)-1; } return v14; }
JS_ObjectDefineProperties: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RSI MOV RBX,RDI MOV qword ptr [RSP + 0x30],RDX CMP EDX,-0x1 JNZ 0x00175267 MOV RDI,RBX MOV RSI,RCX MOV RDX,R8 CALL 0x0012ae39 MOV qword ptr [RSP + 0x8],RAX MOV R14D,0xffffffff MOV qword ptr [RSP + 0x10],RDX CMP EDX,0x6 JZ 0x001752b9 MOV RCX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x4] MOV RDI,RBX MOV R8D,0x13 CALL 0x00127619 MOV R13D,0x3 MOV R14D,0xffffffff XOR EBP,EBP TEST EAX,EAX JS 0x00175286 MOV EAX,dword ptr [RSP + 0x4] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x00175262 MOV R14,qword ptr [RSP + 0x18] MOV R12,qword ptr [RSP + 0x8] XOR R15D,R15D XOR EBP,EBP LAB_001751ec: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RBP MOV RDX,R13 CALL 0x00121922 MOV ECX,dword ptr [R14 + R15*0x8 + 0x4] MOV RDI,RBX MOV RSI,R12 MOV RDX,qword ptr [RSP + 0x10] MOV R8,R12 MOV R9,RDX PUSH 0x0 PUSH 0x0 CALL 0x00126fff ADD RSP,0x10 MOV RBP,RAX MOV R13,RDX CMP R13D,0x6 JZ 0x00175280 MOV ECX,dword ptr [R14 + R15*0x8 + 0x4] SUB RSP,0x8 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV R8,RBP MOV R9,R13 PUSH 0x44000 CALL 0x001752cb ADD RSP,0x10 TEST EAX,EAX JS 0x00175280 INC R15 CMP qword ptr [RSP + 0x20],R15 JNZ 0x001751ec LAB_00175262: XOR R14D,R14D JMP 0x00175286 LAB_00175267: LEA RSI,[0x1a5c4d] MOV RDI,RBX XOR EAX,EAX CALL 0x001265c3 MOV R14D,0xffffffff JMP 0x001752b9 LAB_00175280: MOV R14D,0xffffffff LAB_00175286: MOV RSI,qword ptr [RSP + 0x18] MOV EDX,dword ptr [RSP + 0x4] MOV RDI,RBX CALL 0x00127ed5 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x00121922 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RBP MOV RDX,R13 CALL 0x00121922 LAB_001752b9: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 JS_ObjectDefineProperties (long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5) { int8 uVar1; long lVar2; int iVar3; int8 uVar4; ulong uVar5; int1 auVar6 [16]; uint local_64; int1 local_60 [16]; long local_50; ulong local_48; int8 local_40; int8 local_38; local_40 = param_2; local_38 = param_3; if ((int)param_3 == -1) { local_60 = JS_ToObject(param_1,param_4,param_5); uVar4 = 0xffffffff; if (local_60._8_4_ != 6) { iVar3 = JS_GetOwnPropertyNamesInternal(param_1,&local_50,&local_64,local_60._0_8_,0x13); lVar2 = local_50; uVar1 = local_60._0_8_; uVar4 = 0xffffffff; auVar6 = ZEXT816(3) << 0x40; if (-1 < iVar3) { local_48 = (ulong)local_64; if (local_48 != 0) { uVar5 = 0; auVar6 = ZEXT816(3) << 0x40; do { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); auVar6 = JS_GetPropertyInternal2 (param_1,uVar1,local_60._8_8_,*(int4 *)(lVar2 + 4 + uVar5 * 8), uVar1,local_60._8_8_,0,0); if (auVar6._8_4_ == 6) { LAB_00175280: uVar4 = 0xffffffff; goto LAB_00175286; } iVar3 = JS_DefinePropertyDesc (param_1,local_40,local_38,*(int4 *)(lVar2 + 4 + uVar5 * 8), auVar6._0_8_,auVar6._8_8_,0x44000); if (iVar3 < 0) goto LAB_00175280; uVar5 = uVar5 + 1; } while (local_48 != uVar5); } uVar4 = 0; } LAB_00175286: js_free_prop_enum(param_1,local_50,local_64); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_60._0_8_,local_60._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar6._0_8_,auVar6._8_8_); } } else { JS_ThrowTypeError(param_1,"Object.defineProperties called on non-object"); uVar4 = 0xffffffff; } return uVar4; }
30,492
my_xml_parse
eloqsql/strings/xml.c
int my_xml_parse(MY_XML_PARSER *p,const char *str, size_t len) { my_xml_attr_rewind(p); p->beg=str; p->cur=str; p->end=str+len; while ( p->cur < p->end ) { MY_XML_ATTR a; if (p->cur[0] == '<') { int lex; int question=0; int exclam=0; lex=my_xml_scan(p,&a); if (MY_XML_COMMENT == lex) continue; if (lex == MY_XML_CDATA) { a.beg+= 9; a.end-= 3; my_xml_value(p, a.beg, (size_t) (a.end-a.beg)); continue; } lex=my_xml_scan(p,&a); if (MY_XML_SLASH == lex) { if (MY_XML_IDENT != (lex=my_xml_scan(p,&a))) { sprintf(p->errstr,"%s unexpected (ident wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; lex=my_xml_scan(p,&a); goto gt; } if (MY_XML_EXCLAM == lex) { lex=my_xml_scan(p,&a); exclam=1; } else if (MY_XML_QUESTION == lex) { lex=my_xml_scan(p,&a); question=1; } if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_TAG; if (MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or '/' wanted)", lex2str(lex)); return MY_XML_ERROR; } while ((MY_XML_IDENT == (lex=my_xml_scan(p,&a))) || ((MY_XML_STRING == lex && exclam))) { MY_XML_ATTR b; if (MY_XML_EQ == (lex=my_xml_scan(p,&b))) { lex=my_xml_scan(p,&b); if ( (lex == MY_XML_IDENT) || (lex == MY_XML_STRING) ) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_value(p,b.beg,(size_t) (b.end-b.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else { sprintf(p->errstr,"%s unexpected (ident or string wanted)", lex2str(lex)); return MY_XML_ERROR; } } else if (MY_XML_IDENT == lex) { p->current_node_type= MY_XML_NODE_ATTR; if ((MY_XML_OK != my_xml_enter(p,a.beg,(size_t) (a.end-a.beg))) || (MY_XML_OK != my_xml_leave(p,a.beg,(size_t) (a.end-a.beg)))) return MY_XML_ERROR; } else if ((MY_XML_STRING == lex) && exclam) { /* We are in <!DOCTYPE>, e.g. <!DOCTYPE name SYSTEM "SystemLiteral"> <!DOCTYPE name PUBLIC "PublidLiteral" "SystemLiteral"> Just skip "SystemLiteral" and "PublicidLiteral" */ } else break; } if (lex == MY_XML_SLASH) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } gt: if (question) { if (lex != MY_XML_QUESTION) { sprintf(p->errstr,"%s unexpected ('?' wanted)",lex2str(lex)); return MY_XML_ERROR; } if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; lex=my_xml_scan(p,&a); } if (exclam) { if (MY_XML_OK != my_xml_leave(p,NULL,0)) return MY_XML_ERROR; } if (lex != MY_XML_GT) { sprintf(p->errstr,"%s unexpected ('>' wanted)",lex2str(lex)); return MY_XML_ERROR; } } else { a.beg=p->cur; for ( ; (p->cur < p->end) && (p->cur[0] != '<') ; p->cur++); a.end=p->cur; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(&a); if (a.beg != a.end) { my_xml_value(p,a.beg,(size_t) (a.end-a.beg)); } } } if (p->attr.start[0]) { sprintf(p->errstr,"unexpected END-OF-INPUT"); return MY_XML_ERROR; } return MY_XML_OK; }
O3
c
my_xml_parse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x118(%rdi), %rcx movq %rcx, 0x120(%rdi) movq %rsi, 0x128(%rdi) movq %rsi, 0x130(%rdi) leaq (%rsi,%rdx), %rax movq %rax, 0x138(%rdi) testq %rdx, %rdx jle 0xdd539 leaq -0x40(%rbp), %r15 cmpb $0x3c, (%rsi) jne 0xdd27b movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 cmpl $0x43, %eax je 0xdd51b cmpl $0x44, %eax jne 0xdd2e0 movq 0x150(%rbx), %rax testq %rax, %rax je 0xdd51b movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx addq $0x9, %rsi subq %rsi, %rdx addq $-0x3, %rdx jmp 0xdd2d6 movq %rsi, -0x40(%rbp) movq %rsi, %rdx cmpq %rax, %rsi jae 0xdd2a1 subq %rsi, %rax movq %rsi, %rdx cmpb $0x3c, (%rdx) je 0xdd2a1 incq %rdx movq %rdx, 0x130(%rbx) decq %rax jne 0xdd28d movq %rdx, -0x38(%rbp) testb $0x2, (%rbx) jne 0xdd2ba movq %r15, %rdi callq 0xddc3b movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx cmpq %rdx, %rsi je 0xdd51b movq 0x150(%rbx), %rax testq %rax, %rax je 0xdd51b subq %rsi, %rdx movq %rbx, %rdi callq *%rax jmp 0xdd51b movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 cmpl $0x2f, %eax jne 0xdd332 movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 cmpl $0x49, %eax jne 0xdd599 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0xdd901 testl %eax, %eax jne 0xdd5eb movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 movl %eax, %r13d jmp 0xdd515 movl %eax, %r14d cmpl $0x21, %eax sete %r12b cmpl $0x3f, %eax je 0xdd347 cmpl $0x21, %r14d jne 0xdd354 movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 jmp 0xdd35a movb $0x1, %r12b movl %r14d, %eax cmpl $0x49, %eax jne 0xdd585 movl $0x0, 0x4(%rbx) movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq 0xddac4 testl %eax, %eax jne 0xdd5eb movb %r12b, -0x29(%rbp) movl %r14d, %r12d xorl $0x21, %r12d movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 movl %eax, %r13d xorl $0x53, %eax orl %r12d, %eax sete %al cmpl $0x49, %r13d je 0xdd3b5 testb %al, %al je 0xdd49e movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0xdd603 cmpl $0x49, %eax je 0xdd443 movl %eax, %r13d cmpl $0x3d, %eax jne 0xdd482 movq %rbx, %rdi leaq -0x50(%rbp), %rsi callq 0xdd603 cmpl $0x53, %eax je 0xdd3ec cmpl $0x49, %eax jne 0xdd5ad movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r13 movq -0x38(%rbp), %r15 subq %r13, %r15 movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx callq 0xddac4 testl %eax, %eax jne 0xdd5eb movq 0x150(%rbx), %rax testq %rax, %rax je 0xdd438 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdx subq %rsi, %rdx movq %rbx, %rdi callq *%rax testl %eax, %eax jne 0xdd5eb movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx jmp 0xdd474 movl $0x1, 0x4(%rbx) movq -0x40(%rbp), %r15 movq -0x38(%rbp), %r13 subq %r15, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0xddac4 testl %eax, %eax jne 0xdd5eb movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq 0xdd901 testl %eax, %eax je 0xdd48e jmp 0xdd5eb cmpl $0x21, %r14d jne 0xdd49a cmpl $0x53, %r13d jne 0xdd49a movq %rbx, %rdi leaq -0x40(%rbp), %r15 jmp 0xdd393 leaq -0x40(%rbp), %r15 cmpl $0x2f, %r13d movb -0x29(%rbp), %r12b jne 0xdd4ca movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xdd901 testl %eax, %eax jne 0xdd5eb movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 movl %eax, %r13d testb %r12b, %r12b jne 0xdd4fb cmpl $0x3f, %r13d jne 0xdd5c1 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xdd901 testl %eax, %eax jne 0xdd5eb movq %rbx, %rdi movq %r15, %rsi callq 0xdd603 movl %eax, %r13d cmpl $0x21, %r14d jne 0xdd515 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xdd901 testl %eax, %eax jne 0xdd5eb cmpl $0x3e, %r13d jne 0xdd570 movq 0x130(%rbx), %rsi movq 0x138(%rbx), %rax cmpq %rax, %rsi jb 0xdd234 movq 0x118(%rbx), %rcx cmpb $0x0, (%rcx) je 0xdd568 addq $0x8, %rbx leaq 0x212fd(%rip), %rcx # 0xfe846 movl $0x1, %r14d movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x39c50 jmp 0xdd5f1 xorl %r14d, %r14d jmp 0xdd5f1 addq $0x8, %rbx movl %r13d, %edi callq 0xdd866 leaq 0x212a8(%rip), %rcx # 0xfe82b jmp 0xdd5d4 addq $0x8, %rbx movl %eax, %edi callq 0xdd866 leaq 0x2122e(%rip), %rcx # 0xfe7c5 jmp 0xdd5d4 addq $0x8, %rbx movl %eax, %edi callq 0xdd866 leaq 0x211fd(%rip), %rcx # 0xfe7a8 jmp 0xdd5d4 addq $0x8, %rbx movl %eax, %edi callq 0xdd866 leaq 0x2122a(%rip), %rcx # 0xfe7e9 jmp 0xdd5d4 addq $0x8, %rbx movl %r13d, %edi callq 0xdd866 leaq 0x2123c(%rip), %rcx # 0xfe810 movl $0x80, %edx movq %rbx, %rdi movl $0x1, %esi movq %rax, %r8 xorl %eax, %eax callq 0x39c50 movl $0x1, %r14d movl %r14d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_xml_parse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov rcx, [rdi+118h] mov [rdi+120h], rcx mov [rdi+128h], rsi mov [rdi+130h], rsi lea rax, [rsi+rdx] mov [rdi+138h], rax test rdx, rdx jle loc_DD539 lea r15, [rbp+var_40] loc_DD234: cmp byte ptr [rsi], 3Ch ; '<' jnz short loc_DD27B mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 43h ; 'C' jz loc_DD51B cmp eax, 44h ; 'D' jnz loc_DD2E0 mov rax, [rbx+150h] test rax, rax jz loc_DD51B mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] add rsi, 9 sub rdx, rsi add rdx, 0FFFFFFFFFFFFFFFDh jmp short loc_DD2D6 loc_DD27B: mov [rbp+var_40], rsi mov rdx, rsi cmp rsi, rax jnb short loc_DD2A1 sub rax, rsi mov rdx, rsi loc_DD28D: cmp byte ptr [rdx], 3Ch ; '<' jz short loc_DD2A1 inc rdx mov [rbx+130h], rdx dec rax jnz short loc_DD28D loc_DD2A1: mov [rbp+var_38], rdx test byte ptr [rbx], 2 jnz short loc_DD2BA mov rdi, r15 call my_xml_norm_text mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] loc_DD2BA: cmp rsi, rdx jz loc_DD51B mov rax, [rbx+150h] test rax, rax jz loc_DD51B sub rdx, rsi loc_DD2D6: mov rdi, rbx call rax jmp loc_DD51B loc_DD2E0: mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 2Fh ; '/' jnz short loc_DD332 mov rdi, rbx mov rsi, r15 call my_xml_scan cmp eax, 49h ; 'I' jnz loc_DD599 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_leave test eax, eax jnz loc_DD5EB mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax jmp loc_DD515 loc_DD332: mov r14d, eax cmp eax, 21h ; '!' setz r12b cmp eax, 3Fh ; '?' jz short loc_DD347 cmp r14d, 21h ; '!' jnz short loc_DD354 loc_DD347: mov rdi, rbx mov rsi, r15 call my_xml_scan jmp short loc_DD35A loc_DD354: mov r12b, 1 mov eax, r14d loc_DD35A: cmp eax, 49h ; 'I' jnz loc_DD585 mov dword ptr [rbx+4], 0 mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] sub rdx, rsi mov rdi, rbx call my_xml_enter test eax, eax jnz loc_DD5EB mov [rbp+var_29], r12b mov r12d, r14d xor r12d, 21h mov rdi, rbx loc_DD393: mov rsi, r15 call my_xml_scan mov r13d, eax xor eax, 53h or eax, r12d setz al cmp r13d, 49h ; 'I' jz short loc_DD3B5 test al, al jz loc_DD49E loc_DD3B5: mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 49h ; 'I' jz short loc_DD443 mov r13d, eax cmp eax, 3Dh ; '=' jnz loc_DD482 mov rdi, rbx lea rsi, [rbp+var_50] call my_xml_scan cmp eax, 53h ; 'S' jz short loc_DD3EC cmp eax, 49h ; 'I' jnz loc_DD5AD loc_DD3EC: mov dword ptr [rbx+4], 1 mov r13, [rbp+var_40] mov r15, [rbp+var_38] sub r15, r13 mov rdi, rbx mov rsi, r13 mov rdx, r15 call my_xml_enter test eax, eax jnz loc_DD5EB mov rax, [rbx+150h] test rax, rax jz short loc_DD438 mov rsi, [rbp+var_50] mov rdx, [rbp+var_48] sub rdx, rsi mov rdi, rbx call rax test eax, eax jnz loc_DD5EB loc_DD438: mov rdi, rbx mov rsi, r13 mov rdx, r15 jmp short loc_DD474 loc_DD443: mov dword ptr [rbx+4], 1 mov r15, [rbp+var_40] mov r13, [rbp+var_38] sub r13, r15 mov rdi, rbx mov rsi, r15 mov rdx, r13 call my_xml_enter test eax, eax jnz loc_DD5EB mov rdi, rbx mov rsi, r15 mov rdx, r13 loc_DD474: call my_xml_leave test eax, eax jz short loc_DD48E jmp loc_DD5EB loc_DD482: cmp r14d, 21h ; '!' jnz short loc_DD49A cmp r13d, 53h ; 'S' jnz short loc_DD49A loc_DD48E: mov rdi, rbx lea r15, [rbp+var_40] jmp loc_DD393 loc_DD49A: lea r15, [rbp+var_40] loc_DD49E: cmp r13d, 2Fh ; '/' mov r12b, [rbp+var_29] jnz short loc_DD4CA mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_DD5EB mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_DD4CA: test r12b, r12b jnz short loc_DD4FB cmp r13d, 3Fh ; '?' jnz loc_DD5C1 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_DD5EB mov rdi, rbx mov rsi, r15 call my_xml_scan mov r13d, eax loc_DD4FB: cmp r14d, 21h ; '!' jnz short loc_DD515 mov rdi, rbx xor esi, esi xor edx, edx call my_xml_leave test eax, eax jnz loc_DD5EB loc_DD515: cmp r13d, 3Eh ; '>' jnz short loc_DD570 loc_DD51B: mov rsi, [rbx+130h] mov rax, [rbx+138h] cmp rsi, rax jb loc_DD234 mov rcx, [rbx+118h] loc_DD539: cmp byte ptr [rcx], 0 jz short loc_DD568 add rbx, 8 lea rcx, aUnexpectedEndO; "unexpected END-OF-INPUT" mov r14d, 1 mov edx, 80h mov rdi, rbx mov esi, 1 xor eax, eax call ___sprintf_chk jmp loc_DD5F1 loc_DD568: xor r14d, r14d jmp loc_DD5F1 loc_DD570: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan; "%s unexpected ('>' wanted)" jmp short loc_DD5D4 loc_DD585: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde; "%s unexpected (ident or '/' wanted)" jmp short loc_DD5D4 loc_DD599: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_0; "%s unexpected (ident wanted)" jmp short loc_DD5D4 loc_DD5AD: add rbx, 8 mov edi, eax call lex2str lea rcx, aSUnexpectedIde_1; "%s unexpected (ident or string wanted)" jmp short loc_DD5D4 loc_DD5C1: add rbx, 8 mov edi, r13d call lex2str lea rcx, aSUnexpectedWan_0; "%s unexpected ('?' wanted)" loc_DD5D4: mov edx, 80h mov rdi, rbx mov esi, 1 mov r8, rax xor eax, eax call ___sprintf_chk loc_DD5EB: mov r14d, 1 loc_DD5F1: mov eax, r14d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_xml_parse(long long a1, _BYTE *a2, long long a3) { _BYTE *v4; // rcx _BYTE *v5; // rax int v6; // eax void ( *v7)(long long, _BYTE *, long long); // rax long long v8; // rdx _BYTE *v9; // rdx long long v10; // rax unsigned int v11; // eax unsigned int v12; // eax unsigned int v13; // r13d unsigned int v14; // r14d bool v15; // r12 long long i; // rdi unsigned int v17; // eax unsigned int v18; // eax _BYTE *v19; // r13 long long v20; // r15 unsigned int ( *v21)(long long, _QWORD, _QWORD); // rax long long v22; // rdi _BYTE *v23; // rsi long long v24; // rdx _BYTE *v25; // r15 long long v26; // r13 bool v27; // r12 unsigned int v28; // r14d long long v29; // rax long long v30; // rax long long v31; // rax long long v32; // rax long long v33; // rax _QWORD v35[2]; // [rsp+0h] [rbp-50h] BYREF _BYTE *v36; // [rsp+10h] [rbp-40h] BYREF _BYTE *v37; // [rsp+18h] [rbp-38h] bool v38; // [rsp+27h] [rbp-29h] v4 = *(_BYTE **)(a1 + 280); *(_QWORD *)(a1 + 288) = v4; *(_QWORD *)(a1 + 296) = a2; *(_QWORD *)(a1 + 304) = a2; v5 = &a2[a3]; *(_QWORD *)(a1 + 312) = &a2[a3]; if ( a3 <= 0 ) goto LABEL_57; while ( *a2 != 60 ) { v36 = a2; v9 = a2; if ( a2 < v5 ) { v10 = v5 - a2; v9 = a2; do { if ( *v9 == 60 ) break; *(_QWORD *)(a1 + 304) = ++v9; --v10; } while ( v10 ); } v37 = v9; if ( (*(_BYTE *)a1 & 2) == 0 ) { my_xml_norm_text(&v36); a2 = v36; v9 = v37; } if ( a2 != v9 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( v7 ) { v8 = v9 - a2; LABEL_16: v7(a1, a2, v8); } } LABEL_55: a2 = *(_BYTE **)(a1 + 304); v5 = *(_BYTE **)(a1 + 312); if ( a2 >= v5 ) { v4 = *(_BYTE **)(a1 + 280); LABEL_57: if ( *v4 ) { v28 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "unexpected END-OF-INPUT"); } else { return 0; } return v28; } } v6 = my_xml_scan(a1, &v36); if ( v6 == 67 ) goto LABEL_55; if ( v6 == 68 ) { v7 = *(void ( **)(long long, _BYTE *, long long))(a1 + 336); if ( !v7 ) goto LABEL_55; a2 = v36 + 9; v8 = v37 - (v36 + 9) - 3; goto LABEL_16; } v11 = my_xml_scan(a1, &v36); if ( v11 == 47 ) { v12 = my_xml_scan(a1, &v36); if ( v12 == 73 ) { if ( !(unsigned int)my_xml_leave(a1, v36, v37 - v36) ) { v13 = my_xml_scan(a1, &v36); goto LABEL_54; } } else { v31 = lex2str(v12); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident wanted)", v31); } return 1; } v14 = v11; v15 = v11 == 33; if ( v11 == 63 || v11 == 33 ) v11 = my_xml_scan(a1, &v36); else v15 = 1; if ( v11 != 73 ) { v30 = lex2str(v11); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or '/' wanted)", v30); return 1; } *(_DWORD *)(a1 + 4) = 0; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v38 = v15; for ( i = a1; ; i = a1 ) { v13 = my_xml_scan(i, &v36); if ( v13 != 73 ) { if ( v14 ^ 0x21 | v13 ^ 0x53 ) break; } v17 = my_xml_scan(a1, v35); if ( v17 == 73 ) { *(_DWORD *)(a1 + 4) = 1; v25 = v36; v26 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v22 = a1; v23 = v25; v24 = v26; LABEL_40: if ( (unsigned int)my_xml_leave(v22, v23, v24) ) return 1; continue; } v13 = v17; if ( v17 == 61 ) { v18 = my_xml_scan(a1, v35); if ( v18 != 83 && v18 != 73 ) { v32 = lex2str(v18); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected (ident or string wanted)", v32); return 1; } *(_DWORD *)(a1 + 4) = 1; v19 = v36; v20 = v37 - v36; if ( (unsigned int)my_xml_enter(a1, v36, v37 - v36) ) return 1; v21 = *(unsigned int ( **)(long long, _QWORD, _QWORD))(a1 + 336); if ( v21 ) { if ( v21(a1, v35[0], v35[1] - v35[0]) ) return 1; } v22 = a1; v23 = v19; v24 = v20; goto LABEL_40; } if ( v14 != 33 || v17 != 83 ) break; } v27 = v38; if ( v13 == 47 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); } if ( v27 ) goto LABEL_52; if ( v13 == 63 ) { if ( (unsigned int)my_xml_leave(a1, 0LL, 0LL) ) return 1; v13 = my_xml_scan(a1, &v36); LABEL_52: if ( v14 != 33 || !(unsigned int)my_xml_leave(a1, 0LL, 0LL) ) { LABEL_54: if ( v13 == 62 ) goto LABEL_55; v29 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('>' wanted)", v29); } } else { v33 = lex2str(v13); __sprintf_chk(a1 + 8, 1LL, 128LL, "%s unexpected ('?' wanted)", v33); } return 1; }
my_xml_parse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x118] MOV qword ptr [RDI + 0x120],RCX MOV qword ptr [RDI + 0x128],RSI MOV qword ptr [RDI + 0x130],RSI LEA RAX,[RSI + RDX*0x1] MOV qword ptr [RDI + 0x138],RAX TEST RDX,RDX JLE 0x001dd539 LEA R15,[RBP + -0x40] LAB_001dd234: CMP byte ptr [RSI],0x3c JNZ 0x001dd27b MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 CMP EAX,0x43 JZ 0x001dd51b CMP EAX,0x44 JNZ 0x001dd2e0 MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001dd51b MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] ADD RSI,0x9 SUB RDX,RSI ADD RDX,-0x3 JMP 0x001dd2d6 LAB_001dd27b: MOV qword ptr [RBP + -0x40],RSI MOV RDX,RSI CMP RSI,RAX JNC 0x001dd2a1 SUB RAX,RSI MOV RDX,RSI LAB_001dd28d: CMP byte ptr [RDX],0x3c JZ 0x001dd2a1 INC RDX MOV qword ptr [RBX + 0x130],RDX DEC RAX JNZ 0x001dd28d LAB_001dd2a1: MOV qword ptr [RBP + -0x38],RDX TEST byte ptr [RBX],0x2 JNZ 0x001dd2ba MOV RDI,R15 CALL 0x001ddc3b MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] LAB_001dd2ba: CMP RSI,RDX JZ 0x001dd51b MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001dd51b SUB RDX,RSI LAB_001dd2d6: MOV RDI,RBX CALL RAX JMP 0x001dd51b LAB_001dd2e0: MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 CMP EAX,0x2f JNZ 0x001dd332 MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 CMP EAX,0x49 JNZ 0x001dd599 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x001dd901 TEST EAX,EAX JNZ 0x001dd5eb MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 MOV R13D,EAX JMP 0x001dd515 LAB_001dd332: MOV R14D,EAX CMP EAX,0x21 SETZ R12B CMP EAX,0x3f JZ 0x001dd347 CMP R14D,0x21 JNZ 0x001dd354 LAB_001dd347: MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 JMP 0x001dd35a LAB_001dd354: MOV R12B,0x1 MOV EAX,R14D LAB_001dd35a: CMP EAX,0x49 JNZ 0x001dd585 MOV dword ptr [RBX + 0x4],0x0 MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] SUB RDX,RSI MOV RDI,RBX CALL 0x001ddac4 TEST EAX,EAX JNZ 0x001dd5eb MOV byte ptr [RBP + -0x29],R12B MOV R12D,R14D XOR R12D,0x21 MOV RDI,RBX LAB_001dd393: MOV RSI,R15 CALL 0x001dd603 MOV R13D,EAX XOR EAX,0x53 OR EAX,R12D SETZ AL CMP R13D,0x49 JZ 0x001dd3b5 TEST AL,AL JZ 0x001dd49e LAB_001dd3b5: MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x001dd603 CMP EAX,0x49 JZ 0x001dd443 MOV R13D,EAX CMP EAX,0x3d JNZ 0x001dd482 MOV RDI,RBX LEA RSI,[RBP + -0x50] CALL 0x001dd603 CMP EAX,0x53 JZ 0x001dd3ec CMP EAX,0x49 JNZ 0x001dd5ad LAB_001dd3ec: MOV dword ptr [RBX + 0x4],0x1 MOV R13,qword ptr [RBP + -0x40] MOV R15,qword ptr [RBP + -0x38] SUB R15,R13 MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 CALL 0x001ddac4 TEST EAX,EAX JNZ 0x001dd5eb MOV RAX,qword ptr [RBX + 0x150] TEST RAX,RAX JZ 0x001dd438 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] SUB RDX,RSI MOV RDI,RBX CALL RAX TEST EAX,EAX JNZ 0x001dd5eb LAB_001dd438: MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 JMP 0x001dd474 LAB_001dd443: MOV dword ptr [RBX + 0x4],0x1 MOV R15,qword ptr [RBP + -0x40] MOV R13,qword ptr [RBP + -0x38] SUB R13,R15 MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL 0x001ddac4 TEST EAX,EAX JNZ 0x001dd5eb MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 LAB_001dd474: CALL 0x001dd901 TEST EAX,EAX JZ 0x001dd48e JMP 0x001dd5eb LAB_001dd482: CMP R14D,0x21 JNZ 0x001dd49a CMP R13D,0x53 JNZ 0x001dd49a LAB_001dd48e: MOV RDI,RBX LEA R15,[RBP + -0x40] JMP 0x001dd393 LAB_001dd49a: LEA R15,[RBP + -0x40] LAB_001dd49e: CMP R13D,0x2f MOV R12B,byte ptr [RBP + -0x29] JNZ 0x001dd4ca MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x001dd901 TEST EAX,EAX JNZ 0x001dd5eb MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 MOV R13D,EAX LAB_001dd4ca: TEST R12B,R12B JNZ 0x001dd4fb CMP R13D,0x3f JNZ 0x001dd5c1 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x001dd901 TEST EAX,EAX JNZ 0x001dd5eb MOV RDI,RBX MOV RSI,R15 CALL 0x001dd603 MOV R13D,EAX LAB_001dd4fb: CMP R14D,0x21 JNZ 0x001dd515 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x001dd901 TEST EAX,EAX JNZ 0x001dd5eb LAB_001dd515: CMP R13D,0x3e JNZ 0x001dd570 LAB_001dd51b: MOV RSI,qword ptr [RBX + 0x130] MOV RAX,qword ptr [RBX + 0x138] CMP RSI,RAX JC 0x001dd234 MOV RCX,qword ptr [RBX + 0x118] LAB_001dd539: CMP byte ptr [RCX],0x0 JZ 0x001dd568 ADD RBX,0x8 LEA RCX,[0x1fe846] MOV R14D,0x1 MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 XOR EAX,EAX CALL 0x00139c50 JMP 0x001dd5f1 LAB_001dd568: XOR R14D,R14D JMP 0x001dd5f1 LAB_001dd570: ADD RBX,0x8 MOV EDI,R13D CALL 0x001dd866 LEA RCX,[0x1fe82b] JMP 0x001dd5d4 LAB_001dd585: ADD RBX,0x8 MOV EDI,EAX CALL 0x001dd866 LEA RCX,[0x1fe7c5] JMP 0x001dd5d4 LAB_001dd599: ADD RBX,0x8 MOV EDI,EAX CALL 0x001dd866 LEA RCX,[0x1fe7a8] JMP 0x001dd5d4 LAB_001dd5ad: ADD RBX,0x8 MOV EDI,EAX CALL 0x001dd866 LEA RCX,[0x1fe7e9] JMP 0x001dd5d4 LAB_001dd5c1: ADD RBX,0x8 MOV EDI,R13D CALL 0x001dd866 LEA RCX,[0x1fe810] LAB_001dd5d4: MOV EDX,0x80 MOV RDI,RBX MOV ESI,0x1 MOV R8,RAX XOR EAX,EAX CALL 0x00139c50 LAB_001dd5eb: MOV R14D,0x1 LAB_001dd5f1: MOV EAX,R14D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Type propagation algorithm not settling */ bool my_xml_parse(byte *param_1,char *param_2,long param_3) { char cVar1; int iVar2; int iVar3; code *pcVar4; int8 uVar5; char *pcVar6; char *pcVar7; long lVar8; bool bVar9; long local_58; long local_50; char *local_48; char *local_40; char local_31; pcVar7 = *(char **)(param_1 + 0x118); *(char **)(param_1 + 0x120) = pcVar7; *(char **)(param_1 + 0x128) = param_2; *(char **)(param_1 + 0x130) = param_2; pcVar6 = param_2 + param_3; *(char **)(param_1 + 0x138) = pcVar6; if (0 < param_3) { do { if (*param_2 == '<') { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x43) { if (iVar2 == 0x44) { pcVar4 = *(code **)(param_1 + 0x150); if (pcVar4 != (code *)0x0) { pcVar7 = local_40 + (-3 - (long)(local_48 + 9)); pcVar6 = local_48 + 9; goto LAB_001dd2d6; } } else { iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x2f) { bVar9 = iVar2 == 0x21; if ((iVar2 == 0x3f) || (iVar2 == 0x21)) { iVar3 = my_xml_scan(param_1,&local_48); } else { bVar9 = true; iVar3 = iVar2; } if (iVar3 == 0x49) { param_1[4] = 0; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; iVar3 = my_xml_enter(param_1,local_48,(long)local_40 - (long)local_48); local_31 = bVar9; do { if (iVar3 != 0) { return true; } LAB_001dd393: iVar3 = my_xml_scan(param_1,&local_48); if ((iVar3 != 0x49) && (iVar3 != 0x53 || iVar2 != 0x21)) goto LAB_001dd49e; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if (iVar3 == 0x49) { param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); goto joined_r0x001dd465; } if (iVar3 != 0x3d) goto LAB_001dd482; iVar3 = my_xml_scan(param_1,&local_58); pcVar6 = local_48; if ((iVar3 != 0x53) && (iVar3 != 0x49)) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or string wanted)"; goto LAB_001dd5d4; } param_1[4] = 1; param_1[5] = 0; param_1[6] = 0; param_1[7] = 0; lVar8 = (long)local_40 - (long)local_48; iVar3 = my_xml_enter(param_1,local_48,lVar8); if (iVar3 != 0) { return true; } if (*(code **)(param_1 + 0x150) != (code *)0x0) { iVar3 = (**(code **)(param_1 + 0x150))(param_1,local_58,local_50 - local_58); joined_r0x001dd465: if (iVar3 != 0) { return true; } } iVar3 = my_xml_leave(param_1,pcVar6,lVar8); } while( true ); } uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (ident or \'/\' wanted)"; LAB_001dd5d4: __sprintf_chk(param_1 + 8,1,0x80,pcVar6,uVar5); return true; } iVar2 = my_xml_scan(param_1,&local_48); if (iVar2 != 0x49) { uVar5 = lex2str(iVar2); pcVar6 = "%s unexpected (ident wanted)"; goto LAB_001dd5d4; } iVar2 = my_xml_leave(param_1,local_48,(long)local_40 - (long)local_48); if (iVar2 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); LAB_001dd515: if (iVar3 != 0x3e) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'>\' wanted)"; goto LAB_001dd5d4; } } } } else { local_40 = param_2; if (param_2 < pcVar6) { lVar8 = (long)pcVar6 - (long)param_2; do { if (*local_40 == '<') break; local_40 = local_40 + 1; *(char **)(param_1 + 0x130) = local_40; lVar8 = lVar8 + -1; } while (lVar8 != 0); } local_48 = param_2; if ((*param_1 & 2) == 0) { my_xml_norm_text(&local_48); } if ((local_48 != local_40) && (pcVar4 = *(code **)(param_1 + 0x150), pcVar4 != (code *)0x0)) { pcVar7 = local_40 + -(long)local_48; pcVar6 = local_48; LAB_001dd2d6: (*pcVar4)(param_1,pcVar6,pcVar7); } } param_2 = *(char **)(param_1 + 0x130); pcVar6 = *(char **)(param_1 + 0x138); } while (param_2 < pcVar6); pcVar7 = *(char **)(param_1 + 0x118); } cVar1 = *pcVar7; if (cVar1 != '\0') { __sprintf_chk(param_1 + 8,1,0x80,"unexpected END-OF-INPUT"); } return cVar1 != '\0'; LAB_001dd482: if ((iVar2 != 0x21) || (iVar3 != 0x53)) { LAB_001dd49e: cVar1 = local_31; if (iVar3 == 0x2f) { iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if (cVar1 == '\0') { if (iVar3 != 0x3f) { uVar5 = lex2str(iVar3); pcVar6 = "%s unexpected (\'?\' wanted)"; goto LAB_001dd5d4; } iVar3 = my_xml_leave(param_1,0,0); if (iVar3 != 0) { return true; } iVar3 = my_xml_scan(param_1,&local_48); } if ((iVar2 == 0x21) && (iVar2 = my_xml_leave(param_1,0,0), iVar2 != 0)) { return true; } goto LAB_001dd515; } goto LAB_001dd393; }
30,493
pop_scope
bluesky950520[P]quickjs/quickjs.c
static void pop_scope(JSParseState *s) { if (s->cur_func) { /* disable scoped variables */ JSFunctionDef *fd = s->cur_func; int scope = fd->scope_level; emit_op(s, OP_leave_scope); emit_u16(s, scope); fd->scope_level = fd->scopes[scope].parent; fd->scope_first = get_first_lexical_var(fd, fd->scope_level); } }
O1
c
pop_scope: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq 0x90(%rdi), %r15 testq %r15, %r15 je 0x6a660 movq %rdi, %rbx movslq 0xe8(%r15), %r12 movl $0x138, %r14d # imm = 0x138 leaq (%r15,%r14), %rdi movl 0x140(%r15), %eax movl %eax, 0x168(%r15) movl $0xb4, %esi callq 0x1b4d0 addq 0x90(%rbx), %r14 leaq 0x6(%rsp), %rsi movw %r12w, (%rsi) movl $0x2, %edx movq %r14, %rdi callq 0x1b422 movq 0xf8(%r15), %rax movl (%rax,%r12,8), %ecx movl %ecx, 0xe8(%r15) testl %ecx, %ecx js 0x6a654 movl %ecx, %r8d movl 0x4(%rax,%r8,8), %edi movl %edi, %esi testl %edi, %edi jns 0x6a64c movl (%rax,%r8,8), %ecx movl %edx, %esi movl %esi, %edx testl %edi, %edi js 0x6a634 jmp 0x6a659 movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %esi, 0xec(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
pop_scope: push r15 push r14 push r12 push rbx push rax mov r15, [rdi+90h] test r15, r15 jz loc_6A660 mov rbx, rdi movsxd r12, dword ptr [r15+0E8h] mov r14d, 138h lea rdi, [r15+r14] mov eax, [r15+140h] mov [r15+168h], eax mov esi, 0B4h call dbuf_putc add r14, [rbx+90h] lea rsi, [rsp+28h+var_22] mov [rsi], r12w mov edx, 2 mov rdi, r14 call dbuf_put mov rax, [r15+0F8h] mov ecx, [rax+r12*8] mov [r15+0E8h], ecx loc_6A634: test ecx, ecx js short loc_6A654 mov r8d, ecx mov edi, [rax+r8*8+4] mov esi, edi test edi, edi jns short loc_6A64C mov ecx, [rax+r8*8] mov esi, edx loc_6A64C: mov edx, esi test edi, edi js short loc_6A634 jmp short loc_6A659 loc_6A654: mov esi, 0FFFFFFFFh loc_6A659: mov [r15+0ECh], esi loc_6A660: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long pop_scope(long long a1) { long long result; // rax long long v2; // r15 long long v3; // r12 _QWORD *v4; // r14 int v5; // edx int v6; // ecx int v7; // edi int v8; // esi _WORD v9[17]; // [rsp+0h] [rbp-22h] BYREF v9[0] = HIWORD(result); v2 = *(_QWORD *)(a1 + 144); if ( v2 ) { v3 = *(int *)(v2 + 232); *(_DWORD *)(v2 + 360) = *(_DWORD *)(v2 + 320); dbuf_putc((_QWORD *)(v2 + 312), 180); v4 = (_QWORD *)(*(_QWORD *)(a1 + 144) + 312LL); v9[0] = v3; dbuf_put(v4, (long long)v9, 2LL); result = *(_QWORD *)(v2 + 248); v6 = *(_DWORD *)(result + 8 * v3); *(_DWORD *)(v2 + 232) = v6; while ( v6 >= 0 ) { v7 = *(_DWORD *)(result + 8LL * (unsigned int)v6 + 4); v8 = v7; if ( v7 < 0 ) { v6 = *(_DWORD *)(result + 8LL * (unsigned int)v6); v8 = v5; } v5 = v8; if ( v7 >= 0 ) goto LABEL_9; } v8 = -1; LABEL_9: *(_DWORD *)(v2 + 236) = v8; } return result; }
30,494
pop_scope
bluesky950520[P]quickjs/quickjs.c
static void pop_scope(JSParseState *s) { if (s->cur_func) { /* disable scoped variables */ JSFunctionDef *fd = s->cur_func; int scope = fd->scope_level; emit_op(s, OP_leave_scope); emit_u16(s, scope); fd->scope_level = fd->scopes[scope].parent; fd->scope_first = get_first_lexical_var(fd, fd->scope_level); } }
O2
c
pop_scope: pushq %r15 pushq %r14 pushq %rbx movq 0x90(%rdi), %r14 testq %r14, %r14 je 0x5a165 movq %rdi, %rbx movslq 0xe8(%r14), %r15 movl $0xb4, %esi callq 0x4fa1b movzwl %r15w, %esi movq %rbx, %rdi callq 0x4fa3a movq 0xf8(%r14), %rax movl (%rax,%r15,8), %edx movl %edx, 0xe8(%r14) pushq $-0x1 popq %rcx testl %edx, %edx js 0x5a15c movl %edx, %esi movl 0x4(%rax,%rsi,8), %edx testl %edx, %edx jns 0x5a15e movl (%rax,%rsi,8), %edx jmp 0x5a149 movl %ecx, %edx movl %edx, 0xec(%r14) popq %rbx popq %r14 popq %r15 retq
pop_scope: push r15 push r14 push rbx mov r14, [rdi+90h] test r14, r14 jz short loc_5A165 mov rbx, rdi movsxd r15, dword ptr [r14+0E8h] mov esi, 0B4h call emit_op movzx esi, r15w mov rdi, rbx call emit_u16 mov rax, [r14+0F8h] mov edx, [rax+r15*8] mov [r14+0E8h], edx push 0FFFFFFFFFFFFFFFFh pop rcx loc_5A149: test edx, edx js short loc_5A15C mov esi, edx mov edx, [rax+rsi*8+4] test edx, edx jns short loc_5A15E mov edx, [rax+rsi*8] jmp short loc_5A149 loc_5A15C: mov edx, ecx loc_5A15E: mov [r14+0ECh], edx loc_5A165: pop rbx pop r14 pop r15 retn
void pop_scope(long long a1) { long long v1; // r14 long long v2; // r15 long long v3; // rax int v4; // edx long long v5; // rsi int v6; // edx v1 = *(_QWORD *)(a1 + 144); if ( v1 ) { v2 = *(int *)(v1 + 232); emit_op(a1, 180); emit_u16(a1, v2); v3 = *(_QWORD *)(v1 + 248); v4 = *(_DWORD *)(v3 + 8 * v2); *(_DWORD *)(v1 + 232) = v4; while ( v4 >= 0 ) { v5 = (unsigned int)v4; v6 = *(_DWORD *)(v3 + 8LL * (unsigned int)v4 + 4); if ( v6 >= 0 ) goto LABEL_7; v4 = *(_DWORD *)(v3 + 8 * v5); } v6 = -1; LABEL_7: *(_DWORD *)(v1 + 236) = v6; } }
pop_scope: PUSH R15 PUSH R14 PUSH RBX MOV R14,qword ptr [RDI + 0x90] TEST R14,R14 JZ 0x0015a165 MOV RBX,RDI MOVSXD R15,dword ptr [R14 + 0xe8] MOV ESI,0xb4 CALL 0x0014fa1b MOVZX ESI,R15W MOV RDI,RBX CALL 0x0014fa3a MOV RAX,qword ptr [R14 + 0xf8] MOV EDX,dword ptr [RAX + R15*0x8] MOV dword ptr [R14 + 0xe8],EDX PUSH -0x1 POP RCX LAB_0015a149: TEST EDX,EDX JS 0x0015a15c MOV ESI,EDX MOV EDX,dword ptr [RAX + RSI*0x8 + 0x4] TEST EDX,EDX JNS 0x0015a15e MOV EDX,dword ptr [RAX + RSI*0x8] JMP 0x0015a149 LAB_0015a15c: MOV EDX,ECX LAB_0015a15e: MOV dword ptr [R14 + 0xec],EDX LAB_0015a165: POP RBX POP R14 POP R15 RET
void pop_scope(long param_1) { long lVar1; long lVar2; int iVar3; uint uVar4; lVar1 = *(long *)(param_1 + 0x90); if (lVar1 != 0) { iVar3 = *(int *)(lVar1 + 0xe8); emit_op(param_1,0xb4); emit_u16(param_1,(long)iVar3 & 0xffff); lVar2 = *(long *)(lVar1 + 0xf8); uVar4 = *(uint *)(lVar2 + (long)iVar3 * 8); *(uint *)(lVar1 + 0xe8) = uVar4; for (; -1 < (int)uVar4; uVar4 = *(uint *)(lVar2 + (ulong)uVar4 * 8)) { iVar3 = *(int *)(lVar2 + 4 + (ulong)uVar4 * 8); if (-1 < iVar3) goto LAB_0015a15e; } iVar3 = -1; LAB_0015a15e: *(int *)(lVar1 + 0xec) = iVar3; } return; }
30,495
stbi__pnm_getinteger(stbi__context*, char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); if((value > 214748364) || (value == 214748364 && *c > '7')) return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; }
O0
c
stbi__pnm_getinteger(stbi__context*, char*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl $0x0, 0xc(%rsp) movq 0x18(%rsp), %rdi callq 0x1e690 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, 0xb(%rsp) jne 0x2b1c4 movq 0x10(%rsp), %rax movsbl (%rax), %edi callq 0x2b2b0 cmpl $0x0, %eax setne %al movb %al, 0xb(%rsp) movb 0xb(%rsp), %al testb $0x1, %al jne 0x2b1ce jmp 0x2b22f imull $0xa, 0xc(%rsp), %eax movq 0x10(%rsp), %rcx movsbl (%rcx), %ecx subl $0x30, %ecx addl %ecx, %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rdi callq 0x17f50 movb %al, %cl movq 0x10(%rsp), %rax movb %cl, (%rax) cmpl $0xccccccc, 0xc(%rsp) # imm = 0xCCCCCCC jg 0x2b218 cmpl $0xccccccc, 0xc(%rsp) # imm = 0xCCCCCCC jne 0x2b22a movq 0x10(%rsp), %rax movsbl (%rax), %eax cmpl $0x37, %eax jle 0x2b22a leaq 0x153c82(%rip), %rdi # 0x17eea1 callq 0xddd0 movl %eax, 0x24(%rsp) jmp 0x2b237 jmp 0x2b196 movl 0xc(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq
_ZL20stbi__pnm_getintegerP13stbi__contextPc: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], 0 loc_2B196: mov rdi, [rsp+28h+var_10] call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) mov ecx, eax xor eax, eax cmp ecx, 0 mov [rsp+28h+var_1D], al jnz short loc_2B1C4 mov rax, [rsp+28h+var_18] movsx edi, byte ptr [rax]; char call _ZL17stbi__pnm_isdigitc; stbi__pnm_isdigit(char) cmp eax, 0 setnz al mov [rsp+28h+var_1D], al loc_2B1C4: mov al, [rsp+28h+var_1D] test al, 1 jnz short loc_2B1CE jmp short loc_2B22F loc_2B1CE: imul eax, [rsp+28h+var_1C], 0Ah mov rcx, [rsp+28h+var_18] movsx ecx, byte ptr [rcx] sub ecx, 30h ; '0' add eax, ecx mov [rsp+28h+var_1C], eax mov rdi, [rsp+28h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov cl, al mov rax, [rsp+28h+var_18] mov [rax], cl cmp [rsp+28h+var_1C], 0CCCCCCCh jg short loc_2B218 cmp [rsp+28h+var_1C], 0CCCCCCCh jnz short loc_2B22A mov rax, [rsp+28h+var_18] movsx eax, byte ptr [rax] cmp eax, 37h ; '7' jle short loc_2B22A loc_2B218: lea rdi, aIntegerParseOv; "integer parse overflow" call _ZL9stbi__errPKc; stbi__err(char const*) mov [rsp+28h+var_4], eax jmp short loc_2B237 loc_2B22A: jmp loc_2B196 loc_2B22F: mov eax, [rsp+28h+var_1C] mov [rsp+28h+var_4], eax loc_2B237: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long stbi__pnm_getinteger(long long a1, char *a2) { bool v3; // [rsp+Bh] [rbp-1Dh] int v4; // [rsp+Ch] [rbp-1Ch] v4 = 0; while ( 1 ) { v3 = 0; if ( !stbi__at_eof(a1) ) v3 = (unsigned int)stbi__pnm_isdigit(*a2) != 0; if ( !v3 ) break; v4 = *a2 - 48 + 10 * v4; *a2 = stbi__get8(a1); if ( v4 > 214748364 || v4 == 214748364 && *a2 > 55 ) return (unsigned int)stbi__err("integer parse overflow"); } return (unsigned int)v4; }
stbi__pnm_getinteger: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],0x0 LAB_0012b196: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0011e690 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RSP + 0xb],AL JNZ 0x0012b1c4 MOV RAX,qword ptr [RSP + 0x10] MOVSX EDI,byte ptr [RAX] CALL 0x0012b2b0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0xb],AL LAB_0012b1c4: MOV AL,byte ptr [RSP + 0xb] TEST AL,0x1 JNZ 0x0012b1ce JMP 0x0012b22f LAB_0012b1ce: IMUL EAX,dword ptr [RSP + 0xc],0xa MOV RCX,qword ptr [RSP + 0x10] MOVSX ECX,byte ptr [RCX] SUB ECX,0x30 ADD EAX,ECX MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x00117f50 MOV CL,AL MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RAX],CL CMP dword ptr [RSP + 0xc],0xccccccc JG 0x0012b218 CMP dword ptr [RSP + 0xc],0xccccccc JNZ 0x0012b22a MOV RAX,qword ptr [RSP + 0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x37 JLE 0x0012b22a LAB_0012b218: LEA RDI,[0x27eea1] CALL 0x0010ddd0 MOV dword ptr [RSP + 0x24],EAX JMP 0x0012b237 LAB_0012b22a: JMP 0x0012b196 LAB_0012b22f: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x24],EAX LAB_0012b237: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* stbi__pnm_getinteger(stbi__context*, char*) */ int stbi__pnm_getinteger(stbi__context *param_1,char *param_2) { char cVar1; int iVar2; bool bVar3; int local_1c; local_1c = 0; while( true ) { iVar2 = stbi__at_eof(param_1); bVar3 = false; if (iVar2 == 0) { iVar2 = stbi__pnm_isdigit(*param_2); bVar3 = iVar2 != 0; } if (!bVar3) break; local_1c = local_1c * 10 + *param_2 + -0x30; cVar1 = stbi__get8(param_1); *param_2 = cVar1; if ((0xccccccc < local_1c) || ((local_1c == 0xccccccc && ('7' < *param_2)))) { iVar2 = stbi__err("integer parse overflow"); return iVar2; } } return local_1c; }
30,496
stbi__pnm_getinteger(stbi__context*, char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static int stbi__pnm_getinteger(stbi__context *s, char *c) { int value = 0; while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { value = value*10 + (*c - '0'); *c = (char) stbi__get8(s); if((value > 214748364) || (value == 214748364 && *c > '7')) return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); } return value; }
O1
c
stbi__pnm_getinteger(stbi__context*, char*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %r15 xorl %ebx, %ebx cmpq $0x0, 0x10(%r15) je 0x2d929 movq 0x28(%r15), %rdi callq *0x20(%r15) testl %eax, %eax je 0x2d939 cmpl $0x0, 0x30(%r15) je 0x2d9b4 movq 0xc0(%r15), %rax cmpq 0xc8(%r15), %rax jae 0x2d9b4 movzbl (%r14), %r12d leal -0x3a(%r12), %eax cmpb $-0xa, %al jb 0x2d9b4 movq 0xc0(%r15), %rax cmpq 0xc8(%r15), %rax jb 0x2d96c cmpl $0x0, 0x30(%r15) je 0x2d99e movq %r15, %rdi callq 0x2696c movq 0xc0(%r15), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r15) movb (%rax), %al leal (%rbx,%rbx,4), %ecx leal (%r12,%rcx,2), %ebx addl $-0x30, %ebx movb %al, (%r14) cmpl $0xccccccc, %ebx # imm = 0xCCCCCCC jg 0x2d9a2 jne 0x2d90b cmpb $0x38, %al jl 0x2d90b jmp 0x2d9a2 xorl %eax, %eax jmp 0x2d979 leaq 0x8f18e(%rip), %rax # 0xbcb37 movq %rax, %fs:-0x20 xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZL20stbi__pnm_getintegerP13stbi__contextPc: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov r15, rdi xor ebx, ebx loc_2D90B: cmp qword ptr [r15+10h], 0 jz short loc_2D929 mov rdi, [r15+28h] call qword ptr [r15+20h] test eax, eax jz short loc_2D939 cmp dword ptr [r15+30h], 0 jz loc_2D9B4 loc_2D929: mov rax, [r15+0C0h] cmp rax, [r15+0C8h] jnb short loc_2D9B4 loc_2D939: movzx r12d, byte ptr [r14] lea eax, [r12-3Ah] cmp al, 0F6h jb short loc_2D9B4 mov rax, [r15+0C0h] cmp rax, [r15+0C8h] jb short loc_2D96C cmp dword ptr [r15+30h], 0 jz short loc_2D99E mov rdi, r15 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r15+0C0h] loc_2D96C: lea rcx, [rax+1] mov [r15+0C0h], rcx mov al, [rax] loc_2D979: lea ecx, [rbx+rbx*4] lea ebx, [r12+rcx*2] add ebx, 0FFFFFFD0h mov [r14], al cmp ebx, 0CCCCCCCh jg short loc_2D9A2 jnz loc_2D90B cmp al, 38h ; '8' jl loc_2D90B jmp short loc_2D9A2 loc_2D99E: xor eax, eax jmp short loc_2D979 loc_2D9A2: lea rax, aIntegerParseOv; "integer parse overflow" mov fs:0FFFFFFFFFFFFFFE0h, rax xor ebx, ebx loc_2D9B4: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long stbi__pnm_getinteger(long long a1, char *a2) { unsigned int v2; // ebx int v3; // r12d char *v4; // rax char v5; // al v2 = 0; do { if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) goto LABEL_6; if ( !*(_DWORD *)(a1 + 48) ) return v2; } if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) ) return v2; LABEL_6: v3 = (unsigned __int8)*a2; if ( (unsigned __int8)(v3 - 58) < 0xF6u ) return v2; v4 = *(char **)(a1 + 192); if ( (unsigned long long)v4 >= *(_QWORD *)(a1 + 200) ) { if ( !*(_DWORD *)(a1 + 48) ) { v5 = 0; goto LABEL_11; } stbi__refill_buffer(a1); v4 = *(char **)(a1 + 192); } *(_QWORD *)(a1 + 192) = v4 + 1; v5 = *v4; LABEL_11: v2 = v3 + 10 * v2 - 48; *a2 = v5; } while ( (int)v2 <= 214748364 && (v2 != 214748364 || v5 < 56) ); __writefsqword(0xFFFFFFE0, (unsigned long long)"integer parse overflow"); return 0; }
30,497
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O2
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, (%rdi) jns 0x6f41d testq %rsi, %rsi je 0x6f416 movl $0x214, %edx # imm = 0x214 movq %rbx, %rdi callq 0x26a10 jmp 0x6f41d callq 0x6f223 movl %eax, (%rbx) xorl %ebp, %ebp pushq $0x4 popq %rax cmpq $0x204, %rax # imm = 0x204 je 0x6f435 movzbl (%rbx,%rax), %ecx addl %ecx, %ebp incq %rax jmp 0x6f422 testl %ebp, %ebp je 0x6f46d cmpl (%rbx), %ebp jge 0x6f46d leaq 0xb34b4(%rip), %rax # 0x1228f8 cmpl $0x0, (%rax) js 0x6f46d callq 0xb204e movl (%rbx), %r8d leaq 0x60ae7(%rip), %rdx # 0xcff3f pushq $0x3 popq %rsi movq %rax, %rdi movl %ebp, %ecx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0xb20e6 addq $0x8, %rsp popq %rbx popq %rbp retq
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: push rbp push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 0 jns short loc_6F41D test rsi, rsi jz short loc_6F416 mov edx, 214h mov rdi, rbx call _memcpy jmp short loc_6F41D loc_6F416: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov [rbx], eax loc_6F41D: xor ebp, ebp push 4 pop rax loc_6F422: cmp rax, 204h jz short loc_6F435 movzx ecx, byte ptr [rbx+rax] add ebp, ecx inc rax jmp short loc_6F422 loc_6F435: test ebp, ebp jz short loc_6F46D cmp ebp, [rbx] jge short loc_6F46D lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_6F46D call _Z15common_log_mainv; common_log_main(void) mov r8d, [rbx] lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... push 3 pop rsi mov rdi, rax mov ecx, ebp xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_6F46D: add rsp, 8 pop rbx pop rbp retn
int * postprocess_cpu_params(_DWORD *a1, long long a2) { int v2; // ebp int *result; // rax int v4; // eax int v5; // r9d if ( (int)*a1 < 0 ) { if ( a2 ) memcpy(a1, a2, 532LL); else *a1 = cpu_get_num_math(); } v2 = 0; for ( result = (_DWORD *)&byte_4; result != &dword_204; result = (int *)((char *)result + 1) ) v2 += *((unsigned __int8 *)result + (_QWORD)a1); if ( v2 && v2 < *a1 ) { result = (int *)&common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); return (int *)common_log_add( v4, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v2, *a1, v5); } } return result; }
postprocess_cpu_params: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x0 JNS 0x0016f41d TEST RSI,RSI JZ 0x0016f416 MOV EDX,0x214 MOV RDI,RBX CALL 0x00126a10 JMP 0x0016f41d LAB_0016f416: CALL 0x0016f223 MOV dword ptr [RBX],EAX LAB_0016f41d: XOR EBP,EBP PUSH 0x4 POP RAX LAB_0016f422: CMP RAX,0x204 JZ 0x0016f435 MOVZX ECX,byte ptr [RBX + RAX*0x1] ADD EBP,ECX INC RAX JMP 0x0016f422 LAB_0016f435: TEST EBP,EBP JZ 0x0016f46d CMP EBP,dword ptr [RBX] JGE 0x0016f46d LEA RAX,[0x2228f8] CMP dword ptr [RAX],0x0 JS 0x0016f46d CALL 0x001b204e MOV R8D,dword ptr [RBX] LEA RDX,[0x1cff3f] PUSH 0x3 POP RSI MOV RDI,RAX MOV ECX,EBP XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x001b20e6 LAB_0016f46d: ADD RSP,0x8 POP RBX POP RBP RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int4 uVar1; long lVar2; int8 uVar3; int iVar4; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar1 = cpu_get_num_math(); *(int4 *)param_1 = uVar1; } else { memcpy(param_1,param_2,0x214); } } iVar4 = 0; for (lVar2 = 4; lVar2 != 0x204; lVar2 = lVar2 + 1) { iVar4 = iVar4 + (uint)(byte)param_1[lVar2]; } if (((iVar4 != 0) && (iVar4 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar3 = common_log_main(); common_log_add(uVar3,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", iVar4,*(int4 *)param_1); return; } return; }
30,498
google::protobuf::compiler::python::Generator::PrintFieldDescriptorsInDescriptor(google::protobuf::Descriptor const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int (google::protobuf::Descriptor::*)() const, google::protobuf::FieldDescriptor const* (google::protobuf::Descriptor::*)(int) const) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/python/generator.cc
void Generator::PrintFieldDescriptorsInDescriptor( const Descriptor& message_descriptor, bool is_extension, const std::string& list_variable_name, int (Descriptor::*CountFn)() const, const FieldDescriptor* (Descriptor::*GetterFn)(int)const) const { printer_->Print("$list$=[\n", "list", list_variable_name); printer_->Indent(); for (int i = 0; i < (message_descriptor.*CountFn)(); ++i) { PrintFieldDescriptor(*(message_descriptor.*GetterFn)(i), is_extension); printer_->Print(",\n"); } printer_->Outdent(); printer_->Print("],\n"); }
O0
cpp
google::protobuf::compiler::python::Generator::PrintFieldDescriptorsInDescriptor(google::protobuf::Descriptor const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int (google::protobuf::Descriptor::*)() const, google::protobuf::FieldDescriptor const* (google::protobuf::Descriptor::*)(int) const) const: subq $0xa8, %rsp movq %r9, %rax movq %r8, 0x38(%rsp) movq %rcx, 0x40(%rsp) movl %edx, %ecx movq 0x38(%rsp), %rdx movq %rsi, %r9 movq %rdi, %r10 movq 0x40(%rsp), %rdi movb %cl, %r8b leaq 0xb0(%rsp), %rcx movq %rdx, 0x98(%rsp) movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rdx movq 0xa0(%rsp), %rsi movq (%rcx), %rax movq 0x8(%rcx), %rcx movq %r10, 0x90(%rsp) movq %r9, 0x88(%rsp) andb $0x1, %r8b movb %r8b, 0x87(%rsp) movq %rdi, 0x78(%rsp) movq %rsi, 0x70(%rsp) movq %rdx, 0x68(%rsp) movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x58(%rax), %rdi movq 0x78(%rsp), %rcx leaq 0x2f9071(%rip), %rsi # 0x3b6c6b leaq 0x318988(%rip), %rdx # 0x3d6589 callq 0xa0140 movq 0x48(%rsp), %rax movq 0x58(%rax), %rdi callq 0x323ec0 movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x88(%rsp), %rcx movq 0x68(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x70(%rsp), %rdx addq %rdx, %rcx movq %rcx, 0x30(%rsp) andq $0x1, %rax cmpq $0x0, %rax je 0xbdc69 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %rax movq (%rax), %rax subq $0x1, %rcx movq (%rax,%rcx), %rax movq %rax, 0x18(%rsp) jmp 0xbdc73 movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x30(%rsp), %rdi movq 0x18(%rsp), %rax callq *%rax movl %eax, %ecx movl 0x24(%rsp), %eax cmpl %ecx, %eax jge 0xbdd27 movq 0x88(%rsp), %rcx movq 0x58(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x60(%rsp), %rdx addq %rdx, %rcx movq %rcx, 0x10(%rsp) andq $0x1, %rax cmpq $0x0, %rax je 0xbdcd1 movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax movq (%rax), %rax subq $0x1, %rcx movq (%rax,%rcx), %rax movq %rax, (%rsp) jmp 0xbdcda movq 0x8(%rsp), %rax movq %rax, (%rsp) movq 0x10(%rsp), %rdi movq (%rsp), %rax movl 0x54(%rsp), %esi callq *%rax movq 0x48(%rsp), %rdi movq %rax, %rsi movb 0x87(%rsp), %al andb $0x1, %al movzbl %al, %edx callq 0xbc290 movq 0x48(%rsp), %rax movq 0x58(%rax), %rdi leaq 0x2f05d2(%rip), %rsi # 0x3ae2e4 callq 0x39230 movl 0x54(%rsp), %eax addl $0x1, %eax movl %eax, 0x54(%rsp) jmp 0xbdc1c movq 0x48(%rsp), %rax movq 0x58(%rax), %rdi callq 0x323ee0 movq 0x48(%rsp), %rax movq 0x58(%rax), %rdi leaq 0x2f8635(%rip), %rsi # 0x3b637a callq 0x39230 addq $0xa8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK6google8protobuf8compiler6python9Generator33PrintFieldDescriptorsInDescriptorERKNS0_10DescriptorEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEMS4_KFivEMS4_KFPKNS0_15FieldDescriptorEiE: sub rsp, 0A8h mov rax, r9 mov [rsp+0A8h+var_70], r8 mov [rsp+0A8h+var_68], rcx mov ecx, edx mov rdx, [rsp+0A8h+var_70] mov r9, rsi mov r10, rdi mov rdi, [rsp+0A8h+var_68] mov r8b, cl lea rcx, [rsp+0A8h+arg_0] mov [rsp+0A8h+var_10], rdx mov [rsp+0A8h+var_8], rax mov rdx, [rsp+0A8h+var_10] mov rsi, [rsp+0A8h+var_8] mov rax, [rcx] mov rcx, [rcx+8] mov [rsp+0A8h+var_18], r10 mov [rsp+0A8h+var_20], r9 and r8b, 1 mov [rsp+0A8h+var_21], r8b mov [rsp+0A8h+var_30], rdi mov [rsp+0A8h+var_38], rsi mov [rsp+0A8h+var_40], rdx mov [rsp+0A8h+var_48], rcx mov [rsp+0A8h+var_50], rax mov rax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_60], rax mov rdi, [rax+58h] mov rcx, [rsp+0A8h+var_30] lea rsi, aList; "$list$=[\n" lea rdx, aAnnotateMutabl_0+11h; "list" call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string>(char const*,char [5],std::string const&) mov rax, [rsp+0A8h+var_60] mov rdi, [rax+58h]; this call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void) mov [rsp+0A8h+var_54], 0 loc_BDC1C: mov eax, [rsp+0A8h+var_54] mov [rsp+0A8h+var_84], eax mov rcx, [rsp+0A8h+var_20] mov rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_80], rax mov rdx, [rsp+0A8h+var_38] add rcx, rdx mov [rsp+0A8h+var_78], rcx and rax, 1 cmp rax, 0 jz short loc_BDC69 mov rcx, [rsp+0A8h+var_80] mov rax, [rsp+0A8h+var_78] mov rax, [rax] sub rcx, 1 mov rax, [rax+rcx] mov [rsp+0A8h+var_90], rax jmp short loc_BDC73 loc_BDC69: mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_90], rax loc_BDC73: mov rdi, [rsp+0A8h+var_78] mov rax, [rsp+0A8h+var_90] call rax mov ecx, eax mov eax, [rsp+0A8h+var_84] cmp eax, ecx jge loc_BDD27 mov rcx, [rsp+0A8h+var_20] mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_A0], rax mov rdx, [rsp+0A8h+var_48] add rcx, rdx mov [rsp+0A8h+var_98], rcx and rax, 1 cmp rax, 0 jz short loc_BDCD1 mov rcx, [rsp+0A8h+var_A0] mov rax, [rsp+0A8h+var_98] mov rax, [rax] sub rcx, 1 mov rax, [rax+rcx] mov [rsp+0A8h+var_A8], rax jmp short loc_BDCDA loc_BDCD1: mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_A8], rax loc_BDCDA: mov rdi, [rsp+0A8h+var_98] mov rax, [rsp+0A8h+var_A8] mov esi, [rsp+0A8h+var_54] call rax mov rdi, [rsp+0A8h+var_60]; this mov rsi, rax; google::protobuf::FieldDescriptor * mov al, [rsp+0A8h+var_21] and al, 1 movzx edx, al; bool call _ZNK6google8protobuf8compiler6python9Generator20PrintFieldDescriptorERKNS0_15FieldDescriptorEb; google::protobuf::compiler::python::Generator::PrintFieldDescriptor(google::protobuf::FieldDescriptor const&,bool) mov rax, [rsp+0A8h+var_60] mov rdi, [rax+58h] lea rsi, aBase64+0Ah; ",\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ mov eax, [rsp+0A8h+var_54] add eax, 1 mov [rsp+0A8h+var_54], eax jmp loc_BDC1C loc_BDD27: mov rax, [rsp+0A8h+var_60] mov rdi, [rax+58h]; this call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void) mov rax, [rsp+0A8h+var_60] mov rdi, [rax+58h] lea rsi, asc_3B637A; "],\n" call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ add rsp, 0A8h retn
long long google::protobuf::compiler::python::Generator::PrintFieldDescriptorsInDescriptor( long long *a1, long long a2, char a3, long long a4, unsigned int ( *a5)(_QWORD), long long a6, char *a7, long long a8) { int v8; // eax const google::protobuf::FieldDescriptor *v9; // rax _QWORD *v11; // [rsp+10h] [rbp-98h] _QWORD *v12; // [rsp+30h] [rbp-78h] unsigned int i; // [rsp+54h] [rbp-54h] char v16; // [rsp+87h] [rbp-21h] v16 = a3 & 1; google::protobuf::io::Printer::Print<char [5],std::string>(a1[11], (long long)"$list$=[\n", "list", a4); google::protobuf::io::Printer::Indent((google::protobuf::io::Printer *)a1[11]); for ( i = 0; ; ++i ) { v12 = (_QWORD *)(a6 + a2); v8 = ((unsigned __int8)a5 & 1) != 0 ? (*(long long ( **)(_QWORD *))((char *)a5 + *v12 - 1))(v12) : a5(v12); if ( (int)i >= v8 ) break; v11 = (_QWORD *)(a8 + a2); if ( ((unsigned __int8)a7 & 1) != 0 ) v9 = (const google::protobuf::FieldDescriptor *)(*(long long ( **)(_QWORD *, _QWORD))&a7[*v11 - 1])( v11, i); else v9 = (const google::protobuf::FieldDescriptor *)((long long ( *)(_QWORD *, _QWORD))a7)(v11, i); google::protobuf::compiler::python::Generator::PrintFieldDescriptor( (google::protobuf::compiler::python::Generator *)a1, v9, v16 & 1); google::protobuf::io::Printer::Print<>(a1[11], (long long)",\n"); } google::protobuf::io::Printer::Outdent((google::protobuf::io::Printer *)a1[11]); return google::protobuf::io::Printer::Print<>(a1[11], (long long)"],\n"); }
PrintFieldDescriptorsInDescriptor: SUB RSP,0xa8 MOV RAX,R9 MOV qword ptr [RSP + 0x38],R8 MOV qword ptr [RSP + 0x40],RCX MOV ECX,EDX MOV RDX,qword ptr [RSP + 0x38] MOV R9,RSI MOV R10,RDI MOV RDI,qword ptr [RSP + 0x40] MOV R8B,CL LEA RCX,[RSP + 0xb0] MOV qword ptr [RSP + 0x98],RDX MOV qword ptr [RSP + 0xa0],RAX MOV RDX,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x90],R10 MOV qword ptr [RSP + 0x88],R9 AND R8B,0x1 MOV byte ptr [RSP + 0x87],R8B MOV qword ptr [RSP + 0x78],RDI MOV qword ptr [RSP + 0x70],RSI MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RSP + 0x78] LEA RSI,[0x4b6c6b] LEA RDX,[0x4d6589] CALL 0x001a0140 MOV RAX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RAX + 0x58] CALL 0x00423ec0 MOV dword ptr [RSP + 0x54],0x0 LAB_001bdc1c: MOV EAX,dword ptr [RSP + 0x54] MOV dword ptr [RSP + 0x24],EAX MOV RCX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x28],RAX MOV RDX,qword ptr [RSP + 0x70] ADD RCX,RDX MOV qword ptr [RSP + 0x30],RCX AND RAX,0x1 CMP RAX,0x0 JZ 0x001bdc69 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX] SUB RCX,0x1 MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RSP + 0x18],RAX JMP 0x001bdc73 LAB_001bdc69: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x18],RAX LAB_001bdc73: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x18] CALL RAX MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x24] CMP EAX,ECX JGE 0x001bdd27 MOV RCX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP + 0x60] ADD RCX,RDX MOV qword ptr [RSP + 0x10],RCX AND RAX,0x1 CMP RAX,0x0 JZ 0x001bdcd1 MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] SUB RCX,0x1 MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RSP],RAX JMP 0x001bdcda LAB_001bdcd1: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX LAB_001bdcda: MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0x54] CALL RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,RAX MOV AL,byte ptr [RSP + 0x87] AND AL,0x1 MOVZX EDX,AL CALL 0x001bc290 MOV RAX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RAX + 0x58] LEA RSI,[0x4ae2e4] CALL 0x00139230 MOV EAX,dword ptr [RSP + 0x54] ADD EAX,0x1 MOV dword ptr [RSP + 0x54],EAX JMP 0x001bdc1c LAB_001bdd27: MOV RAX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RAX + 0x58] CALL 0x00423ee0 MOV RAX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RAX + 0x58] LEA RSI,[0x4b637a] CALL 0x00139230 ADD RSP,0xa8 RET
/* google::protobuf::compiler::python::Generator::PrintFieldDescriptorsInDescriptor(google::protobuf::Descriptor const&, bool, std::__cxx11::string const&, int (google::protobuf::Descriptor::*)() const, google::protobuf::FieldDescriptor const* (google::protobuf::Descriptor::*)(int) const) const */ void google::protobuf::compiler::python::Generator::PrintFieldDescriptorsInDescriptor (Descriptor *param_1,bool param_2,string *param_3,_func_int *param_4, _func_FieldDescriptor_ptr_int *param_5) { FieldDescriptor *pFVar1; long *plVar2; int7 in_register_00000031; long in_R9; code *in_stack_00000008; long in_stack_00000010; code *local_a8; _func_FieldDescriptor_ptr_int *local_90; int local_54; io::Printer::Print<char[5],std::__cxx11::string> (*(Printer **)(param_1 + 0x58),"$list$=[\n","list",(string *)param_4); io::Printer::Indent(*(Printer **)(param_1 + 0x58)); local_54 = 0; while( true ) { plVar2 = (long *)(CONCAT71(in_register_00000031,param_2) + in_R9); local_90 = param_5; if (((ulong)param_5 & 1) != 0) { local_90 = *(_func_FieldDescriptor_ptr_int **)(param_5 + *plVar2 + -1); } pFVar1 = (*local_90)((int)plVar2); if ((int)pFVar1 <= local_54) break; plVar2 = (long *)(CONCAT71(in_register_00000031,param_2) + in_stack_00000010); if (((ulong)in_stack_00000008 & 1) == 0) { local_a8 = in_stack_00000008; } else { local_a8 = *(code **)(in_stack_00000008 + *plVar2 + -1); } pFVar1 = (FieldDescriptor *)(*local_a8)(plVar2,local_54); PrintFieldDescriptor((Generator *)param_1,pFVar1,(bool)((byte)param_3 & 1)); io::Printer::Print<>(*(Printer **)(param_1 + 0x58),",\n"); local_54 = local_54 + 1; } io::Printer::Outdent(*(Printer **)(param_1 + 0x58)); io::Printer::Print<>(*(Printer **)(param_1 + 0x58),"],\n"); return; }
30,499
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O2
cpp
minja::error_location_suffix(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 pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq (%rsi), %rax movq (%rax), %r14 pushq $0x1 popq %rbp leaq 0x6(%rsp), %r13 movq (%r12), %rax movq (%rax), %rsi addq 0x8(%rax), %rsi cmpq %r15, %rbp jae 0x29285 movb $0xa, 0x6(%rsp) movq %r14, %rdi movq %r13, %rdx callq 0x57656 movq %rax, %r14 incq %r14 incq %rbp jmp 0x2925a leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r14, %rdi callq 0x57656 leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) movq %rbx, %rdi movq %r14, %rsi movq %rax, %rdx callq 0x5753a movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov rax, [rsi] mov r14, [rax] push 1 pop rbp lea r13, [rsp+38h+var_32] loc_2925A: mov rax, [r12] mov rsi, [rax] add rsi, [rax+8] cmp rbp, r15 jnb short loc_29285 mov [rsp+38h+var_32], 0Ah mov rdi, r14 mov rdx, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r14, rax inc r14 inc rbp jmp short loc_2925A loc_29285: lea rdx, [rsp+38h+var_31] mov byte ptr [rdx], 0Ah mov rdi, r14 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rcx, [rbx+10h] mov [rbx], rcx mov rdi, rbx mov rsi, r14 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( _QWORD *a1, long long **a2, unsigned long long a3) { long long v3; // rax long long v6; // r14 unsigned long long i; // rbp long long v8; // rsi long long v9; // rax _WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF v11[0] = HIWORD(v3); v6 = **a2; for ( i = 1LL; ; ++i ) { v8 = (*a2)[1] + **a2; if ( i >= a3 ) break; LOBYTE(v11[0]) = 10; v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v6, v8, v11) + 1; } HIBYTE(v11[0]) = 10; v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v6, v8, (char *)v11 + 1); *a1 = a1 + 2; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(a1, v6, v9); return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV R14,qword ptr [RAX] PUSH 0x1 POP RBP LEA R13,[RSP + 0x6] LAB_0012925a: MOV RAX,qword ptr [R12] MOV RSI,qword ptr [RAX] ADD RSI,qword ptr [RAX + 0x8] CMP RBP,R15 JNC 0x00129285 MOV byte ptr [RSP + 0x6],0xa MOV RDI,R14 MOV RDX,R13 CALL 0x00157656 MOV R14,RAX INC R14 INC RBP JMP 0x0012925a LAB_00129285: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R14 CALL 0x00157656 LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,RAX CALL 0x0015753a MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* operator()[abi:cxx11](unsigned long) const */ ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0:: operator()[abi_cxx11_(ulong param_1) { int8 in_RAX; long lVar1; int8 uVar2; ulong in_RDX; ulong uVar3; long *in_RSI; long lVar4; int8 uStack_38; lVar1 = *(long *)*in_RSI; uStack_38 = in_RAX; for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1 ) { uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38); lVar1 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4,(long)&uStack_38 + 6); lVar1 = lVar1 + 1; } uStack_38 = CONCAT17(10,(int7)uStack_38); uVar2 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar1,lVar4); *(ulong *)param_1 = param_1 + 0x10; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (param_1,lVar1,uVar2); return param_1; }