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
13,800
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/vm.cpp
evmc_set_option_result set_option(evmc_vm* c_vm, char const* c_name, char const* c_value) noexcept { const auto name = (c_name != nullptr) ? std::string_view{c_name} : std::string_view{}; const auto value = (c_value != nullptr) ? std::string_view{c_value} : std::string_view{}; auto& vm = *static_cast<VM*>(c_vm); if (name == "advanced") { c_vm->execute = evmone::advanced::execute; return EVMC_SET_OPTION_SUCCESS; } else if (name == "cgoto") { #if EVMONE_CGOTO_SUPPORTED if (value == "no") { vm.cgoto = false; return EVMC_SET_OPTION_SUCCESS; } return EVMC_SET_OPTION_INVALID_VALUE; #else return EVMC_SET_OPTION_INVALID_NAME; #endif } else if (name == "trace") { vm.add_tracer(create_instruction_tracer(std::clog)); return EVMC_SET_OPTION_SUCCESS; } else if (name == "histogram") { vm.add_tracer(create_histogram_tracer(std::clog)); return EVMC_SET_OPTION_SUCCESS; } else if (name == "validate_eof") { vm.validate_eof = true; return EVMC_SET_OPTION_SUCCESS; } return EVMC_SET_OPTION_INVALID_NAME; }
O0
cpp
evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x18(%rbp) je 0x3889d movq -0x18(%rbp), %rsi leaq -0x30(%rbp), %rdi callq 0x3a3c0 jmp 0x388a6 leaq -0x30(%rbp), %rdi callq 0x3a410 cmpq $0x0, -0x20(%rbp) je 0x388bc movq -0x20(%rbp), %rsi leaq -0x40(%rbp), %rdi callq 0x3a3c0 jmp 0x388c5 leaq -0x40(%rbp), %rdi callq 0x3a410 movq -0x10(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) leaq -0x68(%rbp), %rdi leaq 0xa59cf(%rip), %rsi # 0xde2b7 callq 0x3a3c0 movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x60(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x38908 jmp 0x38923 movq -0x10(%rbp), %rax leaq 0x534d(%rip), %rcx # 0x3dc60 movq %rcx, 0x20(%rax) movl $0x0, -0x4(%rbp) jmp 0x38b77 movq -0x30(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x70(%rbp) leaq -0x88(%rbp), %rdi leaq 0xa597f(%rip), %rsi # 0xde2c0 callq 0x3a3c0 movq -0x78(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x88(%rbp), %rdx movq -0x80(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x38964 jmp 0x389d4 movq -0x40(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x90(%rbp) leaq -0xa8(%rbp), %rdi leaq 0xa593e(%rip), %rsi # 0xde2c6 callq 0x3a3c0 movq -0x98(%rbp), %rdi movq -0x90(%rbp), %rsi movq -0xa8(%rbp), %rdx movq -0xa0(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x389b4 jmp 0x389c8 movq -0x48(%rbp), %rax movb $0x0, 0x38(%rax) movl $0x0, -0x4(%rbp) jmp 0x38b77 movl $0x2, -0x4(%rbp) jmp 0x38b77 movq -0x30(%rbp), %rax movq %rax, -0xb8(%rbp) movq -0x28(%rbp), %rax movq %rax, -0xb0(%rbp) leaq -0xc8(%rbp), %rdi leaq 0xa58d1(%rip), %rsi # 0xde2c9 callq 0x3a3c0 movq -0xb8(%rbp), %rdi movq -0xb0(%rbp), %rsi movq -0xc8(%rbp), %rdx movq -0xc0(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x38a24 jmp 0x38a6f movq -0x48(%rbp), %rax movq %rax, -0x120(%rbp) movq 0x100552(%rip), %rsi # 0x138f88 leaq -0xd0(%rbp), %rdi callq 0x8ab40 jmp 0x38a44 movq -0x120(%rbp), %rdi leaq -0xd0(%rbp), %rsi callq 0x3a4b0 leaq -0xd0(%rbp), %rdi callq 0x38f00 movl $0x0, -0x4(%rbp) jmp 0x38b77 movq -0x30(%rbp), %rax movq %rax, -0xe0(%rbp) movq -0x28(%rbp), %rax movq %rax, -0xd8(%rbp) leaq -0xf0(%rbp), %rdi leaq 0xa583c(%rip), %rsi # 0xde2cf callq 0x3a3c0 movq -0xe0(%rbp), %rdi movq -0xd8(%rbp), %rsi movq -0xf0(%rbp), %rdx movq -0xe8(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x38abf jmp 0x38b07 movq -0x48(%rbp), %rax movq %rax, -0x128(%rbp) movq 0x1004b7(%rip), %rsi # 0x138f88 leaq -0xf8(%rbp), %rdi callq 0x8a9f0 jmp 0x38adf movq -0x128(%rbp), %rdi leaq -0xf8(%rbp), %rsi callq 0x3a4b0 leaq -0xf8(%rbp), %rdi callq 0x38f00 movl $0x0, -0x4(%rbp) jmp 0x38b77 movq -0x30(%rbp), %rax movq %rax, -0x108(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x100(%rbp) leaq -0x118(%rbp), %rdi leaq 0xa57ae(%rip), %rsi # 0xde2d9 callq 0x3a3c0 movq -0x108(%rbp), %rdi movq -0x100(%rbp), %rsi movq -0x118(%rbp), %rdx movq -0x110(%rbp), %rcx callq 0x3a430 testb $0x1, %al jne 0x38b57 jmp 0x38b68 movq -0x48(%rbp), %rax movb $0x1, 0x39(%rax) movl $0x0, -0x4(%rbp) jmp 0x38b77 jmp 0x38b6a jmp 0x38b6c jmp 0x38b6e jmp 0x38b70 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq %rax, %rdi callq 0x37a70 nopl (%rax,%rax)
_ZN6evmone12_GLOBAL__N_110set_optionEP7evmc_vmPKcS4_: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_18], 0 jz short loc_3889D mov rsi, [rbp+var_18] lea rdi, [rbp+var_30] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_388A6 loc_3889D: lea rdi, [rbp+var_30] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2Ev; std::string_view::basic_string_view(void) loc_388A6: cmp [rbp+var_20], 0 jz short loc_388BC mov rsi, [rbp+var_20] lea rdi, [rbp+var_40] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) jmp short loc_388C5 loc_388BC: lea rdi, [rbp+var_40] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2Ev; std::string_view::basic_string_view(void) loc_388C5: mov rax, [rbp+var_10] mov [rbp+var_48], rax mov rax, [rbp+var_30] mov [rbp+var_58], rax mov rax, [rbp+var_28] mov [rbp+var_50], rax lea rdi, [rbp+var_68] lea rsi, aAdvanced; "advanced" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_58] mov rsi, [rbp+var_50] mov rdx, [rbp+var_68] mov rcx, [rbp+var_60] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_38908 jmp short loc_38923 loc_38908: mov rax, [rbp+var_10] lea rcx, _ZN6evmone8advanced7executeEP7evmc_vmPK19evmc_host_interfaceP17evmc_host_context13evmc_revisionPK12evmc_messagePKhm; evmone::advanced::execute(evmc_vm *,evmc_host_interface const*,evmc_host_context *,evmc_revision,evmc_message const*,uchar const*,ulong) mov [rax+20h], rcx mov [rbp+var_4], 0 jmp loc_38B77 loc_38923: mov rax, [rbp+var_30] mov [rbp+var_78], rax mov rax, [rbp+var_28] mov [rbp+var_70], rax lea rdi, [rbp+var_88] lea rsi, aCgoto; "cgoto" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_78] mov rsi, [rbp+var_70] mov rdx, [rbp+var_88] mov rcx, [rbp+var_80] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_38964 jmp short loc_389D4 loc_38964: mov rax, [rbp+var_40] mov [rbp+var_98], rax mov rax, [rbp+var_38] mov [rbp+var_90], rax lea rdi, [rbp+var_A8] lea rsi, aNo; "no" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_98] mov rsi, [rbp+var_90] mov rdx, [rbp+var_A8] mov rcx, [rbp+var_A0] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_389B4 jmp short loc_389C8 loc_389B4: mov rax, [rbp+var_48] mov byte ptr [rax+38h], 0 mov [rbp+var_4], 0 jmp loc_38B77 loc_389C8: mov [rbp+var_4], 2 jmp loc_38B77 loc_389D4: mov rax, [rbp+var_30] mov [rbp+var_B8], rax mov rax, [rbp+var_28] mov [rbp+var_B0], rax lea rdi, [rbp+var_C8] lea rsi, aTrace; "trace" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_B8] mov rsi, [rbp+var_B0] mov rdx, [rbp+var_C8] mov rcx, [rbp+var_C0] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_38A24 jmp short loc_38A6F loc_38A24: mov rax, [rbp+var_48] mov [rbp+var_120], rax mov rsi, cs:_ZSt4clog_ptr lea rdi, [rbp+var_D0] call _ZN6evmone25create_instruction_tracerERSo; evmone::create_instruction_tracer(std::ostream &) jmp short $+2 loc_38A44: mov rdi, [rbp+var_120] lea rsi, [rbp+var_D0] call _ZN6evmone2VM10add_tracerESt10unique_ptrINS_6TracerESt14default_deleteIS2_EE; evmone::VM::add_tracer(std::unique_ptr<evmone::Tracer>) lea rdi, [rbp+var_D0] call _ZNSt10unique_ptrIN6evmone6TracerESt14default_deleteIS1_EED2Ev; std::unique_ptr<evmone::Tracer>::~unique_ptr() mov [rbp+var_4], 0 jmp loc_38B77 loc_38A6F: mov rax, [rbp+var_30] mov [rbp+var_E0], rax mov rax, [rbp+var_28] mov [rbp+var_D8], rax lea rdi, [rbp+var_F0] lea rsi, aHistogram; "histogram" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_E0] mov rsi, [rbp+var_D8] mov rdx, [rbp+var_F0] mov rcx, [rbp+var_E8] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_38ABF jmp short loc_38B07 loc_38ABF: mov rax, [rbp+var_48] mov [rbp+var_128], rax mov rsi, cs:_ZSt4clog_ptr lea rdi, [rbp+var_F8] call _ZN6evmone23create_histogram_tracerERSo; evmone::create_histogram_tracer(std::ostream &) jmp short $+2 loc_38ADF: mov rdi, [rbp+var_128] lea rsi, [rbp+var_F8] call _ZN6evmone2VM10add_tracerESt10unique_ptrINS_6TracerESt14default_deleteIS2_EE; evmone::VM::add_tracer(std::unique_ptr<evmone::Tracer>) lea rdi, [rbp+var_F8] call _ZNSt10unique_ptrIN6evmone6TracerESt14default_deleteIS1_EED2Ev; std::unique_ptr<evmone::Tracer>::~unique_ptr() mov [rbp+var_4], 0 jmp short loc_38B77 loc_38B07: mov rax, [rbp+var_30] mov [rbp+var_108], rax mov rax, [rbp+var_28] mov [rbp+var_100], rax lea rdi, [rbp+var_118] lea rsi, aValidateEof; "validate_eof" call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_108] mov rsi, [rbp+var_100] mov rdx, [rbp+var_118] mov rcx, [rbp+var_110] call _ZSteqIcSt11char_traitsIcEEbSt17basic_string_viewIT_T0_ENSt15__type_identityIS5_E4typeE; std::operator==<char,std::char_traits<char>>(std::string_view,std::__type_identity<std::string_view>::type) test al, 1 jnz short loc_38B57 jmp short loc_38B68 loc_38B57: mov rax, [rbp+var_48] mov byte ptr [rax+39h], 1 mov [rbp+var_4], 0 jmp short loc_38B77 loc_38B68: jmp short $+2 loc_38B6A: jmp short $+2 loc_38B6C: jmp short $+2 loc_38B6E: jmp short $+2 loc_38B70: mov [rbp+var_4], 1 loc_38B77: mov eax, [rbp+var_4] add rsp, 130h pop rbp retn mov rdi, rax call __clang_call_terminate
long long evmone::`anonymous namespace'::set_option(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-128h] long long v5; // [rsp+10h] [rbp-120h] _QWORD v6[2]; // [rsp+18h] [rbp-118h] BYREF long long v7; // [rsp+28h] [rbp-108h] long long v8; // [rsp+30h] [rbp-100h] _BYTE v9[8]; // [rsp+38h] [rbp-F8h] BYREF _QWORD v10[2]; // [rsp+40h] [rbp-F0h] BYREF long long v11; // [rsp+50h] [rbp-E0h] long long v12; // [rsp+58h] [rbp-D8h] _BYTE v13[8]; // [rsp+60h] [rbp-D0h] BYREF _QWORD v14[2]; // [rsp+68h] [rbp-C8h] BYREF long long v15; // [rsp+78h] [rbp-B8h] long long v16; // [rsp+80h] [rbp-B0h] _QWORD v17[2]; // [rsp+88h] [rbp-A8h] BYREF long long v18; // [rsp+98h] [rbp-98h] long long v19; // [rsp+A0h] [rbp-90h] _QWORD v20[2]; // [rsp+A8h] [rbp-88h] BYREF long long v21; // [rsp+B8h] [rbp-78h] long long v22; // [rsp+C0h] [rbp-70h] _QWORD v23[2]; // [rsp+C8h] [rbp-68h] BYREF long long v24; // [rsp+D8h] [rbp-58h] long long v25; // [rsp+E0h] [rbp-50h] long long v26; // [rsp+E8h] [rbp-48h] _QWORD v27[2]; // [rsp+F0h] [rbp-40h] BYREF long long v28; // [rsp+100h] [rbp-30h] BYREF long long v29; // [rsp+108h] [rbp-28h] long long v30; // [rsp+110h] [rbp-20h] long long v31; // [rsp+118h] [rbp-18h] long long v32; // [rsp+120h] [rbp-10h] v32 = a1; v31 = a2; v30 = a3; if ( a2 ) std::string_view::basic_string_view(&v28, v31); else std::string_view::basic_string_view(&v28); if ( v30 ) std::string_view::basic_string_view(v27, v30); else std::string_view::basic_string_view(v27); v26 = v32; v24 = v28; v25 = v29; std::string_view::basic_string_view(v23, "advanced"); if ( (std::operator==<char,std::char_traits<char>>(v24, v25, v23[0], v23[1]) & 1) != 0 ) { *(_QWORD *)(v32 + 32) = evmone::advanced::execute; return 0; } else { v21 = v28; v22 = v29; std::string_view::basic_string_view(v20, "cgoto"); if ( (std::operator==<char,std::char_traits<char>>(v21, v22, v20[0], v20[1]) & 1) != 0 ) { v18 = v27[0]; v19 = v27[1]; std::string_view::basic_string_view(v17, "no"); if ( (std::operator==<char,std::char_traits<char>>(v18, v19, v17[0], v17[1]) & 1) != 0 ) { *(_BYTE *)(v26 + 56) = 0; return 0; } else { return 2; } } else { v15 = v28; v16 = v29; std::string_view::basic_string_view(v14, "trace"); if ( (std::operator==<char,std::char_traits<char>>(v15, v16, v14[0], v14[1]) & 1) != 0 ) { v5 = v26; evmone::create_instruction_tracer(v13, &std::clog); evmone::VM::add_tracer(v5, v13); std::unique_ptr<evmone::Tracer>::~unique_ptr(v13); return 0; } else { v11 = v28; v12 = v29; std::string_view::basic_string_view(v10, "histogram"); if ( (std::operator==<char,std::char_traits<char>>(v11, v12, v10[0], v10[1]) & 1) != 0 ) { v4 = v26; evmone::create_histogram_tracer(v9, &std::clog); evmone::VM::add_tracer(v4, v9); std::unique_ptr<evmone::Tracer>::~unique_ptr(v9); return 0; } else { v7 = v28; v8 = v29; std::string_view::basic_string_view(v6, "validate_eof"); if ( (std::operator==<char,std::char_traits<char>>(v7, v8, v6[0], v6[1]) & 1) != 0 ) { *(_BYTE *)(v26 + 57) = 1; return 0; } else { return 1; } } } } } }
set_option: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013889d MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x30] CALL 0x0013a3c0 JMP 0x001388a6 LAB_0013889d: LEA RDI,[RBP + -0x30] CALL 0x0013a410 LAB_001388a6: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001388bc MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x40] CALL 0x0013a3c0 JMP 0x001388c5 LAB_001388bc: LEA RDI,[RBP + -0x40] CALL 0x0013a410 LAB_001388c5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX LEA RDI,[RBP + -0x68] LEA RSI,[0x1de2b7] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] CALL 0x0013a430 TEST AL,0x1 JNZ 0x00138908 JMP 0x00138923 LAB_00138908: MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x13dc60] MOV qword ptr [RAX + 0x20],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00138b77 LAB_00138923: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x88] LEA RSI,[0x1de2c0] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0x78] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x80] CALL 0x0013a430 TEST AL,0x1 JNZ 0x00138964 JMP 0x001389d4 LAB_00138964: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x90],RAX LEA RDI,[RBP + -0xa8] LEA RSI,[0x1de2c6] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x90] MOV RDX,qword ptr [RBP + -0xa8] MOV RCX,qword ptr [RBP + -0xa0] CALL 0x0013a430 TEST AL,0x1 JNZ 0x001389b4 JMP 0x001389c8 LAB_001389b4: MOV RAX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + 0x38],0x0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00138b77 LAB_001389c8: MOV dword ptr [RBP + -0x4],0x2 JMP 0x00138b77 LAB_001389d4: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xb0],RAX LEA RDI,[RBP + -0xc8] LEA RSI,[0x1de2c9] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [RBP + -0xb0] MOV RDX,qword ptr [RBP + -0xc8] MOV RCX,qword ptr [RBP + -0xc0] CALL 0x0013a430 TEST AL,0x1 JNZ 0x00138a24 JMP 0x00138a6f LAB_00138a24: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x120],RAX LAB_00138a2f: MOV RSI,qword ptr [0x00238f88] LEA RDI,[RBP + -0xd0] CALL 0x0018ab40 JMP 0x00138a44 LAB_00138a44: MOV RDI,qword ptr [RBP + -0x120] LEA RSI,[RBP + -0xd0] CALL 0x0013a4b0 LEA RDI,[RBP + -0xd0] CALL 0x00138f00 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00138b77 LAB_00138a6f: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0xe0],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xd8],RAX LEA RDI,[RBP + -0xf0] LEA RSI,[0x1de2cf] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0xe0] MOV RSI,qword ptr [RBP + -0xd8] MOV RDX,qword ptr [RBP + -0xf0] MOV RCX,qword ptr [RBP + -0xe8] CALL 0x0013a430 TEST AL,0x1 JNZ 0x00138abf JMP 0x00138b07 LAB_00138abf: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x128],RAX MOV RSI,qword ptr [0x00238f88] LEA RDI,[RBP + -0xf8] CALL 0x0018a9f0 JMP 0x00138adf LAB_00138adf: MOV RDI,qword ptr [RBP + -0x128] LEA RSI,[RBP + -0xf8] CALL 0x0013a4b0 LEA RDI,[RBP + -0xf8] CALL 0x00138f00 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00138b77 LAB_00138b07: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x108],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x100],RAX LEA RDI,[RBP + -0x118] LEA RSI,[0x1de2d9] CALL 0x0013a3c0 MOV RDI,qword ptr [RBP + -0x108] MOV RSI,qword ptr [RBP + -0x100] MOV RDX,qword ptr [RBP + -0x118] MOV RCX,qword ptr [RBP + -0x110] CALL 0x0013a430 TEST AL,0x1 JNZ 0x00138b57 JMP 0x00138b68 LAB_00138b57: MOV RAX,qword ptr [RBP + -0x48] MOV byte ptr [RAX + 0x39],0x1 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00138b77 LAB_00138b68: JMP 0x00138b6a LAB_00138b6a: JMP 0x00138b6c LAB_00138b6c: JMP 0x00138b6e LAB_00138b6e: JMP 0x00138b70 LAB_00138b70: MOV dword ptr [RBP + -0x4],0x1 LAB_00138b77: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x130 POP RBP RET
/* evmone::(anonymous namespace)::set_option(evmc_vm*, char const*, char const*) */ int4 evmone::(anonymous_namespace)::set_option(evmc_vm *param_1,char *param_2,char *param_3) { evmc_vm *peVar1; bool bVar2; int8 local_120; int8 local_118; int8 local_110; int8 local_108; evmone local_100 [8]; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_e0; evmone local_d8 [8]; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int8 local_80; int8 local_78; int8 local_70; int8 local_68; int8 local_60; int8 local_58; evmc_vm *local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; char *local_28; char *local_20; evmc_vm *local_18; int4 local_c; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_2 == (char *)0x0) { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_38); } else { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_38,param_2); } if (local_28 == (char *)0x0) { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_48); } else { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_48,local_28); } local_50 = local_18; local_60 = local_38; local_58 = local_30; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_70,"advanced"); bVar2 = std::operator==(local_60,local_58,local_70,local_68); if (bVar2) { *(code **)(local_18 + 0x20) = advanced::execute; local_c = 0; } else { local_80 = local_38; local_78 = local_30; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_90,"cgoto"); bVar2 = std::operator==(local_80,local_78,local_90,local_88); if (bVar2) { local_a0 = local_48; local_98 = local_40; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_b0,"no"); bVar2 = std::operator==(local_a0,local_98,local_b0,local_a8); if (bVar2) { local_50[0x38] = (evmc_vm)0x0; local_c = 0; } else { local_c = 2; } } else { local_c0 = local_38; local_b8 = local_30; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_d0,"trace"); bVar2 = std::operator==(local_c0,local_b8,local_d0,local_c8); peVar1 = local_50; if (bVar2) { /* try { // try from 00138a2f to 00138adc has its CatchHandler @ 00138b83 */ create_instruction_tracer(local_d8,(ostream *)PTR_clog_00238f88); VM::add_tracer((VM *)peVar1,local_d8); std::unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>>::~unique_ptr ((unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>> *)local_d8); local_c = 0; } else { local_e8 = local_38; local_e0 = local_30; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_f8,"histogram"); bVar2 = std::operator==(local_e8,local_e0,local_f8,local_f0); peVar1 = local_50; if (bVar2) { create_histogram_tracer(local_100,(ostream *)PTR_clog_00238f88); VM::add_tracer((VM *)peVar1,local_100); std::unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>>::~unique_ptr ((unique_ptr<evmone::Tracer,std::default_delete<evmone::Tracer>> *)local_100); local_c = 0; } else { local_110 = local_38; local_108 = local_30; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_120,"validate_eof"); bVar2 = std::operator==(local_110,local_108,local_120,local_118); if (bVar2) { *(VM *)(local_50 + 0x39) = (VM)0x1; local_c = 0; } else { local_c = 1; } } } } } return local_c; }
13,801
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/json.hpp
bool key(string_t& val) { BasicJsonType k = BasicJsonType(val); // check callback for key const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k); key_keep_stack.push_back(keep); // add discarded value at given key and store the reference for later if (keep && ref_stack.back()) { object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded); } return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi callq 0x5ee18 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0xc(%rsp) movb $0x4, 0xb(%rsp) cmpq $0x0, 0x90(%rbx) je 0x5c2d6 leaq 0x80(%rbx), %rdi leaq 0xc(%rsp), %rsi leaq 0xb(%rsp), %rdx leaq 0x10(%rsp), %rcx callq *0x98(%rbx) movl %eax, %ebp leaq 0x48(%rbx), %rdi movzbl %al, %esi callq 0x5b9d8 testb %bpl, %bpl je 0x5c2b4 movq 0x10(%rbx), %rax cmpq $0x0, -0x8(%rax) je 0x5c2b4 leaq 0xa8(%rbx), %rsi leaq 0x20(%rsp), %rdi callq 0x5d36e movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rdi movq %r14, %rsi callq 0x5ee52 leaq 0x20(%rsp), %r14 movq %rax, %rdi movq %r14, %rsi callq 0x5aaee movq %rax, 0x70(%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x5834c movq %r14, %rdi callq 0x5d83a leaq 0x10(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5834c movq %rbx, %rdi callq 0x5d83a movb $0x1, %al addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x1a300 movq %rax, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5834c movq %r14, %rdi callq 0x5d83a jmp 0x5c2fa movq %rax, %rbx leaq 0x10(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5834c movq %r14, %rdi callq 0x5d83a movq %rbx, %rdi callq 0x1af80 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_: push rbp push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+48h+var_3C], eax mov [rsp+48h+var_3D], 4 cmp qword ptr [rbx+90h], 0 jz loc_5C2D6 lea rdi, [rbx+80h] lea rsi, [rsp+48h+var_3C] lea rdx, [rsp+48h+var_3D] lea rcx, [rsp+48h+var_38] call qword ptr [rbx+98h] mov ebp, eax lea rdi, [rbx+48h] movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) test bpl, bpl jz short loc_5C2B4 mov rax, [rbx+10h] cmp qword ptr [rax-8], 0 jz short loc_5C2B4 lea rsi, [rbx+0A8h] lea rdi, [rsp+48h+var_28] 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&) mov rax, [rbx+10h] mov rax, [rax-8] mov rdi, [rax+8] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&) lea r14, [rsp+48h+var_28] mov rdi, rax mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>) mov [rbx+70h], rax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_5C2B4: lea rbx, [rsp+48h+var_38] 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 al, 1 add rsp, 30h pop rbx pop r14 pop rbp retn loc_5C2D6: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov rbx, rax lea r14, [rsp+48h+var_28] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_5C2FA mov rbx, rax loc_5C2FA: lea r14, [rsp+48h+var_38] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key( long long a1, long long a2) { unsigned __int8 v2; // bp long long v3; // rax char v5; // [rsp+Bh] [rbp-3Dh] BYREF int v6; // [rsp+Ch] [rbp-3Ch] BYREF char v7[16]; // [rsp+10h] [rbp-38h] BYREF char v8[40]; // [rsp+20h] [rbp-28h] BYREF ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v7); v6 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v5 = 4; if ( !*(_QWORD *)(a1 + 144) ) std::__throw_bad_function_call(); v2 = (*(long long ( **)(long long, int *, char *, char *))(a1 + 152))(a1 + 128, &v6, &v5, v7); std::vector<bool>::push_back(a1 + 72, v2); if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) ) { 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( v8, a1 + 168); v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL), a2); *(_QWORD *)(a1 + 112) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( v3, (long long)v8); 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(v8); 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(v8); } 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(v7); 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(v7); return 1; }
key: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] CALL 0x0015ee18 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0xc],EAX MOV byte ptr [RSP + 0xb],0x4 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0015c2d6 LEA RDI,[RBX + 0x80] LAB_0015c236: LEA RSI,[RSP + 0xc] LEA RDX,[RSP + 0xb] LEA RCX,[RSP + 0x10] CALL qword ptr [RBX + 0x98] MOV EBP,EAX LEA RDI,[RBX + 0x48] MOVZX ESI,AL CALL 0x0015b9d8 TEST BPL,BPL JZ 0x0015c2b4 MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RAX + -0x8],0x0 JZ 0x0015c2b4 LEA RSI,[RBX + 0xa8] LEA RDI,[RSP + 0x20] CALL 0x0015d36e MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RDI,qword ptr [RAX + 0x8] LAB_0015c286: MOV RSI,R14 CALL 0x0015ee52 LEA R14,[RSP + 0x20] MOV RDI,RAX MOV RSI,R14 CALL 0x0015aaee MOV qword ptr [RBX + 0x70],RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0015834c MOV RDI,R14 CALL 0x0015d83a LAB_0015c2b4: LEA RBX,[RSP + 0x10] MOV RDI,RBX XOR ESI,ESI CALL 0x0015834c MOV RDI,RBX CALL 0x0015d83a MOV AL,0x1 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0015c2d6: CALL 0x0011a300
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::key(std::__cxx11::string&) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::key(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,string *param_1) { bool bVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *pbVar2; int8 uVar3; int1 local_3d; int4 local_3c; data local_38 [16]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28 [16]; _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_ (local_38); local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_3d = 4; if (*(long *)(this + 0x90) != 0) { /* try { // try from 0015c236 to 0015c279 has its CatchHandler @ 0015c2f7 */ bVar1 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38); std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1); if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 0)) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_28,(basic_json *)(this + 0xa8)); /* try { // try from 0015c286 to 0015c28d has its CatchHandler @ 0015c2db */ pbVar2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1); uVar3 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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=(pbVar2,(data *)local_28); *(int8 *)(this + 0x70) = uVar3; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_28,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_28); } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); return 1; } /* WARNING: Subroutine does not return */ /* try { // try from 0015c2d6 to 0015c2da has its CatchHandler @ 0015c2f7 */ std::__throw_bad_function_call(); }
13,802
LefDefParser::lefiDensity::clear()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
void lefiDensity::clear() { for (int i = 0; i < numLayers_; i++) { lefFree(layerName_[i]); lefFree((char*) rects_[i]); lefFree((char*) densityValue_[i]); numRects_[i] = 0; rectsAllocated_[i] = 0; } lefFree(layerName_); lefFree((char*) (rects_)); lefFree((char*) (densityValue_)); lefFree((char*) (numRects_)); lefFree((char*) (rectsAllocated_)); layerName_ = 0; numLayers_ = 0; layersAllocated_ = 0; numRects_ = 0; rects_ = 0; densityValue_ = 0; rectsAllocated_ = 0; }
O3
cpp
LefDefParser::lefiDensity::clear(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx cmpl $0x0, (%rdi) jle 0x27d57 xorl %r14d, %r14d xorl %r15d, %r15d movq 0x8(%rbx), %rax movq (%rax,%r15,8), %rdi callq 0x26040 movq 0x20(%rbx), %rax movq (%rax,%r15,8), %rdi callq 0x26040 movq 0x28(%rbx), %rax movq (%rax,%r15,8), %rdi callq 0x26040 movq 0x10(%rbx), %rax movl %r14d, (%rax,%r15,4) movq 0x18(%rbx), %rax movl %r14d, (%rax,%r15,4) incq %r15 movslq (%rbx), %rax cmpq %rax, %r15 jl 0x27d15 movq 0x8(%rbx), %rdi callq 0x26040 movq 0x20(%rbx), %rdi callq 0x26040 movq 0x28(%rbx), %rdi callq 0x26040 movq 0x10(%rbx), %rdi callq 0x26040 movq 0x18(%rbx), %rdi callq 0x26040 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN12LefDefParser11lefiDensity5clearEv: push r15 push r14 push rbx mov rbx, rdi cmp dword ptr [rdi], 0 jle short loc_27D57 xor r14d, r14d xor r15d, r15d loc_27D15: mov rax, [rbx+8] mov rdi, [rax+r15*8]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rbx+20h] mov rdi, [rax+r15*8]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rbx+28h] mov rdi, [rax+r15*8]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rax, [rbx+10h] mov [rax+r15*4], r14d mov rax, [rbx+18h] mov [rax+r15*4], r14d inc r15 movsxd rax, dword ptr [rbx] cmp r15, rax jl short loc_27D15 loc_27D57: mov rdi, [rbx+8]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+20h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+28h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+10h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, [rbx+18h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r14 pop r15 retn
long long LefDefParser::lefiDensity::clear(LefDefParser::lefiDensity *this, void *a2) { long long v2; // r15 long long result; // rax if ( *(int *)this > 0 ) { v2 = 0LL; do { LefDefParser::lefFree(*(LefDefParser **)(*((_QWORD *)this + 1) + 8 * v2), a2); LefDefParser::lefFree(*(LefDefParser **)(*((_QWORD *)this + 4) + 8 * v2), a2); LefDefParser::lefFree(*(LefDefParser **)(*((_QWORD *)this + 5) + 8 * v2), a2); *(_DWORD *)(*((_QWORD *)this + 2) + 4 * v2) = 0; *(_DWORD *)(*((_QWORD *)this + 3) + 4 * v2++) = 0; } while ( v2 < *(int *)this ); } LefDefParser::lefFree(*((LefDefParser **)this + 1), a2); LefDefParser::lefFree(*((LefDefParser **)this + 4), a2); LefDefParser::lefFree(*((LefDefParser **)this + 5), a2); LefDefParser::lefFree(*((LefDefParser **)this + 2), a2); result = LefDefParser::lefFree(*((LefDefParser **)this + 3), a2); *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; return result; }
clear: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI],0x0 JLE 0x00127d57 XOR R14D,R14D XOR R15D,R15D LAB_00127d15: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R15*0x8] CALL 0x00126040 MOV RAX,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX + R15*0x8] CALL 0x00126040 MOV RAX,qword ptr [RBX + 0x28] MOV RDI,qword ptr [RAX + R15*0x8] CALL 0x00126040 MOV RAX,qword ptr [RBX + 0x10] MOV dword ptr [RAX + R15*0x4],R14D MOV RAX,qword ptr [RBX + 0x18] MOV dword ptr [RAX + R15*0x4],R14D INC R15 MOVSXD RAX,dword ptr [RBX] CMP R15,RAX JL 0x00127d15 LAB_00127d57: MOV RDI,qword ptr [RBX + 0x8] CALL 0x00126040 MOV RDI,qword ptr [RBX + 0x20] CALL 0x00126040 MOV RDI,qword ptr [RBX + 0x28] CALL 0x00126040 MOV RDI,qword ptr [RBX + 0x10] CALL 0x00126040 MOV RDI,qword ptr [RBX + 0x18] CALL 0x00126040 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R14 POP R15 RET
/* LefDefParser::lefiDensity::clear() */ void __thiscall LefDefParser::lefiDensity::clear(lefiDensity *this) { long lVar1; if (0 < *(int *)this) { lVar1 = 0; do { lefFree(*(void **)(*(long *)(this + 8) + lVar1 * 8)); lefFree(*(void **)(*(long *)(this + 0x20) + lVar1 * 8)); lefFree(*(void **)(*(long *)(this + 0x28) + lVar1 * 8)); *(int4 *)(*(long *)(this + 0x10) + lVar1 * 4) = 0; *(int4 *)(*(long *)(this + 0x18) + lVar1 * 4) = 0; lVar1 = lVar1 + 1; } while (lVar1 < *(int *)this); } lefFree(*(void **)(this + 8)); lefFree(*(void **)(this + 0x20)); lefFree(*(void **)(this + 0x28)); lefFree(*(void **)(this + 0x10)); lefFree(*(void **)(this + 0x18)); *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; return; }
13,803
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printv_error: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq %rcx, -0x230(%rbp) jmp 0xf1545 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx movq -0x230(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0x14ec00 leaq 0x1d07f5(%rip), %rax # 0x2c1d60 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0xf1586 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xf15a1 addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
my_printv_error: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_230], rcx jmp short $+2 loc_F1545: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] mov rcx, [rbp+var_230] mov esi, 200h call my_vsnprintf lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_F1586: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_F15A1 add rsp, 230h pop rbp retn loc_F15A1: call ___stack_chk_fail
unsigned long long my_printv_error(long long a1, long long a2, long long a3, long long a4) { _BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v6; // [rsp+228h] [rbp-8h] v6 = __readfsqword(0x28u); my_vsnprintf(v5, 512LL, a2, a4); error_handler_hook(); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV qword ptr [RBP + -0x230],RCX JMP 0x001f1545 LAB_001f1545: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] MOV ESI,0x200 CALL 0x0024ec00 LEA RAX,[0x3c1d60] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x001f1586 LAB_001f1586: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001f15a1 ADD RSP,0x230 POP RBP RET LAB_001f15a1: CALL 0x0012a250
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4) { long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_218,0x200,param_2,param_4); (*(code *)error_handler_hook)(param_1,local_218,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,804
OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTableFactory.cpp
StencilTableReal<REAL> const * StencilTableFactoryReal<REAL>::Create(TopologyRefiner const & refiner, Options options) { bool interpolateVertex = options.interpolationMode==INTERPOLATE_VERTEX; bool interpolateVarying = options.interpolationMode==INTERPOLATE_VARYING; bool interpolateFaceVarying = options.interpolationMode==INTERPOLATE_FACE_VARYING; int numControlVertices = !interpolateFaceVarying ? refiner.GetLevel(0).GetNumVertices() : refiner.GetLevel(0).GetNumFVarValues(options.fvarChannel); int maxlevel = std::min(int(options.maxLevel), refiner.GetMaxLevel()); if (maxlevel==0 && (! options.generateControlVerts)) { StencilTableReal<REAL> * result = new StencilTableReal<REAL>; result->_numControlVertices = numControlVertices; return result; } StencilBuilder<REAL> builder(numControlVertices, /*genControlVerts*/ true, /*compactWeights*/ true); // // Interpolate stencils for each refinement level // PrimvarRefinerReal<REAL> primvarRefiner(refiner); typename StencilBuilder<REAL>::Index srcIndex(&builder, 0); typename StencilBuilder<REAL>::Index dstIndex(&builder, numControlVertices); for (int level=1; level<=maxlevel; ++level) { if (interpolateVertex) { primvarRefiner.Interpolate(level, srcIndex, dstIndex); } else if (interpolateVarying) { primvarRefiner.InterpolateVarying(level, srcIndex, dstIndex); } else { primvarRefiner.InterpolateFaceVarying(level, srcIndex, dstIndex, options.fvarChannel); } if (options.factorizeIntermediateLevels) { srcIndex = dstIndex; } int dstVertex = !interpolateFaceVarying ? refiner.GetLevel(level).GetNumVertices() : refiner.GetLevel(level).GetNumFVarValues(options.fvarChannel); dstIndex = dstIndex[dstVertex]; if (! options.factorizeIntermediateLevels) { // All previous verts are considered as coarse verts, as a // result, we don't update the srcIndex and update the coarse // vertex count. builder.SetCoarseVertCount(dstIndex.GetOffset()); } } size_t firstOffset = numControlVertices; if (! options.generateIntermediateLevels) firstOffset = srcIndex.GetOffset(); // Copy stencils from the StencilBuilder into the StencilTable. // Always initialize numControlVertices (useful for torus case) StencilTableReal<REAL> * result = new StencilTableReal<REAL>(numControlVertices, builder.GetStencilOffsets(), builder.GetStencilSizes(), builder.GetStencilSources(), builder.GetStencilWeights(), options.generateControlVerts, firstOffset); return result; }
O2
cpp
OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rax shrq $0x20, %rax movl %r14d, %ebx andl $0x3, %ebx movq 0x60(%rdi), %rdi cmpw $0x2, %bx movq %rax, 0x40(%rsp) jne 0x84db5 movq %rax, %rsi callq 0x503d0 movl %eax, %r13d jmp 0x84dbc movq (%rdi), %rax movl 0x8(%rax), %r13d movzwl %r14w, %ebp shrl $0x6, %ebp movl %ebp, %eax andl $0xf, %eax movzwl 0x8(%r15), %r12d shrl $0x6, %r12d movl %r12d, %ecx andl $0xf, %ecx cmpw %ax, %cx cmovael %eax, %ecx movl %r14d, %eax andl $0x8, %eax orw %ax, %cx je 0x84f87 movl %eax, 0x28(%rsp) movl %r13d, %esi movl %r13d, 0xc(%rsp) movq %rsp, %r13 pushq $0x1 popq %rcx movq %r13, %rdi movl %ecx, %edx callq 0x529d0 leaq 0x20(%rsp), %rax movq %r15, (%rax) leaq 0x30(%rsp), %rax movq %r13, (%rax) andl $0x0, 0x8(%rax) leaq 0x10(%rsp), %rdx movq %r13, (%rdx) movzwl %r12w, %eax andl $0xf, %eax movzwl %bp, %r13d andl $0xf, %r13d cmpq %r13, %rax cmovbq %rax, %r13 movl 0xc(%rsp), %eax movl %eax, 0x8(%rdx) pushq $0x18 popq %r12 xorl %ebp, %ebp movzwl %bx, %eax movl %eax, 0x2c(%rsp) cmpq %rbp, %r13 je 0x84f0a incq %rbp cmpw $0x1, %bx je 0x84e7f cmpl $0x0, 0x2c(%rsp) jne 0x84e97 leaq 0x20(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x10(%rsp), %rcx callq 0x55630 jmp 0x84eb2 leaq 0x20(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x10(%rsp), %rcx callq 0x546d0 jmp 0x84eb2 leaq 0x20(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x10(%rsp), %rcx movq 0x40(%rsp), %r8 callq 0x54d80 testb $0x20, %r14b je 0x84eca movl 0x18(%rsp), %eax movl %eax, 0x38(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x60(%r15), %rdi addq %r12, %rdi cmpw $0x2, %bx jne 0x84ee3 movq 0x40(%rsp), %rsi callq 0x503d0 jmp 0x84ee9 movq (%rdi), %rax movl 0x8(%rax), %eax addl 0x18(%rsp), %eax movl %eax, 0x18(%rsp) testb $0x20, %r14b jne 0x84f01 movq %rsp, %rdi movl %eax, %esi callq 0x52dd0 addq $0x18, %r12 jmp 0x84e4e movl 0xc(%rsp), %r13d movl %r13d, %ebp testb $0x10, %r14b jne 0x84f1c movl 0x38(%rsp), %ebp pushq $0x70 popq %rdi callq 0x52790 movq %rax, %rbx movq %rsp, %rdi callq 0x538e0 movq %rax, %r14 movq %rsp, %rdi callq 0x4fb90 movq %rax, %r15 movq %rsp, %rdi callq 0x547a0 movq %rax, %r12 movq %rsp, %rdi callq 0x50f20 movslq %ebp, %r10 xorl %r11d, %r11d cmpw $0x0, 0x28(%rsp) setne %r11b movq %rbx, %rdi movl %r13d, %esi movq %r14, %rdx movq %r15, %rcx movq %r12, %r8 movq %rax, %r9 pushq %r10 pushq %r11 callq 0x54e50 popq %rax popq %rcx movq %rsp, %rdi callq 0x51150 jmp 0x84fbf pushq $0x70 popq %rdi callq 0x52790 movq %rax, %rbx movq 0x6beff(%rip), %rax # 0xf0e98 addq $0x10, %rax movq %rax, (%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movl %r13d, 0x8(%rbx) movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x84fe5 movq %rax, %r14 pushq $0x70 popq %rsi movq %rbx, %rdi callq 0x528b0 jmp 0x84fe8 jmp 0x84fe5 movq %rax, %r14 movq %rsp, %rdi callq 0x51150 movq %r14, %rdi callq 0x55300
_ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIdE6CreateERKNS1_15TopologyRefinerENS3_7OptionsE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov r15, rdi mov rax, rsi shr rax, 20h mov ebx, r14d and ebx, 3 mov rdi, [rdi+60h]; this cmp bx, 2 mov qword ptr [rsp+78h+var_38], rax jnz short loc_84DB5 mov rsi, rax; int call __ZNK10OpenSubdiv6v3_6_03Far13TopologyLevel16GetNumFVarValuesEi; OpenSubdiv::v3_6_0::Far::TopologyLevel::GetNumFVarValues(int) mov r13d, eax jmp short loc_84DBC loc_84DB5: mov rax, [rdi] mov r13d, [rax+8] loc_84DBC: movzx ebp, r14w shr ebp, 6 mov eax, ebp and eax, 0Fh movzx r12d, word ptr [r15+8] shr r12d, 6 mov ecx, r12d and ecx, 0Fh cmp cx, ax cmovnb ecx, eax mov eax, r14d and eax, 8 or cx, ax jz loc_84F87 mov [rsp+78h+var_50], eax mov esi, r13d mov [rsp+78h+var_6C], r13d mov r13, rsp push 1 pop rcx mov rdi, r13 mov edx, ecx call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdEC2Eibb; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::StencilBuilder(int,bool,bool) lea rax, [rsp+78h+var_58] mov [rax], r15 lea rax, [rsp+78h+var_48] mov [rax], r13 and dword ptr [rax+8], 0 lea rdx, [rsp+78h+var_68] mov [rdx], r13 movzx eax, r12w and eax, 0Fh movzx r13d, bp and r13d, 0Fh cmp rax, r13 cmovb r13, rax mov eax, [rsp+78h+var_6C] mov [rdx+8], eax push 18h pop r12 xor ebp, ebp movzx eax, bx mov [rsp+78h+var_4C], eax loc_84E4E: cmp r13, rbp jz loc_84F0A inc rbp cmp bx, 1 jz short loc_84E7F cmp [rsp+78h+var_4C], 0 jnz short loc_84E97 lea rdi, [rsp+78h+var_58]; int mov esi, ebp; int lea rdx, [rsp+78h+var_48]; int lea rcx, [rsp+78h+var_68]; int call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE11InterpolateINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &) jmp short loc_84EB2 loc_84E7F: lea rdi, [rsp+78h+var_58] mov esi, ebp lea rdx, [rsp+78h+var_48] lea rcx, [rsp+78h+var_68] call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE18InterpolateVaryingINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &) jmp short loc_84EB2 loc_84E97: lea rdi, [rsp+78h+var_58]; int mov esi, ebp; int lea rdx, [rsp+78h+var_48]; int lea rcx, [rsp+78h+var_68]; int mov r8, qword ptr [rsp+78h+var_38]; int call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE22InterpolateFaceVaryingINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_i; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &,int) loc_84EB2: test r14b, 20h jz short loc_84ECA mov eax, [rsp+78h+var_60] mov [rsp+78h+var_40], eax mov rax, qword ptr [rsp+78h+var_68] mov qword ptr [rsp+78h+var_48], rax loc_84ECA: mov rdi, [r15+60h] add rdi, r12; this cmp bx, 2 jnz short loc_84EE3 mov rsi, qword ptr [rsp+78h+var_38]; int call __ZNK10OpenSubdiv6v3_6_03Far13TopologyLevel16GetNumFVarValuesEi; OpenSubdiv::v3_6_0::Far::TopologyLevel::GetNumFVarValues(int) jmp short loc_84EE9 loc_84EE3: mov rax, [rdi] mov eax, [rax+8] loc_84EE9: add eax, [rsp+78h+var_60] mov [rsp+78h+var_60], eax test r14b, 20h jnz short loc_84F01 mov rdi, rsp mov esi, eax call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE18SetCoarseVertCountEi; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::SetCoarseVertCount(int) loc_84F01: add r12, 18h jmp loc_84E4E loc_84F0A: mov r13d, [rsp+78h+var_6C] mov ebp, r13d test r14b, 10h jnz short loc_84F1C mov ebp, [rsp+78h+var_40] loc_84F1C: push 70h ; 'p' pop rdi; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rsp call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilOffsetsEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilOffsets(void) mov r14, rax mov rdi, rsp call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE15GetStencilSizesEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSizes(void) mov r15, rax mov rdi, rsp call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilSourcesEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSources(void) mov r12, rax mov rdi, rsp call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilWeightsEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilWeights(void) movsxd r10, ebp xor r11d, r11d cmp word ptr [rsp+78h+var_50], 0 setnz r11b mov rdi, rbx mov esi, r13d mov rdx, r14 mov rcx, r15 mov r8, r12 mov r9, rax push r10 push r11 call __ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm; OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int,std::vector<int> const&,std::vector<int> const&,std::vector<int> const&,std::vector const&<double,std::allocator<double>>,bool,ulong) pop rax pop rcx mov rdi, rsp call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdED2Ev; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder() jmp short loc_84FBF loc_84F87: push 70h ; 'p' pop rdi; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEE_ptr add rax, 10h mov [rbx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 mov [rbx+8], r13d loc_84FBF: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_84FE5 mov r14, rax push 70h ; 'p' pop rsi; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_84FE8 jmp short $+2 loc_84FE5: mov r14, rax loc_84FE8: mov rdi, rsp call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdED2Ev; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder() mov rdi, r14 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(long long a1, unsigned long long a2) { __int16 v3; // bx OpenSubdiv::v3_6_0::Far::TopologyLevel *v4; // rdi unsigned int NumFVarValues; // r13d int v6; // ebp int v7; // r12d unsigned __int16 v8; // cx unsigned long long v9; // r13 long long v10; // r12 long long v11; // rbp OpenSubdiv::v3_6_0::Far::TopologyLevel *v12; // rdi int v13; // eax unsigned int v14; // eax int v15; // r13d int v16; // ebp long long v17; // rbx _QWORD *StencilOffsets; // r14 long long *StencilSizes; // r15 _QWORD *StencilSources; // r12 _QWORD *StencilWeights; // rax _BYTE v23[12]; // [rsp+0h] [rbp-78h] BYREF int v24; // [rsp+Ch] [rbp-6Ch] int v25[2]; // [rsp+10h] [rbp-68h] BYREF int v26; // [rsp+18h] [rbp-60h] long long v27; // [rsp+20h] [rbp-58h] BYREF int v28; // [rsp+28h] [rbp-50h] int v29; // [rsp+2Ch] [rbp-4Ch] int v30[2]; // [rsp+30h] [rbp-48h] BYREF int v31; // [rsp+38h] [rbp-40h] int v32[14]; // [rsp+40h] [rbp-38h] v3 = a2 & 3; v4 = *(OpenSubdiv::v3_6_0::Far::TopologyLevel **)(a1 + 96); *(_QWORD *)v32 = HIDWORD(a2); if ( v3 == 2 ) NumFVarValues = OpenSubdiv::v3_6_0::Far::TopologyLevel::GetNumFVarValues(v4, SHIDWORD(a2)); else NumFVarValues = *(_DWORD *)(*(_QWORD *)v4 + 8LL); v6 = (unsigned __int16)a2 >> 6; v7 = *(unsigned __int16 *)(a1 + 8) >> 6; v8 = v7 & 0xF; if ( (unsigned __int16)((*(_WORD *)(a1 + 8) >> 6) & 0xF) >= (unsigned __int16)(((unsigned __int16)a2 >> 6) & 0xF) ) v8 = v6 & 0xF; if ( a2 & 8 | v8 ) { v28 = a2 & 8; v24 = NumFVarValues; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::StencilBuilder(v23, NumFVarValues, 1LL); v27 = a1; *(_QWORD *)v30 = v23; v31 = 0; *(_QWORD *)v25 = v23; v9 = v6 & 0xF; if ( (v7 & 0xFu) < v9 ) v9 = v7 & 0xF; v26 = v24; v10 = 24LL; v11 = 0LL; v29 = a2 & 3; while ( v9 != v11 ) { ++v11; if ( v3 == 1 ) { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( &v27, (unsigned int)v11, v30, v25); } else if ( v29 ) { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( (int)&v27, v11, (int)v30, (int)v25, v32[0]); } else { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( (int)&v27, v11, (int)v30, (int)v25); } if ( (a2 & 0x20) != 0 ) { v31 = v26; *(_QWORD *)v30 = *(_QWORD *)v25; } v12 = (OpenSubdiv::v3_6_0::Far::TopologyLevel *)(v10 + *(_QWORD *)(a1 + 96)); if ( v3 == 2 ) v13 = OpenSubdiv::v3_6_0::Far::TopologyLevel::GetNumFVarValues(v12, v32[0]); else v13 = *(_DWORD *)(*(_QWORD *)v12 + 8LL); v14 = v26 + v13; v26 = v14; if ( (a2 & 0x20) == 0 ) OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::SetCoarseVertCount(v23, v14); v10 += 24LL; } v15 = v24; v16 = v24; if ( (a2 & 0x10) == 0 ) v16 = v31; v17 = operator new(0x70uLL); StencilOffsets = (_QWORD *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilOffsets(v23); StencilSizes = (long long *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSizes(v23); StencilSources = (_QWORD *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSources(v23); StencilWeights = (_QWORD *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilWeights(v23); OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal( v17, v15, StencilOffsets, StencilSizes, StencilSources, StencilWeights, (_WORD)v28 != 0, v16); OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder(v23); } else { v17 = operator new(0x70uLL); *(_QWORD *)v17 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<double> + 2; *(_OWORD *)(v17 + 16) = 0LL; *(_OWORD *)(v17 + 32) = 0LL; *(_OWORD *)(v17 + 48) = 0LL; *(_OWORD *)(v17 + 64) = 0LL; *(_OWORD *)(v17 + 80) = 0LL; *(_OWORD *)(v17 + 96) = 0LL; *(_DWORD *)(v17 + 8) = NumFVarValues; } return v17; }
Create: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV R15,RDI MOV RAX,RSI SHR RAX,0x20 MOV EBX,R14D AND EBX,0x3 MOV RDI,qword ptr [RDI + 0x60] CMP BX,0x2 MOV qword ptr [RSP + 0x40],RAX JNZ 0x00184db5 MOV RSI,RAX CALL 0x001503d0 MOV R13D,EAX JMP 0x00184dbc LAB_00184db5: MOV RAX,qword ptr [RDI] MOV R13D,dword ptr [RAX + 0x8] LAB_00184dbc: MOVZX EBP,R14W SHR EBP,0x6 MOV EAX,EBP AND EAX,0xf MOVZX R12D,word ptr [R15 + 0x8] SHR R12D,0x6 MOV ECX,R12D AND ECX,0xf CMP CX,AX CMOVNC ECX,EAX MOV EAX,R14D AND EAX,0x8 OR CX,AX JZ 0x00184f87 MOV dword ptr [RSP + 0x28],EAX MOV ESI,R13D MOV dword ptr [RSP + 0xc],R13D MOV R13,RSP PUSH 0x1 POP RCX MOV RDI,R13 MOV EDX,ECX CALL 0x001529d0 LEA RAX,[RSP + 0x20] MOV qword ptr [RAX],R15 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX],R13 AND dword ptr [RAX + 0x8],0x0 LEA RDX,[RSP + 0x10] MOV qword ptr [RDX],R13 MOVZX EAX,R12W AND EAX,0xf MOVZX R13D,BP AND R13D,0xf CMP RAX,R13 CMOVC R13,RAX MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RDX + 0x8],EAX PUSH 0x18 POP R12 XOR EBP,EBP MOVZX EAX,BX MOV dword ptr [RSP + 0x2c],EAX LAB_00184e4e: CMP R13,RBP JZ 0x00184f0a INC RBP CMP BX,0x1 JZ 0x00184e7f CMP dword ptr [RSP + 0x2c],0x0 JNZ 0x00184e97 LAB_00184e67: LEA RDI,[RSP + 0x20] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x10] CALL 0x00155630 JMP 0x00184eb2 LAB_00184e7f: LEA RDI,[RSP + 0x20] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x10] CALL 0x001546d0 JMP 0x00184eb2 LAB_00184e97: LEA RDI,[RSP + 0x20] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x10] MOV R8,qword ptr [RSP + 0x40] CALL 0x00154d80 LAB_00184eb2: TEST R14B,0x20 JZ 0x00184eca MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x38],EAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX LAB_00184eca: MOV RDI,qword ptr [R15 + 0x60] ADD RDI,R12 CMP BX,0x2 JNZ 0x00184ee3 LAB_00184ed7: MOV RSI,qword ptr [RSP + 0x40] CALL 0x001503d0 JMP 0x00184ee9 LAB_00184ee3: MOV RAX,qword ptr [RDI] MOV EAX,dword ptr [RAX + 0x8] LAB_00184ee9: ADD EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x18],EAX TEST R14B,0x20 JNZ 0x00184f01 MOV RDI,RSP MOV ESI,EAX CALL 0x00152dd0 LAB_00184f01: ADD R12,0x18 JMP 0x00184e4e LAB_00184f0a: MOV R13D,dword ptr [RSP + 0xc] MOV EBP,R13D TEST R14B,0x10 JNZ 0x00184f1c MOV EBP,dword ptr [RSP + 0x38] LAB_00184f1c: PUSH 0x70 POP RDI CALL 0x00152790 LAB_00184f24: MOV RBX,RAX MOV RDI,RSP CALL 0x001538e0 MOV R14,RAX MOV RDI,RSP CALL 0x0014fb90 MOV R15,RAX MOV RDI,RSP CALL 0x001547a0 MOV R12,RAX MOV RDI,RSP CALL 0x00150f20 MOVSXD R10,EBP XOR R11D,R11D CMP word ptr [RSP + 0x28],0x0 SETNZ R11B MOV RDI,RBX MOV ESI,R13D MOV RDX,R14 MOV RCX,R15 MOV R8,R12 MOV R9,RAX PUSH R10 PUSH R11 CALL 0x00154e50 POP RAX POP RCX LAB_00184f7d: MOV RDI,RSP CALL 0x00151150 JMP 0x00184fbf LAB_00184f87: PUSH 0x70 POP RDI CALL 0x00152790 MOV RBX,RAX MOV RAX,qword ptr [0x001f0e98] ADD RAX,0x10 MOV qword ptr [RBX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV dword ptr [RBX + 0x8],R13D LAB_00184fbf: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options) */ StencilTableReal<double> * OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(long param_1,ulong param_2) { ushort uVar1; ushort uVar2; int iVar3; StencilTableReal<double> *this; vector *pvVar4; vector *pvVar5; vector *pvVar6; vector *pvVar7; ushort uVar8; short sVar9; uint uVar10; int iVar11; ulong uVar12; TopologyLevel *this_00; long lVar13; ulong uVar14; StencilBuilder<double> aSStack_78 [12]; int local_6c; int1 *local_68; int local_60; long local_58; uint local_50; uint local_4c; int1 *local_48; int local_40; ulong local_38; local_38 = param_2 >> 0x20; uVar10 = (uint)param_2 & 3; sVar9 = (short)uVar10; if (sVar9 == 2) { local_6c = TopologyLevel::GetNumFVarValues (*(TopologyLevel **)(param_1 + 0x60),(int)(param_2 >> 0x20)); } else { local_6c = *(int *)(*(long *)*(TopologyLevel **)(param_1 + 0x60) + 8); } uVar14 = (param_2 & 0xffff) >> 6; uVar2 = (ushort)uVar14 & 0xf; uVar1 = *(ushort *)(param_1 + 8) >> 6; uVar8 = uVar1 & 0xf; if (uVar2 <= uVar8) { uVar8 = uVar2; } local_50 = (uint)param_2 & 8; if (uVar8 == 0 && (short)local_50 == 0) { this = (StencilTableReal<double> *)operator_new(0x70); *(int **)this = PTR_vtable_001f0e98 + 0x10; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int *)(this + 8) = local_6c; } else { internal::StencilBuilder<double>::StencilBuilder(aSStack_78,local_6c,true,true); local_40 = 0; uVar12 = (ulong)(uVar1 & 0xf); uVar14 = (ulong)((uint)uVar14 & 0xf); if (uVar12 < uVar14) { uVar14 = uVar12; } local_60 = local_6c; lVar13 = 0x18; uVar12 = 0; local_68 = aSStack_78; local_58 = param_1; local_4c = uVar10; local_48 = aSStack_78; while (iVar3 = local_6c, uVar14 != uVar12) { uVar12 = uVar12 + 1; iVar3 = (int)uVar12; if (sVar9 == 1) { PrimvarRefinerReal<double>:: InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_58,iVar3,(Index *)&local_48, (Index *)&local_68); } else if (local_4c == 0) { /* try { // try from 00184e67 to 00184eb1 has its CatchHandler @ 00184fe3 */ PrimvarRefinerReal<double>:: Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_58,iVar3,(Index *)&local_48, (Index *)&local_68); } else { PrimvarRefinerReal<double>:: InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_58,iVar3,(Index *)&local_48, (Index *)&local_68,(int)local_38); } if ((param_2 & 0x20) != 0) { local_40 = local_60; local_48 = local_68; } this_00 = (TopologyLevel *)(*(long *)(param_1 + 0x60) + lVar13); if (sVar9 == 2) { /* try { // try from 00184ed7 to 00184f00 has its CatchHandler @ 00184fe5 */ iVar3 = TopologyLevel::GetNumFVarValues(this_00,(int)local_38); } else { iVar3 = *(int *)(*(long *)this_00 + 8); } local_60 = iVar3 + local_60; if ((param_2 & 0x20) == 0) { internal::StencilBuilder<double>::SetCoarseVertCount(aSStack_78,local_60); } lVar13 = lVar13 + 0x18; } iVar11 = local_6c; if ((param_2 & 0x10) == 0) { iVar11 = local_40; } /* try { // try from 00184f1c to 00184f23 has its CatchHandler @ 00184fd1 */ this = (StencilTableReal<double> *)operator_new(0x70); /* try { // try from 00184f24 to 00184f7c has its CatchHandler @ 00184fd3 */ pvVar4 = (vector *)internal::StencilBuilder<double>::GetStencilOffsets(aSStack_78); pvVar5 = (vector *)internal::StencilBuilder<double>::GetStencilSizes(aSStack_78); pvVar6 = (vector *)internal::StencilBuilder<double>::GetStencilSources(aSStack_78); pvVar7 = (vector *)internal::StencilBuilder<double>::GetStencilWeights(aSStack_78); StencilTableReal<double>::StencilTableReal (this,iVar3,pvVar4,pvVar5,pvVar6,pvVar7,(short)local_50 != 0,(long)iVar11); internal::StencilBuilder<double>::~StencilBuilder(aSStack_78); } return this; }
13,805
OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilTableFactory.cpp
StencilTableReal<REAL> const * StencilTableFactoryReal<REAL>::Create(TopologyRefiner const & refiner, Options options) { bool interpolateVertex = options.interpolationMode==INTERPOLATE_VERTEX; bool interpolateVarying = options.interpolationMode==INTERPOLATE_VARYING; bool interpolateFaceVarying = options.interpolationMode==INTERPOLATE_FACE_VARYING; int numControlVertices = !interpolateFaceVarying ? refiner.GetLevel(0).GetNumVertices() : refiner.GetLevel(0).GetNumFVarValues(options.fvarChannel); int maxlevel = std::min(int(options.maxLevel), refiner.GetMaxLevel()); if (maxlevel==0 && (! options.generateControlVerts)) { StencilTableReal<REAL> * result = new StencilTableReal<REAL>; result->_numControlVertices = numControlVertices; return result; } StencilBuilder<REAL> builder(numControlVertices, /*genControlVerts*/ true, /*compactWeights*/ true); // // Interpolate stencils for each refinement level // PrimvarRefinerReal<REAL> primvarRefiner(refiner); typename StencilBuilder<REAL>::Index srcIndex(&builder, 0); typename StencilBuilder<REAL>::Index dstIndex(&builder, numControlVertices); for (int level=1; level<=maxlevel; ++level) { if (interpolateVertex) { primvarRefiner.Interpolate(level, srcIndex, dstIndex); } else if (interpolateVarying) { primvarRefiner.InterpolateVarying(level, srcIndex, dstIndex); } else { primvarRefiner.InterpolateFaceVarying(level, srcIndex, dstIndex, options.fvarChannel); } if (options.factorizeIntermediateLevels) { srcIndex = dstIndex; } int dstVertex = !interpolateFaceVarying ? refiner.GetLevel(level).GetNumVertices() : refiner.GetLevel(level).GetNumFVarValues(options.fvarChannel); dstIndex = dstIndex[dstVertex]; if (! options.factorizeIntermediateLevels) { // All previous verts are considered as coarse verts, as a // result, we don't update the srcIndex and update the coarse // vertex count. builder.SetCoarseVertCount(dstIndex.GetOffset()); } } size_t firstOffset = numControlVertices; if (! options.generateIntermediateLevels) firstOffset = srcIndex.GetOffset(); // Copy stencils from the StencilBuilder into the StencilTable. // Always initialize numControlVertices (useful for torus case) StencilTableReal<REAL> * result = new StencilTableReal<REAL>(numControlVertices, builder.GetStencilOffsets(), builder.GetStencilSizes(), builder.GetStencilSources(), builder.GetStencilWeights(), options.generateControlVerts, firstOffset); return result; }
O3
cpp
OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rbp shrq $0x20, %rbp movl %r14d, %ebx andl $0x3, %ebx movq 0x60(%rdi), %rax movq (%rax), %rdi cmpw $0x2, %bx jne 0x75007 movl %ebp, %esi callq 0x3ae50 jmp 0x7500a movl 0x8(%rdi), %eax movl %eax, 0xc(%rsp) movzwl %r14w, %edx shrl $0x6, %edx movl %edx, %eax andl $0xf, %eax movzwl 0x8(%r15), %r12d shrl $0x6, %r12d movl %r12d, %r13d andl $0xf, %r13d cmpw %ax, %r13w cmovael %eax, %r13d movl %r14d, %ecx andl $0x8, %ecx movl %r13d, %eax orw %cx, %ax je 0x75180 movl %edx, 0x1c(%rsp) movq %rbp, 0x50(%rsp) movl %ecx, 0x4c(%rsp) leaq 0x10(%rsp), %rdi movl $0x1, %ebp movl 0xc(%rsp), %esi movl $0x1, %edx movl $0x1, %ecx callq 0x3a380 movq %r15, 0x40(%rsp) leaq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x0, 0x38(%rsp) movq %rax, 0x20(%rsp) movl 0xc(%rsp), %eax movl %eax, 0x28(%rsp) testw %r13w, %r13w je 0x751c2 movzwl %r12w, %eax andl $0xf, %eax movzwl 0x1c(%rsp), %ecx andl $0xf, %ecx cmpq %rcx, %rax cmovbq %rax, %rcx shll $0x3, %ecx leaq (%rcx,%rcx,2), %r13 xorl %r12d, %r12d movzwl %bx, %eax movl %eax, 0x1c(%rsp) cmpw $0x1, %bx je 0x750e8 cmpl $0x0, 0x1c(%rsp) jne 0x75100 leaq 0x40(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x20(%rsp), %rcx callq 0x3bf20 jmp 0x7511b leaq 0x40(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x20(%rsp), %rcx callq 0x3b550 jmp 0x7511b leaq 0x40(%rsp), %rdi movl %ebp, %esi leaq 0x30(%rsp), %rdx leaq 0x20(%rsp), %rcx movq 0x50(%rsp), %r8 callq 0x3b990 testb $0x20, %r14b je 0x75133 movl 0x28(%rsp), %eax movl %eax, 0x38(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x60(%r15), %rax movq 0x18(%rax,%r12), %rdi cmpw $0x2, %bx jne 0x7514e movq 0x50(%rsp), %rsi callq 0x3ae50 jmp 0x75151 movl 0x8(%rdi), %eax addl 0x28(%rsp), %eax movl %eax, 0x28(%rsp) testb $0x20, %r14b jne 0x7516b leaq 0x10(%rsp), %rdi movl %eax, %esi callq 0x3a5d0 incl %ebp addq $0x18, %r12 cmpq %r12, %r13 jne 0x750c3 movl 0x38(%rsp), %ebp jmp 0x751c4 movl $0x70, %edi callq 0x3a210 movq %rax, %rbx movq 0x6cd04(%rip), %rax # 0xe1e98 addq $0x10, %rax movq %rax, (%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movups %xmm0, 0x40(%rbx) movups %xmm0, 0x50(%rbx) movups %xmm0, 0x60(%rbx) movl 0xc(%rsp), %eax movl %eax, 0x8(%rbx) jmp 0x75245 xorl %ebp, %ebp testb $0x10, %r14b cmovnel 0xc(%rsp), %ebp movl $0x70, %edi callq 0x3a210 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x3ac70 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x386b0 movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x3b5b0 movq %rax, %r12 leaq 0x10(%rsp), %rdi callq 0x39360 movslq %ebp, %r10 xorl %r11d, %r11d cmpw $0x0, 0x4c(%rsp) setne %r11b movq %rbx, %rdi movl 0xc(%rsp), %esi movq %r14, %rdx movq %r15, %rcx movq %r12, %r8 movq %rax, %r9 pushq %r10 pushq %r11 callq 0x3ba00 addq $0x10, %rsp leaq 0x10(%rsp), %rdi callq 0x39470 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7526d movq %rax, %r14 movl $0x70, %esi movq %rbx, %rdi callq 0x3a2b0 jmp 0x75270 jmp 0x7526d movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x39470 movq %r14, %rdi callq 0x3bd30
_ZN10OpenSubdiv6v3_6_03Far23StencilTableFactoryRealIdE6CreateERKNS1_15TopologyRefinerENS3_7OptionsE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov r15, rdi mov rbp, rsi shr rbp, 20h mov ebx, r14d and ebx, 3 mov rax, [rdi+60h] mov rdi, [rax]; this cmp bx, 2 jnz short loc_75007 mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level16getNumFVarValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarValues(int) jmp short loc_7500A loc_75007: mov eax, [rdi+8] loc_7500A: mov [rsp+88h+var_7C], eax movzx edx, r14w shr edx, 6 mov eax, edx and eax, 0Fh movzx r12d, word ptr [r15+8] shr r12d, 6 mov r13d, r12d and r13d, 0Fh cmp r13w, ax cmovnb r13d, eax mov ecx, r14d and ecx, 8 mov eax, r13d or ax, cx jz loc_75180 mov [rsp+88h+var_6C], edx mov qword ptr [rsp+88h+var_38], rbp mov [rsp+88h+var_3C], ecx lea rdi, [rsp+88h+var_78] mov ebp, 1 mov esi, [rsp+88h+var_7C] mov edx, 1 mov ecx, 1 call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdEC2Eibb; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::StencilBuilder(int,bool,bool) mov qword ptr [rsp+88h+var_48], r15 lea rax, [rsp+88h+var_78] mov qword ptr [rsp+88h+var_58], rax mov [rsp+88h+var_50], 0 mov qword ptr [rsp+88h+var_68], rax mov eax, [rsp+88h+var_7C] mov [rsp+88h+var_60], eax test r13w, r13w jz loc_751C2 movzx eax, r12w and eax, 0Fh movzx ecx, word ptr [rsp+88h+var_6C] and ecx, 0Fh cmp rax, rcx cmovb rcx, rax shl ecx, 3 lea r13, [rcx+rcx*2] xor r12d, r12d movzx eax, bx mov [rsp+88h+var_6C], eax loc_750C3: cmp bx, 1 jz short loc_750E8 cmp [rsp+88h+var_6C], 0 jnz short loc_75100 lea rdi, [rsp+88h+var_48]; int mov esi, ebp; int lea rdx, [rsp+88h+var_58]; int lea rcx, [rsp+88h+var_68]; int call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE11InterpolateINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &) jmp short loc_7511B loc_750E8: lea rdi, [rsp+88h+var_48] mov esi, ebp lea rdx, [rsp+88h+var_58] lea rcx, [rsp+88h+var_68] call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE18InterpolateVaryingINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &) jmp short loc_7511B loc_75100: lea rdi, [rsp+88h+var_48]; int mov esi, ebp; int lea rdx, [rsp+88h+var_58]; int lea rcx, [rsp+88h+var_68]; int mov r8, qword ptr [rsp+88h+var_38]; int call __ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE22InterpolateFaceVaryingINS1_8internal14StencilBuilderIdE5IndexES8_EEviRKT_RT0_i; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>(int,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index const&,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index &,int) loc_7511B: test r14b, 20h jz short loc_75133 mov eax, [rsp+88h+var_60] mov [rsp+88h+var_50], eax mov rax, qword ptr [rsp+88h+var_68] mov qword ptr [rsp+88h+var_58], rax loc_75133: mov rax, [r15+60h] mov rdi, [rax+r12+18h]; this cmp bx, 2 jnz short loc_7514E mov rsi, qword ptr [rsp+88h+var_38]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level16getNumFVarValuesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarValues(int) jmp short loc_75151 loc_7514E: mov eax, [rdi+8] loc_75151: add eax, [rsp+88h+var_60] mov [rsp+88h+var_60], eax test r14b, 20h jnz short loc_7516B lea rdi, [rsp+88h+var_78] mov esi, eax call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE18SetCoarseVertCountEi; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::SetCoarseVertCount(int) loc_7516B: inc ebp add r12, 18h cmp r13, r12 jnz loc_750C3 mov ebp, [rsp+88h+var_50] jmp short loc_751C4 loc_75180: mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rax, cs:_ZTVN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEE_ptr add rax, 10h mov [rbx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 movups xmmword ptr [rbx+40h], xmm0 movups xmmword ptr [rbx+50h], xmm0 movups xmmword ptr [rbx+60h], xmm0 mov eax, [rsp+88h+var_7C] mov [rbx+8], eax jmp loc_75245 loc_751C2: xor ebp, ebp loc_751C4: test r14b, 10h cmovnz ebp, [rsp+88h+var_7C] mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax lea rdi, [rsp+88h+var_78] call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilOffsetsEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilOffsets(void) mov r14, rax lea rdi, [rsp+88h+var_78] call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE15GetStencilSizesEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSizes(void) mov r15, rax lea rdi, [rsp+88h+var_78] call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilSourcesEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSources(void) mov r12, rax lea rdi, [rsp+88h+var_78] call __ZNK10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdE17GetStencilWeightsEv; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilWeights(void) movsxd r10, ebp xor r11d, r11d cmp word ptr [rsp+88h+var_3C], 0 setnz r11b mov rdi, rbx mov esi, [rsp+88h+var_7C] mov rdx, r14 mov rcx, r15 mov r8, r12 mov r9, rax push r10 push r11 call __ZN10OpenSubdiv6v3_6_03Far16StencilTableRealIdEC2EiRKSt6vectorIiSaIiEES8_S8_RKS4_IdSaIdEEbm; OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal(int,std::vector<int> const&,std::vector<int> const&,std::vector<int> const&,std::vector const&<double,std::allocator<double>>,bool,ulong) add rsp, 10h lea rdi, [rsp+88h+var_78] call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdED2Ev; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder() loc_75245: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_7526D mov r14, rax mov esi, 70h ; 'p'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75270 jmp short $+2 loc_7526D: mov r14, rax loc_75270: lea rdi, [rsp+arg_8] call __ZN10OpenSubdiv6v3_6_03Far8internal14StencilBuilderIdED2Ev; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder() mov rdi, r14 call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(long long a1, unsigned long long a2) { __int16 v3; // bx OpenSubdiv::v3_6_0::Vtr::internal::Level *v4; // rdi unsigned int NumFVarValues; // eax int v6; // r12d int v7; // r13d unsigned int v8; // ebp unsigned long long v9; // rcx long long v10; // r13 long long v11; // r12 OpenSubdiv::v3_6_0::Vtr::internal::Level *v12; // rdi int v13; // eax unsigned int v14; // eax int v15; // ebp long long v16; // rbx long long *StencilOffsets; // r14 long long *StencilSizes; // r15 _QWORD *StencilSources; // r12 _QWORD *StencilWeights; // rax int v22; // [rsp+Ch] [rbp-7Ch] _BYTE v23[12]; // [rsp+10h] [rbp-78h] BYREF int v24; // [rsp+1Ch] [rbp-6Ch] int v25[2]; // [rsp+20h] [rbp-68h] BYREF int v26; // [rsp+28h] [rbp-60h] int v27[2]; // [rsp+30h] [rbp-58h] BYREF int v28; // [rsp+38h] [rbp-50h] int v29[2]; // [rsp+40h] [rbp-48h] BYREF int v30; // [rsp+4Ch] [rbp-3Ch] int v31[14]; // [rsp+50h] [rbp-38h] v3 = a2 & 3; v4 = **(OpenSubdiv::v3_6_0::Vtr::internal::Level ***)(a1 + 96); if ( v3 == 2 ) NumFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarValues(v4, SHIDWORD(a2)); else NumFVarValues = *((_DWORD *)v4 + 2); v22 = NumFVarValues; v6 = *(unsigned __int16 *)(a1 + 8) >> 6; LOWORD(v7) = v6 & 0xF; if ( (unsigned __int16)((*(_WORD *)(a1 + 8) >> 6) & 0xF) >= (unsigned __int16)(((unsigned __int16)a2 >> 6) & 0xF) ) v7 = ((unsigned __int16)a2 >> 6) & 0xF; if ( a2 & 8 | (unsigned __int16)v7 ) { v24 = (unsigned __int16)a2 >> 6; *(_QWORD *)v31 = HIDWORD(a2); v30 = a2 & 8; v8 = 1; OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::StencilBuilder(v23, NumFVarValues, 1LL, 1LL); *(_QWORD *)v29 = a1; *(_QWORD *)v27 = v23; v28 = 0; *(_QWORD *)v25 = v23; v26 = v22; if ( (_WORD)v7 ) { v9 = v24 & 0xF; if ( (v6 & 0xFu) < v9 ) LODWORD(v9) = v6 & 0xF; v10 = 3LL * (unsigned int)(8 * v9); v11 = 0LL; v24 = a2 & 3; do { if ( v3 == 1 ) { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( v29, v8, v27, v25); } else if ( v24 ) { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( (int)v29, v8, (int)v27, (int)v25, v31[0]); } else { OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index>( (int)v29, v8, (int)v27, (int)v25); } if ( (a2 & 0x20) != 0 ) { v28 = v26; *(_QWORD *)v27 = *(_QWORD *)v25; } v12 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(a1 + 96) + v11 + 24); if ( v3 == 2 ) v13 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFVarValues(v12, v31[0]); else v13 = *((_DWORD *)v12 + 2); v14 = v26 + v13; v26 = v14; if ( (a2 & 0x20) == 0 ) OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::SetCoarseVertCount(v23, v14); ++v8; v11 += 24LL; } while ( v10 != v11 ); v15 = v28; } else { v15 = 0; } if ( (a2 & 0x10) != 0 ) v15 = v22; v16 = operator new(0x70uLL); StencilOffsets = (long long *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilOffsets(v23); StencilSizes = (long long *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSizes(v23); StencilSources = (_QWORD *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilSources(v23); StencilWeights = (_QWORD *)OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::GetStencilWeights(v23); OpenSubdiv::v3_6_0::Far::StencilTableReal<double>::StencilTableReal( v16, v22, StencilOffsets, StencilSizes, StencilSources, StencilWeights, (_WORD)v30 != 0, v15); OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::~StencilBuilder(v23); } else { v16 = operator new(0x70uLL); *(_QWORD *)v16 = &`vtable for'OpenSubdiv::v3_6_0::Far::StencilTableReal<double> + 2; *(_OWORD *)(v16 + 16) = 0LL; *(_OWORD *)(v16 + 32) = 0LL; *(_OWORD *)(v16 + 48) = 0LL; *(_OWORD *)(v16 + 64) = 0LL; *(_OWORD *)(v16 + 80) = 0LL; *(_OWORD *)(v16 + 96) = 0LL; *(_DWORD *)(v16 + 8) = v22; } return v16; }
Create: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV R15,RDI MOV RBP,RSI SHR RBP,0x20 MOV EBX,R14D AND EBX,0x3 MOV RAX,qword ptr [RDI + 0x60] MOV RDI,qword ptr [RAX] CMP BX,0x2 JNZ 0x00175007 MOV ESI,EBP CALL 0x0013ae50 JMP 0x0017500a LAB_00175007: MOV EAX,dword ptr [RDI + 0x8] LAB_0017500a: MOV dword ptr [RSP + 0xc],EAX MOVZX EDX,R14W SHR EDX,0x6 MOV EAX,EDX AND EAX,0xf MOVZX R12D,word ptr [R15 + 0x8] SHR R12D,0x6 MOV R13D,R12D AND R13D,0xf CMP R13W,AX CMOVNC R13D,EAX MOV ECX,R14D AND ECX,0x8 MOV EAX,R13D OR AX,CX JZ 0x00175180 MOV dword ptr [RSP + 0x1c],EDX MOV qword ptr [RSP + 0x50],RBP MOV dword ptr [RSP + 0x4c],ECX LEA RDI,[RSP + 0x10] MOV EBP,0x1 MOV ESI,dword ptr [RSP + 0xc] MOV EDX,0x1 MOV ECX,0x1 CALL 0x0013a380 MOV qword ptr [RSP + 0x40],R15 LEA RAX,[RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x20],RAX MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x28],EAX TEST R13W,R13W JZ 0x001751c2 MOVZX EAX,R12W AND EAX,0xf MOVZX ECX,word ptr [RSP + 0x1c] AND ECX,0xf CMP RAX,RCX CMOVC RCX,RAX SHL ECX,0x3 LEA R13,[RCX + RCX*0x2] XOR R12D,R12D MOVZX EAX,BX MOV dword ptr [RSP + 0x1c],EAX LAB_001750c3: CMP BX,0x1 JZ 0x001750e8 CMP dword ptr [RSP + 0x1c],0x0 JNZ 0x00175100 LAB_001750d0: LEA RDI,[RSP + 0x40] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x20] CALL 0x0013bf20 JMP 0x0017511b LAB_001750e8: LEA RDI,[RSP + 0x40] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x20] CALL 0x0013b550 JMP 0x0017511b LAB_00175100: LEA RDI,[RSP + 0x40] MOV ESI,EBP LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x20] MOV R8,qword ptr [RSP + 0x50] CALL 0x0013b990 LAB_0017511b: TEST R14B,0x20 JZ 0x00175133 MOV EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x38],EAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x30],RAX LAB_00175133: MOV RAX,qword ptr [R15 + 0x60] MOV RDI,qword ptr [RAX + R12*0x1 + 0x18] CMP BX,0x2 JNZ 0x0017514e LAB_00175142: MOV RSI,qword ptr [RSP + 0x50] CALL 0x0013ae50 JMP 0x00175151 LAB_0017514e: MOV EAX,dword ptr [RDI + 0x8] LAB_00175151: ADD EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x28],EAX TEST R14B,0x20 JNZ 0x0017516b LEA RDI,[RSP + 0x10] MOV ESI,EAX CALL 0x0013a5d0 LAB_0017516b: INC EBP ADD R12,0x18 CMP R13,R12 JNZ 0x001750c3 MOV EBP,dword ptr [RSP + 0x38] JMP 0x001751c4 LAB_00175180: MOV EDI,0x70 CALL 0x0013a210 MOV RBX,RAX MOV RAX,qword ptr [0x001e1e98] ADD RAX,0x10 MOV qword ptr [RBX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOVUPS xmmword ptr [RBX + 0x50],XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RBX + 0x8],EAX JMP 0x00175245 LAB_001751c2: XOR EBP,EBP LAB_001751c4: TEST R14B,0x10 CMOVNZ EBP,dword ptr [RSP + 0xc] LAB_001751cd: MOV EDI,0x70 CALL 0x0013a210 LAB_001751d7: MOV RBX,RAX LEA RDI,[RSP + 0x10] CALL 0x0013ac70 MOV R14,RAX LEA RDI,[RSP + 0x10] CALL 0x001386b0 MOV R15,RAX LEA RDI,[RSP + 0x10] CALL 0x0013b5b0 MOV R12,RAX LEA RDI,[RSP + 0x10] CALL 0x00139360 MOVSXD R10,EBP XOR R11D,R11D CMP word ptr [RSP + 0x4c],0x0 SETNZ R11B MOV RDI,RBX MOV ESI,dword ptr [RSP + 0xc] MOV RDX,R14 MOV RCX,R15 MOV R8,R12 MOV R9,RAX PUSH R10 PUSH R11 CALL 0x0013ba00 ADD RSP,0x10 LAB_0017523b: LEA RDI,[RSP + 0x10] CALL 0x00139470 LAB_00175245: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&, OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Options) */ StencilTableReal<double> * OpenSubdiv::v3_6_0::Far::StencilTableFactoryReal<double>::Create(long param_1,ulong param_2) { Level *this; ulong uVar1; ushort uVar2; ushort uVar3; int iVar4; uint uVar5; int iVar6; StencilTableReal<double> *this_00; vector *pvVar7; vector *pvVar8; vector *pvVar9; vector *pvVar10; uint uVar11; short sVar12; uint uVar13; int iVar14; long lVar15; ushort uVar16; StencilBuilder<double> local_78 [12]; uint local_6c; StencilBuilder<double> *local_68; int local_60; StencilBuilder<double> *local_58; int local_50; long local_48; uint local_3c; ulong local_38; uVar13 = (uint)param_2 & 3; sVar12 = (short)uVar13; if (sVar12 == 2) { iVar4 = Vtr::internal::Level::getNumFVarValues ((Level *)**(int8 **)(param_1 + 0x60),(int)(param_2 >> 0x20)); } else { iVar4 = *(int *)((Level *)**(int8 **)(param_1 + 0x60) + 8); } uVar1 = (param_2 & 0xffff) >> 6; local_6c = (uint)uVar1; uVar3 = (ushort)uVar1 & 0xf; uVar2 = *(ushort *)(param_1 + 8) >> 6; uVar16 = uVar2 & 0xf; if (uVar3 <= uVar16) { uVar16 = uVar3; } local_3c = (uint)param_2 & 8; if (uVar16 == 0 && (short)local_3c == 0) { this_00 = (StencilTableReal<double> *)operator_new(0x70); *(int **)this_00 = PTR_vtable_001e1e98 + 0x10; *(int8 *)(this_00 + 0x10) = 0; *(int8 *)(this_00 + 0x18) = 0; *(int8 *)(this_00 + 0x20) = 0; *(int8 *)(this_00 + 0x28) = 0; *(int8 *)(this_00 + 0x30) = 0; *(int8 *)(this_00 + 0x38) = 0; *(int8 *)(this_00 + 0x40) = 0; *(int8 *)(this_00 + 0x48) = 0; *(int8 *)(this_00 + 0x50) = 0; *(int8 *)(this_00 + 0x58) = 0; *(int8 *)(this_00 + 0x60) = 0; *(int8 *)(this_00 + 0x68) = 0; *(int *)(this_00 + 8) = iVar4; } else { iVar14 = 1; local_38 = param_2 >> 0x20; internal::StencilBuilder<double>::StencilBuilder(local_78,iVar4,true,true); local_68 = local_78; local_50 = 0; local_60 = iVar4; local_58 = local_68; local_48 = param_1; if (uVar16 != 0) { uVar5 = uVar2 & 0xf; uVar11 = local_6c & 0xf; if (uVar5 < (local_6c & 0xf)) { uVar11 = uVar5; } lVar15 = 0; local_6c = uVar13; do { if (sVar12 == 1) { PrimvarRefinerReal<double>:: InterpolateVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_48,iVar14,(Index *)&local_58, (Index *)&local_68); } else if (local_6c == 0) { /* try { // try from 001750d0 to 0017511a has its CatchHandler @ 0017526b */ PrimvarRefinerReal<double>:: Interpolate<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_48,iVar14,(Index *)&local_58, (Index *)&local_68); } else { PrimvarRefinerReal<double>:: InterpolateFaceVarying<OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index,OpenSubdiv::v3_6_0::Far::internal::StencilBuilder<double>::Index> ((PrimvarRefinerReal<double> *)&local_48,iVar14,(Index *)&local_58, (Index *)&local_68,(int)local_38); } if ((param_2 & 0x20) != 0) { local_50 = local_60; local_58 = local_68; } this = *(Level **)(*(long *)(param_1 + 0x60) + 0x18 + lVar15); if (sVar12 == 2) { /* try { // try from 00175142 to 0017516a has its CatchHandler @ 0017526d */ iVar6 = Vtr::internal::Level::getNumFVarValues(this,(int)local_38); } else { iVar6 = *(int *)(this + 8); } local_60 = iVar6 + local_60; if ((param_2 & 0x20) == 0) { internal::StencilBuilder<double>::SetCoarseVertCount(local_78,local_60); } iVar14 = iVar14 + 1; lVar15 = lVar15 + 0x18; } while ((ulong)(uVar11 << 3) * 3 != lVar15); } iVar14 = local_50; if ((param_2 & 0x10) != 0) { iVar14 = iVar4; } /* try { // try from 001751cd to 001751d6 has its CatchHandler @ 00175257 */ this_00 = (StencilTableReal<double> *)operator_new(0x70); /* try { // try from 001751d7 to 0017523a has its CatchHandler @ 00175259 */ pvVar7 = (vector *)internal::StencilBuilder<double>::GetStencilOffsets(local_78); pvVar8 = (vector *)internal::StencilBuilder<double>::GetStencilSizes(local_78); pvVar9 = (vector *)internal::StencilBuilder<double>::GetStencilSources(local_78); pvVar10 = (vector *)internal::StencilBuilder<double>::GetStencilWeights(local_78); StencilTableReal<double>::StencilTableReal (this_00,iVar4,pvVar7,pvVar8,pvVar9,pvVar10,(short)local_3c != 0,(long)iVar14); internal::StencilBuilder<double>::~StencilBuilder(local_78); } return this_00; }
13,806
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int)
llama.cpp/common/common.cpp
void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); std::unordered_map<llama_seq_id, size_t> seqs; llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] < 0) { continue; } if (seqs.find(cs_curr[j]) == seqs.end()) { if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } const size_t sz = seqs.size(); seqs[cs_curr[j]] = sz; } } if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } } printf("=== Sequence legend: "); for (const auto & it : seqs) { printf("%zu=%d, ", it.second, it.first); } printf("'+'=other sequence ids"); c_curr = view.cells; cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { const auto & it = seqs.find(cs_curr[j]); putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+'); } else { putchar('.'); } } putchar(' '); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %esi, 0x14(%rsp) movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x13141(%rip), %rdi # 0x32a6c movq $0x0, 0x18(%rsp) xorl %eax, %eax callq 0x150b0 leaq 0x50(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) cmpl $0x0, (%r14) jle 0x1f9ee movq 0x20(%r14), %rbp movl 0x4(%r14), %eax leaq 0x20(%rsp), %r15 xorl %ebx, %ebx testl %eax, %eax jle 0x1f9ca movq %rbp, %r12 xorl %r13d, %r13d cmpl $0x0, (%r12) js 0x1f9b5 movq %r15, %rdi movq %r12, %rsi callq 0x2f0aa testq %rax, %rax jne 0x1f9b5 movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x1f9ca movq %r15, %rdi movq %r12, %rsi callq 0x2f122 movq %rbx, (%rax) incq %r13 movslq 0x4(%r14), %rax addq $0x4, %r12 cmpq %rax, %r13 jl 0x1f981 movq 0x38(%rsp), %rbx leaq -0x3e(%rbx), %rax cmpq $-0x3f, %rax jb 0x1f9ee movq 0x18(%rsp), %rcx incl %ecx movslq 0x4(%r14), %rax leaq (%rbp,%rax,4), %rbp movq %rcx, 0x18(%rsp) cmpl (%r14), %ecx jl 0x1f977 leaq 0x13102(%rip), %rdi # 0x32af7 xorl %eax, %eax callq 0x150b0 movq 0x30(%rsp), %rbx testq %rbx, %rbx je 0x1fa26 leaq 0x13100(%rip), %r15 # 0x32b0d movq 0x10(%rbx), %rsi movl 0x8(%rbx), %edx movq %r15, %rdi xorl %eax, %eax callq 0x150b0 movq (%rbx), %rbx testq %rbx, %rbx jne 0x1fa0d leaq 0x130e9(%rip), %rdi # 0x32b16 xorl %eax, %eax callq 0x150b0 cmpl $0x0, (%r14) jle 0x1fad6 movq 0x20(%r14), %r15 leaq 0x20(%rsp), %r12 xorl %ebp, %ebp movl %ebp, %eax cltd idivl 0x14(%rsp) testl %edx, %edx jne 0x1fa64 leaq 0x1300a(%rip), %rdi # 0x32a65 movl %ebp, %esi xorl %eax, %eax callq 0x150b0 cmpl $0x0, 0x4(%r14) jle 0x1fab9 movq %r15, %r13 xorl %ebx, %ebx cmpl $0x0, (%r13) js 0x1fa98 movq %r12, %rdi movq %r13, %rsi callq 0x2f0aa testq %rax, %rax je 0x1fa9f movq 0x10(%rax), %rax leaq 0x13b2e(%rip), %rcx # 0x335c0 movsbl (%rax,%rcx), %edi jmp 0x1faa4 movl $0x2e, %edi jmp 0x1faa4 movl $0x2b, %edi callq 0x15bf0 incq %rbx movslq 0x4(%r14), %rax addq $0x4, %r13 cmpq %rax, %rbx jl 0x1fa70 movl $0x20, %edi callq 0x15bf0 incl %ebp movslq 0x4(%r14), %rax leaq (%r15,%rax,4), %r15 cmpl (%r14), %ebp jl 0x1fa49 leaq 0x13a87(%rip), %rdi # 0x33564 callq 0x15a80 leaq 0x20(%rsp), %rdi callq 0x2048a addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1faff jmp 0x1faff movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x2048a movq %rbx, %rdi callq 0x15680
_Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_74], esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+88h+var_88], eax lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"... mov [rsp+88h+var_70], 0 xor eax, eax call _printf lea rax, [rsp+88h+var_38] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 cmp dword ptr [r14], 0 jle loc_1F9EE mov rbp, [r14+20h] mov eax, [r14+4] lea r15, [rsp+88h+var_68] xor ebx, ebx loc_1F977: test eax, eax jle short loc_1F9CA mov r12, rbp xor r13d, r13d loc_1F981: cmp dword ptr [r12], 0 js short loc_1F9B5 mov rdi, r15 mov rsi, r12 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jnz short loc_1F9B5 mov rbx, [rsp+88h+var_50] lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_1F9CA mov rdi, r15 mov rsi, r12 call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&) mov [rax], rbx loc_1F9B5: inc r13 movsxd rax, dword ptr [r14+4] add r12, 4 cmp r13, rax jl short loc_1F981 mov rbx, [rsp+88h+var_50] loc_1F9CA: lea rax, [rbx-3Eh] cmp rax, 0FFFFFFFFFFFFFFC1h jb short loc_1F9EE mov rcx, [rsp+88h+var_70] inc ecx movsxd rax, dword ptr [r14+4] lea rbp, [rbp+rax*4+0] mov [rsp+88h+var_70], rcx cmp ecx, [r14] jl short loc_1F977 loc_1F9EE: lea rdi, aSequenceLegend; "=== Sequence legend: " xor eax, eax call _printf mov rbx, [rsp+88h+var_58] test rbx, rbx jz short loc_1FA26 lea r15, aZuD; "%zu=%d, " loc_1FA0D: mov rsi, [rbx+10h] mov edx, [rbx+8] mov rdi, r15 xor eax, eax call _printf mov rbx, [rbx] test rbx, rbx jnz short loc_1FA0D loc_1FA26: lea rdi, aOtherSequenceI; "'+'=other sequence ids" xor eax, eax call _printf cmp dword ptr [r14], 0 jle loc_1FAD6 mov r15, [r14+20h] lea r12, [rsp+88h+var_68] xor ebp, ebp loc_1FA49: mov eax, ebp cdq idiv [rsp+88h+var_74] test edx, edx jnz short loc_1FA64 lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_1FA64: cmp dword ptr [r14+4], 0 jle short loc_1FAB9 mov r13, r15 xor ebx, ebx loc_1FA70: cmp dword ptr [r13+0], 0 js short loc_1FA98 mov rdi, r12 mov rsi, r13 call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_1FA9F mov rax, [rax+10h] lea rcx, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... movsx edi, byte ptr [rax+rcx] jmp short loc_1FAA4 loc_1FA98: mov edi, 2Eh ; '.' jmp short loc_1FAA4 loc_1FA9F: mov edi, 2Bh ; '+' loc_1FAA4: call _putchar inc rbx movsxd rax, dword ptr [r14+4] add r13, 4 cmp rbx, rax jl short loc_1FA70 loc_1FAB9: mov edi, 20h ; ' ' call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r15, [r15+rax*4] cmp ebp, [r14] jl loc_1FA49 loc_1FAD6: lea rdi, aDoneDumping; "\n=== Done dumping" call _puts lea rdi, [rsp+88h+var_68] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1FAFF jmp short $+2 loc_1FAFF: mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long common_kv_cache_dump_view_seqs(long long a1, int a2) { int *v3; // rbp long long v4; // rax long long v5; // rbx int *v6; // r12 long long v7; // r13 long long *i; // rbx int *v9; // r15 int v10; // ebp int *v11; // r13 long long v12; // rbx long long v13; // rax long long v14; // rdi int v16; // [rsp+18h] [rbp-70h] _QWORD v17[2]; // [rsp+20h] [rbp-68h] BYREF __int128 v18; // [rsp+30h] [rbp-58h] int v19; // [rsp+40h] [rbp-48h] __int128 v20; // [rsp+48h] [rbp-40h] BYREF v16 = 0; printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d\n", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); v17[0] = (char *)&v20 + 8; v17[1] = 1LL; v18 = 0LL; v19 = 1065353216; v20 = 0LL; if ( *(int *)a1 > 0 ) { v3 = *(int **)(a1 + 32); LODWORD(v4) = *(_DWORD *)(a1 + 4); v5 = 0LL; do { if ( (int)v4 > 0 ) { v6 = v3; v7 = 0LL; do { if ( *v6 >= 0 && !std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v6) ) { v5 = *((_QWORD *)&v18 + 1); if ( (unsigned long long)(*((_QWORD *)&v18 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL ) goto LABEL_11; *(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( v17, v6) = v5; } ++v7; ++v6; } while ( v7 < *(int *)(a1 + 4) ); v5 = *((_QWORD *)&v18 + 1); } LABEL_11: if ( (unsigned long long)(v5 - 62) < 0xFFFFFFFFFFFFFFC1LL ) break; v4 = *(int *)(a1 + 4); v3 += v4; ++v16; } while ( v16 < *(_DWORD *)a1 ); } printf("=== Sequence legend: "); for ( i = (long long *)v18; i; i = (long long *)*i ) printf("%zu=%d, ", i[2], *((_DWORD *)i + 2)); printf("'+'=other sequence ids"); if ( *(int *)a1 > 0 ) { v9 = *(int **)(a1 + 32); v10 = 0; do { if ( !(v10 % a2) ) printf("\n%5d: ", v10); if ( *(int *)(a1 + 4) > 0 ) { v11 = v9; v12 = 0LL; do { if ( *v11 < 0 ) { v14 = 46LL; } else { v13 = std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v17, v11); if ( v13 ) v14 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v13 + 16)]; else v14 = 43LL; } putchar(v14); ++v12; ++v11; } while ( v12 < *(int *)(a1 + 4) ); } putchar(32LL); ++v10; v9 += *(int *)(a1 + 4); } while ( v10 < *(_DWORD *)a1 ); } puts("\n=== Done dumping"); return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v17); }
common_kv_cache_dump_view_seqs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RSP + 0x14],ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x132a6c] MOV qword ptr [RSP + 0x18],0x0 XOR EAX,EAX CALL 0x001150b0 LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 CMP dword ptr [R14],0x0 JLE 0x0011f9ee MOV RBP,qword ptr [R14 + 0x20] MOV EAX,dword ptr [R14 + 0x4] LEA R15,[RSP + 0x20] XOR EBX,EBX LAB_0011f977: TEST EAX,EAX JLE 0x0011f9ca MOV R12,RBP XOR R13D,R13D LAB_0011f981: CMP dword ptr [R12],0x0 JS 0x0011f9b5 LAB_0011f988: MOV RDI,R15 MOV RSI,R12 CALL 0x0012f0aa TEST RAX,RAX JNZ 0x0011f9b5 MOV RBX,qword ptr [RSP + 0x38] LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x0011f9ca LAB_0011f9a7: MOV RDI,R15 MOV RSI,R12 CALL 0x0012f122 MOV qword ptr [RAX],RBX LAB_0011f9b5: INC R13 MOVSXD RAX,dword ptr [R14 + 0x4] ADD R12,0x4 CMP R13,RAX JL 0x0011f981 MOV RBX,qword ptr [RSP + 0x38] LAB_0011f9ca: LEA RAX,[RBX + -0x3e] CMP RAX,-0x3f JC 0x0011f9ee MOV RCX,qword ptr [RSP + 0x18] INC ECX MOVSXD RAX,dword ptr [R14 + 0x4] LEA RBP,[RBP + RAX*0x4] MOV qword ptr [RSP + 0x18],RCX CMP ECX,dword ptr [R14] JL 0x0011f977 LAB_0011f9ee: LEA RDI,[0x132af7] XOR EAX,EAX CALL 0x001150b0 MOV RBX,qword ptr [RSP + 0x30] TEST RBX,RBX JZ 0x0011fa26 LEA R15,[0x132b0d] LAB_0011fa0d: MOV RSI,qword ptr [RBX + 0x10] MOV EDX,dword ptr [RBX + 0x8] MOV RDI,R15 XOR EAX,EAX CALL 0x001150b0 MOV RBX,qword ptr [RBX] TEST RBX,RBX JNZ 0x0011fa0d LAB_0011fa26: LEA RDI,[0x132b16] XOR EAX,EAX CALL 0x001150b0 CMP dword ptr [R14],0x0 JLE 0x0011fad6 MOV R15,qword ptr [R14 + 0x20] LEA R12,[RSP + 0x20] XOR EBP,EBP LAB_0011fa49: MOV EAX,EBP CDQ IDIV dword ptr [RSP + 0x14] TEST EDX,EDX JNZ 0x0011fa64 LEA RDI,[0x132a65] MOV ESI,EBP XOR EAX,EAX CALL 0x001150b0 LAB_0011fa64: CMP dword ptr [R14 + 0x4],0x0 JLE 0x0011fab9 MOV R13,R15 XOR EBX,EBX LAB_0011fa70: CMP dword ptr [R13],0x0 JS 0x0011fa98 LAB_0011fa77: MOV RDI,R12 MOV RSI,R13 CALL 0x0012f0aa LAB_0011fa82: TEST RAX,RAX JZ 0x0011fa9f MOV RAX,qword ptr [RAX + 0x10] LEA RCX,[0x1335c0] MOVSX EDI,byte ptr [RAX + RCX*0x1] JMP 0x0011faa4 LAB_0011fa98: MOV EDI,0x2e JMP 0x0011faa4 LAB_0011fa9f: MOV EDI,0x2b LAB_0011faa4: CALL 0x00115bf0 INC RBX MOVSXD RAX,dword ptr [R14 + 0x4] ADD R13,0x4 CMP RBX,RAX JL 0x0011fa70 LAB_0011fab9: MOV EDI,0x20 CALL 0x00115bf0 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R15,[R15 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x0011fa49 LAB_0011fad6: LEA RDI,[0x133564] CALL 0x00115a80 LEA RDI,[RSP + 0x20] CALL 0x0012048a ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2) { int8 *puVar1; long lVar2; long *plVar3; ulong uVar4; int iVar5; long lVar6; uint uVar7; int *piVar8; int *piVar9; long lVar10; int8 *local_68; int8 local_60; int8 *local_58; long lStack_50; int4 local_48; int8 local_40; int8 uStack_38; iVar5 = 0; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), *(int4 *)(param_1 + 0x14)); local_68 = &uStack_38; local_60 = 1; local_58 = (int8 *)0x0; lStack_50 = 0; local_48 = 0x3f800000; local_40 = 0; uStack_38 = 0; if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar4 = (ulong)*(uint *)(param_1 + 4); lVar6 = 0; do { if (0 < (int)uVar4) { lVar10 = 0; piVar9 = piVar8; do { /* try { // try from 0011f988 to 0011f992 has its CatchHandler @ 0011fafd */ if ((-1 < *piVar9) && (lVar2 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9), lVar6 = lStack_50, lVar2 == 0)) { if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break; /* try { // try from 0011f9a7 to 0011f9b1 has its CatchHandler @ 0011fafb */ plVar3 = (long *)std::__detail:: _Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)&local_68,piVar9); *plVar3 = lVar6; } lVar10 = lVar10 + 1; piVar9 = piVar9 + 1; lVar6 = lStack_50; } while (lVar10 < *(int *)(param_1 + 4)); } if (lVar6 - 0x3eU < 0xffffffffffffffc1) break; iVar5 = iVar5 + 1; uVar4 = (ulong)*(int *)(param_1 + 4); piVar8 = piVar8 + uVar4; } while (iVar5 < *(int *)param_1); } printf("=== Sequence legend: "); for (puVar1 = local_58; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { printf("%zu=%d, ",puVar1[2],(ulong)*(uint *)(puVar1 + 1)); } printf("\'+\'=other sequence ids"); if (0 < *(int *)param_1) { piVar8 = *(int **)(param_1 + 0x20); uVar7 = 0; do { if ((int)uVar7 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar7); } if (0 < *(int *)(param_1 + 4)) { lVar6 = 0; piVar9 = piVar8; do { if (*piVar9 < 0) { iVar5 = 0x2e; } else { /* try { // try from 0011fa77 to 0011fa81 has its CatchHandler @ 0011faff */ lVar10 = std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68,piVar9); if (lVar10 == 0) { iVar5 = 0x2b; } else { iVar5 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" [*(long *)(lVar10 + 0x10)]; } } putchar(iVar5); lVar6 = lVar6 + 1; piVar9 = piVar9 + 1; } while (lVar6 < *(int *)(param_1 + 4)); } putchar(0x20); uVar7 = uVar7 + 1; piVar8 = piVar8 + *(int *)(param_1 + 4); } while ((int)uVar7 < *(int *)param_1); } puts("\n=== Done dumping"); std:: _Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)&local_68); return; }
13,807
ms3_deinit
eloqsql/storage/maria/libmarias3/src/marias3.c
void ms3_deinit(ms3_st *ms3) { if (!ms3) { return; } ms3debug("deinit: 0x%" PRIXPTR, (uintptr_t)ms3); ms3_cfree(ms3->s3secret); ms3_cfree(ms3->s3key); ms3_cfree(ms3->region); ms3_cfree(ms3->base_domain); ms3_cfree(ms3->iam_role); ms3_cfree(ms3->role_key); ms3_cfree(ms3->role_secret); ms3_cfree(ms3->role_session_token); ms3_cfree(ms3->iam_endpoint); ms3_cfree(ms3->sts_endpoint); ms3_cfree(ms3->sts_region); ms3_cfree(ms3->iam_role_arn); curl_easy_cleanup(ms3->curl); ms3_cfree(ms3->last_error); ms3_cfree(ms3->path_buffer); ms3_cfree(ms3->query_buffer); list_free(ms3); ms3_cfree(ms3); }
O3
c
ms3_deinit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx testq %rdi, %rdi je 0xf494 movq %rdi, %rbx callq 0xa3b0 testb %al, %al je 0xf3ff movq 0xbbdf(%rip), %rax # 0x1afb8 movq (%rax), %rdi leaq 0x6871(%rip), %rdx # 0x15c54 leaq 0x688c(%rip), %rcx # 0x15c76 movl $0x1, %esi movl $0x146, %r8d # imm = 0x146 movq %rbx, %r9 xorl %eax, %eax callq 0xa8d0 movq 0xbb82(%rip), %r14 # 0x1af88 movq 0x8(%rbx), %rdi callq *(%r14) movq (%rbx), %rdi callq *(%r14) movq 0x10(%rbx), %rdi callq *(%r14) movq 0x18(%rbx), %rdi callq *(%r14) movq 0x40(%rbx), %rdi callq *(%r14) movq 0x48(%rbx), %rdi callq *(%r14) movq 0x50(%rbx), %rdi callq *(%r14) movq 0x58(%rbx), %rdi callq *(%r14) movq 0x38(%rbx), %rdi callq *(%r14) movq 0x28(%rbx), %rdi callq *(%r14) movq 0x30(%rbx), %rdi callq *(%r14) movq 0x60(%rbx), %rdi callq *(%r14) movq 0x78(%rbx), %rdi callq 0xa690 movq 0x80(%rbx), %rdi callq *(%r14) movq 0x90(%rbx), %rdi callq *(%r14) movq 0x98(%rbx), %rdi callq *(%r14) movq %rbx, %rdi callq 0xf499 movq %rbx, %rdi movq %r14, %rax popq %rbx popq %r14 popq %rbp jmpq *(%rax) popq %rbx popq %r14 popq %rbp retq
ms3_deinit: push rbp mov rbp, rsp push r14 push rbx test rdi, rdi jz loc_F494 mov rbx, rdi call _ms3debug_get test al, al jz short loc_F3FF mov rax, cs:stderr_ptr mov rdi, [rax] lea rdx, aLibmarias3SDDe; "[libmarias3] %s:%d deinit: 0x%lX\n" lea rcx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 1 mov r8d, 146h mov r9, rbx xor eax, eax call ___fprintf_chk loc_F3FF: mov r14, cs:ms3_cfree_ptr mov rdi, [rbx+8] call qword ptr [r14] mov rdi, [rbx] call qword ptr [r14] mov rdi, [rbx+10h] call qword ptr [r14] mov rdi, [rbx+18h] call qword ptr [r14] mov rdi, [rbx+40h] call qword ptr [r14] mov rdi, [rbx+48h] call qword ptr [r14] mov rdi, [rbx+50h] call qword ptr [r14] mov rdi, [rbx+58h] call qword ptr [r14] mov rdi, [rbx+38h] call qword ptr [r14] mov rdi, [rbx+28h] call qword ptr [r14] mov rdi, [rbx+30h] call qword ptr [r14] mov rdi, [rbx+60h] call qword ptr [r14] mov rdi, [rbx+78h] call _curl_easy_cleanup mov rdi, [rbx+80h] call qword ptr [r14] mov rdi, [rbx+90h] call qword ptr [r14] mov rdi, [rbx+98h] call qword ptr [r14] mov rdi, rbx call list_free mov rdi, rbx mov rax, r14 pop rbx pop r14 pop rbp jmp qword ptr [rax] loc_F494: pop rbx pop r14 pop rbp retn
void ms3_deinit(_QWORD *a1) { if ( a1 ) { if ( ms3debug_get() ) __fprintf_chk( stderr, 1LL, "[libmarias3] %s:%d deinit: 0x%lX\n", "/workspace/llm4binary/github2025/eloqsql/storage/maria/libmarias3/src/marias3.c", 326, a1); ms3_cfree(a1[1]); ms3_cfree(*a1); ms3_cfree(a1[2]); ms3_cfree(a1[3]); ms3_cfree(a1[8]); ms3_cfree(a1[9]); ms3_cfree(a1[10]); ms3_cfree(a1[11]); ms3_cfree(a1[7]); ms3_cfree(a1[5]); ms3_cfree(a1[6]); ms3_cfree(a1[12]); curl_easy_cleanup(a1[15]); ms3_cfree(a1[16]); ms3_cfree(a1[18]); ms3_cfree(a1[19]); list_free(a1); ms3_cfree(a1); } }
ms3_deinit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x0010f494 MOV RBX,RDI CALL 0x0010a3b0 TEST AL,AL JZ 0x0010f3ff MOV RAX,qword ptr [0x0011afb8] MOV RDI,qword ptr [RAX] LEA RDX,[0x115c54] LEA RCX,[0x115c76] MOV ESI,0x1 MOV R8D,0x146 MOV R9,RBX XOR EAX,EAX CALL 0x0010a8d0 LAB_0010f3ff: MOV R14,qword ptr [0x0011af88] MOV RDI,qword ptr [RBX + 0x8] CALL qword ptr [R14] MOV RDI,qword ptr [RBX] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x10] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x18] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x40] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x48] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x50] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x58] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x38] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x28] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x30] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x60] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x78] CALL 0x0010a690 MOV RDI,qword ptr [RBX + 0x80] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x90] CALL qword ptr [R14] MOV RDI,qword ptr [RBX + 0x98] CALL qword ptr [R14] MOV RDI,RBX CALL 0x0010f499 MOV RDI,RBX MOV RAX,R14 POP RBX POP R14 POP RBP JMP qword ptr [RAX] LAB_0010f494: POP RBX POP R14 POP RBP RET
void ms3_deinit(int8 *param_1) { int *puVar1; char cVar2; if (param_1 != (int8 *)0x0) { cVar2 = ms3debug_get(); if (cVar2 != '\0') { __fprintf_chk(*(int8 *)PTR_stderr_0011afb8,1,"[libmarias3] %s:%d deinit: 0x%lX\n", "/workspace/llm4binary/github2025/eloqsql/storage/maria/libmarias3/src/marias3.c" ,0x146,param_1); } puVar1 = PTR_ms3_cfree_0011af88; (**(code **)PTR_ms3_cfree_0011af88)(param_1[1]); (**(code **)puVar1)(*param_1); (**(code **)puVar1)(param_1[2]); (**(code **)puVar1)(param_1[3]); (**(code **)puVar1)(param_1[8]); (**(code **)puVar1)(param_1[9]); (**(code **)puVar1)(param_1[10]); (**(code **)puVar1)(param_1[0xb]); (**(code **)puVar1)(param_1[7]); (**(code **)puVar1)(param_1[5]); (**(code **)puVar1)(param_1[6]); (**(code **)puVar1)(param_1[0xc]); curl_easy_cleanup(param_1[0xf]); (**(code **)puVar1)(param_1[0x10]); (**(code **)puVar1)(param_1[0x12]); (**(code **)puVar1)(param_1[0x13]); list_free(param_1); (**(code **)puVar1)(param_1); return; } return; }
13,808
ma_set_data_pagecache_callbacks
eloqsql/storage/maria/ma_open.c
void _ma_set_data_pagecache_callbacks(PAGECACHE_FILE *file, MARIA_SHARE *share) { pagecache_file_set_null_hooks(file); file->callback_data= (uchar*) share; file->flush_log_callback= &maria_flush_log_for_page_none; /* Do nothing */ file->post_write_hook= maria_page_write_failure; if (share->temporary) { file->post_read_hook= &maria_page_crc_check_none; file->pre_write_hook= &maria_page_filler_set_none; } else { file->post_read_hook= &maria_page_crc_check_data; if (share->options & HA_OPTION_PAGE_CHECKSUM) file->pre_write_hook= &maria_page_crc_set_normal; else file->pre_write_hook= &maria_page_filler_set_normal; if (share->now_transactional) file->flush_log_callback= maria_flush_log_for_page; } if (MY_TEST(share->base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED)) { ma_crypt_set_data_pagecache_callbacks(file, share); } }
O3
c
ma_set_data_pagecache_callbacks: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 callq 0x3d58f movq %rbx, 0x40(%r14) leaq -0x2dc80(%rip), %rax # 0x3e174 movq %rax, 0x38(%r14) leaq -0x2dcf1(%rip), %rax # 0x3e10e movq %rax, 0x30(%r14) cmpb $0x0, 0x7d9(%rbx) je 0x6be24 leaq -0x2dd52(%rip), %rax # 0x3e0c1 movq %rax, 0x20(%r14) leaq -0x2dd18(%rip), %rax # 0x3e106 movq %rax, 0x28(%r14) jmp 0x6be61 leaq -0x2de14(%rip), %rax # 0x3e017 movq %rax, 0x20(%r14) btl $0xb, 0x720(%rbx) jb 0x6be42 leaq -0x2dd74(%rip), %rax # 0x3e0cc jmp 0x6be49 leaq -0x2debe(%rip), %rax # 0x3df8b movq %rax, 0x28(%r14) cmpb $0x0, 0x7e7(%rbx) je 0x6be61 leaq -0x2dd3a(%rip), %rax # 0x3e123 movq %rax, 0x38(%r14) testb $0x1, 0x428(%rbx) jne 0x6be6f popq %rbx popq %r14 popq %rbp retq movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x67157
_ma_set_data_pagecache_callbacks: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi call pagecache_file_set_null_hooks mov [r14+40h], rbx lea rax, maria_flush_log_for_page_none mov [r14+38h], rax lea rax, maria_page_write_failure mov [r14+30h], rax cmp byte ptr [rbx+7D9h], 0 jz short loc_6BE24 lea rax, maria_page_crc_check_none mov [r14+20h], rax lea rax, maria_page_filler_set_none mov [r14+28h], rax jmp short loc_6BE61 loc_6BE24: lea rax, maria_page_crc_check_data mov [r14+20h], rax bt dword ptr [rbx+720h], 0Bh jb short loc_6BE42 lea rax, maria_page_filler_set_normal jmp short loc_6BE49 loc_6BE42: lea rax, maria_page_crc_set_normal loc_6BE49: mov [r14+28h], rax cmp byte ptr [rbx+7E7h], 0 jz short loc_6BE61 lea rax, maria_flush_log_for_page mov [r14+38h], rax loc_6BE61: test byte ptr [rbx+428h], 1 jnz short loc_6BE6F pop rbx pop r14 pop rbp retn loc_6BE6F: mov rdi, r14 mov rsi, rbx pop rbx pop r14 pop rbp jmp ma_crypt_set_data_pagecache_callbacks
long long ( * ma_set_data_pagecache_callbacks(_QWORD *a1, long long a2))() { long long ( *result)(); // rax pagecache_file_set_null_hooks((long long)a1); a1[8] = a2; a1[7] = maria_flush_log_for_page_none; a1[6] = maria_page_write_failure; if ( *(_BYTE *)(a2 + 2009) ) { a1[4] = maria_page_crc_check_none; result = maria_page_filler_set_none; a1[5] = maria_page_filler_set_none; } else { a1[4] = maria_page_crc_check_data; if ( _bittest((const signed __int32 *)(a2 + 1824), 0xBu) ) result = (long long ( *)())maria_page_crc_set_normal; else result = (long long ( *)())maria_page_filler_set_normal; a1[5] = result; if ( *(_BYTE *)(a2 + 2023) ) { result = (long long ( *)())maria_flush_log_for_page; a1[7] = maria_flush_log_for_page; } } if ( (*(_BYTE *)(a2 + 1064) & 1) != 0 ) return ma_crypt_set_data_pagecache_callbacks(a1, a2); return result; }
_ma_set_data_pagecache_callbacks: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CALL 0x0013d58f MOV qword ptr [R14 + 0x40],RBX LEA RAX,[0x13e174] MOV qword ptr [R14 + 0x38],RAX LEA RAX,[0x13e10e] MOV qword ptr [R14 + 0x30],RAX CMP byte ptr [RBX + 0x7d9],0x0 JZ 0x0016be24 LEA RAX,[0x13e0c1] MOV qword ptr [R14 + 0x20],RAX LEA RAX,[0x13e106] MOV qword ptr [R14 + 0x28],RAX JMP 0x0016be61 LAB_0016be24: LEA RAX,[0x13e017] MOV qword ptr [R14 + 0x20],RAX BT dword ptr [RBX + 0x720],0xb JC 0x0016be42 LEA RAX,[0x13e0cc] JMP 0x0016be49 LAB_0016be42: LEA RAX,[0x13df8b] LAB_0016be49: MOV qword ptr [R14 + 0x28],RAX CMP byte ptr [RBX + 0x7e7],0x0 JZ 0x0016be61 LEA RAX,[0x13e123] MOV qword ptr [R14 + 0x38],RAX LAB_0016be61: TEST byte ptr [RBX + 0x428],0x1 JNZ 0x0016be6f POP RBX POP R14 POP RBP RET LAB_0016be6f: MOV RDI,R14 MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x00167157
void _ma_set_data_pagecache_callbacks(long param_1,long param_2) { code *pcVar1; pagecache_file_set_null_hooks(); *(long *)(param_1 + 0x40) = param_2; *(code **)(param_1 + 0x38) = maria_flush_log_for_page_none; *(code **)(param_1 + 0x30) = maria_page_write_failure; if (*(char *)(param_2 + 0x7d9) == '\0') { *(code **)(param_1 + 0x20) = maria_page_crc_check_data; if ((*(uint *)(param_2 + 0x720) >> 0xb & 1) == 0) { pcVar1 = maria_page_filler_set_normal; } else { pcVar1 = maria_page_crc_set_normal; } *(code **)(param_1 + 0x28) = pcVar1; if (*(char *)(param_2 + 0x7e7) != '\0') { *(code **)(param_1 + 0x38) = maria_flush_log_for_page; } } else { *(code **)(param_1 + 0x20) = maria_page_crc_check_none; *(code **)(param_1 + 0x28) = maria_page_filler_set_none; } if ((*(byte *)(param_2 + 0x428) & 1) == 0) { return; } ma_crypt_set_data_pagecache_callbacks(param_1,param_2); return; }
13,809
my_create_with_symlink
eloqsql/mysys/my_symlink2.c
File my_create_with_symlink(const char *linkname, const char *filename, int createflags, int access_flags, myf MyFlags) { File file; int tmp_errno; /* Test if we should create a link */ int create_link; char abs_linkname[FN_REFLEN]; DBUG_ENTER("my_create_with_symlink"); DBUG_PRINT("enter", ("linkname: %s filename: %s", linkname ? linkname : "(NULL)", filename ? filename : "(NULL)")); if (my_disable_symlinks) { DBUG_PRINT("info", ("Symlinks disabled")); /* Create only the file, not the link and file */ create_link= 0; if (linkname) filename= linkname; } else { if (linkname) my_realpath(abs_linkname, linkname, MYF(0)); create_link= (linkname && strcmp(abs_linkname,filename)); } if (!(MyFlags & MY_DELETE_OLD)) { if (!access(filename,F_OK)) { my_errno= errno= EEXIST; my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST); DBUG_RETURN(-1); } if (create_link && !access(linkname,F_OK)) { my_errno= errno= EEXIST; my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST); DBUG_RETURN(-1); } } if ((file=my_create(filename, createflags, access_flags, MyFlags)) >= 0) { if (create_link) { /* Delete old link/file */ if (MyFlags & MY_DELETE_OLD) my_delete(linkname, MYF(0)); /* Create link */ if (my_symlink(filename, linkname, MyFlags)) { /* Fail, remove everything we have done */ tmp_errno=my_errno; my_close(file,MYF(0)); my_delete(filename, MYF(0)); file= -1; my_errno=tmp_errno; } } } DBUG_RETURN(file); }
O3
c
my_create_with_symlink: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %r8, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0xb689f7(%rip), %rax # 0xc0a95c cmpb $0x0, (%rax) je 0xa1f76 testq %r14, %r14 cmovneq %r14, %rbx xorl %r13d, %r13d jmp 0xa1fb0 testq %r14, %r14 je 0xa1f71 leaq -0x230(%rbp), %rdi movq %r14, %rsi movl %edx, %r13d xorl %edx, %edx movl %ecx, %r12d callq 0xa1d01 leaq -0x230(%rbp), %rdi movq %rbx, %rsi callq 0x296a0 movl %r13d, %edx movl %r12d, %ecx xorl %r13d, %r13d testl %eax, %eax setne %r13b btl $0x8, %r15d jb 0xa1ffb movl %edx, -0x234(%rbp) movl %ecx, %r12d movq %rbx, %rdi xorl %esi, %esi callq 0x290d0 testl %eax, %eax je 0xa2067 testl %r13d, %r13d movl %r12d, %ecx movl -0x234(%rbp), %edx je 0xa1ffb movq %r14, %rdi xorl %esi, %esi callq 0x290d0 movl -0x234(%rbp), %edx movl %r12d, %ecx testl %eax, %eax je 0xa2089 movq %rbx, %rdi movl %edx, %esi movl %ecx, %edx movq %r15, %rcx callq 0x9edb4 movl %eax, %r12d testl %eax, %eax js 0xa20b8 testl %r13d, %r13d je 0xa20b8 btl $0x8, %r15d jae 0xa202f movq %r14, %rdi xorl %esi, %esi callq 0x9ee3c movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0xa1c3d testl %eax, %eax je 0xa20b8 callq 0xa29fe movl (%rax), %r14d movl %r12d, %edi xorl %esi, %esi callq 0xa1461 movq %rbx, %rdi xorl %esi, %esi callq 0x9ee3c callq 0xa29fe movl %r14d, (%rax) jmp 0xa20b2 callq 0x297b0 movl $0x11, %r14d movl %r14d, (%rax) callq 0xa29fe movl %r14d, (%rax) movl $0x1, %edi xorl %esi, %esi movq %rbx, %rdx jmp 0xa20a6 callq 0x297b0 movl $0x11, %ebx movl %ebx, (%rax) callq 0xa29fe movl %ebx, (%rax) movl $0x1, %edi xorl %esi, %esi movq %r14, %rdx movl $0x11, %ecx xorl %eax, %eax callq 0x9f0b3 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xa20dc movl %r12d, %eax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_create_with_symlink: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 218h mov r15, r8 mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rax, my_disable_symlinks cmp byte ptr [rax], 0 jz short loc_A1F76 test r14, r14 cmovnz rbx, r14 loc_A1F71: xor r13d, r13d jmp short loc_A1FB0 loc_A1F76: test r14, r14 jz short loc_A1F71 lea rdi, [rbp+var_230] mov rsi, r14 mov r13d, edx xor edx, edx mov r12d, ecx call my_realpath lea rdi, [rbp+var_230] mov rsi, rbx call _strcmp mov edx, r13d mov ecx, r12d xor r13d, r13d test eax, eax setnz r13b loc_A1FB0: bt r15d, 8 jb short loc_A1FFB mov [rbp+var_234], edx mov r12d, ecx mov rdi, rbx xor esi, esi call _access test eax, eax jz loc_A2067 test r13d, r13d mov ecx, r12d mov edx, [rbp+var_234] jz short loc_A1FFB mov rdi, r14 xor esi, esi call _access mov edx, [rbp+var_234] mov ecx, r12d test eax, eax jz loc_A2089 loc_A1FFB: mov rdi, rbx mov esi, edx mov edx, ecx mov rcx, r15 call my_create mov r12d, eax test eax, eax js loc_A20B8 test r13d, r13d jz loc_A20B8 bt r15d, 8 jnb short loc_A202F mov rdi, r14 xor esi, esi call my_delete loc_A202F: mov rdi, rbx mov rsi, r14 mov rdx, r15 call my_symlink test eax, eax jz short loc_A20B8 call _my_thread_var mov r14d, [rax] mov edi, r12d xor esi, esi call my_close mov rdi, rbx xor esi, esi call my_delete call _my_thread_var mov [rax], r14d jmp short loc_A20B2 loc_A2067: call ___errno_location mov r14d, 11h mov [rax], r14d call _my_thread_var mov [rax], r14d mov edi, 1 xor esi, esi mov rdx, rbx jmp short loc_A20A6 loc_A2089: call ___errno_location mov ebx, 11h mov [rax], ebx call _my_thread_var mov [rax], ebx mov edi, 1 xor esi, esi mov rdx, r14 loc_A20A6: mov ecx, 11h xor eax, eax call my_error loc_A20B2: mov r12d, 0FFFFFFFFh loc_A20B8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_A20DC mov eax, r12d add rsp, 218h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A20DC: call ___stack_chk_fail
long long my_create_with_symlink(const char *a1, long long a2, unsigned int a3, int a4, long long a5) { long long v6; // rbx BOOL v7; // r13d unsigned int v8; // r13d int v9; // r12d int v10; // eax int v11; // r12d int v12; // eax int v13; // r12d int v14; // r14d unsigned int v16; // [rsp+Ch] [rbp-234h] _BYTE v17[512]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v18; // [rsp+210h] [rbp-30h] v6 = a2; v18 = __readfsqword(0x28u); if ( my_disable_symlinks ) { if ( a1 ) v6 = (long long)a1; goto LABEL_4; } if ( !a1 ) { LABEL_4: v7 = 0; goto LABEL_7; } v8 = a3; v9 = a4; my_realpath((long long)v17, a1, 0); v10 = strcmp(v17, a2); a3 = v8; a4 = v9; v7 = v10 != 0; LABEL_7: if ( (a5 & 0x100) == 0 ) { v16 = a3; v11 = a4; if ( !(unsigned int)access(v6, 0LL) ) { *(_DWORD *)__errno_location(v6) = 17; *(_DWORD *)my_thread_var(v6, 0LL) = 17; my_error(1u, 0LL, v6, 17LL); return (unsigned int)-1; } a4 = v11; a3 = v16; if ( v7 ) { v12 = access(a1, 0LL); a3 = v16; a4 = v11; if ( !v12 ) { *(_DWORD *)__errno_location(a1) = 17; *(_DWORD *)my_thread_var(a1, 0LL) = 17; my_error(1u, 0LL, a1, 17LL); return (unsigned int)-1; } } } v13 = my_create(v6, a3, a4, a5); if ( v13 >= 0 && v7 ) { if ( (a5 & 0x100) != 0 ) my_delete((long long)a1, 0LL); if ( (unsigned int)my_symlink(v6, a1, a5) ) { v14 = *(_DWORD *)my_thread_var(v6, a1); my_close((unsigned int)v13, 0LL); my_delete(v6, 0LL); *(_DWORD *)my_thread_var(v6, 0LL) = v14; return (unsigned int)-1; } } return (unsigned int)v13; }
my_create_with_symlink: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x218 MOV R15,R8 MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0xd0a95c] CMP byte ptr [RAX],0x0 JZ 0x001a1f76 TEST R14,R14 CMOVNZ RBX,R14 LAB_001a1f71: XOR R13D,R13D JMP 0x001a1fb0 LAB_001a1f76: TEST R14,R14 JZ 0x001a1f71 LEA RDI,[RBP + -0x230] MOV RSI,R14 MOV R13D,EDX XOR EDX,EDX MOV R12D,ECX CALL 0x001a1d01 LEA RDI,[RBP + -0x230] MOV RSI,RBX CALL 0x001296a0 MOV EDX,R13D MOV ECX,R12D XOR R13D,R13D TEST EAX,EAX SETNZ R13B LAB_001a1fb0: BT R15D,0x8 JC 0x001a1ffb MOV dword ptr [RBP + -0x234],EDX MOV R12D,ECX MOV RDI,RBX XOR ESI,ESI CALL 0x001290d0 TEST EAX,EAX JZ 0x001a2067 TEST R13D,R13D MOV ECX,R12D MOV EDX,dword ptr [RBP + -0x234] JZ 0x001a1ffb MOV RDI,R14 XOR ESI,ESI CALL 0x001290d0 MOV EDX,dword ptr [RBP + -0x234] MOV ECX,R12D TEST EAX,EAX JZ 0x001a2089 LAB_001a1ffb: MOV RDI,RBX MOV ESI,EDX MOV EDX,ECX MOV RCX,R15 CALL 0x0019edb4 MOV R12D,EAX TEST EAX,EAX JS 0x001a20b8 TEST R13D,R13D JZ 0x001a20b8 BT R15D,0x8 JNC 0x001a202f MOV RDI,R14 XOR ESI,ESI CALL 0x0019ee3c LAB_001a202f: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x001a1c3d TEST EAX,EAX JZ 0x001a20b8 CALL 0x001a29fe MOV R14D,dword ptr [RAX] MOV EDI,R12D XOR ESI,ESI CALL 0x001a1461 MOV RDI,RBX XOR ESI,ESI CALL 0x0019ee3c CALL 0x001a29fe MOV dword ptr [RAX],R14D JMP 0x001a20b2 LAB_001a2067: CALL 0x001297b0 MOV R14D,0x11 MOV dword ptr [RAX],R14D CALL 0x001a29fe MOV dword ptr [RAX],R14D MOV EDI,0x1 XOR ESI,ESI MOV RDX,RBX JMP 0x001a20a6 LAB_001a2089: CALL 0x001297b0 MOV EBX,0x11 MOV dword ptr [RAX],EBX CALL 0x001a29fe MOV dword ptr [RAX],EBX MOV EDI,0x1 XOR ESI,ESI MOV RDX,R14 LAB_001a20a6: MOV ECX,0x11 XOR EAX,EAX CALL 0x0019f0b3 LAB_001a20b2: MOV R12D,0xffffffff LAB_001a20b8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001a20dc MOV EAX,R12D ADD RSP,0x218 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a20dc: CALL 0x00129270
int my_create_with_symlink (char *param_1,char *param_2,int4 param_3,int4 param_4,int8 param_5) { int4 uVar1; int iVar2; int iVar3; int4 *puVar4; int *piVar5; long in_FS_OFFSET; bool bVar6; char local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (my_disable_symlinks == '\0') { if (param_1 == (char *)0x0) goto LAB_001a1f71; my_realpath(local_238,param_1,0); iVar2 = strcmp(local_238,param_2); bVar6 = iVar2 != 0; } else { if (param_1 != (char *)0x0) { param_2 = param_1; } LAB_001a1f71: bVar6 = false; } if (((uint)param_5 >> 8 & 1) == 0) { iVar2 = access(param_2,0); if (iVar2 != 0) { if (bVar6) { iVar2 = access(param_1,0); if (iVar2 == 0) { piVar5 = __errno_location(); *piVar5 = 0x11; puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x11; param_2 = param_1; goto LAB_001a20a6; } } goto LAB_001a1ffb; } piVar5 = __errno_location(); *piVar5 = 0x11; puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x11; LAB_001a20a6: my_error(1,0,param_2,0x11); } else { LAB_001a1ffb: iVar2 = my_create(param_2,param_3,param_4,param_5); if ((iVar2 < 0) || (!bVar6)) goto LAB_001a20b8; if (((uint)param_5 >> 8 & 1) != 0) { my_delete(param_1,0); } iVar3 = my_symlink(param_2,param_1,param_5); if (iVar3 == 0) goto LAB_001a20b8; puVar4 = (int4 *)_my_thread_var(); uVar1 = *puVar4; my_close(iVar2,0); my_delete(param_2,0); puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar1; } iVar2 = -1; LAB_001a20b8: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,810
pagecache_delete_pages
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete_pages(PAGECACHE *pagecache, PAGECACHE_FILE *file, pgcache_page_no_t pageno, uint page_count, enum pagecache_page_lock lock, my_bool flush) { pgcache_page_no_t page_end; DBUG_ENTER("pagecache_delete_pages"); DBUG_ASSERT(page_count > 0); page_end= pageno + page_count; do { if (pagecache_delete(pagecache, file, pageno, lock, flush)) DBUG_RETURN(1); } while (++pageno != page_end); DBUG_RETURN(0); }
O0
c
pagecache_delete_pages: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movb %al, -0x29(%rbp) jmp 0x30393 movq -0x20(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movl -0x28(%rbp), %ecx movsbl -0x29(%rbp), %r8d callq 0x30080 cmpb $0x0, %al je 0x303c6 jmp 0x303c0 movb $0x1, -0x1(%rbp) jmp 0x303e0 jmp 0x303c8 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) cmpq -0x38(%rbp), %rax jne 0x303a1 jmp 0x303dc movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
pagecache_delete_pages: push rbp mov rbp, rsp sub rsp, 40h mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], r8d mov [rbp+var_29], al jmp short $+2 loc_30393: mov rax, [rbp+var_20] mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_38], rax loc_303A1: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov ecx, [rbp+var_28] movsx r8d, [rbp+var_29] call pagecache_delete cmp al, 0 jz short loc_303C6 jmp short $+2 loc_303C0: mov [rbp+var_1], 1 jmp short loc_303E0 loc_303C6: jmp short $+2 loc_303C8: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax cmp rax, [rbp+var_38] jnz short loc_303A1 jmp short $+2 loc_303DC: mov [rbp+var_1], 0 loc_303E0: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char pagecache_delete_pages(_QWORD *a1, long long a2, long long a3, unsigned int a4, unsigned int a5, bool a6) { long long v7; // [rsp+8h] [rbp-38h] long long v10; // [rsp+20h] [rbp-20h] v10 = a3; v7 = a4 + a3; do { if ( pagecache_delete(a1, a2, v10, a5, a6) ) return 1; ++v10; } while ( v10 != v7 ); return 0; }
pagecache_delete_pages: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV byte ptr [RBP + -0x29],AL JMP 0x00130393 LAB_00130393: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001303a1: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x28] MOVSX R8D,byte ptr [RBP + -0x29] CALL 0x00130080 CMP AL,0x0 JZ 0x001303c6 JMP 0x001303c0 LAB_001303c0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001303e0 LAB_001303c6: JMP 0x001303c8 LAB_001303c8: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX CMP RAX,qword ptr [RBP + -0x38] JNZ 0x001303a1 JMP 0x001303dc LAB_001303dc: MOV byte ptr [RBP + -0x1],0x0 LAB_001303e0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 pagecache_delete_pages (int8 param_1,int8 param_2,long param_3,uint param_4,int4 param_5, char param_6) { char cVar1; long local_28; local_28 = param_3; do { cVar1 = pagecache_delete(param_1,param_2,local_28,param_5,(int)param_6); if (cVar1 != '\0') { return 1; } local_28 = local_28 + 1; } while (local_28 != param_3 + (ulong)param_4); return 0; }
13,811
ft_nlq_find_relevance
eloqsql/storage/myisam/ft_nlq_search.c
float ft_nlq_find_relevance(FT_INFO *handler, uchar *record __attribute__((unused)), uint length __attribute__((unused))) { int a,b,c; FT_DOC *docs=handler->doc; my_off_t docid=handler->info->lastpos; if (docid == HA_POS_ERROR) return -5.0; /* Assuming docs[] is sorted by dpos... */ for (a=0, b=handler->ndocs, c=(a+b)/2; b-a>1; c=(a+b)/2) { if (docs[c].dpos > docid) b=c; else a=c; } /* bounds check to avoid accessing unallocated handler->doc */ if (a < handler->ndocs && docs[a].dpos == docid) return (float) docs[a].weight; else return 0.0; }
O3
c
ft_nlq_find_relevance: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax movq 0x170(%rax), %rax cmpq $-0x1, %rax je 0x4cc6f movl 0x10(%rdi), %ecx addq $0x18, %rdi xorl %edx, %edx cmpl $0x2, %ecx jl 0x4cc4e xorl %r8d, %r8d movl %ecx, %r9d movl %ecx, %esi movl %r9d, %edx shrl $0x1f, %edx addl %r9d, %edx sarl %edx movslq %edx, %r9 shlq $0x4, %r9 cmpq %rax, (%rdi,%r9) jbe 0x4cc3b movl %edx, %esi movl %r8d, %edx leal (%rdx,%rsi), %r9d movl %esi, %r10d subl %edx, %r10d movl %edx, %r8d cmpl $0x1, %r10d jg 0x4cc1e xorps %xmm0, %xmm0 cmpl %ecx, %edx jge 0x4cc77 movslq %edx, %rcx shlq $0x4, %rcx cmpq %rax, (%rdi,%rcx) jne 0x4cc77 addq %rcx, %rdi xorps %xmm0, %xmm0 cvtsd2ss 0x8(%rdi), %xmm0 jmp 0x4cc77 movss 0x4439d(%rip), %xmm0 # 0x91014 popq %rbp retq
ft_nlq_find_relevance: push rbp mov rbp, rsp mov rax, [rdi+8] mov rax, [rax+170h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_4CC6F mov ecx, [rdi+10h] add rdi, 18h xor edx, edx cmp ecx, 2 jl short loc_4CC4E xor r8d, r8d mov r9d, ecx mov esi, ecx loc_4CC1E: mov edx, r9d shr edx, 1Fh add edx, r9d sar edx, 1 movsxd r9, edx shl r9, 4 cmp [rdi+r9], rax jbe short loc_4CC3B mov esi, edx mov edx, r8d loc_4CC3B: lea r9d, [rdx+rsi] mov r10d, esi sub r10d, edx mov r8d, edx cmp r10d, 1 jg short loc_4CC1E loc_4CC4E: xorps xmm0, xmm0 cmp edx, ecx jge short loc_4CC77 movsxd rcx, edx shl rcx, 4 cmp [rdi+rcx], rax jnz short loc_4CC77 add rdi, rcx xorps xmm0, xmm0 cvtsd2ss xmm0, qword ptr [rdi+8] jmp short loc_4CC77 loc_4CC6F: movss xmm0, cs:dword_91014 loc_4CC77: pop rbp retn
float ft_nlq_find_relevance(long long a1) { unsigned long long v1; // rax int v2; // ecx long long v3; // rdi int v4; // edx int v5; // r8d int v6; // r9d int v7; // esi float result; // xmm0_4 long long v9; // rcx v1 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 368LL); if ( v1 == -1LL ) return -5.0; v2 = *(_DWORD *)(a1 + 16); v3 = a1 + 24; v4 = 0; if ( v2 >= 2 ) { v5 = 0; v6 = v2; v7 = v2; do { v4 = v6 / 2; if ( *(_QWORD *)(v3 + 16LL * (v6 / 2)) > v1 ) { v7 = v6 / 2; v4 = v5; } v6 = v4 + v7; v5 = v4; } while ( v7 - v4 > 1 ); } result = 0.0; if ( v4 < v2 ) { v9 = 16LL * v4; if ( *(_QWORD *)(v3 + v9) == v1 ) return *(double *)(v9 + v3 + 8); } return result; }
ft_nlq_find_relevance: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX + 0x170] CMP RAX,-0x1 JZ 0x0014cc6f MOV ECX,dword ptr [RDI + 0x10] ADD RDI,0x18 XOR EDX,EDX CMP ECX,0x2 JL 0x0014cc4e XOR R8D,R8D MOV R9D,ECX MOV ESI,ECX LAB_0014cc1e: MOV EDX,R9D SHR EDX,0x1f ADD EDX,R9D SAR EDX,0x1 MOVSXD R9,EDX SHL R9,0x4 CMP qword ptr [RDI + R9*0x1],RAX JBE 0x0014cc3b MOV ESI,EDX MOV EDX,R8D LAB_0014cc3b: LEA R9D,[RDX + RSI*0x1] MOV R10D,ESI SUB R10D,EDX MOV R8D,EDX CMP R10D,0x1 JG 0x0014cc1e LAB_0014cc4e: XORPS XMM0,XMM0 CMP EDX,ECX JGE 0x0014cc77 MOVSXD RCX,EDX SHL RCX,0x4 CMP qword ptr [RDI + RCX*0x1],RAX JNZ 0x0014cc77 ADD RDI,RCX XORPS XMM0,XMM0 CVTSD2SS XMM0,qword ptr [RDI + 0x8] JMP 0x0014cc77 LAB_0014cc6f: MOVSS XMM0,dword ptr [0x00191014] LAB_0014cc77: POP RBP RET
float ft_nlq_find_relevance(long param_1) { int iVar1; ulong uVar2; int iVar3; int iVar4; int iVar5; int iVar6; float fVar7; uVar2 = *(ulong *)(*(long *)(param_1 + 8) + 0x170); fVar7 = DAT_00191014; if (uVar2 != 0xffffffffffffffff) { iVar1 = *(int *)(param_1 + 0x10); param_1 = param_1 + 0x18; iVar3 = 0; if (1 < iVar1) { iVar6 = iVar1; iVar4 = iVar1; iVar5 = 0; do { iVar3 = iVar6 / 2; if (uVar2 < *(ulong *)(param_1 + (long)iVar3 * 0x10)) { iVar4 = iVar3; iVar3 = iVar5; } iVar6 = iVar3 + iVar4; iVar5 = iVar3; } while (1 < iVar4 - iVar3); } fVar7 = 0.0; if ((iVar3 < iVar1) && (*(ulong *)(param_1 + (long)iVar3 * 0x10) == uVar2)) { fVar7 = (float)*(double *)(param_1 + (long)iVar3 * 0x10 + 8); } } return fVar7; }
13,812
nglog::LogMessage::SaveOrSendToLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->outvec_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when recording in outvec_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->outvec_->push_back(string(start, len)); } else { SendToLog(); } }
O1
cpp
nglog::LogMessage::SaveOrSendToLog(): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq 0x8(%rdi), %rax cmpq $0x0, 0x76b0(%rax) je 0xba41 movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0xb9ab cmpb $0xa, 0x3(%rcx,%rax) je 0xb9d8 leaq 0x17f50(%rip), %rsi # 0x23902 leaq 0x17f90(%rip), %rcx # 0x23949 leaq 0x17f9d(%rip), %r8 # 0x2395d leaq 0x184af(%rip), %r9 # 0x23e76 movl $0x3, %edi movl $0x77e, %edx # imm = 0x77E xorl %eax, %eax callq 0x2040c movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rbx movq 0x76b8(%rax), %rcx leaq (%rax,%rcx), %rsi addq $0x4, %rsi notq %rcx movq 0x76c0(%rax), %rdx addq %rsi, %rdx addq %rcx, %rdx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq %rsp, %r14 movq %r14, %rdi callq 0xa614 movq %rbx, %rdi movq %r14, %rsi callq 0x2018c movq (%rsp), %rdi cmpq %r15, %rdi je 0xba37 movq 0x10(%rsp), %rsi incq %rsi callq 0x906c addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rbx, %rdi addq $0x20, %rsp popq %rbx popq %r14 popq %r15 jmp 0xb2aa movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0xba6b movq 0x10(%rsp), %rsi incq %rsi callq 0x906c movq %rbx, %rdi callq 0x79b0 nop
_ZN5nglog10LogMessage15SaveOrSendToLogEv: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov rax, [rdi+8] cmp qword ptr [rax+76B0h], 0 jz loc_BA41 mov rcx, [rax+76C0h] test rcx, rcx jz short loc_B9AB cmp byte ptr [rcx+rax+3], 0Ah jz short loc_B9D8 loc_B9AB: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_23E74+2; "" mov edi, 3 mov edx, 77Eh xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) loc_B9D8: mov rax, [rbx+8] mov rbx, [rax+76B0h] mov rcx, [rax+76B8h] lea rsi, [rax+rcx] add rsi, 4 not rcx mov rdx, [rax+76C0h] add rdx, rsi add rdx, rcx lea r15, [rsp+38h+var_28] mov [r15-10h], r15 mov r14, rsp 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) mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+38h+var_38]; void * cmp rdi, r15 jz short loc_BA37 mov rsi, [rsp+38h+var_28] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_BA37: add rsp, 20h pop rbx pop r14 pop r15 retn loc_BA41: mov rdi, rbx; this add rsp, 20h pop rbx pop r14 pop r15 jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_BA6B mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_BA6B: mov rdi, rbx call __Unwind_Resume
void nglog::LogMessage::SaveOrSendToLog(nglog::LogMessage *this) { long long v1; // rax long long v2; // rcx _QWORD *v3; // rax long long v4; // rbx long long v5; // rcx _BYTE *v6; // rsi long long v7; // rdx void *v8[2]; // [rsp+0h] [rbp-38h] BYREF _QWORD v9[5]; // [rsp+10h] [rbp-28h] BYREF v1 = *((_QWORD *)this + 1); if ( *(_QWORD *)(v1 + 30384) ) { v2 = *(_QWORD *)(v1 + 30400); if ( !v2 || *(_BYTE *)(v2 + v1 + 3) != 10 ) nglog::RawLog( 3, (unsigned int)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1918, (unsigned int)"Check %s failed: %s", (unsigned int)"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", (unsigned int)"", (char)v8[0]); v3 = (_QWORD *)*((_QWORD *)this + 1); v4 = v3[3798]; v5 = v3[3799]; v6 = (char *)v3 + v5 + 4; v7 = (long long)&v6[v3[3800] + ~v5]; v8[0] = v9; std::string::_M_construct<char const*>(v8, v6, v7); std::vector<std::string>::emplace_back<std::string>(v4, v8); if ( v8[0] != v9 ) operator delete(v8[0]); } else { nglog::LogMessage::SendToLog(this); } }
SaveOrSendToLog: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] CMP qword ptr [RAX + 0x76b0],0x0 JZ 0x0010ba41 MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x0010b9ab CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x0010b9d8 LAB_0010b9ab: LEA RSI,[0x123902] LEA RCX,[0x123949] LEA R8,[0x12395d] LEA R9,[0x123e76] MOV EDI,0x3 MOV EDX,0x77e XOR EAX,EAX CALL 0x0012040c LAB_0010b9d8: MOV RAX,qword ptr [RBX + 0x8] MOV RBX,qword ptr [RAX + 0x76b0] MOV RCX,qword ptr [RAX + 0x76b8] LEA RSI,[RAX + RCX*0x1] ADD RSI,0x4 NOT RCX MOV RDX,qword ptr [RAX + 0x76c0] ADD RDX,RSI ADD RDX,RCX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV R14,RSP MOV RDI,R14 CALL 0x0010a614 LAB_0010ba16: MOV RDI,RBX MOV RSI,R14 CALL 0x0012018c LAB_0010ba21: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x0010ba37 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010906c LAB_0010ba37: ADD RSP,0x20 POP RBX POP R14 POP R15 RET LAB_0010ba41: MOV RDI,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 JMP 0x0010b2aa
/* nglog::LogMessage::SaveOrSendToLog() */ void __thiscall nglog::LogMessage::SaveOrSendToLog(LogMessage *this) { long lVar1; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; long lVar2; long *local_38 [2]; long local_28 [2]; lVar1 = *(long *)(this + 8); if (*(long *)(lVar1 + 0x76b0) != 0) { if ((*(long *)(lVar1 + 0x76c0) == 0) || (*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x77e, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_00123e76); } lVar1 = *(long *)(this + 8); this_00 = *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **) (lVar1 + 0x76b0); lVar2 = lVar1 + *(ulong *)(lVar1 + 0x76b8) + 4; local_38[0] = local_28; std::__cxx11::string::_M_construct<char_const*> (local_38,lVar2,*(long *)(lVar1 + 0x76c0) + lVar2 + ~*(ulong *)(lVar1 + 0x76b8)); /* try { // try from 0010ba16 to 0010ba20 has its CatchHandler @ 0010ba52 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(this_00,(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return; } SendToLog(this); return; }
13,813
get_salt_from_password_323
eloqsql/sql/password.c
void get_salt_from_password_323(ulong *res, const char *password) { res[0]= res[1]= 0; if (password) { while (*password) { ulong val=0; uint i; for (i=0 ; i < 8 ; i++) val=(val << 4)+char_val(*password++); *res++=val; } } }
O0
c
get_salt_from_password_323: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) cmpq $0x0, -0x10(%rbp) je 0x3a976 jmp 0x3a900 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x3a974 movq $0x0, -0x18(%rbp) movl $0x0, -0x1c(%rbp) cmpl $0x8, -0x1c(%rbp) jae 0x3a95c movq -0x18(%rbp), %rax shlq $0x4, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movzbl (%rax), %edi callq 0x3a980 movb %al, %cl movq -0x28(%rbp), %rax movzbl %cl, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x3a918 movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x8(%rbp) movq %rcx, (%rax) jmp 0x3a900 jmp 0x3a976 addq $0x30, %rsp popq %rbp retq nopl (%rax)
get_salt_from_password_323: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 cmp [rbp+var_10], 0 jz short loc_3A976 jmp short $+2 loc_3A900: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_3A974 mov [rbp+var_18], 0 mov [rbp+var_1C], 0 loc_3A918: cmp [rbp+var_1C], 8 jnb short loc_3A95C mov rax, [rbp+var_18] shl rax, 4 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movzx edi, byte ptr [rax] call char_val mov cl, al mov rax, [rbp+var_28] movzx ecx, cl add rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_3A918 loc_3A95C: mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rdx, rax add rdx, 8 mov [rbp+var_8], rdx mov [rax], rcx jmp short loc_3A900 loc_3A974: jmp short $+2 loc_3A976: add rsp, 30h pop rbp retn
_BYTE * get_salt_from_password_323(long long *a1, unsigned __int8 *a2) { _BYTE *result; // rax unsigned __int8 *v3; // rax long long *v4; // rax unsigned int i; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] unsigned __int8 *v7; // [rsp+20h] [rbp-10h] long long *v8; // [rsp+28h] [rbp-8h] v8 = a1; v7 = a2; a1[1] = 0LL; result = a1; *a1 = 0LL; if ( a2 ) { while ( 1 ) { result = v7; if ( !*v7 ) break; v6 = 0LL; for ( i = 0; i < 8; ++i ) { v3 = v7++; v6 = (unsigned __int8)char_val(*v3) + 16 * v6; } v4 = v8++; *v4 = v6; } } return result; }
get_salt_from_password_323: 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 [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013a976 JMP 0x0013a900 LAB_0013a900: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x0013a974 MOV qword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x1c],0x0 LAB_0013a918: CMP dword ptr [RBP + -0x1c],0x8 JNC 0x0013a95c MOV RAX,qword ptr [RBP + -0x18] SHL RAX,0x4 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVZX EDI,byte ptr [RAX] CALL 0x0013a980 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOVZX ECX,CL ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0013a918 LAB_0013a95c: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x8],RDX MOV qword ptr [RAX],RCX JMP 0x0013a900 LAB_0013a974: JMP 0x0013a976 LAB_0013a976: ADD RSP,0x30 POP RBP RET
void get_salt_from_password_323(long *param_1,char *param_2) { byte bVar1; uint local_24; long local_20; char *local_18; long *local_10; param_1[1] = 0; *param_1 = 0; local_18 = param_2; local_10 = param_1; if (param_2 != (char *)0x0) { while (*local_18 != '\0') { local_20 = 0; for (local_24 = 0; local_24 < 8; local_24 = local_24 + 1) { bVar1 = char_val(*local_18); local_20 = local_20 * 0x10 + (ulong)bVar1; local_18 = local_18 + 1; } *local_10 = local_20; local_10 = local_10 + 1; } } return; }
13,814
usage
eloqsql/libmariadb/unittest/libmariadb/my_test.h
static void usage() { printf("Execute test with the following options:\n"); printf("-h hostname\n"); printf("-u username\n"); printf("-p password\n"); printf("-d database\n"); printf("-S socketname\n"); printf("-t force use of TLS\n"); printf("-P port number\n"); printf("? displays this help and exits\n"); }
O3
c
usage: pushq %rbp movq %rsp, %rbp leaq 0x202f2(%rip), %rsi # 0x3989f movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x20309(%rip), %rsi # 0x398c9 movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x20303(%rip), %rsi # 0x398d6 movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202fd(%rip), %rsi # 0x398e3 movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202f7(%rip), %rsi # 0x398f0 movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202f1(%rip), %rsi # 0x398fd movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202ed(%rip), %rsi # 0x3990c movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202ef(%rip), %rsi # 0x39921 movl $0x1, %edi xorl %eax, %eax callq 0x13030 leaq 0x202ec(%rip), %rsi # 0x39931 movl $0x1, %edi xorl %eax, %eax popq %rbp jmp 0x13030 nop
usage: push rbp mov rbp, rsp lea rsi, aExecuteTestWit; "Execute test with the following options"... mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aHHostname; "-h hostname\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aUUsername; "-u username\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aPPassword; "-p password\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aDDatabase; "-d database\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aSSocketname; "-S socketname\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aTForceUseOfTls; "-t force use of TLS\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aPPortNumber; "-P port number\n" mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aDisplaysThisHe; "? displays this help and exits\n" mov edi, 1 xor eax, eax pop rbp jmp ___printf_chk
long long usage() { __printf_chk(1LL, "Execute test with the following options:\n"); __printf_chk(1LL, "-h hostname\n"); __printf_chk(1LL, "-u username\n"); __printf_chk(1LL, "-p password\n"); __printf_chk(1LL, "-d database\n"); __printf_chk(1LL, "-S socketname\n"); __printf_chk(1LL, "-t force use of TLS\n"); __printf_chk(1LL, "-P port number\n"); return __printf_chk(1LL, "? displays this help and exits\n"); }
usage: PUSH RBP MOV RBP,RSP LEA RSI,[0x13989f] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x1398c9] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x1398d6] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x1398e3] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x1398f0] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x1398fd] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x13990c] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x139921] MOV EDI,0x1 XOR EAX,EAX CALL 0x00113030 LEA RSI,[0x139931] MOV EDI,0x1 XOR EAX,EAX POP RBP JMP 0x00113030
void usage(void) { __printf_chk(1,"Execute test with the following options:\n"); __printf_chk(1,"-h hostname\n"); __printf_chk(1,"-u username\n"); __printf_chk(1,"-p password\n"); __printf_chk(1,"-d database\n"); __printf_chk(1,"-S socketname\n"); __printf_chk(1,"-t force use of TLS\n"); __printf_chk(1,"-P port number\n"); __printf_chk(1,"? displays this help and exits\n"); return; }
13,815
ma_update_state_lsns
eloqsql/storage/maria/ma_create.c
int _ma_update_state_lsns(MARIA_SHARE *share, LSN lsn, TrID create_trid, my_bool do_sync, my_bool update_create_rename_lsn) { int res; DBUG_ENTER("_ma_update_state_lsns"); mysql_mutex_lock(&share->intern_lock); res= _ma_update_state_lsns_sub(share, lsn, create_trid, do_sync, update_create_rename_lsn); mysql_mutex_unlock(&share->intern_lock); DBUG_RETURN(res); }
O0
c
ma_update_state_lsns: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %r8b, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movb %cl, -0x19(%rbp) movb %al, -0x1a(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xdc184(%rip), %rsi # 0x153d33 movl $0x58d, %edx # imm = 0x58D callq 0x76df0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movb -0x19(%rbp), %al movsbl %al, %ecx movsbl -0x1a(%rbp), %r8d callq 0x77380 movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x77a40 movl -0x20(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_update_state_lsns: push rbp mov rbp, rsp sub rsp, 30h mov al, r8b mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_19], cl mov [rbp+var_1A], al mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 58Dh call inline_mysql_mutex_lock_10 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov al, [rbp+var_19] movsx ecx, al movsx r8d, [rbp+var_1A] call _ma_update_state_lsns_sub mov [rbp+var_20], eax mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_11 mov eax, [rbp+var_20] mov [rbp+var_24], eax mov eax, [rbp+var_24] add rsp, 30h pop rbp retn
long long ma_update_state_lsns(long long a1, long long a2, long long a3, char a4, char a5) { unsigned int updated; // [rsp+10h] [rbp-20h] inline_mysql_mutex_lock_10( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c", 0x58Du); updated = ma_update_state_lsns_sub(a1, a2, a3, a4, a5); inline_mysql_mutex_unlock_11(a1 + 2288); return updated; }
_ma_update_state_lsns: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,R8B MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RBP + -0x19],CL MOV byte ptr [RBP + -0x1a],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x253d33] MOV EDX,0x58d CALL 0x00176df0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RBP + -0x19] MOVSX ECX,AL MOVSX R8D,byte ptr [RBP + -0x1a] CALL 0x00177380 MOV dword ptr [RBP + -0x20],EAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00177a40 MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET
int4 _ma_update_state_lsns(long param_1,int8 param_2,int8 param_3,char param_4,char param_5) { int4 uVar1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c", 0x58d); uVar1 = _ma_update_state_lsns_sub(param_1,param_2,param_3,(int)param_4,(int)param_5); inline_mysql_mutex_unlock(param_1 + 0x8f0); return uVar1; }
13,816
my_b_write
eloqsql/mysys/mf_iocache.c
int _my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length; int res; /* Always use my_b_flush_io_cache() to flush write_buffer! */ DBUG_ASSERT(Buffer != info->write_buffer); if (info->pos_in_file + info->buffer_length > info->end_of_file) { my_errno=errno=EFBIG; return info->error = -1; } rest_length= (size_t) (info->write_end - info->write_pos); DBUG_ASSERT(Count >= rest_length); memcpy(info->write_pos, Buffer, (size_t) rest_length); Buffer+=rest_length; Count-=rest_length; info->write_pos+=rest_length; if (my_b_flush_io_cache(info, 1)) return 1; if (Count) { my_off_t old_pos_in_file= info->pos_in_file; res= info->write_function(info, Buffer, Count); Count-= (size_t) (info->pos_in_file - old_pos_in_file); Buffer+= info->pos_in_file - old_pos_in_file; } else res= 0; if (!res && Count) { memcpy(info->write_pos, Buffer, Count); info->write_pos+= Count; } return res; }
O3
c
my_b_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0xe8(%rdi), %rax addq (%rdi), %rax cmpq 0x8(%rdi), %rax jbe 0xb114b callq 0x2a870 movl $0x1b, %r14d movl %r14d, (%rax) callq 0xc14ee movl %r14d, (%rax) movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movl $0xffffffff, %r12d # imm = 0xFFFFFFFF jmp 0xb11d4 movq %rdx, %r14 movq %rsi, %r15 movq 0x40(%rbx), %rdi movq 0x48(%rbx), %r13 subq %rdi, %r13 movq %r13, %rdx callq 0x2a0b0 addq %r13, 0x40(%rbx) movl $0x1, %r12d movq %rbx, %rdi movl $0x1, %esi callq 0xb0e3d testl %eax, %eax jne 0xb11d4 xorl %r12d, %r12d cmpq %r13, %r14 je 0xb11d4 addq %r13, %r15 subq %r13, %r14 movq (%rbx), %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq *0xa8(%rbx) movl %eax, %r12d movq (%rbx), %rax subq %r13, %rax testl %r12d, %r12d sete %cl subq %rax, %r14 setne %dl andb %cl, %dl cmpb $0x1, %dl jne 0xb11d4 addq %rax, %r15 movq 0x40(%rbx), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x2a0b0 addq %r14, 0x40(%rbx) xorl %r12d, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_my_b_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, [rdi+0E8h] add rax, [rdi] cmp rax, [rdi+8] jbe short loc_B114B call ___errno_location mov r14d, 1Bh mov [rax], r14d call _my_thread_var mov [rax], r14d mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov r12d, 0FFFFFFFFh jmp loc_B11D4 loc_B114B: mov r14, rdx mov r15, rsi mov rdi, [rbx+40h] mov r13, [rbx+48h] sub r13, rdi mov rdx, r13 call _memcpy add [rbx+40h], r13 mov r12d, 1 mov rdi, rbx mov esi, 1 call my_b_flush_io_cache test eax, eax jnz short loc_B11D4 xor r12d, r12d cmp r14, r13 jz short loc_B11D4 add r15, r13 sub r14, r13 mov r13, [rbx] mov rdi, rbx mov rsi, r15 mov rdx, r14 call qword ptr [rbx+0A8h] mov r12d, eax mov rax, [rbx] sub rax, r13 test r12d, r12d setz cl sub r14, rax setnz dl and dl, cl cmp dl, 1 jnz short loc_B11D4 add r15, rax mov rdi, [rbx+40h] mov rsi, r15 mov rdx, r14 call _memcpy add [rbx+40h], r14 xor r12d, r12d loc_B11D4: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_b_write(long long a1, long long a2, long long a3) { unsigned int v4; // r12d long long v6; // rdi long long v7; // r13 long long v8; // r15 long long v9; // r14 long long v10; // r13 long long v11; // rax long long v12; // r14 if ( *(_QWORD *)a1 + *(_QWORD *)(a1 + 232) <= *(_QWORD *)(a1 + 8) ) { v6 = *(_QWORD *)(a1 + 64); v7 = *(_QWORD *)(a1 + 72) - v6; memcpy(v6, a2, v7); *(_QWORD *)(a1 + 64) += v7; v4 = 1; if ( !(unsigned int)my_b_flush_io_cache(a1, 1) ) { v4 = 0; if ( a3 != v7 ) { v8 = v7 + a2; v9 = a3 - v7; v10 = *(_QWORD *)a1; v4 = (*(long long ( **)(long long, long long, long long))(a1 + 168))(a1, v8, v9); v11 = *(_QWORD *)a1 - v10; v12 = v9 - v11; if ( v4 == 0 && v12 != 0 ) { memcpy(*(_QWORD *)(a1 + 64), v11 + v8, v12); *(_QWORD *)(a1 + 64) += v12; return 0; } } } } else { *(_DWORD *)__errno_location(a1) = 27; *(_DWORD *)my_thread_var(a1) = 27; *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } return v4; }
_my_b_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0xe8] ADD RAX,qword ptr [RDI] CMP RAX,qword ptr [RDI + 0x8] JBE 0x001b114b CALL 0x0012a870 MOV R14D,0x1b MOV dword ptr [RAX],R14D CALL 0x001c14ee MOV dword ptr [RAX],R14D MOV dword ptr [RBX + 0xe4],0xffffffff MOV R12D,0xffffffff JMP 0x001b11d4 LAB_001b114b: MOV R14,RDX MOV R15,RSI MOV RDI,qword ptr [RBX + 0x40] MOV R13,qword ptr [RBX + 0x48] SUB R13,RDI MOV RDX,R13 CALL 0x0012a0b0 ADD qword ptr [RBX + 0x40],R13 MOV R12D,0x1 MOV RDI,RBX MOV ESI,0x1 CALL 0x001b0e3d TEST EAX,EAX JNZ 0x001b11d4 XOR R12D,R12D CMP R14,R13 JZ 0x001b11d4 ADD R15,R13 SUB R14,R13 MOV R13,qword ptr [RBX] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL qword ptr [RBX + 0xa8] MOV R12D,EAX MOV RAX,qword ptr [RBX] SUB RAX,R13 TEST R12D,R12D SETZ CL SUB R14,RAX SETNZ DL AND DL,CL CMP DL,0x1 JNZ 0x001b11d4 ADD R15,RAX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R15 MOV RDX,R14 CALL 0x0012a0b0 ADD qword ptr [RBX + 0x40],R14 XOR R12D,R12D LAB_001b11d4: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _my_b_write(long *param_1,void *param_2,size_t param_3) { long lVar1; int iVar2; int iVar3; int *piVar4; int4 *puVar5; size_t __n; size_t __n_00; if ((ulong)param_1[1] < (ulong)(param_1[0x1d] + *param_1)) { piVar4 = __errno_location(); *piVar4 = 0x1b; puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x1b; *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; iVar3 = -1; } else { __n = param_1[9] - param_1[8]; memcpy((void *)param_1[8],param_2,__n); param_1[8] = param_1[8] + __n; iVar3 = 1; iVar2 = my_b_flush_io_cache(param_1,1); if ((iVar2 == 0) && (iVar3 = 0, param_3 != __n)) { lVar1 = *param_1; iVar3 = (*(code *)param_1[0x15])(param_1,(long)param_2 + __n,param_3 - __n); __n_00 = (param_3 - __n) - (*param_1 - lVar1); if (__n_00 != 0 && iVar3 == 0) { memcpy((void *)param_1[8],(void *)((long)param_2 + __n + (*param_1 - lVar1)),__n_00); param_1[8] = param_1[8] + __n_00; iVar3 = 0; } } } return iVar3; }
13,817
ma_read_bitmap_page
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_read_bitmap_page(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { MARIA_SHARE *share= info->s; my_bool res; DBUG_ENTER("_ma_read_bitmap_page"); DBUG_PRINT("enter", ("page: %lld data_file_length: %lld", (longlong) page, (longlong) share->state.state.data_file_length)); DBUG_ASSERT(page % bitmap->pages_covered == 0); DBUG_ASSERT(!bitmap->changed); bitmap->page= page; if ((page + 1) * bitmap->block_size > share->state.state.data_file_length) { /* Inexistent or half-created page */ res= _ma_bitmap_create_missing(info, bitmap, page); if (!res) adjust_total_size(info, page); DBUG_RETURN(res); } adjust_total_size(info, page); bitmap->full_head_size= bitmap->full_tail_size= 0; DBUG_ASSERT(share->pagecache->block_size == bitmap->block_size); res= pagecache_read(share->pagecache, &bitmap->file, page, 0, bitmap->map, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, 0) == NULL; if (!res) { /* Calculate used_size */ const uchar *data, *end= bitmap->map; for (data= bitmap->map + bitmap->total_size; --data >= end && *data == 0; ) {} bitmap->used_size= (uint) ((data + 1) - end); DBUG_ASSERT(bitmap->used_size <= bitmap->total_size); } else { _ma_set_fatal_error(info, my_errno); } /* We can't check maria_bitmap_marker here as if the bitmap page previously had a true checksum and the user switched mode to not checksum this may have any value, except maria_normal_page_marker. Using maria_normal_page_marker gives us a protection against bugs when running without any checksums. */ #ifndef DBUG_OFF if (!res) { memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size); _ma_check_bitmap(bitmap); } #endif DBUG_RETURN(res); }
O0
c
ma_read_bitmap_page: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) jmp 0x660d1 jmp 0x660d3 jmp 0x660d5 jmp 0x660d7 jmp 0x660d9 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rax addq $0x1, %rax movq -0x18(%rbp), %rcx movl 0x134(%rcx), %ecx imulq %rcx, %rax movq -0x28(%rbp), %rcx cmpq 0x40(%rcx), %rax jbe 0x66139 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x66250 movb %al, -0x29(%rbp) cmpb $0x0, -0x29(%rbp) jne 0x6612c movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x664d0 jmp 0x6612e movb -0x29(%rbp), %al movb %al, -0x1(%rbp) jmp 0x66244 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x664d0 movq -0x18(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x28(%rax) jmp 0x6615e movq -0x28(%rbp), %rax movq 0x600(%rax), %rdi movq -0x18(%rbp), %rsi addq $0x40, %rsi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax movq 0x8(%rax), %r8 xorl %ecx, %ecx movl $0x1, %r9d xorl %eax, %eax movl $0x0, (%rsp) movq $0x0, 0x8(%rsp) callq 0x3d000 cmpq $0x0, %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x29(%rbp) cmpb $0x0, -0x29(%rbp) jne 0x66224 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movl 0x128(%rcx), %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rcx addq $-0x1, %rcx movq %rcx, -0x38(%rbp) xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jb 0x661fd movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x0, %eax sete %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x66206 jmp 0x66208 jmp 0x661d6 movq -0x38(%rbp), %rax addq $0x1, %rax movq -0x40(%rbp), %rcx subq %rcx, %rax movl %eax, %ecx movq -0x18(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x66222 jmp 0x6623c movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) callq 0xf6080 movq -0x50(%rbp), %rdi movl (%rax), %esi callq 0x43d90 jmp 0x6623e movb -0x29(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ma_read_bitmap_page: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax jmp short $+2 loc_660D1: jmp short $+2 loc_660D3: jmp short $+2 loc_660D5: jmp short $+2 loc_660D7: jmp short $+2 loc_660D9: mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rax, [rbp+var_20] add rax, 1 mov rcx, [rbp+var_18] mov ecx, [rcx+134h] imul rax, rcx mov rcx, [rbp+var_28] cmp rax, [rcx+40h] jbe short loc_66139 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ma_bitmap_create_missing mov [rbp+var_29], al cmp [rbp+var_29], 0 jnz short loc_6612C mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call adjust_total_size loc_6612C: jmp short $+2 loc_6612E: mov al, [rbp+var_29] mov [rbp+var_1], al jmp loc_66244 loc_66139: mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call adjust_total_size mov rax, [rbp+var_18] mov dword ptr [rax+2Ch], 0 mov rax, [rbp+var_18] mov dword ptr [rax+28h], 0 jmp short $+2 loc_6615E: mov rax, [rbp+var_28] mov rdi, [rax+600h] mov rsi, [rbp+var_18] add rsi, 40h ; '@' mov rdx, [rbp+var_20] mov rax, [rbp+var_18] mov r8, [rax+8] xor ecx, ecx mov r9d, 1 xor eax, eax mov [rsp+60h+var_60], 0 mov [rsp+60h+var_58], 0 call pagecache_read cmp rax, 0 setz al and al, 1 movzx eax, al mov [rbp+var_29], al cmp [rbp+var_29], 0 jnz short loc_66224 mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_18] mov ecx, [rcx+128h] add rax, rcx mov [rbp+var_38], rax loc_661D6: mov rcx, [rbp+var_38] add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rcx xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jb short loc_661FD mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 0 setz al mov [rbp+var_41], al loc_661FD: mov al, [rbp+var_41] test al, 1 jnz short loc_66206 jmp short loc_66208 loc_66206: jmp short loc_661D6 loc_66208: mov rax, [rbp+var_38] add rax, 1 mov rcx, [rbp+var_40] sub rax, rcx mov ecx, eax mov rax, [rbp+var_18] mov [rax+24h], ecx jmp short $+2 loc_66222: jmp short loc_6623C loc_66224: mov rax, [rbp+var_10] mov [rbp+var_50], rax call _my_thread_var mov rdi, [rbp+var_50] mov esi, [rax] call _ma_set_fatal_error loc_6623C: jmp short $+2 loc_6623E: mov al, [rbp+var_29] mov [rbp+var_1], al loc_66244: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
bool ma_read_bitmap_page(_DWORD *a1, long long a2, long long a3) { long long v3; // rax int *v4; // rax long long v5; // rdx long long v6; // rcx long long v7; // r8 int v8; // r9d bool v10; // [rsp+1Fh] [rbp-41h] unsigned long long v11; // [rsp+20h] [rbp-40h] _BYTE *v12; // [rsp+28h] [rbp-38h] char missing; // [rsp+37h] [rbp-29h] bool v14; // [rsp+37h] [rbp-29h] long long v15; // [rsp+38h] [rbp-28h] v15 = *(_QWORD *)a1; *(_QWORD *)(a2 + 16) = a3; if ( (unsigned long long)*(unsigned int *)(a2 + 308) * (a3 + 1) <= *(_QWORD *)(v15 + 64) ) { adjust_total_size(a1, a3); *(_DWORD *)(a2 + 44) = 0; *(_DWORD *)(a2 + 40) = 0; v3 = pagecache_read(*(_QWORD **)(v15 + 1536), a2 + 64, a3, 0, *(_QWORD *)(a2 + 8), 1, 0, 0LL); v14 = v3 == 0; if ( v3 ) { v11 = *(_QWORD *)(a2 + 8); v12 = (_BYTE *)(*(unsigned int *)(a2 + 296) + v11); do { --v12; v10 = 0; if ( (unsigned long long)v12 >= v11 ) v10 = *v12 == 0; } while ( v10 ); *(_DWORD *)(a2 + 36) = (_DWORD)v12 + 1 - v11; } else { v4 = (int *)my_thread_var(); ma_set_fatal_error(a1, *v4, v5, v6, v7, v8); } return v14; } else { missing = ma_bitmap_create_missing(a1, a2, a3); if ( !missing ) adjust_total_size(a1, a3); return missing; } }
_ma_read_bitmap_page: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX JMP 0x001660d1 LAB_001660d1: JMP 0x001660d3 LAB_001660d3: JMP 0x001660d5 LAB_001660d5: JMP 0x001660d7 LAB_001660d7: JMP 0x001660d9 LAB_001660d9: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x134] IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x40] JBE 0x00166139 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00166250 MOV byte ptr [RBP + -0x29],AL CMP byte ptr [RBP + -0x29],0x0 JNZ 0x0016612c MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001664d0 LAB_0016612c: JMP 0x0016612e LAB_0016612e: MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0x1],AL JMP 0x00166244 LAB_00166139: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001664d0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x2c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x28],0x0 JMP 0x0016615e LAB_0016615e: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x40 MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RAX + 0x8] XOR ECX,ECX MOV R9D,0x1 XOR EAX,EAX MOV dword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],0x0 CALL 0x0013d000 CMP RAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x29],AL CMP byte ptr [RBP + -0x29],0x0 JNZ 0x00166224 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x128] ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX LAB_001661d6: MOV RCX,qword ptr [RBP + -0x38] ADD RCX,-0x1 MOV qword ptr [RBP + -0x38],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JC 0x001661fd MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 SETZ AL MOV byte ptr [RBP + -0x41],AL LAB_001661fd: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00166206 JMP 0x00166208 LAB_00166206: JMP 0x001661d6 LAB_00166208: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x24],ECX JMP 0x00166222 LAB_00166222: JMP 0x0016623c LAB_00166224: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RAX CALL 0x001f6080 MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RAX] CALL 0x00143d90 LAB_0016623c: JMP 0x0016623e LAB_0016623e: MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0x1],AL LAB_00166244: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 _ma_read_bitmap_page(long *param_1,long param_2,long param_3) { ulong uVar1; ulong uVar2; int8 uVar3; int7 uVar6; long lVar4; int4 *puVar5; bool bVar7; char *local_40; char local_9; lVar4 = *param_1; *(long *)(param_2 + 0x10) = param_3; uVar2 = (param_3 + 1) * (ulong)*(uint *)(param_2 + 0x134); uVar1 = *(ulong *)(lVar4 + 0x40); if (uVar2 < uVar1 || uVar2 - uVar1 == 0) { adjust_total_size(param_1,param_3); *(int4 *)(param_2 + 0x2c) = 0; *(int4 *)(param_2 + 0x28) = 0; lVar4 = pagecache_read(*(int8 *)(lVar4 + 0x600),param_2 + 0x40,param_3,0, *(int8 *)(param_2 + 8),1,0,0); local_9 = lVar4 == 0; if ((bool)local_9) { puVar5 = (int4 *)_my_thread_var(); param_2 = _ma_set_fatal_error(param_1,*puVar5); } else { local_40 = (char *)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 0x128)); do { local_40 = local_40 + -1; bVar7 = false; if (*(char **)(param_2 + 8) <= local_40) { bVar7 = *local_40 == '\0'; } } while (bVar7); *(int *)(param_2 + 0x24) = ((int)local_40 + 1) - (int)*(char **)(param_2 + 8); } uVar6 = (int7)((ulong)param_2 >> 8); } else { uVar3 = _ma_bitmap_create_missing(param_1,param_2,param_3); local_9 = (char)uVar3; if (local_9 == '\0') { uVar3 = adjust_total_size(param_1,param_3); } uVar6 = (int7)((ulong)uVar3 >> 8); } return CONCAT71(uVar6,local_9); }
13,818
my_strnncollsp_nchars_binary
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, size_t nchars) { set_if_smaller(slen, nchars); set_if_smaller(tlen, nchars); return my_strnncoll_binary(cs, s, slen, t, tlen, 0); }
O3
c
my_strnncollsp_nchars_binary: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %r9, %rbx movq %rdx, %r14 cmpq %r9, %rdx cmovaeq %r9, %r14 movq %rsi, %rdi cmpq %r9, %r8 cmovbq %r8, %rbx cmpq %rbx, %r14 movq %rbx, %rdx cmovbq %r14, %rdx movq %rcx, %rsi callq 0x29890 subl %ebx, %r14d testl %eax, %eax cmovel %r14d, %eax popq %rbx popq %r14 popq %rbp retq nop
my_strnncollsp_nchars_binary: push rbp mov rbp, rsp push r14 push rbx mov rbx, r9 mov r14, rdx cmp rdx, r9 cmovnb r14, r9 mov rdi, rsi cmp r8, r9 cmovb rbx, r8 cmp r14, rbx mov rdx, rbx cmovb rdx, r14 mov rsi, rcx call _memcmp sub r14d, ebx test eax, eax cmovz eax, r14d pop rbx pop r14 pop rbp retn
long long my_strnncollsp_nchars_binary( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6) { unsigned long long v6; // rbx unsigned long long v7; // r14 unsigned long long v8; // rdx long long result; // rax unsigned int v10; // r14d v6 = a6; v7 = a3; if ( a3 >= a6 ) v7 = a6; if ( a5 < a6 ) v6 = a5; v8 = v6; if ( v7 < v6 ) v8 = v7; result = memcmp(a2, a4, v8); v10 = v7 - v6; if ( !(_DWORD)result ) return v10; return result; }
my_strnncollsp_nchars_binary: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,R9 MOV R14,RDX CMP RDX,R9 CMOVNC R14,R9 MOV RDI,RSI CMP R8,R9 CMOVC RBX,R8 CMP R14,RBX MOV RDX,RBX CMOVC RDX,R14 MOV RSI,RCX CALL 0x00129890 SUB R14D,EBX TEST EAX,EAX CMOVZ EAX,R14D POP RBX POP R14 POP RBP RET
int my_strnncollsp_nchars_binary (int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6) { int iVar1; ulong __n; if (param_6 <= param_3) { param_3 = param_6; } if (param_5 < param_6) { param_6 = param_5; } __n = param_6; if (param_3 < param_6) { __n = param_3; } iVar1 = memcmp(param_2,param_4,__n); if (iVar1 == 0) { iVar1 = (int)param_3 - (int)param_6; } return iVar1; }
13,819
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O1
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x9b923(%rip), %rax # 0x12a6d8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x8edca callq 0x6c090 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x8edd8 callq 0x6c090 leaq 0x9b5c9(%rip), %rax # 0x12a3a8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x8edf5 popq %rbx jmp 0x6c090 popq %rbx retq nop
_ZN5minja9SliceExprD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_8EDCA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8EDCA: mov rdi, [rbx+28h] test rdi, rdi jz short loc_8EDD8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8EDD8: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_8EDF5 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8EDF5: pop rbx retn
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x22a6d8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0018edca CALL 0x0016c090 LAB_0018edca: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0018edd8 CALL 0x0016c090 LAB_0018edd8: LEA RAX,[0x22a3a8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0018edf5 POP RBX JMP 0x0016c090 LAB_0018edf5: POP RBX RET
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_0022a6e8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_0022a3b8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); return; } return; }
13,820
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O3
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x99e9b(%rip), %rax # 0x1286d8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x8e852 callq 0x6c8e8 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x8e860 callq 0x6c8e8 leaq 0x99b41(%rip), %rax # 0x1283a8 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x8e87d popq %rbx jmp 0x6c8e8 popq %rbx retq nop
_ZN5minja9SliceExprD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_8E852 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8E852: mov rdi, [rbx+28h] test rdi, rdi jz short loc_8E860 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8E860: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_8E87D pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8E87D: pop rbx retn
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x2286d8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0018e852 CALL 0x0016c8e8 LAB_0018e852: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0018e860 CALL 0x0016c8e8 LAB_0018e860: LEA RAX,[0x2283a8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0018e87d POP RBX JMP 0x0016c8e8 LAB_0018e87d: POP RBX RET
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_002286e8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_002283b8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); return; } return; }
13,821
nglog::ReprintFatalMessage()
ng-log[P]ng-log/src/logging.cc
void ReprintFatalMessage() { if (fatal_message[0]) { const size_t n = strlen(fatal_message); if (!FLAGS_logtostderr) { // Also write to stderr (don't color to avoid terminal checks) WriteToStderr(fatal_message, n); } LogDestination::LogToAllLogfiles(NGLOG_ERROR, fatal_time, fatal_message, n); } }
O2
cpp
nglog::ReprintFatalMessage(): cmpb $0x0, 0x36b76(%rip) # 0x41c30 je 0xb101 pushq %rbx leaq 0x36b6c(%rip), %rdi # 0x41c30 callq 0x7220 movq %rax, %rbx leaq 0x279ef(%rip), %rax # 0x32ac2 cmpb $0x0, (%rax) jne 0xb0e7 leaq 0x36b51(%rip), %rdi # 0x41c30 movq %rbx, %rsi callq 0xb102 leaq 0x36c42(%rip), %rsi # 0x41d30 leaq 0x36b3b(%rip), %rdx # 0x41c30 pushq $0x2 popq %rdi movq %rbx, %rcx popq %rbx jmp 0xee00 retq
_ZN5nglog19ReprintFatalMessageEv: cmp cs:_ZN5nglogL13fatal_messageE, 0; nglog::fatal_message jz short locret_B101 push rbx lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message call _strlen mov rbx, rax lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jnz short loc_B0E7 lea rdi, _ZN5nglogL13fatal_messageE; this mov rsi, rbx; char * call _ZN5nglogL13WriteToStderrEPKcm; nglog::WriteToStderr(char const*,ulong) loc_B0E7: lea rsi, _ZN5nglogL10fatal_timeE; nglog::fatal_time lea rdx, _ZN5nglogL13fatal_messageE; nglog::fatal_message push 2 pop rdi mov rcx, rbx pop rbx jmp _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) locret_B101: retn
void nglog::ReprintFatalMessage(nglog *this) { unsigned long long v1; // rdx const char *v2; // rbx if ( nglog::fatal_message[0] ) { v2 = (const char *)strlen(nglog::fatal_message); if ( !fLB::FLAGS_logtostderr ) nglog::WriteToStderr((nglog *)nglog::fatal_message, v2, v1); nglog::LogDestination::LogToAllLogfiles(2LL, &nglog::fatal_time, nglog::fatal_message, v2); } }
ReprintFatalMessage: CMP byte ptr [0x00141c30],0x0 JZ 0x0010b101 PUSH RBX LEA RDI,[0x141c30] CALL 0x00107220 MOV RBX,RAX LEA RAX,[0x132ac2] CMP byte ptr [RAX],0x0 JNZ 0x0010b0e7 LEA RDI,[0x141c30] MOV RSI,RBX CALL 0x0010b102 LAB_0010b0e7: LEA RSI,[0x141d30] LEA RDX,[0x141c30] PUSH 0x2 POP RDI MOV RCX,RBX POP RBX JMP 0x0010ee00 LAB_0010b101: RET
/* nglog::ReprintFatalMessage() */ void nglog::ReprintFatalMessage(void) { size_t sVar1; if (fatal_message != '\0') { sVar1 = strlen(&fatal_message); if (fLB::FLAGS_logtostderr == '\0') { WriteToStderr(&fatal_message,sVar1); } LogDestination::LogToAllLogfiles(2,&fatal_time,&fatal_message,sVar1); return; } return; }
13,822
ftb_find_relevance_parse
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_find_relevance_parse(MYSQL_FTPARSER_PARAM *param, const char *doc, int len) { MY_FTB_FIND_PARAM *ftb_param= param->mysql_ftparam; FT_INFO *ftb= ftb_param->ftb; uchar *end= (uchar*) doc + len; FT_WORD w; while (ft_simple_get_word(ftb->charset, (uchar**) &doc, end, &w, TRUE)) param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0); return(0); }
O0
c
ftb_find_relevance_parse: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movslq -0x14(%rbp), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq 0x10(%rax), %rdi movq -0x30(%rbp), %rdx leaq -0x10(%rbp), %rsi leaq -0x48(%rbp), %rcx movl $0x1, %r8d callq 0xcc790 cmpb $0x0, %al je 0xc9898 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x38(%rbp), %rcx movl %ecx, %edx xorl %ecx, %ecx callq *%rax jmp 0xc9859 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq
ftb_find_relevance_parse: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_14] add rax, rcx mov [rbp+var_30], rax loc_C9859: mov rax, [rbp+var_28] mov rdi, [rax+10h] mov rdx, [rbp+var_30] lea rsi, [rbp+var_10] lea rcx, [rbp+var_48] mov r8d, 1 call ft_simple_get_word cmp al, 0 jz short loc_C9898 mov rax, [rbp+var_8] mov rax, [rax+8] mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov rcx, [rbp+var_38] mov edx, ecx xor ecx, ecx call rax jmp short loc_C9859 loc_C9898: xor eax, eax add rsp, 50h pop rbp retn
long long ftb_find_relevance_parse(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-48h] BYREF long long v5; // [rsp+18h] [rbp-38h] long long v6; // [rsp+20h] [rbp-30h] long long v7; // [rsp+28h] [rbp-28h] long long *v8; // [rsp+30h] [rbp-20h] int v9; // [rsp+3Ch] [rbp-14h] long long v10; // [rsp+40h] [rbp-10h] BYREF long long v11; // [rsp+48h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = *(long long **)(a1 + 24); v7 = *v8; v6 = a3 + a2; while ( (unsigned __int8)ft_simple_get_word(*(_QWORD *)(v7 + 16), &v10, v6, &v4, 1LL) ) (*(void ( **)(long long, long long, _QWORD, _QWORD))(v11 + 8))(v11, v4, (unsigned int)v5, 0LL); return 0LL; }
ftb_find_relevance_parse: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x14] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_001c9859: MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x10] LEA RCX,[RBP + -0x48] MOV R8D,0x1 CALL 0x001cc790 CMP AL,0x0 JZ 0x001c9898 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x38] MOV EDX,ECX XOR ECX,ECX CALL RAX JMP 0x001c9859 LAB_001c9898: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 ftb_find_relevance_parse(long param_1,long param_2,int param_3) { char cVar1; int8 local_50 [2]; ulong local_40; long local_38; long local_30; long *local_28; int local_1c; long local_18; long local_10; local_28 = *(long **)(param_1 + 0x18); local_30 = *local_28; local_38 = param_2 + param_3; local_1c = param_3; local_18 = param_2; local_10 = param_1; while( true ) { cVar1 = ft_simple_get_word(*(int8 *)(local_30 + 0x10),&local_18,local_38,local_50,1); if (cVar1 == '\0') break; (**(code **)(local_10 + 8))(local_10,local_50[0],local_40 & 0xffffffff,0); } return 0; }
13,823
gguf_set_val_u8
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u8(struct gguf_context * ctx, const char * key, uint8_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O1
cpp
gguf_set_val_u8: pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq %rsi, 0x10(%rsp) movb %dl, 0xe(%rsp) leaq 0x18(%rsp), %r14 leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0x18d70 leaq 0x1d80c(%rip), %rsi # 0x5d061 movq %r14, %rdi callq 0x18220 testl %eax, %eax je 0x3f8a8 leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f87c movq 0x28(%rsp), %rsi incq %rsi callq 0x180e0 leaq 0x10(%rsp), %r14 movq (%r14), %rsi movq %rbx, %rdi callq 0x186c0 addq $0x8, %rbx leaq 0xe(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x17950 addq $0x38, %rsp popq %rbx popq %r14 retq leaq 0x1d73e(%rip), %rdi # 0x5cfed leaq 0x1e240(%rip), %rdx # 0x5daf6 movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x18ce0 movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3f8e0 movq 0x28(%rsp), %rsi incq %rsi callq 0x180e0 movq %rbx, %rdi callq 0x18ea0
gguf_set_val_u8: push r14 push rbx sub rsp, 38h mov rbx, rdi mov [rsp+48h+var_38], rsi mov [rsp+48h+var_3A], dl lea r14, [rsp+48h+var_30] lea rdx, [rsp+48h+var_39] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_3F8A8 lea rax, [rsp+48h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F87C mov rsi, [rsp+48h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F87C: lea r14, [rsp+48h+var_38] mov rsi, [r14] mov rdi, rbx call _gguf_remove_key add rbx, 8 lea rdx, [rsp+48h+var_3A] mov rdi, rbx mov rsi, r14 call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRhEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,uchar &>(char const*&,uchar &) add rsp, 38h pop rbx pop r14 retn loc_3F8A8: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rax, [rsp+48h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3F8E0 mov rsi, [rsp+48h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3F8E0: mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u8(long long a1, long long a2, char a3) { int v3; // ecx int v4; // r8d int v5; // r9d char v7; // [rsp+Eh] [rbp-3Ah] BYREF char v8; // [rsp+Fh] [rbp-39h] BYREF long long v9; // [rsp+10h] [rbp-38h] BYREF void *v10[2]; // [rsp+18h] [rbp-30h] BYREF long long v11; // [rsp+28h] [rbp-20h] BYREF v9 = a2; v7 = a3; std::string::basic_string<std::allocator<char>>(v10, a2, &v8); if ( !(unsigned int)std::string::compare(v10, "general.alignment") ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (unsigned int)"general.alignment must be type u32", v3, v4, v5); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); gguf_remove_key(a1, v9); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned char &>(a1 + 8, &v9, &v7); }
gguf_set_val_u8: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV qword ptr [RSP + 0x10],RSI MOV byte ptr [RSP + 0xe],DL LEA R14,[RSP + 0x18] LEA RDX,[RSP + 0xf] MOV RDI,R14 CALL 0x00118d70 LEA RSI,[0x15d061] MOV RDI,R14 CALL 0x00118220 TEST EAX,EAX JZ 0x0013f8a8 LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013f87c MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x001180e0 LAB_0013f87c: LEA R14,[RSP + 0x10] MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x001186c0 ADD RBX,0x8 LEA RDX,[RSP + 0xe] MOV RDI,RBX MOV RSI,R14 CALL 0x00117950 ADD RSP,0x38 POP RBX POP R14 RET LAB_0013f8a8: LEA RDI,[0x15cfed] LEA RDX,[0x15daf6] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x00118ce0
void gguf_set_val_u8(long param_1,char *param_2,uchar param_3) { int iVar1; uchar local_3a; allocator local_39; char *local_38; long *local_30 [2]; long local_20 [2]; local_3a = param_3; local_38 = param_2; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_2,&local_39); iVar1 = std::__cxx11::string::compare((string *)local_30,"general.alignment"); if (iVar1 != 0) { if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } gguf_remove_key(param_1,local_38); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_char&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_38,&local_3a); return; } /* try { // try from 0013f8a8 to 0013f8c1 has its CatchHandler @ 0013f8c2 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
13,824
gguf_set_val_u8
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u8(struct gguf_context * ctx, const char * key, uint8_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O2
cpp
gguf_set_val_u8: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movb %dl, 0x6(%rsp) leaq 0x10(%rsp), %r15 leaq 0x7(%rsp), %rdx movq %r15, %rdi callq 0x1fa80 leaq 0x1d97c(%rip), %rsi # 0x5f2c1 movq %r15, %rdi callq 0x20210 testb %al, %al jne 0x41986 leaq 0x10(%rsp), %rdi callq 0x1eab0 movq %rbx, %rdi movq %r14, %rsi callq 0x1f0d0 addq $0x8, %rbx leaq 0x8(%rsp), %rsi leaq 0x6(%rsp), %rdx movq %rbx, %rdi callq 0x1dd40 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1d8c0(%rip), %rdi # 0x5f24d leaq 0x1ec67(%rip), %rdx # 0x605fb movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x1f9b0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1eab0 movq %rbx, %rdi callq 0x1fc10
gguf_set_val_u8: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_42], dl lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_41] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_41986 lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_42] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRhEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,uchar &>(char const*&,uchar &) add rsp, 30h pop rbx pop r14 pop r15 retn loc_41986: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u8( long long a1, long long a2, char a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // rdx char v18; // [rsp+0h] [rbp-48h] char v19; // [rsp+6h] [rbp-42h] BYREF char v20; // [rsp+7h] [rbp-41h] BYREF long long v21; // [rsp+8h] [rbp-40h] BYREF _BYTE v22[56]; // [rsp+10h] [rbp-38h] BYREF v21 = a2; v19 = a3; std::string::basic_string<std::allocator<char>>(v22, a2, &v20); if ( (unsigned __int8)std::operator==<char>(v22, "general.alignment") ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (long long)"general.alignment must be type u32", v11, v12, v13, a4, a5, a6, a7, v14, v15, a10, a11, v18); std::string::~string(v22); gguf_remove_key(a1, a2, v16); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned char &>(a1 + 8, &v21, &v19); }
gguf_set_val_u8: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV byte ptr [RSP + 0x6],DL LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0x7] MOV RDI,R15 CALL 0x0011fa80 LEA RSI,[0x15f2c1] MOV RDI,R15 CALL 0x00120210 TEST AL,AL JNZ 0x00141986 LEA RDI,[RSP + 0x10] CALL 0x0011eab0 MOV RDI,RBX MOV RSI,R14 CALL 0x0011f0d0 ADD RBX,0x8 LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x6] MOV RDI,RBX CALL 0x0011dd40 ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_00141986: LEA RDI,[0x15f24d] LEA RDX,[0x1605fb] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x0011f9b0
void gguf_set_val_u8(long param_1,char *param_2,uchar param_3) { bool bVar1; uchar local_42; allocator local_41; char *local_40; string local_38 [32]; local_42 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_41); bVar1 = std::operator==(local_38,"general.alignment"); if (!bVar1) { std::__cxx11::string::~string(local_38); gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_char&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_42); return; } /* try { // try from 00141986 to 0014199f has its CatchHandler @ 001419a0 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
13,825
gguf_set_val_u8
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
void gguf_set_val_u8(struct gguf_context * ctx, const char * key, uint8_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O3
cpp
gguf_set_val_u8: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x8(%rsp) movb %dl, 0x6(%rsp) leaq 0x10(%rsp), %r15 leaq 0x7(%rsp), %rdx movq %r15, %rdi callq 0x17d60 leaq 0x1e66e(%rip), %rsi # 0x5d551 movq %r15, %rdi callq 0x17210 testl %eax, %eax je 0x3ef35 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3ef0a movq 0x20(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi movq %r14, %rsi callq 0x176b0 addq $0x8, %rbx leaq 0x8(%rsp), %rsi leaq 0x6(%rsp), %rdx movq %rbx, %rdi callq 0x16950 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1e5a1(%rip), %rdi # 0x5d4dd leaq 0x1f0a3(%rip), %rdx # 0x5dfe6 movl $0x3a3, %esi # imm = 0x3A3 xorl %eax, %eax callq 0x17cd0 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3ef6d movq 0x20(%rsp), %rsi incq %rsi callq 0x170d0 movq %rbx, %rdi callq 0x17e90
gguf_set_val_u8: push r15 push r14 push rbx sub rsp, 30h mov r14, rsi mov rbx, rdi mov [rsp+48h+var_40], rsi mov [rsp+48h+var_42], dl lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_41] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_3EF35 lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3EF0A mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3EF0A: mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_42] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRhEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,uchar &>(char const*&,uchar &) add rsp, 30h pop rbx pop r14 pop r15 retn loc_3EF35: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A3h xor eax, eax call _ggml_abort mov rbx, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3EF6D mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3EF6D: mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u8(long long a1, long long a2, char a3) { int v3; // ecx int v4; // r8d int v5; // r9d char v7; // [rsp+6h] [rbp-42h] BYREF char v8; // [rsp+7h] [rbp-41h] BYREF long long v9; // [rsp+8h] [rbp-40h] BYREF void *v10[2]; // [rsp+10h] [rbp-38h] BYREF long long v11; // [rsp+20h] [rbp-28h] BYREF v9 = a2; v7 = a3; std::string::basic_string<std::allocator<char>>(v10, a2, &v8); if ( !(unsigned int)std::string::compare(v10, "general.alignment") ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 931, (unsigned int)"general.alignment must be type u32", v3, v4, v5); if ( v10[0] != &v11 ) operator delete(v10[0], v11 + 1); gguf_remove_key(a1, a2); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned char &>(a1 + 8, &v9, &v7); }
gguf_set_val_u8: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI MOV byte ptr [RSP + 0x6],DL LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0x7] MOV RDI,R15 CALL 0x00117d60 LEA RSI,[0x15d551] MOV RDI,R15 CALL 0x00117210 TEST EAX,EAX JZ 0x0013ef35 LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013ef0a MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001170d0 LAB_0013ef0a: MOV RDI,RBX MOV RSI,R14 CALL 0x001176b0 ADD RBX,0x8 LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x6] MOV RDI,RBX CALL 0x00116950 ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_0013ef35: LEA RDI,[0x15d4dd] LEA RDX,[0x15dfe6] MOV ESI,0x3a3 XOR EAX,EAX CALL 0x00117cd0
void gguf_set_val_u8(long param_1,char *param_2,uchar param_3) { int iVar1; uchar local_42; allocator local_41; char *local_40; long *local_38 [2]; long local_28 [2]; local_42 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_2,&local_41); iVar1 = std::__cxx11::string::compare((string *)local_38,"general.alignment"); if (iVar1 != 0) { if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_char&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_42); return; } /* try { // try from 0013ef35 to 0013ef4e has its CatchHandler @ 0013ef4f */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x3a3,"general.alignment must be type u32"); }
13,826
glfwChooseVideoMode
untodesu[P]riteg/build_O1/_deps/glfw-src/src/monitor.c
const GLFWvidmode* _glfwChooseVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired) { int i; unsigned int sizeDiff, leastSizeDiff = UINT_MAX; unsigned int rateDiff, leastRateDiff = UINT_MAX; unsigned int colorDiff, leastColorDiff = UINT_MAX; const GLFWvidmode* current; const GLFWvidmode* closest = NULL; if (!refreshVideoModes(monitor)) return NULL; for (i = 0; i < monitor->modeCount; i++) { current = monitor->modes + i; colorDiff = 0; if (desired->redBits != GLFW_DONT_CARE) colorDiff += abs(current->redBits - desired->redBits); if (desired->greenBits != GLFW_DONT_CARE) colorDiff += abs(current->greenBits - desired->greenBits); if (desired->blueBits != GLFW_DONT_CARE) colorDiff += abs(current->blueBits - desired->blueBits); sizeDiff = abs((current->width - desired->width) * (current->width - desired->width) + (current->height - desired->height) * (current->height - desired->height)); if (desired->refreshRate != GLFW_DONT_CARE) rateDiff = abs(current->refreshRate - desired->refreshRate); else rateDiff = UINT_MAX - current->refreshRate; if ((colorDiff < leastColorDiff) || (colorDiff == leastColorDiff && sizeDiff < leastSizeDiff) || (colorDiff == leastColorDiff && sizeDiff == leastSizeDiff && rateDiff < leastRateDiff)) { closest = current; leastSizeDiff = sizeDiff; leastRateDiff = rateDiff; leastColorDiff = colorDiff; } } return closest; }
O1
c
glfwChooseVideoMode: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 callq 0x1bce0 testl %eax, %eax je 0x1bccf movslq 0x28(%r14), %rcx testq %rcx, %rcx jle 0x1bccf movq 0x20(%r14), %rdx movl 0x8(%rbx), %esi movl 0xc(%rbx), %edi movl 0x10(%rbx), %r8d movl (%rbx), %eax movl %eax, 0x4(%rsp) movl 0x4(%rbx), %r10d movl 0x14(%rbx), %r11d movl $0xffffffff, %ebx # imm = 0xFFFFFFFF xorl %eax, %eax movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl $0x0, %r15d cmpl $-0x1, %esi je 0x1bc2d movl 0x8(%rdx), %r12d subl %esi, %r12d movl %r12d, %r15d negl %r15d cmovsl %r12d, %r15d cmpl $-0x1, %edi je 0x1bc46 movl 0xc(%rdx), %r12d subl %edi, %r12d movl %r12d, %r13d negl %r13d cmovsl %r12d, %r13d addl %r13d, %r15d cmpl $-0x1, %r8d je 0x1bc60 movl 0x10(%rdx), %r12d subl %r8d, %r12d movl %r12d, %r13d negl %r13d cmovsl %r12d, %r13d addl %r13d, %r15d movl 0x14(%rdx), %r13d cmpl $-0x1, %r11d je 0x1bc79 subl %r11d, %r13d movl %r13d, %r12d negl %r12d cmovsl %r13d, %r12d jmp 0x1bc7f notl %r13d movl %r13d, %r12d movl (%rdx), %r9d subl 0x4(%rsp), %r9d movl 0x4(%rdx), %r13d subl %r10d, %r13d imull %r9d, %r9d imull %r13d, %r13d addl %r9d, %r13d cmpl %ebx, %r15d jb 0x1bcb4 jne 0x1bca5 cmpl %ebp, %r13d jb 0x1bcb4 cmpl %ebx, %r15d jne 0x1bcc0 cmpl %ebp, %r13d jne 0x1bcc0 cmpl %r14d, %r12d jae 0x1bcc0 movl %r13d, %ebp movl %r12d, %r14d movl %r15d, %ebx movq %rdx, %rax addq $0x18, %rdx decq %rcx jne 0x1bc11 jmp 0x1bcd1 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_glfwChooseVideoMode: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi call refreshVideoModes test eax, eax jz loc_1BCCF movsxd rcx, dword ptr [r14+28h] test rcx, rcx jle loc_1BCCF mov rdx, [r14+20h] mov esi, [rbx+8] mov edi, [rbx+0Ch] mov r8d, [rbx+10h] mov eax, [rbx] mov [rsp+38h+var_34], eax mov r10d, [rbx+4] mov r11d, [rbx+14h] mov ebx, 0FFFFFFFFh xor eax, eax mov r14d, 0FFFFFFFFh mov ebp, 0FFFFFFFFh loc_1BC11: mov r15d, 0 cmp esi, 0FFFFFFFFh jz short loc_1BC2D mov r12d, [rdx+8] sub r12d, esi mov r15d, r12d neg r15d cmovs r15d, r12d loc_1BC2D: cmp edi, 0FFFFFFFFh jz short loc_1BC46 mov r12d, [rdx+0Ch] sub r12d, edi mov r13d, r12d neg r13d cmovs r13d, r12d add r15d, r13d loc_1BC46: cmp r8d, 0FFFFFFFFh jz short loc_1BC60 mov r12d, [rdx+10h] sub r12d, r8d mov r13d, r12d neg r13d cmovs r13d, r12d add r15d, r13d loc_1BC60: mov r13d, [rdx+14h] cmp r11d, 0FFFFFFFFh jz short loc_1BC79 sub r13d, r11d mov r12d, r13d neg r12d cmovs r12d, r13d jmp short loc_1BC7F loc_1BC79: not r13d mov r12d, r13d loc_1BC7F: mov r9d, [rdx] sub r9d, [rsp+38h+var_34] mov r13d, [rdx+4] sub r13d, r10d imul r9d, r9d imul r13d, r13d add r13d, r9d cmp r15d, ebx jb short loc_1BCB4 jnz short loc_1BCA5 cmp r13d, ebp jb short loc_1BCB4 loc_1BCA5: cmp r15d, ebx jnz short loc_1BCC0 cmp r13d, ebp jnz short loc_1BCC0 cmp r12d, r14d jnb short loc_1BCC0 loc_1BCB4: mov ebp, r13d mov r14d, r12d mov ebx, r15d mov rax, rdx loc_1BCC0: add rdx, 18h dec rcx jnz loc_1BC11 jmp short loc_1BCD1 loc_1BCCF: xor eax, eax loc_1BCD1: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * glfwChooseVideoMode(long long a1, int *a2) { long long v3; // rcx _DWORD *v4; // rdx int v5; // esi int v6; // edi int v7; // r8d int v8; // r10d int v9; // r11d unsigned int v10; // ebx _DWORD *result; // rax unsigned int v12; // r14d unsigned int v13; // ebp int v14; // r15d int v15; // r13d int v16; // r13d int v17; // r13d int v18; // r13d unsigned int v19; // r12d unsigned int v20; // r13d int v21; // [rsp+0h] [rbp-34h] if ( !(unsigned int)refreshVideoModes(a1) ) return 0LL; v3 = *(int *)(a1 + 40); if ( v3 <= 0 ) return 0LL; v4 = *(_DWORD **)(a1 + 32); v5 = a2[2]; v6 = a2[3]; v7 = a2[4]; v21 = *a2; v8 = a2[1]; v9 = a2[5]; v10 = -1; result = 0LL; v12 = -1; v13 = -1; do { v14 = 0; if ( v5 != -1 ) { v14 = v5 - v4[2]; if ( v14 < 0 ) v14 = v4[2] - v5; } if ( v6 != -1 ) { v15 = v6 - v4[3]; if ( v15 < 0 ) v15 = v4[3] - v6; v14 += v15; } if ( v7 != -1 ) { v16 = v7 - v4[4]; if ( v16 < 0 ) v16 = v4[4] - v7; v14 += v16; } v17 = v4[5]; if ( v9 == -1 ) { v19 = ~v17; } else { v18 = v17 - v9; v19 = -v18; if ( v18 > 0 ) v19 = v18; } v20 = (*v4 - v21) * (*v4 - v21) + (v4[1] - v8) * (v4[1] - v8); if ( v14 < v10 || v14 == v10 && v20 < v13 || v14 == v10 && v20 == v13 && v19 < v12 ) { v13 = (*v4 - v21) * (*v4 - v21) + (v4[1] - v8) * (v4[1] - v8); v12 = v19; v10 = v14; result = v4; } v4 += 6; --v3; } while ( v3 ); return result; }
_glfwChooseVideoMode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CALL 0x0011bce0 TEST EAX,EAX JZ 0x0011bccf MOVSXD RCX,dword ptr [R14 + 0x28] TEST RCX,RCX JLE 0x0011bccf MOV RDX,qword ptr [R14 + 0x20] MOV ESI,dword ptr [RBX + 0x8] MOV EDI,dword ptr [RBX + 0xc] MOV R8D,dword ptr [RBX + 0x10] MOV EAX,dword ptr [RBX] MOV dword ptr [RSP + 0x4],EAX MOV R10D,dword ptr [RBX + 0x4] MOV R11D,dword ptr [RBX + 0x14] MOV EBX,0xffffffff XOR EAX,EAX MOV R14D,0xffffffff MOV EBP,0xffffffff LAB_0011bc11: MOV R15D,0x0 CMP ESI,-0x1 JZ 0x0011bc2d MOV R12D,dword ptr [RDX + 0x8] SUB R12D,ESI MOV R15D,R12D NEG R15D CMOVS R15D,R12D LAB_0011bc2d: CMP EDI,-0x1 JZ 0x0011bc46 MOV R12D,dword ptr [RDX + 0xc] SUB R12D,EDI MOV R13D,R12D NEG R13D CMOVS R13D,R12D ADD R15D,R13D LAB_0011bc46: CMP R8D,-0x1 JZ 0x0011bc60 MOV R12D,dword ptr [RDX + 0x10] SUB R12D,R8D MOV R13D,R12D NEG R13D CMOVS R13D,R12D ADD R15D,R13D LAB_0011bc60: MOV R13D,dword ptr [RDX + 0x14] CMP R11D,-0x1 JZ 0x0011bc79 SUB R13D,R11D MOV R12D,R13D NEG R12D CMOVS R12D,R13D JMP 0x0011bc7f LAB_0011bc79: NOT R13D MOV R12D,R13D LAB_0011bc7f: MOV R9D,dword ptr [RDX] SUB R9D,dword ptr [RSP + 0x4] MOV R13D,dword ptr [RDX + 0x4] SUB R13D,R10D IMUL R9D,R9D IMUL R13D,R13D ADD R13D,R9D CMP R15D,EBX JC 0x0011bcb4 JNZ 0x0011bca5 CMP R13D,EBP JC 0x0011bcb4 LAB_0011bca5: CMP R15D,EBX JNZ 0x0011bcc0 CMP R13D,EBP JNZ 0x0011bcc0 CMP R12D,R14D JNC 0x0011bcc0 LAB_0011bcb4: MOV EBP,R13D MOV R14D,R12D MOV EBX,R15D MOV RAX,RDX LAB_0011bcc0: ADD RDX,0x18 DEC RCX JNZ 0x0011bc11 JMP 0x0011bcd1 LAB_0011bccf: XOR EAX,EAX LAB_0011bcd1: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int * _glfwChooseVideoMode(long param_1,int *param_2) { int iVar1; int *piVar2; long lVar3; int *piVar4; uint uVar5; uint uVar6; uint uVar7; int iVar8; uint uVar9; uint uVar10; uint uVar11; iVar1 = refreshVideoModes(); if ((iVar1 == 0) || (lVar3 = (long)*(int *)(param_1 + 0x28), lVar3 < 1)) { piVar2 = (int *)0x0; } else { piVar4 = *(int **)(param_1 + 0x20); uVar5 = 0xffffffff; piVar2 = (int *)0x0; uVar10 = 0xffffffff; uVar6 = 0xffffffff; do { uVar11 = 0; if (param_2[2] != -1) { uVar7 = piVar4[2] - param_2[2]; uVar11 = -uVar7; if (0 < (int)uVar7) { uVar11 = uVar7; } } if (param_2[3] != -1) { iVar8 = piVar4[3] - param_2[3]; iVar1 = -iVar8; if (0 < iVar8) { iVar1 = iVar8; } uVar11 = uVar11 + iVar1; } if (param_2[4] != -1) { iVar8 = piVar4[4] - param_2[4]; iVar1 = -iVar8; if (0 < iVar8) { iVar1 = iVar8; } uVar11 = uVar11 + iVar1; } if (param_2[5] == -1) { uVar7 = ~piVar4[5]; } else { uVar9 = piVar4[5] - param_2[5]; uVar7 = -uVar9; if (0 < (int)uVar9) { uVar7 = uVar9; } } uVar9 = (piVar4[1] - param_2[1]) * (piVar4[1] - param_2[1]) + (*piVar4 - *param_2) * (*piVar4 - *param_2); if (((uVar11 < uVar5) || ((uVar11 == uVar5 && (uVar9 < uVar6)))) || ((uVar11 == uVar5 && ((uVar9 == uVar6 && (uVar7 < uVar10)))))) { piVar2 = piVar4; uVar5 = uVar11; uVar10 = uVar7; uVar6 = uVar9; } piVar4 = piVar4 + 6; lVar3 = lVar3 + -1; } while (lVar3 != 0); } return piVar2; }
13,827
getCursorPosition(int, int)
ericcurtin[P]linenoise/linenoise.cpp
static int getCursorPosition(int ifd, int ofd) { char buf[32]; int cols, rows; unsigned int i = 0; /* Report cursor location */ if (write(ofd, "\x1b[6n", 4) != 4) { return -1; } /* Read the response: ESC [ rows ; cols R */ while (i < sizeof(buf) - 1) { if (read(ifd, buf + i, 1) != 1) { break; } if (buf[i] == 'R') { break; } i++; } buf[i] = '\0'; /* Parse it. */ if (buf[0] != ESC || buf[1] != '[') { return -1; } if (sscanf(buf + 2, "%d;%d", &rows, &cols) != 2) { return -1; } return cols; }
O0
cpp
getCursorPosition(int, int): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl $0x0, -0x3c(%rbp) movl -0xc(%rbp), %edi leaq 0x7047(%rip), %rsi # 0xcb06 movl $0x4, %edx callq 0x2090 cmpq $0x4, %rax je 0x5adb movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5b74 jmp 0x5add movl -0x3c(%rbp), %eax cmpq $0x1f, %rax jae 0x5b1f movl -0x8(%rbp), %edi leaq -0x30(%rbp), %rsi movl -0x3c(%rbp), %eax addq %rax, %rsi movl $0x1, %edx callq 0x2330 cmpq $0x1, %rax je 0x5b05 jmp 0x5b1f movl -0x3c(%rbp), %eax movsbl -0x30(%rbp,%rax), %eax cmpl $0x52, %eax jne 0x5b14 jmp 0x5b1f movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x5add movl -0x3c(%rbp), %eax movb $0x0, -0x30(%rbp,%rax) movsbl -0x30(%rbp), %eax cmpl $0x1b, %eax jne 0x5b39 movsbl -0x2f(%rbp), %eax cmpl $0x5b, %eax je 0x5b42 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5b74 leaq -0x30(%rbp), %rdi addq $0x2, %rdi leaq 0x6fba(%rip), %rsi # 0xcb0b leaq -0x38(%rbp), %rdx leaq -0x34(%rbp), %rcx movb $0x0, %al callq 0x21d0 cmpl $0x2, %eax je 0x5b6e movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5b74 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
_ZL17getCursorPositionii: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], edi mov [rbp+var_C], esi mov [rbp+var_3C], 0 mov edi, [rbp+var_C] lea rsi, a6n; "\x1B[6n" mov edx, 4 call _write cmp rax, 4 jz short loc_5ADB mov [rbp+var_4], 0FFFFFFFFh jmp loc_5B74 loc_5ADB: jmp short $+2 loc_5ADD: mov eax, [rbp+var_3C] cmp rax, 1Fh jnb short loc_5B1F mov edi, [rbp+var_8] lea rsi, [rbp+var_30] mov eax, [rbp+var_3C] add rsi, rax mov edx, 1 call _read cmp rax, 1 jz short loc_5B05 jmp short loc_5B1F loc_5B05: mov eax, [rbp+var_3C] movsx eax, [rbp+rax+var_30] cmp eax, 52h ; 'R' jnz short loc_5B14 jmp short loc_5B1F loc_5B14: mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp short loc_5ADD loc_5B1F: mov eax, [rbp+var_3C] mov [rbp+rax+var_30], 0 movsx eax, [rbp+var_30] cmp eax, 1Bh jnz short loc_5B39 movsx eax, [rbp+var_2F] cmp eax, 5Bh ; '[' jz short loc_5B42 loc_5B39: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5B74 loc_5B42: lea rdi, [rbp+var_30] add rdi, 2 lea rsi, aDD; "%d;%d" lea rdx, [rbp+var_38] lea rcx, [rbp+var_34] mov al, 0 call ___isoc99_sscanf cmp eax, 2 jz short loc_5B6E mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5B74 loc_5B6E: mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_5B74: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long getCursorPosition(unsigned int a1, unsigned int a2) { unsigned int v3; // [rsp+4h] [rbp-3Ch] char v4; // [rsp+8h] [rbp-38h] BYREF unsigned int v5; // [rsp+Ch] [rbp-34h] BYREF _BYTE v6[2]; // [rsp+10h] [rbp-30h] BYREF _BYTE v7[38]; // [rsp+12h] [rbp-2Eh] BYREF unsigned int v8; // [rsp+38h] [rbp-8h] v8 = a1; *(_DWORD *)&v7[34] = a2; v3 = 0; if ( write(a2, "\x1B[6n", 4LL) == 4 ) { while ( v3 < 0x1FuLL && read(v8, &v6[v3], 1LL) == 1 && v6[v3] != 82 ) ++v3; v6[v3] = 0; if ( v6[0] == 27 && v6[1] == 91 ) { if ( (unsigned int)__isoc99_sscanf(v7, "%d;%d", &v4, &v5) == 2 ) return v5; else return (unsigned int)-1; } else { return (unsigned int)-1; } } else { return (unsigned int)-1; } }
getCursorPosition: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x3c],0x0 MOV EDI,dword ptr [RBP + -0xc] LEA RSI,[0x10cb06] MOV EDX,0x4 CALL 0x00102090 CMP RAX,0x4 JZ 0x00105adb MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00105b74 LAB_00105adb: JMP 0x00105add LAB_00105add: MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,0x1f JNC 0x00105b1f MOV EDI,dword ptr [RBP + -0x8] LEA RSI,[RBP + -0x30] MOV EAX,dword ptr [RBP + -0x3c] ADD RSI,RAX MOV EDX,0x1 CALL 0x00102330 CMP RAX,0x1 JZ 0x00105b05 JMP 0x00105b1f LAB_00105b05: MOV EAX,dword ptr [RBP + -0x3c] MOVSX EAX,byte ptr [RBP + RAX*0x1 + -0x30] CMP EAX,0x52 JNZ 0x00105b14 JMP 0x00105b1f LAB_00105b14: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x00105add LAB_00105b1f: MOV EAX,dword ptr [RBP + -0x3c] MOV byte ptr [RBP + RAX*0x1 + -0x30],0x0 MOVSX EAX,byte ptr [RBP + -0x30] CMP EAX,0x1b JNZ 0x00105b39 MOVSX EAX,byte ptr [RBP + -0x2f] CMP EAX,0x5b JZ 0x00105b42 LAB_00105b39: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00105b74 LAB_00105b42: LEA RDI,[RBP + -0x30] ADD RDI,0x2 LEA RSI,[0x10cb0b] LEA RDX,[RBP + -0x38] LEA RCX,[RBP + -0x34] MOV AL,0x0 CALL 0x001021d0 CMP EAX,0x2 JZ 0x00105b6e MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00105b74 LAB_00105b6e: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_00105b74: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
/* getCursorPosition(int, int) */ int4 getCursorPosition(int param_1,int param_2) { int iVar1; ssize_t sVar2; uint local_44; int1 local_40 [4]; int4 local_3c; char local_38 [36]; int local_14; int local_10; int4 local_c; local_44 = 0; local_14 = param_2; local_10 = param_1; sVar2 = write(param_2,&DAT_0010cb06,4); if (sVar2 == 4) { for (; ((local_44 < 0x1f && (sVar2 = read(local_10,local_38 + local_44,1), sVar2 == 1)) && (local_38[local_44] != 'R')); local_44 = local_44 + 1) { } local_38[local_44] = '\0'; if ((local_38[0] == '\x1b') && (local_38[1] == '[')) { iVar1 = __isoc99_sscanf(local_38 + 2,"%d;%d",local_40,&local_3c); if (iVar1 == 2) { local_c = local_3c; } else { local_c = 0xffffffff; } } else { local_c = 0xffffffff; } } else { local_c = 0xffffffff; } return local_c; }
13,828
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>::get_binary() const
monkey531[P]llama/common/json.hpp
const binary_t& get_binary() const { if (!is_binary()) { JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); } return *get_ptr<const binary_t*>(); }
O0
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>::get_binary() const: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xb71d0 testb $0x1, %al jne 0x17f222 movb $0x1, 0x1b(%rsp) movl $0x20, %edi callq 0x5a690 movq 0x10(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xb7570 movq %rax, 0x28(%rsp) leaq 0x95179(%rip), %rsi # 0x214313 leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x114d20 jmp 0x17f1ab movq 0x10(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x12e, %esi # imm = 0x12E leaq 0x30(%rsp), %rdx callq 0x114b70 jmp 0x17f1c6 movq 0x8(%rsp), %rdi movb $0x0, 0x1b(%rsp) leaq 0x123bb1(%rip), %rsi # 0x2a2d88 leaq -0xc7bbe(%rip), %rdx # 0xb7620 callq 0x5ab00 jmp 0x17f23b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x17f20d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x30(%rsp), %rdi callq 0x5b568 testb $0x1, 0x1b(%rsp) jne 0x17f216 jmp 0x17f220 movq 0x8(%rsp), %rdi callq 0x5af70 jmp 0x17f231 movq 0x10(%rsp), %rdi callq 0x17f770 addq $0x58, %rsp retq movq 0x20(%rsp), %rdi callq 0x5abc0 nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov rdi, qword ptr [rsp+58h+var_8] mov qword ptr [rsp+58h+var_48], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_binaryEv; 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>::is_binary(void) test al, 1 jnz loc_17F222 mov [rsp+58h+var_3D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, qword ptr [rsp+58h+var_48] mov [rsp+58h+var_50], rax; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_30], rax; int lea rsi, aTypeMustBeBina; "type must be binary, but is " lea rdi, [rsp+58h+var_28] lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) jmp short $+2 loc_17F1AB: mov rcx, qword ptr [rsp+58h+var_48] mov rdi, [rsp+58h+var_50]; int mov esi, 12Eh lea rdx, [rsp+58h+var_28] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_17F1C6: mov rdi, [rsp+58h+var_50]; void * mov [rsp+58h+var_3D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_17F23B mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_17F20D mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_17F20D: test [rsp+arg_13], 1 jnz short loc_17F216 jmp short loc_17F220 loc_17F216: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_17F220: jmp short loc_17F231 loc_17F222: mov rdi, qword ptr [rsp+58h+var_48] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKNS0_27byte_container_with_subtypeISC_EETnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISK_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISK_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv add rsp, 58h retn loc_17F231: mov rdi, [rsp+arg_18] call __Unwind_Resume loc_17F23B: nop dword ptr [rax+rax+00h]
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>::get_binary( _BYTE *a1) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-50h] int v3[2]; // [rsp+28h] [rbp-30h] BYREF char v4[32]; // [rsp+30h] [rbp-28h] BYREF char v5[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v5 = a1; if ( !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>::is_binary(a1) ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); *(_QWORD *)v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v4, (long long)"type must be binary, but is ", (nlohmann::json_abi_v3_11_3::detail **)v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v4, (long long)a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } return ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKNS0_27byte_container_with_subtypeISC_EETnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISK_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISK_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISK_EEEEv(a1); }
13,829
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>::get_binary() const
monkey531[P]llama/common/json.hpp
const binary_t& get_binary() const { if (!is_binary()) { JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); } return *get_ptr<const binary_t*>(); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_binary() const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x8, (%rdi) jne 0xb3979 movq 0x8(%r14), %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b450 movq %rax, %rbx movq %r14, %rdi callq 0x5f888 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x40faf(%rip), %rsi # 0xf494c leaq 0x10(%rsp), %rdi callq 0x87e83 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x87cb4 xorl %ebp, %ebp leaq 0x79550(%rip), %rsi # 0x12cf18 leaq -0x58005(%rip), %rdx # 0x5b9ca movq %rbx, %rdi callq 0x1bf30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb39fd movq 0x20(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0xb39fd movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb3a0a movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bfb0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 8 jnz short loc_B3979 mov rax, [r14+8] add rsp, 30h pop rbx pop r14 pop rbp retn loc_B3979: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeBina; "type must be binary, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B39FD mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B39FD mov r14, rax mov bpl, 1 loc_B39FD: test bpl, bpl jz short loc_B3A0A mov rdi, rbx; void * call ___cxa_free_exception loc_B3A0A: 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>::get_binary( long long a1) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 8 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v4, (long long)"type must be binary, but is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return *(_QWORD *)(a1 + 8); }
get_binary: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x8 JNZ 0x001b3979 MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001b3979: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX MOV RDI,R14 CALL 0x0015f888 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001b3996: LEA RSI,[0x1f494c] LEA RDI,[RSP + 0x10] CALL 0x00187e83 MOV BPL,0x1 LAB_001b39aa: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00187cb4 XOR EBP,EBP LEA RSI,[0x22cf18] LEA RDX,[0x15b9ca] MOV RDI,RBX CALL 0x0011bf30
/* 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>::get_binary() const */ int8 __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> ::get_binary(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8) { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001b3996 to 001b39a6 has its CatchHandler @ 001b39f7 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be binary, but is ",&local_40); /* try { // try from 001b39aa to 001b39d6 has its CatchHandler @ 001b39d7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
13,830
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0x35d3e movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0x35d893(%rip), %rax # 0x3935e0 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0x35f47 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0x35d94 movl -0x2d4(%rbp), %edi callq 0x376a0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0x35f55 leaq 0x35d6cd(%rip), %rdi # 0x393468 leaq 0x4fbb3(%rip), %rsi # 0x85955 movl $0x36b, %edx # imm = 0x36B callq 0x376d0 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0x35e10 leaq -0x210(%rbp), %rdi callq 0x35380 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x4fb59(%rip), %rdx # 0x85938 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x82c30 leaq -0x2c0(%rbp), %rdi callq 0x34ce0 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0x37220 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0x35f30 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x35f23 movq -0x2e8(%rbp), %rdi callq 0x37140 cmpb $0x0, %al jne 0x35e82 movq -0x2e8(%rbp), %rdi callq 0x37740 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0x35e80 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0x37780 jmp 0x35e82 movq -0x2e8(%rbp), %rdi callq 0x371a0 cmpb $0x0, %al jne 0x35ecb movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0x37800 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0x35ec9 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0x37910 jmp 0x35ecb movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x37950 movsbl %al, %eax cmpl $0x0, %eax jne 0x35f01 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x379a0 movsbl %al, %eax cmpl $0x0, %eax je 0x35f0e movq $0x0, -0x2e8(%rbp) jmp 0x35f21 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0x35f23 movl -0x2d4(%rbp), %edi callq 0x376a0 jmp 0x35f3b movq $0x0, -0x2e8(%rbp) leaq 0x35d526(%rip), %rdi # 0x393468 callq 0x379f0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x35f85 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x242c0 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_35D3E: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_35F47 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_35D94 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_35F55 loc_35D94: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_5 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_35E10 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_35E10: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_35F30 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_35F23 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_35E82 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_35E80 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_35E80: jmp short $+2 loc_35E82: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_35ECB mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_35EC9 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_35EC9: jmp short $+2 loc_35ECB: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_35F01 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_35F0E loc_35F01: mov [rbp+var_2E8], 0 jmp short loc_35F21 loc_35F0E: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_35F21: jmp short $+2 loc_35F23: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_35F3B loc_35F30: mov [rbp+var_2E8], 0 loc_35F3B: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_5 loc_35F47: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_35F55: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_35F85 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_35F85: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_5(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_5(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x00135d3e LAB_00135d3e: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0x4935e0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x00135f47 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x00135d94 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001376a0 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x00135f55 LAB_00135d94: LEA RDI,[0x493468] LEA RSI,[0x185955] MOV EDX,0x36b CALL 0x001376d0 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x00135e10 LEA RDI,[RBP + -0x210] CALL 0x00135380 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x185938] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x00182c30 LEA RDI,[RBP + -0x2c0] CALL 0x00134ce0 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x00137220 LAB_00135e10: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x00135f30 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x00135f23 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00137140 CMP AL,0x0 JNZ 0x00135e82 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00137740 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x00135e80 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x00137780 LAB_00135e80: JMP 0x00135e82 LAB_00135e82: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001371a0 CMP AL,0x0 JNZ 0x00135ecb MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x00137800 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x00135ec9 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x00137910 LAB_00135ec9: JMP 0x00135ecb LAB_00135ecb: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x00137950 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00135f01 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001379a0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00135f0e LAB_00135f01: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x00135f21 LAB_00135f0e: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_00135f21: JMP 0x00135f23 LAB_00135f23: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x001376a0 JMP 0x00135f3b LAB_00135f30: MOV qword ptr [RBP + -0x2e8],0x0 LAB_00135f3b: LEA RDI,[0x493468] CALL 0x001379f0 LAB_00135f47: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_00135f55: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00135f85 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_00135f85: CALL 0x001242c0
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
13,831
free_rw_handler
bluesky950520[P]quickjs/quickjs-libc.c
static void free_rw_handler(JSRuntime *rt, JSOSRWHandler *rh) { int i; list_del(&rh->link); for(i = 0; i < 2; i++) { JS_FreeValueRT(rt, rh->rw_func[i]); } js_free_rt(rt, rh); }
O1
c
free_rw_handler: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) movl $0x20, %r15d movq -0x8(%rbx,%r15), %rsi movq (%rbx,%r15), %rdx movq %r14, %rdi callq 0x1d8c6 addq $0x10, %r15 cmpq $0x30, %r15 je 0x15332 movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x1ca84
free_rw_handler: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 mov r15d, 20h ; ' ' loc_15332: mov rsi, [rbx+r15-8] mov rdx, [rbx+r15] mov rdi, r14 call JS_FreeValueRT add r15, 10h cmp r15, 30h ; '0' jz short loc_15332 mov rdi, r14 mov rsi, rbx pop rbx pop r14 pop r15 jmp js_free_rt
long long free_rw_handler(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx long long v4; // r15 v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; v4 = 4LL; do { JS_FreeValueRT(a1, a2[v4 - 1]); v4 += 2LL; } while ( v4 == 6 ); return js_free_rt(a1, a2); }
free_rw_handler: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 MOV R15D,0x20 LAB_00115332: MOV RSI,qword ptr [RBX + R15*0x1 + -0x8] MOV RDX,qword ptr [RBX + R15*0x1] MOV RDI,R14 CALL 0x0011d8c6 ADD R15,0x10 CMP R15,0x30 JZ 0x00115332 MOV RDI,R14 MOV RSI,RBX POP RBX POP R14 POP R15 JMP 0x0011ca84
void free_rw_handler(int8 param_1,long *param_2) { long *plVar1; long lVar2; lVar2 = *param_2; plVar1 = (long *)param_2[1]; *(long **)(lVar2 + 8) = plVar1; *plVar1 = lVar2; *param_2 = 0; param_2[1] = 0; lVar2 = 0x20; do { JS_FreeValueRT(param_1,*(int8 *)((long)param_2 + lVar2 + -8), *(int8 *)((long)param_2 + lVar2)); lVar2 = lVar2 + 0x10; } while (lVar2 == 0x30); js_free_rt(param_1,param_2); return; }
13,832
free_rw_handler
bluesky950520[P]quickjs/quickjs-libc.c
static void free_rw_handler(JSRuntime *rt, JSOSRWHandler *rh) { int i; list_del(&rh->link); for(i = 0; i < 2; i++) { JS_FreeValueRT(rt, rh->rw_func[i]); } js_free_rt(rt, rh); }
O2
c
free_rw_handler: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rax movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) pushq $0x20 popq %r15 cmpq $0x40, %r15 je 0x102d6 movq -0x8(%rbx,%r15), %rsi movq (%rbx,%r15), %rdx movq %r14, %rdi callq 0x18031 addq $0x10, %r15 jmp 0x102b9 movq %r14, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %r15 jmp 0x170cb
free_rw_handler: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov rax, [rsi] mov rcx, [rsi+8] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 push 20h ; ' ' pop r15 loc_102B9: cmp r15, 40h ; '@' jz short loc_102D6 mov rsi, [rbx+r15-8] mov rdx, [rbx+r15] mov rdi, r14 call JS_FreeValueRT add r15, 10h jmp short loc_102B9 loc_102D6: mov rdi, r14 mov rsi, rbx pop rbx pop r14 pop r15 jmp js_free_rt
long long free_rw_handler(long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // rcx long long i; // r15 v2 = *a2; v3 = (_QWORD *)a2[1]; *(_QWORD *)(v2 + 8) = v3; *v3 = v2; *(_OWORD *)a2 = 0LL; for ( i = 4LL; i != 8; i += 2LL ) JS_FreeValueRT(a1, a2[i - 1], a2[i]); return js_free_rt(a1, a2); }
free_rw_handler: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 PUSH 0x20 POP R15 LAB_001102b9: CMP R15,0x40 JZ 0x001102d6 MOV RSI,qword ptr [RBX + R15*0x1 + -0x8] MOV RDX,qword ptr [RBX + R15*0x1] MOV RDI,R14 CALL 0x00118031 ADD R15,0x10 JMP 0x001102b9 LAB_001102d6: MOV RDI,R14 MOV RSI,RBX POP RBX POP R14 POP R15 JMP 0x001170cb
void free_rw_handler(int8 param_1,long *param_2) { long *plVar1; long lVar2; lVar2 = *param_2; plVar1 = (long *)param_2[1]; *(long **)(lVar2 + 8) = plVar1; *plVar1 = lVar2; *param_2 = 0; param_2[1] = 0; for (lVar2 = 0x20; lVar2 != 0x40; lVar2 = lVar2 + 0x10) { JS_FreeValueRT(param_1,*(int8 *)((long)param_2 + lVar2 + -8), *(int8 *)((long)param_2 + lVar2)); } js_free_rt(param_1,param_2); return; }
13,833
my_realpath
eloqsql/mysys/my_symlink.c
int my_realpath(char *to, const char *filename, myf MyFlags) { #if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) int result=0; char buff[BUFF_LEN]; char *ptr; DBUG_ENTER("my_realpath"); DBUG_PRINT("info",("executing realpath")); if ((ptr=realpath(filename,buff))) strmake(to, ptr, FN_REFLEN-1); else { /* Realpath didn't work; Use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ if (MyFlags) DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); if (my_errno == ENOENT) result= 1; else result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) int ret= GetFullPathName(filename,FN_REFLEN, to, NULL); if (ret == 0 || ret > FN_REFLEN) { my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError(); if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); /* GetFullPathName didn't work : use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ my_load_path(to, filename, NullS); return -1; } #else my_load_path(to, filename, NullS); #endif return 0; }
O3
c
my_realpath: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1010, %rsp # imm = 0x1010 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x1030(%rbp), %rsi movq %r14, %rdi callq 0x3a690 testq %rax, %rax je 0x854f5 movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %rax, %rsi callq 0xb6940 xorl %eax, %eax jmp 0x85544 callq 0x3ab70 movl (%rax), %r12d callq 0x85d6a movl %r12d, (%rax) testb $0x10, %r15b je 0x85523 callq 0x85d6a movl (%rax), %ecx movl $0x1a, %edi xorl %esi, %esi movq %r14, %rdx xorl %eax, %eax callq 0x80bfb movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x87f38 callq 0x85d6a xorl %ecx, %ecx cmpl $0x2, (%rax) sete %cl leal -0x1(,%rcx,2), %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x85563 addq $0x1010, %rsp # imm = 0x1010 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x3a340
my_realpath: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 1010h mov r15, rdx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rsi, [rbp+var_1030] mov rdi, r14 call _realpath test rax, rax jz short loc_854F5 mov edx, 1FFh mov rdi, rbx mov rsi, rax call strmake xor eax, eax jmp short loc_85544 loc_854F5: call ___errno_location mov r12d, [rax] call _my_thread_var mov [rax], r12d test r15b, 10h jz short loc_85523 call _my_thread_var mov ecx, [rax] mov edi, 1Ah xor esi, esi mov rdx, r14 xor eax, eax call my_error loc_85523: mov rdi, rbx mov rsi, r14 xor edx, edx call my_load_path call _my_thread_var xor ecx, ecx cmp dword ptr [rax], 2 setz cl lea eax, ds:0FFFFFFFFFFFFFFFFh[rcx*2] loc_85544: mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_85563 add rsp, 1010h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_85563: call ___stack_chk_fail
long long my_realpath(long long a1, long long a2, char a3) { long long v4; // rax int v6; // r12d unsigned int *v7; // rax _BYTE v8[4104]; // [rsp+0h] [rbp-1030h] BYREF unsigned long long v9; // [rsp+1008h] [rbp-28h] v9 = __readfsqword(0x28u); v4 = realpath(a2, v8); if ( v4 ) { strmake(a1, v4, 511LL); return 0LL; } else { v6 = *(_DWORD *)__errno_location(a2); *(_DWORD *)my_thread_var(a2, v8) = v6; if ( (a3 & 0x10) != 0 ) { v7 = (unsigned int *)my_thread_var(a2, v8); my_error(0x1Au, 0LL, a2, *v7); } my_load_path(a1, a2, 0LL); return 2 * (unsigned int)(*(_DWORD *)my_thread_var(a1, a2) == 2) - 1; } }
my_realpath: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1010 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RSI,[RBP + -0x1030] MOV RDI,R14 CALL 0x0013a690 TEST RAX,RAX JZ 0x001854f5 MOV EDX,0x1ff MOV RDI,RBX MOV RSI,RAX CALL 0x001b6940 XOR EAX,EAX JMP 0x00185544 LAB_001854f5: CALL 0x0013ab70 MOV R12D,dword ptr [RAX] CALL 0x00185d6a MOV dword ptr [RAX],R12D TEST R15B,0x10 JZ 0x00185523 CALL 0x00185d6a MOV ECX,dword ptr [RAX] MOV EDI,0x1a XOR ESI,ESI MOV RDX,R14 XOR EAX,EAX CALL 0x00180bfb LAB_00185523: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00187f38 CALL 0x00185d6a XOR ECX,ECX CMP dword ptr [RAX],0x2 SETZ CL LEA EAX,[-0x1 + RCX*0x2] LAB_00185544: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x00185563 ADD RSP,0x1010 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00185563: CALL 0x0013a340
int my_realpath(int8 param_1,char *param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; char local_1038 [4104]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = realpath(param_2,local_1038); if (pcVar2 == (char *)0x0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_3 & 0x10) != 0) { puVar4 = (int4 *)_my_thread_var(); my_error(0x1a,0,param_2,*puVar4); } my_load_path(param_1,param_2,0); piVar3 = (int *)_my_thread_var(); iVar1 = (uint)(*piVar3 == 2) * 2 + -1; } else { strmake(param_1,pcVar2,0x1ff); iVar1 = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return iVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,834
bitmap_union
eloqsql/mysys/my_bitmap.c
void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); end= map->last_word_ptr; while (to <= end) *to++ |= *from++; }
O3
c
bitmap_union: movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax ja 0x9d52c pushq %rbp movq %rsp, %rbp movq (%rsi), %rdx movl (%rdx), %esi orl %esi, (%rax) addq $0x4, %rdx addq $0x4, %rax cmpq %rcx, %rax jbe 0x9d51a popq %rbp retq
bitmap_union: mov rax, [rdi] mov rcx, [rdi+8] cmp rax, rcx ja short locret_9D52C push rbp mov rbp, rsp mov rdx, [rsi] loc_9D51A: mov esi, [rdx] or [rax], esi add rdx, 4 add rax, 4 cmp rax, rcx jbe short loc_9D51A pop rbp locret_9D52C: retn
_DWORD * bitmap_union(long long a1, _DWORD **a2) { _DWORD *result; // rax unsigned long long v3; // rcx _DWORD *v4; // rdx result = *(_DWORD **)a1; v3 = *(_QWORD *)(a1 + 8); if ( *(_QWORD *)a1 <= v3 ) { v4 = *a2; do *result++ |= *v4++; while ( (unsigned long long)result <= v3 ); } return result; }
bitmap_union: MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RAX,RCX JA 0x0019d52c PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RSI] LAB_0019d51a: MOV ESI,dword ptr [RDX] OR dword ptr [RAX],ESI ADD RDX,0x4 ADD RAX,0x4 CMP RAX,RCX JBE 0x0019d51a POP RBP LAB_0019d52c: RET
void bitmap_union(int8 *param_1,int8 *param_2) { uint *puVar1; uint *puVar2; uint *puVar3; puVar2 = (uint *)*param_1; puVar1 = (uint *)param_1[1]; if (puVar2 <= puVar1) { puVar3 = (uint *)*param_2; do { *puVar2 = *puVar2 | *puVar3; puVar3 = puVar3 + 1; puVar2 = puVar2 + 1; } while (puVar2 <= puVar1); } return; }
13,835
translog_write_fixed_record
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_fixed_record(LSN *lsn, enum translog_record_type type, MARIA_HA *tbl_info, SHORT_TRANSACTION_ID short_trid, struct st_translog_parts *parts, TRN *trn, void *hook_arg) { struct st_translog_buffer *buffer_to_flush= NULL; uchar chunk1_header[1 + 2]; /* Max number of such LSNs per record is 2 */ uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE]; LEX_CUSTRING *part; int rc= 1; DBUG_ENTER("translog_write_fixed_record"); DBUG_ASSERT((log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH && parts->record_length == log_record_type_descriptor[type].fixed_length) || (log_record_type_descriptor[type].rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH && parts->record_length == log_record_type_descriptor[type].fixed_length)); translog_lock(); DBUG_PRINT("info", ("horizon: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon))); DBUG_ASSERT(log_descriptor.bc.current_page_fill <= TRANSLOG_PAGE_SIZE); DBUG_PRINT("info", ("Page size: %u record: %u next cond: %d", log_descriptor.bc.current_page_fill, (parts->record_length + log_record_type_descriptor[type].compressed_LSN * 2 + 3), ((((uint) log_descriptor.bc.current_page_fill) + (parts->record_length + log_record_type_descriptor[type].compressed_LSN * 2 + 3)) > TRANSLOG_PAGE_SIZE))); /* check that there is enough place on current page. NOTE: compressing may increase page LSN size on two bytes for every LSN */ if ((((uint) log_descriptor.bc.current_page_fill) + (parts->record_length + log_record_type_descriptor[type].compressed_LSN * 2 + 3)) > TRANSLOG_PAGE_SIZE) { DBUG_PRINT("info", ("Next page")); if (translog_page_next(&log_descriptor.horizon, &log_descriptor.bc, &buffer_to_flush)) goto err; /* rc == 1 */ if (buffer_to_flush) translog_buffer_lock_assert_owner(buffer_to_flush); } set_lsn(lsn, log_descriptor.horizon); if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn), *lsn, TRUE) || (log_record_type_descriptor[type].inwrite_hook && (*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info, lsn, hook_arg))) goto err; /* compress LSNs */ if (log_record_type_descriptor[type].rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH) { DBUG_ASSERT(log_record_type_descriptor[type].compressed_LSN > 0); translog_relative_LSN_encode(parts, *lsn, log_record_type_descriptor[type]. compressed_LSN, compressed_LSNs); } /* Write the whole record at once (we know that there is enough place on the destination page) */ DBUG_ASSERT(parts->current != 0); /* first part is left for header */ part= parts->parts + (--parts->current); parts->total_record_length+= (translog_size_t) (part->length= 1 + 2); part->str= chunk1_header; *chunk1_header= (uchar) (type | TRANSLOG_CHUNK_FIXED); int2store(chunk1_header + 1, short_trid); rc= translog_write_parts_on_page(&log_descriptor.horizon, &log_descriptor.bc, parts->total_record_length, parts); log_descriptor.bc.buffer->last_lsn= *lsn; DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p", LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn), log_descriptor.bc.buffer)); err: translog_unlock(); /* check if we switched buffer and need process it (current buffer is unlocked already => we will not delay other threads */ if (buffer_to_flush != NULL) { if (!rc) rc= translog_buffer_flush(buffer_to_flush); translog_buffer_unlock(buffer_to_flush); } DBUG_RETURN(rc); }
O0
c
translog_write_fixed_record: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movw %cx, %ax movq 0x10(%rbp), %rcx movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x28(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movw %ax, -0x3a(%rbp) movq %r8, -0x48(%rbp) movq %r9, -0x50(%rbp) movq $0x0, -0x58(%rbp) movl $0x1, -0x6c(%rbp) jmp 0x4a4a7 callq 0x45c40 jmp 0x4a4ae jmp 0x4a4b0 jmp 0x4a4b2 jmp 0x4a4b4 jmp 0x4a4b6 movzwl 0xc64f03(%rip), %eax # 0xcaf3c0 movq -0x48(%rbp), %rcx movl (%rcx), %ecx movl -0x2c(%rbp), %edx movl %edx, %esi leaq 0x463071(%rip), %rdx # 0x4ad540 imulq $0x48, %rsi, %rsi addq %rsi, %rdx movswl 0x20(%rdx), %edx shll %edx addl %edx, %ecx addl $0x3, %ecx addl %ecx, %eax cmpl $0x2000, %eax # imm = 0x2000 jbe 0x4a523 jmp 0x4a4ec jmp 0x4a4ee leaq 0x46424b(%rip), %rsi # 0x4ae740 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 leaq -0x58(%rbp), %rdx callq 0x4f5b0 cmpb $0x0, %al je 0x4a518 jmp 0x4a6b1 cmpq $0x0, -0x58(%rbp) je 0x4a521 jmp 0x4a521 jmp 0x4a523 movq -0x28(%rbp), %rdi movq 0xc64e5a(%rip), %rsi # 0xcaf388 callq 0x50f40 movq -0x28(%rbp), %rax movq (%rax), %rax sarq $0x20, %rax movl %eax, %edi movq -0x28(%rbp), %rax movq (%rax), %rax sarq $0x20, %rax movl %eax, %esi movq -0x28(%rbp), %rax movq (%rax), %rdx movl $0x1, %ecx callq 0x50f70 movsbl %al, %eax cmpl $0x0, %eax jne 0x4a5b4 movl -0x2c(%rbp), %eax movl %eax, %ecx leaq 0x462fce(%rip), %rax # 0x4ad540 imulq $0x48, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0x4a5b9 movl -0x2c(%rbp), %eax movl %eax, %ecx leaq 0x462fb4(%rip), %rax # 0x4ad540 imulq $0x48, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rax movl -0x2c(%rbp), %edi movq -0x50(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x28(%rbp), %rcx movq 0x10(%rbp), %r8 callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x4a5b9 jmp 0x4a6b1 movl -0x2c(%rbp), %eax movl %eax, %ecx leaq 0x462f7b(%rip), %rax # 0x4ad540 imulq $0x48, %rcx, %rcx addq %rcx, %rax cmpl $0x2, (%rax) jne 0x4a600 jmp 0x4a5d3 jmp 0x4a5d5 movq -0x48(%rbp), %rdi movq -0x28(%rbp), %rax movq (%rax), %rsi movl -0x2c(%rbp), %eax movl %eax, %ecx leaq 0x462f54(%rip), %rax # 0x4ad540 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %edx leaq -0x20(%rbp), %rcx callq 0x4f6b0 jmp 0x4a602 jmp 0x4a604 movq -0x48(%rbp), %rax movq 0x10(%rax), %rax movq -0x48(%rbp), %rdx movl 0x8(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x8(%rdx) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq $0x3, 0x8(%rax) movq -0x48(%rbp), %rax movl 0x4(%rax), %ecx addl $0x3, %ecx movl %ecx, 0x4(%rax) leaq -0x5b(%rbp), %rcx movq -0x68(%rbp), %rax movq %rcx, (%rax) movl -0x2c(%rbp), %eax orl $0x40, %eax movb %al, -0x5b(%rbp) leaq -0x5b(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) movw -0x3a(%rbp), %cx movq -0x78(%rbp), %rax movw %cx, (%rax) movq -0x48(%rbp), %rax movl 0x4(%rax), %edx movq -0x48(%rbp), %rcx leaq 0x4640c4(%rip), %rsi # 0x4ae740 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 callq 0x51110 movsbl %al, %eax movl %eax, -0x6c(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rcx movq 0xc64d12(%rip), %rax # 0xcaf3b8 movq %rcx, 0x100000(%rax) jmp 0x4a6af jmp 0x4a6b1 callq 0x45d30 cmpq $0x0, -0x58(%rbp) je 0x4a6db cmpl $0x0, -0x6c(%rbp) jne 0x4a6d2 movq -0x58(%rbp), %rdi callq 0x4bef0 movsbl %al, %eax movl %eax, -0x6c(%rbp) movq -0x58(%rbp), %rdi callq 0x45d00 jmp 0x4a6dd movl -0x6c(%rbp), %eax movb %al, -0x79(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4a701 movb -0x79(%rbp), %al addq $0x80, %rsp popq %rbp retq callq 0x2a290 nopw %cs:(%rax,%rax)
translog_write_fixed_record: push rbp mov rbp, rsp sub rsp, 80h mov ax, cx mov rcx, [rbp+arg_0] mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_28], rdi mov [rbp+var_2C], esi mov [rbp+var_38], rdx mov [rbp+var_3A], ax mov [rbp+var_48], r8 mov [rbp+var_50], r9 mov [rbp+var_58], 0 mov [rbp+var_6C], 1 jmp short $+2 loc_4A4A7: call translog_lock jmp short $+2 loc_4A4AE: jmp short $+2 loc_4A4B0: jmp short $+2 loc_4A4B2: jmp short $+2 loc_4A4B4: jmp short $+2 loc_4A4B6: movzx eax, cs:word_CAF3C0 mov rcx, [rbp+var_48] mov ecx, [rcx] mov edx, [rbp+var_2C] mov esi, edx lea rdx, log_record_type_descriptor imul rsi, 48h ; 'H' add rdx, rsi movsx edx, word ptr [rdx+20h] shl edx, 1 add ecx, edx add ecx, 3 add eax, ecx cmp eax, 2000h jbe short loc_4A523 jmp short $+2 loc_4A4EC: jmp short $+2 loc_4A4EE: lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h lea rdx, [rbp+var_58] call translog_page_next cmp al, 0 jz short loc_4A518 jmp loc_4A6B1 loc_4A518: cmp [rbp+var_58], 0 jz short loc_4A521 jmp short $+2 loc_4A521: jmp short $+2 loc_4A523: mov rdi, [rbp+var_28] mov rsi, cs:qword_CAF388 call set_lsn mov rax, [rbp+var_28] mov rax, [rax] sar rax, 20h mov edi, eax mov rax, [rbp+var_28] mov rax, [rax] sar rax, 20h mov esi, eax mov rax, [rbp+var_28] mov rdx, [rax] mov ecx, 1 call translog_set_lsn_for_files movsx eax, al cmp eax, 0 jnz short loc_4A5B4 mov eax, [rbp+var_2C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx cmp qword ptr [rax+10h], 0 jz short loc_4A5B9 mov eax, [rbp+var_2C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx mov rax, [rax+10h] mov edi, [rbp+var_2C] mov rsi, [rbp+var_50] mov rdx, [rbp+var_38] mov rcx, [rbp+var_28] mov r8, [rbp+arg_0] call rax movsx eax, al cmp eax, 0 jz short loc_4A5B9 loc_4A5B4: jmp loc_4A6B1 loc_4A5B9: mov eax, [rbp+var_2C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx cmp dword ptr [rax], 2 jnz short loc_4A600 jmp short $+2 loc_4A5D3: jmp short $+2 loc_4A5D5: mov rdi, [rbp+var_48] mov rax, [rbp+var_28] mov rsi, [rax] mov eax, [rbp+var_2C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx edx, word ptr [rax+20h] lea rcx, [rbp+var_20] call translog_relative_LSN_encode loc_4A600: jmp short $+2 loc_4A602: jmp short $+2 loc_4A604: mov rax, [rbp+var_48] mov rax, [rax+10h] mov rdx, [rbp+var_48] mov ecx, [rdx+8] add ecx, 0FFFFFFFFh mov [rdx+8], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_68] mov qword ptr [rax+8], 3 mov rax, [rbp+var_48] mov ecx, [rax+4] add ecx, 3 mov [rax+4], ecx lea rcx, [rbp+var_5B] mov rax, [rbp+var_68] mov [rax], rcx mov eax, [rbp+var_2C] or eax, 40h mov [rbp+var_5B], al lea rax, [rbp+var_5B] add rax, 1 mov [rbp+var_78], rax mov cx, [rbp+var_3A] mov rax, [rbp+var_78] mov [rax], cx mov rax, [rbp+var_48] mov edx, [rax+4] mov rcx, [rbp+var_48] lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h call translog_write_parts_on_page movsx eax, al mov [rbp+var_6C], eax mov rax, [rbp+var_28] mov rcx, [rax] mov rax, cs:qword_CAF3B8 mov qword ptr ds:loc_100000[rax], rcx jmp short $+2 loc_4A6AF: jmp short $+2 loc_4A6B1: call translog_unlock cmp [rbp+var_58], 0 jz short loc_4A6DB cmp [rbp+var_6C], 0 jnz short loc_4A6D2 mov rdi, [rbp+var_58] call translog_buffer_flush movsx eax, al mov [rbp+var_6C], eax loc_4A6D2: mov rdi, [rbp+var_58] call translog_buffer_unlock loc_4A6DB: jmp short $+2 loc_4A6DD: mov eax, [rbp+var_6C] mov [rbp+var_79], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4A701 mov al, [rbp+var_79] add rsp, 80h pop rbp retn loc_4A701: call ___stack_chk_fail
char translog_write_fixed_record( _QWORD *a1, unsigned int a2, long long a3, __int16 a4, long long a5, long long a6, long long a7) { long long v7; // rax unsigned int v8; // ecx int v10; // [rsp+14h] [rbp-6Ch] char v11; // [rsp+25h] [rbp-5Bh] BYREF __int16 v12; // [rsp+26h] [rbp-5Ah] long long v13; // [rsp+28h] [rbp-58h] BYREF long long v14; // [rsp+30h] [rbp-50h] long long v15; // [rsp+38h] [rbp-48h] __int16 v16; // [rsp+46h] [rbp-3Ah] long long v17; // [rsp+48h] [rbp-38h] unsigned int v18; // [rsp+54h] [rbp-2Ch] _QWORD *v19; // [rsp+58h] [rbp-28h] _BYTE v20[24]; // [rsp+60h] [rbp-20h] BYREF unsigned long long v21; // [rsp+78h] [rbp-8h] v21 = __readfsqword(0x28u); v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v14 = a6; v13 = 0LL; v10 = 1; translog_lock(); if ( 2 * SLOWORD(log_record_type_descriptor[18 * a2 + 8]) + *(_DWORD *)v15 + 3 + (unsigned int)(unsigned __int16)word_CAF3C0 <= 0x2000 || !(unsigned __int8)translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v13) ) { set_lsn(v19, qword_CAF388); if ( !(unsigned __int8)translog_set_lsn_for_files( (unsigned int)HIDWORD(*v19), (unsigned int)HIDWORD(*v19), *v19, 1LL) && (!*(_QWORD *)&log_record_type_descriptor[18 * v18 + 4] || !(*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v18 + 4])( v18, v14, v17, v19, a7)) ) { if ( log_record_type_descriptor[18 * v18] == 2 ) translog_relative_LSN_encode(v15, *v19, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v18 + 8]), v20); v7 = *(_QWORD *)(v15 + 16); v8 = *(_DWORD *)(v15 + 8) - 1; *(_DWORD *)(v15 + 8) = v8; *(_QWORD *)(16LL * v8 + v7 + 8) = 3LL; *(_DWORD *)(v15 + 4) += 3; *(_QWORD *)(16LL * v8 + v7) = &v11; v11 = v18 | 0x40; v12 = v16; v10 = (char)translog_write_parts_on_page( &log_descriptor[1048969], &log_descriptor[1048970], *(unsigned int *)(v15 + 4), v15); *(_QWORD *)((char *)&loc_100000 + qword_CAF3B8) = *v19; } } translog_unlock(); if ( v13 ) { if ( !v10 ) v10 = (unsigned __int8)translog_buffer_flush(v13); translog_buffer_unlock(v13); } return v10; }
translog_write_fixed_record: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV AX,CX MOV RCX,qword ptr [RBP + 0x10] MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX MOV word ptr [RBP + -0x3a],AX MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x50],R9 MOV qword ptr [RBP + -0x58],0x0 MOV dword ptr [RBP + -0x6c],0x1 JMP 0x0014a4a7 LAB_0014a4a7: CALL 0x00145c40 JMP 0x0014a4ae LAB_0014a4ae: JMP 0x0014a4b0 LAB_0014a4b0: JMP 0x0014a4b2 LAB_0014a4b2: JMP 0x0014a4b4 LAB_0014a4b4: JMP 0x0014a4b6 LAB_0014a4b6: MOVZX EAX,word ptr [0x00daf3c0] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX] MOV EDX,dword ptr [RBP + -0x2c] MOV ESI,EDX LEA RDX,[0x5ad540] IMUL RSI,RSI,0x48 ADD RDX,RSI MOVSX EDX,word ptr [RDX + 0x20] SHL EDX,0x1 ADD ECX,EDX ADD ECX,0x3 ADD EAX,ECX CMP EAX,0x2000 JBE 0x0014a523 JMP 0x0014a4ec LAB_0014a4ec: JMP 0x0014a4ee LAB_0014a4ee: LEA RSI,[0x5ae740] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 LEA RDX,[RBP + -0x58] CALL 0x0014f5b0 CMP AL,0x0 JZ 0x0014a518 JMP 0x0014a6b1 LAB_0014a518: CMP qword ptr [RBP + -0x58],0x0 JZ 0x0014a521 JMP 0x0014a521 LAB_0014a521: JMP 0x0014a523 LAB_0014a523: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [0x00daf388] CALL 0x00150f40 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] SAR RAX,0x20 MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] SAR RAX,0x20 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] MOV ECX,0x1 CALL 0x00150f70 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x0014a5b4 MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX LEA RAX,[0x5ad540] IMUL RCX,RCX,0x48 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x0014a5b9 MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX LEA RAX,[0x5ad540] IMUL RCX,RCX,0x48 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x10] MOV EDI,dword ptr [RBP + -0x2c] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + 0x10] CALL RAX MOVSX EAX,AL CMP EAX,0x0 JZ 0x0014a5b9 LAB_0014a5b4: JMP 0x0014a6b1 LAB_0014a5b9: MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX LEA RAX,[0x5ad540] IMUL RCX,RCX,0x48 ADD RAX,RCX CMP dword ptr [RAX],0x2 JNZ 0x0014a600 JMP 0x0014a5d3 LAB_0014a5d3: JMP 0x0014a5d5 LAB_0014a5d5: MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX LEA RAX,[0x5ad540] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EDX,word ptr [RAX + 0x20] LEA RCX,[RBP + -0x20] CALL 0x0014f6b0 LAB_0014a600: JMP 0x0014a602 LAB_0014a602: JMP 0x0014a604 LAB_0014a604: MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RDX + 0x8] ADD ECX,-0x1 MOV dword ptr [RDX + 0x8],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],0x3 MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x4] ADD ECX,0x3 MOV dword ptr [RAX + 0x4],ECX LEA RCX,[RBP + -0x5b] MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x2c] OR EAX,0x40 MOV byte ptr [RBP + -0x5b],AL LEA RAX,[RBP + -0x5b] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX MOV CX,word ptr [RBP + -0x3a] MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x48] LEA RSI,[0x5ae740] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 CALL 0x00151110 MOVSX EAX,AL MOV dword ptr [RBP + -0x6c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [0x00daf3b8] MOV qword ptr [RAX + 0x100000],RCX JMP 0x0014a6af LAB_0014a6af: JMP 0x0014a6b1 LAB_0014a6b1: CALL 0x00145d30 CMP qword ptr [RBP + -0x58],0x0 JZ 0x0014a6db CMP dword ptr [RBP + -0x6c],0x0 JNZ 0x0014a6d2 MOV RDI,qword ptr [RBP + -0x58] CALL 0x0014bef0 MOVSX EAX,AL MOV dword ptr [RBP + -0x6c],EAX LAB_0014a6d2: MOV RDI,qword ptr [RBP + -0x58] CALL 0x00145d00 LAB_0014a6db: JMP 0x0014a6dd LAB_0014a6dd: MOV EAX,dword ptr [RBP + -0x6c] MOV byte ptr [RBP + -0x79],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014a701 MOV AL,byte ptr [RBP + -0x79] ADD RSP,0x80 POP RBP RET LAB_0014a701: CALL 0x0012a290
int8 translog_write_fixed_record (long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5, int8 param_6,int8 param_7) { int iVar1; char cVar2; char cVar3; long *plVar4; long in_FS_OFFSET; byte local_63; int2 local_62; long local_60; int8 local_58; int *local_50; int2 local_42; int8 local_40; uint local_34; long *local_30; int1 local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_60 = 0; cVar3 = '\x01'; local_58 = param_6; local_50 = param_5; local_42 = param_4; local_40 = param_3; local_34 = param_2; local_30 = param_1; translog_lock(); if (((uint)DAT_00daf3c0 + *local_50 + *(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20) * 2 + 3 < 0x2001) || (cVar2 = translog_page_next(&DAT_00daf388,&DAT_00daf390,&local_60), cVar2 == '\0') ) { set_lsn(local_30,DAT_00daf388); cVar2 = translog_set_lsn_for_files (*local_30 >> 0x20 & 0xffffffff,*local_30 >> 0x20 & 0xffffffff,*local_30,1); if ((cVar2 == '\0') && ((*(long *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10) == 0 || (cVar2 = (**(code **)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10)) (local_34,local_58,local_40,local_30,param_7), cVar2 == '\0')))) { if (*(int *)(log_record_type_descriptor + (ulong)local_34 * 0x48) == 2) { translog_relative_LSN_encode (local_50,*local_30, (int)*(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20), local_28); } iVar1 = local_50[2]; local_50[2] = iVar1 - 1U; plVar4 = (long *)(*(long *)(local_50 + 4) + (ulong)(iVar1 - 1U) * 0x10); plVar4[1] = 3; local_50[1] = local_50[1] + 3; *plVar4 = (long)&local_63; local_63 = (byte)local_34 | 0x40; local_62 = local_42; cVar3 = translog_write_parts_on_page(&DAT_00daf388,&DAT_00daf390,local_50[1],local_50); *(long *)(DAT_00daf3b8 + 0x100000) = *local_30; } } translog_unlock(); if (local_60 != 0) { if (cVar3 == '\0') { cVar3 = translog_buffer_flush(local_60); } translog_buffer_unlock(local_60); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar3); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,836
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number()
monkey531[P]llama/common/json.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x5d77a movl 0x14(%rbx), %eax leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x5d3ce leaq 0x50(%rbx), %r14 movl $0x5, %ebp movsbl %al, %esi movq %r14, %rdi callq 0x1b880 leaq 0x50(%rbx), %r14 movq %rbx, %rdi callq 0x1c63e leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x5d2de movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 jmp 0x5d2c0 cmpl $0x2e, %eax je 0x5d440 cmpl $0x45, %eax je 0x5d49c cmpl $0x65, %eax je 0x5d49c movq %rbx, %rdi callq 0x5d5f0 movq $0x0, (%rsp) callq 0x1b060 movq %rax, %r14 movl $0x0, (%rax) movq 0x50(%rbx), %rdi movq %rsp, %r15 movq %r15, %rsi movl $0xa, %edx cmpl $0x5, %ebp jne 0x5d353 callq 0x1bd70 movq 0x50(%rbx), %rcx addq 0x58(%rbx), %rcx cmpq %rcx, (%r15) jne 0x5d596 cmpl $0x0, (%r14) jne 0x5d36f movl $0x5, %ecx movl $0x80, %edx jmp 0x5d3c5 callq 0x1b130 movq 0x50(%rbx), %rcx addq 0x58(%rbx), %rcx cmpq %rcx, (%r15) jne 0x5d5b2 cmpl $0x0, (%r14) je 0x5d3bb movq 0x50(%rbx), %rdi movq %rsp, %r14 movq %r14, %rsi callq 0x1b7d0 movsd %xmm0, 0x88(%rbx) movq 0x50(%rbx), %rax addq 0x58(%rbx), %rax movl $0x7, %ecx cmpq %rax, (%r14) je 0x5d4d6 leaq 0x91f30(%rip), %rdi # 0xef2d3 leaq 0x8c072(%rip), %rdx # 0xe941c leaq 0x92d73(%rip), %rcx # 0xf0124 movl $0x21d6, %esi # imm = 0x21D6 jmp 0x5d5e8 movl $0x6, %ecx movl $0x78, %edx movq %rax, (%rbx,%rdx) jmp 0x5d4d6 cmpl $0x30, %eax je 0x5d40e cmpl $0x2d, %eax jne 0x5d5ce leaq 0x50(%rbx), %r14 movq %r14, %rdi movl $0x2d, %esi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x5d56f movl 0x14(%rbx), %eax movl $0x6, %ebp jmp 0x5d2b1 leaq 0x50(%rbx), %rdi movl $0x30, %esi callq 0x1b880 movl $0x5, %ebp movq %rbx, %rdi callq 0x1c63e cmpl $0x65, %eax je 0x5d498 cmpl $0x45, %eax je 0x5d498 cmpl $0x2e, %eax jne 0x5d2f9 leaq 0x50(%rbx), %r14 movsbl 0x90(%rbx), %esi movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e addl $-0x30, %eax cmpl $0x9, %eax ja 0x5d48f leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x5d463 cmpl $0x65, %eax je 0x5d49c cmpl $0x45, %eax jne 0x5d523 jmp 0x5d49c leaq 0x92bf7(%rip), %rax # 0xf008d jmp 0x5d4cd leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x5d4e3 cmpl $0x2d, %eax je 0x5d543 cmpl $0x2b, %eax je 0x5d543 leaq 0x92be9(%rip), %rax # 0xf00b6 movq %rax, 0x70(%rbx) movl $0xe, %ecx movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e addl $-0x30, %eax cmpl $0x9, %eax ja 0x5d523 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e addl $-0x30, %eax cmpl $0xa, %eax jb 0x5d507 movq %rbx, %rdi callq 0x5d5f0 movq $0x0, (%rsp) callq 0x1b060 movl $0x0, (%rax) jmp 0x5d36f movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0x1b880 movq %rbx, %rdi callq 0x1c63e addl $-0x30, %eax cmpl $0xa, %eax jb 0x5d4e7 leaq 0x92b87(%rip), %rax # 0xf00f1 jmp 0x5d4cd cmpl $0x30, %eax je 0x5d580 leaq 0x92ae9(%rip), %rax # 0xf0064 jmp 0x5d4cd movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x1b880 movl $0x6, %ebp jmp 0x5d421 leaq 0x91d36(%rip), %rdi # 0xef2d3 leaq 0x8be78(%rip), %rdx # 0xe941c leaq 0x92b79(%rip), %rcx # 0xf0124 movl $0x21b5, %esi # imm = 0x21B5 jmp 0x5d5e8 leaq 0x91d1a(%rip), %rdi # 0xef2d3 leaq 0x8be5c(%rip), %rdx # 0xe941c leaq 0x92b5d(%rip), %rcx # 0xf0124 movl $0x21c5, %esi # imm = 0x21C5 jmp 0x5d5e8 leaq 0x91cfe(%rip), %rdi # 0xef2d3 leaq 0x8be40(%rip), %rdx # 0xe941c leaq 0x8f800(%rip), %rcx # 0xecde3 movl $0x20be, %esi # imm = 0x20BE xorl %eax, %eax callq 0x1c130 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv: push rbp push r15 push r14 push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; 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>>>::reset(void) mov eax, [rbx+14h] lea ecx, [rax-31h] cmp ecx, 9 jnb loc_5D3CE lea r14, [rbx+50h] mov ebp, 5 loc_5D2B1: movsx esi, al mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) lea r14, [rbx+50h] loc_5D2C0: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_5D2DE movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short loc_5D2C0 loc_5D2DE: cmp eax, 2Eh ; '.' jz loc_5D440 cmp eax, 45h ; 'E' jz loc_5D49C cmp eax, 65h ; 'e' jz loc_5D49C loc_5D2F9: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov [rsp+28h+var_28], 0 call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rdi, [rbx+50h] mov r15, rsp mov rsi, r15 mov edx, 0Ah cmp ebp, 5 jnz short loc_5D353 call _strtoull mov rcx, [rbx+50h] add rcx, [rbx+58h] cmp [r15], rcx jnz loc_5D596 cmp dword ptr [r14], 0 jnz short loc_5D36F mov ecx, 5 mov edx, 80h jmp short loc_5D3C5 loc_5D353: call _strtoll mov rcx, [rbx+50h] add rcx, [rbx+58h] cmp [r15], rcx jnz loc_5D5B2 cmp dword ptr [r14], 0 jz short loc_5D3BB loc_5D36F: mov rdi, [rbx+50h] mov r14, rsp mov rsi, r14 call _strtod movsd qword ptr [rbx+88h], xmm0 mov rax, [rbx+50h] add rax, [rbx+58h] mov ecx, 7 cmp [r14], rax jz loc_5D4D6 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21D6h jmp loc_5D5E8 loc_5D3BB: mov ecx, 6 mov edx, 78h ; 'x' loc_5D3C5: mov [rbx+rdx], rax jmp loc_5D4D6 loc_5D3CE: cmp eax, 30h ; '0' jz short loc_5D40E cmp eax, 2Dh ; '-' jnz loc_5D5CE lea r14, [rbx+50h] mov rdi, r14 mov esi, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jnb loc_5D56F mov eax, [rbx+14h] mov ebp, 6 jmp loc_5D2B1 loc_5D40E: lea rdi, [rbx+50h] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 5 loc_5D421: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 65h ; 'e' jz short loc_5D498 cmp eax, 45h ; 'E' jz short loc_5D498 cmp eax, 2Eh ; '.' jnz loc_5D2F9 lea r14, [rbx+50h] loc_5D440: movsx esi, byte ptr [rbx+90h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_5D48F lea r14, [rbx+50h] loc_5D463: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_5D463 cmp eax, 65h ; 'e' jz short loc_5D49C cmp eax, 45h ; 'E' jnz loc_5D523 jmp short loc_5D49C loc_5D48F: lea rax, aInvalidNumberE; "invalid number; expected digit after '."... jmp short loc_5D4CD loc_5D498: lea r14, [rbx+50h] loc_5D49C: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_5D4E3 cmp eax, 2Dh ; '-' jz loc_5D543 cmp eax, 2Bh ; '+' jz short loc_5D543 lea rax, aInvalidNumberE_0; "invalid number; expected '+', '-', or d"... loc_5D4CD: mov [rbx+70h], rax mov ecx, 0Eh loc_5D4D6: mov eax, ecx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_5D4E3: lea r14, [rbx+50h] loc_5D4E7: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_5D523 lea r14, [rbx+50h] loc_5D507: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_5D507 loc_5D523: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov [rsp+28h+var_28], 0 call ___errno_location mov dword ptr [rax], 0 jmp loc_5D36F loc_5D543: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_5D4E7 lea rax, aInvalidNumberE_1; "invalid number; expected digit after ex"... jmp loc_5D4CD loc_5D56F: cmp eax, 30h ; '0' jz short loc_5D580 lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"... jmp loc_5D4CD loc_5D580: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 6 jmp loc_5D421 loc_5D596: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21B5h jmp short loc_5D5E8 loc_5D5B2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"... mov esi, 21C5h jmp short loc_5D5E8 loc_5D5CE: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAdvancedOption+0ABh; "false" mov esi, 20BEh loc_5D5E8: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number( long long a1, double a2) { long long v2; // rax int v4; // eax long long v5; // r14 int v6; // ebp long long v7; // r14 int v8; // eax _DWORD *v9; // r14 long long v10; // rdi long long v11; // rax unsigned int v12; // ecx long long v13; // rdx int v14; // eax int v15; // eax int v16; // eax const char *v17; // rax int v18; // eax long long v20; // r14 _QWORD v21[5]; // [rsp+0h] [rbp-28h] BYREF v21[0] = v2; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(a1); v4 = *(_DWORD *)(a1 + 20); if ( (unsigned int)(v4 - 49) >= 9 ) { if ( v4 == 48 ) { std::string::push_back(a1 + 80, 48LL); v6 = 5; } else { if ( v4 != 45 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 8382LL, "GGML_ASSERT(%s) failed", "false"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } v5 = a1 + 80; std::string::push_back(a1 + 80, 45LL); v14 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1); if ( (unsigned int)(v14 - 49) < 9 ) { v4 = *(_DWORD *)(a1 + 20); v6 = 6; goto LABEL_3; } if ( v14 != 48 ) { v17 = "invalid number; expected digit after '-'"; goto LABEL_40; } std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); v6 = 6; } v15 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1); if ( v15 == 101 || v15 == 69 ) { v7 = a1 + 80; goto LABEL_36; } if ( v15 != 46 ) goto LABEL_9; v7 = a1 + 80; LABEL_28: std::string::push_back(v7, (unsigned int)*(char *)(a1 + 144)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 > 9 ) { v17 = "invalid number; expected digit after '.'"; LABEL_40: *(_QWORD *)(a1 + 112) = v17; return 14; } v7 = a1 + 80; do { std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); v16 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1); } while ( (unsigned int)(v16 - 48) < 0xA ); if ( v16 != 101 && v16 != 69 ) { LABEL_45: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); v21[0] = 0LL; *(_DWORD *)__errno_location(a2) = 0; goto LABEL_15; } LABEL_36: std::string::push_back(v7, (unsigned int)*(char *)(a1 + 20)); v18 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1); if ( (unsigned int)(v18 - 48) < 0xA ) { v20 = a1 + 80; } else { if ( v18 != 45 && v18 != 43 ) { v17 = "invalid number; expected '+', '-', or digit after exponent"; goto LABEL_40; } v20 = a1 + 80; std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 >= 0xA ) { v17 = "invalid number; expected digit after exponent sign"; goto LABEL_40; } } std::string::push_back(v20, (unsigned int)*(char *)(a1 + 20)); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 <= 9 ) { do std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1) - 48 < 0xA ); } goto LABEL_45; } v5 = a1 + 80; v6 = 5; LABEL_3: std::string::push_back(v5, (unsigned int)(char)v4); v7 = a1 + 80; while ( 1 ) { v8 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1); if ( (unsigned int)(v8 - 48) >= 0xA ) break; std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20)); } if ( v8 == 46 ) goto LABEL_28; if ( v8 == 69 || v8 == 101 ) goto LABEL_36; LABEL_9: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); v21[0] = 0LL; v9 = (_DWORD *)__errno_location(a2); *v9 = 0; v10 = *(_QWORD *)(a1 + 80); if ( v6 == 5 ) { v11 = strtoull(v10, v21, 10LL); if ( v21[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 8629LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } if ( !*v9 ) { v12 = 5; v13 = 128LL; LABEL_18: *(_QWORD *)(a1 + v13) = v11; return v12; } } else { v11 = strtoll(v10, v21, 10LL); if ( v21[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 8645LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } if ( !*v9 ) { v12 = 6; v13 = 120LL; goto LABEL_18; } } LABEL_15: *(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v21); v12 = 7; if ( v21[0] == *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) ) return v12; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 8662LL, "GGML_ASSERT(%s) failed", "endptr == token_buffer.data() + token_buffer.size()"); return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); }
scan_number: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0015d77a MOV EAX,dword ptr [RBX + 0x14] LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x0015d3ce LEA R14,[RBX + 0x50] MOV EBP,0x5 LAB_0015d2b1: MOVSX ESI,AL MOV RDI,R14 CALL 0x0011b880 LEA R14,[RBX + 0x50] LAB_0015d2c0: MOV RDI,RBX CALL 0x0011c63e LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x0015d2de MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 JMP 0x0015d2c0 LAB_0015d2de: CMP EAX,0x2e JZ 0x0015d440 CMP EAX,0x45 JZ 0x0015d49c CMP EAX,0x65 JZ 0x0015d49c LAB_0015d2f9: MOV RDI,RBX CALL 0x0015d5f0 MOV qword ptr [RSP],0x0 CALL 0x0011b060 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBX + 0x50] MOV R15,RSP MOV RSI,R15 MOV EDX,0xa CMP EBP,0x5 JNZ 0x0015d353 CALL 0x0011bd70 MOV RCX,qword ptr [RBX + 0x50] ADD RCX,qword ptr [RBX + 0x58] CMP qword ptr [R15],RCX JNZ 0x0015d596 CMP dword ptr [R14],0x0 JNZ 0x0015d36f MOV ECX,0x5 MOV EDX,0x80 JMP 0x0015d3c5 LAB_0015d353: CALL 0x0011b130 MOV RCX,qword ptr [RBX + 0x50] ADD RCX,qword ptr [RBX + 0x58] CMP qword ptr [R15],RCX JNZ 0x0015d5b2 CMP dword ptr [R14],0x0 JZ 0x0015d3bb LAB_0015d36f: MOV RDI,qword ptr [RBX + 0x50] MOV R14,RSP MOV RSI,R14 CALL 0x0011b7d0 MOVSD qword ptr [RBX + 0x88],XMM0 MOV RAX,qword ptr [RBX + 0x50] ADD RAX,qword ptr [RBX + 0x58] MOV ECX,0x7 CMP qword ptr [R14],RAX JZ 0x0015d4d6 LEA RDI,[0x1ef2d3] LEA RDX,[0x1e941c] LEA RCX,[0x1f0124] MOV ESI,0x21d6 JMP 0x0015d5e8 LAB_0015d3bb: MOV ECX,0x6 MOV EDX,0x78 LAB_0015d3c5: MOV qword ptr [RBX + RDX*0x1],RAX JMP 0x0015d4d6 LAB_0015d3ce: CMP EAX,0x30 JZ 0x0015d40e CMP EAX,0x2d JNZ 0x0015d5ce LEA R14,[RBX + 0x50] MOV RDI,R14 MOV ESI,0x2d CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x0015d56f MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x6 JMP 0x0015d2b1 LAB_0015d40e: LEA RDI,[RBX + 0x50] MOV ESI,0x30 CALL 0x0011b880 MOV EBP,0x5 LAB_0015d421: MOV RDI,RBX CALL 0x0011c63e CMP EAX,0x65 JZ 0x0015d498 CMP EAX,0x45 JZ 0x0015d498 CMP EAX,0x2e JNZ 0x0015d2f9 LEA R14,[RBX + 0x50] LAB_0015d440: MOVSX ESI,byte ptr [RBX + 0x90] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e ADD EAX,-0x30 CMP EAX,0x9 JA 0x0015d48f LEA R14,[RBX + 0x50] LAB_0015d463: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x0015d463 CMP EAX,0x65 JZ 0x0015d49c CMP EAX,0x45 JNZ 0x0015d523 JMP 0x0015d49c LAB_0015d48f: LEA RAX,[0x1f008d] JMP 0x0015d4cd LAB_0015d498: LEA R14,[RBX + 0x50] LAB_0015d49c: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x0015d4e3 CMP EAX,0x2d JZ 0x0015d543 CMP EAX,0x2b JZ 0x0015d543 LEA RAX,[0x1f00b6] LAB_0015d4cd: MOV qword ptr [RBX + 0x70],RAX MOV ECX,0xe LAB_0015d4d6: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0015d4e3: LEA R14,[RBX + 0x50] LAB_0015d4e7: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e ADD EAX,-0x30 CMP EAX,0x9 JA 0x0015d523 LEA R14,[RBX + 0x50] LAB_0015d507: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e ADD EAX,-0x30 CMP EAX,0xa JC 0x0015d507 LAB_0015d523: MOV RDI,RBX CALL 0x0015d5f0 MOV qword ptr [RSP],0x0 CALL 0x0011b060 MOV dword ptr [RAX],0x0 JMP 0x0015d36f LAB_0015d543: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x0011b880 MOV RDI,RBX CALL 0x0011c63e ADD EAX,-0x30 CMP EAX,0xa JC 0x0015d4e7 LEA RAX,[0x1f00f1] JMP 0x0015d4cd LAB_0015d56f: CMP EAX,0x30 JZ 0x0015d580 LEA RAX,[0x1f0064] JMP 0x0015d4cd LAB_0015d580: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x0011b880 MOV EBP,0x6 JMP 0x0015d421 LAB_0015d596: LEA RDI,[0x1ef2d3] LEA RDX,[0x1e941c] LEA RCX,[0x1f0124] MOV ESI,0x21b5 JMP 0x0015d5e8 LAB_0015d5b2: LEA RDI,[0x1ef2d3] LEA RDX,[0x1e941c] LEA RCX,[0x1f0124] MOV ESI,0x21c5 JMP 0x0015d5e8 LAB_0015d5ce: LEA RDI,[0x1ef2d3] LEA RDX,[0x1e941c] LEA RCX,[0x1ecde3] MOV ESI,0x20be LAB_0015d5e8: XOR EAX,EAX CALL 0x0011c130
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { char cVar1; int iVar2; int iVar3; char *in_RAX; int *piVar4; ulonglong uVar5; int8 uVar6; char *pcVar7; long lVar8; double dVar9; char *local_28; local_28 = in_RAX; reset(this); iVar3 = *(int *)(this + 0x14); cVar1 = (char)this; if (iVar3 - 0x31U < 9) { iVar3 = 5; LAB_0015d2b1: std::__cxx11::string::push_back(cVar1 + 'P'); while (iVar2 = get(this), iVar2 - 0x30U < 10) { std::__cxx11::string::push_back(cVar1 + 'P'); } if (iVar2 == 0x2e) { LAB_0015d440: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { pcVar7 = "invalid number; expected digit after \'.\'"; goto LAB_0015d4cd; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); } while (iVar3 - 0x30U < 10); if ((iVar3 == 0x65) || (iVar3 == 0x45)) goto LAB_0015d49c; goto LAB_0015d523; } if ((iVar2 == 0x45) || (iVar2 == 0x65)) goto LAB_0015d49c; LAB_0015d2f9: unget(this); local_28 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; if (iVar3 == 5) { uVar5 = strtoull(*(char **)(this + 0x50),&local_28,10); if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21b5; goto LAB_0015d5e8; } if (*piVar4 == 0) { uVar6 = 5; lVar8 = 0x80; LAB_0015d3c5: *(ulonglong *)(this + lVar8) = uVar5; return uVar6; } } else { uVar5 = strtoll(*(char **)(this + 0x50),&local_28,10); if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21c5; goto LAB_0015d5e8; } if (*piVar4 == 0) { uVar6 = 6; lVar8 = 0x78; goto LAB_0015d3c5; } } } else { if (iVar3 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 5; } else { if (iVar3 != 0x2d) { pcVar7 = "false"; uVar6 = 0x20be; goto LAB_0015d5e8; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (iVar3 - 0x31U < 9) { iVar3 = 6; goto LAB_0015d2b1; } if (iVar3 != 0x30) { pcVar7 = "invalid number; expected digit after \'-\'"; goto LAB_0015d4cd; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = 6; } iVar2 = get(this); if ((iVar2 != 0x65) && (iVar2 != 0x45)) { if (iVar2 != 0x2e) goto LAB_0015d2f9; goto LAB_0015d440; } LAB_0015d49c: std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { if ((iVar3 != 0x2d) && (iVar3 != 0x2b)) { pcVar7 = "invalid number; expected \'+\', \'-\', or digit after exponent"; LAB_0015d4cd: *(char **)(this + 0x70) = pcVar7; return 0xe; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (9 < iVar3 - 0x30U) { pcVar7 = "invalid number; expected digit after exponent sign"; goto LAB_0015d4cd; } } std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); if (iVar3 - 0x30U < 10) { do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar3 = get(this); } while (iVar3 - 0x30U < 10); } LAB_0015d523: unget(this); local_28 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; } dVar9 = strtod(*(char **)(this + 0x50),&local_28); *(double *)(this + 0x88) = dVar9; if (local_28 == (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) { return 7; } pcVar7 = "endptr == token_buffer.data() + token_buffer.size()"; uVar6 = 0x21d6; LAB_0015d5e8: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar7); }
13,837
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O0
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x38290 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rdi callq 0x38260 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 1 mov [rax+58h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138290 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,0x1 MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00138260 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
13,838
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O3
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x37280 incl 0x58(%rbx) movq %rbx, %rdi callq 0x37240 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
rw_pr_rdlock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _pthread_mutex_lock inc dword ptr [rbx+58h] mov rdi, rbx call _pthread_mutex_unlock xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00137280 INC dword ptr [RBX + 0x58] MOV RDI,RBX CALL 0x00137240 XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
13,839
MatrixMultiply
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixMultiply(Matrix left, Matrix right) { Matrix result = { 0 }; result.m0 = left.m0*right.m0 + left.m1*right.m4 + left.m2*right.m8 + left.m3*right.m12; result.m1 = left.m0*right.m1 + left.m1*right.m5 + left.m2*right.m9 + left.m3*right.m13; result.m2 = left.m0*right.m2 + left.m1*right.m6 + left.m2*right.m10 + left.m3*right.m14; result.m3 = left.m0*right.m3 + left.m1*right.m7 + left.m2*right.m11 + left.m3*right.m15; result.m4 = left.m4*right.m0 + left.m5*right.m4 + left.m6*right.m8 + left.m7*right.m12; result.m5 = left.m4*right.m1 + left.m5*right.m5 + left.m6*right.m9 + left.m7*right.m13; result.m6 = left.m4*right.m2 + left.m5*right.m6 + left.m6*right.m10 + left.m7*right.m14; result.m7 = left.m4*right.m3 + left.m5*right.m7 + left.m6*right.m11 + left.m7*right.m15; result.m8 = left.m8*right.m0 + left.m9*right.m4 + left.m10*right.m8 + left.m11*right.m12; result.m9 = left.m8*right.m1 + left.m9*right.m5 + left.m10*right.m9 + left.m11*right.m13; result.m10 = left.m8*right.m2 + left.m9*right.m6 + left.m10*right.m10 + left.m11*right.m14; result.m11 = left.m8*right.m3 + left.m9*right.m7 + left.m10*right.m11 + left.m11*right.m15; result.m12 = left.m12*right.m0 + left.m13*right.m4 + left.m14*right.m8 + left.m15*right.m12; result.m13 = left.m12*right.m1 + left.m13*right.m5 + left.m14*right.m9 + left.m15*right.m13; result.m14 = left.m12*right.m2 + left.m13*right.m6 + left.m14*right.m10 + left.m15*right.m14; result.m15 = left.m12*right.m3 + left.m13*right.m7 + left.m14*right.m11 + left.m15*right.m15; return result; }
O2
c
MatrixMultiply: movq %rdi, %rax movaps 0x48(%rsp), %xmm3 movups 0x4c(%rsp), %xmm2 movups 0x50(%rsp), %xmm5 movups 0x54(%rsp), %xmm4 movaps 0x8(%rsp), %xmm0 movaps 0x18(%rsp), %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm1, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm0, %xmm3 addps %xmm2, %xmm3 movaps 0x28(%rsp), %xmm2 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm3, %xmm5 movaps 0x38(%rsp), %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm3, %xmm4 addps %xmm5, %xmm4 movaps 0x58(%rsp), %xmm5 movups %xmm4, (%rdi) movups 0x5c(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm1, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm0, %xmm5 addps %xmm4, %xmm5 movups 0x60(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm5, %xmm4 movups 0x64(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm3, %xmm5 addps %xmm4, %xmm5 movaps 0x68(%rsp), %xmm4 movups %xmm5, 0x10(%rdi) movups 0x6c(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm1, %xmm5 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm0, %xmm4 addps %xmm5, %xmm4 movups 0x70(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm4, %xmm5 movups 0x74(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm3, %xmm4 addps %xmm5, %xmm4 movups %xmm4, 0x20(%rdi) movss 0x7c(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm1, %xmm4 movaps 0x78(%rsp), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm0, %xmm1 addps %xmm4, %xmm1 movss 0x80(%rsp), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movss 0x84(%rsp), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm3, %xmm1 addps %xmm0, %xmm1 movups %xmm1, 0x30(%rdi) retq
MatrixMultiply: mov rax, rdi movaps xmm3, [rsp+arg_40] movups xmm2, [rsp+arg_40+4] movups xmm5, [rsp+arg_40+8] movups xmm4, [rsp+arg_40+0Ch] movaps xmm0, [rsp+arg_0] movaps xmm1, [rsp+arg_10] shufps xmm2, xmm2, 0 mulps xmm2, xmm1 shufps xmm3, xmm3, 0 mulps xmm3, xmm0 addps xmm3, xmm2 movaps xmm2, [rsp+arg_20] shufps xmm5, xmm5, 0 mulps xmm5, xmm2 addps xmm5, xmm3 movaps xmm3, [rsp+arg_30] shufps xmm4, xmm4, 0 mulps xmm4, xmm3 addps xmm4, xmm5 movaps xmm5, [rsp+arg_50] movups xmmword ptr [rdi], xmm4 movups xmm4, [rsp+arg_50+4] shufps xmm4, xmm4, 0 mulps xmm4, xmm1 shufps xmm5, xmm5, 0 mulps xmm5, xmm0 addps xmm5, xmm4 movups xmm4, [rsp+arg_50+8] shufps xmm4, xmm4, 0 mulps xmm4, xmm2 addps xmm4, xmm5 movups xmm5, [rsp+arg_50+0Ch] shufps xmm5, xmm5, 0 mulps xmm5, xmm3 addps xmm5, xmm4 movaps xmm4, [rsp+arg_60] movups xmmword ptr [rdi+10h], xmm5 movups xmm5, [rsp+arg_60+4] shufps xmm5, xmm5, 0 mulps xmm5, xmm1 shufps xmm4, xmm4, 0 mulps xmm4, xmm0 addps xmm4, xmm5 movups xmm5, [rsp+arg_60+8] shufps xmm5, xmm5, 0 mulps xmm5, xmm2 addps xmm5, xmm4 movups xmm4, [rsp+arg_60+0Ch] shufps xmm4, xmm4, 0 mulps xmm4, xmm3 addps xmm4, xmm5 movups xmmword ptr [rdi+20h], xmm4 movss xmm4, [rsp+arg_74] shufps xmm4, xmm4, 0 mulps xmm4, xmm1 movaps xmm1, xmmword ptr [rsp+78h] shufps xmm1, xmm1, 0 mulps xmm1, xmm0 addps xmm1, xmm4 movss xmm0, [rsp+arg_78] shufps xmm0, xmm0, 0 mulps xmm0, xmm2 addps xmm0, xmm1 movss xmm1, [rsp+arg_7C] shufps xmm1, xmm1, 0 mulps xmm1, xmm3 addps xmm1, xmm0 movups xmmword ptr [rdi+30h], xmm1 retn
// local variable allocation has failed, the output may be wrong! __m128 * MatrixMultiply( __m128 *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) { __m128 *result; // rax result = a1; *a1 = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 12), *(__m128 *)((char *)&a11 + 12), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 8), *(__m128 *)((char *)&a11 + 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a11, a11, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 4), *(__m128 *)((char *)&a11 + 4), 0), a8)))); a1[1] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 12), *(__m128 *)((char *)&a12 + 12), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 8), *(__m128 *)((char *)&a12 + 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a12, a12, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 4), *(__m128 *)((char *)&a12 + 4), 0), a8)))); a1[2] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 4), *(__m128 *)((char *)&a14 - 4), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 8), *(__m128 *)((char *)&a14 - 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a13, a13, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 12), *(__m128 *)((char *)&a14 - 12), 0), a8)))); a1[3] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[3], (__m128)a14.m128_u32[3], 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[2], (__m128)a14.m128_u32[2], 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a14, a14, 0), a7), _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[1], (__m128)a14.m128_u32[1], 0), a8)))); return result; }
MatrixMultiply: MOV RAX,RDI MOVAPS XMM3,xmmword ptr [RSP + 0x48] MOVUPS XMM2,xmmword ptr [RSP + 0x4c] MOVUPS XMM5,xmmword ptr [RSP + 0x50] MOVUPS XMM4,xmmword ptr [RSP + 0x54] MOVAPS XMM0,xmmword ptr [RSP + 0x8] MOVAPS XMM1,xmmword ptr [RSP + 0x18] SHUFPS XMM2,XMM2,0x0 MULPS XMM2,XMM1 SHUFPS XMM3,XMM3,0x0 MULPS XMM3,XMM0 ADDPS XMM3,XMM2 MOVAPS XMM2,xmmword ptr [RSP + 0x28] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM2 ADDPS XMM5,XMM3 MOVAPS XMM3,xmmword ptr [RSP + 0x38] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM3 ADDPS XMM4,XMM5 MOVAPS XMM5,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RDI],XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x5c] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM1 SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM0 ADDPS XMM5,XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x60] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM2 ADDPS XMM4,XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x64] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM3 ADDPS XMM5,XMM4 MOVAPS XMM4,xmmword ptr [RSP + 0x68] MOVUPS xmmword ptr [RDI + 0x10],XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x6c] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM1 SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM0 ADDPS XMM4,XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x70] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM2 ADDPS XMM5,XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x74] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM3 ADDPS XMM4,XMM5 MOVUPS xmmword ptr [RDI + 0x20],XMM4 MOVSS XMM4,dword ptr [RSP + 0x7c] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM1 MOVAPS XMM1,xmmword ptr [RSP + 0x78] SHUFPS XMM1,XMM1,0x0 MULPS XMM1,XMM0 ADDPS XMM1,XMM4 MOVSS XMM0,dword ptr [RSP + 0x80] SHUFPS XMM0,XMM0,0x0 MULPS XMM0,XMM2 ADDPS XMM0,XMM1 MOVSS XMM1,dword ptr [RSP + 0x84] SHUFPS XMM1,XMM1,0x0 MULPS XMM1,XMM3 ADDPS XMM1,XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM1 RET
float * MatrixMultiply(float *param_1) { float fStack0000000000000008; float fStack000000000000000c; float fStack0000000000000010; float fStack0000000000000014; float fStack0000000000000018; float fStack000000000000001c; float fStack0000000000000020; float fStack0000000000000024; float fStack0000000000000028; float fStack000000000000002c; float fStack0000000000000030; float fStack0000000000000034; float fStack0000000000000038; float fStack000000000000003c; float fStack0000000000000040; float fStack0000000000000044; float fStack0000000000000048; float fStack000000000000004c; float fStack0000000000000050; float fStack0000000000000054; float fStack0000000000000058; float fStack000000000000005c; float fStack0000000000000060; float fStack0000000000000064; float fStack0000000000000068; float fStack000000000000006c; float fStack0000000000000070; float fStack0000000000000074; float fStack0000000000000078; float fStack000000000000007c; float fStack0000000000000080; float fStack0000000000000084; *param_1 = fStack0000000000000054 * fStack0000000000000038 + fStack0000000000000050 * fStack0000000000000028 + fStack0000000000000048 * fStack0000000000000008 + fStack000000000000004c * fStack0000000000000018; param_1[1] = fStack0000000000000054 * fStack000000000000003c + fStack0000000000000050 * fStack000000000000002c + fStack0000000000000048 * fStack000000000000000c + fStack000000000000004c * fStack000000000000001c; param_1[2] = fStack0000000000000054 * fStack0000000000000040 + fStack0000000000000050 * fStack0000000000000030 + fStack0000000000000048 * fStack0000000000000010 + fStack000000000000004c * fStack0000000000000020; param_1[3] = fStack0000000000000054 * fStack0000000000000044 + fStack0000000000000050 * fStack0000000000000034 + fStack0000000000000048 * fStack0000000000000014 + fStack000000000000004c * fStack0000000000000024; param_1[4] = fStack0000000000000064 * fStack0000000000000038 + fStack0000000000000060 * fStack0000000000000028 + fStack0000000000000058 * fStack0000000000000008 + fStack000000000000005c * fStack0000000000000018; param_1[5] = fStack0000000000000064 * fStack000000000000003c + fStack0000000000000060 * fStack000000000000002c + fStack0000000000000058 * fStack000000000000000c + fStack000000000000005c * fStack000000000000001c; param_1[6] = fStack0000000000000064 * fStack0000000000000040 + fStack0000000000000060 * fStack0000000000000030 + fStack0000000000000058 * fStack0000000000000010 + fStack000000000000005c * fStack0000000000000020; param_1[7] = fStack0000000000000064 * fStack0000000000000044 + fStack0000000000000060 * fStack0000000000000034 + fStack0000000000000058 * fStack0000000000000014 + fStack000000000000005c * fStack0000000000000024; param_1[8] = fStack0000000000000074 * fStack0000000000000038 + fStack0000000000000070 * fStack0000000000000028 + fStack0000000000000068 * fStack0000000000000008 + fStack000000000000006c * fStack0000000000000018; param_1[9] = fStack0000000000000074 * fStack000000000000003c + fStack0000000000000070 * fStack000000000000002c + fStack0000000000000068 * fStack000000000000000c + fStack000000000000006c * fStack000000000000001c; param_1[10] = fStack0000000000000074 * fStack0000000000000040 + fStack0000000000000070 * fStack0000000000000030 + fStack0000000000000068 * fStack0000000000000010 + fStack000000000000006c * fStack0000000000000020; param_1[0xb] = fStack0000000000000074 * fStack0000000000000044 + fStack0000000000000070 * fStack0000000000000034 + fStack0000000000000068 * fStack0000000000000014 + fStack000000000000006c * fStack0000000000000024; param_1[0xc] = fStack0000000000000084 * fStack0000000000000038 + fStack0000000000000080 * fStack0000000000000028 + fStack0000000000000078 * fStack0000000000000008 + fStack000000000000007c * fStack0000000000000018; param_1[0xd] = fStack0000000000000084 * fStack000000000000003c + fStack0000000000000080 * fStack000000000000002c + fStack0000000000000078 * fStack000000000000000c + fStack000000000000007c * fStack000000000000001c; param_1[0xe] = fStack0000000000000084 * fStack0000000000000040 + fStack0000000000000080 * fStack0000000000000030 + fStack0000000000000078 * fStack0000000000000010 + fStack000000000000007c * fStack0000000000000020; param_1[0xf] = fStack0000000000000084 * fStack0000000000000044 + fStack0000000000000080 * fStack0000000000000034 + fStack0000000000000078 * fStack0000000000000014 + fStack000000000000007c * fStack0000000000000024; return param_1; }
13,840
MatrixMultiply
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h
RMAPI Matrix MatrixMultiply(Matrix left, Matrix right) { Matrix result = { 0 }; result.m0 = left.m0*right.m0 + left.m1*right.m4 + left.m2*right.m8 + left.m3*right.m12; result.m1 = left.m0*right.m1 + left.m1*right.m5 + left.m2*right.m9 + left.m3*right.m13; result.m2 = left.m0*right.m2 + left.m1*right.m6 + left.m2*right.m10 + left.m3*right.m14; result.m3 = left.m0*right.m3 + left.m1*right.m7 + left.m2*right.m11 + left.m3*right.m15; result.m4 = left.m4*right.m0 + left.m5*right.m4 + left.m6*right.m8 + left.m7*right.m12; result.m5 = left.m4*right.m1 + left.m5*right.m5 + left.m6*right.m9 + left.m7*right.m13; result.m6 = left.m4*right.m2 + left.m5*right.m6 + left.m6*right.m10 + left.m7*right.m14; result.m7 = left.m4*right.m3 + left.m5*right.m7 + left.m6*right.m11 + left.m7*right.m15; result.m8 = left.m8*right.m0 + left.m9*right.m4 + left.m10*right.m8 + left.m11*right.m12; result.m9 = left.m8*right.m1 + left.m9*right.m5 + left.m10*right.m9 + left.m11*right.m13; result.m10 = left.m8*right.m2 + left.m9*right.m6 + left.m10*right.m10 + left.m11*right.m14; result.m11 = left.m8*right.m3 + left.m9*right.m7 + left.m10*right.m11 + left.m11*right.m15; result.m12 = left.m12*right.m0 + left.m13*right.m4 + left.m14*right.m8 + left.m15*right.m12; result.m13 = left.m12*right.m1 + left.m13*right.m5 + left.m14*right.m9 + left.m15*right.m13; result.m14 = left.m12*right.m2 + left.m13*right.m6 + left.m14*right.m10 + left.m15*right.m14; result.m15 = left.m12*right.m3 + left.m13*right.m7 + left.m14*right.m11 + left.m15*right.m15; return result; }
O3
c
MatrixMultiply: movq %rdi, %rax movaps 0x48(%rsp), %xmm3 movups 0x4c(%rsp), %xmm2 movups 0x50(%rsp), %xmm5 movups 0x54(%rsp), %xmm4 movaps 0x8(%rsp), %xmm0 movaps 0x18(%rsp), %xmm1 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] mulps %xmm1, %xmm2 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] mulps %xmm0, %xmm3 addps %xmm2, %xmm3 movaps 0x28(%rsp), %xmm2 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm3, %xmm5 movaps 0x38(%rsp), %xmm3 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm3, %xmm4 addps %xmm5, %xmm4 movaps 0x58(%rsp), %xmm5 movups %xmm4, (%rdi) movups 0x5c(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm1, %xmm4 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm0, %xmm5 addps %xmm4, %xmm5 movups 0x60(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm2, %xmm4 addps %xmm5, %xmm4 movups 0x64(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm3, %xmm5 addps %xmm4, %xmm5 movaps 0x68(%rsp), %xmm4 movups %xmm5, 0x10(%rdi) movups 0x6c(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm1, %xmm5 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm0, %xmm4 addps %xmm5, %xmm4 movups 0x70(%rsp), %xmm5 shufps $0x0, %xmm5, %xmm5 # xmm5 = xmm5[0,0,0,0] mulps %xmm2, %xmm5 addps %xmm4, %xmm5 movups 0x74(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm3, %xmm4 addps %xmm5, %xmm4 movups %xmm4, 0x20(%rdi) movss 0x7c(%rsp), %xmm4 shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0] mulps %xmm1, %xmm4 movaps 0x78(%rsp), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm0, %xmm1 addps %xmm4, %xmm1 movss 0x80(%rsp), %xmm0 shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] mulps %xmm2, %xmm0 addps %xmm1, %xmm0 movss 0x84(%rsp), %xmm1 shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0] mulps %xmm3, %xmm1 addps %xmm0, %xmm1 movups %xmm1, 0x30(%rdi) retq
MatrixMultiply: mov rax, rdi movaps xmm3, [rsp+arg_40] movups xmm2, [rsp+arg_40+4] movups xmm5, [rsp+arg_40+8] movups xmm4, [rsp+arg_40+0Ch] movaps xmm0, [rsp+arg_0] movaps xmm1, [rsp+arg_10] shufps xmm2, xmm2, 0 mulps xmm2, xmm1 shufps xmm3, xmm3, 0 mulps xmm3, xmm0 addps xmm3, xmm2 movaps xmm2, [rsp+arg_20] shufps xmm5, xmm5, 0 mulps xmm5, xmm2 addps xmm5, xmm3 movaps xmm3, [rsp+arg_30] shufps xmm4, xmm4, 0 mulps xmm4, xmm3 addps xmm4, xmm5 movaps xmm5, [rsp+arg_50] movups xmmword ptr [rdi], xmm4 movups xmm4, [rsp+arg_50+4] shufps xmm4, xmm4, 0 mulps xmm4, xmm1 shufps xmm5, xmm5, 0 mulps xmm5, xmm0 addps xmm5, xmm4 movups xmm4, [rsp+arg_50+8] shufps xmm4, xmm4, 0 mulps xmm4, xmm2 addps xmm4, xmm5 movups xmm5, [rsp+arg_50+0Ch] shufps xmm5, xmm5, 0 mulps xmm5, xmm3 addps xmm5, xmm4 movaps xmm4, [rsp+arg_60] movups xmmword ptr [rdi+10h], xmm5 movups xmm5, [rsp+arg_60+4] shufps xmm5, xmm5, 0 mulps xmm5, xmm1 shufps xmm4, xmm4, 0 mulps xmm4, xmm0 addps xmm4, xmm5 movups xmm5, [rsp+arg_60+8] shufps xmm5, xmm5, 0 mulps xmm5, xmm2 addps xmm5, xmm4 movups xmm4, [rsp+arg_60+0Ch] shufps xmm4, xmm4, 0 mulps xmm4, xmm3 addps xmm4, xmm5 movups xmmword ptr [rdi+20h], xmm4 movss xmm4, [rsp+arg_74] shufps xmm4, xmm4, 0 mulps xmm4, xmm1 movaps xmm1, xmmword ptr [rsp+78h] shufps xmm1, xmm1, 0 mulps xmm1, xmm0 addps xmm1, xmm4 movss xmm0, [rsp+arg_78] shufps xmm0, xmm0, 0 mulps xmm0, xmm2 addps xmm0, xmm1 movss xmm1, [rsp+arg_7C] shufps xmm1, xmm1, 0 mulps xmm1, xmm3 addps xmm1, xmm0 movups xmmword ptr [rdi+30h], xmm1 retn
// local variable allocation has failed, the output may be wrong! __m128 * MatrixMultiply( __m128 *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) { __m128 *result; // rax result = a1; *a1 = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 12), *(__m128 *)((char *)&a11 + 12), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 8), *(__m128 *)((char *)&a11 + 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a11, a11, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a11 + 4), *(__m128 *)((char *)&a11 + 4), 0), a8)))); a1[1] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 12), *(__m128 *)((char *)&a12 + 12), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 8), *(__m128 *)((char *)&a12 + 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a12, a12, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a12 + 4), *(__m128 *)((char *)&a12 + 4), 0), a8)))); a1[2] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 4), *(__m128 *)((char *)&a14 - 4), 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 8), *(__m128 *)((char *)&a14 - 8), 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a13, a13, 0), a7), _mm_mul_ps(_mm_shuffle_ps(*(__m128 *)((char *)&a14 - 12), *(__m128 *)((char *)&a14 - 12), 0), a8)))); a1[3] = _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[3], (__m128)a14.m128_u32[3], 0), a10), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[2], (__m128)a14.m128_u32[2], 0), a9), _mm_add_ps( _mm_mul_ps(_mm_shuffle_ps(a14, a14, 0), a7), _mm_mul_ps(_mm_shuffle_ps((__m128)a14.m128_u32[1], (__m128)a14.m128_u32[1], 0), a8)))); return result; }
MatrixMultiply: MOV RAX,RDI MOVAPS XMM3,xmmword ptr [RSP + 0x48] MOVUPS XMM2,xmmword ptr [RSP + 0x4c] MOVUPS XMM5,xmmword ptr [RSP + 0x50] MOVUPS XMM4,xmmword ptr [RSP + 0x54] MOVAPS XMM0,xmmword ptr [RSP + 0x8] MOVAPS XMM1,xmmword ptr [RSP + 0x18] SHUFPS XMM2,XMM2,0x0 MULPS XMM2,XMM1 SHUFPS XMM3,XMM3,0x0 MULPS XMM3,XMM0 ADDPS XMM3,XMM2 MOVAPS XMM2,xmmword ptr [RSP + 0x28] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM2 ADDPS XMM5,XMM3 MOVAPS XMM3,xmmword ptr [RSP + 0x38] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM3 ADDPS XMM4,XMM5 MOVAPS XMM5,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RDI],XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x5c] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM1 SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM0 ADDPS XMM5,XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x60] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM2 ADDPS XMM4,XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x64] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM3 ADDPS XMM5,XMM4 MOVAPS XMM4,xmmword ptr [RSP + 0x68] MOVUPS xmmword ptr [RDI + 0x10],XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x6c] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM1 SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM0 ADDPS XMM4,XMM5 MOVUPS XMM5,xmmword ptr [RSP + 0x70] SHUFPS XMM5,XMM5,0x0 MULPS XMM5,XMM2 ADDPS XMM5,XMM4 MOVUPS XMM4,xmmword ptr [RSP + 0x74] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM3 ADDPS XMM4,XMM5 MOVUPS xmmword ptr [RDI + 0x20],XMM4 MOVSS XMM4,dword ptr [RSP + 0x7c] SHUFPS XMM4,XMM4,0x0 MULPS XMM4,XMM1 MOVAPS XMM1,xmmword ptr [RSP + 0x78] SHUFPS XMM1,XMM1,0x0 MULPS XMM1,XMM0 ADDPS XMM1,XMM4 MOVSS XMM0,dword ptr [RSP + 0x80] SHUFPS XMM0,XMM0,0x0 MULPS XMM0,XMM2 ADDPS XMM0,XMM1 MOVSS XMM1,dword ptr [RSP + 0x84] SHUFPS XMM1,XMM1,0x0 MULPS XMM1,XMM3 ADDPS XMM1,XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM1 RET
float * MatrixMultiply(float *param_1) { float fStack0000000000000008; float fStack000000000000000c; float fStack0000000000000010; float fStack0000000000000014; float fStack0000000000000018; float fStack000000000000001c; float fStack0000000000000020; float fStack0000000000000024; float fStack0000000000000028; float fStack000000000000002c; float fStack0000000000000030; float fStack0000000000000034; float fStack0000000000000038; float fStack000000000000003c; float fStack0000000000000040; float fStack0000000000000044; float fStack0000000000000048; float fStack000000000000004c; float fStack0000000000000050; float fStack0000000000000054; float fStack0000000000000058; float fStack000000000000005c; float fStack0000000000000060; float fStack0000000000000064; float fStack0000000000000068; float fStack000000000000006c; float fStack0000000000000070; float fStack0000000000000074; float fStack0000000000000078; float fStack000000000000007c; float fStack0000000000000080; float fStack0000000000000084; *param_1 = fStack0000000000000054 * fStack0000000000000038 + fStack0000000000000050 * fStack0000000000000028 + fStack0000000000000048 * fStack0000000000000008 + fStack000000000000004c * fStack0000000000000018; param_1[1] = fStack0000000000000054 * fStack000000000000003c + fStack0000000000000050 * fStack000000000000002c + fStack0000000000000048 * fStack000000000000000c + fStack000000000000004c * fStack000000000000001c; param_1[2] = fStack0000000000000054 * fStack0000000000000040 + fStack0000000000000050 * fStack0000000000000030 + fStack0000000000000048 * fStack0000000000000010 + fStack000000000000004c * fStack0000000000000020; param_1[3] = fStack0000000000000054 * fStack0000000000000044 + fStack0000000000000050 * fStack0000000000000034 + fStack0000000000000048 * fStack0000000000000014 + fStack000000000000004c * fStack0000000000000024; param_1[4] = fStack0000000000000064 * fStack0000000000000038 + fStack0000000000000060 * fStack0000000000000028 + fStack0000000000000058 * fStack0000000000000008 + fStack000000000000005c * fStack0000000000000018; param_1[5] = fStack0000000000000064 * fStack000000000000003c + fStack0000000000000060 * fStack000000000000002c + fStack0000000000000058 * fStack000000000000000c + fStack000000000000005c * fStack000000000000001c; param_1[6] = fStack0000000000000064 * fStack0000000000000040 + fStack0000000000000060 * fStack0000000000000030 + fStack0000000000000058 * fStack0000000000000010 + fStack000000000000005c * fStack0000000000000020; param_1[7] = fStack0000000000000064 * fStack0000000000000044 + fStack0000000000000060 * fStack0000000000000034 + fStack0000000000000058 * fStack0000000000000014 + fStack000000000000005c * fStack0000000000000024; param_1[8] = fStack0000000000000074 * fStack0000000000000038 + fStack0000000000000070 * fStack0000000000000028 + fStack0000000000000068 * fStack0000000000000008 + fStack000000000000006c * fStack0000000000000018; param_1[9] = fStack0000000000000074 * fStack000000000000003c + fStack0000000000000070 * fStack000000000000002c + fStack0000000000000068 * fStack000000000000000c + fStack000000000000006c * fStack000000000000001c; param_1[10] = fStack0000000000000074 * fStack0000000000000040 + fStack0000000000000070 * fStack0000000000000030 + fStack0000000000000068 * fStack0000000000000010 + fStack000000000000006c * fStack0000000000000020; param_1[0xb] = fStack0000000000000074 * fStack0000000000000044 + fStack0000000000000070 * fStack0000000000000034 + fStack0000000000000068 * fStack0000000000000014 + fStack000000000000006c * fStack0000000000000024; param_1[0xc] = fStack0000000000000084 * fStack0000000000000038 + fStack0000000000000080 * fStack0000000000000028 + fStack0000000000000078 * fStack0000000000000008 + fStack000000000000007c * fStack0000000000000018; param_1[0xd] = fStack0000000000000084 * fStack000000000000003c + fStack0000000000000080 * fStack000000000000002c + fStack0000000000000078 * fStack000000000000000c + fStack000000000000007c * fStack000000000000001c; param_1[0xe] = fStack0000000000000084 * fStack0000000000000040 + fStack0000000000000080 * fStack0000000000000030 + fStack0000000000000078 * fStack0000000000000010 + fStack000000000000007c * fStack0000000000000020; param_1[0xf] = fStack0000000000000084 * fStack0000000000000044 + fStack0000000000000080 * fStack0000000000000034 + fStack0000000000000078 * fStack0000000000000014 + fStack000000000000007c * fStack0000000000000024; return param_1; }
13,841
my_fill_ucs2
eloqsql/strings/ctype-ucs2.c
static void my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)), char *s, size_t l, int fill) { DBUG_ASSERT(fill <= 0xFFFF); #ifdef WAITING_FOR_GCC_VECTORIZATION_BUG_TO_BE_FIXED /* This code with int2store() is known to be faster on some processors, but crashes on other processors due to a possible bug in GCC's -ftree-vectorization (which is enabled in -O3) in case of a non-aligned memory. See here for details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039 */ char *last= s + l - 2; uint16 tmp= (fill >> 8) + ((fill & 0xFF) << 8); /* swap bytes */ DBUG_ASSERT(fill <= 0xFFFF); for ( ; s <= last; s+= 2) int2store(s, tmp); /* store little-endian */ #else for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2); #endif }
O0
c
my_fill_ucs2: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) jmp 0xba815 jmp 0xba817 cmpq $0x2, -0x18(%rbp) jb 0xba859 jmp 0xba820 movl -0x1c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl -0x1c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax subq $0x2, %rax movq %rax, -0x18(%rbp) jmp 0xba817 popq %rbp retq nopl (%rax,%rax)
my_fill_ucs2: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx jmp short $+2 loc_BA815: jmp short $+2 loc_BA817: cmp [rbp+var_18], 2 jb short loc_BA859 jmp short $+2 loc_BA820: mov eax, [rbp+var_1C] sar eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov eax, [rbp+var_1C] and eax, 0FFh mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax mov rax, [rbp+var_18] sub rax, 2 mov [rbp+var_18], rax jmp short loc_BA817 loc_BA859: pop rbp retn
unsigned long long my_fill_ucs2(long long a1, _BYTE *a2, unsigned long long a3, __int16 a4) { unsigned long long result; // rax while ( a3 >= 2 ) { *a2 = HIBYTE(a4); a2[1] = a4; a2 += 2; result = a3 - 2; a3 -= 2LL; } return result; }
my_fill_ucs2: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX JMP 0x001ba815 LAB_001ba815: JMP 0x001ba817 LAB_001ba817: CMP qword ptr [RBP + -0x18],0x2 JC 0x001ba859 JMP 0x001ba820 LAB_001ba820: MOV EAX,dword ptr [RBP + -0x1c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x2 MOV qword ptr [RBP + -0x18],RAX JMP 0x001ba817 LAB_001ba859: POP RBP RET
void my_fill_ucs2(int8 param_1,int1 *param_2,ulong param_3,int4 param_4) { ulong local_20; int1 *local_18; local_18 = param_2; for (local_20 = param_3; 1 < local_20; local_20 = local_20 - 2) { *local_18 = (char)((uint)param_4 >> 8); local_18[1] = (char)param_4; local_18 = local_18 + 2; } return; }
13,842
maria_versioning
eloqsql/storage/maria/ma_state.c
void maria_versioning(MARIA_HA *info, my_bool versioning) { MARIA_SHARE *share= info->s; DBUG_ENTER("maria_versioning"); /* For now, this is a hack */ if (share->have_versioning) { enum thr_lock_type save_lock_type; share->lock_key_trees= versioning; /* Set up info->lock.type temporary for _ma_block_get_status() */ save_lock_type= info->lock.type; info->lock.type= versioning ? TL_WRITE_CONCURRENT_INSERT : TL_WRITE; _ma_block_get_status((void*) info, versioning); info->lock.type= save_lock_type; if (versioning) info->state= &share->state.common; else info->state= &share->state.state; /* Change global values by default */ info->state_start= info->state; /* Initial values */ } DBUG_VOID_RETURN; }
O3
c
maria_versioning: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax cmpb $0x0, 0x7e8(%rax) je 0x38d22 movb %sil, 0x7e3(%rax) movl 0x6d0(%rdi), %ecx xorl %r8d, %r8d movl $0x50, %edx testb %sil, %sil sete %r8b leal 0x8(%r8,%r8,4), %esi movl %esi, 0x6d0(%rdi) movq (%rdi), %r8 movl 0x7c4(%r8), %esi movq %rsi, 0x610(%rdi) movl 0x418(%r8), %r8d movl %r8d, 0x618(%rdi) je 0x38d03 orl $0x1, %r8d movl %r8d, 0x618(%rdi) addq $0x6, %rsi movq %rsi, 0x610(%rdi) jmp 0x38d11 movl $0x18, %edx cmpb $0x0, 0x688(%rdi) je 0x38ceb movl %ecx, 0x6d0(%rdi) addq %rdx, %rax movq %rax, 0x20(%rdi) movq %rax, 0x60(%rdi) popq %rbp retq
maria_versioning: push rbp mov rbp, rsp mov rax, [rdi] cmp byte ptr [rax+7E8h], 0 jz short loc_38D22 mov [rax+7E3h], sil mov ecx, [rdi+6D0h] xor r8d, r8d mov edx, 50h ; 'P' test sil, sil setz r8b lea esi, [r8+r8*4+8] mov [rdi+6D0h], esi mov r8, [rdi] mov esi, [r8+7C4h] mov [rdi+610h], rsi mov r8d, [r8+418h] mov [rdi+618h], r8d jz short loc_38D03 loc_38CEB: or r8d, 1 mov [rdi+618h], r8d add rsi, 6 mov [rdi+610h], rsi jmp short loc_38D11 loc_38D03: mov edx, 18h cmp byte ptr [rdi+688h], 0 jz short loc_38CEB loc_38D11: mov [rdi+6D0h], ecx add rax, rdx mov [rdi+20h], rax mov [rdi+60h], rax loc_38D22: pop rbp retn
long long maria_versioning(long long *a1, char a2) { long long result; // rax int v3; // ecx long long v4; // rdx bool v5; // zf long long v6; // r8 long long v7; // rsi int v8; // r8d result = *a1; if ( *(_BYTE *)(*a1 + 2024) ) { *(_BYTE *)(result + 2019) = a2; v3 = *((_DWORD *)a1 + 436); v4 = 80LL; v5 = a2 == 0; *((_DWORD *)a1 + 436) = 5 * (a2 == 0) + 8; v6 = *a1; v7 = *(unsigned int *)(*a1 + 1988); a1[194] = v7; v8 = *(_DWORD *)(v6 + 1048); *((_DWORD *)a1 + 390) = v8; if ( !v5 || (v4 = 24LL, !*((_BYTE *)a1 + 1672)) ) { *((_DWORD *)a1 + 390) = v8 | 1; a1[194] = v7 + 6; } *((_DWORD *)a1 + 436) = v3; result += v4; a1[4] = result; a1[12] = result; } return result; }
maria_versioning: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x7e8],0x0 JZ 0x00138d22 MOV byte ptr [RAX + 0x7e3],SIL MOV ECX,dword ptr [RDI + 0x6d0] XOR R8D,R8D MOV EDX,0x50 TEST SIL,SIL SETZ R8B LEA ESI,[R8 + R8*0x4 + 0x8] MOV dword ptr [RDI + 0x6d0],ESI MOV R8,qword ptr [RDI] MOV ESI,dword ptr [R8 + 0x7c4] MOV qword ptr [RDI + 0x610],RSI MOV R8D,dword ptr [R8 + 0x418] MOV dword ptr [RDI + 0x618],R8D JZ 0x00138d03 LAB_00138ceb: OR R8D,0x1 MOV dword ptr [RDI + 0x618],R8D ADD RSI,0x6 MOV qword ptr [RDI + 0x610],RSI JMP 0x00138d11 LAB_00138d03: MOV EDX,0x18 CMP byte ptr [RDI + 0x688],0x0 JZ 0x00138ceb LAB_00138d11: MOV dword ptr [RDI + 0x6d0],ECX ADD RAX,RDX MOV qword ptr [RDI + 0x20],RAX MOV qword ptr [RDI + 0x60],RAX LAB_00138d22: POP RBP RET
void maria_versioning(long *param_1,char param_2) { uint uVar1; long lVar2; long lVar3; long lVar4; ulong uVar5; lVar2 = *param_1; if (*(char *)(lVar2 + 0x7e8) != '\0') { *(char *)(lVar2 + 0x7e3) = param_2; lVar3 = param_1[0xda]; lVar4 = 0x50; *(uint *)(param_1 + 0xda) = (uint)(param_2 == '\0') * 5 + 8; uVar5 = (ulong)*(uint *)(*param_1 + 0x7c4); param_1[0xc2] = uVar5; uVar1 = *(uint *)(*param_1 + 0x418); *(uint *)(param_1 + 0xc3) = uVar1; if ((param_2 != '\0') || (lVar4 = 0x18, (char)param_1[0xd1] == '\0')) { *(uint *)(param_1 + 0xc3) = uVar1 | 1; param_1[0xc2] = uVar5 + 6; } *(int *)(param_1 + 0xda) = (int)lVar3; param_1[4] = lVar2 + lVar4; param_1[0xc] = lVar2 + lVar4; } return; }
13,843
deflateParams
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/deflate.c
int ZEXPORT deflateParams(strm, level, strategy) z_streamp strm; int level; int strategy; { deflate_state *s; compress_func func; if (deflateStateCheck(strm)) return Z_STREAM_ERROR; s = strm->state; #ifdef FASTEST if (level != 0) level = 1; #else if (level == Z_DEFAULT_COMPRESSION) level = 6; #endif if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && s->last_flush != -2) { /* Flush the last buffer: */ int err = deflate(strm, Z_BLOCK); if (err == Z_STREAM_ERROR) return err; if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead) return Z_BUF_ERROR; } if (s->level != level) { if (s->level == 0 && s->matches != 0) { if (s->matches == 1) slide_hash(s); else CLEAR_HASH(s); s->matches = 0; } s->level = level; s->max_lazy_match = configuration_table[level].max_lazy; s->good_match = configuration_table[level].good_length; s->nice_match = configuration_table[level].nice_length; s->max_chain_length = configuration_table[level].max_chain; } s->strategy = strategy; return Z_OK; }
O3
c
deflateParams: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebx movl %esi, %r14d movq %rdi, %r15 callq 0x4452 movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE testl %eax, %eax jne 0x4a6c cmpl $-0x1, %r14d movl $0x6, %r12d cmovnel %r14d, %r12d cmpl $0xa, %r12d setae %al cmpl $0x5, %ebx setae %cl orb %al, %cl jne 0x4a6c movq 0x38(%r15), %r14 cmpl %ebx, 0xc8(%r14) jne 0x497c movslq 0xc4(%r14), %rax shlq $0x4, %rax leaq 0x12337(%rip), %rcx # 0x16ca0 movq 0x8(%rax,%rcx), %rax movl %r12d, %edx shlq $0x4, %rdx cmpq 0x8(%rdx,%rcx), %rax je 0x4983 cmpl $-0x2, 0x4c(%r14) jne 0x49b5 movl 0xc4(%r14), %eax cmpl %r12d, %eax je 0x4a63 testl %eax, %eax jne 0x4a1f movl 0x1728(%r14), %eax testl %eax, %eax je 0x4a1f cmpl $0x1, %eax jne 0x49f7 movq %r14, %rdi callq 0x556a jmp 0x4a14 movq %r15, %rdi movl $0x5, %esi callq 0x3130 cmpl $-0x2, %eax je 0x4a6c movl $0xfffffffb, %ebp # imm = 0xFFFFFFFB cmpl $0x0, 0x8(%r15) jne 0x4a6c movl 0xac(%r14), %eax movl 0xb4(%r14), %ecx subq 0x98(%r14), %rax addq %rax, %rcx je 0x4983 jmp 0x4a6c movq 0x78(%r14), %rdi movl 0x84(%r14), %edx decl %edx movw $0x0, (%rdi,%rdx,2) addq %rdx, %rdx xorl %esi, %esi callq 0x3140 movl $0x0, 0x1728(%r14) movl %r12d, 0xc4(%r14) movl %r12d, %eax shlq $0x4, %rax leaq 0x1226c(%rip), %rcx # 0x16ca0 movzwl 0x2(%rax,%rcx), %edx movl %edx, 0xc0(%r14) movzwl (%rax,%rcx), %edx movl %edx, 0xcc(%r14) movzwl 0x4(%rax,%rcx), %edx movl %edx, 0xd0(%r14) movzwl 0x6(%rax,%rcx), %eax movl %eax, 0xbc(%r14) movl %ebx, 0xc8(%r14) xorl %ebp, %ebp movl %ebp, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
deflateParams: push rbp push r15 push r14 push r12 push rbx mov ebx, edx mov r14d, esi mov r15, rdi call deflateStateCheck mov ebp, 0FFFFFFFEh test eax, eax jnz loc_4A6C cmp r14d, 0FFFFFFFFh mov r12d, 6 cmovnz r12d, r14d cmp r12d, 0Ah setnb al cmp ebx, 5 setnb cl or cl, al jnz loc_4A6C mov r14, [r15+38h] cmp [r14+0C8h], ebx jnz short loc_497C movsxd rax, dword ptr [r14+0C4h] shl rax, 4 lea rcx, configuration_table mov rax, [rax+rcx+8] mov edx, r12d shl rdx, 4 cmp rax, [rdx+rcx+8] jz short loc_4983 loc_497C: cmp dword ptr [r14+4Ch], 0FFFFFFFEh jnz short loc_49B5 loc_4983: mov eax, [r14+0C4h] cmp eax, r12d jz loc_4A63 test eax, eax jnz loc_4A1F mov eax, [r14+1728h] test eax, eax jz short loc_4A1F cmp eax, 1 jnz short loc_49F7 mov rdi, r14 call slide_hash jmp short loc_4A14 loc_49B5: mov rdi, r15 mov esi, 5 call _deflate cmp eax, 0FFFFFFFEh jz loc_4A6C mov ebp, 0FFFFFFFBh cmp dword ptr [r15+8], 0 jnz loc_4A6C mov eax, [r14+0ACh] mov ecx, [r14+0B4h] sub rax, [r14+98h] add rcx, rax jz short loc_4983 jmp short loc_4A6C loc_49F7: mov rdi, [r14+78h] mov edx, [r14+84h] dec edx mov word ptr [rdi+rdx*2], 0 add rdx, rdx xor esi, esi call _memset loc_4A14: mov dword ptr [r14+1728h], 0 loc_4A1F: mov [r14+0C4h], r12d mov eax, r12d shl rax, 4 lea rcx, configuration_table movzx edx, word ptr [rax+rcx+2] mov [r14+0C0h], edx movzx edx, word ptr [rax+rcx] mov [r14+0CCh], edx movzx edx, word ptr [rax+rcx+4] mov [r14+0D0h], edx movzx eax, word ptr [rax+rcx+6] mov [r14+0BCh], eax loc_4A63: mov [r14+0C8h], ebx xor ebp, ebp loc_4A6C: mov eax, ebp pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long deflateParams(long long a1, unsigned int a2, unsigned int a3) { unsigned int v4; // ebp unsigned int v5; // r12d long long v6; // r14 int v7; // eax int v8; // eax long long v9; // rdi long long v10; // rdx long long v11; // rax v4 = -2; if ( !(unsigned int)deflateStateCheck((_QWORD *)a1) ) { v5 = 6; if ( a2 != -1 ) v5 = a2; if ( v5 < 0xA && a3 < 5 ) { if ( (v6 = *(_QWORD *)(a1 + 56), *(_DWORD *)(v6 + 200) == a3) && *((_QWORD *)&configuration_table + 2 * *(int *)(v6 + 196) + 1) == *((_QWORD *)&configuration_table + 2 * v5 + 1) || *(_DWORD *)(v6 + 76) == -2 || (unsigned int)deflate(a1, 5LL) != -2 && (v4 = -5, !*(_DWORD *)(a1 + 8)) && !(*(unsigned int *)(v6 + 172) - *(_QWORD *)(v6 + 152) + *(unsigned int *)(v6 + 180)) ) { v7 = *(_DWORD *)(v6 + 196); if ( v7 != v5 ) { if ( !v7 ) { v8 = *(_DWORD *)(v6 + 5928); if ( v8 ) { if ( v8 == 1 ) { slide_hash(v6); } else { v9 = *(_QWORD *)(v6 + 120); v10 = (unsigned int)(*(_DWORD *)(v6 + 132) - 1); *(_WORD *)(v9 + 2 * v10) = 0; memset(v9, 0LL, 2 * v10); } *(_DWORD *)(v6 + 5928) = 0; } } *(_DWORD *)(v6 + 196) = v5; v11 = 16LL * v5; *(_DWORD *)(v6 + 192) = *(unsigned __int16 *)((char *)&configuration_table + v11 + 2); *(_DWORD *)(v6 + 204) = *(unsigned __int16 *)((char *)&configuration_table + v11); *(_DWORD *)(v6 + 208) = *(unsigned __int16 *)((char *)&configuration_table + v11 + 4); *(_DWORD *)(v6 + 188) = *(unsigned __int16 *)((char *)&configuration_table + v11 + 6); } *(_DWORD *)(v6 + 200) = a3; return 0; } } } return v4; }
deflateParams: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14D,ESI MOV R15,RDI CALL 0x00104452 MOV EBP,0xfffffffe TEST EAX,EAX JNZ 0x00104a6c CMP R14D,-0x1 MOV R12D,0x6 CMOVNZ R12D,R14D CMP R12D,0xa SETNC AL CMP EBX,0x5 SETNC CL OR CL,AL JNZ 0x00104a6c MOV R14,qword ptr [R15 + 0x38] CMP dword ptr [R14 + 0xc8],EBX JNZ 0x0010497c MOVSXD RAX,dword ptr [R14 + 0xc4] SHL RAX,0x4 LEA RCX,[0x116ca0] MOV RAX,qword ptr [RAX + RCX*0x1 + 0x8] MOV EDX,R12D SHL RDX,0x4 CMP RAX,qword ptr [RDX + RCX*0x1 + 0x8] JZ 0x00104983 LAB_0010497c: CMP dword ptr [R14 + 0x4c],-0x2 JNZ 0x001049b5 LAB_00104983: MOV EAX,dword ptr [R14 + 0xc4] CMP EAX,R12D JZ 0x00104a63 TEST EAX,EAX JNZ 0x00104a1f MOV EAX,dword ptr [R14 + 0x1728] TEST EAX,EAX JZ 0x00104a1f CMP EAX,0x1 JNZ 0x001049f7 MOV RDI,R14 CALL 0x0010556a JMP 0x00104a14 LAB_001049b5: MOV RDI,R15 MOV ESI,0x5 CALL 0x00103130 CMP EAX,-0x2 JZ 0x00104a6c MOV EBP,0xfffffffb CMP dword ptr [R15 + 0x8],0x0 JNZ 0x00104a6c MOV EAX,dword ptr [R14 + 0xac] MOV ECX,dword ptr [R14 + 0xb4] SUB RAX,qword ptr [R14 + 0x98] ADD RCX,RAX JZ 0x00104983 JMP 0x00104a6c LAB_001049f7: MOV RDI,qword ptr [R14 + 0x78] MOV EDX,dword ptr [R14 + 0x84] DEC EDX MOV word ptr [RDI + RDX*0x2],0x0 ADD RDX,RDX XOR ESI,ESI CALL 0x00103140 LAB_00104a14: MOV dword ptr [R14 + 0x1728],0x0 LAB_00104a1f: MOV dword ptr [R14 + 0xc4],R12D MOV EAX,R12D SHL RAX,0x4 LEA RCX,[0x116ca0] MOVZX EDX,word ptr [RAX + RCX*0x1 + 0x2] MOV dword ptr [R14 + 0xc0],EDX MOVZX EDX,word ptr [RAX + RCX*0x1] MOV dword ptr [R14 + 0xcc],EDX MOVZX EDX,word ptr [RAX + RCX*0x1 + 0x4] MOV dword ptr [R14 + 0xd0],EDX MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x6] MOV dword ptr [R14 + 0xbc],EAX LAB_00104a63: MOV dword ptr [R14 + 0xc8],EBX XOR EBP,EBP LAB_00104a6c: MOV EAX,EBP POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 deflateParams(long param_1,uint param_2,uint param_3) { long lVar1; void *__s; int iVar2; long lVar3; ulong uVar4; int8 uVar5; uint uVar6; iVar2 = deflateStateCheck(); uVar5 = 0xfffffffe; if (iVar2 == 0) { uVar6 = 6; if (param_2 != 0xffffffff) { uVar6 = param_2; } if ((param_3 < 5 && uVar6 < 10) && ((((lVar1 = *(long *)(param_1 + 0x38), *(uint *)(lVar1 + 200) == param_3 && (*(long *)(configuration_table + (long)*(int *)(lVar1 + 0xc4) * 0x10 + 8) == *(long *)(configuration_table + (ulong)uVar6 * 0x10 + 8))) || (*(int *)(lVar1 + 0x4c) == -2)) || (((iVar2 = deflate(param_1), iVar2 != -2 && (uVar5 = 0xfffffffb, *(int *)(param_1 + 8) == 0) ) && ((ulong)*(uint *)(lVar1 + 0xb4) + ((ulong)*(uint *)(lVar1 + 0xac) - *(long *)(lVar1 + 0x98)) == 0)))))) { if (*(uint *)(lVar1 + 0xc4) != uVar6) { if ((*(uint *)(lVar1 + 0xc4) == 0) && (*(int *)(lVar1 + 0x1728) != 0)) { if (*(int *)(lVar1 + 0x1728) == 1) { slide_hash(lVar1); } else { __s = *(void **)(lVar1 + 0x78); uVar4 = (ulong)(*(int *)(lVar1 + 0x84) - 1); *(int2 *)((long)__s + uVar4 * 2) = 0; memset(__s,0,uVar4 * 2); } *(int4 *)(lVar1 + 0x1728) = 0; } *(uint *)(lVar1 + 0xc4) = uVar6; lVar3 = (ulong)uVar6 * 0x10; *(uint *)(lVar1 + 0xc0) = (uint)*(ushort *)(configuration_table + lVar3 + 2); *(uint *)(lVar1 + 0xcc) = (uint)*(ushort *)(configuration_table + lVar3); *(uint *)(lVar1 + 0xd0) = (uint)*(ushort *)(configuration_table + lVar3 + 4); *(uint *)(lVar1 + 0xbc) = (uint)*(ushort *)(configuration_table + lVar3 + 6); } *(uint *)(lVar1 + 200) = param_3; uVar5 = 0; } } return uVar5; }
13,844
testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc
static void CaptureStream(int fd, const char* stream_name, CapturedStream** stream) { if (*stream != nullptr) { GTEST_LOG_(FATAL) << "Only one " << stream_name << " capturer can exist at a time."; } *stream = new CapturedStream(fd); }
O3
cpp
testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movl %edi, %ebp cmpq $0x0, (%rdx) je 0x16d5f movq %rsi, %r14 leaq 0x2b784(%rip), %rdx # 0x42459 leaq 0x4(%rsp), %rdi movl $0x3, %esi movl $0x4ab, %ecx # imm = 0x4AB callq 0x16b08 movq 0x422f8(%rip), %r15 # 0x58fe8 leaq 0x2d1cf(%rip), %rsi # 0x43ec6 movl $0x9, %edx movq %r15, %rdi callq 0x85b0 testq %r14, %r14 je 0x16d25 movq %r14, %rdi callq 0x8200 movq 0x422d0(%rip), %rdi # 0x58fe8 movq %r14, %rsi movq %rax, %rdx callq 0x85b0 jmp 0x16d3d movq (%r15), %rax movq -0x18(%rax), %rax leaq (%r15,%rax), %rdi movl 0x20(%r15,%rax), %esi orl $0x1, %esi callq 0x8930 movq 0x422a4(%rip), %rdi # 0x58fe8 leaq 0x2d185(%rip), %rsi # 0x43ed0 movl $0x1e, %edx callq 0x85b0 leaq 0x4(%rsp), %rdi callq 0x16c4a movl $0x28, %edi callq 0x84b0 movq %rax, %r14 movq %rax, %rdi movl %ebp, %esi callq 0x35ed4 movq %r14, (%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movl $0x28, %esi movq %r14, %rdi callq 0x84e0 jmp 0x16da3 movq %rax, %rbx leaq 0x4(%rsp), %rdi callq 0x16c4a movq %rbx, %rdi callq 0x8990
_ZN7testing8internalL13CaptureStreamEiPKcPPNS0_14CapturedStreamE: push rbp push r15 push r14 push rbx push rax mov rbx, rdx mov ebp, edi cmp qword ptr [rdx], 0 jz loc_16D5F mov r14, rsi lea rdx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rsp+28h+var_24] mov esi, 3 mov ecx, 4ABh call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov r15, cs:_ZSt4cerr_ptr lea rsi, aOnlyOne; "Only one " mov edx, 9 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) test r14, r14 jz short loc_16D25 mov rdi, r14 call _strlen mov rdi, cs:_ZSt4cerr_ptr mov rsi, r14 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_16D3D loc_16D25: mov rax, [r15] mov rax, [rax-18h] lea rdi, [r15+rax] mov esi, [r15+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_16D3D: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aCapturerCanExi; " capturer can exist at a time." mov edx, 1Eh 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+28h+var_24]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_16D5F: mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rdi, rax; this mov esi, ebp; int call _ZN7testing8internal14CapturedStreamC2Ei; testing::internal::CapturedStream::CapturedStream(int) mov [rbx], r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov esi, 28h ; '('; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_16DA3 mov rbx, rax lea rdi, [rsp+4]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() loc_16DA3: mov rdi, rbx call __Unwind_Resume
long long testing::internal::CaptureStream( testing::internal *this, long long a2, char *a3, testing::internal::CapturedStream **a4) { long long v4; // rax long long v6; // rax long long v7; // rdx long long v8; // rcx testing::internal::CapturedStream *v9; // r14 long long result; // rax _DWORD v11[9]; // [rsp+0h] [rbp-24h] BYREF v11[0] = HIDWORD(v4); if ( *(_QWORD *)a3 ) { testing::internal::GTestLog::GTestLog( v11, 3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc", 1195); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Only one ", 9LL); if ( a2 ) { v6 = strlen(a2); std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a2, v6); } else { std::ios::clear( (char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL), *(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u); } std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, " capturer can exist at a time.", 30LL); testing::internal::GTestLog::~GTestLog( (testing::internal::GTestLog *)v11, (long long)" capturer can exist at a time.", v7, v8); } v9 = (testing::internal::CapturedStream *)operator new(0x28uLL); result = testing::internal::CapturedStream::CapturedStream(v9, (int)this); *(_QWORD *)a3 = v9; return result; }
CaptureStream: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV EBP,EDI CMP qword ptr [RDX],0x0 JZ 0x00116d5f MOV R14,RSI LEA RDX,[0x142459] LEA RDI,[RSP + 0x4] MOV ESI,0x3 MOV ECX,0x4ab CALL 0x00116b08 LAB_00116ce9: MOV R15,qword ptr [0x00158fe8] LEA RSI,[0x143ec6] MOV EDX,0x9 MOV RDI,R15 CALL 0x001085b0 TEST R14,R14 JZ 0x00116d25 MOV RDI,R14 CALL 0x00108200 MOV RDI,qword ptr [0x00158fe8] MOV RSI,R14 MOV RDX,RAX CALL 0x001085b0 JMP 0x00116d3d LAB_00116d25: MOV RAX,qword ptr [R15] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[R15 + RAX*0x1] MOV ESI,dword ptr [R15 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00108930 LAB_00116d3d: MOV RDI,qword ptr [0x00158fe8] LEA RSI,[0x143ed0] MOV EDX,0x1e CALL 0x001085b0 LAB_00116d55: LEA RDI,[RSP + 0x4] CALL 0x00116c4a LAB_00116d5f: MOV EDI,0x28 CALL 0x001084b0 MOV R14,RAX LAB_00116d6c: MOV RDI,RAX MOV ESI,EBP CALL 0x00135ed4 LAB_00116d76: MOV qword ptr [RBX],R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**) */ void testing::internal::CaptureStream(int param_1,char *param_2,CapturedStream **param_3) { int *puVar1; size_t sVar2; CapturedStream *this; GTestLog local_24 [4]; if (*param_3 != (CapturedStream *)0x0) { GTestLog::GTestLog(local_24,3, "/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc" ,0x4ab); puVar1 = PTR_cerr_00158fe8; /* try { // try from 00116ce9 to 00116d54 has its CatchHandler @ 00116d96 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,"Only one ",9); if (param_2 == (char *)0x0) { std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18), *(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(param_2); std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,param_2,sVar2) ; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cerr_00158fe8," capturer can exist at a time.",0x1e); GTestLog::~GTestLog(local_24); } this = (CapturedStream *)operator_new(0x28); /* try { // try from 00116d6c to 00116d75 has its CatchHandler @ 00116d84 */ CapturedStream::CapturedStream(this,param_1); *param_3 = this; return; }
13,845
wt_thd_will_wait_for
eloqsql/mysys/waiting_threads.c
int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker, const WT_RESOURCE_ID *resid) { uint i; WT_RESOURCE *rc; DBUG_ENTER("wt_thd_will_wait_for"); DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, resid=%lu", thd->name, blocker->name, (ulong)resid->value)); if (fix_thd_pins(thd)) DBUG_RETURN(WT_DEADLOCK); if (thd->waiting_for == 0) { uint keylen; const void *key; /* XXX if (restype->make_key) key= restype->make_key(resid, &keylen); else */ { key= resid; keylen= sizeof_WT_RESOURCE_ID; } DBUG_PRINT("wt", ("first blocker")); retry: while ((rc= lf_hash_search(&reshash, thd->pins, key, keylen)) == 0) { DBUG_PRINT("wt", ("failed to find rc in hash, inserting")); if (lf_hash_insert(&reshash, thd->pins, resid) == -1) /* if OOM */ DBUG_RETURN(WT_DEADLOCK); /* Two cases: either lf_hash_insert() failed - because another thread has just inserted a resource with the same id - and we need to retry. Or lf_hash_insert() succeeded, and then we need to repeat lf_hash_search() to find a real address of the newly inserted element. That is, we don't care what lf_hash_insert() has returned. And we need to repeat the loop anyway. */ } if (rc == MY_ERRPTR) DBUG_RETURN(WT_DEADLOCK); DBUG_PRINT("wt", ("found in hash rc=%p", rc)); rc_wrlock(rc); if (rc->state != ACTIVE) { DBUG_PRINT("wt", ("but it's not active, retrying")); /* Somebody has freed the element while we weren't looking */ rc_unlock(rc); lf_hash_search_unpin(thd->pins); goto retry; } lf_hash_search_unpin(thd->pins); /* the element cannot go away anymore */ thd->waiting_for= rc; rc->waiter_count++; thd->killed= 0; } else { DBUG_ASSERT(thd->waiting_for->id.type == resid->type); DBUG_ASSERT(resid->type->compare(&thd->waiting_for->id, resid) == 0); DBUG_PRINT("wt", ("adding another blocker")); /* we can safely access the resource here, it's in the hash as it has non-zero waiter_count */ rc= thd->waiting_for; rc_wrlock(rc); DBUG_ASSERT(rc->waiter_count); DBUG_ASSERT(rc->state == ACTIVE); if (thd->killed) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } /* Another thread could be waiting on this resource for this very 'blocker'. In this case we should not add it to the list for the second time. */ for (i= 0; i < rc->owners.elements; i++) if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker) break; if (i >= rc->owners.elements) { if (push_dynamic(&blocker->my_resources, (void*)&rc)) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); /* deadlock and OOM use the same error code */ } if (push_dynamic(&rc->owners, (void*)&blocker)) { pop_dynamic(&blocker->my_resources); stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } rc_unlock(rc); if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK) { stop_waiting(thd); DBUG_RETURN(WT_DEADLOCK); } DBUG_RETURN(WT_OK); }
O3
c
wt_thd_will_wait_for: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, -0x38(%rbp) cmpq $0x0, 0x30(%rdi) je 0xabc7b movq 0x28(%rbx), %r15 testq %r15, %r15 je 0xabb21 movq %r15, -0x30(%rbp) leaq 0x18(%r15), %rdi callq 0xa8d21 cmpb $0x0, 0x60(%rbx) jne 0xabbe9 jmp 0xabbb6 movq %r14, -0x40(%rbp) leaq 0xb63024(%rip), %r13 # 0xc0eb50 movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx movl $0x10, %ecx callq 0x31795 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testq %rax, %rax je 0xabb86 movq %rax, %r15 cmpq $0x1, %rax je 0xabc06 movq %r15, -0x30(%rbp) movq %r15, %r14 addq $0x18, %r14 movq %r14, %rdi callq 0xa8d21 cmpl $0x0, 0x14(%r15) je 0xabb9c movq %r14, %rdi callq 0xa8dc2 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) jmp 0xabb2c movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx callq 0x30f36 cmpl $-0x1, %eax jne 0xabb2c jmp 0xabc06 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) movq %r15, 0x28(%rbx) incl 0x10(%r15) movb $0x0, 0x60(%rbx) movq -0x40(%rbp), %r14 movl 0xe8(%r15), %eax testq %rax, %rax je 0xabbd9 movq 0xe0(%r15), %rcx xorl %edx, %edx cmpq %r14, (%rcx,%rdx,8) je 0xabc45 incq %rdx cmpq %rdx, %rax jne 0xabbcb leaq -0x30(%rbp), %rsi movq %r14, %rdi callq 0x92dda testb %al, %al je 0xabc18 movq 0x28(%rbx), %rsi decl 0x10(%rsi) movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq 0xac175 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xe0, %edi addq -0x30(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x92dda testb %al, %al je 0xabc41 movq -0x38(%rbp), %rdi callq 0x92ecf movq %rbx, %rdi callq 0xabc99 jmp 0xabc00 movq -0x30(%rbp), %r15 addq $0x18, %r15 movq %r15, %rdi callq 0xa8dc2 movq -0x38(%rbp), %rsi movq 0x40(%rbx), %rax movl (%rax), %ecx movq %rbx, %rdi movl $0x1, %edx callq 0xabcb2 testl %eax, %eax je 0xabc76 movq %rbx, %rdi callq 0xabdea jmp 0xabc00 xorl %r14d, %r14d jmp 0xabc06 leaq 0xb62ef6(%rip), %rdi # 0xc0eb78 callq 0x30d5b movq %rax, 0x30(%rbx) testq %rax, %rax jne 0xabafc jmp 0xabc00
wt_thd_will_wait_for: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov r14, rsi mov rbx, rdi mov [rbp+var_38], rsi cmp qword ptr [rdi+30h], 0 jz loc_ABC7B loc_ABAFC: mov r15, [rbx+28h] test r15, r15 jz short loc_ABB21 mov [rbp+var_30], r15 lea rdi, [r15+18h] call my_rw_wrlock cmp byte ptr [rbx+60h], 0 jnz loc_ABBE9 jmp loc_ABBB6 loc_ABB21: mov [rbp+var_40], r14 lea r13, reshash loc_ABB2C: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 mov ecx, 10h call lf_hash_search mov r14d, 0FFFFFFFFh test rax, rax jz short loc_ABB86 mov r15, rax cmp rax, 1 jz loc_ABC06 mov [rbp+var_30], r15 mov r14, r15 add r14, 18h mov rdi, r14 call my_rw_wrlock cmp dword ptr [r15+14h], 0 jz short loc_ABB9C mov rdi, r14 call my_rw_unlock mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] jmp short loc_ABB2C loc_ABB86: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 call lf_hash_insert cmp eax, 0FFFFFFFFh jnz short loc_ABB2C jmp short loc_ABC06 loc_ABB9C: mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] mov [rbx+28h], r15 inc dword ptr [r15+10h] mov byte ptr [rbx+60h], 0 mov r14, [rbp+var_40] loc_ABBB6: mov eax, [r15+0E8h] test rax, rax jz short loc_ABBD9 mov rcx, [r15+0E0h] xor edx, edx loc_ABBCB: cmp [rcx+rdx*8], r14 jz short loc_ABC45 inc rdx cmp rax, rdx jnz short loc_ABBCB loc_ABBD9: lea rsi, [rbp+var_30] mov rdi, r14 call insert_dynamic test al, al jz short loc_ABC18 loc_ABBE9: mov rsi, [rbx+28h] dec dword ptr [rsi+10h] mov qword ptr [rbx+28h], 0 mov rdi, rbx call unlock_lock_and_free_resource loc_ABC00: mov r14d, 0FFFFFFFFh loc_ABC06: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_ABC18: mov edi, 0E0h add rdi, [rbp+var_30] lea rsi, [rbp+var_38] call insert_dynamic test al, al jz short loc_ABC41 mov rdi, [rbp+var_38] call pop_dynamic mov rdi, rbx call stop_waiting_locked jmp short loc_ABC00 loc_ABC41: mov r15, [rbp+var_30] loc_ABC45: add r15, 18h mov rdi, r15 call my_rw_unlock mov rsi, [rbp+var_38] mov rax, [rbx+40h] mov ecx, [rax] mov rdi, rbx mov edx, 1 call deadlock test eax, eax jz short loc_ABC76 mov rdi, rbx call stop_waiting jmp short loc_ABC00 loc_ABC76: xor r14d, r14d jmp short loc_ABC06 loc_ABC7B: lea rdi, unk_C0EB78 call lf_pinbox_get_pins mov [rbx+30h], rax test rax, rax jnz loc_ABAFC jmp loc_ABC00
long long wt_thd_will_wait_for(long long a1, long long a2, long long a3) { long long v4; // r14 long long v5; // r15 long long v6; // rax unsigned int v7; // r14d long long v8; // rdx long long pins; // rax long long v11; // [rsp+8h] [rbp-38h] BYREF long long v12[6]; // [rsp+10h] [rbp-30h] BYREF v4 = a2; v11 = a2; if ( !*(_QWORD *)(a1 + 48) ) { pins = lf_pinbox_get_pins((long long)&unk_C0EB78); *(_QWORD *)(a1 + 48) = pins; if ( !pins ) return (unsigned int)-1; } v5 = *(_QWORD *)(a1 + 40); if ( v5 ) { v12[0] = *(_QWORD *)(a1 + 40); my_rw_wrlock(v5 + 24); if ( *(_BYTE *)(a1 + 96) ) goto LABEL_17; } else { while ( 1 ) { while ( 1 ) { v6 = lf_hash_search((long long)&reshash, *(volatile long long **)(a1 + 48), a3, 0x10u); v7 = -1; if ( v6 ) break; if ( (unsigned int)lf_hash_insert((long long)&reshash, *(_QWORD *)(a1 + 48), a3) == -1 ) return v7; } v5 = v6; if ( v6 == 1 ) return v7; v12[0] = v6; my_rw_wrlock(v6 + 24); if ( !*(_DWORD *)(v5 + 20) ) break; my_rw_unlock(v5 + 24); _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); } _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); *(_QWORD *)(a1 + 40) = v5; ++*(_DWORD *)(v5 + 16); *(_BYTE *)(a1 + 96) = 0; v4 = a2; } if ( !*(_DWORD *)(v5 + 232) ) { LABEL_16: if ( !(unsigned __int8)insert_dynamic(v4, (long long)v12) ) { if ( (unsigned __int8)insert_dynamic(v12[0] + 224, (long long)&v11) ) { pop_dynamic(v11); stop_waiting_locked(a1); return (unsigned int)-1; } v5 = v12[0]; goto LABEL_23; } LABEL_17: --*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL); *(_QWORD *)(a1 + 40) = 0LL; unlock_lock_and_free_resource(a1); return (unsigned int)-1; } v8 = 0LL; while ( *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8 * v8) != v4 ) { if ( *(_DWORD *)(v5 + 232) == ++v8 ) goto LABEL_16; } LABEL_23: my_rw_unlock(v5 + 24); if ( !(unsigned int)deadlock(a1, v11, 1LL, **(unsigned int **)(a1 + 64)) ) return 0; stop_waiting(a1); return (unsigned int)-1; }
wt_thd_will_wait_for: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RBP + -0x38],RSI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001abc7b LAB_001abafc: MOV R15,qword ptr [RBX + 0x28] TEST R15,R15 JZ 0x001abb21 MOV qword ptr [RBP + -0x30],R15 LEA RDI,[R15 + 0x18] CALL 0x001a8d21 CMP byte ptr [RBX + 0x60],0x0 JNZ 0x001abbe9 JMP 0x001abbb6 LAB_001abb21: MOV qword ptr [RBP + -0x40],R14 LEA R13,[0xd0eb50] LAB_001abb2c: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 MOV ECX,0x10 CALL 0x00131795 MOV R14D,0xffffffff TEST RAX,RAX JZ 0x001abb86 MOV R15,RAX CMP RAX,0x1 JZ 0x001abc06 MOV qword ptr [RBP + -0x30],R15 MOV R14,R15 ADD R14,0x18 MOV RDI,R14 CALL 0x001a8d21 CMP dword ptr [R15 + 0x14],0x0 JZ 0x001abb9c MOV RDI,R14 CALL 0x001a8dc2 MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX JMP 0x001abb2c LAB_001abb86: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 CALL 0x00130f36 CMP EAX,-0x1 JNZ 0x001abb2c JMP 0x001abc06 LAB_001abb9c: MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX MOV qword ptr [RBX + 0x28],R15 INC dword ptr [R15 + 0x10] MOV byte ptr [RBX + 0x60],0x0 MOV R14,qword ptr [RBP + -0x40] LAB_001abbb6: MOV EAX,dword ptr [R15 + 0xe8] TEST RAX,RAX JZ 0x001abbd9 MOV RCX,qword ptr [R15 + 0xe0] XOR EDX,EDX LAB_001abbcb: CMP qword ptr [RCX + RDX*0x8],R14 JZ 0x001abc45 INC RDX CMP RAX,RDX JNZ 0x001abbcb LAB_001abbd9: LEA RSI,[RBP + -0x30] MOV RDI,R14 CALL 0x00192dda TEST AL,AL JZ 0x001abc18 LAB_001abbe9: MOV RSI,qword ptr [RBX + 0x28] DEC dword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x28],0x0 MOV RDI,RBX CALL 0x001ac175 LAB_001abc00: MOV R14D,0xffffffff LAB_001abc06: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001abc18: MOV EDI,0xe0 ADD RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x38] CALL 0x00192dda TEST AL,AL JZ 0x001abc41 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00192ecf MOV RDI,RBX CALL 0x001abc99 JMP 0x001abc00 LAB_001abc41: MOV R15,qword ptr [RBP + -0x30] LAB_001abc45: ADD R15,0x18 MOV RDI,R15 CALL 0x001a8dc2 MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBX + 0x40] MOV ECX,dword ptr [RAX] MOV RDI,RBX MOV EDX,0x1 CALL 0x001abcb2 TEST EAX,EAX JZ 0x001abc76 MOV RDI,RBX CALL 0x001abdea JMP 0x001abc00 LAB_001abc76: XOR R14D,R14D JMP 0x001abc06 LAB_001abc7b: LEA RDI,[0xd0eb78] CALL 0x00130d5b MOV qword ptr [RBX + 0x30],RAX TEST RAX,RAX JNZ 0x001abafc JMP 0x001abc00
int8 wt_thd_will_wait_for(long param_1,long param_2,int8 param_3) { int *piVar1; char cVar2; int iVar3; long lVar4; ulong uVar5; long local_40; long local_38; local_40 = param_2; if (*(long *)(param_1 + 0x30) == 0) { lVar4 = lf_pinbox_get_pins(0xd0eb78); *(long *)(param_1 + 0x30) = lVar4; if (lVar4 == 0) { return 0xffffffff; } } lVar4 = *(long *)(param_1 + 0x28); if (lVar4 == 0) { while( true ) { while (lVar4 = lf_hash_search(reshash,*(int8 *)(param_1 + 0x30),param_3), lVar4 == 0) { iVar3 = lf_hash_insert(reshash,*(int8 *)(param_1 + 0x30),param_3); if (iVar3 == -1) { return 0xffffffff; } } if (lVar4 == 1) { return 0xffffffff; } local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(int *)(lVar4 + 0x14) == 0) break; my_rw_unlock(lVar4 + 0x18); LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); } LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); *(long *)(param_1 + 0x28) = lVar4; *(int *)(lVar4 + 0x10) = *(int *)(lVar4 + 0x10) + 1; *(int1 *)(param_1 + 0x60) = 0; } else { local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(char *)(param_1 + 0x60) != '\0') goto LAB_001abbe9; } if ((ulong)*(uint *)(lVar4 + 0xe8) != 0) { uVar5 = 0; do { if (*(long *)(*(long *)(lVar4 + 0xe0) + uVar5 * 8) == param_2) goto LAB_001abc45; uVar5 = uVar5 + 1; } while (*(uint *)(lVar4 + 0xe8) != uVar5); } cVar2 = insert_dynamic(param_2,&local_38); if (cVar2 == '\0') { cVar2 = insert_dynamic(local_38 + 0xe0,&local_40); lVar4 = local_38; if (cVar2 != '\0') { pop_dynamic(local_40); stop_waiting_locked(param_1); return 0xffffffff; } LAB_001abc45: my_rw_unlock(lVar4 + 0x18); iVar3 = deadlock(param_1,local_40,1,**(int4 **)(param_1 + 0x40)); if (iVar3 != 0) { stop_waiting(param_1); return 0xffffffff; } return 0; } LAB_001abbe9: piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10); *piVar1 = *piVar1 + -1; *(int8 *)(param_1 + 0x28) = 0; unlock_lock_and_free_resource(param_1); return 0xffffffff; }
13,846
cr_realloc
bluesky950520[P]quickjs/libunicode.c
int cr_realloc(CharRange *cr, int size) { int new_size; uint32_t *new_buf; if (size > cr->size) { new_size = max_int(size, cr->size * 3 / 2); new_buf = cr->realloc_func(cr->mem_opaque, cr->points, new_size * sizeof(cr->points[0])); if (!new_buf) return -1; cr->points = new_buf; cr->size = new_size; } return 0; }
O2
c
cr_realloc: pushq %rbp pushq %r14 pushq %rbx movl 0x4(%rdi), %eax xorl %ebx, %ebx cmpl %esi, %eax jge 0x7f471 movq %rdi, %r14 leal (%rax,%rax,2), %eax pushq $0x2 popq %rcx cltd idivl %ecx movl %eax, %ebp cmpl %eax, %esi cmovgl %esi, %ebp movq 0x8(%rdi), %rsi movq 0x10(%rdi), %rdi movslq %ebp, %rdx shlq $0x2, %rdx callq *0x18(%r14) testq %rax, %rax je 0x7f46e movq %rax, 0x8(%r14) movl %ebp, 0x4(%r14) jmp 0x7f471 pushq $-0x1 popq %rbx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq
cr_realloc: push rbp push r14 push rbx mov eax, [rdi+4] xor ebx, ebx cmp eax, esi jge short loc_7F471 mov r14, rdi lea eax, [rax+rax*2] push 2 pop rcx cdq idiv ecx mov ebp, eax cmp esi, eax cmovg ebp, esi mov rsi, [rdi+8] mov rdi, [rdi+10h] movsxd rdx, ebp shl rdx, 2 call qword ptr [r14+18h] test rax, rax jz short loc_7F46E mov [r14+8], rax mov [r14+4], ebp jmp short loc_7F471 loc_7F46E: push 0FFFFFFFFFFFFFFFFh pop rbx loc_7F471: mov eax, ebx pop rbx pop r14 pop rbp retn
long long cr_realloc(long long a1, int a2) { int v2; // eax unsigned int v3; // ebx int v4; // ebp long long v5; // rax v2 = *(_DWORD *)(a1 + 4); v3 = 0; if ( v2 < a2 ) { v4 = 3 * v2 / 2; if ( a2 > v4 ) v4 = a2; v5 = (*(long long ( **)(_QWORD, _QWORD, long long))(a1 + 24))( *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 8), 4LL * v4); if ( v5 ) { *(_QWORD *)(a1 + 8) = v5; *(_DWORD *)(a1 + 4) = v4; } else { return (unsigned int)-1; } } return v3; }
cr_realloc: PUSH RBP PUSH R14 PUSH RBX MOV EAX,dword ptr [RDI + 0x4] XOR EBX,EBX CMP EAX,ESI JGE 0x0017f471 MOV R14,RDI LEA EAX,[RAX + RAX*0x2] PUSH 0x2 POP RCX CDQ IDIV ECX MOV EBP,EAX CMP ESI,EAX CMOVG EBP,ESI MOV RSI,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOVSXD RDX,EBP SHL RDX,0x2 CALL qword ptr [R14 + 0x18] TEST RAX,RAX JZ 0x0017f46e MOV qword ptr [R14 + 0x8],RAX MOV dword ptr [R14 + 0x4],EBP JMP 0x0017f471 LAB_0017f46e: PUSH -0x1 POP RBX LAB_0017f471: MOV EAX,EBX POP RBX POP R14 POP RBP RET
int4 cr_realloc(long param_1,int param_2) { int iVar1; long lVar2; int4 uVar3; uVar3 = 0; if (*(int *)(param_1 + 4) < param_2) { iVar1 = (*(int *)(param_1 + 4) * 3) / 2; if (iVar1 < param_2) { iVar1 = param_2; } lVar2 = (**(code **)(param_1 + 0x18)) (*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 8),(long)iVar1 << 2 ); if (lVar2 == 0) { uVar3 = 0xffffffff; } else { *(long *)(param_1 + 8) = lVar2; *(int *)(param_1 + 4) = iVar1; } } return uVar3; }
13,847
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/sampling.cpp
std::vector<common_sampler_type> common_sampler_types_from_chars(const std::string & chars) { std::unordered_map<char, common_sampler_type> sampler_name_map = { { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_DRY), COMMON_SAMPLER_TYPE_DRY }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_K), COMMON_SAMPLER_TYPE_TOP_K }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TYPICAL_P), COMMON_SAMPLER_TYPE_TYPICAL_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_P), COMMON_SAMPLER_TYPE_TOP_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_MIN_P), COMMON_SAMPLER_TYPE_MIN_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TEMPERATURE), COMMON_SAMPLER_TYPE_TEMPERATURE }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_XTC), COMMON_SAMPLER_TYPE_XTC }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_INFILL), COMMON_SAMPLER_TYPE_INFILL }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_PENALTIES), COMMON_SAMPLER_TYPE_PENALTIES }, }; std::vector<common_sampler_type> samplers; samplers.reserve(chars.size()); for (const auto & c : chars) { const auto sampler = sampler_name_map.find(c); if (sampler != sampler_name_map.end()) { samplers.push_back(sampler->second); } } return samplers; }
O0
cpp
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x1a8, %rsp # imm = 0x1A8 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x1a0(%rsp) movq %rsi, 0x198(%rsp) movl $0x1, %edi callq 0x1e3350 movb %al, 0x107(%rsp) movl $0x1, 0x100(%rsp) leaq 0x108(%rsp), %rdi movq %rdi, 0x68(%rsp) leaq 0x107(%rsp), %rsi leaq 0x100(%rsp), %rdx callq 0x1e5470 leaq 0x110(%rsp), %rax movq %rax, 0x28(%rsp) movl $0x2, %edi callq 0x1e3350 movq 0x28(%rsp), %rdi movb %al, 0xff(%rsp) movl $0x2, 0xf8(%rsp) leaq 0xff(%rsp), %rsi leaq 0xf8(%rsp), %rdx callq 0x1e5470 leaq 0x118(%rsp), %rax movq %rax, 0x30(%rsp) movl $0x6, %edi callq 0x1e3350 movq 0x30(%rsp), %rdi movb %al, 0xf7(%rsp) movl $0x6, 0xf0(%rsp) leaq 0xf7(%rsp), %rsi leaq 0xf0(%rsp), %rdx callq 0x1e5470 leaq 0x120(%rsp), %rax movq %rax, 0x38(%rsp) movl $0x3, %edi callq 0x1e3350 movq 0x38(%rsp), %rdi movb %al, 0xef(%rsp) movl $0x3, 0xe8(%rsp) leaq 0xef(%rsp), %rsi leaq 0xe8(%rsp), %rdx callq 0x1e5470 leaq 0x128(%rsp), %rax movq %rax, 0x40(%rsp) movl $0x4, %edi callq 0x1e3350 movq 0x40(%rsp), %rdi movb %al, 0xe7(%rsp) movl $0x4, 0xe0(%rsp) leaq 0xe7(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x1e5470 leaq 0x130(%rsp), %rax movq %rax, 0x48(%rsp) movl $0x7, %edi callq 0x1e3350 movq 0x48(%rsp), %rdi movb %al, 0xdf(%rsp) movl $0x7, 0xd8(%rsp) leaq 0xdf(%rsp), %rsi leaq 0xd8(%rsp), %rdx callq 0x1e5470 leaq 0x138(%rsp), %rax movq %rax, 0x50(%rsp) movl $0x8, %edi callq 0x1e3350 movq 0x50(%rsp), %rdi movb %al, 0xd7(%rsp) movl $0x8, 0xd0(%rsp) leaq 0xd7(%rsp), %rsi leaq 0xd0(%rsp), %rdx callq 0x1e5470 leaq 0x140(%rsp), %rax movq %rax, 0x58(%rsp) movl $0x9, %edi callq 0x1e3350 movq 0x58(%rsp), %rdi movb %al, 0xcf(%rsp) movl $0x9, 0xc8(%rsp) leaq 0xcf(%rsp), %rsi leaq 0xc8(%rsp), %rdx callq 0x1e5470 leaq 0x148(%rsp), %rax movq %rax, 0x60(%rsp) movl $0xa, %edi callq 0x1e3350 movq 0x60(%rsp), %rdi movb %al, 0xc7(%rsp) movl $0xa, 0xc0(%rsp) leaq 0xc7(%rsp), %rsi leaq 0xc0(%rsp), %rdx callq 0x1e5470 movq 0x68(%rsp), %rax movq %rax, 0x150(%rsp) movq $0x9, 0x158(%rsp) leaq 0xbd(%rsp), %rdi movq %rdi, 0x70(%rsp) callq 0x1e54a0 movq 0x70(%rsp), %rcx movq 0x150(%rsp), %rsi movq 0x158(%rsp), %rdx movq %rsp, %rax movq %rcx, (%rax) xorl %eax, %eax movl %eax, %ecx leaq 0x160(%rsp), %rdi leaq 0xbf(%rsp), %r8 leaq 0xbe(%rsp), %r9 callq 0x1e54b0 jmp 0x1e43c3 leaq 0xbd(%rsp), %rdi callq 0x1e5520 movq 0x18(%rsp), %rdi movb $0x0, 0xab(%rsp) callq 0x1e5230 movq 0x198(%rsp), %rdi callq 0x5e560 movq 0x18(%rsp), %rdi movq %rax, %rsi callq 0x1e5240 jmp 0x1e43fe movq 0x198(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rdi callq 0x5e3b0 movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rdi callq 0x5f310 movq %rax, 0x90(%rsp) leaq 0x98(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xc6750 testb $0x1, %al jne 0x1e4456 jmp 0x1e4544 leaq 0x98(%rsp), %rdi callq 0xc67a0 movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rsi leaq 0x160(%rsp), %rdi callq 0x1e5530 movq %rax, 0x10(%rsp) jmp 0x1e4487 movq 0x10(%rsp), %rax movq %rax, 0x80(%rsp) leaq 0x160(%rsp), %rdi callq 0x1e5580 movq %rax, 0x78(%rsp) leaq 0x80(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x1e5560 testb $0x1, %al jne 0x1e44be jmp 0x1e4530 leaq 0x80(%rsp), %rdi callq 0x1e55b0 movq 0x18(%rsp), %rdi movq %rax, %rsi addq $0x4, %rsi callq 0x1e53d0 jmp 0x1e44de jmp 0x1e4530 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) leaq 0xbd(%rsp), %rdi callq 0x1e5520 jmp 0x1e457a movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) callq 0x79550 leaq 0x160(%rsp), %rdi callq 0x1e55d0 jmp 0x1e457a jmp 0x1e4532 leaq 0x98(%rsp), %rdi callq 0xc6850 jmp 0x1e4438 movb $0x1, 0xab(%rsp) testb $0x1, 0xab(%rsp) jne 0x1e4560 movq 0x18(%rsp), %rdi callq 0x79550 leaq 0x160(%rsp), %rdi callq 0x1e55d0 movq 0x20(%rsp), %rax addq $0x1a8, %rsp # imm = 0x1A8 retq movq 0xb0(%rsp), %rdi callq 0x5ec30 nopw (%rax,%rax)
_Z31common_sampler_types_from_charsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 1A8h mov [rsp+1A8h+var_190], rdi mov rax, rdi mov [rsp+1A8h+var_188], rax mov [rsp+1A8h+var_8], rdi mov [rsp+1A8h+var_10], rsi mov edi, 1 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov [rsp+1A8h+var_A1], al mov [rsp+1A8h+var_A8], 1 lea rdi, [rsp+1A8h+var_A0] mov [rsp+1A8h+var_140], rdi lea rsi, [rsp+1A8h+var_A1] lea rdx, [rsp+1A8h+var_A8] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_98] mov [rsp+1A8h+var_180], rax mov edi, 2 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_180] mov [rsp+1A8h+var_A9], al mov [rsp+1A8h+var_B0], 2 lea rsi, [rsp+1A8h+var_A9] lea rdx, [rsp+1A8h+var_B0] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_90] mov [rsp+1A8h+var_178], rax mov edi, 6 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_178] mov [rsp+1A8h+var_B1], al mov [rsp+1A8h+var_B8], 6 lea rsi, [rsp+1A8h+var_B1] lea rdx, [rsp+1A8h+var_B8] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_88] mov [rsp+1A8h+var_170], rax mov edi, 3 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_170] mov [rsp+1A8h+var_B9], al mov [rsp+1A8h+var_C0], 3 lea rsi, [rsp+1A8h+var_B9] lea rdx, [rsp+1A8h+var_C0] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_80] mov [rsp+1A8h+var_168], rax mov edi, 4 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_168] mov [rsp+1A8h+var_C1], al mov [rsp+1A8h+var_C8], 4 lea rsi, [rsp+1A8h+var_C1] lea rdx, [rsp+1A8h+var_C8] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_78] mov [rsp+1A8h+var_160], rax mov edi, 7 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_160] mov [rsp+1A8h+var_C9], al mov [rsp+1A8h+var_D0], 7 lea rsi, [rsp+1A8h+var_C9] lea rdx, [rsp+1A8h+var_D0] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_70] mov [rsp+1A8h+var_158], rax mov edi, 8 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_158] mov [rsp+1A8h+var_D1], al mov [rsp+1A8h+var_D8], 8 lea rsi, [rsp+1A8h+var_D1] lea rdx, [rsp+1A8h+var_D8] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_68] mov [rsp+1A8h+var_150], rax mov edi, 9 call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_150] mov [rsp+1A8h+var_D9], al mov [rsp+1A8h+var_E0], 9 lea rsi, [rsp+1A8h+var_D9] lea rdx, [rsp+1A8h+var_E0] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ lea rax, [rsp+1A8h+var_60] mov [rsp+1A8h+var_148], rax mov edi, 0Ah call _Z26common_sampler_type_to_chr19common_sampler_type; common_sampler_type_to_chr(common_sampler_type) mov rdi, [rsp+1A8h+var_148] mov [rsp+1A8h+var_E1], al mov [rsp+1A8h+var_E8], 0Ah lea rsi, [rsp+1A8h+var_E1] lea rdx, [rsp+1A8h+var_E8] call _ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_ mov rax, [rsp+1A8h+var_140] mov [rsp+1A8h+var_58], rax mov [rsp+1A8h+var_50], 9 lea rdi, [rsp+1A8h+var_EB] mov [rsp+1A8h+var_138], rdi call _ZNSaISt4pairIKc19common_sampler_typeEEC2Ev; std::allocator<std::pair<char const,common_sampler_type>>::allocator(void) mov rcx, [rsp+1A8h+var_138] mov rsi, [rsp+1A8h+var_58] mov rdx, [rsp+1A8h+var_50] mov rax, rsp mov [rax], rcx xor eax, eax mov ecx, eax lea rdi, [rsp+1A8h+var_48] lea r8, [rsp+1A8h+var_E9] lea r9, [rsp+1A8h+var_EA] call _ZNSt13unordered_mapIc19common_sampler_typeSt4hashIcESt8equal_toIcESaISt4pairIKcS0_EEEC2ESt16initializer_listIS7_EmRKS2_RKS4_RKS8_; std::unordered_map<char,common_sampler_type>::unordered_map(std::initializer_list<std::pair<char const,common_sampler_type>>,ulong,std::hash<char> const&,std::equal_to<char> const&,std::allocator<std::pair<char const,common_sampler_type>> const&) jmp short $+2 loc_1E43C3: lea rdi, [rsp+1A8h+var_EB] call _ZNSaISt4pairIKc19common_sampler_typeEED2Ev; std::allocator<std::pair<char const,common_sampler_type>>::~allocator() mov rdi, [rsp+1A8h+var_190] mov [rsp+1A8h+var_FD], 0 call _ZNSt6vectorI19common_sampler_typeSaIS0_EEC2Ev; std::vector<common_sampler_type>::vector(void) mov rdi, [rsp+1A8h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rsp+1A8h+var_190] mov rsi, rax call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong) jmp short $+2 loc_1E43FE: mov rax, [rsp+1A8h+var_10] mov [rsp+1A8h+var_108], rax mov rdi, [rsp+1A8h+var_108] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+1A8h+var_110], rax mov rdi, [rsp+1A8h+var_108] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+1A8h+var_118], rax loc_1E4438: lea rdi, [rsp+1A8h+var_110] lea rsi, [rsp+1A8h+var_118] call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&) test al, 1 jnz short loc_1E4456 jmp loc_1E4544 loc_1E4456: lea rdi, [rsp+1A8h+var_110] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void) mov [rsp+1A8h+var_120], rax mov rsi, [rsp+1A8h+var_120] lea rdi, [rsp+1A8h+var_48] call _ZNSt13unordered_mapIc19common_sampler_typeSt4hashIcESt8equal_toIcESaISt4pairIKcS0_EEE4findERS6_; std::unordered_map<char,common_sampler_type>::find(char const&) mov [rsp+1A8h+var_198], rax jmp short $+2 loc_1E4487: mov rax, [rsp+1A8h+var_198] mov [rsp+1A8h+var_128], rax lea rdi, [rsp+1A8h+var_48] call _ZNSt13unordered_mapIc19common_sampler_typeSt4hashIcESt8equal_toIcESaISt4pairIKcS0_EEE3endEv; std::unordered_map<char,common_sampler_type>::end(void) mov [rsp+1A8h+var_130], rax lea rdi, [rsp+1A8h+var_128] lea rsi, [rsp+1A8h+var_130] call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKc19common_sampler_typeELb0EEES7_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<char const,common_sampler_type>,false> const&,std::__detail::_Node_iterator_base<std::pair<char const,common_sampler_type>,false> const&) test al, 1 jnz short loc_1E44BE jmp short loc_1E4530 loc_1E44BE: lea rdi, [rsp+1A8h+var_128] call _ZNKSt8__detail14_Node_iteratorISt4pairIKc19common_sampler_typeELb0ELb0EEptEv; std::__detail::_Node_iterator<std::pair<char const,common_sampler_type>,false,false>::operator->(void) mov rdi, [rsp+1A8h+var_190] mov rsi, rax add rsi, 4 call _ZNSt6vectorI19common_sampler_typeSaIS0_EE9push_backERKS0_; std::vector<common_sampler_type>::push_back(common_sampler_type const&) jmp short $+2 loc_1E44DE: jmp short loc_1E4530 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax lea rdi, [rsp+arg_B5] call _ZNSaISt4pairIKc19common_sampler_typeEED2Ev; std::allocator<std::pair<char const,common_sampler_type>>::~allocator() jmp short loc_1E457A mov rdi, [rsp+arg_10] mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax call _ZNSt6vectorI19common_sampler_typeSaIS0_EED2Ev; std::vector<common_sampler_type>::~vector() lea rdi, [rsp+arg_158] call _ZNSt13unordered_mapIc19common_sampler_typeSt4hashIcESt8equal_toIcESaISt4pairIKcS0_EEED2Ev; std::unordered_map<char,common_sampler_type>::~unordered_map() jmp short loc_1E457A loc_1E4530: jmp short $+2 loc_1E4532: lea rdi, [rsp+1A8h+var_110] call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void) jmp loc_1E4438 loc_1E4544: mov [rsp+1A8h+var_FD], 1 test [rsp+1A8h+var_FD], 1 jnz short loc_1E4560 mov rdi, [rsp+1A8h+var_190] call _ZNSt6vectorI19common_sampler_typeSaIS0_EED2Ev; std::vector<common_sampler_type>::~vector() loc_1E4560: lea rdi, [rsp+1A8h+var_48] call _ZNSt13unordered_mapIc19common_sampler_typeSt4hashIcESt8equal_toIcESaISt4pairIKcS0_EEED2Ev; std::unordered_map<char,common_sampler_type>::~unordered_map() mov rax, [rsp+1A8h+var_188] add rsp, 1A8h retn loc_1E457A: mov rdi, [rsp+arg_A8] call __Unwind_Resume
long long common_sampler_types_from_chars(long long a1, long long a2) { long long v2; // rax long long v3; // rax long long v5; // [rsp+78h] [rbp-130h] BYREF long long v6; // [rsp+80h] [rbp-128h] BYREF long long v7; // [rsp+88h] [rbp-120h] long long v8; // [rsp+90h] [rbp-118h] BYREF long long v9; // [rsp+98h] [rbp-110h] BYREF long long v10; // [rsp+A0h] [rbp-108h] char v11; // [rsp+ABh] [rbp-FDh] char v12; // [rsp+BDh] [rbp-EBh] BYREF char v13; // [rsp+BEh] [rbp-EAh] BYREF char v14; // [rsp+BFh] [rbp-E9h] BYREF int v15; // [rsp+C0h] [rbp-E8h] BYREF char v16; // [rsp+C7h] [rbp-E1h] BYREF int v17; // [rsp+C8h] [rbp-E0h] BYREF char v18; // [rsp+CFh] [rbp-D9h] BYREF int v19; // [rsp+D0h] [rbp-D8h] BYREF char v20; // [rsp+D7h] [rbp-D1h] BYREF int v21; // [rsp+D8h] [rbp-D0h] BYREF char v22; // [rsp+DFh] [rbp-C9h] BYREF int v23; // [rsp+E0h] [rbp-C8h] BYREF char v24; // [rsp+E7h] [rbp-C1h] BYREF int v25; // [rsp+E8h] [rbp-C0h] BYREF char v26; // [rsp+EFh] [rbp-B9h] BYREF int v27; // [rsp+F0h] [rbp-B8h] BYREF char v28; // [rsp+F7h] [rbp-B1h] BYREF int v29; // [rsp+F8h] [rbp-B0h] BYREF char v30; // [rsp+FFh] [rbp-A9h] BYREF int v31; // [rsp+100h] [rbp-A8h] BYREF char v32; // [rsp+107h] [rbp-A1h] BYREF _BYTE v33[8]; // [rsp+108h] [rbp-A0h] BYREF _BYTE v34[8]; // [rsp+110h] [rbp-98h] BYREF _BYTE v35[8]; // [rsp+118h] [rbp-90h] BYREF _BYTE v36[8]; // [rsp+120h] [rbp-88h] BYREF _BYTE v37[8]; // [rsp+128h] [rbp-80h] BYREF _BYTE v38[8]; // [rsp+130h] [rbp-78h] BYREF _BYTE v39[8]; // [rsp+138h] [rbp-70h] BYREF _BYTE v40[8]; // [rsp+140h] [rbp-68h] BYREF _BYTE v41[8]; // [rsp+148h] [rbp-60h] BYREF _BYTE *v42; // [rsp+150h] [rbp-58h] long long v43; // [rsp+158h] [rbp-50h] _BYTE v44[56]; // [rsp+160h] [rbp-48h] BYREF long long v45; // [rsp+198h] [rbp-10h] long long v46; // [rsp+1A0h] [rbp-8h] v46 = a1; v45 = a2; v32 = common_sampler_type_to_chr(1); v31 = 1; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v33, &v32, &v31); v30 = common_sampler_type_to_chr(2); v29 = 2; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v34, &v30, &v29); v28 = common_sampler_type_to_chr(6); v27 = 6; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v35, &v28, &v27); v26 = common_sampler_type_to_chr(3); v25 = 3; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v36, &v26, &v25); v24 = common_sampler_type_to_chr(4); v23 = 4; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v37, &v24, &v23); v22 = common_sampler_type_to_chr(7); v21 = 7; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v38, &v22, &v21); v20 = common_sampler_type_to_chr(8); v19 = 8; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v39, &v20, &v19); v18 = common_sampler_type_to_chr(9); v17 = 9; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v40, &v18, &v17); v16 = common_sampler_type_to_chr(10); v15 = 10; ZNSt4pairIKc19common_sampler_typeEC2IcS1_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS5_S6_EEEbE4typeELb1EEEOS5_OS6_( v41, &v16, &v15); v42 = v33; v43 = 9LL; std::allocator<std::pair<char const,common_sampler_type>>::allocator(); std::unordered_map<char,common_sampler_type>::unordered_map( (unsigned int)v44, (_DWORD)v42, v43, 0, (unsigned int)&v14, (unsigned int)&v13, (long long)&v12); std::allocator<std::pair<char const,common_sampler_type>>::~allocator(&v12); v11 = 0; std::vector<common_sampler_type>::vector(a1); v2 = std::string::size(v45); std::vector<common_sampler_type>::reserve(a1, v2); v10 = v45; v9 = std::string::begin(v45); v8 = std::string::end(v10); while ( __gnu_cxx::operator!=<char const*,std::string>((long long)&v9, (long long)&v8) ) { v7 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator*((long long)&v9); v6 = std::unordered_map<char,common_sampler_type>::find(v44, v7); v5 = std::unordered_map<char,common_sampler_type>::end(v44); if ( (std::__detail::operator!=(&v6, &v5) & 1) != 0 ) { v3 = std::__detail::_Node_iterator<std::pair<char const,common_sampler_type>,false,false>::operator->(&v6); std::vector<common_sampler_type>::push_back(a1, v3 + 4); } __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(&v9); } v11 = 1; std::unordered_map<char,common_sampler_type>::~unordered_map(v44); return a1; }
13,848
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/sampling.cpp
std::vector<common_sampler_type> common_sampler_types_from_chars(const std::string & chars) { std::unordered_map<char, common_sampler_type> sampler_name_map = { { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_DRY), COMMON_SAMPLER_TYPE_DRY }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_K), COMMON_SAMPLER_TYPE_TOP_K }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TYPICAL_P), COMMON_SAMPLER_TYPE_TYPICAL_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TOP_P), COMMON_SAMPLER_TYPE_TOP_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_MIN_P), COMMON_SAMPLER_TYPE_MIN_P }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_TEMPERATURE), COMMON_SAMPLER_TYPE_TEMPERATURE }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_XTC), COMMON_SAMPLER_TYPE_XTC }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_INFILL), COMMON_SAMPLER_TYPE_INFILL }, { common_sampler_type_to_chr(COMMON_SAMPLER_TYPE_PENALTIES), COMMON_SAMPLER_TYPE_PENALTIES }, }; std::vector<common_sampler_type> samplers; samplers.reserve(chars.size()); for (const auto & c : chars) { const auto sampler = sampler_name_map.find(c); if (sampler != sampler_name_map.end()) { samplers.push_back(sampler->second); } } return samplers; }
O3
cpp
common_sampler_types_from_chars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x98(%rsp), %rdx movb $0x64, -0x48(%rdx) movl $0x1, -0x44(%rdx) movb $0x6b, -0x40(%rdx) movl $0x2, -0x3c(%rdx) movb $0x79, -0x38(%rdx) movl $0x6, -0x34(%rdx) movb $0x70, -0x30(%rdx) movl $0x3, -0x2c(%rdx) movb $0x6d, -0x28(%rdx) movl $0x4, -0x24(%rdx) movb $0x74, -0x20(%rdx) movl $0x7, -0x1c(%rdx) movb $0x78, -0x18(%rdx) movl $0x8, -0x14(%rdx) movb $0x69, -0x10(%rdx) movl $0x9, -0xc(%rdx) movb $0x65, -0x8(%rdx) movl $0xa, -0x4(%rdx) leaq 0x15(%rsp), %rax movq %rax, (%rsp) leaq 0x18(%rsp), %rdi leaq 0x50(%rsp), %rsi leaq 0x17(%rsp), %r8 leaq 0x16(%rsp), %r9 xorl %ecx, %ecx callq 0xdcf80 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq 0x8(%r14), %rsi movq %rbx, %rdi callq 0xdc44a movq 0x8(%r14), %r12 testq %r12, %r12 je 0xdc101 movq (%r14), %r14 leaq 0x18(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0xdd312 testq %rax, %rax je 0xdc0f9 addq $0xc, %rax movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0xdc0ee movl (%rax), %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0xdc0f9 movq %rbx, %rdi movq %rax, %rdx callq 0xdce60 incq %r14 decq %r12 jne 0xdc0c2 leaq 0x18(%rsp), %rdi callq 0xdc7b6 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xdc11f movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0xdc136 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x1b8f0 leaq 0x18(%rsp), %rdi callq 0xdc7b6 movq %r14, %rdi callq 0x1c020
_Z31common_sampler_types_from_charsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx sub rsp, 98h mov r14, rsi mov rbx, rdi lea rdx, [rsp+0B8h+var_20] mov byte ptr [rdx-48h], 64h ; 'd' mov dword ptr [rdx-44h], 1 mov byte ptr [rdx-40h], 6Bh ; 'k' mov dword ptr [rdx-3Ch], 2 mov byte ptr [rdx-38h], 79h ; 'y' mov dword ptr [rdx-34h], 6 mov byte ptr [rdx-30h], 70h ; 'p' mov dword ptr [rdx-2Ch], 3 mov byte ptr [rdx-28h], 6Dh ; 'm' mov dword ptr [rdx-24h], 4 mov byte ptr [rdx-20h], 74h ; 't' mov dword ptr [rdx-1Ch], 7 mov byte ptr [rdx-18h], 78h ; 'x' mov dword ptr [rdx-14h], 8 mov byte ptr [rdx-10h], 69h ; 'i' mov dword ptr [rdx-0Ch], 9 mov byte ptr [rdx-8], 65h ; 'e' mov dword ptr [rdx-4], 0Ah lea rax, [rsp+0B8h+var_A3] mov [rsp+0B8h+var_B8], rax lea rdi, [rsp+0B8h+var_A0] lea rsi, [rsp+0B8h+var_68] lea r8, [rsp+0B8h+var_A1] lea r9, [rsp+0B8h+var_A2] xor ecx, ecx call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEEC2IPKS3_EET_SK_mRKSA_RKS8_RKS4_St17integral_constantIbLb1EE; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>(std::pair<char const,common_sampler_type> const*,std::pair<char const,common_sampler_type> const*,ulong,std::hash<char> const&,std::equal_to<char> const&,std::allocator<std::pair<char const,common_sampler_type>> const&,std::integral_constant<bool,true>) xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, [r14+8] mov rdi, rbx call _ZNSt6vectorI19common_sampler_typeSaIS0_EE7reserveEm; std::vector<common_sampler_type>::reserve(ulong) mov r12, [r14+8] test r12, r12 jz short loc_DC101 mov r14, [r14] lea r15, [rsp+0B8h+var_A0] loc_DC0C2: mov rdi, r15 mov rsi, r14 call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(char const&) test rax, rax jz short loc_DC0F9 add rax, 0Ch mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_DC0EE mov eax, [rax] mov [rsi], eax add rsi, 4 mov [rbx+8], rsi jmp short loc_DC0F9 loc_DC0EE: mov rdi, rbx mov rdx, rax call _ZNSt6vectorI19common_sampler_typeSaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(__gnu_cxx::__normal_iterator<common_sampler_type*,std::vector<common_sampler_type>>,common_sampler_type const&) loc_DC0F9: inc r14 dec r12 jnz short loc_DC0C2 loc_DC101: lea rdi, [rsp+0B8h+var_A0] call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rax, rbx add rsp, 98h pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_DC11F: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_DC136 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DC136: lea rdi, [rsp+arg_10] call _ZNSt10_HashtableIcSt4pairIKc19common_sampler_typeESaIS3_ENSt8__detail10_Select1stESt8equal_toIcESt4hashIcENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov rdi, r14 call __Unwind_Resume
long long common_sampler_types_from_chars(long long a1, long long *a2) { long long v2; // r12 long long v3; // r14 long long v4; // rax _DWORD *v5; // rax _DWORD *v6; // rsi char v8; // [rsp+15h] [rbp-A3h] BYREF char v9; // [rsp+16h] [rbp-A2h] BYREF char v10; // [rsp+17h] [rbp-A1h] BYREF _BYTE v11[56]; // [rsp+18h] [rbp-A0h] BYREF char v12; // [rsp+50h] [rbp-68h] BYREF int v13; // [rsp+54h] [rbp-64h] char v14; // [rsp+58h] [rbp-60h] int v15; // [rsp+5Ch] [rbp-5Ch] char v16; // [rsp+60h] [rbp-58h] int v17; // [rsp+64h] [rbp-54h] char v18; // [rsp+68h] [rbp-50h] int v19; // [rsp+6Ch] [rbp-4Ch] char v20; // [rsp+70h] [rbp-48h] int v21; // [rsp+74h] [rbp-44h] char v22; // [rsp+78h] [rbp-40h] int v23; // [rsp+7Ch] [rbp-3Ch] char v24; // [rsp+80h] [rbp-38h] int v25; // [rsp+84h] [rbp-34h] char v26; // [rsp+88h] [rbp-30h] int v27; // [rsp+8Ch] [rbp-2Ch] char v28; // [rsp+90h] [rbp-28h] int v29; // [rsp+94h] [rbp-24h] char v30; // [rsp+98h] [rbp-20h] BYREF v12 = 100; v13 = 1; v14 = 107; v15 = 2; v16 = 121; v17 = 6; v18 = 112; v19 = 3; v20 = 109; v21 = 4; v22 = 116; v23 = 7; v24 = 120; v25 = 8; v26 = 105; v27 = 9; v28 = 101; v29 = 10; std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable<std::pair<char const,common_sampler_type> const*>( (unsigned int)v11, (unsigned int)&v12, (unsigned int)&v30, 0, (unsigned int)&v10, (unsigned int)&v9, (long long)&v8); *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::vector<common_sampler_type>::reserve(a1, a2[1]); v2 = a2[1]; if ( v2 ) { v3 = *a2; do { v4 = std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v11, v3); if ( v4 ) { v5 = (_DWORD *)(v4 + 12); v6 = *(_DWORD **)(a1 + 8); if ( v6 == *(_DWORD **)(a1 + 16) ) { std::vector<common_sampler_type>::_M_realloc_insert<common_sampler_type const&>(a1, v6, v5); } else { *v6 = *v5; *(_QWORD *)(a1 + 8) = v6 + 1; } } ++v3; --v2; } while ( v2 ); } std::_Hashtable<char,std::pair<char const,common_sampler_type>,std::allocator<std::pair<char const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(v11); return a1; }
common_sampler_types_from_chars: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RBX,RDI LEA RDX,[RSP + 0x98] MOV byte ptr [RDX + -0x48],0x64 MOV dword ptr [RDX + -0x44],0x1 MOV byte ptr [RDX + -0x40],0x6b MOV dword ptr [RDX + -0x3c],0x2 MOV byte ptr [RDX + -0x38],0x79 MOV dword ptr [RDX + -0x34],0x6 MOV byte ptr [RDX + -0x30],0x70 MOV dword ptr [RDX + -0x2c],0x3 MOV byte ptr [RDX + -0x28],0x6d MOV dword ptr [RDX + -0x24],0x4 MOV byte ptr [RDX + -0x20],0x74 MOV dword ptr [RDX + -0x1c],0x7 MOV byte ptr [RDX + -0x18],0x78 MOV dword ptr [RDX + -0x14],0x8 MOV byte ptr [RDX + -0x10],0x69 MOV dword ptr [RDX + -0xc],0x9 MOV byte ptr [RDX + -0x8],0x65 MOV dword ptr [RDX + -0x4],0xa LEA RAX,[RSP + 0x15] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x18] LEA RSI,[RSP + 0x50] LEA R8,[RSP + 0x17] LEA R9,[RSP + 0x16] XOR ECX,ECX CALL 0x001dcf80 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [R14 + 0x8] LAB_001dc0a9: MOV RDI,RBX CALL 0x001dc44a MOV R12,qword ptr [R14 + 0x8] TEST R12,R12 JZ 0x001dc101 MOV R14,qword ptr [R14] LEA R15,[RSP + 0x18] LAB_001dc0c2: MOV RDI,R15 MOV RSI,R14 CALL 0x001dd312 TEST RAX,RAX JZ 0x001dc0f9 ADD RAX,0xc MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x001dc0ee MOV EAX,dword ptr [RAX] MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x001dc0f9 LAB_001dc0ee: MOV RDI,RBX MOV RDX,RAX CALL 0x001dce60 LAB_001dc0f9: INC R14 DEC R12 JNZ 0x001dc0c2 LAB_001dc101: LEA RDI,[RSP + 0x18] CALL 0x001dc7b6 MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R14 POP R15 RET
/* common_sampler_types_from_chars(std::__cxx11::string const&) */ string * common_sampler_types_from_chars(string *param_1) { int4 *puVar1; long lVar2; int8 *in_RSI; long lVar3; char *pcVar4; int1 local_a3; int1 local_a2; int1 local_a1; _Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> local_a0 [56]; int1 local_68 [4]; int4 local_64; int1 local_60; int4 local_5c; int1 local_58; int4 local_54; int1 local_50; int4 local_4c; int1 local_48; int4 local_44; int1 local_40; int4 local_3c; int1 local_38; int4 local_34; int1 local_30; int4 local_2c; int1 local_28; int4 local_24; local_68[0] = 100; local_64 = 1; local_60 = 0x6b; local_5c = 2; local_58 = 0x79; local_54 = 6; local_50 = 0x70; local_4c = 3; local_48 = 0x6d; local_44 = 4; local_40 = 0x74; local_3c = 7; local_38 = 0x78; local_34 = 8; local_30 = 0x69; local_2c = 9; local_28 = 0x65; local_24 = 10; std:: _Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::_Hashtable<std::pair<char_const,common_sampler_type>const*> (local_a0,local_68,&stack0xffffffffffffffe0,0,&local_a1,&local_a2,&local_a3); *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; /* try { // try from 001dc0a9 to 001dc0b0 has its CatchHandler @ 001dc11d */ std::vector<common_sampler_type,std::allocator<common_sampler_type>>::reserve ((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1,in_RSI[1]); lVar3 = in_RSI[1]; if (lVar3 != 0) { pcVar4 = (char *)*in_RSI; do { /* try { // try from 001dc0c2 to 001dc0f8 has its CatchHandler @ 001dc11f */ lVar2 = std:: _Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find(local_a0,pcVar4); if (lVar2 != 0) { puVar1 = *(int4 **)(param_1 + 8); if (puVar1 == *(int4 **)(param_1 + 0x10)) { std::vector<common_sampler_type,std::allocator<common_sampler_type>>:: _M_realloc_insert<common_sampler_type_const&> ((vector<common_sampler_type,std::allocator<common_sampler_type>> *)param_1, puVar1,(int4 *)(lVar2 + 0xc)); } else { *puVar1 = *(int4 *)(lVar2 + 0xc); *(int4 **)(param_1 + 8) = puVar1 + 1; } } pcVar4 = pcVar4 + 1; lVar3 = lVar3 + -1; } while (lVar3 != 0); } std:: _Hashtable<char,std::pair<char_const,common_sampler_type>,std::allocator<std::pair<char_const,common_sampler_type>>,std::__detail::_Select1st,std::equal_to<char>,std::hash<char>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable(local_a0); return param_1; }
13,849
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O0
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24450 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rdi callq 0x241e0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 1 mov [rax+58h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124450 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,0x1 MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001241e0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
13,850
VoxelInfoBuilder::add_texture(voxel_face, char const*)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &VoxelInfoBuilder::add_texture(voxel_face face, const char *texture) { const auto index = static_cast<std::size_t>(face); prototype.textures[index].paths.push_back(texture); return *this; }
O1
cpp
VoxelInfoBuilder::add_texture(voxel_face, char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movl %esi, %eax leaq (%rax,%rax,4), %r14 shll $0x3, %r14d addq 0x58(%rdi), %r14 leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rax movq %r15, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x1ccb6 movq %r14, %rdi movq %r15, %rsi callq 0x47e06 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4bcfe movq 0x20(%rsp), %rsi incq %rsi callq 0x176b0 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4bd29 movq 0x20(%rsp), %rsi incq %rsi callq 0x176b0 movq %rbx, %rdi callq 0x17c80 nop
_ZN16VoxelInfoBuilder11add_textureE10voxel_facePKc: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov eax, esi lea r14, [rax+rax*4] shl r14d, 3 add r14, [rdi+58h] lea r15, [rsp+48h+var_38] lea rax, [rsp+48h+var_39] mov rdi, r15 mov rsi, rdx mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4BCFE mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4BCFE: mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4BD29 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4BD29: mov rdi, rbx call __Unwind_Resume
long long VoxelInfoBuilder::add_texture(long long a1, int a2, long long a3) { long long v3; // r14 void *v5[2]; // [rsp+10h] [rbp-38h] BYREF long long v6; // [rsp+20h] [rbp-28h] BYREF v3 = *(_QWORD *)(a1 + 88) + (unsigned int)(40 * a2); std::string::basic_string<std::allocator<char>>(v5, a3); std::vector<std::string>::emplace_back<std::string>(v3, (long long)v5); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); return a1; }
add_texture: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV EAX,ESI LEA R14,[RAX + RAX*0x4] SHL R14D,0x3 ADD R14,qword ptr [RDI + 0x58] LEA R15,[RSP + 0x10] LEA RAX,[RSP + 0xf] MOV RDI,R15 MOV RSI,RDX MOV RDX,RAX CALL 0x0011ccb6 LAB_0014bcd8: MOV RDI,R14 MOV RSI,R15 CALL 0x00147e06 LAB_0014bce3: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014bcfe MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001176b0 LAB_0014bcfe: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* VoxelInfoBuilder::add_texture(voxel_face, char const*) */ VoxelInfoBuilder * __thiscall VoxelInfoBuilder::add_texture(VoxelInfoBuilder *this,int param_2,char *param_3) { long lVar1; allocator local_39; long *local_38 [2]; long local_28 [2]; lVar1 = *(long *)(this + 0x58); std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_3,&local_39); /* try { // try from 0014bcd8 to 0014bce2 has its CatchHandler @ 0014bd0b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) ((ulong)(uint)(param_2 * 0x28) + lVar1),(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return this; }
13,851
VoxelInfoBuilder::add_texture(voxel_face, char const*)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &VoxelInfoBuilder::add_texture(voxel_face face, const char *texture) { const auto index = static_cast<std::size_t>(face); prototype.textures[index].paths.push_back(texture); return *this; }
O2
cpp
VoxelInfoBuilder::add_texture(voxel_face, char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movl %esi, %eax imulq $0x28, %rax, %r14 addq 0x58(%rdi), %r14 leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rax movq %r15, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x190fa movq %r14, %rdi movq %r15, %rsi callq 0x44cca leaq 0x10(%rsp), %rdi callq 0x17ec8 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x17ec8 movq %rbx, %rdi callq 0x17cd0 nop
_ZN16VoxelInfoBuilder11add_textureE10voxel_facePKc: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov eax, esi imul r14, rax, 28h ; '(' add r14, [rdi+58h] lea r15, [rsp+48h+var_38] lea rax, [rsp+48h+var_39] mov rdi, r15 mov rsi, rdx mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long VoxelInfoBuilder::add_texture(long long a1, unsigned int a2, long long a3) { long long v3; // r14 _QWORD v5[7]; // [rsp+10h] [rbp-38h] BYREF v3 = *(_QWORD *)(a1 + 88) + 40LL * a2; std::string::basic_string<std::allocator<char>>(v5, a3); std::vector<std::string>::emplace_back<std::string>(v3, (long long)v5); std::string::~string(v5); return a1; }
add_texture: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV EAX,ESI IMUL R14,RAX,0x28 ADD R14,qword ptr [RDI + 0x58] LEA R15,[RSP + 0x10] LEA RAX,[RSP + 0xf] MOV RDI,R15 MOV RSI,RDX MOV RDX,RAX CALL 0x001190fa LAB_00148e4a: MOV RDI,R14 MOV RSI,R15 CALL 0x00144cca LAB_00148e55: LEA RDI,[RSP + 0x10] CALL 0x00117ec8 MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* VoxelInfoBuilder::add_texture(voxel_face, char const*) */ VoxelInfoBuilder * __thiscall VoxelInfoBuilder::add_texture(VoxelInfoBuilder *this,ulong param_2,char *param_3) { long lVar1; allocator local_39; string local_38 [32]; lVar1 = *(long *)(this + 0x58); std::__cxx11::string::string<std::allocator<char>>(local_38,param_3,&local_39); /* try { // try from 00148e4a to 00148e54 has its CatchHandler @ 00148e6c */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) ((param_2 & 0xffffffff) * 0x28 + lVar1),local_38); std::__cxx11::string::~string(local_38); return this; }
13,852
VoxelInfoBuilder::add_texture(voxel_face, char const*)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &VoxelInfoBuilder::add_texture(voxel_face face, const char *texture) { const auto index = static_cast<std::size_t>(face); prototype.textures[index].paths.push_back(texture); return *this; }
O3
cpp
VoxelInfoBuilder::add_texture(voxel_face, char const*): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movl %esi, %eax leaq (%rax,%rax,4), %r14 shll $0x3, %r14d addq 0x58(%rdi), %r14 leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rax movq %r15, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x1b480 movq %r14, %rdi movq %r15, %rsi callq 0x471f2 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4af76 movq 0x20(%rsp), %rsi incq %rsi callq 0x166c0 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4afa1 movq 0x20(%rsp), %rsi incq %rsi callq 0x166c0 movq %rbx, %rdi callq 0x16c90 nop
_ZN16VoxelInfoBuilder11add_textureE10voxel_facePKc: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov eax, esi lea r14, [rax+rax*4] shl r14d, 3 add r14, [rdi+58h] lea r15, [rsp+48h+var_38] lea rax, [rsp+48h+var_39] mov rdi, r15 mov rsi, rdx mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4AF76 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AF76: mov rax, rbx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4AFA1 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4AFA1: mov rdi, rbx call __Unwind_Resume
long long VoxelInfoBuilder::add_texture(long long a1, int a2, long long a3) { long long v3; // r14 void *v5[2]; // [rsp+10h] [rbp-38h] BYREF long long v6; // [rsp+20h] [rbp-28h] BYREF v3 = *(_QWORD *)(a1 + 88) + (unsigned int)(40 * a2); std::string::basic_string<std::allocator<char>>(v5, a3); std::vector<std::string>::emplace_back<std::string>(v3, (long long)v5); if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); return a1; }
add_texture: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV EAX,ESI LEA R14,[RAX + RAX*0x4] SHL R14D,0x3 ADD R14,qword ptr [RDI + 0x58] LEA R15,[RSP + 0x10] LEA RAX,[RSP + 0xf] MOV RDI,R15 MOV RSI,RDX MOV RDX,RAX CALL 0x0011b480 LAB_0014af50: MOV RDI,R14 MOV RSI,R15 CALL 0x001471f2 LAB_0014af5b: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0014af76 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001166c0 LAB_0014af76: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* VoxelInfoBuilder::add_texture(voxel_face, char const*) */ VoxelInfoBuilder * __thiscall VoxelInfoBuilder::add_texture(VoxelInfoBuilder *this,int param_2,char *param_3) { long lVar1; allocator local_39; long *local_38 [2]; long local_28 [2]; lVar1 = *(long *)(this + 0x58); std::__cxx11::string::string<std::allocator<char>>((string *)local_38,param_3,&local_39); /* try { // try from 0014af50 to 0014af5a has its CatchHandler @ 0014af83 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) ((ulong)(uint)(param_2 * 0x28) + lVar1),(string *)local_38); if (local_38[0] != local_28) { operator_delete(local_38[0],local_28[0] + 1); } return this; }
13,853
coro::io_scheduler::process_scheduled_execute_inline()
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
auto io_scheduler::process_scheduled_execute_inline() -> void { std::vector<std::coroutine_handle<>> tasks{}; { // Acquire the entire list, and then reset it. std::scoped_lock lk{m_scheduled_tasks_mutex}; tasks.swap(m_scheduled_tasks); // Clear the schedule eventfd if this is a scheduled task. eventfd_t value{0}; eventfd_read(m_schedule_fd, &value); // Clear the in memory flag to reduce eventfd_* calls on scheduling. m_schedule_fd_triggered.exchange(false, std::memory_order::release); } // This set of handles can be safely resumed now since they do not have a corresponding timeout event. for (auto& task : tasks) { task.resume(); } m_size.fetch_sub(tasks.size(), std::memory_order::release); }
O3
cpp
coro::io_scheduler::process_scheduled_execute_inline(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 leaq 0x138(%rdi), %r12 movq %r12, %rdi callq 0x17370 testl %eax, %eax jne 0xca5de movq 0x160(%r15), %rbx movq 0x168(%r15), %r13 movq 0x170(%r15), %r14 xorps %xmm0, %xmm0 movups %xmm0, 0x160(%r15) xorl %eax, %eax movq %rax, 0x170(%r15) leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movl 0xb4(%r15), %edi callq 0x17310 xorl %eax, %eax xchgb %al, 0xb8(%r15) movq %r12, %rdi callq 0x17300 cmpq %r13, %rbx je 0xca5ae movq %rbx, %r12 movq (%r12), %rdi callq *(%rdi) addq $0x8, %r12 cmpq %r13, %r12 jne 0xca59f subq %rbx, %r13 sarq $0x3, %r13 lock subq %r13, 0xc0(%r15) testq %rbx, %rbx je 0xca5d0 subq %rbx, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x17150 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x174d0 movq %rax, %r15 movq %r12, %rdi callq 0x17300 jmp 0xca5f5 movq %rax, %r15 testq %rbx, %rbx je 0xca608 subq %rbx, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x17150 movq %r15, %rdi callq 0x17740
_ZN4coro12io_scheduler32process_scheduled_execute_inlineEv: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r15, rdi lea r12, [rdi+138h] mov rdi, r12 call _pthread_mutex_lock test eax, eax jnz loc_CA5DE mov rbx, [r15+160h] mov r13, [r15+168h] mov r14, [r15+170h] xorps xmm0, xmm0 movups xmmword ptr [r15+160h], xmm0 xor eax, eax mov [r15+170h], rax lea rsi, [rsp+38h+var_30] mov [rsi], rax mov edi, [r15+0B4h] call _eventfd_read xor eax, eax xchg al, [r15+0B8h] mov rdi, r12 call _pthread_mutex_unlock cmp rbx, r13 jz short loc_CA5AE mov r12, rbx loc_CA59F: mov rdi, [r12] call qword ptr [rdi] add r12, 8 cmp r12, r13 jnz short loc_CA59F loc_CA5AE: sub r13, rbx sar r13, 3 lock sub [r15+0C0h], r13 test rbx, rbx jz short loc_CA5D0 sub r14, rbx mov rdi, rbx; void * mov rsi, r14; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CA5D0: add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_CA5DE: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov r15, rax mov rdi, r12 call _pthread_mutex_unlock jmp short loc_CA5F5 mov r15, rax loc_CA5F5: test rbx, rbx jz short loc_CA608 sub r14, rbx mov rdi, rbx; void * mov rsi, r14; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CA608: mov rdi, r15 call __Unwind_Resume
void coro::io_scheduler::process_scheduled_execute_inline(coro::io_scheduler *this) { int v1; // eax void (***v2)(void); // rbx void (***v3)(void); // r13 long long v4; // r14 void (***v5)(void); // r12 _QWORD v6[6]; // [rsp+8h] [rbp-30h] BYREF v1 = pthread_mutex_lock((char *)this + 312); if ( v1 ) std::__throw_system_error(v1); v2 = (void (***)(void))*((_QWORD *)this + 44); v3 = (void (***)(void))*((_QWORD *)this + 45); v4 = *((_QWORD *)this + 46); *((_OWORD *)this + 22) = 0LL; *((_QWORD *)this + 46) = 0LL; v6[0] = 0LL; eventfd_read(*((unsigned int *)this + 45), v6); *((_BYTE *)this + 184) = 0; pthread_mutex_unlock((char *)this + 312); if ( v2 != v3 ) { v5 = v2; do (**v5++)(); while ( v5 != v3 ); } _InterlockedSub64((volatile signed long long *)this + 24, v3 - v2); if ( v2 ) operator delete(v2, v4 - (_QWORD)v2); }
process_scheduled_execute_inline: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RDI LEA R12,[RDI + 0x138] MOV RDI,R12 CALL 0x00117370 TEST EAX,EAX JNZ 0x001ca5de MOV RBX,qword ptr [R15 + 0x160] MOV R13,qword ptr [R15 + 0x168] MOV R14,qword ptr [R15 + 0x170] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x160],XMM0 XOR EAX,EAX MOV qword ptr [R15 + 0x170],RAX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX MOV EDI,dword ptr [R15 + 0xb4] LAB_001ca581: CALL 0x00117310 XOR EAX,EAX XCHG byte ptr [R15 + 0xb8],AL MOV RDI,R12 CALL 0x00117300 CMP RBX,R13 JZ 0x001ca5ae MOV R12,RBX LAB_001ca59f: MOV RDI,qword ptr [R12] LAB_001ca5a3: CALL qword ptr [RDI] LAB_001ca5a5: ADD R12,0x8 CMP R12,R13 JNZ 0x001ca59f LAB_001ca5ae: SUB R13,RBX SAR R13,0x3 SUB.LOCK qword ptr [R15 + 0xc0],R13 TEST RBX,RBX JZ 0x001ca5d0 SUB R14,RBX MOV RDI,RBX MOV RSI,R14 CALL 0x00117150 LAB_001ca5d0: ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001ca5de: MOV EDI,EAX CALL 0x001174d0 LAB_001ca5e5: MOV R15,RAX MOV RDI,R12 CALL 0x00117300 JMP 0x001ca5f5 LAB_001ca5f5: TEST RBX,RBX JZ 0x001ca608 SUB R14,RBX MOV RDI,RBX MOV RSI,R14 CALL 0x00117150 LAB_001ca608: MOV RDI,R15 CALL 0x00117740
/* coro::io_scheduler::process_scheduled_execute_inline() */ void __thiscall coro::io_scheduler::process_scheduled_execute_inline(io_scheduler *this) { pthread_mutex_t *__mutex; int8 *puVar1; int8 *puVar2; long lVar3; int iVar4; int8 uVar5; void *unaff_RBX; int8 *puVar6; long unaff_R14; eventfd_t local_30; __mutex = (pthread_mutex_t *)(this + 0x138); iVar4 = pthread_mutex_lock(__mutex); if (iVar4 == 0) { puVar1 = *(int8 **)(this + 0x160); puVar2 = *(int8 **)(this + 0x168); lVar3 = *(long *)(this + 0x170); *(int8 *)(this + 0x160) = 0; *(int8 *)(this + 0x168) = 0; *(int8 *)(this + 0x170) = 0; local_30 = 0; /* try { // try from 001ca581 to 001ca585 has its CatchHandler @ 001ca5e5 */ eventfd_read(*(int *)(this + 0xb4),&local_30); LOCK(); this[0xb8] = (io_scheduler)0x0; UNLOCK(); pthread_mutex_unlock(__mutex); for (puVar6 = puVar1; puVar6 != puVar2; puVar6 = puVar6 + 1) { /* try { // try from 001ca5a3 to 001ca5a4 has its CatchHandler @ 001ca5f2 */ (**(code **)*puVar6)(); } LOCK(); *(long *)(this + 0xc0) = *(long *)(this + 0xc0) - ((long)puVar2 - (long)puVar1 >> 3); UNLOCK(); if (puVar1 != (int8 *)0x0) { operator_delete(puVar1,lVar3 - (long)puVar1); } return; } uVar5 = std::__throw_system_error(iVar4); /* catch() { ... } // from try @ 001ca581 with catch @ 001ca5e5 */ pthread_mutex_unlock(__mutex); if (unaff_RBX != (void *)0x0) { operator_delete(unaff_RBX,unaff_R14 - (long)unaff_RBX); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar5); }
13,854
list_add
eloqsql/libmariadb/libmariadb/ma_list.c
LIST *list_add(LIST *root, LIST *element) { if (root) { if (root->prev) /* If add in mid of list */ root->prev->next= element; element->prev=root->prev; root->prev=element; } else element->prev=0; element->next=root; return(element); /* New root */ }
O0
c
list_add: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x8(%rbp) je 0x28887 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x2886c movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) jmp 0x28892 movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
list_add: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_8], 0 jz short loc_28887 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_2886C mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx loc_2886C: mov rax, [rbp+var_8] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx jmp short loc_28892 loc_28887: mov rax, [rbp+var_10] mov qword ptr [rax], 0 loc_28892: mov rcx, [rbp+var_8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] pop rbp retn
_QWORD * list_add(long long a1, _QWORD *a2) { if ( a1 ) { if ( *(_QWORD *)a1 ) *(_QWORD *)(*(_QWORD *)a1 + 8LL) = a2; *a2 = *(_QWORD *)a1; *(_QWORD *)a1 = a2; } else { *a2 = 0LL; } a2[1] = a1; return a2; }
list_add: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x8],0x0 JZ 0x00128887 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0012886c MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_0012886c: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX JMP 0x00128892 LAB_00128887: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 LAB_00128892: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
long * list_add(long *param_1,long *param_2) { if (param_1 == (long *)0x0) { *param_2 = 0; } else { if (*param_1 != 0) { *(long **)(*param_1 + 8) = param_2; } *param_2 = *param_1; *param_1 = (long)param_2; } param_2[1] = (long)param_1; return param_2; }
13,855
testing::internal::HasGoogleTestFlagPrefix(char const*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
static bool HasGoogleTestFlagPrefix(const char* str) { return (SkipPrefix("--", &str) || SkipPrefix("-", &str) || SkipPrefix("/", &str)) && !SkipPrefix(GTEST_FLAG_PREFIX_ "internal_", &str) && (SkipPrefix(GTEST_FLAG_PREFIX_, &str) || SkipPrefix(GTEST_FLAG_PREFIX_DASH_, &str)); }
O0
cpp
testing::internal::HasGoogleTestFlagPrefix(char const*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) leaq 0x30ecc(%rip), %rdi # 0x75a0c leaq 0x10(%rsp), %rsi callq 0x3e680 testb $0x1, %al jne 0x44b83 leaq 0x30eb8(%rip), %rdi # 0x75a0d leaq 0x10(%rsp), %rsi callq 0x3e680 testb $0x1, %al jne 0x44b83 leaq 0x30a19(%rip), %rdi # 0x75583 leaq 0x10(%rsp), %rsi callq 0x3e680 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0x44b83 jmp 0x44bdc leaq 0x31d6b(%rip), %rdi # 0x768f5 leaq 0x10(%rsp), %rsi callq 0x3e680 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0x44bdc leaq 0x2f62a(%rip), %rdi # 0x741d2 leaq 0x10(%rsp), %rsi callq 0x3e680 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, 0xe(%rsp) jne 0x44bd4 leaq 0x31d3f(%rip), %rdi # 0x76905 leaq 0x10(%rsp), %rsi callq 0x3e680 movb %al, 0xe(%rsp) movb 0xe(%rsp), %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq nopw (%rax,%rax)
_ZN7testing8internalL23HasGoogleTestFlagPrefixEPKc: sub rsp, 18h mov qword ptr [rsp+18h+var_8], rdi lea rdi, aTheValueOfFlag+12h; this lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) test al, 1 jnz short loc_44B83 lea rdi, aTheValueOfFlag+13h; this lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) test al, 1 jnz short loc_44B83 lea rdi, asc_7557C+7; this lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) mov cl, al xor eax, eax test cl, 1 mov [rsp+18h+var_9], al jnz short loc_44B83 jmp short loc_44BDC loc_44B83: lea rdi, aGtestInternal; "gtest_internal_" lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) mov cl, al xor eax, eax test cl, 1 mov [rsp+18h+var_9], al jnz short loc_44BDC lea rdi, aGtest; "gtest_" lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) mov cl, al mov al, 1 test cl, 1 mov [rsp+18h+var_A], al jnz short loc_44BD4 lea rdi, aGtest_0; "gtest-" lea rsi, [rsp+18h+var_8]; char * call _ZN7testing8internal10SkipPrefixEPKcPS2_; testing::internal::SkipPrefix(char const*,char const**) mov [rsp+18h+var_A], al loc_44BD4: mov al, [rsp+18h+var_A] mov [rsp+18h+var_9], al loc_44BDC: mov al, [rsp+18h+var_9] and al, 1 add rsp, 18h retn
char testing::internal::HasGoogleTestFlagPrefix(testing::internal *this, const char *a2, const char **a3) { const char **v3; // rdx const char **v4; // rdx const char **v5; // rdx char v7; // [rsp+Eh] [rbp-Ah] char v8; // [rsp+Fh] [rbp-9h] char v9[8]; // [rsp+10h] [rbp-8h] BYREF *(_QWORD *)v9 = this; if ( (testing::internal::SkipPrefix((testing::internal *)"--", v9, a3) & 1) != 0 || (testing::internal::SkipPrefix((testing::internal *)"-", v9, v3) & 1) != 0 || (v8 = 0, (testing::internal::SkipPrefix((testing::internal *)"/", v9, v3) & 1) != 0) ) { v8 = 0; if ( (testing::internal::SkipPrefix((testing::internal *)"gtest_internal_", v9, v3) & 1) == 0 ) { v7 = 1; if ( (testing::internal::SkipPrefix((testing::internal *)"gtest_", v9, v4) & 1) == 0 ) v7 = testing::internal::SkipPrefix((testing::internal *)"gtest-", v9, v5); v8 = v7; } } return v8 & 1; }
HasGoogleTestFlagPrefix: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI LEA RDI,[0x175a0c] LEA RSI,[RSP + 0x10] CALL 0x0013e680 TEST AL,0x1 JNZ 0x00144b83 LEA RDI,[0x175a0d] LEA RSI,[RSP + 0x10] CALL 0x0013e680 TEST AL,0x1 JNZ 0x00144b83 LEA RDI,[0x175583] LEA RSI,[RSP + 0x10] CALL 0x0013e680 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x00144b83 JMP 0x00144bdc LAB_00144b83: LEA RDI,[0x1768f5] LEA RSI,[RSP + 0x10] CALL 0x0013e680 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x00144bdc LEA RDI,[0x1741d2] LEA RSI,[RSP + 0x10] CALL 0x0013e680 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RSP + 0xe],AL JNZ 0x00144bd4 LEA RDI,[0x176905] LEA RSI,[RSP + 0x10] CALL 0x0013e680 MOV byte ptr [RSP + 0xe],AL LAB_00144bd4: MOV AL,byte ptr [RSP + 0xe] MOV byte ptr [RSP + 0xf],AL LAB_00144bdc: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 ADD RSP,0x18 RET
/* testing::internal::HasGoogleTestFlagPrefix(char const*) */ ulong testing::internal::HasGoogleTestFlagPrefix(char *param_1) { int1 extraout_AL; uint uVar1; ulong uVar2; int7 uVar3; int7 extraout_var; int1 local_a; int1 local_9; char *local_8; local_8 = param_1; uVar2 = SkipPrefix("--",&local_8); if (((uVar2 & 1) == 0) && (uVar2 = SkipPrefix("-",&local_8), (uVar2 & 1) == 0)) { uVar1 = SkipPrefix("/",&local_8); uVar3 = 0; local_9 = 0; if ((uVar1 & 1) == 0) goto LAB_00144bdc; } uVar1 = SkipPrefix("gtest_internal_",&local_8); uVar3 = 0; local_9 = 0; if ((uVar1 & 1) == 0) { uVar2 = SkipPrefix("gtest_",&local_8); uVar3 = (int7)(uVar2 >> 8); local_a = 1; if ((uVar2 & 1) == 0) { SkipPrefix("gtest-",&local_8); uVar3 = extraout_var; local_a = extraout_AL; } local_9 = local_a; } LAB_00144bdc: return CONCAT71(uVar3,local_9) & 0xffffffffffffff01; }
13,856
resolve_charset
eloqsql/mysys/charset.c
my_bool resolve_charset(const char *cs_name, CHARSET_INFO *default_cs, CHARSET_INFO **cs, myf flags) { *cs= get_charset_by_csname(cs_name, MY_CS_PRIMARY, flags); if (*cs == NULL) { *cs= default_cs; return TRUE; } return FALSE; }
O3
c
resolve_charset: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0xc0, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq -0xc8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x12f0(%rip), %rax # 0x29f96 movq %rax, 0x80(%rdi) leaq -0x12ef(%rip), %rax # 0x29fa5 movq %rax, 0x88(%rdi) leaq -0x12e2(%rip), %rax # 0x29fc0 movq %rax, 0x90(%rdi) leaq -0x2dfa(%rip), %rax # 0x284b6 movq %rax, 0x98(%rdi) leaq 0x2c8812(%rip), %rax # 0x2f3ad0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x12f1(%rip), %rax # 0x29fde movq %rax, 0xa8(%rdi) movl $0x20, %edx callq 0x2b0d8 movq %rax, %rcx testq %rax, %rax sete %al cmovneq %rcx, %r14 movq %r14, (%rbx) movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x2b30b addq $0xc0, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x24370
resolve_charset: push rbp mov rbp, rsp push r14 push rbx sub rsp, 0C0h mov rbx, rdx mov r14, rsi mov rsi, rdi mov rax, fs:28h mov [rbp+var_18], rax lea rdi, [rbp+var_C8] 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 edx, 20h ; ' ' call my_charset_get_by_name mov rcx, rax test rax, rax setz al cmovnz r14, rcx mov [rbx], r14 mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_2B30B add rsp, 0C0h pop rbx pop r14 pop rbp retn loc_2B30B: call ___stack_chk_fail
bool resolve_charset(long long a1, long long a2, long long *a3, long long a4) { long long v6; // rcx bool result; // al char v8[128]; // [rsp+8h] [rbp-C8h] BYREF long long ( *v9)(long long); // [rsp+88h] [rbp-48h] long long ( *v10)(unsigned long long); // [rsp+90h] [rbp-40h] long long ( *v11)(long long, unsigned long long); // [rsp+98h] [rbp-38h] long long ( *v12)(long long); // [rsp+A0h] [rbp-30h] long long ( *v13)(); // [rsp+A8h] [rbp-28h] long long ( *v14)(unsigned int *); // [rsp+B0h] [rbp-20h] unsigned long long v15; // [rsp+B8h] [rbp-18h] v15 = __readfsqword(0x28u); 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; v6 = my_charset_get_by_name((long long)v8, a1, 0x20u, a4); result = v6 == 0; if ( v6 ) a2 = v6; *a3 = a2; return result; }
resolve_charset: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0xc0 MOV RBX,RDX MOV R14,RSI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0xc8] 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 EDX,0x20 CALL 0x0012b0d8 MOV RCX,RAX TEST RAX,RAX SETZ AL CMOVNZ R14,RCX MOV qword ptr [RBX],R14 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0012b30b ADD RSP,0xc0 POP RBX POP R14 POP RBP RET LAB_0012b30b: CALL 0x00124370
bool resolve_charset(int8 param_1,long param_2,long *param_3) { long lVar1; long in_FS_OFFSET; int1 local_d0 [128]; code *local_50; code *local_48; code *local_40; code *local_38; int *local_30; code *local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_d0[0] = 0; local_50 = my_once_alloc_c; local_48 = my_malloc_c; local_40 = my_realloc_c; local_38 = my_free; local_30 = my_charset_error_reporter; local_28 = add_collation; lVar1 = my_charset_get_by_name(local_d0,param_1,0x20); if (lVar1 != 0) { param_2 = lVar1; } *param_3 = param_2; if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return lVar1 == 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,857
r3d_textures_unload
r3d/src/r3d_state.c
void r3d_textures_unload(void) { rlUnloadTexture(R3D.texture.white); rlUnloadTexture(R3D.texture.black); rlUnloadTexture(R3D.texture.normal); rlUnloadTexture(R3D.texture.randNoise); rlUnloadTexture(R3D.texture.iblBrdfLut); if (R3D.texture.ssaoKernel != 0) { rlUnloadTexture(R3D.texture.ssaoKernel); } }
O3
c
r3d_textures_unload: pushq %rbp movq %rsp, %rbp movl 0xf02e3(%rip), %edi # 0x1b1150 callq 0x1dccf movl 0xf02dc(%rip), %edi # 0x1b1154 callq 0x1dccf movl 0xf02d5(%rip), %edi # 0x1b1158 callq 0x1dccf movl 0xf02ce(%rip), %edi # 0x1b115c callq 0x1dccf movl 0xf02cb(%rip), %edi # 0x1b1164 callq 0x1dccf movl 0xf02bc(%rip), %edi # 0x1b1160 testl %edi, %edi je 0xc0eae popq %rbp jmp 0x1dccf popq %rbp retq
r3d_textures_unload: push rbp mov rbp, rsp mov edi, cs:dword_1B1150 call rlUnloadTexture mov edi, cs:dword_1B1154 call rlUnloadTexture mov edi, cs:dword_1B1158 call rlUnloadTexture mov edi, cs:dword_1B115C call rlUnloadTexture mov edi, cs:dword_1B1164 call rlUnloadTexture mov edi, cs:dword_1B1160 test edi, edi jz short loc_C0EAE pop rbp jmp rlUnloadTexture loc_C0EAE: pop rbp retn
long long r3d_textures_unload() { long long result; // rax rlUnloadTexture(dword_1B1150); rlUnloadTexture(dword_1B1154); rlUnloadTexture(dword_1B1158); rlUnloadTexture(dword_1B115C); result = rlUnloadTexture(dword_1B1164); if ( dword_1B1160 ) return rlUnloadTexture(dword_1B1160); return result; }
r3d_textures_unload: PUSH RBP MOV RBP,RSP MOV EDI,dword ptr [0x002b1150] CALL 0x0011dccf MOV EDI,dword ptr [0x002b1154] CALL 0x0011dccf MOV EDI,dword ptr [0x002b1158] CALL 0x0011dccf MOV EDI,dword ptr [0x002b115c] CALL 0x0011dccf MOV EDI,dword ptr [0x002b1164] CALL 0x0011dccf MOV EDI,dword ptr [0x002b1160] TEST EDI,EDI JZ 0x001c0eae POP RBP JMP 0x0011dccf LAB_001c0eae: POP RBP RET
void r3d_textures_unload(void) { rlUnloadTexture(DAT_002b1150); rlUnloadTexture(DAT_002b1154); rlUnloadTexture(DAT_002b1158); rlUnloadTexture(DAT_002b115c); rlUnloadTexture(DAT_002b1164); if (DAT_002b1160 != 0) { rlUnloadTexture(); return; } return; }
13,858
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint()
monkey531[P]llama/common/json.hpp
int get_codepoint() { // this function only makes sense after reading `\u` JSON_ASSERT(current == 'u'); int codepoint = 0; const auto factors = { 12u, 8u, 4u, 0u }; for (const auto factor : factors) { get(); if (current >= '0' && current <= '9') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor); } else if (current >= 'A' && current <= 'F') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor); } else if (current >= 'a' && current <= 'f') { codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor); } else { return -1; } } JSON_ASSERT(0x0000 <= codepoint && codepoint <= 0xFFFF); return codepoint; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get_codepoint(): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp cmpl $0x75, 0x14(%rdi) jne 0x3f02b movq %rdi, %rbx movaps 0x6d362(%rip), %xmm0 # 0xac320 movaps %xmm0, (%rsp) xorl %r15d, %r15d pushq $-0x1 popq %r12 xorl %ebp, %ebp cmpq $0x10, %r15 je 0x3f00f movl (%rsp,%r15), %r14d movq %rbx, %rdi callq 0x3ed24 movl 0x14(%rbx), %eax leal -0x30(%rax), %edx cmpl $0xa, %edx jb 0x3f002 leal -0x41(%rax), %ecx cmpl $0x5, %ecx ja 0x3eff5 addl $-0x37, %eax jmp 0x3f000 leal -0x61(%rax), %ecx cmpl $0x5, %ecx ja 0x3f026 addl $-0x57, %eax movl %eax, %edx movl %r14d, %ecx shll %cl, %edx addl %edx, %ebp addq $0x4, %r15 jmp 0x3efcb cmpl $0x10000, %ebp # imm = 0x10000 jae 0x3f047 movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %r12d, %ebp jmp 0x3f017 leaq 0x72bb4(%rip), %rdi # 0xb1be6 leaq 0x6d107(%rip), %rdx # 0xac140 leaq 0x738cd(%rip), %rcx # 0xb290d movl $0x1d79, %esi # imm = 0x1D79 jmp 0x3f061 leaq 0x72b98(%rip), %rdi # 0xb1be6 leaq 0x6d0eb(%rip), %rdx # 0xac140 leaq 0x738c0(%rip), %rcx # 0xb291c movl $0x1d93, %esi # imm = 0x1D93 xorl %eax, %eax callq 0x24e90
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h cmp dword ptr [rdi+14h], 75h ; 'u' jnz short loc_3F02B mov rbx, rdi movaps xmm0, cs:xmmword_AC320 movaps [rsp+38h+var_38], xmm0 xor r15d, r15d push 0FFFFFFFFFFFFFFFFh pop r12 xor ebp, ebp loc_3EFCB: cmp r15, 10h jz short loc_3F00F mov r14d, dword ptr [rsp+r15+38h+var_38] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [rbx+14h] lea edx, [rax-30h] cmp edx, 0Ah jb short loc_3F002 lea ecx, [rax-41h] cmp ecx, 5 ja short loc_3EFF5 add eax, 0FFFFFFC9h jmp short loc_3F000 loc_3EFF5: lea ecx, [rax-61h] cmp ecx, 5 ja short loc_3F026 add eax, 0FFFFFFA9h loc_3F000: mov edx, eax loc_3F002: mov ecx, r14d shl edx, cl add ebp, edx add r15, 4 jmp short loc_3EFCB loc_3F00F: cmp ebp, 10000h jnb short loc_3F047 loc_3F017: mov eax, ebp add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_3F026: mov ebp, r12d jmp short loc_3F017 loc_3F02B: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurrentU; "current == 'u'" mov esi, 1D79h jmp short loc_3F061 loc_3F047: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, a0x0000Codepoin; "0x0000 <= codepoint && codepoint <= 0xF"... mov esi, 1D93h loc_3F061: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint( __m128i *a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { long long v9; // r15 unsigned int v10; // ebp int v11; // r14d __int32 v12; // eax __int32 v13; // edx __int32 v14; // eax long long v16; // rsi long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 _OWORD v21[3]; // [rsp+0h] [rbp-38h] if ( a1[1].m128i_i32[1] == 117 ) { v21[0] = xmmword_AC320; v9 = 0LL; v10 = 0; while ( v9 != 16 ) { v11 = *(_DWORD *)((char *)v21 + v9); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v12 = a1[1].m128i_i32[1]; v13 = v12 - 48; if ( (unsigned int)(v12 - 48) >= 0xA ) { if ( (unsigned int)(v12 - 65) > 5 ) { if ( (unsigned int)(v12 - 97) > 5 ) return (unsigned int)-1; v14 = v12 - 87; } else { v14 = v12 - 55; } v13 = v14; } v10 += v13 << v11; v9 += 4LL; } if ( v10 < 0x10000 ) return v10; v16 = 7571LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7571LL, "GGML_ASSERT(%s) failed", "0x0000 <= codepoint && codepoint <= 0xFFFF"); } else { v16 = 7545LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7545LL, "GGML_ASSERT(%s) failed", "current == 'u'"); } return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v16, v17, v18, v19, v20, a7, a8, a9); }
get_codepoint: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 CMP dword ptr [RDI + 0x14],0x75 JNZ 0x0013f02b MOV RBX,RDI MOVAPS XMM0,xmmword ptr [0x001ac320] MOVAPS xmmword ptr [RSP],XMM0 XOR R15D,R15D PUSH -0x1 POP R12 XOR EBP,EBP LAB_0013efcb: CMP R15,0x10 JZ 0x0013f00f MOV R14D,dword ptr [RSP + R15*0x1] MOV RDI,RBX CALL 0x0013ed24 MOV EAX,dword ptr [RBX + 0x14] LEA EDX,[RAX + -0x30] CMP EDX,0xa JC 0x0013f002 LEA ECX,[RAX + -0x41] CMP ECX,0x5 JA 0x0013eff5 ADD EAX,-0x37 JMP 0x0013f000 LAB_0013eff5: LEA ECX,[RAX + -0x61] CMP ECX,0x5 JA 0x0013f026 ADD EAX,-0x57 LAB_0013f000: MOV EDX,EAX LAB_0013f002: MOV ECX,R14D SHL EDX,CL ADD EBP,EDX ADD R15,0x4 JMP 0x0013efcb LAB_0013f00f: CMP EBP,0x10000 JNC 0x0013f047 LAB_0013f017: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0013f026: MOV EBP,R12D JMP 0x0013f017 LAB_0013f02b: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b290d] MOV ESI,0x1d79 JMP 0x0013f061 LAB_0013f047: LEA RDI,[0x1b1be6] LEA RDX,[0x1ac140] LEA RCX,[0x1b291c] MOV ESI,0x1d93 LAB_0013f061: XOR EAX,EAX CALL 0x00124e90
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get_codepoint() */ uint __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_codepoint(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int4 uVar1; int iVar2; uint uVar3; char *pcVar4; uint uVar5; int8 uVar6; long lVar7; int8 local_38; int8 uStack_30; if (*(int *)(this + 0x14) == 0x75) { local_38 = _DAT_001ac320; uStack_30 = _UNK_001ac328; uVar5 = 0; for (lVar7 = 0; lVar7 != 0x10; lVar7 = lVar7 + 4) { uVar1 = *(int4 *)((long)&local_38 + lVar7); get(this); iVar2 = *(int *)(this + 0x14); uVar3 = iVar2 - 0x30; if (9 < uVar3) { if (iVar2 - 0x41U < 6) { uVar3 = iVar2 - 0x37; } else { if (5 < iVar2 - 0x61U) { return 0xffffffff; } uVar3 = iVar2 - 0x57; } } uVar5 = uVar5 + (uVar3 << ((byte)uVar1 & 0x1f)); } if (uVar5 < 0x10000) { return uVar5; } pcVar4 = "0x0000 <= codepoint && codepoint <= 0xFFFF"; uVar6 = 0x1d93; } else { pcVar4 = "current == \'u\'"; uVar6 = 0x1d79; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar4); }
13,859
net_stmt_close
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove) { char stmt_id[STMT_ID_LENGTH]; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; /* clear memory */ ma_free_root(&stmt->result.alloc, MYF(0)); /* allocated in mysql_stmt_store_result */ ma_free_root(&stmt->mem_root,MYF(0)); ma_free_root(fields_ma_alloc_root, MYF(0)); if (stmt->mysql) { CLEAR_CLIENT_ERROR(stmt->mysql); /* remove from stmt list */ if (remove) stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list); /* check if all data are fetched */ if (stmt->mysql->status != MYSQL_STATUS_READY) { do { stmt->mysql->methods->db_stmt_flush_unbuffered(stmt); } while(mysql_stmt_more_results(stmt)); stmt->mysql->status= MYSQL_STATUS_READY; } if (stmt->state > MYSQL_STMT_INITTED) { int4store(stmt_id, stmt->stmt_id); if (stmt->mysql->methods->db_command(stmt->mysql,COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) { UPDATE_STMT_ERROR(stmt); return 1; } } } return 0; }
O0
c
net_stmt_close: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movq 0x340(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi addq $0x80, %rdi addq $0x10, %rdi xorl %esi, %esi callq 0x24d40 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0x24d40 movq -0x28(%rbp), %rdi xorl %esi, %esi callq 0x24d40 movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x28bb5 jmp 0x2897b movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x22f48(%rip), %rsi # 0x4b8eb callq 0x133c0 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x97(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x2a0(%rax) je 0x289df movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x2a0(%rax), %rax movl $0x0, 0x4(%rax) jmp 0x289e1 cmpb $0x0, -0x19(%rbp) je 0x28a18 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x4c8(%rax), %rdi movq -0x18(%rbp), %rsi addq $0x320, %rsi # imm = 0x320 callq 0x22ec0 movq %rax, %rcx movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq %rcx, 0x4c8(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x488(%rax) je 0x28a63 jmp 0x28a2b movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x78(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movq -0x18(%rbp), %rdi callq 0x2c340 cmpb $0x0, %al jne 0x28a2b movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x488(%rax) movq -0x18(%rbp), %rax cmpl $0x0, 0x50(%rax) jbe 0x28bb3 jmp 0x28a73 movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movb %al, -0xc(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, -0xa(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, -0x9(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x10(%rax), %rax movq -0x18(%rbp), %rcx movq 0x38(%rcx), %rdi leaq -0xc(%rbp), %rdx movq -0x18(%rbp), %r9 movl $0x19, %esi movl $0x4, %ecx movl $0x1, %r8d callq *%rax cmpl $0x0, %eax je 0x28bb1 jmp 0x28aeb movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x108(%rax) movq -0x18(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D movq -0x18(%rbp), %rax movq 0x38(%rax), %rsi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x18(%rbp), %rax addq $0x10c, %rax # imm = 0x10C movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax cmpq $0x0, %rax je 0x28b68 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax addq $0x97, %rax movq %rax, -0x38(%rbp) jmp 0x28b8e movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl 0x90(%rax), %eax subl $0x7d0, %eax # imm = 0x7D0 movl %eax, %eax movl %eax, %ecx leaq 0x3739a(%rip), %rax # 0x5ff20 movq (%rax,%rcx,8), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13210 movq -0x18(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0xd(%rbp) jmp 0x28bb9 jmp 0x28bb3 jmp 0x28bb5 movb $0x0, -0xd(%rbp) movb -0xd(%rbp), %al movb %al, -0x39(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x28bda movb -0x39(%rbp), %al addq $0x40, %rsp popq %rbp retq callq 0x134b0 nop
net_stmt_close: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_18], rdi mov [rbp+var_19], al mov rax, [rbp+var_18] mov rax, [rax+340h] mov [rbp+var_28], rax mov rdi, [rbp+var_18] add rdi, 80h add rdi, 10h xor esi, esi call ma_free_root mov rdi, [rbp+var_18] xor esi, esi call ma_free_root mov rdi, [rbp+var_28] xor esi, esi call ma_free_root mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jz loc_28BB5 jmp short $+2 loc_2897B: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rsi, a00000; "00000" call _strcpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_18] mov rax, [rax+38h] cmp qword ptr [rax+2A0h], 0 jz short loc_289DF mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+2A0h] mov dword ptr [rax+4], 0 loc_289DF: jmp short $+2 loc_289E1: cmp [rbp+var_19], 0 jz short loc_28A18 mov rax, [rbp+var_18] mov rax, [rax+38h] mov rdi, [rax+4C8h] mov rsi, [rbp+var_18] add rsi, 320h call list_delete mov rcx, rax mov rax, [rbp+var_18] mov rax, [rax+38h] mov [rax+4C8h], rcx loc_28A18: mov rax, [rbp+var_18] mov rax, [rax+38h] cmp dword ptr [rax+488h], 0 jz short loc_28A63 jmp short $+2 loc_28A2B: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+78h] mov rdi, [rbp+var_18] call rax mov rdi, [rbp+var_18] call mysql_stmt_more_results cmp al, 0 jnz short loc_28A2B mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+488h], 0 loc_28A63: mov rax, [rbp+var_18] cmp dword ptr [rax+50h], 0 jbe loc_28BB3 jmp short $+2 loc_28A73: mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_C], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 10h mov [rbp+var_A], al mov rax, [rbp+var_18] mov rax, [rax+40h] shr rax, 18h mov [rbp+var_9], al mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+10h] mov rcx, [rbp+var_18] mov rdi, [rcx+38h] lea rdx, [rbp+var_C] mov r9, [rbp+var_18] mov esi, 19h mov ecx, 4 mov r8d, 1 call rax cmp eax, 0 jz loc_28BB1 jmp short $+2 loc_28AEB: mov rax, [rbp+var_18] mov rax, [rax+38h] mov ecx, [rax+90h] mov rax, [rbp+var_18] mov [rax+108h], ecx mov rdi, [rbp+var_18] add rdi, 30Dh mov rax, [rbp+var_18] mov rsi, [rax+38h] add rsi, 297h mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+312h], 0 mov rax, [rbp+var_18] add rax, 10Ch mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h cmp rax, 0 jz short loc_28B68 mov rax, [rbp+var_18] mov rax, [rax+38h] add rax, 97h mov [rbp+var_38], rax jmp short loc_28B8E loc_28B68: mov rax, [rbp+var_18] mov rax, [rax+38h] mov eax, [rax+90h] sub eax, 7D0h mov eax, eax mov ecx, eax lea rax, client_errors mov rax, [rax+rcx*8] mov [rbp+var_38], rax loc_28B8E: mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov edx, 200h call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+30Bh], 0 mov [rbp+var_D], 1 jmp short loc_28BB9 loc_28BB1: jmp short $+2 loc_28BB3: jmp short $+2 loc_28BB5: mov [rbp+var_D], 0 loc_28BB9: mov al, [rbp+var_D] mov [rbp+var_39], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_28BDA mov al, [rbp+var_39] add rsp, 40h pop rbp retn loc_28BDA: call ___stack_chk_fail
char net_stmt_close(long long a1, char a2) { char *v2; // rax _QWORD *v4; // [rsp+18h] [rbp-28h] _BYTE v6[4]; // [rsp+34h] [rbp-Ch] BYREF unsigned long long v7; // [rsp+38h] [rbp-8h] v7 = __readfsqword(0x28u); v4 = *(_QWORD **)(a1 + 832); ma_free_root((_QWORD *)(a1 + 144), 0); ma_free_root((_QWORD *)a1, 0); ma_free_root(v4, 0); if ( !*(_QWORD *)(a1 + 56) ) return 0; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0; strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) ) *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0; if ( a2 ) *(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL) = list_delete( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL), (_QWORD *)(a1 + 800)); if ( *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) ) { do (*(void ( **)(long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 120LL))(a1); while ( (unsigned __int8)mysql_stmt_more_results(a1) ); *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0; } if ( !*(_DWORD *)(a1 + 80) ) return 0; v6[0] = *(_QWORD *)(a1 + 64); v6[1] = BYTE1(*(_QWORD *)(a1 + 64)); v6[2] = BYTE2(*(_QWORD *)(a1 + 64)); v6[3] = BYTE3(*(_QWORD *)(a1 + 64)); if ( !(*(unsigned int ( **)(_QWORD, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( *(_QWORD *)(a1 + 56), 25LL, v6, 4LL, 1LL, a1) ) return 0; *(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL); strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL); *(_BYTE *)(a1 + 786) = 0; if ( *(_QWORD *)(a1 + 56) == -151LL ) v2 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000]; else v2 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); strncpy(a1 + 268, v2, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
net_stmt_close: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x18],RDI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x340] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x80 ADD RDI,0x10 XOR ESI,ESI CALL 0x00124d40 MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI CALL 0x00124d40 MOV RDI,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00124d40 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00128bb5 JMP 0x0012897b LAB_0012897b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RSI,[0x14b8eb] CALL 0x001133c0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x001289df MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x2a0] MOV dword ptr [RAX + 0x4],0x0 LAB_001289df: JMP 0x001289e1 LAB_001289e1: CMP byte ptr [RBP + -0x19],0x0 JZ 0x00128a18 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RAX + 0x4c8] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x320 CALL 0x00122ec0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RAX + 0x4c8],RCX LAB_00128a18: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x0 JZ 0x00128a63 JMP 0x00128a2b LAB_00128a2b: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x78] MOV RDI,qword ptr [RBP + -0x18] CALL RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012c340 CMP AL,0x0 JNZ 0x00128a2b MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x0 LAB_00128a63: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x50],0x0 JBE 0x00128bb3 JMP 0x00128a73 LAB_00128a73: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV byte ptr [RBP + -0xa],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RCX + 0x38] LEA RDX,[RBP + -0xc] MOV R9,qword ptr [RBP + -0x18] MOV ESI,0x19 MOV ECX,0x4 MOV R8D,0x1 CALL RAX CMP EAX,0x0 JZ 0x00128bb1 JMP 0x00128aeb LAB_00128aeb: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x108],ECX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x30d MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x38] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x312],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x10c MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 CMP RAX,0x0 JZ 0x00128b68 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] ADD RAX,0x97 MOV qword ptr [RBP + -0x38],RAX JMP 0x00128b8e LAB_00128b68: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x90] SUB EAX,0x7d0 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x15ff20] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x38],RAX LAB_00128b8e: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x200 CALL 0x00113210 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0xd],0x1 JMP 0x00128bb9 LAB_00128bb1: JMP 0x00128bb3 LAB_00128bb3: JMP 0x00128bb5 LAB_00128bb5: MOV byte ptr [RBP + -0xd],0x0 LAB_00128bb9: MOV AL,byte ptr [RBP + -0xd] MOV byte ptr [RBP + -0x39],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00128bda MOV AL,byte ptr [RBP + -0x39] ADD RSP,0x40 POP RBP RET LAB_00128bda: CALL 0x001134b0
int8 net_stmt_close(long param_1,char param_2) { char cVar1; int iVar2; int8 uVar3; long in_FS_OFFSET; char *local_40; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar3 = *(int8 *)(param_1 + 0x340); ma_free_root(param_1 + 0x90,0); ma_free_root(param_1,0); ma_free_root(uVar3,0); if (*(long *)(param_1 + 0x38) != 0) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000"); *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) { *(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0; } if (param_2 != '\0') { uVar3 = list_delete(*(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8),param_1 + 800); *(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8) = uVar3; } if (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0) { do { (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x78))(param_1); cVar1 = mysql_stmt_more_results(param_1); } while (cVar1 != '\0'); *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0; } if (*(int *)(param_1 + 0x50) != 0) { local_14 = (int1)*(int8 *)(param_1 + 0x40); local_13 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_12 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_11 = (int1)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); iVar2 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (*(int8 *)(param_1 + 0x38),0x19,&local_14,4,1,param_1); if (iVar2 != 0) { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; if (*(long *)(param_1 + 0x38) == -0x97) { local_40 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000]; } else { local_40 = (char *)(*(long *)(param_1 + 0x38) + 0x97); } strncpy((char *)(param_1 + 0x10c),local_40,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_15 = 1; goto LAB_00128bb9; } } } local_15 = 0; LAB_00128bb9: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_15); }
13,860
net_stmt_close
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove) { char stmt_id[STMT_ID_LENGTH]; MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; /* clear memory */ ma_free_root(&stmt->result.alloc, MYF(0)); /* allocated in mysql_stmt_store_result */ ma_free_root(&stmt->mem_root,MYF(0)); ma_free_root(fields_ma_alloc_root, MYF(0)); if (stmt->mysql) { CLEAR_CLIENT_ERROR(stmt->mysql); /* remove from stmt list */ if (remove) stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list); /* check if all data are fetched */ if (stmt->mysql->status != MYSQL_STATUS_READY) { do { stmt->mysql->methods->db_stmt_flush_unbuffered(stmt); } while(mysql_stmt_more_results(stmt)); stmt->mysql->status= MYSQL_STATUS_READY; } if (stmt->state > MYSQL_STMT_INITTED) { int4store(stmt_id, stmt->stmt_id); if (stmt->mysql->methods->db_command(stmt->mysql,COM_STMT_CLOSE, stmt_id, sizeof(stmt_id), 1, stmt)) { UPDATE_STMT_ERROR(stmt); return 1; } } } return 0; }
O3
c
net_stmt_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r14d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) movq 0x340(%rdi), %r12 addq $0x90, %rdi xorl %r15d, %r15d xorl %esi, %esi callq 0x1de3f movq %rbx, %rdi xorl %esi, %esi callq 0x1de3f movq %r12, %rdi xorl %esi, %esi callq 0x1de3f movq 0x38(%rbx), %rax testq %rax, %rax je 0x1ffca movl $0x0, 0x90(%rax) movq 0x38(%rbx), %rax movw $0x30, 0x29b(%rax) movl $0x30303030, 0x297(%rax) # imm = 0x30303030 movq 0x38(%rbx), %rax movb $0x0, 0x97(%rax) movq 0x38(%rbx), %rax movq 0x2a0(%rax), %rcx testq %rcx, %rcx je 0x1fed8 movl $0x0, 0x4(%rcx) movq 0x38(%rbx), %rax testb %r14b, %r14b je 0x1feff movq 0x4c8(%rax), %rdi leaq 0x320(%rbx), %rsi callq 0x1cedc movq 0x38(%rbx), %rcx movq %rax, 0x4c8(%rcx) movq 0x38(%rbx), %rax cmpl $0x0, 0x488(%rax) je 0x1ff37 movq 0x4d0(%rax), %rax movq %rbx, %rdi callq *0x78(%rax) movq 0x38(%rbx), %rax testq %rax, %rax je 0x1ff2d movzwl 0x380(%rax), %ecx testl $0x1008, %ecx # imm = 0x1008 jne 0x1ff08 movl $0x0, 0x488(%rax) cmpl $0x0, 0x50(%rbx) je 0x1ffc7 movl 0x40(%rbx), %eax leaq -0x2c(%rbp), %rdx movl %eax, (%rdx) movq 0x38(%rbx), %rdi movq 0x4d0(%rdi), %rax movl $0x4, %ecx movl $0x19, %esi movl $0x1, %r8d movq %rbx, %r9 callq *0x10(%rax) testl %eax, %eax je 0x1ffc7 movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) leaq 0x30d(%rbx), %rdi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movb $0x1, %r15b jmp 0x1ffca xorl %r15d, %r15d movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x1ffe9 movl %r15d, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
net_stmt_close: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r14d, esi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax mov r12, [rdi+340h] add rdi, 90h xor r15d, r15d xor esi, esi call ma_free_root mov rdi, rbx xor esi, esi call ma_free_root mov rdi, r12 xor esi, esi call ma_free_root mov rax, [rbx+38h] test rax, rax jz loc_1FFCA mov dword ptr [rax+90h], 0 mov rax, [rbx+38h] mov word ptr [rax+29Bh], 30h ; '0' mov dword ptr [rax+297h], 30303030h mov rax, [rbx+38h] mov byte ptr [rax+97h], 0 mov rax, [rbx+38h] mov rcx, [rax+2A0h] test rcx, rcx jz short loc_1FED8 mov dword ptr [rcx+4], 0 mov rax, [rbx+38h] loc_1FED8: test r14b, r14b jz short loc_1FEFF mov rdi, [rax+4C8h] lea rsi, [rbx+320h] call list_delete mov rcx, [rbx+38h] mov [rcx+4C8h], rax mov rax, [rbx+38h] loc_1FEFF: cmp dword ptr [rax+488h], 0 jz short loc_1FF37 loc_1FF08: mov rax, [rax+4D0h] mov rdi, rbx call qword ptr [rax+78h] mov rax, [rbx+38h] test rax, rax jz short loc_1FF2D movzx ecx, word ptr [rax+380h] test ecx, 1008h jnz short loc_1FF08 loc_1FF2D: mov dword ptr [rax+488h], 0 loc_1FF37: cmp dword ptr [rbx+50h], 0 jz loc_1FFC7 mov eax, [rbx+40h] lea rdx, [rbp+var_2C] mov [rdx], eax mov rdi, [rbx+38h] mov rax, [rdi+4D0h] mov ecx, 4 mov esi, 19h mov r8d, 1 mov r9, rbx call qword ptr [rax+10h] test eax, eax jz short loc_1FFC7 mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax lea rdi, [rbx+30Dh] add rsi, 297h mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov esi, 97h add rsi, [rbx+38h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r15b, 1 jmp short loc_1FFCA loc_1FFC7: xor r15d, r15d loc_1FFCA: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_1FFE9 mov eax, r15d add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1FFE9: call ___stack_chk_fail
long long net_stmt_close(long long a1, char a2) { long long v2; // r12 unsigned int v3; // r15d long long v4; // rax long long v5; // rax long long v6; // rcx long long v7; // rsi int v9; // [rsp+4h] [rbp-2Ch] BYREF unsigned long long v10; // [rsp+8h] [rbp-28h] v10 = __readfsqword(0x28u); v2 = *(_QWORD *)(a1 + 832); v3 = 0; ma_free_root(a1 + 144, 0); ma_free_root(a1, 0); ma_free_root(v2, 0); v4 = *(_QWORD *)(a1 + 56); if ( v4 ) { *(_DWORD *)(v4 + 144) = 0; strcpy((char *)(*(_QWORD *)(a1 + 56) + 663LL), "00000"); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0; v5 = *(_QWORD *)(a1 + 56); v6 = *(_QWORD *)(v5 + 672); if ( v6 ) { *(_DWORD *)(v6 + 4) = 0; v5 = *(_QWORD *)(a1 + 56); } if ( a2 ) { *(_QWORD *)(*(_QWORD *)(a1 + 56) + 1224LL) = list_delete(*(_QWORD **)(v5 + 1224), (_QWORD *)(a1 + 800)); v5 = *(_QWORD *)(a1 + 56); } if ( *(_DWORD *)(v5 + 1160) ) { do { (*(void ( **)(long long))(*(_QWORD *)(v5 + 1232) + 120LL))(a1); v5 = *(_QWORD *)(a1 + 56); } while ( v5 && (*(_WORD *)(v5 + 896) & 0x1008) != 0 ); *(_DWORD *)(v5 + 1160) = 0; } if ( *(_DWORD *)(a1 + 80) && (v9 = *(_DWORD *)(a1 + 64), (*(unsigned int ( **)(_QWORD, long long, int *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( *(_QWORD *)(a1 + 56), 25LL, &v9, 4LL, 1LL, a1)) ) { v7 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v7 + 144); strncpy(a1 + 781, v7 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL); *(_BYTE *)(a1 + 779) = 0; LOBYTE(v3) = 1; } else { return 0; } } return v3; }
net_stmt_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14D,ESI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX MOV R12,qword ptr [RDI + 0x340] ADD RDI,0x90 XOR R15D,R15D XOR ESI,ESI CALL 0x0011de3f MOV RDI,RBX XOR ESI,ESI CALL 0x0011de3f MOV RDI,R12 XOR ESI,ESI CALL 0x0011de3f MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x0011ffca MOV dword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBX + 0x38] MOV word ptr [RAX + 0x29b],0x30 MOV dword ptr [RAX + 0x297],0x30303030 MOV RAX,qword ptr [RBX + 0x38] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBX + 0x38] MOV RCX,qword ptr [RAX + 0x2a0] TEST RCX,RCX JZ 0x0011fed8 MOV dword ptr [RCX + 0x4],0x0 MOV RAX,qword ptr [RBX + 0x38] LAB_0011fed8: TEST R14B,R14B JZ 0x0011feff MOV RDI,qword ptr [RAX + 0x4c8] LEA RSI,[RBX + 0x320] CALL 0x0011cedc MOV RCX,qword ptr [RBX + 0x38] MOV qword ptr [RCX + 0x4c8],RAX MOV RAX,qword ptr [RBX + 0x38] LAB_0011feff: CMP dword ptr [RAX + 0x488],0x0 JZ 0x0011ff37 LAB_0011ff08: MOV RAX,qword ptr [RAX + 0x4d0] MOV RDI,RBX CALL qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x0011ff2d MOVZX ECX,word ptr [RAX + 0x380] TEST ECX,0x1008 JNZ 0x0011ff08 LAB_0011ff2d: MOV dword ptr [RAX + 0x488],0x0 LAB_0011ff37: CMP dword ptr [RBX + 0x50],0x0 JZ 0x0011ffc7 MOV EAX,dword ptr [RBX + 0x40] LEA RDX,[RBP + -0x2c] MOV dword ptr [RDX],EAX MOV RDI,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RDI + 0x4d0] MOV ECX,0x4 MOV ESI,0x19 MOV R8D,0x1 MOV R9,RBX CALL qword ptr [RAX + 0x10] TEST EAX,EAX JZ 0x0011ffc7 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX LEA RDI,[RBX + 0x30d] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R15B,0x1 JMP 0x0011ffca LAB_0011ffc7: XOR R15D,R15D LAB_0011ffca: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0011ffe9 MOV EAX,R15D ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011ffe9: CALL 0x00113500
int8 net_stmt_close(long param_1,char param_2) { int iVar1; int8 uVar2; long lVar3; int8 uVar4; long in_FS_OFFSET; int4 local_34; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(int8 *)(param_1 + 0x340); uVar4 = 0; ma_free_root(param_1 + 0x90,0); ma_free_root(param_1,0); ma_free_root(uVar2,0); if (*(long *)(param_1 + 0x38) != 0) { *(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0; lVar3 = *(long *)(param_1 + 0x38); *(int2 *)(lVar3 + 0x29b) = 0x30; *(int4 *)(lVar3 + 0x297) = 0x30303030; *(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0; lVar3 = *(long *)(param_1 + 0x38); if (*(long *)(lVar3 + 0x2a0) != 0) { *(int4 *)(*(long *)(lVar3 + 0x2a0) + 4) = 0; lVar3 = *(long *)(param_1 + 0x38); } if (param_2 != '\0') { uVar2 = list_delete(*(int8 *)(lVar3 + 0x4c8),param_1 + 800); *(int8 *)(*(long *)(param_1 + 0x38) + 0x4c8) = uVar2; lVar3 = *(long *)(param_1 + 0x38); } if (*(int *)(lVar3 + 0x488) != 0) { do { (**(code **)(*(long *)(lVar3 + 0x4d0) + 0x78))(param_1); lVar3 = *(long *)(param_1 + 0x38); if (lVar3 == 0) break; } while ((*(ushort *)(lVar3 + 0x380) & 0x1008) != 0); *(int4 *)(lVar3 + 0x488) = 0; } if (*(int *)(param_1 + 0x50) != 0) { local_34 = *(int4 *)(param_1 + 0x40); iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (*(long *)(param_1 + 0x38),0x19,&local_34,4,1,param_1); if (iVar1 != 0) { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar4 = 1; goto LAB_0011ffca; } } uVar4 = 0; } LAB_0011ffca: if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return uVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,861
send_signal
eloqsql/mysys/thr_timer.c
static void send_signal(void *arg) { struct st_my_thread_var *current_my_thread_var= arg; #if defined(MAIN) printf("sending signal\n"); fflush(stdout); #endif mysql_mutex_lock(&current_my_thread_var->mutex); mysql_cond_signal(&current_my_thread_var->suspend); mysql_mutex_unlock(&current_my_thread_var->mutex); }
O3
c
send_signal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x36713(%rip), %rsi # 0x5c28d movl $0x1, %edi xorl %eax, %eax callq 0x24030 movq 0x2c941b(%rip), %rax # 0x2eefa8 movq (%rax), %rdi callq 0x24360 leaq 0x40(%rbx), %r14 cmpq $0x0, 0x80(%rbx) jne 0x25bde movq %r14, %rdi callq 0x24450 leaq 0x8(%rbx), %r15 movq 0x38(%rbx), %rdi testq %rdi, %rdi jne 0x25bf4 movq %r15, %rdi callq 0x24040 movq 0x80(%rbx), %rdi testq %rdi, %rdi jne 0x25c06 movq %r14, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x241f0 leaq 0x364d3(%rip), %rsi # 0x5c0b8 movq %r14, %rdi movl $0x161, %edx # imm = 0x161 callq 0x24746 jmp 0x25bab leaq 0x2c9c35(%rip), %rax # 0x2ef830 movq (%rax), %rax callq *0x170(%rax) jmp 0x25bb8 leaq 0x2c9c23(%rip), %rax # 0x2ef830 movq (%rax), %rax callq *0x160(%rax) jmp 0x25bcc
send_signal: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rsi, aSendingSignal; "sending signal\n" mov edi, 1 xor eax, eax call ___printf_chk mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush lea r14, [rbx+40h] cmp qword ptr [rbx+80h], 0 jnz short loc_25BDE mov rdi, r14 call _pthread_mutex_lock loc_25BAB: lea r15, [rbx+8] mov rdi, [rbx+38h] test rdi, rdi jnz short loc_25BF4 loc_25BB8: mov rdi, r15 call _pthread_cond_signal mov rdi, [rbx+80h] test rdi, rdi jnz short loc_25C06 loc_25BCC: mov rdi, r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_25BDE: lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 161h call psi_mutex_lock jmp short loc_25BAB loc_25BF4: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_25BB8 loc_25C06: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_25BCC
long long send_signal(long long a1) { __printf_chk(1LL, "sending signal\n"); fflush(stdout); if ( *(_QWORD *)(a1 + 128) ) psi_mutex_lock(a1 + 64, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_timer.c", 0x161u); else pthread_mutex_lock(a1 + 64); if ( *(_QWORD *)(a1 + 56) ) (*((void (**)(void))PSI_server[0] + 46))(); pthread_cond_signal(a1 + 8); if ( *(_QWORD *)(a1 + 128) ) (*((void (**)(void))PSI_server[0] + 44))(); return pthread_mutex_unlock(a1 + 64); }
send_signal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RSI,[0x15c28d] MOV EDI,0x1 XOR EAX,EAX CALL 0x00124030 MOV RAX,qword ptr [0x003eefa8] MOV RDI,qword ptr [RAX] CALL 0x00124360 LEA R14,[RBX + 0x40] CMP qword ptr [RBX + 0x80],0x0 JNZ 0x00125bde MOV RDI,R14 CALL 0x00124450 LAB_00125bab: LEA R15,[RBX + 0x8] MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JNZ 0x00125bf4 LAB_00125bb8: MOV RDI,R15 CALL 0x00124040 MOV RDI,qword ptr [RBX + 0x80] TEST RDI,RDI JNZ 0x00125c06 LAB_00125bcc: MOV RDI,R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001241f0 LAB_00125bde: LEA RSI,[0x15c0b8] MOV RDI,R14 MOV EDX,0x161 CALL 0x00124746 JMP 0x00125bab LAB_00125bf4: LEA RAX,[0x3ef830] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x00125bb8 LAB_00125c06: LEA RAX,[0x3ef830] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00125bcc
void send_signal(long param_1) { pthread_mutex_t *__mutex; __printf_chk(1,"sending signal\n"); fflush(*(FILE **)PTR_stdout_003eefa8); __mutex = (pthread_mutex_t *)(param_1 + 0x40); if (*(long *)(param_1 + 0x80) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_timer.c",0x161); } if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal((pthread_cond_t *)(param_1 + 8)); if (*(long *)(param_1 + 0x80) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return; }
13,862
Parser::peek(int) const
BhuvanGudi[P]LexiParse/src/parser.hpp
[[nodiscard]] std::optional<Token> peek(const int offset = 0) const { if (m_index + offset >= m_tokens.size()) { return {}; } return m_tokens.at(m_index + offset); }
O2
cpp
Parser::peek(int) const: pushq %rbx movq %rdi, %rbx movslq %edx, %rcx addq 0x18(%rsi), %rcx movq 0x8(%rsi), %rax subq (%rsi), %rax pushq $0x30 popq %rdi cqto idivq %rdi cmpq %rax, %rcx jae 0x3a7b movq %rsi, %rdi movq %rcx, %rsi callq 0x43f8 movq %rbx, %rdi movq %rax, %rsi callq 0x443e jmp 0x3a7f movb $0x0, 0x30(%rbx) movq %rbx, %rax popq %rbx retq
_ZNK6Parser4peekEi: push rbx mov rbx, rdi movsxd rcx, edx add rcx, [rsi+18h] mov rax, [rsi+8] sub rax, [rsi] push 30h ; '0' pop rdi cqo idiv rdi cmp rcx, rax jnb short loc_3A7B mov rdi, rsi mov rsi, rcx call _ZNKSt6vectorI5TokenSaIS0_EE2atEm; std::vector<Token>::at(ulong) mov rdi, rbx mov rsi, rax call _ZNSt22_Optional_payload_baseI5TokenEC2IJRKS0_EEESt10in_place_tDpOT_; std::_Optional_payload_base<Token>::_Optional_payload_base<Token const&>(std::in_place_t,Token const&) jmp short loc_3A7F loc_3A7B: mov byte ptr [rbx+30h], 0 loc_3A7F: mov rax, rbx pop rbx retn
Parser * Parser::peek(Parser *this, _QWORD *a2, int a3) { unsigned long long v3; // rcx long long v4; // rax v3 = a2[3] + a3; if ( v3 >= (a2[1] - *a2) / 48LL ) { *((_BYTE *)this + 48) = 0; } else { v4 = std::vector<Token>::at(a2, v3, (a2[1] - *a2) % 48LL); std::_Optional_payload_base<Token>::_Optional_payload_base<Token const&>(this, v4); } return this; }
peek: PUSH RBX MOV RBX,RDI MOVSXD RCX,EDX ADD RCX,qword ptr [RSI + 0x18] MOV RAX,qword ptr [RSI + 0x8] SUB RAX,qword ptr [RSI] PUSH 0x30 POP RDI CQO IDIV RDI CMP RCX,RAX JNC 0x00103a7b MOV RDI,RSI MOV RSI,RCX CALL 0x001043f8 MOV RDI,RBX MOV RSI,RAX CALL 0x0010443e JMP 0x00103a7f LAB_00103a7b: MOV byte ptr [RBX + 0x30],0x0 LAB_00103a7f: MOV RAX,RBX POP RBX RET
/* Parser::peek(int) const */ long Parser::peek(int param_1) { int8 uVar1; int in_EDX; vector<Token,std::allocator<Token>> *in_RSI; int4 in_register_0000003c; long lVar2; lVar2 = CONCAT44(in_register_0000003c,param_1); if ((ulong)((long)in_EDX + *(long *)(in_RSI + 0x18)) < (ulong)((*(long *)(in_RSI + 8) - *(long *)in_RSI) / 0x30)) { uVar1 = std::vector<Token,std::allocator<Token>>::at (in_RSI,(long)in_EDX + *(long *)(in_RSI + 0x18)); std::_Optional_payload_base<Token>::_Optional_payload_base<Token_const&>(lVar2,uVar1); } else { *(int1 *)(lVar2 + 0x30) = 0; } return lVar2; }
13,863
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
static ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O0
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x77800 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x7774b jmp 0x77755 movq -0x10(%rbp), %rax addq $0x50, %rsp popq %rbp retq movb $0x1, -0x45(%rbp) movl $0x20, %edi callq 0xa250 movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x6d310 movq %rax, -0x38(%rbp) leaq 0x1d13c(%rip), %rsi # 0x948b7 leaq -0x30(%rbp), %rdi leaq -0x38(%rbp), %rdx callq 0x76680 jmp 0x7778a movq -0x50(%rbp), %rdi movq -0x8(%rbp), %rcx movl $0x12f, %esi # imm = 0x12F leaq -0x30(%rbp), %rdx callq 0x6d0c0 jmp 0x777a2 movq -0x50(%rbp), %rdi movb $0x0, -0x45(%rbp) leaq 0x6943f(%rip), %rsi # 0xe0bf0 leaq -0xb268(%rip), %rdx # 0x6c550 callq 0xa690 jmp 0x777fe movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x777e2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rdi callq 0xb6c0 testb $0x1, -0x45(%rbp) jne 0x777ea jmp 0x777f3 movq -0x50(%rbp), %rdi callq 0xa350 jmp 0x777f5 movq -0x40(%rbp), %rdi callq 0xa6c0 nop
_ZN8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKNS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEKSD_EET_RT0_: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKNS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEETnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISP_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISP_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISP_EEEEv mov [rbp+var_10], rax cmp [rbp+var_10], 0 setnz al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_7774B jmp short loc_77755 loc_7774B: mov rax, [rbp+var_10] add rsp, 50h pop rbp retn loc_77755: mov [rbp+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<uchar>,void>::type_name(void) mov [rbp+var_38], rax lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rbp+var_30] lea rdx, [rbp+var_38] call _ZN8nlohmann16json_abi_v3_12_06detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) jmp short $+2 loc_7778A: mov rdi, [rbp+var_50] mov rcx, [rbp+var_8] mov esi, 12Fh lea rdx, [rbp+var_30] call _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_777A2: mov rdi, [rbp+var_50]; void * mov [rbp+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw
long long nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<nlohmann::json_abi_v3_12_0::ordered_map<std::string,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>>>> const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void> const>( _BYTE *a1) { nlohmann::json_abi_v3_12_0::detail::type_error *exception; // [rsp+0h] [rbp-50h] nlohmann::json_abi_v3_12_0::detail *v3; // [rsp+18h] [rbp-38h] BYREF _QWORD v4[4]; // [rsp+20h] [rbp-30h] BYREF long long v5; // [rsp+40h] [rbp-10h] _BYTE *v6; // [rsp+48h] [rbp-8h] v6 = a1; v5 = ZNK8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKNS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEETnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISP_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISP_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISP_EEEEv(a1); if ( !v5 ) { exception = (nlohmann::json_abi_v3_12_0::detail::type_error *)__cxa_allocate_exception(0x20uLL); v3 = (nlohmann::json_abi_v3_12_0::detail *)nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::type_name(v6); nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>( v4, (long long)"incompatible ReferenceType for get_ref, actual type is ", &v3); ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 303, (long long)v4, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_12_0::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_12_0::detail::type_error::~type_error); } return v5; }
get_ref_impl<nlohmann::json_abi_v3_12_0::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00177800 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0017774b JMP 0x00177755 LAB_0017774b: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x50 POP RBP RET LAB_00177755: MOV byte ptr [RBP + -0x45],0x1 MOV EDI,0x20 CALL 0x0010a250 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016d310 MOV qword ptr [RBP + -0x38],RAX LAB_00177774: LEA RSI,[0x1948b7] LEA RDI,[RBP + -0x30] LEA RDX,[RBP + -0x38] CALL 0x00176680 JMP 0x0017778a LAB_0017778a: MOV RDI,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x8] LAB_00177792: MOV ESI,0x12f LEA RDX,[RBP + -0x30] CALL 0x0016d0c0 JMP 0x001777a2 LAB_001777a2: MOV RDI,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0x45],0x0 LEA RSI,[0x1e0bf0] LEA RDX,[0x16c550] CALL 0x0010a690
/* nlohmann::json_abi_v3_12_0::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<nlohmann::json_abi_v3_12_0::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > > const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ ordered_map * nlohmann::json_abi_v3_12_0:: basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<nlohmann::json_abi_v3_12_0::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; ordered_map *local_18; basic_json *local_10; local_10 = param_1; local_18 = (ordered_map *) _ZNK8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKNS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEETnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISP_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISP_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISP_EEEEv (param_1); if (local_18 == (ordered_map *)0x0) { uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_10); /* try { // try from 00177774 to 00177787 has its CatchHandler @ 001777bf */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 00177792 to 001777bc has its CatchHandler @ 001777cd */ _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12f,local_38,local_10); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::type_error::~type_error); } return local_18; }
13,864
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
static ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O1
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x2c908 movq 0x8(%r14), %rax testq %rax, %rax je 0x2c908 addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x81d0 movq %rax, %rbx movq %r14, %rdi callq 0x2b0f6 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0xafaf(%rip), %rsi # 0x378db leaq 0x10(%rsp), %rdi callq 0x2c9a1 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12f, %esi # imm = 0x12F movq %r14, %rcx callq 0x2aea2 xorl %ebp, %ebp leaq 0x212c9(%rip), %rsi # 0x4dc20 leaq 0x2106(%rip), %rdx # 0x2ea64 movq %rbx, %rdi callq 0x85c0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2c98c movq 0x20(%rsp), %rsi incq %rsi callq 0x8380 jmp 0x2c98c movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x2c999 movq %rbx, %rdi callq 0x82a0 movq %r14, %rdi callq 0x85d0
_ZN8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_2C908 mov rax, [r14+8] test rax, rax jz short loc_2C908 add rsp, 30h pop rbx pop r14 pop rbp retn loc_2C908: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_12_06detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Fh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2C98C mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2C98C mov r14, rax mov bpl, 1 loc_2C98C: test bpl, bpl jz short loc_2C999 mov rdi, rbx; void * call ___cxa_free_exception loc_2C999: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void> const>( long long a1) { long long result; // rax nlohmann::json_abi_v3_12_0::detail::exception *exception; // rbx _BYTE v3[16]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 ) { exception = (nlohmann::json_abi_v3_12_0::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>( v3, "incompatible ReferenceType for get_ref, actual type is "); ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 303, (long long)v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_12_0::detail::type_error, nlohmann::json_abi_v3_12_0::detail::exception::~exception); } return result; }
get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x0012c908 MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x0012c908 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0012c908: MOV EDI,0x20 CALL 0x001081d0 MOV RBX,RAX MOV RDI,R14 CALL 0x0012b0f6 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0012c925: LEA RSI,[0x1378db] LEA RDI,[RSP + 0x10] CALL 0x0012c9a1 MOV BPL,0x1 LAB_0012c939: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12f MOV RCX,R14 CALL 0x0012aea2 XOR EBP,EBP LEA RSI,[0x14dc20] LEA RDX,[0x12ea64] MOV RDI,RBX CALL 0x001085c0
/* std::__cxx11::string const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<std::__cxx11::string const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ string * nlohmann::json_abi_v3_12_0:: basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) { return *(string **)(param_1 + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_12_0::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 0012c925 to 0012c935 has its CatchHandler @ 0012c986 */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 0012c939 to 0012c965 has its CatchHandler @ 0012c966 */ _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12f,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
13,865
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
shubhamoy[P]dir2txt/include/nlohmann/json.hpp
static ReferenceType get_ref_impl(ThisType& obj) { // delegate the call to get_ptr<>() auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const& nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>(nlohmann::json_abi_v3_12_0::basic_json<nlohmann::json_abi_v3_12_0::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_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x31ce8 movq 0x8(%r14), %rax testq %rax, %rax je 0x31ce8 addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x81d0 movq %rax, %rbx movq %r14, %rdi callq 0x2d976 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x5bcf(%rip), %rsi # 0x378db leaq 0x10(%rsp), %rdi callq 0x2c606 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12f, %esi # imm = 0x12F movq %r14, %rcx callq 0x31a36 xorl %ebp, %ebp leaq 0x1bee9(%rip), %rsi # 0x4dc20 leaq -0x36ce(%rip), %rdx # 0x2e670 movq %rbx, %rdi callq 0x85c0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x31d64 movq 0x20(%rsp), %rsi incq %rsi callq 0x8380 testb %bpl, %bpl jne 0x31d6e jmp 0x31d76 movq %rax, %r14 movq %rbx, %rdi callq 0x82a0 movq %r14, %rdi callq 0x85d0
_ZN8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_31CE8 mov rax, [r14+8] test rax, rax jz short loc_31CE8 add rsp, 30h pop rbx pop r14 pop rbp retn loc_31CE8: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_12_010basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_12_06detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Fh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_12_06detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_12_06detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_31D64 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31D64: test bpl, bpl jnz short loc_31D6E jmp short loc_31D76 mov r14, rax loc_31D6E: mov rdi, rbx; void * call ___cxa_free_exception loc_31D76: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string&,nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>>( long long a1) { long long result; // rax nlohmann::json_abi_v3_12_0::detail::exception *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _BYTE v4[16]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 ) { exception = (nlohmann::json_abi_v3_12_0::detail::exception *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_12_0::detail::concat<std::string,char const(&)[56],char const*>( (long long)v4, (long long)"incompatible ReferenceType for get_ref, actual type is ", (long long *)&v3); ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 303, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_12_0::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_12_0::detail::exception::~exception); } return result; }
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x00131ce8 MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x00131ce8 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00131ce8: MOV EDI,0x20 CALL 0x001081d0 MOV RBX,RAX MOV RDI,R14 CALL 0x0012d976 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00131d05: LEA RSI,[0x1378db] LEA RDI,[RSP + 0x10] CALL 0x0012c606 MOV BPL,0x1 LAB_00131d19: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12f MOV RCX,R14 CALL 0x00131a36 XOR EBP,EBP LEA RSI,[0x14dc20] LEA RDX,[0x12e670] MOV RDI,RBX CALL 0x001085c0
/* std::__cxx11::string& nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::get_ref_impl<std::__cxx11::string&, nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_12_0::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_12_0::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&) */ string * nlohmann::json_abi_v3_12_0:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_12_0::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) { return *(string **)(param_1 + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name((basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_12_0::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 00131d05 to 00131d15 has its CatchHandler @ 00131d6b */ detail::concat<std::__cxx11::string,char_const(&)[56],char_const*> (local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40); /* try { // try from 00131d19 to 00131d45 has its CatchHandler @ 00131d46 */ _ZN8nlohmann16json_abi_v3_12_06detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x12f,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
13,866
my_hash_sort_ucs2_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_bin(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len); my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2); }
O3
c
my_hash_sort_ucs2_bin: movq %rdx, %rax cmpq $0x2, %rdx jl 0x531a9 cmpb $0x20, -0x1(%rsi,%rax) jne 0x531a1 leaq -0x2(%rax), %rdx cmpb $0x0, -0x2(%rsi,%rax) je 0x53186 movq (%rcx), %rdx movq (%r8), %rdi jmp 0x531b5 movq (%rcx), %rdx movq (%r8), %rdi cmpq $0x1, %rax jne 0x531e8 pushq %rbp movq %rsp, %rbp addq %rsi, %rax movl %edx, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rdx, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rdx addq $0x3, %rdi incq %rsi cmpq %rax, %rsi jb 0x531bc popq %rbp movq %rdx, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_ucs2_bin: mov rax, rdx cmp rdx, 2 jl short loc_531A9 cmp byte ptr [rsi+rax-1], 20h ; ' ' jnz short loc_531A1 lea rdx, [rax-2] cmp byte ptr [rsi+rax-2], 0 jz short my_hash_sort_ucs2_bin loc_531A1: mov rdx, [rcx] mov rdi, [r8] jmp short loc_531B5 loc_531A9: mov rdx, [rcx] mov rdi, [r8] cmp rax, 1 jnz short loc_531E8 loc_531B5: push rbp mov rbp, rsp add rax, rsi loc_531BC: mov r9d, edx and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rdx shl r9, 8 add r9, r10 xor rdx, r9 add rdi, 3 inc rsi cmp rsi, rax jb short loc_531BC pop rbp loc_531E8: mov [rcx], rdx mov [r8], rdi retn
unsigned long long my_hash_sort_ucs2_bin( long long a1, unsigned long long a2, long long a3, long long *a4, long long *a5) { unsigned long long result; // rax long long v6; // rdx long long v7; // rdi while ( 1 ) { result = a3; if ( a3 < 2 ) break; if ( *(_BYTE *)(a2 + a3 - 1) == 32 ) { a3 -= 2LL; if ( !*(_BYTE *)(a2 + result - 2) ) continue; } v6 = *a4; v7 = *a5; goto LABEL_6; } v6 = *a4; v7 = *a5; if ( result != 1 ) goto LABEL_8; LABEL_6: result += a2; do { v6 ^= (v7 + (v6 & 0x3F)) * *(unsigned __int8 *)a2 + (v6 << 8); v7 += 3LL; ++a2; } while ( a2 < result ); LABEL_8: *a4 = v6; *a5 = v7; return result; }
my_hash_sort_ucs2_bin: MOV RAX,RDX CMP RDX,0x2 JL 0x001531a9 CMP byte ptr [RSI + RAX*0x1 + -0x1],0x20 JNZ 0x001531a1 LEA RDX,[RAX + -0x2] CMP byte ptr [RSI + RAX*0x1 + -0x2],0x0 JZ 0x00153186 LAB_001531a1: MOV RDX,qword ptr [RCX] MOV RDI,qword ptr [R8] JMP 0x001531b5 LAB_001531a9: MOV RDX,qword ptr [RCX] MOV RDI,qword ptr [R8] CMP RAX,0x1 JNZ 0x001531e8 LAB_001531b5: PUSH RBP MOV RBP,RSP ADD RAX,RSI LAB_001531bc: MOV R9D,EDX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RDX SHL R9,0x8 ADD R9,R10 XOR RDX,R9 ADD RDI,0x3 INC RSI CMP RSI,RAX JC 0x001531bc POP RBP LAB_001531e8: MOV qword ptr [RCX],RDX MOV qword ptr [R8],RDI RET
void my_hash_sort_ucs2_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { byte *pbVar1; long lVar2; ulong uVar3; long lVar4; do { lVar2 = param_3; if (lVar2 < 2) { uVar3 = *param_4; lVar4 = *param_5; if (lVar2 != 1) goto LAB_001531e8; goto LAB_001531b5; } } while ((param_2[lVar2 + -1] == 0x20) && (param_3 = lVar2 + -2, param_2[lVar2 + -2] == 0)); uVar3 = *param_4; lVar4 = *param_5; LAB_001531b5: pbVar1 = param_2 + lVar2; do { uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4); lVar4 = lVar4 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar1); LAB_001531e8: *param_4 = uVar3; *param_5 = lVar4; return; }
13,867
my_thread_destroy_common_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_common_mutex(void) { mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_destroy(&THR_LOCK_net); mysql_mutex_destroy(&THR_LOCK_charset); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_destroy(&LOCK_localtime_r); #endif }
O0
c
my_thread_destroy_common_mutex: pushq %rbp movq %rsp, %rbp leaq 0xb8d535(%rip), %rdi # 0xc83330 callq 0xf5e50 leaq 0xb8d571(%rip), %rdi # 0xc83378 callq 0xf5e50 leaq 0xb8d5ad(%rip), %rdi # 0xc833c0 callq 0xf5e50 leaq 0xb8d5e9(%rip), %rdi # 0xc83408 callq 0xf5e50 leaq 0xb8d625(%rip), %rdi # 0xc83450 callq 0xf5e50 leaq 0xb8d661(%rip), %rdi # 0xc83498 callq 0xf5e50 leaq 0xb8d69d(%rip), %rdi # 0xc834e0 callq 0xf5e50 popq %rbp retq nopw (%rax,%rax)
my_thread_destroy_common_mutex: push rbp mov rbp, rsp lea rdi, THR_LOCK_open call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_lock call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_myisam call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_heap call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_net call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_charset call inline_mysql_mutex_destroy_9 pop rbp retn
long long my_thread_destroy_common_mutex() { inline_mysql_mutex_destroy_9(&THR_LOCK_open); inline_mysql_mutex_destroy_9(&THR_LOCK_lock); inline_mysql_mutex_destroy_9(&THR_LOCK_myisam); inline_mysql_mutex_destroy_9(&THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy_9(&THR_LOCK_heap); inline_mysql_mutex_destroy_9(&THR_LOCK_net); return inline_mysql_mutex_destroy_9(&THR_LOCK_charset); }
my_thread_destroy_common_mutex: PUSH RBP MOV RBP,RSP LEA RDI,[0xd83330] CALL 0x001f5e50 LEA RDI,[0xd83378] CALL 0x001f5e50 LEA RDI,[0xd833c0] CALL 0x001f5e50 LEA RDI,[0xd83408] CALL 0x001f5e50 LEA RDI,[0xd83450] CALL 0x001f5e50 LEA RDI,[0xd83498] CALL 0x001f5e50 LEA RDI,[0xd834e0] CALL 0x001f5e50 POP RBP RET
void my_thread_destroy_common_mutex(void) { inline_mysql_mutex_destroy(THR_LOCK_open); inline_mysql_mutex_destroy(THR_LOCK_lock); inline_mysql_mutex_destroy(THR_LOCK_myisam); inline_mysql_mutex_destroy(THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy(THR_LOCK_heap); inline_mysql_mutex_destroy(THR_LOCK_net); inline_mysql_mutex_destroy(THR_LOCK_charset); return; }
13,868
google::protobuf::EnumValueOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(google::protobuf::Arena*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::EnumValueOptions* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions >(Arena* arena) { return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions >(arena); }
O0
cpp
google::protobuf::EnumValueOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(google::protobuf::Arena*): subq $0xb8, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0xd2b5f movl $0x50, %edi callq 0x13450 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) xorl %edx, %edx movl %edx, %esi callq 0xc5520 jmp 0xd2b50 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) callq 0x13400 movq 0x38(%rsp), %rdi callq 0x13750 movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) jmp 0xd2d13 movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, (%rsp) movq %rax, 0x98(%rsp) movq $0x50, 0x90(%rsp) movq $0x8, 0x88(%rsp) movq $0x0, 0x80(%rsp) leaq 0x1a6683(%rip), %rax # 0x279228 movq %rax, 0x78(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x80(%rsp) jne 0xd2bee movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x78(%rsp), %rcx callq 0xdf5f0 movq %rax, 0xa0(%rsp) jmp 0xd2cf3 cmpq $0x8, 0x88(%rsp) ja 0xd2c52 movq 0x90(%rsp), %rdi callq 0xdf6a0 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x78(%rsp), %rdx callq 0x1816c0 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x68(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0xd2cf3 movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi addq 0x88(%rsp), %rsi subq $0x8, %rsi movq 0x78(%rsp), %rdx callq 0x1816c0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x88(%rsp), %rax movq %rcx, 0xb0(%rsp) movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax addq 0xa8(%rsp), %rax subq $0x1, %rax movq 0xa8(%rsp), %rcx xorq $-0x1, %rcx addq $0x1, %rcx andq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x50(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rsp), %rax movq 0xa0(%rsp), %rdi movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rsi callq 0xe3e40 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax addq $0xb8, %rsp retq
_ZN6google8protobuf5Arena18CreateMaybeMessageINS0_16EnumValueOptionsEJEEEPT_PS1_DpOT0_: sub rsp, 0B8h mov [rsp+0B8h+var_A0], rdi mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_98], rax cmp [rsp+0B8h+var_98], 0 jnz short loc_D2B5F mov edi, 50h ; 'P'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_A8], rax xor edx, edx; bool mov esi, edx; google::protobuf::Arena * call _ZN6google8protobuf16EnumValueOptionsC2EPNS0_5ArenaEb; google::protobuf::EnumValueOptions::EnumValueOptions(google::protobuf::Arena *,bool) jmp short loc_D2B50 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax call __ZdlPv; operator delete(void *) mov rdi, [rsp+arg_30] call __Unwind_Resume loc_D2B50: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_90], rax jmp loc_D2D13 loc_D2B5F: mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_70], rax mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_B8], rax mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 50h ; 'P' mov [rsp+0B8h+var_30], 8 mov [rsp+0B8h+var_38], 0 lea rax, _ZTIN6google8protobuf16EnumValueOptionsE; `typeinfo for'google::protobuf::EnumValueOptions mov [rsp+0B8h+var_40], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_B0], rax cmp [rsp+0B8h+var_38], 0 jnz short loc_D2BEE mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28]; unsigned __int64 mov rdx, [rsp+0B8h+var_30]; unsigned __int64 mov rcx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,ulong,std::type_info const*) mov [rsp+0B8h+var_18], rax jmp loc_D2CF3 loc_D2BEE: cmp [rsp+0B8h+var_30], 8 ja short loc_D2C52 mov rdi, [rsp+0B8h+var_28]; this call _ZN6google8protobuf8internal10AlignUpTo8Em; google::protobuf::internal::AlignUpTo8(ulong) mov rdi, [rsp+0B8h+var_B0]; this mov rsi, rax; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_50], rax mov [rsp+0B8h+var_48], rdx mov rcx, [rsp+0B8h+var_50] mov rax, [rsp+0B8h+var_48] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_48] mov [rax+8], rcx mov rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_18], rax jmp loc_D2CF3 loc_D2C52: mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28] add rsi, [rsp+0B8h+var_30] sub rsi, 8; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_60], rax mov [rsp+0B8h+var_58], rdx mov rcx, [rsp+0B8h+var_60] mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_8], rcx mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_8] add rax, [rsp+0B8h+var_10] sub rax, 1 mov rcx, [rsp+0B8h+var_10] xor rcx, 0FFFFFFFFFFFFFFFFh add rcx, 1 and rax, rcx mov [rsp+0B8h+var_68], rax mov rcx, [rsp+0B8h+var_68] mov rax, [rsp+0B8h+var_58] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_58] mov [rax+8], rcx mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_18], rax loc_D2CF3: mov rax, [rsp+0B8h+var_B8] mov rdi, [rsp+0B8h+var_18] mov [rsp+0B8h+var_78], rax lea rsi, [rsp+0B8h+var_78] call _ZN6google8protobuf5Arena14InternalHelperINS0_16EnumValueOptionsEE9ConstructIJPS1_EEEPS3_PvDpOT_; google::protobuf::Arena::InternalHelper<google::protobuf::EnumValueOptions>::Construct<google::protobuf::Arena*>(void *,google::protobuf::Arena* &&) mov [rsp+0B8h+var_90], rax loc_D2D13: mov rax, [rsp+0B8h+var_90] add rsp, 0B8h retn
google::protobuf::EnumValueOptions * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>( google::protobuf::Arena *a1) { google::protobuf::EnumValueOptions *v2; // [rsp+10h] [rbp-A8h] _QWORD v4[12]; // [rsp+40h] [rbp-78h] BYREF long long AlignedWithHook; // [rsp+A0h] [rbp-18h] if ( a1 ) { v4[1] = a1; v4[11] = a1; v4[10] = 80LL; v4[9] = 8LL; v4[8] = 0LL; v4[7] = &`typeinfo for'google::protobuf::EnumValueOptions; AlignedWithHook = google::protobuf::Arena::AllocateAlignedWithHook( a1, 0x50uLL, 8uLL, (const type_info *)&`typeinfo for'google::protobuf::EnumValueOptions); v4[0] = a1; return (google::protobuf::EnumValueOptions *)google::protobuf::Arena::InternalHelper<google::protobuf::EnumValueOptions>::Construct<google::protobuf::Arena*>( AlignedWithHook, v4); } else { v2 = (google::protobuf::EnumValueOptions *)operator new(0x50uLL); google::protobuf::EnumValueOptions::EnumValueOptions(v2, 0LL, 0); return v2; } }
CreateMaybeMessage<google::protobuf::EnumValueOptions>: SUB RSP,0xb8 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001d2b5f MOV EDI,0x50 CALL 0x00113450 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX LAB_001d2b23: XOR EDX,EDX MOV ESI,EDX CALL 0x001c5520 LAB_001d2b2c: JMP 0x001d2b50 LAB_001d2b50: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX JMP 0x001d2d13 LAB_001d2b5f: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0x90],0x50 MOV qword ptr [RSP + 0x88],0x8 MOV qword ptr [RSP + 0x80],0x0 LEA RAX,[0x379228] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x80],0x0 JNZ 0x001d2bee MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x78] CALL 0x001df5f0 MOV qword ptr [RSP + 0xa0],RAX JMP 0x001d2cf3 LAB_001d2bee: CMP qword ptr [RSP + 0x88],0x8 JA 0x001d2c52 MOV RDI,qword ptr [RSP + 0x90] CALL 0x001df6a0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x78] CALL 0x002816c0 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xa0],RAX JMP 0x001d2cf3 LAB_001d2c52: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] ADD RSI,qword ptr [RSP + 0x88] SUB RSI,0x8 MOV RDX,qword ptr [RSP + 0x78] CALL 0x002816c0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] ADD RAX,qword ptr [RSP + 0xa8] SUB RAX,0x1 MOV RCX,qword ptr [RSP + 0xa8] XOR RCX,-0x1 ADD RCX,0x1 AND RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa0],RAX LAB_001d2cf3: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x40],RAX LEA RSI,[RSP + 0x40] CALL 0x001e3e40 MOV qword ptr [RSP + 0x28],RAX LAB_001d2d13: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0xb8 RET
/* WARNING: Removing unreachable block (ram,0x001d2bee) */ /* WARNING: Removing unreachable block (ram,0x001d2bf9) */ /* WARNING: Removing unreachable block (ram,0x001d2c52) */ /* google::protobuf::EnumValueOptions* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(google::protobuf::Arena*) */ EnumValueOptions * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumValueOptions>(Arena *param_1) { EnumValueOptions *local_90; Arena *local_78; Arena *local_70; pointer_____offset_0x10___ *local_40; int8 local_38; int8 local_30; int8 local_28; Arena *local_20; void *local_18; if (param_1 == (Arena *)0x0) { local_90 = (EnumValueOptions *)operator_new(0x50); /* try { // try from 001d2b23 to 001d2b2b has its CatchHandler @ 001d2b2e */ EnumValueOptions::EnumValueOptions(local_90,(Arena *)0x0,false); } else { local_28 = 0x50; local_30 = 8; local_38 = 0; local_40 = &EnumValueOptions::typeinfo; local_70 = param_1; local_20 = param_1; local_18 = (void *)AllocateAlignedWithHook (param_1,0x50,8,(type_info *)&EnumValueOptions::typeinfo); local_78 = param_1; local_90 = InternalHelper<google::protobuf::EnumValueOptions>:: Construct<google::protobuf::Arena*>(local_18,&local_78); } return local_90; }
13,869
mi_unmap_file
eloqsql/storage/myisam/mi_packrec.c
void _mi_unmap_file(MI_INFO *info) { DBUG_ASSERT(info->s->options & HA_OPTION_COMPRESS_RECORD); (void) my_munmap((char*) info->s->file_map, info->s->mmaped_length); if (myisam_mmap_size != SIZE_T_MAX) { mysql_mutex_lock(&THR_LOCK_myisam_mmap); myisam_mmap_used-= info->s->mmaped_length; mysql_mutex_unlock(&THR_LOCK_myisam_mmap); } }
O0
c
mi_unmap_file: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xbda4e movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x270(%rax), %rdi movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rsi callq 0x29440 leaq 0x202762(%rip), %rax # 0x2c01d8 cmpq $-0x1, (%rax) je 0xbdac5 leaq 0xbc79e5(%rip), %rdi # 0xc85468 leaq 0x9713d(%rip), %rsi # 0x154bc7 movl $0x61b, %edx # imm = 0x61B callq 0xbd710 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x4d0(%rax), %rax leaq 0xbbebb7(%rip), %rcx # 0xc7c660 movq (%rcx), %rcx subq %rax, %rcx leaq 0xbbebaa(%rip), %rax # 0xc7c660 movq %rcx, (%rax) leaq 0xbc79a8(%rip), %rdi # 0xc85468 callq 0xbd780 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_mi_unmap_file: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_BDA4E: mov rax, [rbp+var_8] mov rax, [rax] mov rdi, [rax+270h] mov rax, [rbp+var_8] mov rax, [rax] mov rsi, [rax+4D0h] call _munmap lea rax, myisam_mmap_size cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh jz short loc_BDAC5 lea rdi, THR_LOCK_myisam_mmap lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 61Bh call inline_mysql_mutex_lock_21 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+4D0h] lea rcx, myisam_mmap_used mov rcx, [rcx] sub rcx, rax lea rax, myisam_mmap_used mov [rax], rcx lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_unlock_22 loc_BDAC5: add rsp, 10h pop rbp retn
_QWORD * mi_unmap_file(long long a1) { _QWORD *result; // rax munmap(*(_QWORD *)(*(_QWORD *)a1 + 624LL), *(_QWORD *)(*(_QWORD *)a1 + 1232LL)); result = &myisam_mmap_size; if ( myisam_mmap_size != -1LL ) { inline_mysql_mutex_lock_21( (long long)&THR_LOCK_myisam_mmap, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x61Bu); myisam_mmap_used -= *(_QWORD *)(*(_QWORD *)a1 + 1232LL); return (_QWORD *)inline_mysql_mutex_unlock_22((long long)&THR_LOCK_myisam_mmap); } return result; }
_mi_unmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001bda4e LAB_001bda4e: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x270] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x4d0] CALL 0x00129440 LEA RAX,[0x3c01d8] CMP qword ptr [RAX],-0x1 JZ 0x001bdac5 LEA RDI,[0xd85468] LEA RSI,[0x254bc7] MOV EDX,0x61b CALL 0x001bd710 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x4d0] LEA RCX,[0xd7c660] MOV RCX,qword ptr [RCX] SUB RCX,RAX LEA RAX,[0xd7c660] MOV qword ptr [RAX],RCX LEA RDI,[0xd85468] CALL 0x001bd780 LAB_001bdac5: ADD RSP,0x10 POP RBP RET
void _mi_unmap_file(long *param_1) { munmap(*(void **)(*param_1 + 0x270),*(size_t *)(*param_1 + 0x4d0)); if (myisam_mmap_size != -1) { inline_mysql_mutex_lock (THR_LOCK_myisam_mmap, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x61b); myisam_mmap_used = myisam_mmap_used - *(long *)(*param_1 + 0x4d0); inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap); } return; }
13,870
normalize_dirname
eloqsql/mysys/mf_pack.c
size_t normalize_dirname(char *to, const char *from) { size_t length; char buff[FN_REFLEN + 1]; DBUG_ENTER("normalize_dirname"); /* Despite the name, this actually converts the name to the system's format (TODO: name this properly). */ (void) intern_filename(buff, from); length= strlen(buff); /* Fix that '/' is last */ if (length && #ifdef FN_DEVCHAR buff[length - 1] != FN_DEVCHAR && #endif buff[length - 1] != FN_LIBCHAR && buff[length - 1] != '/') { /* we need reserve 2 bytes for the trailing slash and the zero */ if (length >= sizeof (buff) - 1) length= sizeof (buff) - 2; buff[length]= FN_LIBCHAR; buff[length + 1]= '\0'; } length=cleanup_dirname(to, buff); DBUG_RETURN(length); }
O3
c
normalize_dirname: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) leaq -0x220(%rbp), %r14 movq %r14, %rdi callq 0x4fa0d movq %r14, %rdi callq 0x25120 testq %rax, %rax je 0x4fd63 cmpb $0x2f, -0x1(%rax,%r14) je 0x4fd63 movl $0x1ff, %ecx # imm = 0x1FF cmpq %rcx, %rax cmovbq %rax, %rcx movw $0x2f, -0x220(%rbp,%rcx) leaq -0x220(%rbp), %rsi movq %rbx, %rdi callq 0x4faa3 movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x4fd8d addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r14 popq %rbp retq callq 0x25320
normalize_dirname: push rbp mov rbp, rsp push r14 push rbx sub rsp, 210h mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax lea r14, [rbp+var_220] mov rdi, r14 call intern_filename mov rdi, r14 call _strlen test rax, rax jz short loc_4FD63 cmp byte ptr [rax+r14-1], 2Fh ; '/' jz short loc_4FD63 mov ecx, 1FFh cmp rax, rcx cmovb rcx, rax mov [rbp+rcx+var_220], 2Fh ; '/' loc_4FD63: lea rsi, [rbp+var_220] mov rdi, rbx call cleanup_dirname mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_4FD8D add rsp, 210h pop rbx pop r14 pop rbp retn loc_4FD8D: call ___stack_chk_fail
long long normalize_dirname(long long a1, long long a2) { unsigned long long v2; // rax long long v3; // rcx unsigned __int8 v5[520]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v6; // [rsp+208h] [rbp-18h] v6 = __readfsqword(0x28u); intern_filename((long long)v5, a2); v2 = strlen(v5); if ( v2 && v5[v2 - 1] != 47 ) { v3 = 511LL; if ( v2 < 0x1FF ) v3 = v2; *(_WORD *)&v5[v3] = 47; } return cleanup_dirname(a1, v5); }
normalize_dirname: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x210 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX LEA R14,[RBP + -0x220] MOV RDI,R14 CALL 0x0014fa0d MOV RDI,R14 CALL 0x00125120 TEST RAX,RAX JZ 0x0014fd63 CMP byte ptr [RAX + R14*0x1 + -0x1],0x2f JZ 0x0014fd63 MOV ECX,0x1ff CMP RAX,RCX CMOVC RCX,RAX MOV word ptr [RBP + RCX*0x1 + -0x220],0x2f LAB_0014fd63: LEA RSI,[RBP + -0x220] MOV RDI,RBX CALL 0x0014faa3 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0014fd8d ADD RSP,0x210 POP RBX POP R14 POP RBP RET LAB_0014fd8d: CALL 0x00125320
void normalize_dirname(int8 param_1) { size_t sVar1; size_t sVar2; long in_FS_OFFSET; int8 uStack_230; char local_228 [520]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); uStack_230 = (code *)0x14fd38; intern_filename(local_228); uStack_230 = (code *)0x14fd40; sVar1 = strlen(local_228); if ((sVar1 != 0) && (local_228[sVar1 - 1] != '/')) { sVar2 = 0x1ff; if (sVar1 < 0x1ff) { sVar2 = sVar1; } (local_228 + sVar2)[0] = '/'; (local_228 + sVar2)[1] = '\0'; } uStack_230 = (code *)0x14fd72; cleanup_dirname(param_1,local_228); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ uStack_230 = unpack_dirname; __stack_chk_fail(); }
13,871
my_hash_sort_utf8mb4_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF)); if (wc > 0xFFFF) { /* Put the highest byte only if it is non-zero, to make hash functions for utf8mb3 and utf8mb4 compatible for BMP characters. This is useful to keep order of records in test results, e.g. for "SHOW GRANTS". */ MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF)); } s+= res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq %rdi, -0x30(%rbp) movq 0x78(%rdi), %r14 movq %rcx, -0x48(%rbp) movq (%rcx), %r13 movq %r8, -0x50(%rbp) movq (%r8), %rbx leaq -0x38(%rbp), %rdi movq %r15, %rdx callq 0x72046 testl %eax, %eax jle 0x72b4a movq -0x30(%rbp), %rcx movl 0xc(%rcx), %ecx movl %ecx, -0x3c(%rbp) movq %r14, -0x58(%rbp) movq (%r14), %rcx movq %rcx, -0x30(%rbp) movq -0x38(%rbp), %rcx movl $0xfffd, %esi # imm = 0xFFFD cmpq -0x30(%rbp), %rcx ja 0x72aa1 movq -0x58(%rbp), %rdx movq 0x8(%rdx), %rsi movq %rcx, %rdx shrq $0x8, %rdx movq (%rsi,%rdx,8), %rsi testq %rsi, %rsi je 0x72aad xorl %edx, %edx cmpw $0x0, -0x3c(%rbp) setns %dl movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rsi,%rcx,4), %rcx movl 0x4(%rcx,%rdx,4), %esi movq %rsi, -0x38(%rbp) movl %esi, %edx shrl $0x8, %edx movq %rsi, %rcx movl %r13d, %esi andl $0x3f, %esi addq %rbx, %rsi movq %rcx, %rdi movl $0xff, %r8d andq %r8, %rdi imulq %rsi, %rdi movq %r13, %rsi shlq $0x8, %rsi addq %rdi, %rsi xorq %r13, %rsi movl %esi, %edi andl $0x3f, %edi addq %rbx, %rdi addq $0x3, %rdi andq %r8, %rdx imulq %rdi, %rdx movq %rsi, %r13 shlq $0x8, %r13 addq %rdx, %r13 xorq %rsi, %r13 leaq 0x6(%rbx), %r14 cmpq $0x10000, %rcx # imm = 0x10000 jb 0x72b29 movl %r13d, %edx andl $0x3f, %edx addq %r14, %rdx shrl $0x10, %ecx movzbl %cl, %ecx imulq %rdx, %rcx movq %r13, %rdx shlq $0x8, %rdx addq %rcx, %rdx xorq %rdx, %r13 addq $0x9, %rbx movq %rbx, %r14 jmp 0x72b2c movq %r14, %rbx movl %eax, %eax addq %rax, %r12 leaq -0x38(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x72046 testl %eax, %eax jg 0x72a61 jmp 0x72b4d movq %rbx, %r14 movq -0x48(%rbp), %rax movq %r13, (%rax) movq -0x50(%rbp), %rax movq %r14, (%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rdx mov r12, rsi add r15, rsi mov [rbp+var_30], rdi mov r14, [rdi+78h] mov [rbp+var_48], rcx mov r13, [rcx] mov [rbp+var_50], r8 mov rbx, [r8] lea rdi, [rbp+var_38] mov rdx, r15 call my_mb_wc_utf8mb4_quick_0 test eax, eax jle loc_72B4A mov rcx, [rbp+var_30] mov ecx, [rcx+0Ch] mov [rbp+var_3C], ecx mov [rbp+var_58], r14 mov rcx, [r14] mov [rbp+var_30], rcx loc_72A61: mov rcx, [rbp+var_38] mov esi, 0FFFDh cmp rcx, [rbp+var_30] ja short loc_72AA1 mov rdx, [rbp+var_58] mov rsi, [rdx+8] mov rdx, rcx shr rdx, 8 mov rsi, [rsi+rdx*8] test rsi, rsi jz short loc_72AAD xor edx, edx cmp word ptr [rbp+var_3C], 0 setns dl movzx ecx, cl lea rcx, [rcx+rcx*2] lea rcx, [rsi+rcx*4] mov esi, [rcx+rdx*4+4] loc_72AA1: mov [rbp+var_38], rsi mov edx, esi shr edx, 8 mov rcx, rsi loc_72AAD: mov esi, r13d and esi, 3Fh add rsi, rbx mov rdi, rcx mov r8d, 0FFh and rdi, r8 imul rdi, rsi mov rsi, r13 shl rsi, 8 add rsi, rdi xor rsi, r13 mov edi, esi and edi, 3Fh add rdi, rbx add rdi, 3 and rdx, r8 imul rdx, rdi mov r13, rsi shl r13, 8 add r13, rdx xor r13, rsi lea r14, [rbx+6] cmp rcx, 10000h jb short loc_72B29 mov edx, r13d and edx, 3Fh add rdx, r14 shr ecx, 10h movzx ecx, cl imul rcx, rdx mov rdx, r13 shl rdx, 8 add rdx, rcx xor r13, rdx add rbx, 9 mov r14, rbx jmp short loc_72B2C loc_72B29: mov rbx, r14 loc_72B2C: mov eax, eax add r12, rax lea rdi, [rbp+var_38] mov rsi, r12 mov rdx, r15 call my_mb_wc_utf8mb4_quick_0 test eax, eax jg loc_72A61 jmp short loc_72B4D loc_72B4A: mov r14, rbx loc_72B4D: mov rax, [rbp+var_48] mov [rax], r13 mov rax, [rbp+var_50] mov [rax], r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad( unsigned long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { unsigned __int8 *v5; // r12 unsigned long long v6; // r15 unsigned long long *v7; // r14 long long v8; // r13 long long v9; // rbx int v10; // eax unsigned long long v11; // rcx long long v12; // rsi unsigned long long v13; // rdx long long v14; // rsi long long v15; // r14 _QWORD *result; // rax unsigned long long *v17; // [rsp+8h] [rbp-58h] int v20; // [rsp+24h] [rbp-3Ch] unsigned long long v21; // [rsp+28h] [rbp-38h] BYREF unsigned long long v22; // [rsp+30h] [rbp-30h] v5 = a2; v6 = (unsigned long long)&a2[a3]; v22 = a1; v7 = *(unsigned long long **)(a1 + 120); v8 = *a4; v9 = *a5; v10 = my_mb_wc_utf8mb4_quick_0(&v21, a2, (unsigned long long)&a2[a3]); if ( v10 > 0 ) { v20 = *(_DWORD *)(v22 + 12); v17 = v7; v22 = *v7; while ( 1 ) { v11 = v21; v12 = 65533LL; if ( v21 > v22 ) goto LABEL_6; v13 = v21 >> 8; v14 = *(_QWORD *)(v17[1] + 8 * (v21 >> 8)); if ( v14 ) break; LABEL_7: v8 ^= ((v9 + (v8 & 0x3F)) * (unsigned __int8)v11 + (v8 << 8)) ^ ((v9 + (((unsigned __int8)v8 ^ (unsigned __int8)((v9 + (v8 & 0x3F)) * v11)) & 0x3F) + 3) * (unsigned __int8)v13 + ((v8 ^ ((v9 + (v8 & 0x3F)) * (unsigned __int8)v11 + (v8 << 8))) << 8)); v15 = v9 + 6; if ( v11 < 0x10000 ) { v9 += 6LL; } else { v8 ^= (v15 + (v8 & 0x3F)) * BYTE2(v11) + (v8 << 8); v9 += 9LL; v15 = v9; } v5 += (unsigned int)v10; v10 = my_mb_wc_utf8mb4_quick_0(&v21, v5, v6); if ( v10 <= 0 ) goto LABEL_13; } v12 = *(unsigned int *)(v14 + 12LL * (unsigned __int8)v21 + 4LL * ((v20 & 0x8000u) == 0) + 4); LABEL_6: v21 = v12; LODWORD(v13) = (unsigned int)v12 >> 8; v11 = v12; goto LABEL_7; } v15 = v9; LABEL_13: *a4 = v8; result = a5; *a5 = v15; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV qword ptr [RBP + -0x30],RDI MOV R14,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x48],RCX MOV R13,qword ptr [RCX] MOV qword ptr [RBP + -0x50],R8 MOV RBX,qword ptr [R8] LEA RDI,[RBP + -0x38] MOV RDX,R15 CALL 0x00172046 TEST EAX,EAX JLE 0x00172b4a MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0xc] MOV dword ptr [RBP + -0x3c],ECX MOV qword ptr [RBP + -0x58],R14 MOV RCX,qword ptr [R14] MOV qword ptr [RBP + -0x30],RCX LAB_00172a61: MOV RCX,qword ptr [RBP + -0x38] MOV ESI,0xfffd CMP RCX,qword ptr [RBP + -0x30] JA 0x00172aa1 MOV RDX,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RDX + 0x8] MOV RDX,RCX SHR RDX,0x8 MOV RSI,qword ptr [RSI + RDX*0x8] TEST RSI,RSI JZ 0x00172aad XOR EDX,EDX CMP word ptr [RBP + -0x3c],0x0 SETNS DL MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RSI + RCX*0x4] MOV ESI,dword ptr [RCX + RDX*0x4 + 0x4] LAB_00172aa1: MOV qword ptr [RBP + -0x38],RSI MOV EDX,ESI SHR EDX,0x8 MOV RCX,RSI LAB_00172aad: MOV ESI,R13D AND ESI,0x3f ADD RSI,RBX MOV RDI,RCX MOV R8D,0xff AND RDI,R8 IMUL RDI,RSI MOV RSI,R13 SHL RSI,0x8 ADD RSI,RDI XOR RSI,R13 MOV EDI,ESI AND EDI,0x3f ADD RDI,RBX ADD RDI,0x3 AND RDX,R8 IMUL RDX,RDI MOV R13,RSI SHL R13,0x8 ADD R13,RDX XOR R13,RSI LEA R14,[RBX + 0x6] CMP RCX,0x10000 JC 0x00172b29 MOV EDX,R13D AND EDX,0x3f ADD RDX,R14 SHR ECX,0x10 MOVZX ECX,CL IMUL RCX,RDX MOV RDX,R13 SHL RDX,0x8 ADD RDX,RCX XOR R13,RDX ADD RBX,0x9 MOV R14,RBX JMP 0x00172b2c LAB_00172b29: MOV RBX,R14 LAB_00172b2c: MOV EAX,EAX ADD R12,RAX LEA RDI,[RBP + -0x38] MOV RSI,R12 MOV RDX,R15 CALL 0x00172046 TEST EAX,EAX JG 0x00172a61 JMP 0x00172b4d LAB_00172b4a: MOV R14,RBX LAB_00172b4d: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],R13 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX],R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int4 uVar1; ulong *puVar2; uint uVar3; ulong uVar4; long lVar5; long lVar6; ulong uVar7; ulong uVar8; short local_44; ulong local_40; ulong local_38; param_3 = param_3 + param_2; puVar2 = *(ulong **)(param_1 + 0x78); uVar8 = *param_4; lVar6 = *param_5; local_38 = param_1; uVar3 = my_mb_wc_utf8mb4_quick(&local_40,param_2,param_3); if (0 < (int)uVar3) { uVar1 = *(int4 *)(local_38 + 0xc); local_38 = *puVar2; lVar5 = lVar6; do { uVar7 = 0xfffd; if (local_38 < local_40) { LAB_00172aa1: uVar4 = uVar7 >> 8; local_40 = uVar7; } else { uVar4 = local_40 >> 8; lVar6 = *(long *)(puVar2[1] + uVar4 * 8); if (lVar6 != 0) { local_44 = (short)uVar1; uVar7 = (ulong)*(uint *)(lVar6 + (local_40 & 0xff) * 0xc + 4 + (ulong)(-1 < local_44) * 4) ; goto LAB_00172aa1; } } uVar8 = uVar8 * 0x100 + (local_40 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar5) ^ uVar8; uVar8 = uVar8 * 0x100 + (uVar4 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar5 + 3) ^ uVar8; lVar6 = lVar5 + 6; if (0xffff < local_40) { uVar8 = uVar8 ^ uVar8 * 0x100 + (local_40 >> 0x10 & 0xff) * ((ulong)((uint)uVar8 & 0x3f) + lVar6); lVar6 = lVar5 + 9; } param_2 = param_2 + (ulong)uVar3; uVar3 = my_mb_wc_utf8mb4_quick(&local_40,param_2,param_3); lVar5 = lVar6; } while (0 < (int)uVar3); } *param_4 = uVar8; *param_5 = lVar6; return; }
13,872
String::append_semi_hex(char const*, unsigned int, charset_info_st const*)
eloqsql/sql/sql_string.cc
bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs) { if (!len) return false; size_t dst_len= convert_to_printable_required_length(len); if (reserve(dst_len)) return true; uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs); DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32); str_length+= nbytes; return false; }
O3
cpp
String::append_semi_hex(char const*, unsigned int, charset_info_st const*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax testl %edx, %edx je 0x27d2c movq %rsi, %r15 movq %rdi, %rbx movq %rcx, -0x30(%rbp) movl %edx, %r12d addq $0x8, %rdi movl 0x10(%rbx), %r14d leaq (%r14,%r12,4), %rsi addq $0x5, %rsi callq 0x2666c movb $0x1, %r13b testb %al, %al jne 0x27d2f leaq 0x4(,%r12,4), %rsi leaq (%r14,%r12,4), %rax addq $0x4, %rax movq 0x8(%rbx), %rcx movb $0x0, (%rcx,%rax) movl 0x10(%rbx), %edi addq 0x8(%rbx), %rdi xorl %r13d, %r13d movq %r15, %rdx movq %r12, %rcx movq -0x30(%rbp), %r8 xorl %r9d, %r9d callq 0x27bba addl %eax, 0x10(%rbx) jmp 0x27d2f xorl %r13d, %r13d movl %r13d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN6String15append_semi_hexEPKcjPK15charset_info_st: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax test edx, edx jz short loc_27D2C mov r15, rsi mov rbx, rdi mov [rbp+var_30], rcx mov r12d, edx add rdi, 8; this mov r14d, [rbx+10h] lea rsi, [r14+r12*4] add rsi, 5; unsigned __int64 call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) mov r13b, 1 test al, al jnz short loc_27D2F lea rsi, ds:4[r12*4] lea rax, [r14+r12*4] add rax, 4 mov rcx, [rbx+8] mov byte ptr [rcx+rax], 0 mov edi, [rbx+10h] add rdi, [rbx+8] xor r13d, r13d mov rdx, r15 mov rcx, r12 mov r8, [rbp+var_30] xor r9d, r9d call _Z20convert_to_printablePcmPKcmPK15charset_info_stm; convert_to_printable(char *,ulong,char const*,ulong,charset_info_st const*,ulong) add [rbx+10h], eax jmp short loc_27D2F loc_27D2C: xor r13d, r13d loc_27D2F: mov eax, r13d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long String::append_semi_hex(long long a1, _BYTE *a2, unsigned int a3, long long a4) { unsigned int v4; // r13d unsigned long long v5; // r12 long long v6; // r14 if ( a3 ) { v5 = a3; v6 = *(unsigned int *)(a1 + 16); LOBYTE(v4) = 1; if ( !(unsigned __int8)Binary_string::realloc_raw((Binary_string *)(a1 + 8), v6 + 4LL * a3 + 5) ) { *(_BYTE *)(*(_QWORD *)(a1 + 8) + v6 + 4 * v5 + 4) = 0; v4 = 0; *(_DWORD *)(a1 + 16) += convert_to_printable( (_BYTE *)(*(_QWORD *)(a1 + 8) + *(unsigned int *)(a1 + 16)), 4 * v5 + 4, a2, v5, a4, 0LL); } } else { return 0; } return v4; }
append_semi_hex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX TEST EDX,EDX JZ 0x00127d2c MOV R15,RSI MOV RBX,RDI MOV qword ptr [RBP + -0x30],RCX MOV R12D,EDX ADD RDI,0x8 MOV R14D,dword ptr [RBX + 0x10] LEA RSI,[R14 + R12*0x4] ADD RSI,0x5 CALL 0x0012666c MOV R13B,0x1 TEST AL,AL JNZ 0x00127d2f LEA RSI,[0x4 + R12*0x4] LEA RAX,[R14 + R12*0x4] ADD RAX,0x4 MOV RCX,qword ptr [RBX + 0x8] MOV byte ptr [RCX + RAX*0x1],0x0 MOV EDI,dword ptr [RBX + 0x10] ADD RDI,qword ptr [RBX + 0x8] XOR R13D,R13D MOV RDX,R15 MOV RCX,R12 MOV R8,qword ptr [RBP + -0x30] XOR R9D,R9D CALL 0x00127bba ADD dword ptr [RBX + 0x10],EAX JMP 0x00127d2f LAB_00127d2c: XOR R13D,R13D LAB_00127d2f: MOV EAX,R13D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* String::append_semi_hex(char const*, unsigned int, charset_info_st const*) */ ulong __thiscall String::append_semi_hex(String *this,char *param_1,uint param_2,charset_info_st *param_3) { uint uVar1; char cVar2; int iVar3; ulong uVar4; int8 unaff_R13; ulong uVar5; if (param_2 == 0) { uVar5 = 0; } else { uVar4 = (ulong)param_2; uVar1 = *(uint *)(this + 0x10); cVar2 = Binary_string::realloc_raw((Binary_string *)(this + 8),(ulong)uVar1 + uVar4 * 4 + 5); uVar5 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (cVar2 == '\0') { *(int1 *)(*(long *)(this + 8) + (ulong)uVar1 + uVar4 * 4 + 4) = 0; uVar5 = 0; iVar3 = convert_to_printable ((char *)((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8)),uVar4 * 4 + 4 ,param_1,uVar4,param_3,0); *(int *)(this + 0x10) = *(int *)(this + 0x10) + iVar3; } } return uVar5 & 0xffffffff; }
13,873
mi_recinfo_write
eloqsql/storage/myisam/mi_open.c
uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo) { uchar buff[MI_COLUMNDEF_SIZE]; uchar *ptr=buff; mi_int2store(ptr,recinfo->type); ptr +=2; mi_int2store(ptr,recinfo->length); ptr +=2; *ptr++ = recinfo->null_bit; mi_int2store(ptr,recinfo->null_pos); ptr+= 2; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_recinfo_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movzwl (%rsi), %eax rolw $0x8, %ax movw %ax, -0x1f(%rbp) movzwl 0x4(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1d(%rbp) movb 0xc(%rsi), %al movb %al, -0x1b(%rbp) movzwl 0xe(%rsi), %eax rolw $0x8, %ax movl %edi, %ebx movw %ax, -0x1a(%rbp) leaq 0x2fdf05(%rip), %rax # 0x339478 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3b5c6 leaq -0x1f(%rbp), %rsi movl $0x7, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x2ade5 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x3b5e0 movb %cl, %al addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x1f(%rbp), %rdx leaq -0x28(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x297be movq (%r14), %rcx jmp 0x3b5a4 callq 0x28470
mi_recinfo_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov rax, fs:28h mov [rbp+var_18], rax movzx eax, word ptr [rsi] rol ax, 8 mov [rbp+var_1F], ax movzx eax, word ptr [rsi+4] rol ax, 8 mov [rbp+var_1D], ax mov al, [rsi+0Ch] mov [rbp+var_1B], al movzx eax, word ptr [rsi+0Eh] rol ax, 8 mov ebx, edi mov [rbp+var_1A], ax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_3B5C6 lea rsi, [rbp+var_1F] mov edx, 7 mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_3B5A4: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_3B5E0 mov al, cl add rsp, 60h pop rbx pop r14 pop rbp retn loc_3B5C6: lea rdx, [rbp+var_1F] lea r14, [rbp+var_28] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_recinfo_write_cold_1 mov rcx, [r14] jmp short loc_3B5A4 loc_3B5E0: call ___stack_chk_fail
bool mi_recinfo_write(unsigned int a1, long long a2) { long long v2; // rax long long v3; // rcx _BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF long long v7; // [rsp+48h] [rbp-28h] BYREF _WORD v8[2]; // [rsp+51h] [rbp-1Fh] BYREF char v9; // [rsp+55h] [rbp-1Bh] __int16 v10; // [rsp+56h] [rbp-1Ah] unsigned long long v11; // [rsp+58h] [rbp-18h] v11 = __readfsqword(0x28u); v8[0] = __ROL2__(*(_WORD *)a2, 8); v8[1] = __ROL2__(*(_WORD *)(a2 + 4), 8); v9 = *(_BYTE *)(a2 + 12); v10 = __ROL2__(*(_WORD *)(a2 + 14), 8); v2 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v6, a1, 7LL); if ( v2 ) { mi_recinfo_write_cold_1(v2, a1, (long long)v8, &v7); v3 = v7; } else { v3 = my_write(a1, (long long)v8, 7LL, 4LL); } return v3 != 0; }
mi_recinfo_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOVZX EAX,word ptr [RSI] ROL AX,0x8 MOV word ptr [RBP + -0x1f],AX MOVZX EAX,word ptr [RSI + 0x4] ROL AX,0x8 MOV word ptr [RBP + -0x1d],AX MOV AL,byte ptr [RSI + 0xc] MOV byte ptr [RBP + -0x1b],AL MOVZX EAX,word ptr [RSI + 0xe] ROL AX,0x8 MOV EBX,EDI MOV word ptr [RBP + -0x1a],AX LEA RAX,[0x439478] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013b5c6 LEA RSI,[RBP + -0x1f] MOV EDX,0x7 MOV ECX,0x4 MOV EDI,EBX CALL 0x0012ade5 MOV RCX,RAX LAB_0013b5a4: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x0013b5e0 MOV AL,CL ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_0013b5c6: LEA RDX,[RBP + -0x1f] LEA R14,[RBP + -0x28] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x001297be MOV RCX,qword ptr [R14] JMP 0x0013b5a4 LAB_0013b5e0: CALL 0x00128470
bool mi_recinfo_write(int4 param_1,ushort *param_2) { long lVar1; long in_FS_OFFSET; int1 local_78 [72]; long local_30; ushort local_27; ushort local_25; int1 local_23; ushort local_22; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_27 = *param_2 << 8 | *param_2 >> 8; local_25 = param_2[2] << 8 | param_2[2] >> 8; local_23 = (int1)param_2[6]; local_22 = param_2[7] << 8 | param_2[7] >> 8; lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7); if (lVar1 == 0) { local_30 = my_write(param_1,&local_27,7,4); } else { mi_recinfo_write_cold_1(lVar1,param_1,&local_27,&local_30); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_30 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,874
vemit_tap
eloqsql/unittest/mytap/tap.c
static void vemit_tap(int pass, char const *fmt, va_list ap) { fprintf(tapout, "%sok %d%s", pass ? "" : "not ", ++g_test.last, (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); fflush(tapout); }
O0
c
vemit_tap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq 0x1a896e(%rip), %rax # 0x1d4fb8 movq (%rax), %rax movq %rax, -0x30(%rbp) movl -0x4(%rbp), %edx leaq 0x53fb2(%rip), %rax # 0x8060d leaq 0x53c4e(%rip), %rcx # 0x802b0 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x28(%rbp) movl 0x366349(%rip), %eax # 0x3929bc addl $0x1, %eax movl %eax, -0x20(%rbp) movl %eax, 0x36633d(%rip) # 0x3929bc xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0x2c69b movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x19(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rdi movb -0x19(%rbp), %sil leaq 0x53bff(%rip), %r8 # 0x802b0 leaq 0x53f5a(%rip), %rax # 0x80612 testb $0x1, %sil cmovneq %rax, %r8 leaq 0x53f3c(%rip), %rsi # 0x80603 movb $0x0, %al callq 0x2a400 cmpq $0x0, -0x10(%rbp) je 0x2c6f8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x2c6f8 movq 0x1a88d0(%rip), %rax # 0x1d4fb8 movq (%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a3d0 movq 0x1a88b9(%rip), %rax # 0x1d4fb8 movq (%rax), %rdi callq 0x2a320 addq $0x30, %rsp popq %rbp retq nopl (%rax)
vemit_tap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, cs:stdout_ptr mov rax, [rax] mov [rbp+var_30], rax mov edx, [rbp+var_4] lea rax, aNot; "not " lea rcx, asc_802AD+3; "" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_28], rax mov eax, cs:dword_3929BC add eax, 1 mov [rbp+var_20], eax mov cs:dword_3929BC, eax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_2C69B mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_19], al loc_2C69B: mov ecx, [rbp+var_20] mov rdx, [rbp+var_28] mov rdi, [rbp+var_30] mov sil, [rbp+var_19] lea r8, asc_802AD+3; "" lea rax, asc_80612; " - " test sil, 1 cmovnz r8, rax lea rsi, aSokDS; "%sok %d%s" mov al, 0 call _fprintf cmp [rbp+var_10], 0 jz short loc_2C6F8 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_2C6F8 mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _vfprintf loc_2C6F8: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 30h pop rbp retn
long long vemit_tap(int a1, _BYTE *a2, long long a3) { const char *v3; // rax const char *v4; // r8 int v6; // [rsp+10h] [rbp-20h] bool v7; // [rsp+17h] [rbp-19h] v3 = "not "; if ( a1 ) v3 = ""; v6 = ++dword_3929BC; v7 = 0; if ( a2 ) v7 = *a2 != 0; v4 = ""; if ( v7 ) v4 = " - "; fprintf(stdout, "%sok %d%s", v3, v6, v4); if ( a2 && *a2 ) vfprintf(stdout, a2, a3); return fflush(stdout); }
vemit_tap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [0x002d4fb8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV EDX,dword ptr [RBP + -0x4] LEA RAX,[0x18060d] LEA RCX,[0x1802b0] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [0x004929bc] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [0x004929bc],EAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x0012c69b MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_0012c69b: MOV ECX,dword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x30] MOV SIL,byte ptr [RBP + -0x19] LEA R8,[0x1802b0] LEA RAX,[0x180612] TEST SIL,0x1 CMOVNZ R8,RAX LEA RSI,[0x180603] MOV AL,0x0 CALL 0x0012a400 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0012c6f8 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0012c6f8 MOV RAX,qword ptr [0x002d4fb8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012a3d0 LAB_0012c6f8: MOV RAX,qword ptr [0x002d4fb8] MOV RDI,qword ptr [RAX] CALL 0x0012a320 ADD RSP,0x30 POP RBP RET
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3) { int *puVar1; int *puVar2; bool bVar3; puVar1 = &DAT_0018060d; if (param_1 != 0) { puVar1 = &DAT_001802b0; } DAT_004929bc = DAT_004929bc + 1; bVar3 = false; if (param_2 != (char *)0x0) { bVar3 = *param_2 != '\0'; } puVar2 = &DAT_001802b0; if (bVar3) { puVar2 = &DAT_00180612; } fprintf(*(FILE **)PTR_stdout_002d4fb8,"%sok %d%s",puVar1,(ulong)DAT_004929bc,puVar2); if ((param_2 != (char *)0x0) && (*param_2 != '\0')) { vfprintf(*(FILE **)PTR_stdout_002d4fb8,param_2,param_3); } fflush(*(FILE **)PTR_stdout_002d4fb8); return; }
13,875
eval_num_suffix_ull
eloqsql/mysys/my_getopt.c
static ulonglong eval_num_suffix_ull(char *argument, int *error, char *option_name) { char *endchar; ulonglong num; DBUG_ENTER("eval_num_suffix_ull"); if (*argument == '-') { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect unsigned value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } *error= 0; errno= 0; num= strtoull(argument, &endchar, 10); if (errno == ERANGE) { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect integer value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } num*= eval_num_suffix(endchar, error); if (*error) my_getopt_error_reporter(ERROR_LEVEL, "Unknown suffix '%c' used for variable '%s' (value '%s')", *endchar, option_name, argument); DBUG_RETURN(num); }
O0
c
eval_num_suffix_ull: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x89bf7 leaq 0x1c0169(%rip), %rax # 0x249d30 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x5992c(%rip), %rsi # 0xe3507 movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0x89cb0 movq -0x18(%rbp), %rax movl $0x0, (%rax) callq 0x389e0 movl $0x0, (%rax) movq -0x10(%rbp), %rdi leaq -0x28(%rbp), %rsi movl $0xa, %edx callq 0x380a0 movq %rax, -0x30(%rbp) callq 0x389e0 cmpl $0x22, (%rax) jne 0x89c60 leaq 0x1c00fd(%rip), %rax # 0x249d30 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x598e6(%rip), %rsi # 0xe352d movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0x89cb0 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x89af0 imulq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x89ca6 leaq 0x1c00aa(%rip), %rax # 0x249d30 movq (%rax), %r9 movq -0x28(%rbp), %rax movsbl (%rax), %edx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 xorl %edi, %edi leaq 0x598b1(%rip), %rsi # 0xe3552 movb $0x0, %al callq *%r9 jmp 0x89ca8 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
eval_num_suffix_ull: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_89BF7 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectUnsig; "Incorrect unsigned value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp loc_89CB0 loc_89BF7: mov rax, [rbp+var_18] mov dword ptr [rax], 0 call ___errno_location mov dword ptr [rax], 0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_28] mov edx, 0Ah call ___isoc23_strtoul mov [rbp+var_30], rax call ___errno_location cmp dword ptr [rax], 22h ; '"' jnz short loc_89C60 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectInteg_0; "Incorrect integer value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp short loc_89CB0 loc_89C60: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call eval_num_suffix imul rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_89CA6 lea rax, my_getopt_error_reporter mov r9, [rax] mov rax, [rbp+var_28] movsx edx, byte ptr [rax] mov rcx, [rbp+var_20] mov r8, [rbp+var_10] xor edi, edi lea rsi, aUnknownSuffixC_0; "Unknown suffix '%c' used for variable '"... mov al, 0 call r9 loc_89CA6: jmp short $+2 loc_89CA8: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_89CB0: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long eval_num_suffix_ull(const char *a1, _DWORD *a2, const char *a3) { const char *v3; // rdi long long v5; // [rsp+0h] [rbp-30h] long long v6; // [rsp+0h] [rbp-30h] _BYTE *v7; // [rsp+8h] [rbp-28h] BYREF const char *v8; // [rsp+10h] [rbp-20h] _DWORD *v9; // [rsp+18h] [rbp-18h] const char *v10; // [rsp+20h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; if ( *a1 == 45 ) { my_getopt_error_reporter(0, (long long)"Incorrect unsigned value: '%s' for %s", v10, v8); *v9 = 1; return 0LL; } else { *v9 = 0; *(_DWORD *)__errno_location(a1) = 0; v3 = v10; v5 = __isoc23_strtoul(v10, &v7, 10LL); if ( *(_DWORD *)__errno_location(v3) == 34 ) { my_getopt_error_reporter(0, (long long)"Incorrect integer value: '%s' for %s", v10, v8); *v9 = 1; return 0LL; } else { v6 = v5 * eval_num_suffix(v7, v9); if ( *v9 ) my_getopt_error_reporter( 0, (long long)"Unknown suffix '%c' used for variable '%s' (value '%s')", (unsigned int)(char)*v7, v8, v10); return v6; } } }
eval_num_suffix_ull: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x00189bf7 LEA RAX,[0x349d30] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x1e3507] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00189cb0 LAB_00189bf7: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x0 CALL 0x001389e0 MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x28] MOV EDX,0xa CALL 0x001380a0 MOV qword ptr [RBP + -0x30],RAX CALL 0x001389e0 CMP dword ptr [RAX],0x22 JNZ 0x00189c60 LEA RAX,[0x349d30] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x1e352d] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00189cb0 LAB_00189c60: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00189af0 IMUL RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x00189ca6 LEA RAX,[0x349d30] MOV R9,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOVSX EDX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x10] XOR EDI,EDI LEA RSI,[0x1e3552] MOV AL,0x0 CALL R9 LAB_00189ca6: JMP 0x00189ca8 LAB_00189ca8: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00189cb0: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long eval_num_suffix_ull(char *param_1,int *param_2,int8 param_3) { int *piVar1; long lVar2; char *local_30; int8 local_28; int *local_20; char *local_18; long local_10; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*param_1 == '-') { (*(code *)my_getopt_error_reporter)(0,"Incorrect unsigned value: \'%s\' for %s",param_1,param_3) ; *local_20 = 1; local_10 = 0; } else { *param_2 = 0; piVar1 = __errno_location(); *piVar1 = 0; lVar2 = __isoc23_strtoul(local_18,&local_30,10); piVar1 = __errno_location(); if (*piVar1 == 0x22) { (*(code *)my_getopt_error_reporter) (0,"Incorrect integer value: \'%s\' for %s",local_18,local_28); *local_20 = 1; local_10 = 0; } else { local_10 = eval_num_suffix(local_30,local_20); local_10 = local_10 * lVar2; if (*local_20 != 0) { (*(code *)my_getopt_error_reporter) (0,"Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')",(int)*local_30, local_28,local_18); } } } return local_10; }
13,876
bitmap_test_and_clear
eloqsql/mysys/my_bitmap.c
my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit) { my_bool res; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(bitmap_bit < map->n_bits); bitmap_lock(map); res= bitmap_fast_test_and_clear(map, bitmap_bit); bitmap_unlock(map); return res; }
O3
c
bitmap_test_and_clear: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %r14d movq %rdi, %rbx movq 0x10(%rdi), %rdi testq %rdi, %rdi je 0xa21d2 cmpq $0x0, 0x40(%rdi) jne 0xa2225 callq 0x2a1f0 movq (%rbx), %rax movl %r14d, %edx andb $0x7, %r14b movl $0x1, %r15d movl %r14d, %ecx shll %cl, %r15d shrl $0x3, %edx movb (%rax,%rdx), %r14b movl %r15d, %ecx notb %cl andb %r14b, %cl movb %cl, (%rax,%rdx) movq 0x10(%rbx), %rbx testq %rbx, %rbx je 0xa2214 movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0xa2238 movq %rbx, %rdi callq 0x2a1c0 andb %r15b, %r14b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x4279b(%rip), %rsi # 0xe49c7 movl $0x81, %edx callq 0x2ff2f jmp 0xa21d2 leaq 0x2eec99(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x160(%rax) jmp 0xa220c
bitmap_test_and_clear: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14d, esi mov rbx, rdi mov rdi, [rdi+10h] test rdi, rdi jz short loc_A21D2 cmp qword ptr [rdi+40h], 0 jnz short loc_A2225 call _pthread_mutex_lock loc_A21D2: mov rax, [rbx] mov edx, r14d and r14b, 7 mov r15d, 1 mov ecx, r14d shl r15d, cl shr edx, 3 mov r14b, [rax+rdx] mov ecx, r15d not cl and cl, r14b mov [rax+rdx], cl mov rbx, [rbx+10h] test rbx, rbx jz short loc_A2214 mov rdi, [rbx+40h] test rdi, rdi jnz short loc_A2238 loc_A220C: mov rdi, rbx call _pthread_mutex_unlock loc_A2214: and r14b, r15b mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_A2225: lea rsi, aWorkspaceLlm4b_45; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 81h call psi_mutex_lock jmp short loc_A21D2 loc_A2238: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_A220C
long long bitmap_test_and_clear(_QWORD *a1, unsigned int a2) { unsigned int v2; // r14d long long v4; // rdi int v5; // r15d long long v6; // rdx long long v7; // rbx long long v8; // rdi v2 = a2; v4 = a1[2]; if ( v4 ) { if ( *(_QWORD *)(v4 + 64) ) psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u); else pthread_mutex_lock(v4); } v5 = 1 << (a2 & 7); v6 = a2 >> 3; LOBYTE(v2) = *(_BYTE *)(*a1 + v6); *(_BYTE *)(*a1 + v6) = v2 & ~(_BYTE)v5; v7 = a1[2]; if ( v7 ) { v8 = *(_QWORD *)(v7 + 64); if ( v8 ) ((void ( *)(long long))PSI_server[44])(v8); pthread_mutex_unlock(v7); } LOBYTE(v2) = v5 & v2; return v2; }
bitmap_test_and_clear: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] TEST RDI,RDI JZ 0x001a21d2 CMP qword ptr [RDI + 0x40],0x0 JNZ 0x001a2225 CALL 0x0012a1f0 LAB_001a21d2: MOV RAX,qword ptr [RBX] MOV EDX,R14D AND R14B,0x7 MOV R15D,0x1 MOV ECX,R14D SHL R15D,CL SHR EDX,0x3 MOV R14B,byte ptr [RAX + RDX*0x1] MOV ECX,R15D NOT CL AND CL,R14B MOV byte ptr [RAX + RDX*0x1],CL MOV RBX,qword ptr [RBX + 0x10] TEST RBX,RBX JZ 0x001a2214 MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x001a2238 LAB_001a220c: MOV RDI,RBX CALL 0x0012a1c0 LAB_001a2214: AND R14B,R15B MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001a2225: LEA RSI,[0x1e49c7] MOV EDX,0x81 CALL 0x0012ff2f JMP 0x001a21d2 LAB_001a2238: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001a220c
int8 bitmap_test_and_clear(long *param_1,uint param_2) { byte bVar1; pthread_mutex_t *ppVar2; byte bVar3; ppVar2 = (pthread_mutex_t *)param_1[2]; if (ppVar2 != (pthread_mutex_t *)0x0) { if (*(long *)((long)ppVar2 + 0x40) == 0) { pthread_mutex_lock(ppVar2); } else { psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81); } } bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3)); bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07)); *(byte *)(*param_1 + (ulong)(param_2 >> 3)) = ~bVar3 & bVar1; ppVar2 = (pthread_mutex_t *)param_1[2]; if (ppVar2 != (pthread_mutex_t *)0x0) { if (*(long *)((long)ppVar2 + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar2); } return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3); }
13,877
my_read
eloqsql/mysys/my_read.c
size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags) { size_t readbytes, save_count= 0; DBUG_ENTER("my_read"); DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu", Filedes, Buffer, (ulong) Count, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP))) MyFlags|= my_global_flags; for (;;) { errno= 0; /* Linux, Windows don't reset this on EOF/success */ #ifdef _WIN32 readbytes= my_win_read(Filedes, Buffer, Count); #else readbytes= read(Filedes, Buffer, Count); #endif DBUG_EXECUTE_IF ("simulate_file_read_error", { errno= ENOSPC; readbytes= (size_t) -1; DBUG_SET("-d,simulate_file_read_error"); DBUG_SET("-d,simulate_my_b_fill_error"); }); if (readbytes != Count) { int got_errno= my_errno= errno; DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d", (int) readbytes, (ulong) Count, Filedes, got_errno)); if (got_errno == 0 || (readbytes != (size_t) -1 && (MyFlags & (MY_NABP | MY_FNABP)))) my_errno= HA_ERR_FILE_TOO_SHORT; if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR) { DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld", (long) readbytes)); continue; /* Interrupted */ } /* Do a read retry if we didn't get enough data on first read */ if (readbytes != (size_t) -1 && readbytes != 0 && (MyFlags & MY_FULL_IO)) { Buffer+= readbytes; Count-= readbytes; save_count+= readbytes; continue; } if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { if (readbytes == (size_t) -1) my_error(EE_READ, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); else if (MyFlags & (MY_NABP | MY_FNABP)) my_error(EE_EOFERR, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), my_filename(Filedes), got_errno); } if (readbytes == (size_t) -1 || ((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO))) DBUG_RETURN(MY_FILE_ERROR); /* Return with error */ } if (MyFlags & (MY_NABP | MY_FNABP)) readbytes= 0; /* Ok on read */ else readbytes+= save_count; break; } DBUG_RETURN(readbytes); }
O0
c
my_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq $0x0, -0x38(%rbp) jmp 0xbf761 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax jne 0xbf781 leaq 0xb8c372(%rip), %rax # 0xc4bae8 movq (%rax), %rax orq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xbf783 callq 0x27910 movl $0x0, (%rax) movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x276d0 movq %rax, -0x30(%rbp) jmp 0xbf7a4 movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax je 0xbf919 callq 0x27910 movl (%rax), %eax movl %eax, -0x40(%rbp) callq 0xc0d80 movq %rax, %rcx movl -0x40(%rbp), %eax movl %eax, (%rcx) movl %eax, -0x3c(%rbp) jmp 0xbf7ce cmpl $0x0, -0x3c(%rbp) je 0xbf7e9 cmpq $-0x1, -0x30(%rbp) je 0xbf7f4 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbf7f4 callq 0xc0d80 movl $0xaf, (%rax) cmpq $0x0, -0x30(%rbp) je 0xbf804 movq -0x30(%rbp), %rax cmpl $-0x1, %eax jne 0xbf813 cmpl $0x4, -0x3c(%rbp) jne 0xbf813 jmp 0xbf80c jmp 0xbf80e jmp 0xbf783 cmpq $-0x1, -0x30(%rbp) je 0xbf85d cmpq $0x0, -0x30(%rbp) je 0xbf85d movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax je 0xbf85d movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0xbf783 movq -0x28(%rbp), %rax andq $0x1a, %rax cmpq $0x0, %rax je 0xbf8e6 cmpq $-0x1, -0x30(%rbp) jne 0xbf8a4 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x48(%rbp) movl -0xc(%rbp), %edi callq 0xb6660 movq -0x48(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x2, %edi movb $0x0, %al callq 0xb67b0 jmp 0xbf8e4 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbf8e2 movq -0x28(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x50(%rbp) movl -0xc(%rbp), %edi callq 0xb6660 movq -0x50(%rbp), %rsi movq %rax, %rdx movl -0x3c(%rbp), %ecx movl $0x9, %edi movb $0x0, %al callq 0xb67b0 jmp 0xbf8e4 jmp 0xbf8e6 cmpq $-0x1, -0x30(%rbp) je 0xbf90b movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbf917 movq -0x28(%rbp), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax jne 0xbf917 jmp 0xbf90d movq $-0x1, -0x8(%rbp) jmp 0xbf949 jmp 0xbf919 movq -0x28(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xbf931 movq $0x0, -0x30(%rbp) jmp 0xbf93d movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xbf93f jmp 0xbf941 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_38], 0 jmp short $+2 loc_BF761: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jnz short loc_BF781 lea rax, my_global_flags mov rax, [rax] or rax, [rbp+var_28] mov [rbp+var_28], rax loc_BF781: jmp short $+2 loc_BF783: call ___errno_location mov dword ptr [rax], 0 mov edi, [rbp+var_C] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _read mov [rbp+var_30], rax jmp short $+2 loc_BF7A4: mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jz loc_BF919 call ___errno_location mov eax, [rax] mov [rbp+var_40], eax call _my_thread_var mov rcx, rax mov eax, [rbp+var_40] mov [rcx], eax mov [rbp+var_3C], eax jmp short $+2 loc_BF7CE: cmp [rbp+var_3C], 0 jz short loc_BF7E9 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_BF7F4 mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BF7F4 loc_BF7E9: call _my_thread_var mov dword ptr [rax], 0AFh loc_BF7F4: cmp [rbp+var_30], 0 jz short loc_BF804 mov rax, [rbp+var_30] cmp eax, 0FFFFFFFFh jnz short loc_BF813 loc_BF804: cmp [rbp+var_3C], 4 jnz short loc_BF813 jmp short $+2 loc_BF80C: jmp short $+2 loc_BF80E: jmp loc_BF783 loc_BF813: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_BF85D cmp [rbp+var_30], 0 jz short loc_BF85D mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jz short loc_BF85D mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, [rbp+var_38] mov [rbp+var_38], rax jmp loc_BF783 loc_BF85D: mov rax, [rbp+var_28] and rax, 1Ah cmp rax, 0 jz short loc_BF8E6 cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jnz short loc_BF8A4 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_48], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_48] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 2 mov al, 0 call my_error jmp short loc_BF8E4 loc_BF8A4: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BF8E2 mov rax, [rbp+var_28] and rax, 440h or rax, 4 mov [rbp+var_50], rax mov edi, [rbp+var_C] call my_filename mov rsi, [rbp+var_50] mov rdx, rax mov ecx, [rbp+var_3C] mov edi, 9 mov al, 0 call my_error loc_BF8E2: jmp short $+2 loc_BF8E4: jmp short $+2 loc_BF8E6: cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh jz short loc_BF90B mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BF917 mov rax, [rbp+var_28] and rax, 200h cmp rax, 0 jnz short loc_BF917 loc_BF90B: jmp short $+2 loc_BF90D: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_BF949 loc_BF917: jmp short $+2 loc_BF919: mov rax, [rbp+var_28] and rax, 6 cmp rax, 0 jz short loc_BF931 mov [rbp+var_30], 0 jmp short loc_BF93D loc_BF931: mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax loc_BF93D: jmp short $+2 loc_BF93F: jmp short $+2 loc_BF941: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_BF949: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_read(unsigned int a1, const char *a2, long long a3, __int16 a4) { const char *v4; // rax const char *v5; // rax unsigned int v7; // [rsp+10h] [rbp-40h] long long v8; // [rsp+18h] [rbp-38h] long long v9; // [rsp+20h] [rbp-30h] __int16 v11; // [rsp+28h] [rbp-28h] v11 = a4; v8 = 0LL; if ( (a4 & 0x1A) == 0 ) v11 = a4 | my_global_flags; while ( 1 ) { *(_DWORD *)__errno_location() = 0; v9 = read(a1, a2, a3); if ( v9 == a3 ) break; v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, a2) = v7; if ( !v7 || v9 != -1 && (v11 & 6) != 0 ) *(_DWORD *)my_thread_var(a1, a2) = 175; if ( v9 && (_DWORD)v9 != -1 || v7 != 4 ) { if ( v9 == -1 || !v9 || (v11 & 0x200) == 0 ) { if ( (v11 & 0x1A) != 0 ) { if ( v9 == -1 ) { v4 = my_filename(a1); my_error(2u, v11 & 0x440 | 4LL, v4, v7); } else if ( (v11 & 6) != 0 ) { v5 = my_filename(a1); my_error(9u, v11 & 0x440 | 4LL, v5, v7); } } if ( v9 == -1 || (v11 & 6) != 0 && (v11 & 0x200) == 0 ) return -1LL; break; } a2 += v9; a3 -= v9; v8 += v9; } } if ( (v11 & 6) != 0 ) return 0LL; else return v9 + v8; }
my_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x38],0x0 JMP 0x001bf761 LAB_001bf761: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JNZ 0x001bf781 LEA RAX,[0xd4bae8] MOV RAX,qword ptr [RAX] OR RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX LAB_001bf781: JMP 0x001bf783 LAB_001bf783: CALL 0x00127910 MOV dword ptr [RAX],0x0 MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001276d0 MOV qword ptr [RBP + -0x30],RAX JMP 0x001bf7a4 LAB_001bf7a4: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bf919 CALL 0x00127910 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX CALL 0x001c0d80 MOV RCX,RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RCX],EAX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001bf7ce LAB_001bf7ce: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001bf7e9 CMP qword ptr [RBP + -0x30],-0x1 JZ 0x001bf7f4 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bf7f4 LAB_001bf7e9: CALL 0x001c0d80 MOV dword ptr [RAX],0xaf LAB_001bf7f4: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001bf804 MOV RAX,qword ptr [RBP + -0x30] CMP EAX,-0x1 JNZ 0x001bf813 LAB_001bf804: CMP dword ptr [RBP + -0x3c],0x4 JNZ 0x001bf813 JMP 0x001bf80c LAB_001bf80c: JMP 0x001bf80e LAB_001bf80e: JMP 0x001bf783 LAB_001bf813: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x001bf85d CMP qword ptr [RBP + -0x30],0x0 JZ 0x001bf85d MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JZ 0x001bf85d MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX JMP 0x001bf783 LAB_001bf85d: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x1a CMP RAX,0x0 JZ 0x001bf8e6 CMP qword ptr [RBP + -0x30],-0x1 JNZ 0x001bf8a4 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x48],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001b6660 MOV RSI,qword ptr [RBP + -0x48] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x2 MOV AL,0x0 CALL 0x001b67b0 JMP 0x001bf8e4 LAB_001bf8a4: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bf8e2 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x50],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001b6660 MOV RSI,qword ptr [RBP + -0x50] MOV RDX,RAX MOV ECX,dword ptr [RBP + -0x3c] MOV EDI,0x9 MOV AL,0x0 CALL 0x001b67b0 LAB_001bf8e2: JMP 0x001bf8e4 LAB_001bf8e4: JMP 0x001bf8e6 LAB_001bf8e6: CMP qword ptr [RBP + -0x30],-0x1 JZ 0x001bf90b MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bf917 MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x200 CMP RAX,0x0 JNZ 0x001bf917 LAB_001bf90b: JMP 0x001bf90d LAB_001bf90d: MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001bf949 LAB_001bf917: JMP 0x001bf919 LAB_001bf919: MOV RAX,qword ptr [RBP + -0x28] AND RAX,0x6 CMP RAX,0x0 JZ 0x001bf931 MOV qword ptr [RBP + -0x30],0x0 JMP 0x001bf93d LAB_001bf931: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_001bf93d: JMP 0x001bf93f LAB_001bf93f: JMP 0x001bf941 LAB_001bf941: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001bf949: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4) { int iVar1; int *piVar2; size_t sVar3; int4 *puVar4; int8 uVar5; long local_40; long local_38; ulong local_30; size_t local_28; void *local_20; local_40 = 0; local_28 = param_3; local_20 = param_2; local_30 = param_4; if ((param_4 & 0x1a) == 0) { local_30 = my_global_flags | param_4; } do { do { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = read(param_1,local_20,local_28); if (sVar3 == local_28) { LAB_001bf919: if ((local_30 & 6) == 0) { local_38 = local_40 + sVar3; } else { local_38 = 0; } return local_38; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((iVar1 == 0) || ((sVar3 != 0xffffffffffffffff && ((local_30 & 6) != 0)))) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xaf; } } while (((sVar3 == 0) || ((int)sVar3 == -1)) && (iVar1 == 4)); if (((sVar3 == 0xffffffffffffffff) || (sVar3 == 0)) || ((local_30 & 0x200) == 0)) { if ((local_30 & 0x1a) != 0) { if (sVar3 == 0xffffffffffffffff) { uVar5 = my_filename(param_1); my_error(2,local_30 & 0x440 | 4,uVar5,iVar1); } else if ((local_30 & 6) != 0) { uVar5 = my_filename(param_1); my_error(9,local_30 & 0x440 | 4,uVar5,iVar1); } } if ((sVar3 == 0xffffffffffffffff) || (((local_30 & 6) != 0 && ((local_30 & 0x200) == 0)))) { return -1; } goto LAB_001bf919; } local_20 = (void *)(sVar3 + (long)local_20); local_28 = local_28 - sVar3; local_40 = sVar3 + local_40; } while( true ); }
13,878
my_realpath
eloqsql/mysys/my_symlink.c
int my_realpath(char *to, const char *filename, myf MyFlags) { #if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) int result=0; char buff[BUFF_LEN]; char *ptr; DBUG_ENTER("my_realpath"); DBUG_PRINT("info",("executing realpath")); if ((ptr=realpath(filename,buff))) strmake(to, ptr, FN_REFLEN-1); else { /* Realpath didn't work; Use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ if (MyFlags) DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); if (my_errno == ENOENT) result= 1; else result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) int ret= GetFullPathName(filename,FN_REFLEN, to, NULL); if (ret == 0 || ret > FN_REFLEN) { my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError(); if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); /* GetFullPathName didn't work : use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ my_load_path(to, filename, NullS); return -1; } #else my_load_path(to, filename, NullS); #endif return 0; }
O0
c
my_realpath: pushq %rbp movq %rsp, %rbp subq $0x1060, %rsp # imm = 0x1060 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x1020(%rbp) movq %rsi, -0x1028(%rbp) movq %rdx, -0x1030(%rbp) movl $0x0, -0x1034(%rbp) jmp 0x334b9 movq -0x1028(%rbp), %rdi leaq -0x1010(%rbp), %rsi callq 0x250f0 movq %rax, -0x1040(%rbp) cmpq $0x0, %rax je 0x334f6 movq -0x1020(%rbp), %rdi movq -0x1040(%rbp), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x87940 jmp 0x33596 cmpq $0x0, -0x1030(%rbp) je 0x33506 jmp 0x33502 jmp 0x33504 jmp 0x33506 callq 0x25050 movl (%rax), %eax movl %eax, -0x1044(%rbp) callq 0x33e30 movl -0x1044(%rbp), %ecx movl %ecx, (%rax) movq -0x1030(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x3355d movq -0x1028(%rbp), %rax movq %rax, -0x1050(%rbp) callq 0x33e30 movq -0x1050(%rbp), %rdx movl (%rax), %ecx movl $0x1a, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x2ca80 movq -0x1020(%rbp), %rdi movq -0x1028(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x39c70 callq 0x33e30 cmpl $0x2, (%rax) jne 0x3358a movl $0x1, -0x1034(%rbp) jmp 0x33594 movl $0xffffffff, -0x1034(%rbp) # imm = 0xFFFFFFFF jmp 0x33596 jmp 0x33598 movl -0x1034(%rbp), %eax movl %eax, -0x1014(%rbp) movl -0x1014(%rbp), %eax movl %eax, -0x1054(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x335d1 movl -0x1054(%rbp), %eax addq $0x1060, %rsp # imm = 0x1060 popq %rbp retq callq 0x25340 nopw %cs:(%rax,%rax)
my_realpath: push rbp mov rbp, rsp sub rsp, 1060h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_1020], rdi mov [rbp+var_1028], rsi mov [rbp+var_1030], rdx mov [rbp+var_1034], 0 jmp short $+2 loc_334B9: mov rdi, [rbp+var_1028] lea rsi, [rbp+var_1010] call _realpath mov [rbp+var_1040], rax cmp rax, 0 jz short loc_334F6 mov rdi, [rbp+var_1020] mov rsi, [rbp+var_1040] mov edx, 1FFh call strmake jmp loc_33596 loc_334F6: cmp [rbp+var_1030], 0 jz short loc_33506 jmp short $+2 loc_33502: jmp short $+2 loc_33504: jmp short $+2 loc_33506: call ___errno_location mov eax, [rax] mov [rbp+var_1044], eax call _my_thread_var mov ecx, [rbp+var_1044] mov [rax], ecx mov rax, [rbp+var_1030] and rax, 10h cmp rax, 0 jz short loc_3355D mov rax, [rbp+var_1028] mov [rbp+var_1050], rax call _my_thread_var mov rdx, [rbp+var_1050] mov ecx, [rax] mov edi, 1Ah xor eax, eax mov esi, eax mov al, 0 call my_error loc_3355D: mov rdi, [rbp+var_1020] mov rsi, [rbp+var_1028] xor eax, eax mov edx, eax call my_load_path call _my_thread_var cmp dword ptr [rax], 2 jnz short loc_3358A mov [rbp+var_1034], 1 jmp short loc_33594 loc_3358A: mov [rbp+var_1034], 0FFFFFFFFh loc_33594: jmp short $+2 loc_33596: jmp short $+2 loc_33598: mov eax, [rbp+var_1034] mov [rbp+var_1014], eax mov eax, [rbp+var_1014] mov [rbp+var_1054], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_335D1 mov eax, [rbp+var_1054] add rsp, 1060h pop rbp retn loc_335D1: call ___stack_chk_fail
long long my_realpath(long long a1, long long a2, char a3) { unsigned int *v3; // rax long long v5; // [rsp+1Ch] [rbp-1044h] long long v6; // [rsp+20h] [rbp-1040h] unsigned int v7; // [rsp+2Ch] [rbp-1034h] _BYTE v9[4104]; // [rsp+50h] [rbp-1010h] BYREF unsigned long long v10; // [rsp+1058h] [rbp-8h] v10 = __readfsqword(0x28u); v7 = 0; v6 = realpath(a2, v9); if ( v6 ) { strmake(a1, v6, 511LL); } else { v5 = *(unsigned int *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( (a3 & 0x10) != 0 ) { v3 = (unsigned int *)my_thread_var(); my_error(0x1Au, 0LL, a2, *v3); } my_load_path(a1, a2, 0LL); if ( *(_DWORD *)my_thread_var() == 2 ) return 1; else return (unsigned int)-1; } return v7; }
my_realpath: PUSH RBP MOV RBP,RSP SUB RSP,0x1060 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x1020],RDI MOV qword ptr [RBP + -0x1028],RSI MOV qword ptr [RBP + -0x1030],RDX MOV dword ptr [RBP + -0x1034],0x0 JMP 0x001334b9 LAB_001334b9: MOV RDI,qword ptr [RBP + -0x1028] LEA RSI,[RBP + -0x1010] CALL 0x001250f0 MOV qword ptr [RBP + -0x1040],RAX CMP RAX,0x0 JZ 0x001334f6 MOV RDI,qword ptr [RBP + -0x1020] MOV RSI,qword ptr [RBP + -0x1040] MOV EDX,0x1ff CALL 0x00187940 JMP 0x00133596 LAB_001334f6: CMP qword ptr [RBP + -0x1030],0x0 JZ 0x00133506 JMP 0x00133502 LAB_00133502: JMP 0x00133504 LAB_00133504: JMP 0x00133506 LAB_00133506: CALL 0x00125050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1044],EAX CALL 0x00133e30 MOV ECX,dword ptr [RBP + -0x1044] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x1030] AND RAX,0x10 CMP RAX,0x0 JZ 0x0013355d MOV RAX,qword ptr [RBP + -0x1028] MOV qword ptr [RBP + -0x1050],RAX CALL 0x00133e30 MOV RDX,qword ptr [RBP + -0x1050] MOV ECX,dword ptr [RAX] MOV EDI,0x1a XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x0012ca80 LAB_0013355d: MOV RDI,qword ptr [RBP + -0x1020] MOV RSI,qword ptr [RBP + -0x1028] XOR EAX,EAX MOV EDX,EAX CALL 0x00139c70 CALL 0x00133e30 CMP dword ptr [RAX],0x2 JNZ 0x0013358a MOV dword ptr [RBP + -0x1034],0x1 JMP 0x00133594 LAB_0013358a: MOV dword ptr [RBP + -0x1034],0xffffffff LAB_00133594: JMP 0x00133596 LAB_00133596: JMP 0x00133598 LAB_00133598: MOV EAX,dword ptr [RBP + -0x1034] MOV dword ptr [RBP + -0x1014],EAX MOV EAX,dword ptr [RBP + -0x1014] MOV dword ptr [RBP + -0x1054],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001335d1 MOV EAX,dword ptr [RBP + -0x1054] ADD RSP,0x1060 POP RBP RET LAB_001335d1: CALL 0x00125340
int4 my_realpath(int8 param_1,char *param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; int4 local_103c; char local_1018 [4104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_103c = 0; pcVar2 = realpath(param_2,local_1018); if (pcVar2 == (char *)0x0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_3 & 0x10) != 0) { puVar4 = (int4 *)_my_thread_var(); my_error(0x1a,0,param_2,*puVar4); } my_load_path(param_1,param_2,0); piVar3 = (int *)_my_thread_var(); if (*piVar3 == 2) { local_103c = 1; } else { local_103c = 0xffffffff; } } else { strmake(param_1,pcVar2,0x1ff); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_103c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,879
my_realpath
eloqsql/mysys/my_symlink.c
int my_realpath(char *to, const char *filename, myf MyFlags) { #if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH) int result=0; char buff[BUFF_LEN]; char *ptr; DBUG_ENTER("my_realpath"); DBUG_PRINT("info",("executing realpath")); if ((ptr=realpath(filename,buff))) strmake(to, ptr, FN_REFLEN-1); else { /* Realpath didn't work; Use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ if (MyFlags) DBUG_PRINT("error",("realpath failed with errno: %d", errno)); my_errno=errno; if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); my_load_path(to, filename, NullS); if (my_errno == ENOENT) result= 1; else result= -1; } DBUG_RETURN(result); #elif defined(_WIN32) int ret= GetFullPathName(filename,FN_REFLEN, to, NULL); if (ret == 0 || ret > FN_REFLEN) { my_errno= (ret > FN_REFLEN) ? ENAMETOOLONG : GetLastError(); if (MyFlags & MY_WME) my_error(EE_REALPATH, MYF(0), filename, my_errno); /* GetFullPathName didn't work : use my_load_path() which is a poor substitute original name but will at least be able to resolve paths that starts with '.'. */ my_load_path(to, filename, NullS); return -1; } #else my_load_path(to, filename, NullS); #endif return 0; }
O3
c
my_realpath: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1010, %rsp # imm = 0x1010 movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x1030(%rbp), %rsi movq %r14, %rdi callq 0x240f0 testq %rax, %rax je 0x2e3bd movl $0x1ff, %edx # imm = 0x1FF movq %rbx, %rdi movq %rax, %rsi callq 0x6108c xorl %eax, %eax jmp 0x2e40c callq 0x24060 movl (%rax), %r12d callq 0x2ec32 movl %r12d, (%rax) testb $0x10, %r15b je 0x2e3eb callq 0x2ec32 movl (%rax), %ecx movl $0x1a, %edi xorl %esi, %esi movq %r14, %rdx xorl %eax, %eax callq 0x2a00f movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x31a28 callq 0x2ec32 xorl %ecx, %ecx cmpl $0x2, (%rax) sete %cl leal -0x1(,%rcx,2), %eax movq %fs:0x28, %rcx cmpq -0x28(%rbp), %rcx jne 0x2e42b addq $0x1010, %rsp # imm = 0x1010 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x24390
my_realpath: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 1010h mov r15, rdx mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rsi, [rbp+var_1030] mov rdi, r14 call _realpath test rax, rax jz short loc_2E3BD mov edx, 1FFh mov rdi, rbx mov rsi, rax call strmake xor eax, eax jmp short loc_2E40C loc_2E3BD: call ___errno_location mov r12d, [rax] call _my_thread_var mov [rax], r12d test r15b, 10h jz short loc_2E3EB call _my_thread_var mov ecx, [rax] mov edi, 1Ah xor esi, esi mov rdx, r14 xor eax, eax call my_error loc_2E3EB: mov rdi, rbx mov rsi, r14 xor edx, edx call my_load_path call _my_thread_var xor ecx, ecx cmp dword ptr [rax], 2 setz cl lea eax, ds:0FFFFFFFFFFFFFFFFh[rcx*2] loc_2E40C: mov rcx, fs:28h cmp rcx, [rbp+var_28] jnz short loc_2E42B add rsp, 1010h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2E42B: call ___stack_chk_fail
long long my_realpath(long long a1, long long a2, char a3) { long long v4; // rax int v6; // r12d unsigned int *v7; // rax _BYTE v8[4104]; // [rsp+0h] [rbp-1030h] BYREF unsigned long long v9; // [rsp+1008h] [rbp-28h] v9 = __readfsqword(0x28u); v4 = realpath(a2, v8); if ( v4 ) { strmake(a1, v4, 511LL); return 0LL; } else { v6 = *(_DWORD *)__errno_location(a2); *(_DWORD *)my_thread_var(a2) = v6; if ( (a3 & 0x10) != 0 ) { v7 = (unsigned int *)my_thread_var(a2); my_error(0x1Au, 0LL, a2, *v7); } my_load_path(a1, a2, 0LL); return 2 * (unsigned int)(*(_DWORD *)my_thread_var(a1) == 2) - 1; } }
my_realpath: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1010 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RSI,[RBP + -0x1030] MOV RDI,R14 CALL 0x001240f0 TEST RAX,RAX JZ 0x0012e3bd MOV EDX,0x1ff MOV RDI,RBX MOV RSI,RAX CALL 0x0016108c XOR EAX,EAX JMP 0x0012e40c LAB_0012e3bd: CALL 0x00124060 MOV R12D,dword ptr [RAX] CALL 0x0012ec32 MOV dword ptr [RAX],R12D TEST R15B,0x10 JZ 0x0012e3eb CALL 0x0012ec32 MOV ECX,dword ptr [RAX] MOV EDI,0x1a XOR ESI,ESI MOV RDX,R14 XOR EAX,EAX CALL 0x0012a00f LAB_0012e3eb: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00131a28 CALL 0x0012ec32 XOR ECX,ECX CMP dword ptr [RAX],0x2 SETZ CL LEA EAX,[-0x1 + RCX*0x2] LAB_0012e40c: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x28] JNZ 0x0012e42b ADD RSP,0x1010 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012e42b: CALL 0x00124390
int my_realpath(int8 param_1,char *param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; char local_1038 [4104]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pcVar2 = realpath(param_2,local_1038); if (pcVar2 == (char *)0x0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_3 & 0x10) != 0) { puVar4 = (int4 *)_my_thread_var(); my_error(0x1a,0,param_2,*puVar4); } my_load_path(param_1,param_2,0); piVar3 = (int *)_my_thread_var(); iVar1 = (uint)(*piVar3 == 2) * 2 + -1; } else { strmake(param_1,pcVar2,0x1ff); iVar1 = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return iVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,880
void ImPlot3D::PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>>(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>> const&, int)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_items.cpp
void PlotLineEx(const char* label_id, const _Getter& getter, ImPlot3DLineFlags flags) { if (BeginItemEx(label_id, getter, flags, ImPlot3DCol_Line)) { const ImPlot3DNextItemData& n = GetItemData(); if (getter.Count >= 2 && n.RenderLine) { const ImU32 col_line = ImGui::GetColorU32(n.Colors[ImPlot3DCol_Line]); if (ImHasFlag(flags, ImPlot3DLineFlags_Segments)) { RenderPrimitives<RendererLineSegments>(getter, col_line, n.LineWeight); } else if (ImHasFlag(flags, ImPlot3DLineFlags_Loop)) { if (ImHasFlag(flags, ImPlot3DLineFlags_SkipNaN)) RenderPrimitives<RendererLineStripSkip>(GetterLoop<_Getter>(getter), col_line, n.LineWeight); else RenderPrimitives<RendererLineStrip>(GetterLoop<_Getter>(getter), col_line, n.LineWeight); } else { if (ImHasFlag(flags, ImPlot3DLineFlags_SkipNaN)) RenderPrimitives<RendererLineStripSkip>(getter, col_line, n.LineWeight); else RenderPrimitives<RendererLineStrip>(getter, col_line, n.LineWeight); } } // Render markers if (n.Marker != ImPlot3DMarker_None) { const ImU32 col_line = ImGui::GetColorU32(n.Colors[ImPlot3DCol_MarkerOutline]); const ImU32 col_fill = ImGui::GetColorU32(n.Colors[ImPlot3DCol_MarkerFill]); RenderMarkers<_Getter>(getter, n.Marker, n.MarkerSize, n.RenderMarkerFill, col_fill, n.RenderMarkerLine, col_line, n.MarkerWeight); } EndItem(); } }
O1
cpp
void ImPlot3D::PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>>>(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>, ImPlot3D::IndexerIdx<signed char>> const&, int): pushq %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movl %edx, %ebp movq %rsi, %rbx xorl %ecx, %ecx callq 0x64f83 testb %al, %al je 0x58900 callq 0x5459e movq %rax, %r14 cmpl $0x2, 0x48(%rbx) jl 0x588a8 cmpb $0x1, 0x54(%r14) jne 0x588a8 movq %r14, %rdi callq 0x215ebe btl $0xa, %ebp jb 0x58898 btl $0xb, %ebp jb 0x58909 btl $0xc, %ebp movss 0x40(%r14), %xmm0 movq %rbx, %rdi movl %eax, %esi jb 0x58944 callq 0x80923 jmp 0x588a8 movss 0x40(%r14), %xmm0 movq %rbx, %rdi movl %eax, %esi callq 0x7eb71 cmpl $-0x1, 0x44(%r14) je 0x588ed leaq 0x20(%r14), %rdi callq 0x215ebe movl %eax, %ebp movq %r14, %rdi addq $0x30, %rdi callq 0x215ebe movl 0x44(%r14), %esi movss 0x48(%r14), %xmm0 movzbl 0x57(%r14), %edx movzbl 0x56(%r14), %r8d movss 0x4c(%r14), %xmm1 movq %rbx, %rdi movl %eax, %ecx movl %ebp, %r9d callq 0x6528e leaq 0x2de3a4(%rip), %rax # 0x336c98 movq (%rax), %rdi addq $0x38, %rdi callq 0x55a36 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x8(%rsp), %rdx movl $0x9, %ecx movq %rdx, %rdi movq %rbx, %rsi btl $0xc, %ebp jb 0x5894e rep movsq (%rsi), %es:(%rdi) movq 0x48(%rbx), %rcx movq %rcx, 0x48(%rdx) incl %ecx movl %ecx, 0x50(%rdx) movss 0x40(%r14), %xmm0 movq %rdx, %rdi movl %eax, %esi callq 0x7fb02 jmp 0x588a8 callq 0x801d8 jmp 0x588a8 rep movsq (%rsi), %es:(%rdi) movq 0x48(%rbx), %rcx movq %rcx, 0x48(%rdx) incl %ecx movl %ecx, 0x50(%rdx) movss 0x40(%r14), %xmm0 movq %rdx, %rdi movl %eax, %esi callq 0x7f3e4 jmp 0x588a8
_ZN8ImPlot3D10PlotLineExINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEvPKcRKT_i: push rbp push r14 push rbx sub rsp, 60h mov ebp, edx mov rbx, rsi xor ecx, ecx call _ZN8ImPlot3D11BeginItemExINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEbPKcRKT_ii; ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>(char const*,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,int,int) test al, al jz loc_58900 call _ZN8ImPlot3D11GetItemDataEv; ImPlot3D::GetItemData(void) mov r14, rax cmp dword ptr [rbx+48h], 2 jl short loc_588A8 cmp byte ptr [r14+54h], 1 jnz short loc_588A8 mov rdi, r14 call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&) bt ebp, 0Ah jb short loc_58898 bt ebp, 0Bh jb loc_58909 bt ebp, 0Ch movss xmm0, dword ptr [r14+40h] mov rdi, rbx mov esi, eax jb loc_58944 call _ZN8ImPlot3D16RenderPrimitivesINS_17RendererLineStripENS_9GetterXYZINS_10IndexerIdxIdEES4_S4_EEJjfEEEvRKT0_DpT1_; ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,uint,float>(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,uint,float) jmp short loc_588A8 loc_58898: movss xmm0, dword ptr [r14+40h] mov rdi, rbx mov esi, eax call _ZN8ImPlot3D16RenderPrimitivesINS_20RendererLineSegmentsENS_9GetterXYZINS_10IndexerIdxIdEES4_S4_EEJjfEEEvRKT0_DpT1_; ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineSegments,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,uint,float>(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,uint,float) loc_588A8: cmp dword ptr [r14+44h], 0FFFFFFFFh jz short loc_588ED lea rdi, [r14+20h] call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&) mov ebp, eax mov rdi, r14 add rdi, 30h ; '0' call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&) mov esi, [r14+44h] movss xmm0, dword ptr [r14+48h] movzx edx, byte ptr [r14+57h] movzx r8d, byte ptr [r14+56h] movss xmm1, dword ptr [r14+4Ch] mov rdi, rbx mov ecx, eax mov r9d, ebp call _ZN8ImPlot3D13RenderMarkersINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEEEvRKT_ifbjbjf; ImPlot3D::RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,int,float,bool,uint,bool,uint,float) loc_588ED: lea rax, _ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D mov rdi, [rax] add rdi, 38h ; '8'; this call _ZN20ImPlot3DNextItemData5ResetEv; ImPlot3DNextItemData::Reset(void) loc_58900: add rsp, 60h pop rbx pop r14 pop rbp retn loc_58909: lea rdx, [rsp+78h+var_70] mov ecx, 9 mov rdi, rdx mov rsi, rbx bt ebp, 0Ch jb short loc_5894E rep movsq mov rcx, [rbx+48h] mov [rdx+48h], rcx inc ecx mov [rdx+50h], ecx movss xmm0, dword ptr [r14+40h] mov rdi, rdx mov esi, eax call _ZN8ImPlot3D16RenderPrimitivesINS_17RendererLineStripENS_10GetterLoopINS_9GetterXYZINS_10IndexerIdxIdEES5_S5_EEEEJjfEEEvRKT0_DpT1_; ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,uint,float>(ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> const&,uint,float) jmp loc_588A8 loc_58944: call _ZN8ImPlot3D16RenderPrimitivesINS_21RendererLineStripSkipENS_9GetterXYZINS_10IndexerIdxIdEES4_S4_EEJjfEEEvRKT0_DpT1_; ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,uint,float>(ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>> const&,uint,float) jmp loc_588A8 loc_5894E: rep movsq mov rcx, [rbx+48h] mov [rdx+48h], rcx inc ecx mov [rdx+50h], ecx movss xmm0, dword ptr [r14+40h] mov rdi, rdx mov esi, eax call _ZN8ImPlot3D16RenderPrimitivesINS_21RendererLineStripSkipENS_10GetterLoopINS_9GetterXYZINS_10IndexerIdxIdEES5_S5_EEEEJjfEEEvRKT0_DpT1_; ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,uint,float>(ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> const&,uint,float) jmp loc_588A8
long long ImPlot3D::PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( ImPlot3D *a1, int *a2, long long a3) { __int16 v3; // bp long long result; // rax long long ItemData; // rax long long v6; // r14 unsigned int ColorU32; // eax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d float v12; // xmm0_4 unsigned int v13; // ebp unsigned int v14; // eax _DWORD v15[28]; // [rsp+8h] [rbp-70h] BYREF v3 = a3; result = ImPlot3D::BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( a1, a2, a3, 0LL); if ( (_BYTE)result ) { ItemData = ImPlot3D::GetItemData(a1); v6 = ItemData; if ( a2[18] >= 2 && *(_BYTE *)(ItemData + 84) == 1 ) { ColorU32 = ImGui::GetColorU32(ItemData); if ( (v3 & 0x400) != 0 ) { ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineSegments,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned int,float>( (_DWORD)a2, ColorU32, v8, v9, v10, v11); } else if ( (v3 & 0x800) != 0 ) { qmemcpy(v15, a2, 0x50uLL); v15[20] = v15[18] + 1; if ( (v3 & 0x1000) != 0 ) ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,unsigned int,float>( v15, ColorU32, *(float *)(v6 + 64)); else ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,unsigned int,float>( v15, ColorU32, *(float *)(v6 + 64)); } else { v12 = *(float *)(v6 + 64); if ( (v3 & 0x1000) != 0 ) ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned int,float>( a2, ColorU32, v12); else ImPlot3D::RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned int,float>( a2, ColorU32, v12); } } if ( *(_DWORD *)(v6 + 68) != -1 ) { v13 = ImGui::GetColorU32(v6 + 32); v14 = ImGui::GetColorU32(v6 + 48); ImPlot3D::RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>( a2, *(unsigned int *)(v6 + 68), *(unsigned __int8 *)(v6 + 87), v14, *(unsigned __int8 *)(v6 + 86), v13, *(float *)(v6 + 72), *(float *)(v6 + 76)); } return ImPlot3DNextItemData::Reset((ImGui *)((char *)ImPlot3D::GImPlot3D + 56)); } return result; }
PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x60 MOV EBP,EDX MOV RBX,RSI XOR ECX,ECX CALL 0x00164f83 TEST AL,AL JZ 0x00158900 CALL 0x0015459e MOV R14,RAX CMP dword ptr [RBX + 0x48],0x2 JL 0x001588a8 CMP byte ptr [R14 + 0x54],0x1 JNZ 0x001588a8 MOV RDI,R14 CALL 0x00315ebe BT EBP,0xa JC 0x00158898 BT EBP,0xb JC 0x00158909 BT EBP,0xc MOVSS XMM0,dword ptr [R14 + 0x40] MOV RDI,RBX MOV ESI,EAX JC 0x00158944 CALL 0x00180923 JMP 0x001588a8 LAB_00158898: MOVSS XMM0,dword ptr [R14 + 0x40] MOV RDI,RBX MOV ESI,EAX CALL 0x0017eb71 LAB_001588a8: CMP dword ptr [R14 + 0x44],-0x1 JZ 0x001588ed LEA RDI,[R14 + 0x20] CALL 0x00315ebe MOV EBP,EAX MOV RDI,R14 ADD RDI,0x30 CALL 0x00315ebe MOV ESI,dword ptr [R14 + 0x44] MOVSS XMM0,dword ptr [R14 + 0x48] MOVZX EDX,byte ptr [R14 + 0x57] MOVZX R8D,byte ptr [R14 + 0x56] MOVSS XMM1,dword ptr [R14 + 0x4c] MOV RDI,RBX MOV ECX,EAX MOV R9D,EBP CALL 0x0016528e LAB_001588ed: LEA RAX,[0x436c98] MOV RDI,qword ptr [RAX] ADD RDI,0x38 CALL 0x00155a36 LAB_00158900: ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_00158909: LEA RDX,[RSP + 0x8] MOV ECX,0x9 MOV RDI,RDX MOV RSI,RBX BT EBP,0xc JC 0x0015894e MOVSQ.REP RDI,RSI MOV RCX,qword ptr [RBX + 0x48] MOV qword ptr [RDX + 0x48],RCX INC ECX MOV dword ptr [RDX + 0x50],ECX MOVSS XMM0,dword ptr [R14 + 0x40] MOV RDI,RDX MOV ESI,EAX CALL 0x0017fb02 JMP 0x001588a8 LAB_00158944: CALL 0x001801d8 JMP 0x001588a8 LAB_0015894e: MOVSQ.REP RDI,RSI MOV RCX,qword ptr [RBX + 0x48] MOV qword ptr [RDX + 0x48],RCX INC ECX MOV dword ptr [RDX + 0x50],ECX MOVSS XMM0,dword ptr [R14 + 0x40] MOV RDI,RDX MOV ESI,EAX CALL 0x0017f3e4 JMP 0x001588a8
/* void ImPlot3D::PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > >(char const*, ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > const&, int) */ void ImPlot3D:: PlotLineEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (char *param_1,GetterXYZ *param_2,int param_3) { bool bVar1; uint uVar2; uint uVar3; ImVec4 *pIVar4; long lVar5; GetterXYZ *pGVar6; GetterLoop *pGVar7; byte bVar8; GetterLoop local_70 [72]; int8 local_28; int local_20; bVar8 = 0; bVar1 = BeginItemEx<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (param_1,param_2,param_3,0); if (bVar1) { pIVar4 = (ImVec4 *)GetItemData(); if ((1 < *(int *)(param_2 + 0x48)) && (pIVar4[0x54] == (ImVec4)0x1)) { uVar2 = ImGui::GetColorU32(pIVar4); if (((uint)param_3 >> 10 & 1) == 0) { if (((uint)param_3 >> 0xb & 1) == 0) { if (((uint)param_3 >> 0xc & 1) == 0) { RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned_int,float> (param_2,uVar2,*(float *)(pIVar4 + 0x40)); } else { RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned_int,float> (param_2,uVar2,*(float *)(pIVar4 + 0x40)); } } else { lVar5 = 9; pGVar6 = param_2; pGVar7 = local_70; if (((uint)param_3 >> 0xc & 1) == 0) { for (; lVar5 != 0; lVar5 = lVar5 + -1) { *(int8 *)pGVar7 = *(int8 *)pGVar6; pGVar6 = pGVar6 + (ulong)bVar8 * -0x10 + 8; pGVar7 = pGVar7 + (ulong)bVar8 * -0x10 + 8; } local_28 = *(int8 *)(param_2 + 0x48); local_20 = (int)local_28 + 1; RenderPrimitives<ImPlot3D::RendererLineStrip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,unsigned_int,float> (local_70,uVar2,*(float *)(pIVar4 + 0x40)); } else { for (; lVar5 != 0; lVar5 = lVar5 + -1) { *(int8 *)pGVar7 = *(int8 *)pGVar6; pGVar6 = pGVar6 + (ulong)bVar8 * -0x10 + 8; pGVar7 = pGVar7 + (ulong)bVar8 * -0x10 + 8; } local_28 = *(int8 *)(param_2 + 0x48); local_20 = (int)local_28 + 1; RenderPrimitives<ImPlot3D::RendererLineStripSkip,ImPlot3D::GetterLoop<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>,unsigned_int,float> (local_70,uVar2,*(float *)(pIVar4 + 0x40)); } } } else { RenderPrimitives<ImPlot3D::RendererLineSegments,ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>,unsigned_int,float> (param_2,uVar2,*(float *)(pIVar4 + 0x40)); } } if (*(int *)(pIVar4 + 0x44) != -1) { uVar2 = ImGui::GetColorU32(pIVar4 + 0x20); uVar3 = ImGui::GetColorU32(pIVar4 + 0x30); RenderMarkers<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> (param_2,*(int *)(pIVar4 + 0x44),*(float *)(pIVar4 + 0x48),(bool)pIVar4[0x57],uVar3, (bool)pIVar4[0x56],uVar2,*(float *)(pIVar4 + 0x4c)); } ImPlot3DNextItemData::Reset((ImPlot3DNextItemData *)(GImPlot3D + 0x38)); } return; }
13,881
os_thread_set_prio
qoraal-tictactoe/build_O0/_deps/qoraal-src/src/os_posix.c
uint32_t os_thread_set_prio (p_thread_t* thread, uint32_t prio) { if (!thread || !*thread) { return 0; // Invalid thread, returning default priority } OS_THREAD_WA_T* wa = (OS_THREAD_WA_T*)*thread; if (!wa) { return 0; // Invalid thread wrapper } int policy; struct sched_param param; if (pthread_getschedparam(wa->tid, &policy, &param) == 0) { uint32_t old_custom_priority = map_posix_to_custom_priority(param.sched_priority); // Save old priority param.sched_priority = map_custom_to_posix_priority(prio); // Map new priority to POSIX if (pthread_setschedparam(wa->tid, policy, &param) == 0) { return old_custom_priority; // Return the old custom priority } } return 0; // If setting priority fails, return default priority }
O0
c
os_thread_set_prio: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1c330 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x1c339 movl $0x0, -0x4(%rbp) jmp 0x1c3ac movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x1c354 movl $0x0, -0x4(%rbp) jmp 0x1c3ac movq -0x20(%rbp), %rax movq (%rax), %rdi leaq -0x24(%rbp), %rsi leaq -0x28(%rbp), %rdx callq 0x6360 cmpl $0x0, %eax jne 0x1c3a5 movl -0x28(%rbp), %edi callq 0x1bd10 movl %eax, -0x2c(%rbp) movl -0x14(%rbp), %edi callq 0x1bcb0 movl %eax, -0x28(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rdi movl -0x24(%rbp), %esi leaq -0x28(%rbp), %rdx callq 0x6120 cmpl $0x0, %eax jne 0x1c3a3 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x1c3ac jmp 0x1c3a5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
os_thread_set_prio: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi cmp [rbp+var_10], 0 jz short loc_1C330 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_1C339 loc_1C330: mov [rbp+var_4], 0 jmp short loc_1C3AC loc_1C339: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_1C354 mov [rbp+var_4], 0 jmp short loc_1C3AC loc_1C354: mov rax, [rbp+var_20] mov rdi, [rax] lea rsi, [rbp+var_24] lea rdx, [rbp+var_28] call _pthread_getschedparam cmp eax, 0 jnz short loc_1C3A5 mov edi, [rbp+var_28] call map_posix_to_custom_priority mov [rbp+var_2C], eax mov edi, [rbp+var_14] call map_custom_to_posix_priority mov [rbp+var_28], eax mov rax, [rbp+var_20] mov rdi, [rax] mov esi, [rbp+var_24] lea rdx, [rbp+var_28] call _pthread_setschedparam cmp eax, 0 jnz short loc_1C3A3 mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_1C3AC loc_1C3A3: jmp short $+2 loc_1C3A5: mov [rbp+var_4], 0 loc_1C3AC: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long os_thread_set_prio(_QWORD *a1, int a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] int v4; // [rsp+8h] [rbp-28h] BYREF unsigned int v5; // [rsp+Ch] [rbp-24h] BYREF _QWORD *v6; // [rsp+10h] [rbp-20h] int v7; // [rsp+1Ch] [rbp-14h] _QWORD *v8; // [rsp+20h] [rbp-10h] v8 = a1; v7 = a2; if ( a1 && *v8 ) { v6 = (_QWORD *)*v8; if ( v6 ) { if ( (unsigned int)pthread_getschedparam(*v6, &v5, &v4) ) return 0; v3 = map_posix_to_custom_priority(v4); v4 = map_custom_to_posix_priority(v7); if ( (unsigned int)pthread_setschedparam(*v6, v5, &v4) ) return 0; else return v3; } else { return 0; } } else { return 0; } }
os_thread_set_prio: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011c330 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0011c339 LAB_0011c330: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0011c3ac LAB_0011c339: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0011c354 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0011c3ac LAB_0011c354: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x24] LEA RDX,[RBP + -0x28] CALL 0x00106360 CMP EAX,0x0 JNZ 0x0011c3a5 MOV EDI,dword ptr [RBP + -0x28] CALL 0x0011bd10 MOV dword ptr [RBP + -0x2c],EAX MOV EDI,dword ptr [RBP + -0x14] CALL 0x0011bcb0 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV ESI,dword ptr [RBP + -0x24] LEA RDX,[RBP + -0x28] CALL 0x00106120 CMP EAX,0x0 JNZ 0x0011c3a3 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x0011c3ac LAB_0011c3a3: JMP 0x0011c3a5 LAB_0011c3a5: MOV dword ptr [RBP + -0x4],0x0 LAB_0011c3ac: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 os_thread_set_prio(long *param_1,int4 param_2) { int iVar1; int4 uVar2; sched_param local_30; int local_2c; pthread_t *local_28; int4 local_1c; long *local_18; if ((((param_1 != (long *)0x0) && (*param_1 != 0)) && (local_28 = (pthread_t *)*param_1, local_28 != (pthread_t *)0x0)) && (local_1c = param_2, local_18 = param_1, iVar1 = pthread_getschedparam(*local_28,&local_2c,&local_30), iVar1 == 0)) { uVar2 = map_posix_to_custom_priority(local_30.__sched_priority); local_30.__sched_priority = map_custom_to_posix_priority(local_1c); iVar1 = pthread_setschedparam(*local_28,local_2c,&local_30); if (iVar1 == 0) { return uVar2; } } return 0; }
13,882
vec_czero
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/vect.h
static inline void vec_czero(void *ret, size_t num, bool_t cbit) { limb_t *rp = (limb_t *)ret; size_t i; limb_t mask; launder(cbit); mask = (limb_t)0 - (cbit^1); num /= sizeof(limb_t); for (i = 0; i < num; i++) rp[i] &= mask; }
O0
c
vec_czero: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx xorq $0x1, %rcx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax shrq $0x3, %rax movq %rax, -0x10(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0xb8021 movq -0x30(%rbp), %rdx movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx andq (%rax,%rcx,8), %rdx movq %rdx, (%rax,%rcx,8) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0xb7ff5 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
vec_czero: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_18] xor rcx, 1 xor eax, eax sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_10] shr rax, 3 mov [rbp+var_10], rax mov [rbp+var_28], 0 loc_B7FF5: mov rax, [rbp+var_28] cmp rax, [rbp+var_10] jnb short loc_B8021 mov rdx, [rbp+var_30] mov rax, [rbp+var_20] mov rcx, [rbp+var_28] and rdx, [rax+rcx*8] mov [rax+rcx*8], rdx mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_B7FF5 loc_B8021: pop rbp retn
unsigned long long vec_czero(long long a1, unsigned long long a2, long long a3) { unsigned long long result; // rax unsigned long long i; // [rsp+8h] [rbp-28h] for ( i = 0LL; ; ++i ) { result = i; if ( i >= a2 >> 3 ) break; *(_QWORD *)(a1 + 8 * i) &= -(a3 ^ 1); } return result; }
vec_czero: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] XOR RCX,0x1 XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x3 MOV qword ptr [RBP + -0x10],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_001b7ff5: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x10] JNC 0x001b8021 MOV RDX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] AND RDX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001b7ff5 LAB_001b8021: POP RBP RET
void vec_czero(long param_1,ulong param_2,ulong param_3) { int8 local_30; for (local_30 = 0; local_30 < param_2 >> 3; local_30 = local_30 + 1) { *(ulong *)(param_1 + local_30 * 8) = -(param_3 ^ 1) & *(ulong *)(param_1 + local_30 * 8); } return; }
13,883
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; }
O0
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rbp) cmpq $0x0, %rax je 0x8799b movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0x87999 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) jmp 0x879aa jmp 0x87950 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
strmake: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx loc_87950: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rcx cmp rax, 0 jz short loc_8799B mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx mov [rcx], al cmp al, 0 jnz short loc_87999 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax jmp short loc_879AA loc_87999: jmp short loc_87950 loc_8799B: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_879AA: mov rax, [rbp+var_8] pop rbp retn
_BYTE * strmake(_BYTE *a1, _BYTE *a2, long long a3) { _BYTE *v4; // rax _BYTE *v5; // rcx while ( a3-- ) { v4 = a2++; LOBYTE(v4) = *v4; v5 = a1++; *v5 = (_BYTE)v4; if ( !(_BYTE)v4 ) return a1 - 1; } *a1 = 0; return a1; }
strmake: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LAB_00187950: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x20],RCX CMP RAX,0x0 JZ 0x0018799b MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x00187999 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001879aa LAB_00187999: JMP 0x00187950 LAB_0018799b: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_001879aa: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * strmake(char *param_1,char *param_2,long param_3) { char cVar1; char *pcVar2; long local_28; char *local_20; char *local_18; local_28 = param_3; local_20 = param_2; pcVar2 = param_1; do { local_18 = pcVar2; if (local_28 == 0) { *local_18 = '\0'; return local_18; } cVar1 = *local_20; *local_18 = cVar1; local_28 = local_28 + -1; local_20 = local_20 + 1; pcVar2 = local_18 + 1; } while (cVar1 != '\0'); return local_18; }
13,884
ma_crypt_post_write_hook
eloqsql/storage/maria/ma_crypt.c
static void ma_crypt_post_write_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } maria_page_write_failure(res, args); }
O3
c
ma_crypt_post_write_hook: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movl %edi, %r14d movq 0x18(%rsi), %rax testq %rax, %rax je 0x6a3f6 movq (%rbx), %rdi movq %rax, (%rbx) movq $0x0, 0x18(%rbx) callq 0xa6612 movl %r14d, %edi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x4107e
ma_crypt_post_write_hook: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14d, edi mov rax, [rsi+18h] test rax, rax jz short loc_6A3F6 mov rdi, [rbx] mov [rbx], rax mov qword ptr [rbx+18h], 0 call my_free loc_6A3F6: mov edi, r14d mov rsi, rbx pop rbx pop r14 pop rbp jmp maria_page_write_failure
long long ma_crypt_post_write_hook(int a1, long long *a2) { long long v3; // rax long long v4; // rdi v3 = a2[3]; if ( v3 ) { v4 = *a2; *a2 = v3; a2[3] = 0LL; my_free(v4); } return maria_page_write_failure(a1, (long long)a2); }
ma_crypt_post_write_hook: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14D,EDI MOV RAX,qword ptr [RSI + 0x18] TEST RAX,RAX JZ 0x0016a3f6 MOV RDI,qword ptr [RBX] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x18],0x0 CALL 0x001a6612 LAB_0016a3f6: MOV EDI,R14D MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x0014107e
void ma_crypt_post_write_hook(int4 param_1,long *param_2) { long lVar1; if (param_2[3] != 0) { lVar1 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar1); } maria_page_write_failure(param_1,param_2); return; }
13,885
async_func_free
bluesky950520[P]quickjs/quickjs.c
static void async_func_free(JSRuntime *rt, JSAsyncFunctionState *s) { JSStackFrame *sf; JSValue *sp; sf = &s->frame; /* close the closure variables. */ close_var_refs(rt, sf); if (sf->arg_buf) { /* cannot free the function if it is running */ assert(sf->cur_sp != NULL); for(sp = sf->arg_buf; sp < sf->cur_sp; sp++) { JS_FreeValueRT(rt, *sp); } js_free_rt(rt, sf->arg_buf); } JS_FreeValueRT(rt, sf->cur_func); JS_FreeValueRT(rt, s->this_val); }
O2
c
async_func_free: pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x18, %rsi callq 0x342d9 movq 0x30(%r14), %r15 testq %r15, %r15 jne 0x342a3 jmp 0x342b5 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x18031 addq $0x10, %r15 cmpq 0x60(%r14), %r15 jb 0x34290 movq 0x30(%r14), %rsi movq %rbx, %rdi callq 0x170cb movq 0x20(%r14), %rsi movq 0x28(%r14), %rdx movq %rbx, %rdi callq 0x18031 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x18031
async_func_free: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi add rsi, 18h call close_var_refs mov r15, [r14+30h] test r15, r15 jnz short loc_342A3 jmp short loc_342B5 loc_34290: mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call JS_FreeValueRT add r15, 10h loc_342A3: cmp r15, [r14+60h] jb short loc_34290 mov rsi, [r14+30h] mov rdi, rbx call js_free_rt loc_342B5: mov rsi, [r14+20h] mov rdx, [r14+28h] mov rdi, rbx call JS_FreeValueRT mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx pop rbx pop r14 pop r15 jmp JS_FreeValueRT
long long async_func_free(long long a1, long long a2) { unsigned long long v2; // r15 close_var_refs(a1, a2 + 24); v2 = *(_QWORD *)(a2 + 48); if ( v2 ) { while ( v2 < *(_QWORD *)(a2 + 96) ) { JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8)); v2 += 16LL; } js_free_rt(a1, *(_QWORD *)(a2 + 48)); } JS_FreeValueRT(a1, *(unsigned int **)(a2 + 32), *(_QWORD *)(a2 + 40)); return JS_FreeValueRT(a1, *(unsigned int **)a2, *(_QWORD *)(a2 + 8)); }
async_func_free: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD RSI,0x18 CALL 0x001342d9 MOV R15,qword ptr [R14 + 0x30] TEST R15,R15 JNZ 0x001342a3 JMP 0x001342b5 LAB_00134290: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00118031 ADD R15,0x10 LAB_001342a3: CMP R15,qword ptr [R14 + 0x60] JC 0x00134290 MOV RSI,qword ptr [R14 + 0x30] MOV RDI,RBX CALL 0x001170cb LAB_001342b5: MOV RSI,qword ptr [R14 + 0x20] MOV RDX,qword ptr [R14 + 0x28] MOV RDI,RBX CALL 0x00118031 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00118031
void async_func_free(int8 param_1,int8 *param_2) { int8 *puVar1; close_var_refs(param_1,param_2 + 3); puVar1 = (int8 *)param_2[6]; if (puVar1 != (int8 *)0x0) { for (; puVar1 < (int8 *)param_2[0xc]; puVar1 = puVar1 + 2) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); } js_free_rt(param_1,param_2[6]); } JS_FreeValueRT(param_1,param_2[4],param_2[5]); JS_FreeValueRT(param_1,*param_2,param_2[1]); return; }
13,886
unlink_hash
eloqsql/storage/maria/ma_pagecache.c
static void unlink_hash(PAGECACHE *pagecache, PAGECACHE_HASH_LINK *hash_link) { DBUG_ENTER("unlink_hash"); DBUG_PRINT("enter", ("hash_link: %p block: %p fd: %u pos: %lu requests: %u", hash_link, hash_link->block, (uint) hash_link->file.file, (ulong) hash_link->pageno, hash_link->requests)); DBUG_ASSERT(hash_link->requests == 0); DBUG_ASSERT(!hash_link->block || hash_link->block->pins == 0); if ((*hash_link->prev= hash_link->next)) hash_link->next->prev= hash_link->prev; hash_link->block= NULL; if (pagecache->waiting_for_hash_link.last_thread) { /* Signal that a free hash link has appeared */ struct st_my_thread_var *last_thread= pagecache->waiting_for_hash_link.last_thread; struct st_my_thread_var *first_thread= last_thread->next; struct st_my_thread_var *next_thread= first_thread; PAGECACHE_PAGE *first_page= (PAGECACHE_PAGE *) (first_thread->keycache_link); struct st_my_thread_var *thread; hash_link->file= first_page->file; DBUG_ASSERT(first_page->pageno < ((1ULL) << 40)); hash_link->pageno= first_page->pageno; do { PAGECACHE_PAGE *page; thread= next_thread; page= (PAGECACHE_PAGE *) thread->keycache_link; 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 (page->file.file == hash_link->file.file && page->pageno == hash_link->pageno) { DBUG_PRINT("signal", ("thread %s %ld", thread->name, (ulong) thread->id)); pagecache_pthread_cond_signal(&thread->suspend); wqueue_unlink_from_queue(&pagecache->waiting_for_hash_link, thread); } } while (thread != last_thread); /* Add this to the hash, so that the waiting threads can find it when they retry the call to get_hash_link(). This entry is special in that it has no associated block. */ link_hash(&pagecache->hash_root[PAGECACHE_HASH(pagecache, hash_link->file, hash_link->pageno)], hash_link); DBUG_VOID_RETURN; } /* Add hash to free hash list */ hash_link->next= pagecache->free_hash_list; pagecache->free_hash_list= hash_link; DBUG_VOID_RETURN; }
O0
c
unlink_hash: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x3e3a2 jmp 0x3e3a4 jmp 0x3e3a6 jmp 0x3e3a8 jmp 0x3e3aa movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x3e3d5 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x118(%rax) je 0x3e508 movq -0x8(%rbp), %rax movq 0x118(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0xa8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi addq $0x18, %rdi movq -0x30(%rbp), %rsi movl $0x48, %edx callq 0x2a0b0 jmp 0x3e440 movq -0x30(%rbp), %rax movq 0x48(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x60(%rax) movq -0x28(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq 0xa8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x28(%rbp) movq -0x40(%rbp), %rax movl 0x10(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0x28(%rcx), %eax jne 0x3e4bd movq -0x40(%rbp), %rax movq 0x48(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x60(%rcx), %rax jne 0x3e4bd jmp 0x3e49a jmp 0x3e49c movq -0x38(%rbp), %rdi addq $0x8, %rdi callq 0x3e930 movq -0x8(%rbp), %rdi addq $0x118, %rdi # imm = 0x118 movq -0x38(%rbp), %rsi callq 0x106050 jmp 0x3e4bf movq -0x38(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x3e450 movq -0x8(%rbp), %rax movq 0x88(%rax), %rdi movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x10(%rbp), %rcx movslq 0x28(%rcx), %rcx addq %rcx, %rax movq -0x8(%rbp), %rcx movq 0x20(%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax shlq $0x3, %rax addq %rax, %rdi movq -0x10(%rbp), %rsi callq 0x3e8e0 jmp 0x3e52b movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) jmp 0x3e52b addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
unlink_hash: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_3E3A2: jmp short $+2 loc_3E3A4: jmp short $+2 loc_3E3A6: jmp short $+2 loc_3E3A8: jmp short $+2 loc_3E3AA: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov rcx, [rcx+8] mov [rcx], rax cmp rax, 0 jz short loc_3E3D5 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx loc_3E3D5: mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+118h], 0 jz loc_3E508 mov rax, [rbp+var_8] mov rax, [rax+118h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rax, [rax+88h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rax, [rax+0A8h] mov [rbp+var_30], rax mov rdi, [rbp+var_10] add rdi, 18h mov rsi, [rbp+var_30] mov edx, 48h ; 'H' call _memcpy jmp short $+2 loc_3E440: mov rax, [rbp+var_30] mov rcx, [rax+48h] mov rax, [rbp+var_10] mov [rax+60h], rcx loc_3E450: mov rax, [rbp+var_28] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rax, [rax+0A8h] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax+88h] mov [rbp+var_28], rax mov rax, [rbp+var_40] mov eax, [rax+10h] mov rcx, [rbp+var_10] cmp eax, [rcx+28h] jnz short loc_3E4BD mov rax, [rbp+var_40] mov rax, [rax+48h] mov rcx, [rbp+var_10] cmp rax, [rcx+60h] jnz short loc_3E4BD jmp short $+2 loc_3E49A: jmp short $+2 loc_3E49C: mov rdi, [rbp+var_38] add rdi, 8 call inline_mysql_cond_signal mov rdi, [rbp+var_8] add rdi, 118h mov rsi, [rbp+var_38] call wqueue_unlink_from_queue loc_3E4BD: jmp short $+2 loc_3E4BF: mov rax, [rbp+var_38] cmp rax, [rbp+var_18] jnz short loc_3E450 mov rax, [rbp+var_8] mov rdi, [rax+88h] mov rax, [rbp+var_10] mov rax, [rax+60h] mov rcx, [rbp+var_10] movsxd rcx, dword ptr [rcx+28h] add rax, rcx mov rcx, [rbp+var_8] mov rcx, [rcx+20h] sub rcx, 1 and rax, rcx shl rax, 3 add rdi, rax mov rsi, [rbp+var_10] call link_hash jmp short loc_3E52B loc_3E508: mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+98h], rcx jmp short $+2 loc_3E52B: add rsp, 40h pop rbp retn
long long unlink_hash(_QWORD *a1, long long *a2) { long long v2; // rax long long result; // rax long long v4; // [rsp+0h] [rbp-40h] long long v5; // [rsp+8h] [rbp-38h] long long v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] long long v8; // [rsp+28h] [rbp-18h] v2 = *a2; *(_QWORD *)a2[1] = *a2; if ( v2 ) *(_QWORD *)(*a2 + 8) = a2[1]; a2[2] = 0LL; if ( a1[35] ) { v8 = a1[35]; v7 = *(_QWORD *)(v8 + 136); v6 = *(_QWORD *)(v7 + 168); memcpy(a2 + 3, v6, 72LL); a2[12] = *(_QWORD *)(v6 + 72); do { v5 = v7; v4 = *(_QWORD *)(v7 + 168); v7 = *(_QWORD *)(v7 + 136); if ( *(_DWORD *)(v4 + 16) == *((_DWORD *)a2 + 10) && *(_QWORD *)(v4 + 72) == a2[12] ) { inline_mysql_cond_signal(v5 + 8); wqueue_unlink_from_queue(a1 + 35, v5); } } while ( v5 != v8 ); return link_hash(8 * ((a1[4] - 1LL) & (*((int *)a2 + 10) + a2[12])) + a1[17], a2); } else { *a2 = a1[19]; result = (long long)a1; a1[19] = a2; } return result; }
unlink_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0013e3a2 LAB_0013e3a2: JMP 0x0013e3a4 LAB_0013e3a4: JMP 0x0013e3a6 LAB_0013e3a6: JMP 0x0013e3a8 LAB_0013e3a8: JMP 0x0013e3aa LAB_0013e3aa: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x0013e3d5 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX LAB_0013e3d5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x118],0x0 JZ 0x0013e508 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x118] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xa8] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x30] MOV EDX,0x48 CALL 0x0012a0b0 JMP 0x0013e440 LAB_0013e440: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x60],RCX LAB_0013e450: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0xa8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x28] JNZ 0x0013e4bd MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x60] JNZ 0x0013e4bd JMP 0x0013e49a LAB_0013e49a: JMP 0x0013e49c LAB_0013e49c: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x8 CALL 0x0013e930 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x118 MOV RSI,qword ptr [RBP + -0x38] CALL 0x00206050 LAB_0013e4bd: JMP 0x0013e4bf LAB_0013e4bf: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0013e450 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RCX + 0x28] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x20] SUB RCX,0x1 AND RAX,RCX SHL RAX,0x3 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] CALL 0x0013e8e0 JMP 0x0013e52b LAB_0013e508: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX JMP 0x0013e52b LAB_0013e52b: ADD RSP,0x40 POP RBP RET
void unlink_hash(long param_1,long *param_2) { long lVar1; void *__src; long lVar2; bool bVar3; long local_30; lVar1 = *param_2; *(long *)param_2[1] = lVar1; if (lVar1 != 0) { *(long *)(*param_2 + 8) = param_2[1]; } param_2[2] = 0; if (*(long *)(param_1 + 0x118) == 0) { *param_2 = *(long *)(param_1 + 0x98); *(long **)(param_1 + 0x98) = param_2; } else { lVar1 = *(long *)(param_1 + 0x118); local_30 = *(long *)(lVar1 + 0x88); __src = *(void **)(local_30 + 0xa8); memcpy(param_2 + 3,__src,0x48); param_2[0xc] = *(long *)((long)__src + 0x48); do { lVar2 = *(long *)(local_30 + 0x88); if ((*(int *)(*(long *)(local_30 + 0xa8) + 0x10) == (int)param_2[5]) && (*(long *)(*(long *)(local_30 + 0xa8) + 0x48) == param_2[0xc])) { inline_mysql_cond_signal(local_30 + 8); wqueue_unlink_from_queue(param_1 + 0x118,local_30); } bVar3 = local_30 != lVar1; local_30 = lVar2; } while (bVar3); link_hash(*(long *)(param_1 + 0x88) + (param_2[0xc] + (long)(int)param_2[5] & *(long *)(param_1 + 0x20) - 1U) * 8,param_2); } return; }
13,887
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom()
monkey531[P]llama/common/json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::skip_bom(): pushq %rbx movq %rdi, %rbx callq 0x3fe1c cmpl $0xef, %eax jne 0x3f561 movq %rbx, %rdi callq 0x3fe1c cmpl $0xbb, %eax jne 0x3f56d movq %rbx, %rdi callq 0x3fe1c cmpl $0xbf, %eax sete %al jmp 0x3f56f movq %rbx, %rdi callq 0x3fe92 movb $0x1, %al jmp 0x3f56f xorl %eax, %eax popq %rbx retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv: push rbx mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0EFh jnz short loc_3F561 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BBh jnz short loc_3F56D mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) cmp eax, 0BFh setz al jmp short loc_3F56F loc_3F561: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void) mov al, 1 jmp short loc_3F56F loc_3F56D: xor eax, eax loc_3F56F: pop rbx retn
bool nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom( long long a1) { if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get)() == 239 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 187 && (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 191; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1); return 1; }
skip_bom: PUSH RBX MOV RBX,RDI CALL 0x0013fe1c CMP EAX,0xef JNZ 0x0013f561 MOV RDI,RBX CALL 0x0013fe1c CMP EAX,0xbb JNZ 0x0013f56d MOV RDI,RBX CALL 0x0013fe1c CMP EAX,0xbf SETZ AL JMP 0x0013f56f LAB_0013f561: MOV RDI,RBX CALL 0x0013fe92 MOV AL,0x1 JMP 0x0013f56f LAB_0013f56d: XOR EAX,EAX LAB_0013f56f: POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::skip_bom() */ bool __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::skip_bom(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; bool bVar2; iVar1 = get(this); if (iVar1 == 0xef) { iVar1 = get(this); if (iVar1 == 0xbb) { iVar1 = get(this); bVar2 = iVar1 == 0xbf; } else { bVar2 = false; } } else { unget(this); bVar2 = true; } return bVar2; }
13,888
MemoryManager::~MemoryManager()
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
MemoryManager::~MemoryManager() { for (uint32_t i = 0; i < 1024; ++i) { if (this->memory[i] != nullptr) { for (uint32_t j = 0; j < 1024; ++j) { if (this->memory[i][j] != nullptr) { delete[] this->memory[i][j]; this->memory[i][j] = nullptr; } } delete[] this->memory[i]; this->memory[i] = nullptr; } } }
O0
cpp
MemoryManager::~MemoryManager(): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x0, 0x1c(%rsp) cmpl $0x400, 0x1c(%rsp) # imm = 0x400 jae 0x32ac movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x329a movl $0x0, 0x18(%rsp) cmpl $0x400, 0x18(%rsp) # imm = 0x400 jae 0x3269 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movl 0x18(%rsp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x325a movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movl 0x18(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0x3241 movq 0x8(%rsp), %rdi callq 0x21d0 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movl 0x18(%rsp), %ecx movq $0x0, (%rax,%rcx,8) jmp 0x325c movl 0x18(%rsp), %eax addl $0x1, %eax movl %eax, 0x18(%rsp) jmp 0x31f5 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, (%rsp) cmpq $0x0, %rax je 0x3289 movq (%rsp), %rdi callq 0x21d0 movq 0x10(%rsp), %rax movl 0x1c(%rsp), %ecx movq $0x0, (%rax,%rcx,8) jmp 0x329c movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x31cb addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN13MemoryManagerD2Ev: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_18], rax mov [rsp+28h+var_C], 0 loc_31CB: cmp [rsp+28h+var_C], 400h jnb loc_32AC mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] cmp qword ptr [rax+rcx*8], 0 jz loc_329A mov [rsp+28h+var_10], 0 loc_31F5: cmp [rsp+28h+var_10], 400h jnb short loc_3269 mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov ecx, [rsp+28h+var_10] cmp qword ptr [rax+rcx*8], 0 jz short loc_325A mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov ecx, [rsp+28h+var_10] mov rax, [rax+rcx*8] mov [rsp+28h+var_20], rax cmp rax, 0 jz short loc_3241 mov rdi, [rsp+28h+var_20]; void * call __ZdaPv; operator delete[](void *) loc_3241: mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov ecx, [rsp+28h+var_10] mov qword ptr [rax+rcx*8], 0 loc_325A: jmp short $+2 loc_325C: mov eax, [rsp+28h+var_10] add eax, 1 mov [rsp+28h+var_10], eax jmp short loc_31F5 loc_3269: mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov [rsp+28h+var_28], rax cmp rax, 0 jz short loc_3289 mov rdi, [rsp+28h+var_28]; void * call __ZdaPv; operator delete[](void *) loc_3289: mov rax, [rsp+28h+var_18] mov ecx, [rsp+28h+var_C] mov qword ptr [rax+rcx*8], 0 loc_329A: jmp short $+2 loc_329C: mov eax, [rsp+28h+var_C] add eax, 1 mov [rsp+28h+var_C], eax jmp loc_31CB loc_32AC: add rsp, 28h retn
void MemoryManager::~MemoryManager(MemoryManager *this) { void *v1; // [rsp+0h] [rbp-28h] void *v2; // [rsp+8h] [rbp-20h] unsigned int j; // [rsp+18h] [rbp-10h] unsigned int i; // [rsp+1Ch] [rbp-Ch] for ( i = 0; i < 0x400; ++i ) { if ( *((_QWORD *)this + i) ) { for ( j = 0; j < 0x400; ++j ) { if ( *(_QWORD *)(*((_QWORD *)this + i) + 8LL * j) ) { v2 = *(void **)(*((_QWORD *)this + i) + 8LL * j); if ( v2 ) operator delete[](v2); *(_QWORD *)(*((_QWORD *)this + i) + 8LL * j) = 0LL; } } v1 = (void *)*((_QWORD *)this + i); if ( v1 ) operator delete[](v1); *((_QWORD *)this + i) = 0LL; } } }
~MemoryManager: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x1c],0x0 LAB_001031cb: CMP dword ptr [RSP + 0x1c],0x400 JNC 0x001032ac MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0010329a MOV dword ptr [RSP + 0x18],0x0 LAB_001031f5: CMP dword ptr [RSP + 0x18],0x400 JNC 0x00103269 MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RSP + 0x18] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x0010325a MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX CMP RAX,0x0 JZ 0x00103241 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001021d0 LAB_00103241: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RSP + 0x18] MOV qword ptr [RAX + RCX*0x8],0x0 LAB_0010325a: JMP 0x0010325c LAB_0010325c: MOV EAX,dword ptr [RSP + 0x18] ADD EAX,0x1 MOV dword ptr [RSP + 0x18],EAX JMP 0x001031f5 LAB_00103269: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX CMP RAX,0x0 JZ 0x00103289 MOV RDI,qword ptr [RSP] CALL 0x001021d0 LAB_00103289: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x1c] MOV qword ptr [RAX + RCX*0x8],0x0 LAB_0010329a: JMP 0x0010329c LAB_0010329c: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001031cb LAB_001032ac: ADD RSP,0x28 RET
/* MemoryManager::~MemoryManager() */ void __thiscall MemoryManager::~MemoryManager(MemoryManager *this) { void *pvVar1; uint local_10; uint local_c; for (local_c = 0; local_c < 0x400; local_c = local_c + 1) { if (*(long *)(this + (ulong)local_c * 8) != 0) { for (local_10 = 0; local_10 < 0x400; local_10 = local_10 + 1) { if (*(long *)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8) != 0) { pvVar1 = *(void **)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8); if (pvVar1 != (void *)0x0) { operator_delete__(pvVar1); } *(int8 *)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8) = 0; } } if (*(void **)(this + (ulong)local_c * 8) != (void *)0x0) { operator_delete__(*(void **)(this + (ulong)local_c * 8)); } *(int8 *)(this + (ulong)local_c * 8) = 0; } } return; }
13,889
MemoryManager::~MemoryManager()
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp
MemoryManager::~MemoryManager() { for (uint32_t i = 0; i < 1024; ++i) { if (this->memory[i] != nullptr) { for (uint32_t j = 0; j < 1024; ++j) { if (this->memory[i][j] != nullptr) { delete[] this->memory[i][j]; this->memory[i][j] = nullptr; } } delete[] this->memory[i]; this->memory[i] = nullptr; } } }
O1
cpp
MemoryManager::~MemoryManager(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx xorl %r14d, %r14d cmpq $0x0, (%rbx,%r14,8) je 0x2cdd xorl %r15d, %r15d movq (%rbx,%r14,8), %rax movq (%rax,%r15,8), %rdi testq %rdi, %rdi je 0x2cbb callq 0x21b0 movq (%rbx,%r14,8), %rax movq $0x0, (%rax,%r15,8) incq %r15 cmpq $0x400, %r15 # imm = 0x400 jne 0x2c9d movq (%rbx,%r14,8), %rdi testq %rdi, %rdi je 0x2cd5 callq 0x21b0 movq $0x0, (%rbx,%r14,8) incq %r14 cmpq $0x400, %r14 # imm = 0x400 jne 0x2c93 popq %rbx popq %r14 popq %r15 retq nop
_ZN13MemoryManagerD2Ev: push r15 push r14 push rbx mov rbx, rdi xor r14d, r14d loc_2C93: cmp qword ptr [rbx+r14*8], 0 jz short loc_2CDD xor r15d, r15d loc_2C9D: mov rax, [rbx+r14*8] mov rdi, [rax+r15*8]; void * test rdi, rdi jz short loc_2CBB call __ZdaPv; operator delete[](void *) mov rax, [rbx+r14*8] mov qword ptr [rax+r15*8], 0 loc_2CBB: inc r15 cmp r15, 400h jnz short loc_2C9D mov rdi, [rbx+r14*8]; void * test rdi, rdi jz short loc_2CD5 call __ZdaPv; operator delete[](void *) loc_2CD5: mov qword ptr [rbx+r14*8], 0 loc_2CDD: inc r14 cmp r14, 400h jnz short loc_2C93 pop rbx pop r14 pop r15 retn
void MemoryManager::~MemoryManager(MemoryManager *this) { long long i; // r14 long long j; // r15 void *v4; // rdi void *v5; // rdi for ( i = 0LL; i != 1024; ++i ) { if ( *((_QWORD *)this + i) ) { for ( j = 0LL; j != 1024; ++j ) { v4 = *(void **)(*((_QWORD *)this + i) + 8 * j); if ( v4 ) { operator delete[](v4); *(_QWORD *)(*((_QWORD *)this + i) + 8 * j) = 0LL; } } v5 = (void *)*((_QWORD *)this + i); if ( v5 ) operator delete[](v5); *((_QWORD *)this + i) = 0LL; } } }
~MemoryManager: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI XOR R14D,R14D LAB_00102c93: CMP qword ptr [RBX + R14*0x8],0x0 JZ 0x00102cdd XOR R15D,R15D LAB_00102c9d: MOV RAX,qword ptr [RBX + R14*0x8] MOV RDI,qword ptr [RAX + R15*0x8] TEST RDI,RDI JZ 0x00102cbb CALL 0x001021b0 MOV RAX,qword ptr [RBX + R14*0x8] MOV qword ptr [RAX + R15*0x8],0x0 LAB_00102cbb: INC R15 CMP R15,0x400 JNZ 0x00102c9d MOV RDI,qword ptr [RBX + R14*0x8] TEST RDI,RDI JZ 0x00102cd5 CALL 0x001021b0 LAB_00102cd5: MOV qword ptr [RBX + R14*0x8],0x0 LAB_00102cdd: INC R14 CMP R14,0x400 JNZ 0x00102c93 POP RBX POP R14 POP R15 RET
/* MemoryManager::~MemoryManager() */ void __thiscall MemoryManager::~MemoryManager(MemoryManager *this) { void *pvVar1; long lVar2; long lVar3; lVar2 = 0; do { if (*(long *)(this + lVar2 * 8) != 0) { lVar3 = 0; do { pvVar1 = *(void **)(*(long *)(this + lVar2 * 8) + lVar3 * 8); if (pvVar1 != (void *)0x0) { operator_delete__(pvVar1); *(int8 *)(*(long *)(this + lVar2 * 8) + lVar3 * 8) = 0; } lVar3 = lVar3 + 1; } while (lVar3 != 0x400); if (*(void **)(this + lVar2 * 8) != (void *)0x0) { operator_delete__(*(void **)(this + lVar2 * 8)); } *(int8 *)(this + lVar2 * 8) = 0; } lVar2 = lVar2 + 1; } while (lVar2 != 0x400); return; }
13,890
mysql_mbcharlen_utf8mb3
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } return 0; }
O0
c
mysql_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x80, -0x8(%rbp) jae 0x674c9 movl $0x1, -0x4(%rbp) jmp 0x67506 cmpl $0xc2, -0x8(%rbp) jae 0x674db movl $0x0, -0x4(%rbp) jmp 0x67506 cmpl $0xe0, -0x8(%rbp) jae 0x674ed movl $0x2, -0x4(%rbp) jmp 0x67506 cmpl $0xf0, -0x8(%rbp) jae 0x674ff movl $0x3, -0x4(%rbp) jmp 0x67506 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
mysql_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 80h jnb short loc_674C9 mov [rbp+var_4], 1 jmp short loc_67506 loc_674C9: cmp [rbp+var_8], 0C2h jnb short loc_674DB mov [rbp+var_4], 0 jmp short loc_67506 loc_674DB: cmp [rbp+var_8], 0E0h jnb short loc_674ED mov [rbp+var_4], 2 jmp short loc_67506 loc_674ED: cmp [rbp+var_8], 0F0h jnb short loc_674FF mov [rbp+var_4], 3 jmp short loc_67506 loc_674FF: mov [rbp+var_4], 0 loc_67506: mov eax, [rbp+var_4] pop rbp retn
long long mysql_mbcharlen_utf8mb3(unsigned int a1) { if ( a1 >= 0x80 ) { if ( a1 >= 0xC2 ) { if ( a1 >= 0xE0 ) { if ( a1 >= 0xF0 ) return 0; else return 3; } else { return 2; } } else { return 0; } } else { return 1; } }
mysql_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x80 JNC 0x001674c9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00167506 LAB_001674c9: CMP dword ptr [RBP + -0x8],0xc2 JNC 0x001674db MOV dword ptr [RBP + -0x4],0x0 JMP 0x00167506 LAB_001674db: CMP dword ptr [RBP + -0x8],0xe0 JNC 0x001674ed MOV dword ptr [RBP + -0x4],0x2 JMP 0x00167506 LAB_001674ed: CMP dword ptr [RBP + -0x8],0xf0 JNC 0x001674ff MOV dword ptr [RBP + -0x4],0x3 JMP 0x00167506 LAB_001674ff: MOV dword ptr [RBP + -0x4],0x0 LAB_00167506: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_mbcharlen_utf8mb3(uint param_1) { int4 local_c; if (param_1 < 0x80) { local_c = 1; } else if (param_1 < 0xc2) { local_c = 0; } else if (param_1 < 0xe0) { local_c = 2; } else if (param_1 < 0xf0) { local_c = 3; } else { local_c = 0; } return local_c; }
13,891
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
VariableExpr(const Location & location, const std::string& n) : Expression(location), name(n) {}
O1
cpp
minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x93469(%rip), %r15 # 0x12d3b8 addq $0x10, %r15 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x99f7f movq 0x95017(%rip), %rcx # 0x12ef88 cmpb $0x0, (%rcx) je 0x99f7b incl 0x8(%rax) jmp 0x99f7f lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x93e32(%rip), %rax # 0x12ddc0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0x2313a popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x99fca callq 0x6e160 movq %r14, %rdi callq 0x1bfd0
_ZN5minja12VariableExprC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov rbx, rdi lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add r15, 10h mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_99F7F mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_99F7B inc dword ptr [rax+8] jmp short loc_99F7F loc_99F7B: lock inc dword ptr [rax+8] loc_99F7F: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja12VariableExprE; `vtable for'minja::VariableExpr add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax mov rsi, [rdx] mov rdx, [rdx+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) pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_99FCA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_99FCA: mov rdi, r14 call __Unwind_Resume
long long minja::VariableExpr::VariableExpr(_QWORD *a1, _QWORD *a2, long long a3) { long long v3; // rax *a1 = &`vtable for'minja::Expression + 2; a1[1] = *a2; v3 = a2[1]; a1[2] = v3; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } a1[3] = a2[2]; *a1 = &`vtable for'minja::VariableExpr + 2; a1[4] = a1 + 6; return std::string::_M_construct<char *>(a1 + 4, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); }
VariableExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA R15,[0x22d3b8] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x00199f7f MOV RCX,qword ptr [0x0022ef88] CMP byte ptr [RCX],0x0 JZ 0x00199f7b INC dword ptr [RAX + 0x8] JMP 0x00199f7f LAB_00199f7b: INC.LOCK dword ptr [RAX + 0x8] LAB_00199f7f: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x22ddc0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_00199fab: CALL 0x0012313a LAB_00199fb0: POP RBX POP R14 POP R15 RET
/* minja::VariableExpr::VariableExpr(minja::Location const&, std::__cxx11::string const&) */ void __thiscall minja::VariableExpr::VariableExpr(VariableExpr *this,Location *param_1,string *param_2) { long lVar1; *(int ***)this = &PTR___cxa_pure_virtual_0022d3c8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0022ef88 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_evaluate_0022ddd0; *(VariableExpr **)(this + 0x20) = this + 0x30; /* try { // try from 00199fab to 00199faf has its CatchHandler @ 00199fb6 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); return; }
13,892
common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/arg.cpp
bool common_arg::get_value_from_env(std::string & output) { if (env == nullptr) return false; char * value = std::getenv(env); if (value) { output = value; return true; } return false; }
O0
cpp
common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq 0x18(%rsp), %rax movq %rax, (%rsp) cmpq $0x0, 0x88(%rax) jne 0x67e58 movb $0x0, 0x27(%rsp) jmp 0x67e90 movq (%rsp), %rax movq 0x88(%rax), %rdi callq 0x5ad80 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) je 0x67e8b movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi callq 0x5a6f0 movb $0x1, 0x27(%rsp) jmp 0x67e90 movb $0x0, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_28], rax cmp qword ptr [rax+88h], 0 jnz short loc_67E58 mov [rsp+28h+var_1], 0 jmp short loc_67E90 loc_67E58: mov rax, [rsp+28h+var_28] mov rdi, [rax+88h] call _getenv mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jz short loc_67E8B mov rsi, [rsp+28h+var_20] mov rdi, [rsp+28h+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) mov [rsp+28h+var_1], 1 jmp short loc_67E90 loc_67E8B: mov [rsp+28h+var_1], 0 loc_67E90: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char common_arg::get_value_from_env(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-20h] if ( !*(_QWORD *)(a1 + 136) ) return 0; v3 = getenv(*(_QWORD *)(a1 + 136)); if ( !v3 ) return 0; std::string::operator=(a2, v3); return 1; }
get_value_from_env: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RAX CMP qword ptr [RAX + 0x88],0x0 JNZ 0x00167e58 MOV byte ptr [RSP + 0x27],0x0 JMP 0x00167e90 LAB_00167e58: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x88] CALL 0x0015ad80 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JZ 0x00167e8b MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] CALL 0x0015a6f0 MOV byte ptr [RSP + 0x27],0x1 JMP 0x00167e90 LAB_00167e8b: MOV byte ptr [RSP + 0x27],0x0 LAB_00167e90: MOV AL,byte ptr [RSP + 0x27] AND AL,0x1 ADD RSP,0x28 RET
/* common_arg::get_value_from_env(std::__cxx11::string&) */ int1 __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1) { char *pcVar1; int1 local_1; if (*(long *)(this + 0x88) == 0) { local_1 = 0; } else { pcVar1 = getenv(*(char **)(this + 0x88)); if (pcVar1 == (char *)0x0) { local_1 = 0; } else { std::__cxx11::string::operator=(param_1,pcVar1); local_1 = 1; } } return local_1; }
13,893
httplib::detail::file_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/common/httplib.h
inline std::string file_extension(const std::string &path) { std::smatch m; static auto re = std::regex("\\.([a-zA-Z0-9]+)$"); if (std::regex_search(path, m, re)) { return m[1].str(); } return std::string(); }
O0
c
httplib::detail::file_extension(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x68, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) leaq 0x38(%rsp), %rdi callq 0xe910 cmpb $0x0, 0xbe7d4(%rip) # 0x11e4c0 jne 0x5fd3f leaq 0xbe7cb(%rip), %rdi # 0x11e4c0 callq 0xbe60 cmpl $0x0, %eax je 0x5fd3f leaq 0xbe79a(%rip), %rdi # 0x11e4a0 leaq 0x6f284(%rip), %rsi # 0xcef91 movl $0x10, %edx callq 0x38120 jmp 0x5fd19 leaq -0x4d410(%rip), %rdi # 0x12910 leaq 0xbe779(%rip), %rsi # 0x11e4a0 leaq 0xbbaaa(%rip), %rdx # 0x11b7d8 callq 0xb720 leaq 0xbe786(%rip), %rdi # 0x11e4c0 callq 0xb550 movq 0x58(%rsp), %rdi leaq 0xbe755(%rip), %rdx # 0x11e4a0 leaq 0x38(%rsp), %rsi xorl %ecx, %ecx callq 0x5fea0 movb %al, 0x17(%rsp) jmp 0x5fd5d movb 0x17(%rsp), %al testb $0x1, %al jne 0x5fd67 jmp 0x5fdc4 leaq 0x38(%rsp), %rdi movl $0x1, %esi callq 0x382d0 movq %rax, 0x8(%rsp) jmp 0x5fd7d movq 0x8(%rsp), %rsi movq 0x18(%rsp), %rdi callq 0x59bf0 jmp 0x5fd8e movl $0x1, 0x28(%rsp) jmp 0x5fdd6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0xbe713(%rip), %rdi # 0x11e4c0 callq 0xb540 jmp 0x5fdea movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x5fdea movq 0x18(%rsp), %rdi callq 0xbb80 movl $0x1, 0x28(%rsp) leaq 0x38(%rsp), %rdi callq 0xe990 movq 0x20(%rsp), %rax addq $0x68, %rsp retq leaq 0x38(%rsp), %rdi callq 0xe990 movq 0x30(%rsp), %rdi callq 0xbe10 nop
_ZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 68h mov [rsp+68h+var_50], rdi mov rax, rdi mov [rsp+68h+var_48], rax mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi lea rdi, [rsp+68h+var_30] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void) cmp cs:_ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11, 0; `guard variable for'httplib::detail::file_extension(std::string const&)::re jnz short loc_5FD3F lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_5FD3F lea rdi, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; httplib::detail::file_extension(std::string const&)::re lea rsi, aAZaZ09; "\\.([a-zA-Z0-9]+)$" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_5FD19: lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_release loc_5FD3F: mov rdi, [rsp+68h+var_10] lea rdx, _ZZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; httplib::detail::file_extension(std::string const&)::re lea rsi, [rsp+68h+var_30] xor ecx, ecx call _ZSt12regex_searchISt11char_traitsIcESaIcESaINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS3_12basic_stringIcS1_S2_EEEEEEEcNS3_12regex_traitsIcEEEbRKNS9_IT2_T_T0_EERNS3_13match_resultsINSJ_14const_iteratorET1_EERKNS3_11basic_regexISG_T3_EENSt15regex_constants15match_flag_typeE; std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(std::string const&,std::match_results<std::string::const_iterator> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+68h+var_51], al jmp short $+2 loc_5FD5D: mov al, [rsp+68h+var_51] test al, 1 jnz short loc_5FD67 jmp short loc_5FDC4 loc_5FD67: lea rdi, [rsp+68h+var_30] mov esi, 1 call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEixEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[](ulong) mov [rsp+68h+var_60], rax jmp short $+2 loc_5FD7D: mov rsi, [rsp+68h+var_60] mov rdi, [rsp+68h+var_50] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) jmp short $+2 loc_5FD8E: mov [rsp+68h+var_40], 1 jmp short loc_5FDD6 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, _ZGVZN7httplib6detail14file_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_5FDEA mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_5FDEA loc_5FDC4: mov rdi, [rsp+68h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov [rsp+68h+var_40], 1 loc_5FDD6: lea rdi, [rsp+68h+var_30] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rax, [rsp+68h+var_48] add rsp, 68h retn loc_5FDEA: lea rdi, [rsp+arg_30] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rdi, [rsp+arg_28] call __Unwind_Resume
long long httplib::detail::file_extension(long long a1, long long a2) { long long v2; // rdx long long *v4; // [rsp+8h] [rbp-60h] _BYTE v5[32]; // [rsp+38h] [rbp-30h] BYREF long long v6; // [rsp+58h] [rbp-10h] long long v7; // [rsp+60h] [rbp-8h] v7 = a1; v6 = a2; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results((long long)v5); if ( !(_BYTE)`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&httplib::detail::file_extension(std::string const&)::re[abi:cxx11], (long long)"\\.([a-zA-Z0-9]+)$", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::detail::file_extension(std::string const&)::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::detail::file_extension(std::string const&)::re[abi:cxx11]); } if ( (std::regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( v6, v5, &httplib::detail::file_extension(std::string const&)::re[abi:cxx11], 0LL) & 1) != 0 ) { v4 = (long long *)std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::operator[]( (long long)v5, 1uLL); std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(a1, v4, v2); } else { std::string::basic_string(a1); } std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results((long long)v5); return a1; }
file_extension: SUB RSP,0x68 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI LEA RDI,[RSP + 0x38] CALL 0x0010e910 CMP byte ptr [0x0021e4c0],0x0 JNZ 0x0015fd3f LEA RDI,[0x21e4c0] CALL 0x0010be60 CMP EAX,0x0 JZ 0x0015fd3f LAB_0015fcff: LEA RDI,[0x21e4a0] LEA RSI,[0x1cef91] MOV EDX,0x10 CALL 0x00138120 JMP 0x0015fd19 LAB_0015fd19: LEA RDI,[0x112910] LEA RSI,[0x21e4a0] LEA RDX,[0x21b7d8] CALL 0x0010b720 LEA RDI,[0x21e4c0] CALL 0x0010b550 LAB_0015fd3f: MOV RDI,qword ptr [RSP + 0x58] LAB_0015fd44: LEA RDX,[0x21e4a0] LEA RSI,[RSP + 0x38] XOR ECX,ECX CALL 0x0015fea0 MOV byte ptr [RSP + 0x17],AL JMP 0x0015fd5d LAB_0015fd5d: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x0015fd67 JMP 0x0015fdc4 LAB_0015fd67: LEA RDI,[RSP + 0x38] MOV ESI,0x1 CALL 0x001382d0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0015fd7d LAB_0015fd7d: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x18] CALL 0x00159bf0 LAB_0015fd8c: JMP 0x0015fd8e LAB_0015fd8e: MOV dword ptr [RSP + 0x28],0x1 JMP 0x0015fdd6 LAB_0015fdc4: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0010bb80 MOV dword ptr [RSP + 0x28],0x1 LAB_0015fdd6: LEA RDI,[RSP + 0x38] CALL 0x0010e990 MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x68 RET
/* httplib::detail::file_extension(std::__cxx11::string const&) */ detail * __thiscall httplib::detail::file_extension(detail *this,string *param_1) { bool bVar1; int iVar2; match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> local_30 [32]; string *local_10; detail *local_8; local_10 = param_1; local_8 = this; std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::match_results(local_30); if (file_extension(std::__cxx11::string_const&)::re_abi_cxx11_ == '\0') { iVar2 = __cxa_guard_acquire(&file_extension(std::__cxx11::string_const&)::re_abi_cxx11_); if (iVar2 != 0) { /* try { // try from 0015fcff to 0015fd16 has its CatchHandler @ 0015fd98 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,"\\.([a-zA-Z0-9]+)$", 0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&file_extension(std::__cxx11::string_const&)::re_abi_cxx11_); } } /* try { // try from 0015fd44 to 0015fd8b has its CatchHandler @ 0015fdb4 */ bVar1 = std:: regex_search<std::char_traits<char>,std::allocator<char>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (local_10,local_30,file_extension(std::__cxx11::string_const&)::re_abi_cxx11_,0) ; if (bVar1) { std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::operator[](local_30,1); std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); } else { std::__cxx11::string::string((string *)this); } std::__cxx11:: match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>> ::~match_results(local_30); return this; }
13,894
nglog::LogDestination::AddLogSink(nglog::LogSink*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::AddLogSink(LogSink* destination) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. SinkLock l{sink_mutex_}; if (sinks_ == nullptr) sinks_ = std::make_unique<std::vector<LogSink*>>(); sinks_->push_back(destination); }
O2
cpp
nglog::LogDestination::AddLogSink(nglog::LogSink*): pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) leaq 0x207ed(%rip), %rdi # 0x2ebb8 callq 0x1aad2 movq 0x207d9(%rip), %rdi # 0x2ebb0 testq %rdi, %rdi jne 0xe409 movq %rsp, %rdi callq 0xf131 movq %rsp, %rbx movq (%rbx), %rsi andq $0x0, (%rbx) leaq 0x207bb(%rip), %rdi # 0x2ebb0 callq 0xf16e movq %rbx, %rdi callq 0xdc12 movq 0x207a7(%rip), %rdi # 0x2ebb0 leaq 0x8(%rsp), %rsi callq 0xf150 leaq 0x2079e(%rip), %rdi # 0x2ebb8 callq 0x77a0 addq $0x10, %rsp popq %rbx retq jmp 0xe427 movq %rax, %rbx leaq 0x20787(%rip), %rdi # 0x2ebb8 callq 0x77a0 movq %rbx, %rdi callq 0x7a00
_ZN5nglog14LogDestination10AddLogSinkEPNS_7LogSinkE: push rbx sub rsp, 10h mov [rsp+18h+var_10], rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void) mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rdi, rdi jnz short loc_E409 mov rdi, rsp call _ZSt11make_uniqueISt6vectorIPN5nglog7LogSinkESaIS3_EEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::vector<nglog::LogSink *>>() mov rbx, rsp mov rsi, [rbx] and qword ptr [rbx], 0 lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*) mov rdi, rbx; void * call _ZNSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr() mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ loc_E409: lea rsi, [rsp+18h+var_10] call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE9push_backERKS2_; std::vector<nglog::LogSink *>::push_back(nglog::LogSink * const&) lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock add rsp, 10h pop rbx retn jmp short $+2 loc_E427: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::AddLogSink(nglog::LogDestination *this, nglog::LogSink *a2) { long long v2; // rdi long long v3; // rsi long long v5; // [rsp+0h] [rbp-18h] BYREF nglog::LogDestination *v6; // [rsp+8h] [rbp-10h] BYREF v6 = this; std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); v2 = nglog::LogDestination::sinks_; if ( !nglog::LogDestination::sinks_ ) { std::make_unique<std::vector<nglog::LogSink *>>(&v5, a2); v3 = v5; v5 = 0LL; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset( &nglog::LogDestination::sinks_, v3); std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr(&v5); v2 = nglog::LogDestination::sinks_; } std::vector<nglog::LogSink *>::push_back(v2, &v6); return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); }
AddLogSink: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[0x12ebb8] CALL 0x0011aad2 MOV RDI,qword ptr [0x0012ebb0] TEST RDI,RDI JNZ 0x0010e409 LAB_0010e3dc: MOV RDI,RSP CALL 0x0010f131 MOV RBX,RSP MOV RSI,qword ptr [RBX] AND qword ptr [RBX],0x0 LEA RDI,[0x12ebb0] CALL 0x0010f16e MOV RDI,RBX CALL 0x0010dc12 MOV RDI,qword ptr [0x0012ebb0] LAB_0010e409: LEA RSI,[RSP + 0x8] CALL 0x0010f150 LAB_0010e413: LEA RDI,[0x12ebb8] CALL 0x001077a0 ADD RSP,0x10 POP RBX RET
/* nglog::LogDestination::AddLogSink(nglog::LogSink*) */ void nglog::LogDestination::AddLogSink(LogSink *param_1) { vector *pvVar1; vector *local_18; LogSink *local_10; local_10 = param_1; std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_); if (sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) { /* try { // try from 0010e3dc to 0010e3e3 has its CatchHandler @ 0010e425 */ std::make_unique<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>(); pvVar1 = local_18; local_18 = (vector *)0x0; std:: __uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&sinks_,pvVar1); std:: unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::~unique_ptr((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&local_18); } /* try { // try from 0010e409 to 0010e412 has its CatchHandler @ 0010e427 */ std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::push_back(sinks_,&local_10); pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_); return; }
13,895
minja::simple_function(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&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O0
cpp
minja::simple_function(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&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) leaq 0x108(%rsp), %rdi callq 0x1713c0 movq $0x0, 0x100(%rsp) movq 0x140(%rsp), %rdi callq 0x62d40 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax cmpq 0xf8(%rsp), %rax jae 0xf8141 movq 0x100(%rsp), %rsi movq %rsi, 0x20(%rsp) movq 0x140(%rsp), %rdi callq 0xf9d90 movq %rax, %rsi leaq 0x108(%rsp), %rdi callq 0x1713d0 movq %rax, 0x28(%rsp) jmp 0xf8105 movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x100(%rsp), %rax addq $0x1, %rax movq %rax, 0x100(%rsp) jmp 0xf80c2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf829d leaq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movq 0x140(%rsp), %rsi callq 0x8f9d0 jmp 0xf815a leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movq 0x148(%rsp), %rsi callq 0x5a200 jmp 0xf8173 leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x108(%rsp), %rsi callq 0x1714c0 jmp 0xf818c leaq 0xa8(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0x1714f0 jmp 0xf81a3 leaq 0xc8(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0xf82c0 jmp 0xf81b7 movq 0x30(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x13cb80 jmp 0xf81cb leaq 0xc8(%rsp), %rdi callq 0x13ccb0 leaq 0x40(%rsp), %rdi callq 0xf8370 leaq 0x108(%rsp), %rdi callq 0x1715a0 movq 0x38(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf8250 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf8246 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0x1715a0 movq 0x10(%rsp), %rdi callq 0x5b548 movq 0x18(%rsp), %rdi callq 0x62f80 jmp 0xf829d movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf8293 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0x13ccb0 leaq 0x40(%rsp), %rdi callq 0xf8370 leaq 0x108(%rsp), %rdi callq 0x1715a0 movq 0xf0(%rsp), %rdi callq 0x5aba0 nopw (%rax,%rax)
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: sub rsp, 158h mov [rsp+158h+var_128], rdi mov rax, rdi mov [rsp+158h+var_120], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_20], rcx lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2Ev; std::map<std::string,ulong>::map(void) mov [rsp+158h+var_58], 0 mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov [rsp+158h+var_60], rax loc_F80C2: mov rax, [rsp+158h+var_58] cmp rax, [rsp+158h+var_60] jnb short loc_F8141 mov rsi, [rsp+158h+var_58] mov [rsp+158h+var_138], rsi mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rsp+158h+var_130], rax jmp short $+2 loc_F8105: mov rax, [rsp+158h+var_130] mov rcx, [rsp+158h+var_138] mov [rax], rcx mov rax, [rsp+158h+var_58] add rax, 1 mov [rsp+158h+var_58], rax jmp short loc_F80C2 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_F829D loc_F8141: lea rdi, [rsp+158h+var_118] mov [rsp+158h+var_140], rdi mov rsi, [rsp+158h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp short $+2 loc_F815A: lea rdi, [rsp+158h+var_100] mov [rsp+158h+var_148], rdi mov rsi, [rsp+158h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_F8173: lea rdi, [rsp+158h+var_E0] mov [rsp+158h+var_150], rdi lea rsi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2ERKSC_; std::map<std::string,ulong>::map(std::map<std::string,ulong> const&) jmp short $+2 loc_F818C: lea rdi, [rsp+158h+var_B0] mov rsi, [rsp+158h+var_20] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) jmp short $+2 loc_F81A3: lea rdi, [rsp+158h+var_90] lea rsi, [rsp+158h+var_118] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISH_SaISH_EERKS_IFS1_S6_RS1_EEE3$_0vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0 &&) jmp short $+2 loc_F81B7: mov rdi, [rsp+158h+var_128] lea rsi, [rsp+158h+var_90] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) jmp short $+2 loc_F81CB: lea rdi, [rsp+158h+var_90] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() lea rdi, [rsp+158h+var_118] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rax, [rsp+158h+var_120] add rsp, 158h retn mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F8250 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F8246 mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() loc_F8246: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F8250: mov rdi, [rsp+arg_10] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_F829D mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F8293 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_C0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() loc_F8293: lea rdi, [rsp+arg_38] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() loc_F829D: lea rdi, [rsp+arg_100] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rdi, [rsp+arg_E8] call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d _QWORD v18[3]; // [rsp+40h] [rbp-118h] BYREF _BYTE v19[32]; // [rsp+58h] [rbp-100h] BYREF _BYTE v20[48]; // [rsp+78h] [rbp-E0h] BYREF char v21; // [rsp+A8h] [rbp-B0h] BYREF _BYTE v22[48]; // [rsp+C8h] [rbp-90h] BYREF unsigned long long v23; // [rsp+F8h] [rbp-60h] unsigned long long v24; // [rsp+100h] [rbp-58h] _BYTE v25[48]; // [rsp+108h] [rbp-50h] BYREF long long v26; // [rsp+138h] [rbp-20h] _QWORD *v27; // [rsp+140h] [rbp-18h] long long v28; // [rsp+148h] [rbp-10h] long long v29; // [rsp+150h] [rbp-8h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; std::map<std::string,unsigned long>::map(v25); v24 = 0LL; v23 = std::vector<std::string>::size(v27); while ( v24 < v23 ) { v4 = std::vector<std::string>::operator[](v27, v24); *(_QWORD *)std::map<std::string,unsigned long>::operator[](v25, v4) = v24++; } std::vector<std::string>::vector(v18, v27); std::string::basic_string(v19, v28); std::map<std::string,unsigned long>::map(v20, v25); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function( (unsigned int)&v21, v26, v5, v6, v7, v8); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>( (unsigned int)v22, (unsigned int)v18, v9, v10, v11, v12); minja::Value::callable(a1, (unsigned int)v22, v13, v14, v15, v16); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v22); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v18); std::map<std::string,unsigned long>::~map(v25); return a1; }
simple_function: SUB RSP,0x158 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI MOV qword ptr [RSP + 0x140],RDX MOV qword ptr [RSP + 0x138],RCX LEA RDI,[RSP + 0x108] CALL 0x002713c0 MOV qword ptr [RSP + 0x100],0x0 MOV RDI,qword ptr [RSP + 0x140] CALL 0x00162d40 MOV qword ptr [RSP + 0xf8],RAX LAB_001f80c2: MOV RAX,qword ptr [RSP + 0x100] CMP RAX,qword ptr [RSP + 0xf8] JNC 0x001f8141 MOV RSI,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x140] CALL 0x001f9d90 MOV RSI,RAX LAB_001f80f1: LEA RDI,[RSP + 0x108] CALL 0x002713d0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f8105 LAB_001f8105: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x100] ADD RAX,0x1 MOV qword ptr [RSP + 0x100],RAX JMP 0x001f80c2 LAB_001f8141: LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI MOV RSI,qword ptr [RSP + 0x140] CALL 0x0018f9d0 JMP 0x001f815a LAB_001f815a: LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV RSI,qword ptr [RSP + 0x148] LAB_001f816c: CALL 0x0015a200 JMP 0x001f8173 LAB_001f8173: LEA RDI,[RSP + 0x78] MOV qword ptr [RSP + 0x8],RDI LAB_001f817d: LEA RSI,[RSP + 0x108] CALL 0x002714c0 JMP 0x001f818c LAB_001f818c: LEA RDI,[RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x138] LAB_001f819c: CALL 0x002714f0 JMP 0x001f81a3 LAB_001f81a3: LEA RDI,[RSP + 0xc8] LEA RSI,[RSP + 0x40] CALL 0x001f82c0 JMP 0x001f81b7 LAB_001f81b7: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xc8] CALL 0x0023cb80 LAB_001f81c9: JMP 0x001f81cb LAB_001f81cb: LEA RDI,[RSP + 0xc8] CALL 0x0023ccb0 LEA RDI,[RSP + 0x40] CALL 0x001f8370 LEA RDI,[RSP + 0x108] CALL 0x002715a0 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x158 RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { ulong uVar1; string *psVar2; ulong *puVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_118 [24]; string local_100 [32]; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e0 [48]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_b0 [32]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> local_90 [48] ; ulong local_60; ulong local_58; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_50 [48]; function *local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; string *local_10; minja *local_8; local_20 = param_3; local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2; local_10 = param_1; local_8 = this; std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_50); local_58 = 0; local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18); for (; uVar1 = local_58, local_58 < local_60; local_58 = local_58 + 1) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_18,local_58); /* try { // try from 001f80f1 to 001f8157 has its CatchHandler @ 001f8128 */ puVar3 = (ulong *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_50,psVar2); *puVar3 = uVar1; } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (local_118,(vector *)local_18); /* try { // try from 001f816c to 001f8170 has its CatchHandler @ 001f81fc */ std::__cxx11::string::string(local_100,local_10); /* try { // try from 001f817d to 001f8189 has its CatchHandler @ 001f8212 */ std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_e0,(map *)local_50); /* try { // try from 001f819c to 001f81a0 has its CatchHandler @ 001f8228 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_b0,local_20); /* try { // try from 001f81a3 to 001f81b4 has its CatchHandler @ 001f825c */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::__0,void> (local_90,(__0 *)local_118); /* try { // try from 001f81b7 to 001f81c8 has its CatchHandler @ 001f8272 */ Value::callable((Value *)this,(function *)local_90); std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: ~function(local_90); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_118); std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~map(local_50); return this; }
13,896
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 0x2d7622(%rip), %rax # 0x32e4b0 movq (%rax), %r15 cmpl %edi, (%r15) je 0x56f95 movq %rsi, %r14 movl %edi, %ebx leaq 0x3582da(%rip), %rdi # 0x3af180 leaq -0x382(%rip), %rsi # 0x56b2b callq 0x35250 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x56f2a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x5635e movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x5636d movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x56388 movq %rax, 0x90(%rdi) leaq 0x3231(%rip), %rax # 0x5a126 movq %rax, 0x98(%rdi) leaq 0x2d75a5(%rip), %rax # 0x32e4a8 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x563a6 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x56fba movq %rax, %r15 jmp 0x56f2d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x56f95 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x568eb 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 0x875b6 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x594ef movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x56fb5 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x35270
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_56F95 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_56F2A 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_56F2D loc_56F2A: xor r15d, r15d loc_56F2D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_56F95 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_56F95: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_56FB5 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_56FB5: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(); // [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"); int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4, 35); } } 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,[0x42e4b0] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00156f95 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x4af180] LEA RSI,[0x156b2b] CALL 0x00135250 CMP EBX,0x7ff JA 0x00156f2a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x15635e] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x15636d] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x156388] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x15a126] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x42e4a8] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x1563a6] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x00156fba MOV R15,RAX JMP 0x00156f2d LAB_00156f2a: XOR R15D,R15D LAB_00156f2d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00156f95 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x001568eb 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 0x001875b6 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x001594ef LAB_00156f95: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00156fb5 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00156fb5: CALL 0x00135270
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(); }
13,897
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O2
cpp
common_init(): pushq %rax leaq 0x44f4(%rip), %rdi # 0x63994 xorl %esi, %esi callq 0x250c0 leaq 0xadffa(%rip), %rax # 0x10d4a8 cmpl $0x0, (%rax) js 0x5f4fe callq 0xa1f9e leaq 0xad8e9(%rip), %rcx # 0x10cda8 movl (%rcx), %ecx leaq 0xad8e8(%rip), %rdx # 0x10cdb0 movq (%rdx), %r8 leaq 0xad8e6(%rip), %rdx # 0x10cdb8 movq (%rdx), %r9 leaq 0xad8e4(%rip), %r10 # 0x10cdc0 leaq 0x5c76c(%rip), %r11 # 0xbbc4f leaq 0x5f7e7(%rip), %rdx # 0xbecd1 pushq $0x2 popq %rsi movq %rax, %rdi xorl %eax, %eax pushq %r11 pushq (%r10) callq 0xa2036 popq %rax popq %rcx popq %rax retq
_Z11common_initv: push rax lea rdi, _ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv; common_init(void)::$_0::__invoke(ggml_log_level,char const*,void *) xor esi, esi call _llama_log_set lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_5F4FE call _Z15common_log_mainv; common_log_main(void) lea rcx, LLAMA_BUILD_NUMBER mov ecx, [rcx] lea rdx, LLAMA_COMMIT mov r8, [rdx] lea rdx, LLAMA_COMPILER mov r9, [rdx] lea r10, LLAMA_BUILD_TARGET lea r11, aErrorWhileHand_0+34h; "" lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n" push 2 pop rsi mov rdi, rax xor eax, eax push r11 push qword ptr [r10] call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) pop rax pop rcx loc_5F4FE: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> common_init(void) { int v0; // eax llama_log_set(common_init(void)::$_0::__invoke, 0LL); if ( common_log_verbosity_thold >= 0 ) { v0 = common_log_main(); common_log_add( v0, 2, (unsigned int)"build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT[0], LLAMA_COMPILER[0]); } }
common_init: PUSH RAX LEA RDI,[0x163994] XOR ESI,ESI CALL 0x001250c0 LEA RAX,[0x20d4a8] CMP dword ptr [RAX],0x0 JS 0x0015f4fe CALL 0x001a1f9e LEA RCX,[0x20cda8] MOV ECX,dword ptr [RCX] LEA RDX,[0x20cdb0] MOV R8,qword ptr [RDX] LEA RDX,[0x20cdb8] MOV R9,qword ptr [RDX] LEA R10,[0x20cdc0] LEA R11,[0x1bbc4f] LEA RDX,[0x1becd1] PUSH 0x2 POP RSI MOV RDI,RAX XOR EAX,EAX PUSH R11 PUSH qword ptr [R10] CALL 0x001a2036 POP RAX POP RCX LAB_0015f4fe: POP RAX RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_init() */ int8 common_init(void) { int8 in_RAX; int8 uVar1; llama_log_set(common_init()::$_0::__invoke,0); if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT, LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return in_RAX; }
13,898
cli_report_progress
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static int cli_report_progress(MYSQL *mysql, uchar *packet, uint length) { uint stage, max_stage, proc_length; double progress; uchar *start= packet; if (length < 5) return 1; /* Wrong packet */ if (!(mysql->options.extension && mysql->options.extension->report_progress)) return 0; /* No callback, ignore packet */ packet++; /* Ignore number of strings */ stage= (uint) *packet++; max_stage= (uint) *packet++; progress= uint3korr(packet)/1000.0; packet+= 3; proc_length= net_field_length(&packet); if (packet + proc_length > start + length) return 1; /* Wrong packet */ (*mysql->options.extension->report_progress)(mysql, stage, max_stage, progress, (char*) packet, proc_length); return 0; }
O0
c
cli_report_progress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) cmpl $0x5, -0x1c(%rbp) jae 0x47ddd movl $0x1, -0x4(%rbp) jmp 0x47ed0 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x47e00 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x80(%rax) jne 0x47e0c movl $0x0, -0x4(%rbp) jmp 0x47ed0 movq -0x18(%rbp), %rax incq %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, %rcx incq %rcx movq %rcx, -0x18(%rbp) movzbl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rcx movzwl (%rcx), %eax movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax cvtsi2sd %eax, %xmm0 movsd 0x9e78d(%rip), %xmm1 # 0xe65e8 divsd %xmm1, %xmm0 movsd %xmm0, -0x30(%rbp) movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x18(%rbp) leaq -0x18(%rbp), %rdi callq 0x47ee0 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq -0x38(%rbp), %rcx movl -0x1c(%rbp), %edx addq %rdx, %rcx cmpq %rcx, %rax jbe 0x47e9e movl $0x1, -0x4(%rbp) jmp 0x47ed0 movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi movl -0x20(%rbp), %esi movl -0x24(%rbp), %edx movsd -0x30(%rbp), %xmm0 movq -0x18(%rbp), %rcx movl -0x28(%rbp), %r8d callq *%rax movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopl (%rax)
cli_report_progress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov [rbp+var_38], rax cmp [rbp+var_1C], 5 jnb short loc_47DDD mov [rbp+var_4], 1 jmp loc_47ED0 loc_47DDD: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_47E00 mov rax, [rbp+var_10] mov rax, [rax+480h] cmp qword ptr [rax+80h], 0 jnz short loc_47E0C loc_47E00: mov [rbp+var_4], 0 jmp loc_47ED0 loc_47E0C: mov rax, [rbp+var_18] inc rax mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_20], eax mov rax, [rbp+var_18] mov rcx, rax inc rcx mov [rbp+var_18], rcx movzx eax, byte ptr [rax] mov [rbp+var_24], eax mov rcx, [rbp+var_18] movzx eax, word ptr [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx cvtsi2sd xmm0, eax movsd xmm1, cs:qword_E65E8 divsd xmm0, xmm1 movsd [rbp+var_30], xmm0 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_18], rax lea rdi, [rbp+var_18] call net_field_length mov [rbp+var_28], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_28] add rax, rcx mov rcx, [rbp+var_38] mov edx, [rbp+var_1C] add rcx, rdx cmp rax, rcx jbe short loc_47E9E mov [rbp+var_4], 1 jmp short loc_47ED0 loc_47E9E: mov rax, [rbp+var_10] mov rax, [rax+480h] mov rax, [rax+80h] mov rdi, [rbp+var_10] mov esi, [rbp+var_20] mov edx, [rbp+var_24] movsd xmm0, [rbp+var_30] mov rcx, [rbp+var_18] mov r8d, [rbp+var_28] call rax mov [rbp+var_4], 0 loc_47ED0: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long cli_report_progress(long long a1, unsigned __int16 *a2, unsigned int a3) { unsigned __int16 *v3; // rax unsigned __int16 *v4; // rax double v6; // [rsp+10h] [rbp-30h] unsigned int v7; // [rsp+18h] [rbp-28h] unsigned int v8; // [rsp+1Ch] [rbp-24h] unsigned int v9; // [rsp+20h] [rbp-20h] unsigned __int16 *v11; // [rsp+28h] [rbp-18h] BYREF long long v12; // [rsp+30h] [rbp-10h] v12 = a1; v11 = a2; if ( a3 >= 5 ) { if ( *(_QWORD *)(v12 + 1152) && *(_QWORD *)(*(_QWORD *)(v12 + 1152) + 128LL) ) { v11 = (unsigned __int16 *)((char *)v11 + 1); v3 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v9 = *(unsigned __int8 *)v3; v4 = v11; v11 = (unsigned __int16 *)((char *)v11 + 1); v8 = *(unsigned __int8 *)v4; v6 = (double)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) / 1000.0; v11 = (unsigned __int16 *)((char *)v11 + 3); v7 = net_field_length(&v11); if ( (char *)v11 + v7 <= (char *)a2 + a3 ) { (*(void ( **)(long long, _QWORD, _QWORD, unsigned __int16 *, _QWORD, double))(*(_QWORD *)(v12 + 1152) + 128LL))( v12, v9, v8, v11, v7, v6); return 0; } else { return 1; } } else { return 0; } } else { return 1; } }
cli_report_progress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX CMP dword ptr [RBP + -0x1c],0x5 JNC 0x00147ddd MOV dword ptr [RBP + -0x4],0x1 JMP 0x00147ed0 LAB_00147ddd: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x00147e00 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x80],0x0 JNZ 0x00147e0c LAB_00147e00: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00147ed0 LAB_00147e0c: MOV RAX,qword ptr [RBP + -0x18] INC RAX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX INC RCX MOV qword ptr [RBP + -0x18],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX CVTSI2SD XMM0,EAX MOVSD XMM1,qword ptr [0x001e65e8] DIVSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x30],XMM0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x18] CALL 0x00147ee0 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x1c] ADD RCX,RDX CMP RAX,RCX JBE 0x00147e9e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00147ed0 LAB_00147e9e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOVSD XMM0,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOV R8D,dword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x4],0x0 LAB_00147ed0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 cli_report_progress(long param_1,long param_2,uint param_3) { int1 uVar1; int1 uVar2; uint uVar3; double dVar4; long local_20; long local_18; int4 local_c; if (param_3 < 5) { local_c = 1; } else if ((*(long *)(param_1 + 0x480) == 0) || (*(long *)(*(long *)(param_1 + 0x480) + 0x80) == 0)) { local_c = 0; } else { uVar1 = *(int1 *)(param_2 + 1); uVar2 = *(int1 *)(param_2 + 2); dVar4 = (double)*(uint3 *)(param_2 + 3) / DAT_001e65e8; local_20 = param_2 + 6; local_18 = param_1; uVar3 = net_field_length(&local_20); if (param_2 + (ulong)param_3 < local_20 + (ulong)uVar3) { local_c = 1; } else { (**(code **)(*(long *)(local_18 + 0x480) + 0x80))(dVar4,local_18,uVar1,uVar2,local_20,uVar3); local_c = 0; } } return local_c; }
13,899
string_buffer_putc8
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_putc8(StringBuffer *s, uint32_t c) { if (unlikely(s->len >= s->size)) { if (string_buffer_realloc(s, s->len + 1, c)) return -1; } if (s->is_wide_char) { s->str->u.str16[s->len++] = c; } else { s->str->u.str8[s->len++] = c; } return 0; }
O2
c
string_buffer_putc8: pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %esi cmpl 0x14(%rdi), %esi jge 0x41461 movslq 0x10(%r14), %rax leal 0x1(%rax), %edx cmpl $0x0, 0x18(%r14) movq 0x8(%r14), %rcx movl %edx, 0x10(%r14) je 0x41453 movw %bx, 0x18(%rcx,%rax,2) jmp 0x41457 movb %bl, 0x18(%rcx,%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq incl %esi movq %r14, %rdi movl %ebx, %edx callq 0x39e9d testl %eax, %eax je 0x41436 pushq $-0x1 popq %rax jmp 0x41459
string_buffer_putc8: push r14 push rbx push rax mov ebx, esi mov r14, rdi mov esi, [rdi+10h] cmp esi, [rdi+14h] jge short loc_41461 loc_41436: movsxd rax, dword ptr [r14+10h] lea edx, [rax+1] cmp dword ptr [r14+18h], 0 mov rcx, [r14+8] mov [r14+10h], edx jz short loc_41453 mov [rcx+rax*2+18h], bx jmp short loc_41457 loc_41453: mov [rcx+rax+18h], bl loc_41457: xor eax, eax loc_41459: add rsp, 8 pop rbx pop r14 retn loc_41461: inc esi mov rdi, r14 mov edx, ebx call string_buffer_realloc test eax, eax jz short loc_41436 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_41459
long long string_buffer_putc8( long long a1, unsigned int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14) { int v15; // esi long long v16; // rax bool v17; // zf long long v18; // rcx v15 = *(_DWORD *)(a1 + 16); if ( v15 >= *(_DWORD *)(a1 + 20) && (unsigned int)string_buffer_realloc(a1, v15 + 1, a2, a12, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10) ) { return -1LL; } v16 = *(int *)(a1 + 16); v17 = *(_DWORD *)(a1 + 24) == 0; v18 = *(_QWORD *)(a1 + 8); *(_DWORD *)(a1 + 16) = v16 + 1; if ( v17 ) *(_BYTE *)(v18 + v16 + 24) = a2; else *(_WORD *)(v18 + 2 * v16 + 24) = a2; return 0LL; }
string_buffer_putc8: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI + 0x10] CMP ESI,dword ptr [RDI + 0x14] JGE 0x00141461 LAB_00141436: MOVSXD RAX,dword ptr [R14 + 0x10] LEA EDX,[RAX + 0x1] CMP dword ptr [R14 + 0x18],0x0 MOV RCX,qword ptr [R14 + 0x8] MOV dword ptr [R14 + 0x10],EDX JZ 0x00141453 MOV word ptr [RCX + RAX*0x2 + 0x18],BX JMP 0x00141457 LAB_00141453: MOV byte ptr [RCX + RAX*0x1 + 0x18],BL LAB_00141457: XOR EAX,EAX LAB_00141459: ADD RSP,0x8 POP RBX POP R14 RET LAB_00141461: INC ESI MOV RDI,R14 MOV EDX,EBX CALL 0x00139e9d TEST EAX,EAX JZ 0x00141436 PUSH -0x1 POP RAX JMP 0x00141459
int8 string_buffer_putc8(long param_1,int4 param_2) { int iVar1; if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) && (iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) { return 0xffffffffffffffff; } iVar1 = *(int *)(param_1 + 0x10); *(int *)(param_1 + 0x10) = iVar1 + 1; if (*(int *)(param_1 + 0x18) == 0) { *(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2; } else { *(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2; } return 0; }