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
2,300
testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void OnTestIterationEnd(const UnitTest& unit_test, int /* iteration */) override { SendLn("event=TestIterationEnd&passed=" + FormatBool(unit_test.Passed()) + "&elapsed_time=" + StreamableToString(unit_test.elapsed_time()) + "ms"); }
O0
c
testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movl %edx, 0xf4(%rsp) movq 0x100(%rsp), %rax movq %rax, 0x8(%rsp) movq 0xf8(%rsp), %rdi callq 0xc9f10 movq 0x8(%rsp), %rsi movzbl %al, %edx leaq 0x50(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xf8db0 movq 0x10(%rsp), %rdx leaq 0x1c7f3(%rip), %rsi # 0x114c6e leaq 0x70(%rsp), %rdi callq 0x83ce0 jmp 0xf8487 leaq 0x1c7b4(%rip), %rdx # 0x114c42 leaq 0x90(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x39e60 jmp 0xf84a2 movq 0xf8(%rsp), %rdi callq 0xc9ed0 movq %rax, (%rsp) jmp 0xf84b5 movq (%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x20(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0xe9000 jmp 0xf84cf leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0x8bed0 jmp 0xf84eb leaq 0x1c75f(%rip), %rdx # 0x114c51 leaq 0xd0(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x39e60 jmp 0xf8509 movq 0x8(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0xf8bb0 jmp 0xf851d leaq 0xd0(%rsp), %rdi callq 0x1aac0 leaq 0xb0(%rsp), %rdi callq 0x1aac0 leaq 0x20(%rsp), %rdi callq 0x1aac0 leaq 0x90(%rsp), %rdi callq 0x1aac0 leaq 0x70(%rsp), %rdi callq 0x1aac0 leaq 0x50(%rsp), %rdi callq 0x1aac0 addq $0x108, %rsp # imm = 0x108 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xf8606 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xf85fc movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xf85ef movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xf85e5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xf85d8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0xd0(%rsp), %rdi callq 0x1aac0 leaq 0xb0(%rsp), %rdi callq 0x1aac0 leaq 0x20(%rsp), %rdi callq 0x1aac0 leaq 0x90(%rsp), %rdi callq 0x1aac0 leaq 0x70(%rsp), %rdi callq 0x1aac0 leaq 0x50(%rsp), %rdi callq 0x1aac0 movq 0x48(%rsp), %rdi callq 0x14c80 nopw (%rax,%rax)
_ZN7testing8internal17StreamingListener18OnTestIterationEndERKNS_8UnitTestEi: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov [rsp+108h+var_14], edx mov rax, [rsp+108h+var_8] mov [rsp+108h+var_100], rax mov rdi, [rsp+108h+var_10]; this call _ZNK7testing8UnitTest6PassedEv; testing::UnitTest::Passed(void) mov rsi, [rsp+108h+var_100] movzx edx, al lea rdi, [rsp+108h+var_B8] mov [rsp+108h+var_F8], rdi call _ZN7testing8internal17StreamingListener10FormatBoolB5cxx11Eb; testing::internal::StreamingListener::FormatBool(bool) mov rdx, [rsp+108h+var_F8] lea rsi, aEventTestitera_0; "event=TestIterationEnd&passed=" lea rdi, [rsp+108h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_F8487: lea rdx, aElapsedTime; "&elapsed_time=" lea rdi, [rsp+108h+var_78] lea rsi, [rsp+108h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_F84A2: mov rdi, [rsp+108h+var_10]; this call _ZNK7testing8UnitTest12elapsed_timeEv; testing::UnitTest::elapsed_time(void) mov [rsp+108h+var_108], rax jmp short $+2 loc_F84B5: mov rax, [rsp+108h+var_108] mov [rsp+108h+var_F0], rax lea rdi, [rsp+108h+var_E8] lea rsi, [rsp+108h+var_F0] call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&) jmp short $+2 loc_F84CF: lea rdi, [rsp+108h+var_58] lea rsi, [rsp+108h+var_78] lea rdx, [rsp+108h+var_E8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_F84EB: lea rdx, aMs; "ms" lea rdi, [rsp+108h+var_38] lea rsi, [rsp+108h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_F8509: mov rdi, [rsp+108h+var_100] lea rsi, [rsp+108h+var_38] call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&) jmp short $+2 loc_F851D: lea rdi, [rsp+108h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+108h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+108h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+108h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+108h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+108h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 108h retn mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp loc_F8606 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_F85FC mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_F85EF mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_F85E5 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_F85D8 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F85D8: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F85E5: lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F85EF: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F85FC: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F8606: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_40] call __Unwind_Resume
void testing::internal::StreamingListener::OnTestIterationEnd( testing::internal::StreamingListener *this, const testing::UnitTest *a2, int a3) { unsigned __int8 v3; // al int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // [rsp+18h] [rbp-F0h] BYREF _BYTE v8[48]; // [rsp+20h] [rbp-E8h] BYREF _BYTE v9[32]; // [rsp+50h] [rbp-B8h] BYREF _BYTE v10[32]; // [rsp+70h] [rbp-98h] BYREF _BYTE v11[32]; // [rsp+90h] [rbp-78h] BYREF _BYTE v12[32]; // [rsp+B0h] [rbp-58h] BYREF _BYTE v13[36]; // [rsp+D0h] [rbp-38h] BYREF int v14; // [rsp+F4h] [rbp-14h] testing::UnitTest *v15; // [rsp+F8h] [rbp-10h] testing::internal::StreamingListener *v16; // [rsp+100h] [rbp-8h] v16 = this; v15 = a2; v14 = a3; v3 = testing::UnitTest::Passed(a2); testing::internal::StreamingListener::FormatBool[abi:cxx11]((unsigned int)v9, (_DWORD)this, v3, v4, v5, v6); std::operator+<char>((long long)v10, (long long)"event=TestIterationEnd&passed=", (long long)v9); std::operator+<char>((long long)v11, (long long)v10, (long long)"&elapsed_time="); v7 = testing::UnitTest::elapsed_time(v15); testing::internal::StreamableToString<long>((long long)v8, (long long)&v7); std::operator+<char>((long long)v12, (long long)v11, (long long)v8); std::operator+<char>((long long)v13, (long long)v12, (long long)"ms"); testing::internal::StreamingListener::SendLn(this, v13); std::string::~string(v13); std::string::~string(v12); std::string::~string(v8); std::string::~string(v11); std::string::~string(v10); std::string::~string(v9); }
OnTestIterationEnd: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV dword ptr [RSP + 0xf4],EDX MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0xf8] CALL 0x001c9f10 MOV RSI,qword ptr [RSP + 0x8] MOVZX EDX,AL LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x10],RDI CALL 0x001f8db0 MOV RDX,qword ptr [RSP + 0x10] LAB_001f8474: LEA RSI,[0x214c6e] LEA RDI,[RSP + 0x70] CALL 0x00183ce0 JMP 0x001f8487 LAB_001f8487: LEA RDX,[0x214c42] LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x70] CALL 0x00139e60 JMP 0x001f84a2 LAB_001f84a2: MOV RDI,qword ptr [RSP + 0xf8] LAB_001f84aa: CALL 0x001c9ed0 MOV qword ptr [RSP],RAX JMP 0x001f84b5 LAB_001f84b5: MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x18] CALL 0x001e9000 JMP 0x001f84cf LAB_001f84cf: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x20] CALL 0x0018bed0 JMP 0x001f84eb LAB_001f84eb: LEA RDX,[0x214c51] LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xb0] CALL 0x00139e60 JMP 0x001f8509 LAB_001f8509: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xd0] CALL 0x001f8bb0 LAB_001f851b: JMP 0x001f851d LAB_001f851d: LEA RDI,[RSP + 0xd0] CALL 0x0011aac0 LEA RDI,[RSP + 0xb0] CALL 0x0011aac0 LEA RDI,[RSP + 0x20] CALL 0x0011aac0 LEA RDI,[RSP + 0x90] CALL 0x0011aac0 LEA RDI,[RSP + 0x70] CALL 0x0011aac0 LEA RDI,[RSP + 0x50] CALL 0x0011aac0 ADD RSP,0x108 RET
/* testing::internal::StreamingListener::OnTestIterationEnd(testing::UnitTest const&, int) */ void __thiscall testing::internal::StreamingListener::OnTestIterationEnd (StreamingListener *this,UnitTest *param_1,int param_2) { long local_f0; internal local_e8 [48]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [36]; int local_14; UnitTest *local_10; StreamingListener *local_8; local_14 = param_2; local_10 = param_1; local_8 = this; UnitTest::Passed(param_1); FormatBool_abi_cxx11_(SUB81(local_b8,0)); /* try { // try from 001f8474 to 001f8484 has its CatchHandler @ 001f856a */ std::operator+((char *)local_98,(string *)"event=TestIterationEnd&passed="); /* try { // try from 001f8487 to 001f849f has its CatchHandler @ 001f857d */ std::operator+(local_78,(char *)local_98); /* try { // try from 001f84aa to 001f84cc has its CatchHandler @ 001f858d */ local_f0 = UnitTest::elapsed_time(local_10); StreamableToString<long>(local_e8,&local_f0); /* try { // try from 001f84cf to 001f84e8 has its CatchHandler @ 001f859d */ std::operator+(local_58,local_78); /* try { // try from 001f84eb to 001f8506 has its CatchHandler @ 001f85ad */ std::operator+(local_38,(char *)local_58); /* try { // try from 001f8509 to 001f851a has its CatchHandler @ 001f85bd */ SendLn(this,local_38); std::__cxx11::string::~string(local_38); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string((string *)local_e8); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(local_b8); return; }
2,301
coro::net::tcp::server::server(coro::net::tcp::server&&)
AlayaLite/build_O3/_deps/libcoro-src/src/net/tcp/server.cpp
server::server(server&& other) : m_io_scheduler(std::move(other.m_io_scheduler)), m_options(std::move(other.m_options)), m_accept_socket(std::move(other.m_accept_socket)) { }
O3
cpp
coro::net::tcp::server::server(coro::net::tcp::server&&): xorl %eax, %eax movq %rax, 0x8(%rdi) movups (%rsi), %xmm0 movq %rax, 0x8(%rsi) movups %xmm0, (%rdi) movq %rax, (%rsi) movups 0x10(%rsi), %xmm0 movups 0x1c(%rsi), %xmm1 movups %xmm1, 0x1c(%rdi) movups %xmm0, 0x10(%rdi) movl 0x2c(%rsi), %eax movl $0xffffffff, 0x2c(%rsi) # imm = 0xFFFFFFFF movl %eax, 0x2c(%rdi) retq nop
_ZN4coro3net3tcp6serverC2EOS2_: xor eax, eax mov [rdi+8], rax movups xmm0, xmmword ptr [rsi] mov [rsi+8], rax movups xmmword ptr [rdi], xmm0 mov [rsi], rax movups xmm0, xmmword ptr [rsi+10h] movups xmm1, xmmword ptr [rsi+1Ch] movups xmmword ptr [rdi+1Ch], xmm1 movups xmmword ptr [rdi+10h], xmm0 mov eax, [rsi+2Ch] mov dword ptr [rsi+2Ch], 0FFFFFFFFh mov [rdi+2Ch], eax retn
long long coro::net::tcp::server::server(long long a1, __int128 *a2) { __int128 v2; // xmm0 __int128 v3; // xmm0 long long result; // rax *(_QWORD *)(a1 + 8) = 0LL; v2 = *a2; *((_QWORD *)a2 + 1) = 0LL; *(_OWORD *)a1 = v2; *(_QWORD *)a2 = 0LL; v3 = a2[1]; *(_OWORD *)(a1 + 28) = *(__int128 *)((char *)a2 + 28); *(_OWORD *)(a1 + 16) = v3; result = *((unsigned int *)a2 + 11); *((_DWORD *)a2 + 11) = -1; *(_DWORD *)(a1 + 44) = result; return result; }
server: XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX MOVUPS XMM0,xmmword ptr [RSI] MOV qword ptr [RSI + 0x8],RAX MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSI],RAX MOVUPS XMM0,xmmword ptr [RSI + 0x10] MOVUPS XMM1,xmmword ptr [RSI + 0x1c] MOVUPS xmmword ptr [RDI + 0x1c],XMM1 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV EAX,dword ptr [RSI + 0x2c] MOV dword ptr [RSI + 0x2c],0xffffffff MOV dword ptr [RDI + 0x2c],EAX RET
/* coro::net::tcp::server::server(coro::net::tcp::server&&) */ void __thiscall coro::net::tcp::server::server(server *this,server *param_1) { int4 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; *(int8 *)(this + 8) = 0; uVar2 = *(int8 *)(param_1 + 8); *(int8 *)(param_1 + 8) = 0; *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar2; *(int8 *)param_1 = 0; uVar2 = *(int8 *)(param_1 + 0x10); uVar3 = *(int8 *)(param_1 + 0x18); uVar4 = *(int8 *)(param_1 + 0x24); *(int8 *)(this + 0x1c) = *(int8 *)(param_1 + 0x1c); *(int8 *)(this + 0x24) = uVar4; *(int8 *)(this + 0x10) = uVar2; *(int8 *)(this + 0x18) = uVar3; uVar1 = *(int4 *)(param_1 + 0x2c); *(int4 *)(param_1 + 0x2c) = 0xffffffff; *(int4 *)(this + 0x2c) = uVar1; return; }
2,302
aria_read_index
eloqsql/storage/maria/ma_backup.c
int aria_read_index(File kfile, ARIA_TABLE_CAPABILITIES *cap, ulonglong block, uchar *buffer) { MARIA_SHARE share; int retry= 0; DBUG_ENTER("aria_read_index"); share.keypage_header= cap->keypage_header; share.block_size= cap->block_size; do { int error; size_t length; if ((length= my_pread(kfile, buffer, cap->block_size, block * cap->block_size, MYF(0))) != cap->block_size) { if (length == 0) DBUG_RETURN(HA_ERR_END_OF_FILE); if (length == (size_t) -1) DBUG_RETURN(my_errno ? my_errno : -1); /* Assume we got a half read; Do a re-read */ } /* If not transactional or key file header, there are no checksums */ if (!cap->online_backup_safe || block < cap->header_size/ cap->block_size) DBUG_RETURN(length == cap->block_size ? 0 : HA_ERR_CRASHED); if (length == cap->block_size) { length= _ma_get_page_used(&share, buffer); if (length > cap->block_size - CRC_SIZE) DBUG_RETURN(HA_ERR_CRASHED); error= maria_page_crc_check(buffer, block, &share, MARIA_NO_CRC_NORMAL_PAGE, (int) length); if (error != HA_ERR_WRONG_CRC) DBUG_RETURN(error); } my_sleep(100000); /* Sleep 0.1 seconds */ } while (retry < MAX_RETRY); DBUG_RETURN(HA_ERR_WRONG_CRC); }
O3
c
aria_read_index: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc48, %rsp # imm = 0xC48 movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r15 movl %edi, %r12d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x14(%rsi), %r13d movl %r13d, -0x524(%rbp) movl 0x10(%rsi), %eax movl %eax, -0x4ac(%rbp) movl %eax, %edx movq %rdx, %rcx imulq %rbx, %rcx movl %r12d, %edi movq %r14, %rsi xorl %r8d, %r8d callq 0xa07d0 movq %rax, %rcx movl 0x10(%r15), %esi cmpq %rsi, %rax je 0x71349 testq %rcx, %rcx je 0x713cb cmpq $-0x1, %rcx je 0x713b8 cmpb $0x0, 0x1f(%r15) je 0x71372 movq (%r15), %rax xorl %edx, %edx divq %rsi cmpq %rbx, %rax ja 0x71372 cmpq %rsi, %rcx je 0x71381 movl $0x186a0, %edi # imm = 0x186A0 callq 0xa0de4 movl 0x10(%r15), %eax jmp 0x71317 xorl %edx, %edx cmpq %rsi, %rcx movl $0x7e, %eax cmovel %edx, %eax jmp 0x713d7 movzwl -0x2(%r14,%r13), %eax rolw $0x8, %ax movzwl %ax, %r8d addl $-0x4, %esi movl $0x7e, %eax cmpl %esi, %r8d ja 0x713d7 leaq -0xc68(%rbp), %rdx movq %r14, %rdi movq %rbx, %rsi movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x3e0f0 movsbl %al, %eax jmp 0x713d7 callq 0xa1c92 cmpl $0x0, (%rax) je 0x713d2 callq 0xa1c92 movl (%rax), %eax jmp 0x713d7 movl $0x89, %eax jmp 0x713d7 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x713f8 addq $0xc48, %rsp # imm = 0xC48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29260
aria_read_index: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C48h mov r14, rcx mov rbx, rdx mov r15, rsi mov r12d, edi mov rax, fs:28h mov [rbp+var_30], rax mov r13d, [rsi+14h] mov [rbp+var_524], r13d mov eax, [rsi+10h] mov [rbp+var_4AC], eax loc_71317: mov edx, eax mov rcx, rdx imul rcx, rbx mov edi, r12d mov rsi, r14 xor r8d, r8d call my_pread mov rcx, rax mov esi, [r15+10h] cmp rax, rsi jz short loc_71349 test rcx, rcx jz loc_713CB cmp rcx, 0FFFFFFFFFFFFFFFFh jz short loc_713B8 loc_71349: cmp byte ptr [r15+1Fh], 0 jz short loc_71372 mov rax, [r15] xor edx, edx div rsi cmp rax, rbx ja short loc_71372 cmp rcx, rsi jz short loc_71381 mov edi, 186A0h call my_sleep mov eax, [r15+10h] jmp short loc_71317 loc_71372: xor edx, edx cmp rcx, rsi mov eax, 7Eh ; '~' cmovz eax, edx jmp short loc_713D7 loc_71381: movzx eax, word ptr [r14+r13-2] rol ax, 8 movzx r8d, ax add esi, 0FFFFFFFCh mov eax, 7Eh ; '~' cmp r8d, esi ja short loc_713D7 lea rdx, [rbp+var_C68] mov rdi, r14 mov rsi, rbx mov ecx, 0FFFFFFFFh call maria_page_crc_check movsx eax, al jmp short loc_713D7 loc_713B8: call _my_thread_var cmp dword ptr [rax], 0 jz short loc_713D2 call _my_thread_var mov eax, [rax] jmp short loc_713D7 loc_713CB: mov eax, 89h jmp short loc_713D7 loc_713D2: mov eax, 0FFFFFFFFh loc_713D7: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_713F8 add rsp, 0C48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_713F8: call ___stack_chk_fail
long long aria_read_index(unsigned int a1, long long a2, unsigned long long a3, long long a4) { long long v7; // r13 unsigned int v8; // eax long long v9; // rax long long v10; // rcx unsigned long long v11; // rsi long long result; // rax unsigned int v13; // r8d _BYTE v14[1860]; // [rsp+8h] [rbp-C68h] BYREF int v15; // [rsp+74Ch] [rbp-524h] unsigned int v16; // [rsp+7C4h] [rbp-4ACh] unsigned long long v17; // [rsp+C40h] [rbp-30h] v17 = __readfsqword(0x28u); v7 = *(unsigned int *)(a2 + 20); v15 = *(_DWORD *)(a2 + 20); v8 = *(_DWORD *)(a2 + 16); v16 = v8; while ( 1 ) { v9 = my_pread(a1, a4, v8, a3 * v8, 0LL); v10 = v9; v11 = *(unsigned int *)(a2 + 16); if ( v9 != v11 ) { if ( !v9 ) return 137LL; if ( v9 == -1 ) { if ( *(_DWORD *)my_thread_var(a1) ) return *(unsigned int *)my_thread_var(a1); else return 0xFFFFFFFFLL; } } if ( !*(_BYTE *)(a2 + 31) || *(_QWORD *)a2 / v11 > a3 ) break; if ( v9 == v11 ) { v13 = (unsigned __int16)__ROL2__(*(_WORD *)(a4 + v7 - 2), 8); result = 126LL; if ( v13 <= (int)v11 - 4 ) return (unsigned int)maria_page_crc_check(a4, a3, (long long)v14, -1, v13); return result; } my_sleep(100000LL, v11, *(_QWORD *)a2 % v11); v8 = *(_DWORD *)(a2 + 16); } result = 126LL; if ( v10 == v11 ) return 0LL; return result; }
aria_read_index: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc48 MOV R14,RCX MOV RBX,RDX MOV R15,RSI MOV R12D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,dword ptr [RSI + 0x14] MOV dword ptr [RBP + -0x524],R13D MOV EAX,dword ptr [RSI + 0x10] MOV dword ptr [RBP + -0x4ac],EAX LAB_00171317: MOV EDX,EAX MOV RCX,RDX IMUL RCX,RBX MOV EDI,R12D MOV RSI,R14 XOR R8D,R8D CALL 0x001a07d0 MOV RCX,RAX MOV ESI,dword ptr [R15 + 0x10] CMP RAX,RSI JZ 0x00171349 TEST RCX,RCX JZ 0x001713cb CMP RCX,-0x1 JZ 0x001713b8 LAB_00171349: CMP byte ptr [R15 + 0x1f],0x0 JZ 0x00171372 MOV RAX,qword ptr [R15] XOR EDX,EDX DIV RSI CMP RAX,RBX JA 0x00171372 CMP RCX,RSI JZ 0x00171381 MOV EDI,0x186a0 CALL 0x001a0de4 MOV EAX,dword ptr [R15 + 0x10] JMP 0x00171317 LAB_00171372: XOR EDX,EDX CMP RCX,RSI MOV EAX,0x7e CMOVZ EAX,EDX JMP 0x001713d7 LAB_00171381: MOVZX EAX,word ptr [R14 + R13*0x1 + -0x2] ROL AX,0x8 MOVZX R8D,AX ADD ESI,-0x4 MOV EAX,0x7e CMP R8D,ESI JA 0x001713d7 LEA RDX,[RBP + -0xc68] MOV RDI,R14 MOV RSI,RBX MOV ECX,0xffffffff CALL 0x0013e0f0 MOVSX EAX,AL JMP 0x001713d7 LAB_001713b8: CALL 0x001a1c92 CMP dword ptr [RAX],0x0 JZ 0x001713d2 CALL 0x001a1c92 MOV EAX,dword ptr [RAX] JMP 0x001713d7 LAB_001713cb: MOV EAX,0x89 JMP 0x001713d7 LAB_001713d2: MOV EAX,0xffffffff LAB_001713d7: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001713f8 ADD RSP,0xc48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001713f8: CALL 0x00129260
int aria_read_index(int4 param_1,ulong *param_2,ulong param_3,long param_4) { ushort uVar1; char cVar2; uint uVar3; int iVar4; ulong uVar5; int *piVar6; ulong uVar7; ulong uVar8; long in_FS_OFFSET; int1 local_c70 [1860]; uint local_52c; uint local_4b4; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_52c = *(uint *)((long)param_2 + 0x14); uVar8 = (ulong)local_52c; uVar3 = (uint)param_2[2]; local_4b4 = uVar3; do { uVar5 = my_pread(param_1,param_4,(ulong)uVar3,uVar3 * param_3,0); uVar7 = (ulong)(uint)param_2[2]; if (uVar5 != uVar7) { if (uVar5 == 0) { iVar4 = 0x89; goto LAB_001713d7; } if (uVar5 == 0xffffffffffffffff) { piVar6 = (int *)_my_thread_var(); if (*piVar6 == 0) { iVar4 = -1; } else { piVar6 = (int *)_my_thread_var(); iVar4 = *piVar6; } goto LAB_001713d7; } } if ((*(char *)((long)param_2 + 0x1f) == '\0') || (param_3 < *param_2 / uVar7)) { iVar4 = 0x7e; if (uVar5 == uVar7) { iVar4 = 0; } goto LAB_001713d7; } if (uVar5 == uVar7) { uVar1 = *(ushort *)(param_4 + -2 + uVar8); iVar4 = 0x7e; if ((uint)(ushort)(uVar1 << 8 | uVar1 >> 8) <= (uint)param_2[2] - 4) { cVar2 = maria_page_crc_check(param_4,param_3,local_c70,0xffffffff); iVar4 = (int)cVar2; } LAB_001713d7: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return iVar4; } my_sleep(100000); uVar3 = (uint)param_2[2]; } while( true ); }
2,303
init_events_statements_history_long(unsigned long)
eloqsql/storage/perfschema/pfs_events_statements.cc
int init_events_statements_history_long(size_t events_statements_history_long_sizing) { events_statements_history_long_size= events_statements_history_long_sizing; events_statements_history_long_full= false; PFS_atomic::store_u32(&events_statements_history_long_index.m_u32, 0); if (events_statements_history_long_size == 0) return 0; events_statements_history_long_array= PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long, events_statements_history_long_size, sizeof(PFS_events_statements), PFS_events_statements, MYF(MY_ZEROFILL)); if (events_statements_history_long_array == NULL) { cleanup_events_statements_history_long(); return 1; } if (pfs_max_digest_length > 0) { /* Size of each digest text array. */ size_t digest_text_size= pfs_max_digest_length * sizeof(unsigned char); h_long_stmts_digest_token_array= PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long_tokens, events_statements_history_long_size, digest_text_size, unsigned char, MYF(MY_ZEROFILL)); if (h_long_stmts_digest_token_array == NULL) { cleanup_events_statements_history_long(); return 1; } } if (pfs_max_sqltext > 0) { /* Size of each sql text array. */ size_t sqltext_size= pfs_max_sqltext * sizeof(char); h_long_stmts_text_array= PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long_sqltext, events_statements_history_long_size, sqltext_size, char, MYF(MY_ZEROFILL)); if (h_long_stmts_text_array == NULL) { cleanup_events_statements_history_long(); return 1; } } for (size_t index= 0; index < events_statements_history_long_size; index++) { events_statements_history_long_array[index].m_digest_storage.reset(h_long_stmts_digest_token_array + index * pfs_max_digest_length, pfs_max_digest_length); events_statements_history_long_array[index].m_sqltext= h_long_stmts_text_array + index * pfs_max_sqltext; } return 0; }
O0
cpp
init_events_statements_history_long(unsigned long): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, 0x3b8bf9(%rip) # 0x40da80 movb $0x0, 0x3b8cf2(%rip) # 0x40db80 leaq 0x3b8d2b(%rip), %rdi # 0x40dbc0 xorl %esi, %esi callq 0x36d20 cmpq $0x0, 0x3b8bdc(%rip) # 0x40da80 jne 0x54eb2 movl $0x0, -0x4(%rbp) jmp 0x55053 movq 0x3b8bc7(%rip), %rsi # 0x40da80 leaq 0x3b4000(%rip), %rdi # 0x408ec0 movl $0x590, %edx # imm = 0x590 movl $0x20, %ecx callq 0x29b10 movq %rax, 0x3b8d2a(%rip) # 0x40dc00 cmpq $0x0, 0x3b8d22(%rip) # 0x40dc00 jne 0x54ef1 callq 0x55060 movl $0x1, -0x4(%rbp) jmp 0x55053 leaq 0x3b4f40(%rip), %rax # 0x409e38 cmpq $0x0, (%rax) jbe 0x54f50 leaq 0x3b4f33(%rip), %rax # 0x409e38 movq (%rax), %rax shlq $0x0, %rax movq %rax, -0x18(%rbp) movq 0x3b8b69(%rip), %rsi # 0x40da80 movq -0x18(%rbp), %rdx leaq 0x3b40de(%rip), %rdi # 0x409000 movl $0x20, %ecx callq 0x29b10 movq %rax, 0x3b8cd5(%rip) # 0x40dc08 cmpq $0x0, 0x3b8ccd(%rip) # 0x40dc08 jne 0x54f4e callq 0x55060 movl $0x1, -0x4(%rbp) jmp 0x55053 jmp 0x54f50 leaq 0x3b4ee9(%rip), %rax # 0x409e40 cmpq $0x0, (%rax) jbe 0x54faf leaq 0x3b4edc(%rip), %rax # 0x409e40 movq (%rax), %rax shlq $0x0, %rax movq %rax, -0x20(%rbp) movq 0x3b8b0a(%rip), %rsi # 0x40da80 movq -0x20(%rbp), %rdx leaq 0x3b41bf(%rip), %rdi # 0x409140 movl $0x20, %ecx callq 0x29b10 movq %rax, 0x3b8c7e(%rip) # 0x40dc10 cmpq $0x0, 0x3b8c76(%rip) # 0x40dc10 jne 0x54fad callq 0x55060 movl $0x1, -0x4(%rbp) jmp 0x55053 jmp 0x54faf movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq 0x3b8abe(%rip), %rax # 0x40da80 jae 0x5504c movq 0x3b8c31(%rip), %rdi # 0x40dc00 imulq $0x590, -0x28(%rbp), %rax # imm = 0x590 addq %rax, %rdi addq $0x560, %rdi # imm = 0x560 movq 0x3b8c20(%rip), %rsi # 0x40dc08 movq -0x28(%rbp), %rax leaq 0x3b4e45(%rip), %rcx # 0x409e38 imulq (%rcx), %rax addq %rax, %rsi leaq 0x3b4e37(%rip), %rax # 0x409e38 movq (%rax), %rdx callq 0x2dae0 movq 0x3b8c00(%rip), %rcx # 0x40dc10 movq -0x28(%rbp), %rax leaq 0x3b4e25(%rip), %rdx # 0x409e40 imulq (%rdx), %rax addq %rax, %rcx movq 0x3b8bd7(%rip), %rax # 0x40dc00 imulq $0x590, -0x28(%rbp), %rdx # imm = 0x590 addq %rdx, %rax movq %rcx, 0x550(%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x54fb7 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_Z35init_events_statements_history_longm: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov cs:events_statements_history_long_size, rax mov cs:events_statements_history_long_full, 0 lea rdi, events_statements_history_long_index; this xor esi, esi; unsigned int * call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint) cmp cs:events_statements_history_long_size, 0 jnz short loc_54EB2 mov [rbp+var_4], 0 jmp loc_55053 loc_54EB2: mov rsi, cs:events_statements_history_long_size; unsigned __int64 lea rdi, builtin_memory_statements_history_long; PFS_builtin_memory_class * mov edx, 590h; unsigned __int64 mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov cs:events_statements_history_long_array, rax cmp cs:events_statements_history_long_array, 0 jnz short loc_54EF1 call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void) mov [rbp+var_4], 1 jmp loc_55053 loc_54EF1: lea rax, pfs_max_digest_length cmp qword ptr [rax], 0 jbe short loc_54F50 lea rax, pfs_max_digest_length mov rax, [rax] shl rax, 0 mov [rbp+var_18], rax mov rsi, cs:events_statements_history_long_size; unsigned __int64 mov rdx, [rbp+var_18]; unsigned __int64 lea rdi, builtin_memory_statements_history_long_tokens; PFS_builtin_memory_class * mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov cs:_ZL31h_long_stmts_digest_token_array, rax; h_long_stmts_digest_token_array cmp cs:_ZL31h_long_stmts_digest_token_array, 0; h_long_stmts_digest_token_array jnz short loc_54F4E call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void) mov [rbp+var_4], 1 jmp loc_55053 loc_54F4E: jmp short $+2 loc_54F50: lea rax, pfs_max_sqltext cmp qword ptr [rax], 0 jbe short loc_54FAF lea rax, pfs_max_sqltext mov rax, [rax] shl rax, 0 mov [rbp+var_20], rax mov rsi, cs:events_statements_history_long_size; unsigned __int64 mov rdx, [rbp+var_20]; unsigned __int64 lea rdi, builtin_memory_statements_history_long_sqltext; PFS_builtin_memory_class * mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov cs:_ZL23h_long_stmts_text_array, rax; h_long_stmts_text_array cmp cs:_ZL23h_long_stmts_text_array, 0; h_long_stmts_text_array jnz short loc_54FAD call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void) mov [rbp+var_4], 1 jmp loc_55053 loc_54FAD: jmp short $+2 loc_54FAF: mov [rbp+var_28], 0 loc_54FB7: mov rax, [rbp+var_28] cmp rax, cs:events_statements_history_long_size jnb loc_5504C mov rdi, cs:events_statements_history_long_array imul rax, [rbp+var_28], 590h add rdi, rax add rdi, 560h; this mov rsi, cs:_ZL31h_long_stmts_digest_token_array; h_long_stmts_digest_token_array mov rax, [rbp+var_28] lea rcx, pfs_max_digest_length imul rax, [rcx] add rsi, rax; unsigned __int8 * lea rax, pfs_max_digest_length mov rdx, [rax]; unsigned __int64 call _ZN18sql_digest_storage5resetEPhm; sql_digest_storage::reset(uchar *,ulong) mov rcx, cs:_ZL23h_long_stmts_text_array; h_long_stmts_text_array mov rax, [rbp+var_28] lea rdx, pfs_max_sqltext imul rax, [rdx] add rcx, rax mov rax, cs:events_statements_history_long_array imul rdx, [rbp+var_28], 590h add rax, rdx mov [rax+550h], rcx mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp loc_54FB7 loc_5504C: mov [rbp+var_4], 0 loc_55053: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long init_events_statements_history_long(unsigned long long a1) { unsigned long long i; // [rsp+8h] [rbp-28h] events_statements_history_long_size = a1; events_statements_history_long_full = 0; PFS_atomic::store_u32((PFS_atomic *)&events_statements_history_long_index, 0LL); if ( events_statements_history_long_size ) { events_statements_history_long_array = pfs_malloc_array( (PFS_builtin_memory_class *)&builtin_memory_statements_history_long, events_statements_history_long_size, 0x590uLL); if ( events_statements_history_long_array && (!pfs_max_digest_length || (h_long_stmts_digest_token_array = pfs_malloc_array( (PFS_builtin_memory_class *)&builtin_memory_statements_history_long_tokens, events_statements_history_long_size, pfs_max_digest_length)) != 0) && (!pfs_max_sqltext || (h_long_stmts_text_array = pfs_malloc_array( (PFS_builtin_memory_class *)&builtin_memory_statements_history_long_sqltext, events_statements_history_long_size, pfs_max_sqltext)) != 0) ) { for ( i = 0LL; i < events_statements_history_long_size; ++i ) { sql_digest_storage::reset( (sql_digest_storage *)(1424 * i + events_statements_history_long_array + 1376), (unsigned __int8 *)(pfs_max_digest_length * i + h_long_stmts_digest_token_array), pfs_max_digest_length); *(_QWORD *)(1424 * i + events_statements_history_long_array + 1360) = pfs_max_sqltext * i + h_long_stmts_text_array; } return 0; } else { cleanup_events_statements_history_long(); return 1; } } else { return 0; } }
init_events_statements_history_long: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x0050da80],RAX MOV byte ptr [0x0050db80],0x0 LEA RDI,[0x50dbc0] XOR ESI,ESI CALL 0x00136d20 CMP qword ptr [0x0050da80],0x0 JNZ 0x00154eb2 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00155053 LAB_00154eb2: MOV RSI,qword ptr [0x0050da80] LEA RDI,[0x508ec0] MOV EDX,0x590 MOV ECX,0x20 CALL 0x00129b10 MOV qword ptr [0x0050dc00],RAX CMP qword ptr [0x0050dc00],0x0 JNZ 0x00154ef1 CALL 0x00155060 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00155053 LAB_00154ef1: LEA RAX,[0x509e38] CMP qword ptr [RAX],0x0 JBE 0x00154f50 LEA RAX,[0x509e38] MOV RAX,qword ptr [RAX] SHL RAX,0x0 MOV qword ptr [RBP + -0x18],RAX MOV RSI,qword ptr [0x0050da80] MOV RDX,qword ptr [RBP + -0x18] LEA RDI,[0x509000] MOV ECX,0x20 CALL 0x00129b10 MOV qword ptr [0x0050dc08],RAX CMP qword ptr [0x0050dc08],0x0 JNZ 0x00154f4e CALL 0x00155060 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00155053 LAB_00154f4e: JMP 0x00154f50 LAB_00154f50: LEA RAX,[0x509e40] CMP qword ptr [RAX],0x0 JBE 0x00154faf LEA RAX,[0x509e40] MOV RAX,qword ptr [RAX] SHL RAX,0x0 MOV qword ptr [RBP + -0x20],RAX MOV RSI,qword ptr [0x0050da80] MOV RDX,qword ptr [RBP + -0x20] LEA RDI,[0x509140] MOV ECX,0x20 CALL 0x00129b10 MOV qword ptr [0x0050dc10],RAX CMP qword ptr [0x0050dc10],0x0 JNZ 0x00154fad CALL 0x00155060 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00155053 LAB_00154fad: JMP 0x00154faf LAB_00154faf: MOV qword ptr [RBP + -0x28],0x0 LAB_00154fb7: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [0x0050da80] JNC 0x0015504c MOV RDI,qword ptr [0x0050dc00] IMUL RAX,qword ptr [RBP + -0x28],0x590 ADD RDI,RAX ADD RDI,0x560 MOV RSI,qword ptr [0x0050dc08] MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x509e38] IMUL RAX,qword ptr [RCX] ADD RSI,RAX LEA RAX,[0x509e38] MOV RDX,qword ptr [RAX] CALL 0x0012dae0 MOV RCX,qword ptr [0x0050dc10] MOV RAX,qword ptr [RBP + -0x28] LEA RDX,[0x509e40] IMUL RAX,qword ptr [RDX] ADD RCX,RAX MOV RAX,qword ptr [0x0050dc00] IMUL RDX,qword ptr [RBP + -0x28],0x590 ADD RAX,RDX MOV qword ptr [RAX + 0x550],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00154fb7 LAB_0015504c: MOV dword ptr [RBP + -0x4],0x0 LAB_00155053: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* init_events_statements_history_long(unsigned long) */ int4 init_events_statements_history_long(ulong param_1) { ulong local_30; int4 local_c; events_statements_history_long_full = 0; events_statements_history_long_size = param_1; PFS_atomic::store_u32((uint *)events_statements_history_long_index,0); if (events_statements_history_long_size == 0) { local_c = 0; } else { events_statements_history_long_array = pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_statements_history_long, events_statements_history_long_size,0x590,0x20); if (events_statements_history_long_array == 0) { cleanup_events_statements_history_long(); local_c = 1; } else if ((pfs_max_digest_length == 0) || (h_long_stmts_digest_token_array = pfs_malloc_array((PFS_builtin_memory_class *) builtin_memory_statements_history_long_tokens, events_statements_history_long_size,pfs_max_digest_length,0x20), h_long_stmts_digest_token_array != 0)) { if ((pfs_max_sqltext == 0) || (h_long_stmts_text_array = pfs_malloc_array((PFS_builtin_memory_class *) builtin_memory_statements_history_long_sqltext, events_statements_history_long_size,pfs_max_sqltext,0x20), h_long_stmts_text_array != 0)) { for (local_30 = 0; local_30 < events_statements_history_long_size; local_30 = local_30 + 1) { sql_digest_storage::reset ((sql_digest_storage *) (events_statements_history_long_array + local_30 * 0x590 + 0x560), (uchar *)(h_long_stmts_digest_token_array + local_30 * pfs_max_digest_length), pfs_max_digest_length); *(ulong *)(events_statements_history_long_array + local_30 * 0x590 + 0x550) = h_long_stmts_text_array + local_30 * pfs_max_sqltext; } local_c = 0; } else { cleanup_events_statements_history_long(); local_c = 1; } } else { cleanup_events_statements_history_long(); local_c = 1; } } return local_c; }
2,304
Json_writer_object::Json_writer_object(Json_writer*, char const*)
eloqsql/sql/my_json_writer.h
explicit Json_writer_object(Json_writer* writer, const char *str= nullptr) : Json_writer_struct(writer) { #ifdef ENABLED_JSON_WRITER_CONSISTENCY_CHECKS DBUG_ASSERT(named_item_expected()); #endif if (unlikely(my_writer)) { if (str) my_writer->add_member(str); my_writer->start_object(); } }
O0
c
Json_writer_object::Json_writer_object(Json_writer*, char const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) movq -0x10(%rbp), %rsi callq 0x8cde50 movq -0x30(%rbp), %rax leaq 0x1123ea0(%rip), %rcx # 0x19f1e00 addq $0x10, %rcx movq %rcx, (%rax) cmpq $0x0, 0x8(%rax) je 0x8cdfb2 cmpq $0x0, -0x18(%rbp) je 0x8cdfa1 movq -0x30(%rbp), %rax movq 0x8(%rax), %rdi movq -0x18(%rbp), %rsi callq 0xbcdf10 jmp 0x8cdf88 jmp 0x8cdfa1 movq -0x30(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) callq 0x8cdef0 jmp 0x8cdfb8 movq -0x30(%rbp), %rax movq 0x8(%rax), %rdi callq 0xbcdca0 jmp 0x8cdfb0 jmp 0x8cdfb2 addq $0x30, %rsp popq %rbp retq movq -0x20(%rbp), %rdi callq 0x775a20 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN18Json_writer_objectC2EP11Json_writerPKc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov [rbp+var_30], rdi mov rsi, [rbp+var_10] call _ZN18Json_writer_structC2EP11Json_writer; Json_writer_struct::Json_writer_struct(Json_writer *) mov rax, [rbp+var_30] lea rcx, _ZTV18Json_writer_object; `vtable for'Json_writer_object add rcx, 10h mov [rax], rcx cmp qword ptr [rax+8], 0 jz short loc_8CDFB2 cmp [rbp+var_18], 0 jz short loc_8CDFA1 mov rax, [rbp+var_30] mov rdi, [rax+8]; this mov rsi, [rbp+var_18]; char * call _ZN11Json_writer10add_memberEPKc; Json_writer::add_member(char const*) jmp short $+2 loc_8CDF88: jmp short loc_8CDFA1 mov rdi, [rbp+var_30]; this mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax call _ZN18Json_writer_structD2Ev; Json_writer_struct::~Json_writer_struct() jmp short loc_8CDFB8 loc_8CDFA1: mov rax, [rbp+var_30] mov rdi, [rax+8]; this call _ZN11Json_writer12start_objectEv; Json_writer::start_object(void) jmp short $+2 loc_8CDFB0: jmp short $+2 loc_8CDFB2: add rsp, 30h pop rbp retn loc_8CDFB8: mov rdi, [rbp+var_20] call __Unwind_Resume
void Json_writer_object::Json_writer_object(Json_writer_object *this, Json_writer *a2, const char *a3) { Json_writer_struct::Json_writer_struct(this, a2); *(_QWORD *)this = &`vtable for'Json_writer_object + 2; if ( *((_QWORD *)this + 1) ) { if ( a3 ) Json_writer::add_member(*((Json_writer **)this + 1), a3); Json_writer::start_object(*((Json_writer **)this + 1)); } }
__cxx_global_var_init.10: PUSH RBP MOV RBP,RSP LEA RDI,[0x26cb6f0] XOR EAX,EAX MOV ESI,EAX CALL 0x008fd550 POP RBP RET
void __cxx_global_var_init_10(void) { time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_NONE,0); return; }
2,305
LefDefParser::defiFill::clear()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiFill.cpp
void defiFill::clear() { hasLayer_ = 0; layerOpc_ = 0; numRectangles_ = 0; hasVia_ = 0; viaOpc_ = 0; mask_ = 0; }
O0
cpp
LefDefParser::defiFill::clear(): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movl $0x0, (%rax) movl $0x0, 0x14(%rax) movl $0x0, 0x18(%rax) movl $0x0, 0x50(%rax) movl $0x0, 0x64(%rax) movl $0x0, 0x70(%rax) retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser8defiFill5clearEv: mov [rsp+var_8], rdi mov rax, [rsp+var_8] mov dword ptr [rax], 0 mov dword ptr [rax+14h], 0 mov dword ptr [rax+18h], 0 mov dword ptr [rax+50h], 0 mov dword ptr [rax+64h], 0 mov dword ptr [rax+70h], 0 retn
LefDefParser::defiFill * LefDefParser::defiFill::clear(LefDefParser::defiFill *this) { LefDefParser::defiFill *result; // rax result = this; *(_DWORD *)this = 0; *((_DWORD *)this + 5) = 0; *((_DWORD *)this + 6) = 0; *((_DWORD *)this + 20) = 0; *((_DWORD *)this + 25) = 0; *((_DWORD *)this + 28) = 0; return result; }
clear: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOV dword ptr [RAX],0x0 MOV dword ptr [RAX + 0x14],0x0 MOV dword ptr [RAX + 0x18],0x0 MOV dword ptr [RAX + 0x50],0x0 MOV dword ptr [RAX + 0x64],0x0 MOV dword ptr [RAX + 0x70],0x0 RET
/* LefDefParser::defiFill::clear() */ void __thiscall LefDefParser::defiFill::clear(defiFill *this) { *(int4 *)this = 0; *(int4 *)(this + 0x14) = 0; *(int4 *)(this + 0x18) = 0; *(int4 *)(this + 0x50) = 0; *(int4 *)(this + 100) = 0; *(int4 *)(this + 0x70) = 0; return; }
2,306
Item_param::set_decimal(my_decimal const*, bool)
eloqsql/sql/item.cc
void Item_param::set_decimal(const my_decimal *dv, bool unsigned_arg) { DBUG_ASSERT(value.type_handler()->cmp_type() == DECIMAL_RESULT); state= SHORT_DATA_VALUE; my_decimal2decimal(dv, &value.m_decimal); decimals= (uint8) value.m_decimal.frac; collation= DTCollation_numeric(); unsigned_flag= unsigned_arg; max_length= my_decimal_precision_to_length(value.m_decimal.intg + decimals, decimals, unsigned_flag); base_flags&= ~item_base_t::MAYBE_NULL; null_value= 0; }
O0
cpp
Item_param::set_decimal(my_decimal const*, bool): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) andb $0x1, %al movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xd2ab11 movq -0x30(%rbp), %rsi movl $0x2, 0x98(%rsi) movq -0x10(%rbp), %rdi addq $0xa0, %rsi addq $0x30, %rsi callq 0x88ef00 movq -0x30(%rbp), %rax movl 0xd4(%rax), %ecx movzbl %cl, %ecx movw %cx, 0xc(%rax) leaq -0x28(%rbp), %rdi callq 0x884450 movq -0x30(%rbp), %rax movq -0x28(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx movq %rcx, 0x18(%rax) movb -0x11(%rbp), %cl andb $0x1, %cl movb %cl, 0xe(%rax) movl 0xd0(%rax), %ecx movzwl 0xc(%rax), %edx addl %edx, %ecx movw %cx, %dx movw 0xc(%rax), %cx movb 0xe(%rax), %al andb $0x1, %al movzwl %dx, %edi movzwl %cx, %esi movzbl %al, %edx callq 0xb1af00 movw %ax, %cx movq -0x30(%rbp), %rax movzwl %cx, %ecx movl %ecx, 0x8(%rax) movl $0x1, %edi callq 0xd20670 movq -0x30(%rbp), %rdi addq $0x60, %rdi movzbl %al, %esi callq 0xd2a940 movq -0x30(%rbp), %rax movb $0x0, 0x64(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10Item_param11set_decimalEPK10my_decimalb: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi and al, 1 mov [rbp+var_11], al mov rax, [rbp+var_8] mov [rbp+var_30], rax jmp short $+2 loc_D2AB11: mov rsi, [rbp+var_30] mov dword ptr [rsi+98h], 2 mov rdi, [rbp+var_10]; my_decimal * add rsi, 0A0h add rsi, 30h ; '0'; my_decimal * call _Z18my_decimal2decimalPK10my_decimalPS_; my_decimal2decimal(my_decimal const*,my_decimal*) mov rax, [rbp+var_30] mov ecx, [rax+0D4h] movzx ecx, cl mov [rax+0Ch], cx lea rdi, [rbp+var_28]; this call _ZN19DTCollation_numericC2Ev; DTCollation_numeric::DTCollation_numeric(void) mov rax, [rbp+var_30] mov rcx, [rbp+var_28] mov [rax+10h], rcx mov rcx, [rbp+var_20] mov [rax+18h], rcx mov cl, [rbp+var_11] and cl, 1 mov [rax+0Eh], cl mov ecx, [rax+0D0h] movzx edx, word ptr [rax+0Ch] add ecx, edx mov dx, cx mov cx, [rax+0Ch] mov al, [rax+0Eh] and al, 1 movzx edi, dx; unsigned __int16 movzx esi, cx; unsigned __int16 movzx edx, al; bool call _Z30my_decimal_precision_to_lengthttb; my_decimal_precision_to_length(ushort,ushort,bool) mov cx, ax mov rax, [rbp+var_30] movzx ecx, cx mov [rax+8], ecx mov edi, 1 call _Zco11item_base_t_40; operator~(item_base_t) mov rdi, [rbp+var_30] add rdi, 60h ; '`' movzx esi, al call _ZaNR11item_base_tS__22; operator&=(item_base_t &,item_base_t) mov rax, [rbp+var_30] mov byte ptr [rax+64h], 0 add rsp, 30h pop rbp retn
Item_param * Item_param::set_decimal(Item_param *this, const my_decimal *a2, char a3) { char v3; // al Item_param *result; // rax _QWORD v5[2]; // [rsp+8h] [rbp-28h] BYREF char v6; // [rsp+1Fh] [rbp-11h] my_decimal *v7; // [rsp+20h] [rbp-10h] Item_param *v8; // [rsp+28h] [rbp-8h] v8 = this; v7 = a2; v6 = a3 & 1; *((_DWORD *)this + 38) = 2; my_decimal2decimal(v7, (Item_param *)((char *)this + 208)); *((_WORD *)this + 6) = (unsigned __int8)*((_DWORD *)this + 53); DTCollation_numeric::DTCollation_numeric((DTCollation_numeric *)v5); *((_QWORD *)this + 2) = v5[0]; *((_QWORD *)this + 3) = v5[1]; *((_BYTE *)this + 14) = v6 & 1; *((_DWORD *)this + 2) = (unsigned __int16)my_decimal_precision_to_length( *((_WORD *)this + 6) + *((_WORD *)this + 104), *((_WORD *)this + 6), *((_BYTE *)this + 14) & 1); v3 = operator~(1u); operator&=((_BYTE *)this + 96, v3); result = this; *((_BYTE *)this + 100) = 0; return result; }
opt_trace_disable_if_no_view_access: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x888] AND RAX,0x1 CMP RAX,0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JNZ 0x00d2ab43 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x3e6c],0x0 JNZ 0x00d2ab43 MOV RDI,qword ptr [RBP + -0x8] CALL 0x009cab80 TEST AL,0x1 JNZ 0x00d2ab48 LAB_00d2ab43: JMP 0x00d2ac2c LAB_00d2ab48: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x3e08 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x200] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00d2c080 MOV qword ptr [RBP + -0x30],RAX MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x2e8 LEA RDI,[RBP + -0x80] MOV EDX,0x50 CALL 0x00876440 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x200],0x0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x1ea8 CALL 0x00d2c0a0 MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV ESI,0x400000 XOR ECX,ECX MOV R9D,0x1 MOV R8D,R9D CALL 0x00ae2ab0 AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x84],EAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x200],RCX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] CALL 0x00d2c0a0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2e8 LEA RSI,[RBP + -0x80] MOV EDX,0x50 CALL 0x00876440 CMP dword ptr [RBP + -0x84],0x0 JZ 0x00d2ac1f MOV RDI,qword ptr [RBP + -0x20] CALL 0x00d2a790 JMP 0x00d2ac2c LAB_00d2ac1f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00d2a890 LAB_00d2ac2c: ADD RSP,0x90 POP RBP RET
/* opt_trace_disable_if_no_view_access(THD*, TABLE_LIST*, TABLE_LIST*) */ void opt_trace_disable_if_no_view_access(THD *param_1,TABLE_LIST *param_2,TABLE_LIST *param_3) { byte bVar1; ulong uVar2; int1 local_88 [80]; Security_context *local_38; int8 local_30; Opt_trace_context *local_28; TABLE_LIST *local_20; TABLE_LIST *local_18; THD *local_10; if ((((*(ulong *)(param_1 + 0x888) & 1) != 0) && (*(int *)(param_1 + 0x3e6c) == 0)) && (local_20 = param_3, local_18 = param_2, local_10 = param_1, uVar2 = THD::trace_started(param_1), (uVar2 & 1) != 0)) { local_28 = (Opt_trace_context *)(local_10 + 0x3e08); local_30 = *(int8 *)(local_18 + 0x200); local_38 = (Security_context *)THD::security_context(local_10); memcpy(local_88,local_18 + 0x2e8,0x50); *(int8 *)(local_18 + 0x200) = 0; THD::set_security_context(local_10,(Security_context *)(local_10 + 0x1ea8)); bVar1 = check_table_access(local_10,0x400000,local_18,0,1); *(int8 *)(local_18 + 0x200) = local_30; THD::set_security_context(local_10,local_38); memcpy(local_18 + 0x2e8,local_88,0x50); if ((bVar1 & 1) == 0) { opt_trace_disable_if_no_tables_access(local_10,local_20); } else { Opt_trace_context::missing_privilege(local_28); } } return; }
2,307
get_unpack_function
eloqsql/storage/maria/ma_packrec.c
static void (*get_unpack_function(MARIA_COLUMNDEF *rec)) (MARIA_COLUMNDEF *, MARIA_BIT_BUFF *, uchar *, uchar *) { switch (rec->base_type) { case FIELD_SKIP_ZERO: if (rec->pack_type & PACK_TYPE_ZERO_FILL) return &uf_zerofill_skip_zero; return &uf_skip_zero; case FIELD_NORMAL: if (rec->pack_type & PACK_TYPE_SPACE_FIELDS) return &uf_space_normal; if (rec->pack_type & PACK_TYPE_ZERO_FILL) return &uf_zerofill_normal; return &decode_bytes; case FIELD_SKIP_ENDSPACE: if (rec->pack_type & PACK_TYPE_SPACE_FIELDS) { if (rec->pack_type & PACK_TYPE_SELECTED) return &uf_space_endspace_selected; return &uf_space_endspace; } if (rec->pack_type & PACK_TYPE_SELECTED) return &uf_endspace_selected; return &uf_endspace; case FIELD_SKIP_PRESPACE: if (rec->pack_type & PACK_TYPE_SPACE_FIELDS) { if (rec->pack_type & PACK_TYPE_SELECTED) return &uf_space_prespace_selected; return &uf_space_prespace; } if (rec->pack_type & PACK_TYPE_SELECTED) return &uf_prespace_selected; return &uf_prespace; case FIELD_CONSTANT: return &uf_constant; case FIELD_INTERVALL: return &uf_intervall; case FIELD_ZERO: case FIELD_CHECK: return &uf_zero; case FIELD_BLOB: return &uf_blob; case FIELD_VARCHAR: if (rec->length <= 256) /* 255 + 1 uchar length */ return &uf_varchar1; return &uf_varchar2; case FIELD_LAST: default: return 0; /* This should never happend */ } }
O0
c
get_unpack_function: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x20(%rax), %eax incl %eax movl %eax, %ecx movq %rcx, -0x18(%rbp) subl $0xa, %eax ja 0x4c0f4 movq -0x18(%rbp), %rax leaq 0x10cd39(%rip), %rcx # 0x158c74 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x4bf63 leaq 0x816(%rip), %rax # 0x4c770 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x8e6(%rip), %rax # 0x4c850 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4bf92 leaq 0x977(%rip), %rax # 0x4c900 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x4bfb1 leaq 0xa08(%rip), %rax # 0x4c9b0 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0xa68(%rip), %rax # 0x4ca20 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4bfff movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4bfef leaq 0xeaa(%rip), %rax # 0x4ce90 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x106a(%rip), %rax # 0x4d060 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4c01e leaq 0x11ab(%rip), %rax # 0x4d1c0 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x12fb(%rip), %rax # 0x4d320 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4c06c movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4c05c leaq 0x13bd(%rip), %rax # 0x4d410 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x156d(%rip), %rax # 0x4d5d0 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movl 0x28(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4c088 leaq 0x169e(%rip), %rax # 0x4d720 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x17e1(%rip), %rax # 0x4d870 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x18b4(%rip), %rax # 0x4d950 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x18e7(%rip), %rax # 0x4d990 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x195a(%rip), %rax # 0x4da10 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x198d(%rip), %rax # 0x4da50 movq %rax, -0x8(%rbp) jmp 0x4c0fc movq -0x10(%rbp), %rax movzwl 0x8(%rax), %eax cmpl $0x100, %eax # imm = 0x100 jg 0x4c0e5 leaq 0x1b01(%rip), %rax # 0x4dbe0 movq %rax, -0x8(%rbp) jmp 0x4c0fc leaq 0x1c04(%rip), %rax # 0x4dcf0 movq %rax, -0x8(%rbp) jmp 0x4c0fc jmp 0x4c0f4 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
get_unpack_function: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax+20h] inc eax; switch 11 cases mov ecx, eax mov [rbp+var_18], rcx sub eax, 0Ah ja def_4BF42; jumptable 000000000004BF42 default case mov rax, [rbp+var_18] lea rcx, jpt_4BF42 movsxd rax, ds:(jpt_4BF42 - 158C74h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4BF44: mov rax, [rbp+var_10]; jumptable 000000000004BF42 case 3 mov eax, [rax+28h] and eax, 4 cmp eax, 0 jz short loc_4BF63 lea rax, uf_zerofill_skip_zero mov [rbp+var_8], rax jmp loc_4C0FC loc_4BF63: lea rax, uf_skip_zero mov [rbp+var_8], rax jmp loc_4C0FC loc_4BF73: mov rax, [rbp+var_10]; jumptable 000000000004BF42 case 0 mov eax, [rax+28h] and eax, 2 cmp eax, 0 jz short loc_4BF92 lea rax, uf_space_normal mov [rbp+var_8], rax jmp loc_4C0FC loc_4BF92: mov rax, [rbp+var_10] mov eax, [rax+28h] and eax, 4 cmp eax, 0 jz short loc_4BFB1 lea rax, uf_zerofill_normal mov [rbp+var_8], rax jmp loc_4C0FC loc_4BFB1: lea rax, decode_bytes mov [rbp+var_8], rax jmp loc_4C0FC loc_4BFC1: mov rax, [rbp+var_10]; jumptable 000000000004BF42 case 1 mov eax, [rax+28h] and eax, 2 cmp eax, 0 jz short loc_4BFFF mov rax, [rbp+var_10] mov eax, [rax+28h] and eax, 1 cmp eax, 0 jz short loc_4BFEF lea rax, uf_space_endspace_selected mov [rbp+var_8], rax jmp loc_4C0FC loc_4BFEF: lea rax, uf_space_endspace mov [rbp+var_8], rax jmp loc_4C0FC loc_4BFFF: mov rax, [rbp+var_10] mov eax, [rax+28h] and eax, 1 cmp eax, 0 jz short loc_4C01E lea rax, uf_endspace_selected mov [rbp+var_8], rax jmp loc_4C0FC loc_4C01E: lea rax, uf_endspace mov [rbp+var_8], rax jmp loc_4C0FC loc_4C02E: mov rax, [rbp+var_10]; jumptable 000000000004BF42 case 2 mov eax, [rax+28h] and eax, 2 cmp eax, 0 jz short loc_4C06C mov rax, [rbp+var_10] mov eax, [rax+28h] and eax, 1 cmp eax, 0 jz short loc_4C05C lea rax, uf_space_prespace_selected mov [rbp+var_8], rax jmp loc_4C0FC loc_4C05C: lea rax, uf_space_prespace mov [rbp+var_8], rax jmp loc_4C0FC loc_4C06C: mov rax, [rbp+var_10] mov eax, [rax+28h] and eax, 1 cmp eax, 0 jz short loc_4C088 lea rax, uf_prespace_selected mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C088: lea rax, uf_prespace mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C095: lea rax, uf_constant; jumptable 000000000004BF42 case 5 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0A2: lea rax, uf_intervall; jumptable 000000000004BF42 case 6 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0AF: lea rax, uf_zero; jumptable 000000000004BF42 cases 7,9 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0BC: lea rax, uf_blob; jumptable 000000000004BF42 case 4 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0C9: mov rax, [rbp+var_10]; jumptable 000000000004BF42 case 8 movzx eax, word ptr [rax+8] cmp eax, 100h jg short loc_4C0E5 lea rax, uf_varchar1 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0E5: lea rax, uf_varchar2 mov [rbp+var_8], rax jmp short loc_4C0FC loc_4C0F2: jmp short $+2; jumptable 000000000004BF42 case -1 def_4BF42: mov [rbp+var_8], 0; jumptable 000000000004BF42 default case loc_4C0FC: mov rax, [rbp+var_8] pop rbp retn
long long ( * get_unpack_function(long long a1))() { long long ( *v2)(); // [rsp+10h] [rbp-8h] switch ( *(_DWORD *)(a1 + 32) ) { case 0: if ( (*(_DWORD *)(a1 + 40) & 2) != 0 ) { v2 = uf_space_normal; } else if ( (*(_DWORD *)(a1 + 40) & 4) != 0 ) { v2 = uf_zerofill_normal; } else { v2 = decode_bytes; } break; case 1: if ( (*(_DWORD *)(a1 + 40) & 2) != 0 ) { if ( (*(_DWORD *)(a1 + 40) & 1) != 0 ) v2 = uf_space_endspace_selected; else v2 = uf_space_endspace; } else if ( (*(_DWORD *)(a1 + 40) & 1) != 0 ) { v2 = uf_endspace_selected; } else { v2 = uf_endspace; } break; case 2: if ( (*(_DWORD *)(a1 + 40) & 2) != 0 ) { if ( (*(_DWORD *)(a1 + 40) & 1) != 0 ) v2 = uf_space_prespace_selected; else v2 = uf_space_prespace; } else if ( (*(_DWORD *)(a1 + 40) & 1) != 0 ) { v2 = uf_prespace_selected; } else { v2 = uf_prespace; } break; case 3: if ( (*(_DWORD *)(a1 + 40) & 4) != 0 ) v2 = uf_zerofill_skip_zero; else v2 = uf_skip_zero; break; case 4: v2 = uf_blob; break; case 5: v2 = uf_constant; break; case 6: v2 = uf_intervall; break; case 7: case 9: v2 = uf_zero; break; case 8: if ( *(unsigned __int16 *)(a1 + 8) > 0x100u ) v2 = uf_varchar2; else v2 = uf_varchar1; break; default: v2 = 0LL; break; } return v2; }
get_unpack_function: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20] INC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x18],RCX SUB EAX,0xa JA 0x0014c0f4 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x258c74] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_3: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x4 CMP EAX,0x0 JZ 0x0014bf63 LEA RAX,[0x14c770] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014bf63: LEA RAX,[0x14c850] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_0: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014bf92 LEA RAX,[0x14c900] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014bf92: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x4 CMP EAX,0x0 JZ 0x0014bfb1 LEA RAX,[0x14c9b0] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014bfb1: LEA RAX,[0x14ca20] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_1: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014bfff MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014bfef LEA RAX,[0x14ce90] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014bfef: LEA RAX,[0x14d060] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014bfff: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014c01e LEA RAX,[0x14d1c0] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014c01e: LEA RAX,[0x14d320] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_2: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014c06c MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014c05c LEA RAX,[0x14d410] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014c05c: LEA RAX,[0x14d5d0] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014c06c: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x28] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014c088 LEA RAX,[0x14d720] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014c088: LEA RAX,[0x14d870] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_5: LEA RAX,[0x14d950] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_6: LEA RAX,[0x14d990] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_7: LEA RAX,[0x14da10] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_4: LEA RAX,[0x14da50] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_8: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x8] CMP EAX,0x100 JG 0x0014c0e5 LEA RAX,[0x14dbe0] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc LAB_0014c0e5: LEA RAX,[0x14dcf0] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014c0fc caseD_ffffffff: JMP 0x0014c0f4 default: MOV qword ptr [RBP + -0x8],0x0 LAB_0014c0fc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
code * get_unpack_function(long param_1) { code *local_10; switch(*(int4 *)(param_1 + 0x20)) { case 0: if ((*(uint *)(param_1 + 0x28) & 2) == 0) { if ((*(uint *)(param_1 + 0x28) & 4) == 0) { local_10 = decode_bytes; } else { local_10 = uf_zerofill_normal; } } else { local_10 = uf_space_normal; } break; case 1: if ((*(uint *)(param_1 + 0x28) & 2) == 0) { if ((*(uint *)(param_1 + 0x28) & 1) == 0) { local_10 = uf_endspace; } else { local_10 = uf_endspace_selected; } } else if ((*(uint *)(param_1 + 0x28) & 1) == 0) { local_10 = uf_space_endspace; } else { local_10 = uf_space_endspace_selected; } break; case 2: if ((*(uint *)(param_1 + 0x28) & 2) == 0) { if ((*(uint *)(param_1 + 0x28) & 1) == 0) { local_10 = uf_prespace; } else { local_10 = uf_prespace_selected; } } else if ((*(uint *)(param_1 + 0x28) & 1) == 0) { local_10 = uf_space_prespace; } else { local_10 = uf_space_prespace_selected; } break; case 3: if ((*(uint *)(param_1 + 0x28) & 4) == 0) { local_10 = uf_skip_zero; } else { local_10 = uf_zerofill_skip_zero; } break; case 4: local_10 = uf_blob; break; case 5: local_10 = uf_constant; break; case 6: local_10 = uf_intervall; break; case 7: case 9: local_10 = uf_zero; break; case 8: if (*(ushort *)(param_1 + 8) < 0x101) { local_10 = uf_varchar1; } else { local_10 = uf_varchar2; } break; case 0xffffffff: default: local_10 = (code *)0x0; } return local_10; }
2,308
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x1de300(%rip), %rax # 0x2b3618 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xd53b2 leaq 0x1de2b2(%rip), %rax # 0x2b3618 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xe1a90 movl %eax, -0x34(%rbp) leaq 0x1de281(%rip), %rax # 0x2b3618 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xd53cb movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0xe1a90 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_D53B2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_D53CB loc_D53B2: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_D53CB: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server + 41))(v7, a1, 2LL, a4, &v8); if ( v8 ) { (*((void ( **)(long long, long long, _QWORD))PSI_server + 62))(v8, v14, v13); v9 = my_open(v12, v11, v10); (*((void ( **)(long long, _QWORD))PSI_server + 64))(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3b3618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001d53b2 LEA RAX,[0x3b3618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001e1a90 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3b3618] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d53cb LAB_001d53b2: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001e1a90 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001d53cb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
2,309
my_thread_init_internal_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_internal_mutex(void) { mysql_mutex_init(key_THR_LOCK_threads, &THR_LOCK_threads, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_malloc, &THR_LOCK_malloc, MY_MUTEX_INIT_FAST); mysql_cond_init(key_THR_COND_threads, &THR_COND_threads, NULL); }
O3
c
my_thread_init_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq 0xb6a458(%rip), %rax # 0xc11fdc movl (%rax), %edi leaq 0x2e54e3(%rip), %r15 # 0x38d070 movq (%r15), %rax leaq 0xb6b021(%rip), %rbx # 0xc12bb8 movq %rbx, %rsi callq *0x40(%rax) movq %rax, 0x40(%rbx) movq %rbx, 0x38(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) leaq 0xb6b10d(%rip), %r14 # 0xc12cc0 movq %rbx, %rdi movq %r14, %rsi callq 0x29300 leaq 0xb6a403(%rip), %rax # 0xc11fc8 movl (%rax), %edi movq (%r15), %rax leaq 0xb6b02f(%rip), %rbx # 0xc12c00 movq %rbx, %rsi callq *0x40(%rax) movq %rax, 0x40(%rbx) movq %rbx, 0x38(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x29300 leaq 0xb6a408(%rip), %rax # 0xc12000 movl (%rax), %edi movq (%r15), %rax leaq 0xb6b044(%rip), %rbx # 0xc12c48 movq %rbx, %rsi callq *0x60(%rax) movq %rax, 0x30(%rbx) movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x29340
my_thread_init_internal_mutex: push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rax, key_THR_LOCK_threads mov edi, [rax] lea r15, PSI_server mov rax, [r15] lea rbx, THR_LOCK_threads mov rsi, rbx call qword ptr [rax+40h] mov [rbx+40h], rax mov [rbx+38h], rbx xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 lea r14, my_fast_mutexattr mov rdi, rbx mov rsi, r14 call _pthread_mutex_init lea rax, key_THR_LOCK_malloc mov edi, [rax] mov rax, [r15] lea rbx, THR_LOCK_malloc mov rsi, rbx call qword ptr [rax+40h] mov [rbx+40h], rax mov [rbx+38h], rbx xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov rdi, rbx mov rsi, r14 call _pthread_mutex_init lea rax, key_THR_COND_threads mov edi, [rax] mov rax, [r15] lea rbx, THR_COND_threads mov rsi, rbx call qword ptr [rax+60h] mov [rbx+30h], rax mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_cond_init
long long my_thread_init_internal_mutex() { THR_LOCK_threads[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])( key_THR_LOCK_threads, THR_LOCK_threads); THR_LOCK_threads[7] = THR_LOCK_threads; *(_OWORD *)&THR_LOCK_threads[5] = 0LL; pthread_mutex_init(THR_LOCK_threads, &my_fast_mutexattr); THR_LOCK_malloc[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(key_THR_LOCK_malloc, THR_LOCK_malloc); THR_LOCK_malloc[7] = THR_LOCK_malloc; *(_OWORD *)&THR_LOCK_malloc[5] = 0LL; pthread_mutex_init(THR_LOCK_malloc, &my_fast_mutexattr); THR_COND_threads[6] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[12])( key_THR_COND_threads, THR_COND_threads); return pthread_cond_init(THR_COND_threads, 0LL); }
my_thread_init_internal_mutex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RAX,[0xd11fdc] MOV EDI,dword ptr [RAX] LEA R15,[0x48d070] MOV RAX,qword ptr [R15] LEA RBX,[0xd12bb8] MOV RSI,RBX CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 LEA R14,[0xd12cc0] MOV RDI,RBX MOV RSI,R14 CALL 0x00129300 LEA RAX,[0xd11fc8] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA RBX,[0xd12c00] MOV RSI,RBX CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x38],RBX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV RDI,RBX MOV RSI,R14 CALL 0x00129300 LEA RAX,[0xd12000] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [R15] LEA RBX,[0xd12c48] MOV RSI,RBX CALL qword ptr [RAX + 0x60] MOV qword ptr [RBX + 0x30],RAX MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00129340
void my_thread_init_internal_mutex(void) { THR_LOCK_threads._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_threads,THR_LOCK_threads); THR_LOCK_threads._56_8_ = THR_LOCK_threads; THR_LOCK_threads._40_8_ = 0; THR_LOCK_threads._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_threads,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_LOCK_malloc._64_8_ = (**(code **)(PSI_server + 0x40))(key_THR_LOCK_malloc,THR_LOCK_malloc); THR_LOCK_malloc._56_8_ = THR_LOCK_malloc; THR_LOCK_malloc._40_8_ = 0; THR_LOCK_malloc._48_8_ = 0; pthread_mutex_init((pthread_mutex_t *)THR_LOCK_malloc,(pthread_mutexattr_t *)&my_fast_mutexattr); THR_COND_threads._48_8_ = (**(code **)(PSI_server + 0x60))(key_THR_COND_threads); pthread_cond_init((pthread_cond_t *)THR_COND_threads,(pthread_condattr_t *)0x0); return; }
2,310
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>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0xa104d movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1a460 movq %rax, %rbx movq %r14, %rdi callq 0x5e9cc leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4fdaf(%rip), %rsi # 0xf0e20 leaq 0x10(%rsp), %rdi callq 0xa10e3 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x861ba xorl %ebp, %ebp leaq 0x88ebc(%rip), %rsi # 0x129f58 leaq -0x464a1(%rip), %rdx # 0x5ac02 movq %rbx, %rdi callq 0x1af30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa10c9 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8f0 testb %bpl, %bpl jne 0xa10d3 jmp 0xa10db movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 movq %r14, %rdi callq 0x1afd0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_A104D mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_A104D: 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, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; 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_A10C9 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A10C9: test bpl, bpl jnz short loc_A10D3 jmp short loc_A10DB mov r14, rax loc_A10D3: mov rdi, rbx; void * call ___cxa_free_exception loc_A10DB: 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>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, 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) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001a104d MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001a104d: MOV EDI,0x20 CALL 0x0011a460 MOV RBX,RAX MOV RDI,R14 CALL 0x0015e9cc LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001a106a: LEA RSI,[0x1f0e20] LEA RDI,[RSP + 0x10] CALL 0x001a10e3 MOV BPL,0x1 LAB_001a107e: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001861ba XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15ac02] MOV RDI,RBX CALL 0x0011af30
/* 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[](unsigned long) const */ long __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> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { 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> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001a106a to 001a107a has its CatchHandler @ 001a10d0 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001a107e to 001a10aa has its CatchHandler @ 001a10ab */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
2,311
mbedtls_pem_write_buffer
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pem.c
int mbedtls_pem_write_buffer(const char *header, const char *footer, const unsigned char *der_data, size_t der_len, unsigned char *buf, size_t buf_len, size_t *olen) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char *encode_buf = NULL, *c, *p = buf; size_t len = 0, use_len, add_len = 0; mbedtls_base64_encode(NULL, 0, &use_len, der_data, der_len); add_len = strlen(header) + strlen(footer) + (use_len / 64) + 1; if (use_len + add_len > buf_len) { *olen = use_len + add_len; return MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL; } if (use_len != 0 && ((encode_buf = mbedtls_calloc(1, use_len)) == NULL)) { return MBEDTLS_ERR_PEM_ALLOC_FAILED; } if ((ret = mbedtls_base64_encode(encode_buf, use_len, &use_len, der_data, der_len)) != 0) { mbedtls_free(encode_buf); return ret; } memcpy(p, header, strlen(header)); p += strlen(header); c = encode_buf; while (use_len) { len = (use_len > 64) ? 64 : use_len; memcpy(p, c, len); use_len -= len; p += len; c += len; *p++ = '\n'; } memcpy(p, footer, strlen(footer)); p += strlen(footer); *p++ = '\0'; *olen = p - buf; /* Clean any remaining data previously written to the buffer */ memset(buf + *olen, 0, buf_len - *olen); mbedtls_free(encode_buf); return 0; }
O3
c
mbedtls_pem_write_buffer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %r15 movq %r8, 0x28(%rsp) movq %rcx, %rbp movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx leaq 0x10(%rsp), %r12 xorl %edi, %edi xorl %esi, %esi movq %r12, %rdx movq %r14, %rcx movq %rbp, %r8 callq 0x99cb4 movq %rbx, 0x18(%rsp) movq %rbx, %rdi callq 0xf240 movq %rax, %rbx movq %r13, 0x20(%rsp) movq %r13, %rdi callq 0xf240 movq (%r12), %r12 movq %r12, %rcx shrq $0x6, %rcx addq %rbx, %rax addq %r12, %rax addq %rcx, %rax incq %rax movq %r15, 0x30(%rsp) cmpq %r15, %rax jbe 0x98873 movq 0x70(%rsp), %rcx movq %rax, (%rcx) movl $0xffffffd6, %ebp # imm = 0xFFFFFFD6 jmp 0x9898e movq 0x70(%rsp), %rbx testq %r12, %r12 je 0x9889c movl $0x1, %edi movq %r12, %rsi callq 0xf2f0 movq %rax, %r15 testq %rax, %rax jne 0x9889f movl $0xffffee80, %ebp # imm = 0xFFFFEE80 jmp 0x9898e xorl %r15d, %r15d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movq %r14, %rcx movq %rbp, %r8 callq 0x99cb4 testl %eax, %eax je 0x988c3 movl %eax, %ebp movq %r15, %rdi jmp 0x98989 movq %r15, 0x8(%rsp) movq 0x18(%rsp), %r14 movq %r14, %rdi callq 0xf240 movq 0x28(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx callq 0xf3a0 movq %r14, %rdi callq 0xf240 movq %rax, %r14 addq %r15, %r14 movq 0x10(%rsp), %r13 testq %r13, %r13 je 0x98938 movq 0x8(%rsp), %r12 movq %rbx, %rbp cmpq $0x40, %r13 movl $0x40, %ebx cmovbq %r13, %rbx movq %r14, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0xf3a0 addq %rbx, %r12 addq %rbx, %r14 incq %r14 movb $0xa, -0x1(%r14) subq %rbx, %r13 jne 0x98908 jmp 0x9893b movq %rbx, %rbp movq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0xf240 movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx callq 0xf3a0 movq %rbx, %rdi callq 0xf240 leaq (%r14,%rax), %rdi incq %rdi movb $0x0, -0x1(%rdi) movq %rdi, %rax subq %r15, %rax movq %rax, (%rbp) movq 0x30(%rsp), %rdx subq %rax, %rdx xorl %ebp, %ebp xorl %esi, %esi callq 0xf2b0 movq 0x8(%rsp), %rdi callq 0xf560 movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mbedtls_pem_write_buffer: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, r9 mov [rsp+68h+var_40], r8 mov rbp, rcx mov r14, rdx mov r13, rsi mov rbx, rdi lea r12, [rsp+68h+var_58] xor edi, edi xor esi, esi mov rdx, r12 mov rcx, r14 mov r8, rbp call mbedtls_base64_encode mov [rsp+68h+var_50], rbx mov rdi, rbx call _strlen mov rbx, rax mov [rsp+68h+var_48], r13 mov rdi, r13 call _strlen mov r12, [r12] mov rcx, r12 shr rcx, 6 add rax, rbx add rax, r12 add rax, rcx inc rax mov [rsp+68h+var_38], r15 cmp rax, r15 jbe short loc_98873 mov rcx, [rsp+68h+arg_0] mov [rcx], rax mov ebp, 0FFFFFFD6h jmp loc_9898E loc_98873: mov rbx, [rsp+68h+arg_0] test r12, r12 jz short loc_9889C mov edi, 1 mov rsi, r12 call _calloc mov r15, rax test rax, rax jnz short loc_9889F mov ebp, 0FFFFEE80h jmp loc_9898E loc_9889C: xor r15d, r15d loc_9889F: lea rdx, [rsp+68h+var_58] mov rdi, r15 mov rsi, r12 mov rcx, r14 mov r8, rbp call mbedtls_base64_encode test eax, eax jz short loc_988C3 mov ebp, eax mov rdi, r15 jmp loc_98989 loc_988C3: mov [rsp+68h+var_60], r15 mov r14, [rsp+68h+var_50] mov rdi, r14 call _strlen mov r15, [rsp+68h+var_40] mov rdi, r15 mov rsi, r14 mov rdx, rax call _memcpy mov rdi, r14 call _strlen mov r14, rax add r14, r15 mov r13, [rsp+68h+var_58] test r13, r13 jz short loc_98938 mov r12, [rsp+68h+var_60] mov rbp, rbx loc_98908: cmp r13, 40h ; '@' mov ebx, 40h ; '@' cmovb rbx, r13 mov rdi, r14 mov rsi, r12 mov rdx, rbx call _memcpy add r12, rbx add r14, rbx inc r14 mov byte ptr [r14-1], 0Ah sub r13, rbx jnz short loc_98908 jmp short loc_9893B loc_98938: mov rbp, rbx loc_9893B: mov rbx, [rsp+68h+var_48] mov rdi, rbx call _strlen mov rdi, r14 mov rsi, rbx mov rdx, rax call _memcpy mov rdi, rbx call _strlen lea rdi, [r14+rax] inc rdi mov byte ptr [rdi-1], 0 mov rax, rdi sub rax, r15 mov [rbp+0], rax mov rdx, [rsp+68h+var_38] sub rdx, rax xor ebp, ebp xor esi, esi call _memset mov rdi, [rsp+68h+var_60] loc_98989: call _free loc_9898E: mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_pem_write_buffer( long long a1, long long a2, long long a3, long long a4, long long a5, unsigned long long a6, unsigned long long *a7) { long long v10; // rdx long long v11; // rcx long long v12; // r8 long long v13; // r9 long long v14; // rbx long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 long long v19; // rax unsigned long long v20; // r12 unsigned long long v21; // rax unsigned int v22; // ebp long long v23; // r15 unsigned int v24; // eax long long v25; // rdx long long v26; // rcx long long v27; // r8 long long v28; // r9 long long v29; // rdi long long v30; // r14 long long v31; // rax long long v32; // r15 long long v33; // rsi long long v34; // rdx long long v35; // rcx long long v36; // r8 long long v37; // r9 long long v38; // rdx long long v39; // rcx long long v40; // r8 long long v41; // r9 long long v42; // r14 unsigned long long v43; // r13 long long v44; // r12 unsigned long long *v45; // rbp long long v46; // rbx long long v47; // rbx long long v48; // rax long long v49; // rdx long long v50; // rcx long long v51; // r8 long long v52; // r9 long long v53; // rdi long long v55; // [rsp+8h] [rbp-60h] unsigned long long v56; // [rsp+10h] [rbp-58h] BYREF long long v57; // [rsp+18h] [rbp-50h] long long v58; // [rsp+20h] [rbp-48h] long long v59; // [rsp+28h] [rbp-40h] unsigned long long v60; // [rsp+30h] [rbp-38h] v59 = a5; mbedtls_base64_encode(0LL, 0LL, &v56, a3, a4); v57 = a1; v14 = strlen(a1, 0LL, v10, v11, v12, v13); v58 = a2; v19 = strlen(a2, 0LL, v15, v16, v17, v18); v20 = v56; v21 = (v20 >> 6) + v20 + v14 + v19 + 1; v60 = a6; if ( v21 <= a6 ) { if ( v56 ) { v23 = calloc(1LL, v56); if ( !v23 ) return (unsigned int)-4480; } else { v23 = 0LL; } v24 = mbedtls_base64_encode(v23, v20, &v56, a3, a4); if ( v24 ) { v22 = v24; v29 = v23; } else { v55 = v23; v30 = v57; v31 = strlen(v57, v20, v25, v26, v27, v28); v32 = v59; v33 = v30; memcpy(v59, v30, v31); v42 = v32 + strlen(v30, v30, v34, v35, v36, v37); v43 = v56; if ( v56 ) { v44 = v55; v45 = a7; do { v46 = 64LL; if ( v43 < 0x40 ) v46 = v43; v33 = v44; memcpy(v42, v44, v46); v44 += v46; v42 += v46 + 1; *(_BYTE *)(v42 - 1) = 10; v43 -= v46; } while ( v43 ); } else { v45 = a7; } v47 = v58; v48 = strlen(v58, v33, v38, v39, v40, v41); memcpy(v42, v47, v48); v53 = v42 + strlen(v47, v47, v49, v50, v51, v52) + 1; *(_BYTE *)(v53 - 1) = 0; *v45 = v53 - v32; v22 = 0; memset(v53, 0LL, v60 - (v53 - v32)); v29 = v55; } free(v29); } else { *a7 = v21; return (unsigned int)-42; } return v22; }
mbedtls_pem_write_buffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,R9 MOV qword ptr [RSP + 0x28],R8 MOV RBP,RCX MOV R14,RDX MOV R13,RSI MOV RBX,RDI LEA R12,[RSP + 0x10] XOR EDI,EDI XOR ESI,ESI MOV RDX,R12 MOV RCX,R14 MOV R8,RBP CALL 0x00199cb4 MOV qword ptr [RSP + 0x18],RBX MOV RDI,RBX CALL 0x0010f240 MOV RBX,RAX MOV qword ptr [RSP + 0x20],R13 MOV RDI,R13 CALL 0x0010f240 MOV R12,qword ptr [R12] MOV RCX,R12 SHR RCX,0x6 ADD RAX,RBX ADD RAX,R12 ADD RAX,RCX INC RAX MOV qword ptr [RSP + 0x30],R15 CMP RAX,R15 JBE 0x00198873 MOV RCX,qword ptr [RSP + 0x70] MOV qword ptr [RCX],RAX MOV EBP,0xffffffd6 JMP 0x0019898e LAB_00198873: MOV RBX,qword ptr [RSP + 0x70] TEST R12,R12 JZ 0x0019889c MOV EDI,0x1 MOV RSI,R12 CALL 0x0010f2f0 MOV R15,RAX TEST RAX,RAX JNZ 0x0019889f MOV EBP,0xffffee80 JMP 0x0019898e LAB_0019889c: XOR R15D,R15D LAB_0019889f: LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV RCX,R14 MOV R8,RBP CALL 0x00199cb4 TEST EAX,EAX JZ 0x001988c3 MOV EBP,EAX MOV RDI,R15 JMP 0x00198989 LAB_001988c3: MOV qword ptr [RSP + 0x8],R15 MOV R14,qword ptr [RSP + 0x18] MOV RDI,R14 CALL 0x0010f240 MOV R15,qword ptr [RSP + 0x28] MOV RDI,R15 MOV RSI,R14 MOV RDX,RAX CALL 0x0010f3a0 MOV RDI,R14 CALL 0x0010f240 MOV R14,RAX ADD R14,R15 MOV R13,qword ptr [RSP + 0x10] TEST R13,R13 JZ 0x00198938 MOV R12,qword ptr [RSP + 0x8] MOV RBP,RBX LAB_00198908: CMP R13,0x40 MOV EBX,0x40 CMOVC RBX,R13 MOV RDI,R14 MOV RSI,R12 MOV RDX,RBX CALL 0x0010f3a0 ADD R12,RBX ADD R14,RBX INC R14 MOV byte ptr [R14 + -0x1],0xa SUB R13,RBX JNZ 0x00198908 JMP 0x0019893b LAB_00198938: MOV RBP,RBX LAB_0019893b: MOV RBX,qword ptr [RSP + 0x20] MOV RDI,RBX CALL 0x0010f240 MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX CALL 0x0010f3a0 MOV RDI,RBX CALL 0x0010f240 LEA RDI,[R14 + RAX*0x1] INC RDI MOV byte ptr [RDI + -0x1],0x0 MOV RAX,RDI SUB RAX,R15 MOV qword ptr [RBP],RAX MOV RDX,qword ptr [RSP + 0x30] SUB RDX,RAX XOR EBP,EBP XOR ESI,ESI CALL 0x0010f2b0 MOV RDI,qword ptr [RSP + 0x8] LAB_00198989: CALL 0x0010f560 LAB_0019898e: MOV EAX,EBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mbedtls_pem_write_buffer (char *param_1,char *param_2,int8 param_3,int8 param_4,void *param_5, ulong param_6,ulong *param_7) { char *pcVar1; void *pvVar2; int iVar3; size_t sVar4; size_t sVar5; ulong uVar6; void *__ptr; ulong uVar7; void *__src; int1 *puVar8; int1 *puVar9; ulong local_58; char *local_50; char *local_48; void *local_40; ulong local_38; local_40 = param_5; mbedtls_base64_encode(0,0,&local_58,param_3,param_4); local_50 = param_1; sVar4 = strlen(param_1); local_48 = param_2; sVar5 = strlen(param_2); uVar7 = local_58; uVar6 = sVar5 + sVar4 + local_58 + (local_58 >> 6) + 1; if (param_6 < uVar6) { *param_7 = uVar6; iVar3 = -0x2a; } else { local_38 = param_6; if (local_58 == 0) { __ptr = (void *)0x0; } else { __ptr = calloc(1,local_58); if (__ptr == (void *)0x0) { return -0x1180; } } iVar3 = mbedtls_base64_encode(__ptr,uVar7,&local_58,param_3,param_4); pcVar1 = local_50; if (iVar3 == 0) { sVar4 = strlen(local_50); pvVar2 = local_40; memcpy(local_40,pcVar1,sVar4); sVar4 = strlen(pcVar1); puVar8 = (int1 *)(sVar4 + (long)pvVar2); __src = __ptr; pcVar1 = local_48; for (; local_48 = pcVar1, local_58 != 0; local_58 = local_58 - sVar4) { sVar4 = 0x40; if (local_58 < 0x40) { sVar4 = local_58; } memcpy(puVar8,__src,sVar4); __src = (void *)((long)__src + sVar4); puVar9 = puVar8 + sVar4; puVar8 = puVar9 + 1; *puVar9 = 10; pcVar1 = local_48; } sVar4 = strlen(pcVar1); memcpy(puVar8,pcVar1,sVar4); sVar4 = strlen(pcVar1); puVar8 = puVar8 + sVar4; *puVar8 = 0; uVar7 = (long)(puVar8 + 1) - (long)pvVar2; *param_7 = uVar7; iVar3 = 0; memset(puVar8 + 1,0,local_38 - uVar7); } free(__ptr); } return iVar3; }
2,312
my_execvpe
bluesky950520[P]quickjs/quickjs-libc.c
static int my_execvpe(const char *filename, char **argv, char **envp) { char *path, *p, *p_next, *p1; char buf[PATH_MAX]; size_t filename_len, path_len; BOOL eacces_error; filename_len = strlen(filename); if (filename_len == 0) { errno = ENOENT; return -1; } if (strchr(filename, '/')) return execve(filename, argv, envp); path = getenv("PATH"); if (!path) path = (char *)"/bin:/usr/bin"; eacces_error = FALSE; p = path; for(p = path; p != NULL; p = p_next) { p1 = strchr(p, ':'); if (!p1) { p_next = NULL; path_len = strlen(p); } else { p_next = p1 + 1; path_len = p1 - p; } /* path too long */ if ((path_len + 1 + filename_len + 1) > PATH_MAX) continue; memcpy(buf, p, path_len); buf[path_len] = '/'; memcpy(buf + path_len + 1, filename, filename_len); buf[path_len + 1 + filename_len] = '\0'; execve(buf, argv, envp); switch(errno) { case EACCES: eacces_error = TRUE; break; case ENOENT: case ENOTDIR: break; default: return -1; } } if (eacces_error) errno = EACCES; return -1; }
O0
c
my_execvpe: subq $0x1068, %rsp # imm = 0x1068 movq %rdi, 0x1058(%rsp) movq %rsi, 0x1050(%rsp) movq %rdx, 0x1048(%rsp) movq 0x1058(%rsp), %rdi callq 0xe260 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x237c4 callq 0xe0b0 movl $0x2, (%rax) movl $0xffffffff, 0x1064(%rsp) # imm = 0xFFFFFFFF jmp 0x239db movq 0x1058(%rsp), %rdi movl $0x2f, %esi callq 0xe290 cmpq $0x0, %rax je 0x23805 movq 0x1058(%rsp), %rdi movq 0x1050(%rsp), %rsi movq 0x1048(%rsp), %rdx callq 0xe520 movl %eax, 0x1064(%rsp) jmp 0x239db leaq 0xecc3b(%rip), %rdi # 0x110447 callq 0xe040 movq %rax, 0x1040(%rsp) cmpq $0x0, 0x1040(%rsp) jne 0x23833 leaq 0xecc21(%rip), %rax # 0x11044c movq %rax, 0x1040(%rsp) movl $0x0, 0xc(%rsp) movq 0x1040(%rsp), %rax movq %rax, 0x1038(%rsp) movq 0x1040(%rsp), %rax movq %rax, 0x1038(%rsp) cmpq $0x0, 0x1038(%rsp) je 0x239be movq 0x1038(%rsp), %rdi movl $0x3a, %esi callq 0xe290 movq %rax, 0x1028(%rsp) cmpq $0x0, 0x1028(%rsp) jne 0x238af movq $0x0, 0x1030(%rsp) movq 0x1038(%rsp), %rdi callq 0xe260 movq %rax, 0x10(%rsp) jmp 0x238db movq 0x1028(%rsp), %rax addq $0x1, %rax movq %rax, 0x1030(%rsp) movq 0x1028(%rsp), %rax movq 0x1038(%rsp), %rcx subq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax addq $0x1, %rax addq 0x18(%rsp), %rax addq $0x1, %rax cmpq $0x1000, %rax # imm = 0x1000 jbe 0x238fa jmp 0x239a9 movq 0x1038(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x20(%rsp), %rdi movq %rdi, (%rsp) callq 0xe610 movq 0x10(%rsp), %rax movb $0x2f, 0x20(%rsp,%rax) movq 0x10(%rsp), %rax leaq 0x21(%rsp,%rax), %rdi movq 0x1058(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xe610 movq (%rsp), %rdi movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx addq %rcx, %rax movb $0x0, 0x21(%rsp,%rax) movq 0x1050(%rsp), %rsi movq 0x1048(%rsp), %rdx callq 0xe520 callq 0xe0b0 movl (%rax), %eax movl %eax, 0x8(%rsp) subl $0x2, %eax je 0x23998 jmp 0x23978 movl 0x8(%rsp), %eax subl $0xd, %eax je 0x2398e jmp 0x23983 movl 0x8(%rsp), %eax subl $0x14, %eax je 0x23998 jmp 0x2399a movl $0x1, 0xc(%rsp) jmp 0x239a7 jmp 0x239a7 movl $0xffffffff, 0x1064(%rsp) # imm = 0xFFFFFFFF jmp 0x239db jmp 0x239a9 movq 0x1030(%rsp), %rax movq %rax, 0x1038(%rsp) jmp 0x2385b cmpl $0x0, 0xc(%rsp) je 0x239d0 callq 0xe0b0 movl $0xd, (%rax) movl $0xffffffff, 0x1064(%rsp) # imm = 0xFFFFFFFF movl 0x1064(%rsp), %eax addq $0x1068, %rsp # imm = 0x1068 retq nopw (%rax,%rax)
my_execvpe: sub rsp, 1068h mov [rsp+1068h+var_10], rdi mov [rsp+1068h+var_18], rsi mov [rsp+1068h+var_20], rdx mov rdi, [rsp+1068h+var_10] call _strlen mov [rsp+1068h+var_1050], rax cmp [rsp+1068h+var_1050], 0 jnz short loc_237C4 call ___errno_location mov dword ptr [rax], 2 mov [rsp+1068h+var_4], 0FFFFFFFFh jmp loc_239DB loc_237C4: mov rdi, [rsp+1068h+var_10] mov esi, 2Fh ; '/' call _strchr cmp rax, 0 jz short loc_23805 mov rdi, [rsp+1068h+var_10] mov rsi, [rsp+1068h+var_18] mov rdx, [rsp+1068h+var_20] call _execve mov [rsp+1068h+var_4], eax jmp loc_239DB loc_23805: lea rdi, aPath; "PATH" call _getenv mov [rsp+1068h+var_28], rax cmp [rsp+1068h+var_28], 0 jnz short loc_23833 lea rax, aBinUsrBin; "/bin:/usr/bin" mov [rsp+1068h+var_28], rax loc_23833: mov [rsp+1068h+var_105C], 0 mov rax, [rsp+1068h+var_28] mov [rsp+1068h+var_30], rax mov rax, [rsp+1068h+var_28] mov [rsp+1068h+var_30], rax loc_2385B: cmp [rsp+1068h+var_30], 0 jz loc_239BE mov rdi, [rsp+1068h+var_30] mov esi, 3Ah ; ':' call _strchr mov [rsp+1068h+var_40], rax cmp [rsp+1068h+var_40], 0 jnz short loc_238AF mov [rsp+1068h+var_38], 0 mov rdi, [rsp+1068h+var_30] call _strlen mov [rsp+1068h+var_1058], rax jmp short loc_238DB loc_238AF: mov rax, [rsp+1068h+var_40] add rax, 1 mov [rsp+1068h+var_38], rax mov rax, [rsp+1068h+var_40] mov rcx, [rsp+1068h+var_30] sub rax, rcx mov [rsp+1068h+var_1058], rax loc_238DB: mov rax, [rsp+1068h+var_1058] add rax, 1 add rax, [rsp+1068h+var_1050] add rax, 1 cmp rax, 1000h jbe short loc_238FA jmp loc_239A9 loc_238FA: mov rsi, [rsp+1068h+var_30] mov rdx, [rsp+1068h+var_1058] lea rdi, [rsp+1068h+var_1048] mov [rsp+1068h+var_1068], rdi call _memcpy mov rax, [rsp+1068h+var_1058] mov [rsp+rax+1068h+var_1048], 2Fh ; '/' mov rax, [rsp+1068h+var_1058] lea rdi, [rsp+rax+1068h+var_1047] mov rsi, [rsp+1068h+var_10] mov rdx, [rsp+1068h+var_1050] call _memcpy mov rdi, [rsp+1068h+var_1068] mov rax, [rsp+1068h+var_1058] mov rcx, [rsp+1068h+var_1050] add rax, rcx mov [rsp+rax+1068h+var_1047], 0 mov rsi, [rsp+1068h+var_18] mov rdx, [rsp+1068h+var_20] call _execve call ___errno_location mov eax, [rax] mov [rsp+1068h+var_1060], eax sub eax, 2 jz short loc_23998 jmp short $+2 loc_23978: mov eax, [rsp+1068h+var_1060] sub eax, 0Dh jz short loc_2398E jmp short $+2 loc_23983: mov eax, [rsp+1068h+var_1060] sub eax, 14h jz short loc_23998 jmp short loc_2399A loc_2398E: mov [rsp+1068h+var_105C], 1 jmp short loc_239A7 loc_23998: jmp short loc_239A7 loc_2399A: mov [rsp+1068h+var_4], 0FFFFFFFFh jmp short loc_239DB loc_239A7: jmp short $+2 loc_239A9: mov rax, [rsp+1068h+var_38] mov [rsp+1068h+var_30], rax jmp loc_2385B loc_239BE: cmp [rsp+1068h+var_105C], 0 jz short loc_239D0 call ___errno_location mov dword ptr [rax], 0Dh loc_239D0: mov [rsp+1068h+var_4], 0FFFFFFFFh loc_239DB: mov eax, [rsp+1068h+var_4] add rsp, 1068h retn
long long my_execvpe(long long a1, long long a2, long long a3) { int v4; // [rsp+8h] [rbp-1060h] int v5; // [rsp+Ch] [rbp-105Ch] long long v6; // [rsp+10h] [rbp-1058h] long long v7; // [rsp+18h] [rbp-1050h] _BYTE v8[4104]; // [rsp+20h] [rbp-1048h] BYREF long long v9; // [rsp+1028h] [rbp-40h] long long v10; // [rsp+1030h] [rbp-38h] const char *i; // [rsp+1038h] [rbp-30h] const char *v12; // [rsp+1040h] [rbp-28h] long long v13; // [rsp+1048h] [rbp-20h] long long v14; // [rsp+1050h] [rbp-18h] long long v15; // [rsp+1058h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v7 = strlen(a1); if ( v7 ) { if ( strchr(v15, 47LL) ) { return (unsigned int)execve(v15, v14, v13); } else { v12 = (const char *)getenv("PATH"); if ( !v12 ) v12 = "/bin:/usr/bin"; v5 = 0; for ( i = v12; i; i = (const char *)v10 ) { v9 = strchr(i, 58LL); if ( v9 ) { v10 = v9 + 1; v6 = v9 - (_QWORD)i; } else { v10 = 0LL; v6 = strlen(i); } if ( (unsigned long long)(v7 + v6 + 1 + 1) <= 0x1000 ) { memcpy(v8, i, v6); v8[v6] = 47; memcpy(&v8[v6 + 1], v15, v7); v8[v7 + 1 + v6] = 0; execve(v8, v14, v13); v4 = *(_DWORD *)__errno_location(); if ( v4 != 2 ) { if ( v4 == 13 ) { v5 = 1; } else if ( v4 != 20 ) { return (unsigned int)-1; } } } } if ( v5 ) *(_DWORD *)__errno_location() = 13; return (unsigned int)-1; } } else { *(_DWORD *)__errno_location() = 2; return (unsigned int)-1; } }
my_execvpe: SUB RSP,0x1068 MOV qword ptr [RSP + 0x1058],RDI MOV qword ptr [RSP + 0x1050],RSI MOV qword ptr [RSP + 0x1048],RDX MOV RDI,qword ptr [RSP + 0x1058] CALL 0x0010e260 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001237c4 CALL 0x0010e0b0 MOV dword ptr [RAX],0x2 MOV dword ptr [RSP + 0x1064],0xffffffff JMP 0x001239db LAB_001237c4: MOV RDI,qword ptr [RSP + 0x1058] MOV ESI,0x2f CALL 0x0010e290 CMP RAX,0x0 JZ 0x00123805 MOV RDI,qword ptr [RSP + 0x1058] MOV RSI,qword ptr [RSP + 0x1050] MOV RDX,qword ptr [RSP + 0x1048] CALL 0x0010e520 MOV dword ptr [RSP + 0x1064],EAX JMP 0x001239db LAB_00123805: LEA RDI,[0x210447] CALL 0x0010e040 MOV qword ptr [RSP + 0x1040],RAX CMP qword ptr [RSP + 0x1040],0x0 JNZ 0x00123833 LEA RAX,[0x21044c] MOV qword ptr [RSP + 0x1040],RAX LAB_00123833: MOV dword ptr [RSP + 0xc],0x0 MOV RAX,qword ptr [RSP + 0x1040] MOV qword ptr [RSP + 0x1038],RAX MOV RAX,qword ptr [RSP + 0x1040] MOV qword ptr [RSP + 0x1038],RAX LAB_0012385b: CMP qword ptr [RSP + 0x1038],0x0 JZ 0x001239be MOV RDI,qword ptr [RSP + 0x1038] MOV ESI,0x3a CALL 0x0010e290 MOV qword ptr [RSP + 0x1028],RAX CMP qword ptr [RSP + 0x1028],0x0 JNZ 0x001238af MOV qword ptr [RSP + 0x1030],0x0 MOV RDI,qword ptr [RSP + 0x1038] CALL 0x0010e260 MOV qword ptr [RSP + 0x10],RAX JMP 0x001238db LAB_001238af: MOV RAX,qword ptr [RSP + 0x1028] ADD RAX,0x1 MOV qword ptr [RSP + 0x1030],RAX MOV RAX,qword ptr [RSP + 0x1028] MOV RCX,qword ptr [RSP + 0x1038] SUB RAX,RCX MOV qword ptr [RSP + 0x10],RAX LAB_001238db: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 ADD RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 CMP RAX,0x1000 JBE 0x001238fa JMP 0x001239a9 LAB_001238fa: MOV RSI,qword ptr [RSP + 0x1038] MOV RDX,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x20] MOV qword ptr [RSP],RDI CALL 0x0010e610 MOV RAX,qword ptr [RSP + 0x10] MOV byte ptr [RSP + RAX*0x1 + 0x20],0x2f MOV RAX,qword ptr [RSP + 0x10] LEA RDI,[RSP + RAX*0x1 + 0x21] MOV RSI,qword ptr [RSP + 0x1058] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0010e610 MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RAX,RCX MOV byte ptr [RSP + RAX*0x1 + 0x21],0x0 MOV RSI,qword ptr [RSP + 0x1050] MOV RDX,qword ptr [RSP + 0x1048] CALL 0x0010e520 CALL 0x0010e0b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x8],EAX SUB EAX,0x2 JZ 0x00123998 JMP 0x00123978 LAB_00123978: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0xd JZ 0x0012398e JMP 0x00123983 LAB_00123983: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0x14 JZ 0x00123998 JMP 0x0012399a LAB_0012398e: MOV dword ptr [RSP + 0xc],0x1 JMP 0x001239a7 LAB_00123998: JMP 0x001239a7 LAB_0012399a: MOV dword ptr [RSP + 0x1064],0xffffffff JMP 0x001239db LAB_001239a7: JMP 0x001239a9 LAB_001239a9: MOV RAX,qword ptr [RSP + 0x1030] MOV qword ptr [RSP + 0x1038],RAX JMP 0x0012385b LAB_001239be: CMP dword ptr [RSP + 0xc],0x0 JZ 0x001239d0 CALL 0x0010e0b0 MOV dword ptr [RAX],0xd LAB_001239d0: MOV dword ptr [RSP + 0x1064],0xffffffff LAB_001239db: MOV EAX,dword ptr [RSP + 0x1064] ADD RSP,0x1068 RET
int my_execvpe(char *param_1,char **param_2,char **param_3) { int iVar1; bool bVar2; size_t __n; int *piVar3; char *pcVar4; size_t local_1058; char local_1048 [4104]; char *local_40; char *local_38; char *local_30; char *local_28; char **local_20; char **local_18; char *local_10; int local_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; __n = strlen(param_1); if (__n == 0) { piVar3 = __errno_location(); *piVar3 = 2; local_4 = -1; } else { pcVar4 = strchr(local_10,0x2f); if (pcVar4 == (char *)0x0) { local_28 = getenv("PATH"); if (local_28 == (char *)0x0) { local_28 = "/bin:/usr/bin"; } bVar2 = false; local_30 = local_28; while (local_30 != (char *)0x0) { local_40 = strchr(local_30,0x3a); if (local_40 == (char *)0x0) { local_38 = (char *)0x0; local_1058 = strlen(local_30); } else { local_38 = local_40 + 1; local_1058 = (long)local_40 - (long)local_30; } if (local_1058 + __n + 2 < 0x1001) { memcpy(local_1048,local_30,local_1058); local_1048[local_1058] = '/'; memcpy(local_1048 + local_1058 + 1,local_10,__n); local_1048[local_1058 + __n + 1] = '\0'; execve(local_1048,local_18,local_20); piVar3 = __errno_location(); iVar1 = *piVar3; if (iVar1 != 2) { if (iVar1 == 0xd) { bVar2 = true; } else if (iVar1 != 0x14) { return -1; } } } local_30 = local_38; } if (bVar2) { piVar3 = __errno_location(); *piVar3 = 0xd; } local_4 = -1; } else { local_4 = execve(local_10,local_18,local_20); } } return local_4; }
2,313
mcp::sse_client::list_resources(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/src/mcp_sse_client.cpp
json sse_client::list_resources(const std::string& cursor) { json params = json::object(); if (!cursor.empty()) { params["cursor"] = cursor; } return send_request("resources/list", params).result; }
O0
cpp
mcp::sse_client::list_resources(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xf8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq %rdx, 0xe0(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0xc0(%rsp), %rdi callq 0xfa20 movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx leaq 0xd0(%rsp), %rdi callq 0xf9d0 movq 0xe0(%rsp), %rdi callq 0xbce0 testb $0x1, %al jne 0x82c2a movq 0xe0(%rsp), %rsi leaq 0xb0(%rsp), %rdi callq 0x87030 jmp 0x82baf leaq 0x505ac(%rip), %rsi # 0xd3162 leaq 0xd0(%rsp), %rdi callq 0xfa70 movq %rax, 0x8(%rsp) jmp 0x82bca movq 0x8(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x863e0 leaq 0xb0(%rsp), %rdi callq 0xfa40 jmp 0x82c2a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0x82cfa movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0xb0(%rsp), %rdi callq 0xfa40 jmp 0x82cfa leaq 0x2f(%rsp), %rdi movq %rdi, (%rsp) callq 0xbe20 movq (%rsp), %rdx leaq 0x50526(%rip), %rsi # 0xd3169 leaq 0x30(%rsp), %rdi callq 0xf160 jmp 0x82c4f movq 0x20(%rsp), %rsi movq (%rsi), %rax movq 0x28(%rax), %rax leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx leaq 0xd0(%rsp), %rcx callq *%rax jmp 0x82c71 movq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rsi addq $0x30, %rsi callq 0x6b720 leaq 0x50(%rsp), %rdi callq 0x86960 leaq 0x30(%rsp), %rdi callq 0xbfb0 leaq 0x2f(%rsp), %rdi callq 0xb8e0 leaq 0xd0(%rsp), %rdi callq 0xfa40 movq 0x18(%rsp), %rax addq $0xf8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) jmp 0x82cf0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa8(%rsp) movl %eax, 0xa4(%rsp) leaq 0x30(%rsp), %rdi callq 0xbfb0 leaq 0x2f(%rsp), %rdi callq 0xb8e0 leaq 0xd0(%rsp), %rdi callq 0xfa40 movq 0xa8(%rsp), %rdi callq 0xbe10 nopw %cs:(%rax,%rax)
_ZN3mcp10sse_client14list_resourcesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0F8h mov [rsp+0F8h+var_E8], rdi mov rax, rdi mov [rsp+0F8h+var_E0], rax mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov [rsp+0F8h+var_18], rdx mov rax, [rsp+0F8h+var_10] mov [rsp+0F8h+var_D8], rax lea rdi, [rsp+0F8h+var_38] call _ZNSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEEC2Ev; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>::initializer_list(void) mov rsi, qword ptr [rsp+0F8h+var_38]; int mov rdx, qword ptr [rsp+0F8h+var_30]; int lea rdi, [rsp+0F8h+var_28]; int call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6objectESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::object(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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 rdi, [rsp+0F8h+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_82C2A mov rsi, [rsp+0F8h+var_18] lea rdi, [rsp+0F8h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ jmp short $+2 loc_82BAF: lea rsi, aCursor; "cursor" lea rdi, [rsp+0F8h+var_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov [rsp+0F8h+var_F0], rax jmp short $+2 loc_82BCA: mov rdi, [rsp+0F8h+var_F0] lea rsi, [rsp+0F8h+var_48] 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>) lea rdi, [rsp+0F8h+var_48] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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() jmp short loc_82C2A mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp loc_82CFA mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_A8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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() jmp loc_82CFA loc_82C2A: lea rdi, [rsp+0F8h+var_C9] mov [rsp+0F8h+var_F8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0F8h+var_F8] lea rsi, aResourcesList; "resources/list" lea rdi, [rsp+0F8h+var_C8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_82C4F: mov rsi, [rsp+0F8h+var_D8] mov rax, [rsi] mov rax, [rax+28h] lea rdi, [rsp+0F8h+var_A8] lea rdx, [rsp+0F8h+var_C8] lea rcx, [rsp+0F8h+var_28] call rax jmp short $+2 loc_82C71: mov rdi, [rsp+0F8h+var_E8] lea rsi, [rsp+0F8h+var_A8] add rsi, 30h ; '0' call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; 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>&&) lea rdi, [rsp+0F8h+var_A8]; this call _ZN3mcp8responseD2Ev; mcp::response::~response() lea rdi, [rsp+0F8h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0F8h+var_C9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+0F8h+var_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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() mov rax, [rsp+0F8h+var_E0] add rsp, 0F8h retn mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax jmp short loc_82CF0 mov rcx, rax mov eax, edx mov [rsp+arg_A0], rcx mov [rsp+arg_9C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_82CF0: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_82CFA: lea rdi, [rsp+arg_C8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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() mov rdi, [rsp+arg_A0] call __Unwind_Resume
_OWORD * mcp::sse_client::list_resources(_OWORD *a1, long long a2, long long a3) { _BYTE *v3; // rsi long long v4; // rdx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rdx long long v10; // [rsp+8h] [rbp-F0h] char v12; // [rsp+2Fh] [rbp-C9h] BYREF _BYTE v13[32]; // [rsp+30h] [rbp-C8h] BYREF _BYTE v14[48]; // [rsp+50h] [rbp-A8h] BYREF long long v15; // [rsp+80h] [rbp-78h] BYREF _BYTE v16[16]; // [rsp+B0h] [rbp-48h] BYREF int v17[2]; // [rsp+C0h] [rbp-38h] BYREF int v18[2]; // [rsp+C8h] [rbp-30h] int v19[4]; // [rsp+D0h] [rbp-28h] BYREF long long v20; // [rsp+E0h] [rbp-18h] long long v21; // [rsp+E8h] [rbp-10h] _OWORD *v22; // [rsp+F0h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>::initializer_list(v17); v3 = *(_BYTE **)v17; 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>::object( (long long)v19, *(long long *)v17, *(long long *)v18); if ( (std::string::empty(v20) & 1) == 0 ) { ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_( (unsigned int)v16, v20, v4, v5, v6, v7); v10 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( (long long)v19, (long long)"cursor", v8); v3 = v16; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(v10); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v16); } std::allocator<char>::allocator(&v12, v3, v4); std::string::basic_string<std::allocator<char>>((long long)v13, (long long)"resources/list", (long long)&v12); (*(void ( **)(_BYTE *, long long, _BYTE *, int *))(*(_QWORD *)a2 + 40LL))(v14, a2, v13, v19); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, (long long)&v15); mcp::response::~response((mcp::response *)v14); std::string::~string(v13); std::allocator<char>::~allocator(&v12); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v19); return a1; }
list_resources: SUB RSP,0xf8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xf0],RDI MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xe0],RDX MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x20],RAX LEA RDI,[RSP + 0xc0] CALL 0x0010fa20 MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] LEA RDI,[RSP + 0xd0] CALL 0x0010f9d0 MOV RDI,qword ptr [RSP + 0xe0] CALL 0x0010bce0 TEST AL,0x1 JNZ 0x00182c2a MOV RSI,qword ptr [RSP + 0xe0] LAB_00182ba0: LEA RDI,[RSP + 0xb0] CALL 0x00187030 JMP 0x00182baf LAB_00182baf: LEA RSI,[0x1d3162] LEA RDI,[RSP + 0xd0] CALL 0x0010fa70 MOV qword ptr [RSP + 0x8],RAX JMP 0x00182bca LAB_00182bca: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xb0] CALL 0x001863e0 LEA RDI,[RSP + 0xb0] CALL 0x0010fa40 JMP 0x00182c2a LAB_00182c2a: LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP] LAB_00182c3c: LEA RSI,[0x1d3169] LEA RDI,[RSP + 0x30] CALL 0x0010f160 JMP 0x00182c4f LAB_00182c4f: MOV RSI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x28] LAB_00182c5b: LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0xd0] CALL RAX LAB_00182c6f: JMP 0x00182c71 LAB_00182c71: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x50] ADD RSI,0x30 CALL 0x0016b720 LEA RDI,[RSP + 0x50] CALL 0x00186960 LEA RDI,[RSP + 0x30] CALL 0x0010bfb0 LEA RDI,[RSP + 0x2f] CALL 0x0010b8e0 LEA RDI,[RSP + 0xd0] CALL 0x0010fa40 MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xf8 RET
/* mcp::sse_client::list_resources(std::__cxx11::string const&) */ string * mcp::sse_client::list_resources(string *param_1) { ulong uVar1; basic_json *pbVar2; int8 in_RDX; long *in_RSI; allocator local_c9; string local_c8 [32]; response local_a8 [48]; basic_json abStack_78 [48]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_48 [16]; int8 local_38; int8 local_30; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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]; int8 local_18; string *local_8; local_18 = in_RDX; local_8 = param_1; std:: initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>> ::initializer_list((initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>> *)&local_38); 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> ::object(local_28,local_38,local_30); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { /* try { // try from 00182ba0 to 00182bac has its CatchHandler @ 00182beb */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ (local_48,local_18); /* try { // try from 00182baf to 00182bc2 has its CatchHandler @ 00182c04 */ pbVar2 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(local_28,"cursor"); 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=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,local_48); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_48); } std::allocator<char>::allocator(); /* try { // try from 00182c3c to 00182c4c has its CatchHandler @ 00182cbc */ std::__cxx11::string::string<std::allocator<char>>(local_c8,"resources/list",&local_c9); /* try { // try from 00182c5b to 00182c6e has its CatchHandler @ 00182cd2 */ (**(code **)(*in_RSI + 0x28))(local_a8,in_RSI,local_c8,local_28); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,abStack_78); response::~response(local_a8); std::__cxx11::string::~string(local_c8); std::allocator<char>::~allocator((allocator<char> *)&local_c9); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_28); return param_1; }
2,314
mcp::sse_client::list_resources(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/src/mcp_sse_client.cpp
json sse_client::list_resources(const std::string& cursor) { json params = json::object(); if (!cursor.empty()) { params["cursor"] = cursor; } return send_request("resources/list", params).result; }
O2
cpp
mcp::sse_client::list_resources(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0xa0, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x9ca8 cmpq $0x0, 0x8(%r15) je 0x10dda leaq 0x20(%rsp), %rdi movq %r15, %rsi callq 0x12a22 leaq 0x28dcd(%rip), %rsi # 0x39b7b leaq 0x10(%rsp), %rdi callq 0x9cbc movb (%rax), %cl leaq 0x20(%rsp), %rdi movb (%rdi), %dl movb %dl, (%rax) movb %cl, (%rdi) movq 0x8(%rax), %rcx movq 0x8(%rdi), %rdx movq %rdx, 0x8(%rax) movq %rcx, 0x8(%rdi) callq 0xa80c leaq 0x28da1(%rip), %rsi # 0x39b82 leaq 0x30(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x99ce movq (%r14), %rax leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rdx leaq 0x10(%rsp), %rcx movq %r14, %rsi callq *0x28(%rax) leaq 0x50(%rsp), %rdi movups 0x30(%rdi), %xmm0 movups %xmm0, (%rbx) movb $0x0, 0x30(%rdi) andq $0x0, 0x38(%rdi) callq 0x1278a leaq 0x30(%rsp), %rdi callq 0x8b18 leaq 0x10(%rsp), %rdi callq 0xa80c movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xa80c jmp 0x10e69 jmp 0x10e66 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x8b18 jmp 0x10e69 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0xa80c movq %rbx, %rdi callq 0x89c0 nop
_ZN3mcp10sse_client14list_resourcesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 0A0h mov r15, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+0B8h+var_A8] xor esi, esi xor edx, edx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6objectESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::object(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>) cmp qword ptr [r15+8], 0 jz short loc_10DDA lea rdi, [rsp+0B8h+var_98] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ lea rsi, aCursor; "cursor" lea rdi, [rsp+0B8h+var_A8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) mov cl, [rax] lea rdi, [rsp+0B8h+var_98] mov dl, [rdi] mov [rax], dl mov [rdi], cl mov rcx, [rax+8] mov rdx, [rdi+8] mov [rax+8], rdx mov [rdi+8], rcx 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_10DDA: lea rsi, aResourcesList; "resources/list" lea rdi, [rsp+0B8h+var_88] lea rdx, [rsp+0B8h+var_A9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, [r14] lea rdi, [rsp+0B8h+var_68] lea rdx, [rsp+0B8h+var_88] lea rcx, [rsp+0B8h+var_A8] mov rsi, r14 call qword ptr [rax+28h] lea rdi, [rsp+0B8h+var_68]; this movups xmm0, xmmword ptr [rdi+30h] movups xmmword ptr [rbx], xmm0 mov byte ptr [rdi+30h], 0 and qword ptr [rdi+38h], 0 call _ZN3mcp8responseD2Ev; mcp::response::~response() lea rdi, [rsp+0B8h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_A8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_18] 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_10E69 jmp short loc_10E66 mov rbx, rax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_10E69 loc_10E66: mov rbx, rax loc_10E69: lea rdi, [rsp+arg_8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
_OWORD * mcp::sse_client::list_resources(_OWORD *a1, long long a2, long long a3) { long long v4; // rax char v5; // cl long long v6; // rcx _BYTE v8[16]; // [rsp+10h] [rbp-A8h] BYREF _BYTE v9[8]; // [rsp+20h] [rbp-98h] BYREF long long v10; // [rsp+28h] [rbp-90h] _QWORD v11[4]; // [rsp+30h] [rbp-88h] BYREF _BYTE v12[48]; // [rsp+50h] [rbp-68h] BYREF __int128 v13; // [rsp+80h] [rbp-38h] 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>::object( (long long)v8, 0LL, 0LL); if ( *(_QWORD *)(a3 + 8) ) { ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_( v9, a3); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( (long long)v8, (long long)"cursor"); v5 = *(_BYTE *)v4; *(_BYTE *)v4 = v9[0]; v9[0] = v5; v6 = *(_QWORD *)(v4 + 8); *(_QWORD *)(v4 + 8) = v10; v10 = v6; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v9); } std::string::basic_string<std::allocator<char>>(v11, (long long)"resources/list"); (*(void ( **)(_BYTE *, long long, _QWORD *, _BYTE *))(*(_QWORD *)a2 + 40LL))(v12, a2, v11, v8); *a1 = v13; LOBYTE(v13) = 0; *((_QWORD *)&v13 + 1) = 0LL; mcp::response::~response((mcp::response *)v12); std::string::~string(v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8); return a1; }
list_resources: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa0 MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x10] XOR ESI,ESI XOR EDX,EDX CALL 0x00109ca8 CMP qword ptr [R15 + 0x8],0x0 JZ 0x00110dda LAB_00110d9a: LEA RDI,[RSP + 0x20] MOV RSI,R15 CALL 0x00112a22 LAB_00110da7: LEA RSI,[0x139b7b] LEA RDI,[RSP + 0x10] CALL 0x00109cbc MOV CL,byte ptr [RAX] LEA RDI,[RSP + 0x20] MOV DL,byte ptr [RDI] MOV byte ptr [RAX],DL MOV byte ptr [RDI],CL MOV RCX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RDI + 0x8],RCX CALL 0x0010a80c LAB_00110dda: LEA RSI,[0x139b82] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0xf] CALL 0x001099ce MOV RAX,qword ptr [R14] LAB_00110df3: LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x30] LEA RCX,[RSP + 0x10] MOV RSI,R14 CALL qword ptr [RAX + 0x28] LAB_00110e08: LEA RDI,[RSP + 0x50] MOVUPS XMM0,xmmword ptr [RDI + 0x30] MOVUPS xmmword ptr [RBX],XMM0 MOV byte ptr [RDI + 0x30],0x0 AND qword ptr [RDI + 0x38],0x0 CALL 0x0011278a LEA RDI,[RSP + 0x30] CALL 0x00108b18 LEA RDI,[RSP + 0x10] CALL 0x0010a80c MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP R15 RET
/* mcp::sse_client::list_resources(std::__cxx11::string const&) */ string * mcp::sse_client::list_resources(string *param_1) { basic_json bVar1; int8 uVar2; basic_json *pbVar3; long in_RDX; long *in_RSI; allocator local_a9; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_a8 [16]; basic_json local_98 [8]; int8 local_90; string local_88 [32]; response local_68 [48]; int1 local_38; int7 uStack_37; int8 uStack_30; 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> ::object(local_a8,0,0); if (*(long *)(in_RDX + 8) != 0) { /* try { // try from 00110d9a to 00110da6 has its CatchHandler @ 00110e55 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ (local_98); /* try { // try from 00110da7 to 00110db7 has its CatchHandler @ 00110e46 */ pbVar3 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const>(local_a8,"cursor"); bVar1 = *pbVar3; *pbVar3 = local_98[0]; uVar2 = *(int8 *)(pbVar3 + 8); *(int8 *)(pbVar3 + 8) = local_90; local_98[0] = bVar1; local_90 = uVar2; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_98); } /* try { // try from 00110dda to 00110def has its CatchHandler @ 00110e66 */ std::__cxx11::string::string<std::allocator<char>>(local_88,"resources/list",&local_a9); /* try { // try from 00110df3 to 00110e07 has its CatchHandler @ 00110e57 */ (**(code **)(*in_RSI + 0x28))(local_68); *(ulong *)param_1 = CONCAT71(uStack_37,local_38); *(int8 *)(param_1 + 8) = uStack_30; local_38 = 0; uStack_30 = 0; response::~response(local_68); std::__cxx11::string::~string(local_88); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_a8); return param_1; }
2,315
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; }
O0
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x6df60 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x72fda movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x6e680 jmp 0x72ef1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x72f35 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF shrl $0x8, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x72f76 cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF jbe 0x72fc4 jmp 0x72f82 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x72fc4 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x72eba movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_72EBA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 jle loc_72FDA mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_72EF1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_72F35: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh shr ecx, 8 mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_72F76: cmp [rbp+var_30], 0FFFFh jbe short loc_72FC4 jmp short $+2 loc_72F82: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_72FC4: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_72EBA loc_72FDA: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] _QWORD *v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF _QWORD *v15; // [rsp+38h] [rbp-28h] long long *v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v12 = a3 + a2; v11 = *(_QWORD **)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6); if ( v13 <= 0 ) break; my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12)); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; if ( v14 > 0xFFFF ) { v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F)); v7 += 3LL; } v18 += v13; } *v16 = v9; result = v15; *v15 = v7; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_00172eba: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x0016df60 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x00172fda MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x0016e680 JMP 0x00172ef1 LAB_00172ef1: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00172f35 LAB_00172f35: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff SHR ECX,0x8 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00172f76 LAB_00172f76: CMP qword ptr [RBP + -0x30],0xffff JBE 0x00172fc4 JMP 0x00172f82 LAB_00172f82: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00172fc4 LAB_00172fc4: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x00172eba LAB_00172fda: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; long lVar2; int iVar3; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); if (iVar3 < 1) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 6; if (0xffff < local_38) { local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 9; } local_60 = lVar2; local_18 = local_18 + iVar3; } *local_28 = local_58; *local_30 = local_60; return; }
2,316
list_reverse
eloqsql/libmariadb/libmariadb/ma_list.c
LIST *list_reverse(LIST *root) { LIST *last; last=root; while (root) { last=root; root=root->next; last->next=last->prev; last->prev=root; } return last; }
O3
c
list_reverse: testq %rdi, %rdi je 0x1f4bc pushq %rbp movq %rsp, %rbp movq %rdi, %rax movq (%rdi), %rcx movq 0x8(%rdi), %rdi movq %rcx, 0x8(%rax) movq %rdi, (%rax) testq %rdi, %rdi jne 0x1f4a4 popq %rbp retq xorl %eax, %eax retq
list_reverse: test rdi, rdi jz short loc_1F4BC push rbp mov rbp, rsp loc_1F4A4: mov rax, rdi mov rcx, [rdi] mov rdi, [rdi+8] mov [rax+8], rcx mov [rax], rdi test rdi, rdi jnz short loc_1F4A4 pop rbp retn loc_1F4BC: xor eax, eax retn
_QWORD * list_reverse(_QWORD *a1) { _QWORD *result; // rax long long v2; // rcx if ( !a1 ) return 0LL; do { result = a1; v2 = *a1; a1 = (_QWORD *)a1[1]; result[1] = v2; *result = a1; } while ( a1 ); return result; }
list_reverse: TEST RDI,RDI JZ 0x0011f4bc PUSH RBP MOV RBP,RSP LAB_0011f4a4: MOV RAX,RDI MOV RCX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX],RDI TEST RDI,RDI JNZ 0x0011f4a4 POP RBP RET LAB_0011f4bc: XOR EAX,EAX RET
int8 * list_reverse(int8 *param_1) { int8 *puVar1; int8 *puVar2; if (param_1 == (int8 *)0x0) { return (int8 *)0x0; } do { puVar2 = param_1; puVar1 = (int8 *)param_1[1]; param_1[1] = *param_1; *param_1 = puVar1; param_1 = puVar1; } while (puVar1 != (int8 *)0x0); return puVar2; }
2,317
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double)
monkey531[P]llama/common/./json.hpp
void dump_float(number_float_t x) { // NaN / inf if (!std::isfinite(x)) { o->write_characters("null", 4); return; } // If number_float_t is an IEEE-754 single or double precision number, // use the Grisu2 algorithm to produce short numbers which are // guaranteed to round-trip, using strtof and strtod, resp. // // NB: The test below works if <long double> == <double>. static constexpr bool is_ieee_single_or_double = (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) || (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024); dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>()); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double): movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jl 0x67cd4 movq (%rdi), %rdi movq (%rdi), %rax movq 0x8(%rax), %rax leaq 0x9d3ef(%rip), %rsi # 0x104db3 pushq $0x4 popq %rdx jmpq *%rax nop
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd: movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jl _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump_float(double,std::integral_constant<bool,true>) mov rdi, [rdi] mov rax, [rdi] mov rax, [rax+8] lea rsi, aOnNull_0+5; "null" push 4 pop rdx jmp rax
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float( _QWORD *a1, double a2) { if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL ) return nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump_float(); else return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL); }
dump_float: MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JL 0x00167cd4 MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x8] LEA RSI,[0x204db3] PUSH 0x4 POP RDX JMP RAX
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::dump_float(double) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::dump_float(serializer<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,double param_1) { serializer<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>> *psVar1; code *UNRECOVERED_JUMPTABLE; char *pcVar2; if (0x7fefffffffffffff < (ulong)ABS(param_1)) { /* WARNING: Could not recover jumptable at 0x001679c7. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(**(long **)this + 8))(*(long **)this,"null",4); return; } psVar1 = this + 0x10; pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1); UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8); /* WARNING: Could not recover jumptable at 0x00167d05. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE); return; }
2,318
get_default_values
eloqsql/client/mysql_plugin.c
static int get_default_values() { char tool_path[FN_REFLEN]; char defaults_cmd[FN_REFLEN]; char defaults_file[FN_REFLEN]; char line[FN_REFLEN]; int error= 0; int ret= 0; FILE *file= 0; memset(tool_path, 0, FN_REFLEN); if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path))) goto exit; else { if ((error= make_tempfile(defaults_file, "txt"))) goto exit; #ifdef _WIN32 { char *format_str= 0; if (has_spaces(tool_path) || has_spaces(defaults_file)) format_str = "\"%s --mysqld > %s\""; else format_str = "%s --mysqld > %s"; snprintf(defaults_cmd, sizeof(defaults_cmd), format_str, add_quotes(tool_path), add_quotes(defaults_file)); if (opt_verbose) { printf("# my_print_defaults found: %s\n", tool_path); } } #else snprintf(defaults_cmd, sizeof(defaults_cmd), "%s --mysqld > %s", tool_path, defaults_file); #endif /* Execute the command */ if (opt_verbose) { printf("# Command: %s\n", defaults_cmd); } error= run_command(defaults_cmd, "r"); if (error) { fprintf(stderr, "ERROR: my_print_defaults failed. Error code: %d.\n", ret); goto exit; } /* Now open the file and read the defaults we want. */ file= fopen(defaults_file, "r"); if (file == NULL) { fprintf(stderr, "ERROR: failed to open file %s: %s.\n", defaults_file, strerror(errno)); goto exit; } while (fgets(line, FN_REFLEN, file) != NULL) { char *value= 0; if ((opt_datadir == 0) && ((value= get_value(line, "--datadir")))) { opt_datadir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_basedir == 0) && ((value= get_value(line, "--basedir")))) { opt_basedir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_plugin_dir == 0) && ((value= get_value(line, "--plugin_dir")) || (value= get_value(line, "--plugin-dir")))) { opt_plugin_dir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_lc_messages_dir == 0) && ((value= get_value(line, "--lc_messages_dir")) || (value= get_value(line, "--lc_messages-dir")) || (value= get_value(line, "--lc-messages_dir")) || (value= get_value(line, "--lc-messages-dir")))) { opt_lc_messages_dir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } } } exit: if (file) { fclose(file); /* Remove file */ my_delete(defaults_file, MYF(0)); } return error; }
O0
c
get_default_values: pushq %rbp movq %rsp, %rbp subq $0x840, %rsp # imm = 0x840 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl $0x0, -0x814(%rbp) movl $0x0, -0x818(%rbp) movq $0x0, -0x820(%rbp) leaq -0x210(%rbp), %rdi xorl %esi, %esi movl $0x200, %edx # imm = 0x200 callq 0x251d0 leaq -0x210(%rbp), %rsi leaq 0x5ba41(%rip), %rdi # 0x82569 callq 0x25bd0 movl %eax, -0x814(%rbp) cmpl $0x0, %eax je 0x26b3d jmp 0x26e2a leaq -0x610(%rbp), %rdi leaq 0x5ba30(%rip), %rsi # 0x8257b callq 0x26e90 movl %eax, -0x814(%rbp) cmpl $0x0, %eax je 0x26b60 jmp 0x26e2a leaq -0x410(%rbp), %rdi leaq -0x210(%rbp), %rcx leaq -0x610(%rbp), %r8 movl $0x200, %esi # imm = 0x200 leaq 0x5b9fe(%rip), %rdx # 0x8257f movb $0x0, %al callq 0x255e0 cmpl $0x0, 0x36a4e1(%rip) # 0x391070 je 0x26ba6 leaq -0x410(%rbp), %rsi leaq 0x5b9f1(%rip), %rdi # 0x82590 movb $0x0, %al callq 0x25050 leaq -0x410(%rbp), %rdi leaq 0x5cfbb(%rip), %rsi # 0x83b6f callq 0x26f10 movl %eax, -0x814(%rbp) cmpl $0x0, -0x814(%rbp) je 0x26beb movq 0x1b2409(%rip), %rax # 0x1d8fd8 movq (%rax), %rdi movl -0x818(%rbp), %edx leaq 0x5b9c0(%rip), %rsi # 0x8259f movb $0x0, %al callq 0x254d0 jmp 0x26e2a leaq -0x610(%rbp), %rdi leaq 0x5cf76(%rip), %rsi # 0x83b6f callq 0x253a0 movq %rax, -0x820(%rbp) cmpq $0x0, -0x820(%rbp) jne 0x26c5e movq 0x1b23c2(%rip), %rax # 0x1d8fd8 movq (%rax), %rax movq %rax, -0x838(%rbp) leaq -0x610(%rbp), %rax movq %rax, -0x830(%rbp) callq 0x25040 movl (%rax), %edi callq 0x250f0 movq -0x838(%rbp), %rdi movq -0x830(%rbp), %rdx movq %rax, %rcx leaq 0x5b97f(%rip), %rsi # 0x825d1 movb $0x0, %al callq 0x254d0 jmp 0x26e2a jmp 0x26c60 leaq -0x810(%rbp), %rdi movq -0x820(%rbp), %rdx movl $0x200, %esi # imm = 0x200 callq 0x255c0 cmpq $0x0, %rax je 0x26e26 movq $0x0, -0x828(%rbp) cmpq $0x0, 0x36a403(%rip) # 0x391098 jne 0x26cd1 leaq -0x810(%rbp), %rdi leaq 0x5b950(%rip), %rsi # 0x825f5 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax je 0x26cd1 movq -0x828(%rbp), %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2e4e0 movq %rax, 0x36a3c7(%rip) # 0x391098 cmpq $0x0, 0x36a3a7(%rip) # 0x391080 jne 0x26d15 leaq -0x810(%rbp), %rdi leaq 0x5b916(%rip), %rsi # 0x825ff callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax je 0x26d15 movq -0x828(%rbp), %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2e4e0 movq %rax, 0x36a36b(%rip) # 0x391080 cmpq $0x0, 0x36a373(%rip) # 0x391090 jne 0x26d79 leaq -0x810(%rbp), %rdi leaq 0x5b8dc(%rip), %rsi # 0x82609 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax jne 0x26d5f leaq -0x810(%rbp), %rdi leaq 0x5b8c9(%rip), %rsi # 0x82616 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax je 0x26d79 movq -0x828(%rbp), %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2e4e0 movq %rax, 0x36a317(%rip) # 0x391090 cmpq $0x0, 0x36a327(%rip) # 0x3910a8 jne 0x26e21 leaq -0x810(%rbp), %rdi leaq 0x5b88e(%rip), %rsi # 0x82623 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax jne 0x26e07 leaq -0x810(%rbp), %rdi leaq 0x5b880(%rip), %rsi # 0x82635 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax jne 0x26e07 leaq -0x810(%rbp), %rdi leaq 0x5b872(%rip), %rsi # 0x82647 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax jne 0x26e07 leaq -0x810(%rbp), %rdi leaq 0x5b864(%rip), %rsi # 0x82659 callq 0x27020 movq %rax, -0x828(%rbp) cmpq $0x0, %rax je 0x26e21 movq -0x828(%rbp), %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2e4e0 movq %rax, 0x36a287(%rip) # 0x3910a8 jmp 0x26c60 jmp 0x26e28 jmp 0x26e2a cmpq $0x0, -0x820(%rbp) je 0x26e50 movq -0x820(%rbp), %rdi callq 0x25320 leaq -0x610(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x28dc0 movl -0x814(%rbp), %eax movl %eax, -0x83c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x26e7d movl -0x83c(%rbp), %eax addq $0x840, %rsp # imm = 0x840 popq %rbp retq callq 0x25390 nopw %cs:(%rax,%rax)
get_default_values: push rbp mov rbp, rsp sub rsp, 840h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_814], 0 mov [rbp+var_818], 0 mov [rbp+var_820], 0 lea rdi, [rbp+var_210] xor esi, esi mov edx, 200h call _memset lea rsi, [rbp+var_210] lea rdi, aMyPrintDefault_0; "my_print_defaults" call find_tool mov [rbp+var_814], eax cmp eax, 0 jz short loc_26B3D jmp loc_26E2A loc_26B3D: lea rdi, [rbp+var_610] lea rsi, aTxt; "txt" call make_tempfile mov [rbp+var_814], eax cmp eax, 0 jz short loc_26B60 jmp loc_26E2A loc_26B60: lea rdi, [rbp+var_410] lea rcx, [rbp+var_210] lea r8, [rbp+var_610] mov esi, 200h lea rdx, aSMysqldS; "%s --mysqld > %s" mov al, 0 call _snprintf cmp cs:opt_verbose, 0 jz short loc_26BA6 lea rsi, [rbp+var_410] lea rdi, aCommandS; "# Command: %s\n" mov al, 0 call _printf loc_26BA6: lea rdi, [rbp+var_410] lea rsi, aKoi8r+4; "r" call run_command mov [rbp+var_814], eax cmp [rbp+var_814], 0 jz short loc_26BEB mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_818] lea rsi, aErrorMyPrintDe; "ERROR: my_print_defaults failed. Error "... mov al, 0 call _fprintf jmp loc_26E2A loc_26BEB: lea rdi, [rbp+var_610] lea rsi, aKoi8r+4; "r" call _fopen64 mov [rbp+var_820], rax cmp [rbp+var_820], 0 jnz short loc_26C5E mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_838], rax lea rax, [rbp+var_610] mov [rbp+var_830], rax call ___errno_location mov edi, [rax] call _strerror mov rdi, [rbp+var_838] mov rdx, [rbp+var_830] mov rcx, rax lea rsi, aErrorFailedToO; "ERROR: failed to open file %s: %s.\n" mov al, 0 call _fprintf jmp loc_26E2A loc_26C5E: jmp short $+2 loc_26C60: lea rdi, [rbp+var_810] mov rdx, [rbp+var_820] mov esi, 200h call _fgets cmp rax, 0 jz loc_26E26 mov [rbp+var_828], 0 cmp cs:opt_datadir, 0 jnz short loc_26CD1 lea rdi, [rbp+var_810] lea rsi, aDatadir_0; "--datadir" call get_value mov [rbp+var_828], rax cmp rax, 0 jz short loc_26CD1 mov rsi, [rbp+var_828] xor edi, edi mov edx, 8 call my_strdup mov cs:opt_datadir, rax loc_26CD1: cmp cs:opt_basedir, 0 jnz short loc_26D15 lea rdi, [rbp+var_810] lea rsi, aBasedir_0; "--basedir" call get_value mov [rbp+var_828], rax cmp rax, 0 jz short loc_26D15 mov rsi, [rbp+var_828] xor edi, edi mov edx, 8 call my_strdup mov cs:opt_basedir, rax loc_26D15: cmp cs:opt_plugin_dir, 0 jnz short loc_26D79 lea rdi, [rbp+var_810] lea rsi, aPluginDir_0; "--plugin_dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jnz short loc_26D5F lea rdi, [rbp+var_810] lea rsi, aPluginDir_1; "--plugin-dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jz short loc_26D79 loc_26D5F: mov rsi, [rbp+var_828] xor edi, edi mov edx, 8 call my_strdup mov cs:opt_plugin_dir, rax loc_26D79: cmp cs:opt_lc_messages_dir, 0 jnz loc_26E21 lea rdi, [rbp+var_810] lea rsi, aLcMessagesDir; "--lc_messages_dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jnz short loc_26E07 lea rdi, [rbp+var_810] lea rsi, aLcMessagesDir_0; "--lc_messages-dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jnz short loc_26E07 lea rdi, [rbp+var_810] lea rsi, aLcMessagesDir_1; "--lc-messages_dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jnz short loc_26E07 lea rdi, [rbp+var_810] lea rsi, aLcMessagesDir_2; "--lc-messages-dir" call get_value mov [rbp+var_828], rax cmp rax, 0 jz short loc_26E21 loc_26E07: mov rsi, [rbp+var_828] xor edi, edi mov edx, 8 call my_strdup mov cs:opt_lc_messages_dir, rax loc_26E21: jmp loc_26C60 loc_26E26: jmp short $+2 loc_26E28: jmp short $+2 loc_26E2A: cmp [rbp+var_820], 0 jz short loc_26E50 mov rdi, [rbp+var_820] call _fclose lea rdi, [rbp+var_610] xor eax, eax mov esi, eax call my_delete loc_26E50: mov eax, [rbp+var_814] mov [rbp+var_83C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_26E7D mov eax, [rbp+var_83C] add rsp, 840h pop rbp retn loc_26E7D: call ___stack_chk_fail
long long get_default_values() { long long v0; // rdx long long v1; // rcx long long v2; // r8 long long v3; // r9 unsigned int *v4; // rax const char *v5; // rax long long v7; // [rsp+8h] [rbp-838h] long long value; // [rsp+18h] [rbp-828h] long long v9; // [rsp+18h] [rbp-828h] long long v10; // [rsp+18h] [rbp-828h] long long v11; // [rsp+18h] [rbp-828h] long long v12; // [rsp+20h] [rbp-820h] unsigned int tool; // [rsp+2Ch] [rbp-814h] _BYTE v14[512]; // [rsp+30h] [rbp-810h] BYREF char v15[512]; // [rsp+230h] [rbp-610h] BYREF char v16[512]; // [rsp+430h] [rbp-410h] BYREF char v17[520]; // [rsp+630h] [rbp-210h] BYREF unsigned long long v18; // [rsp+838h] [rbp-8h] v18 = __readfsqword(0x28u); v12 = 0LL; memset(v17, 0LL, 512LL); tool = find_tool("my_print_defaults", v17, v0, v1, v2, v3); if ( !tool ) { tool = make_tempfile(v15, "txt"); if ( !tool ) { snprintf(v16, 512LL, "%s --mysqld > %s", v17, v15); if ( opt_verbose ) printf("# Command: %s\n", v16); tool = run_command(v16, "r"); if ( tool ) { fprintf(stderr, "ERROR: my_print_defaults failed. Error code: %d.\n", 0); } else { v12 = fopen64(v15, "r"); if ( v12 ) { while ( fgets(v14, 512LL, v12) ) { if ( !opt_datadir ) { value = get_value(v14, "--datadir"); if ( value ) opt_datadir = my_strdup(0LL, value, 8LL); } if ( !opt_basedir ) { v9 = get_value(v14, "--basedir"); if ( v9 ) opt_basedir = my_strdup(0LL, v9, 8LL); } if ( !opt_plugin_dir ) { v10 = get_value(v14, "--plugin_dir"); if ( v10 || (v10 = get_value(v14, "--plugin-dir")) != 0 ) opt_plugin_dir = my_strdup(0LL, v10, 8LL); } if ( !opt_lc_messages_dir ) { v11 = get_value(v14, "--lc_messages_dir"); if ( v11 || (v11 = get_value(v14, "--lc_messages-dir")) != 0 || (v11 = get_value(v14, "--lc-messages_dir")) != 0 || (v11 = get_value(v14, "--lc-messages-dir")) != 0 ) { opt_lc_messages_dir = my_strdup(0LL, v11, 8LL); } } } } else { v7 = stderr; v4 = (unsigned int *)__errno_location(); v5 = (const char *)strerror(*v4); fprintf(v7, "ERROR: failed to open file %s: %s.\n", v15, v5); } } } } if ( v12 ) { fclose(v12); my_delete(v15, 0LL); } return tool; }
get_default_values: PUSH RBP MOV RBP,RSP SUB RSP,0x840 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x814],0x0 MOV dword ptr [RBP + -0x818],0x0 MOV qword ptr [RBP + -0x820],0x0 LEA RDI,[RBP + -0x210] XOR ESI,ESI MOV EDX,0x200 CALL 0x001251d0 LEA RSI,[RBP + -0x210] LEA RDI,[0x182569] CALL 0x00125bd0 MOV dword ptr [RBP + -0x814],EAX CMP EAX,0x0 JZ 0x00126b3d JMP 0x00126e2a LAB_00126b3d: LEA RDI,[RBP + -0x610] LEA RSI,[0x18257b] CALL 0x00126e90 MOV dword ptr [RBP + -0x814],EAX CMP EAX,0x0 JZ 0x00126b60 JMP 0x00126e2a LAB_00126b60: LEA RDI,[RBP + -0x410] LEA RCX,[RBP + -0x210] LEA R8,[RBP + -0x610] MOV ESI,0x200 LEA RDX,[0x18257f] MOV AL,0x0 CALL 0x001255e0 CMP dword ptr [0x00491070],0x0 JZ 0x00126ba6 LEA RSI,[RBP + -0x410] LEA RDI,[0x182590] MOV AL,0x0 CALL 0x00125050 LAB_00126ba6: LEA RDI,[RBP + -0x410] LEA RSI,[0x183b6f] CALL 0x00126f10 MOV dword ptr [RBP + -0x814],EAX CMP dword ptr [RBP + -0x814],0x0 JZ 0x00126beb MOV RAX,qword ptr [0x002d8fd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x818] LEA RSI,[0x18259f] MOV AL,0x0 CALL 0x001254d0 JMP 0x00126e2a LAB_00126beb: LEA RDI,[RBP + -0x610] LEA RSI,[0x183b6f] CALL 0x001253a0 MOV qword ptr [RBP + -0x820],RAX CMP qword ptr [RBP + -0x820],0x0 JNZ 0x00126c5e MOV RAX,qword ptr [0x002d8fd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x838],RAX LEA RAX,[RBP + -0x610] MOV qword ptr [RBP + -0x830],RAX CALL 0x00125040 MOV EDI,dword ptr [RAX] CALL 0x001250f0 MOV RDI,qword ptr [RBP + -0x838] MOV RDX,qword ptr [RBP + -0x830] MOV RCX,RAX LEA RSI,[0x1825d1] MOV AL,0x0 CALL 0x001254d0 JMP 0x00126e2a LAB_00126c5e: JMP 0x00126c60 LAB_00126c60: LEA RDI,[RBP + -0x810] MOV RDX,qword ptr [RBP + -0x820] MOV ESI,0x200 CALL 0x001255c0 CMP RAX,0x0 JZ 0x00126e26 MOV qword ptr [RBP + -0x828],0x0 CMP qword ptr [0x00491098],0x0 JNZ 0x00126cd1 LEA RDI,[RBP + -0x810] LEA RSI,[0x1825f5] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JZ 0x00126cd1 MOV RSI,qword ptr [RBP + -0x828] XOR EDI,EDI MOV EDX,0x8 CALL 0x0012e4e0 MOV qword ptr [0x00491098],RAX LAB_00126cd1: CMP qword ptr [0x00491080],0x0 JNZ 0x00126d15 LEA RDI,[RBP + -0x810] LEA RSI,[0x1825ff] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JZ 0x00126d15 MOV RSI,qword ptr [RBP + -0x828] XOR EDI,EDI MOV EDX,0x8 CALL 0x0012e4e0 MOV qword ptr [0x00491080],RAX LAB_00126d15: CMP qword ptr [0x00491090],0x0 JNZ 0x00126d79 LEA RDI,[RBP + -0x810] LEA RSI,[0x182609] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JNZ 0x00126d5f LEA RDI,[RBP + -0x810] LEA RSI,[0x182616] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JZ 0x00126d79 LAB_00126d5f: MOV RSI,qword ptr [RBP + -0x828] XOR EDI,EDI MOV EDX,0x8 CALL 0x0012e4e0 MOV qword ptr [0x00491090],RAX LAB_00126d79: CMP qword ptr [0x004910a8],0x0 JNZ 0x00126e21 LEA RDI,[RBP + -0x810] LEA RSI,[0x182623] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JNZ 0x00126e07 LEA RDI,[RBP + -0x810] LEA RSI,[0x182635] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JNZ 0x00126e07 LEA RDI,[RBP + -0x810] LEA RSI,[0x182647] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JNZ 0x00126e07 LEA RDI,[RBP + -0x810] LEA RSI,[0x182659] CALL 0x00127020 MOV qword ptr [RBP + -0x828],RAX CMP RAX,0x0 JZ 0x00126e21 LAB_00126e07: MOV RSI,qword ptr [RBP + -0x828] XOR EDI,EDI MOV EDX,0x8 CALL 0x0012e4e0 MOV qword ptr [0x004910a8],RAX LAB_00126e21: JMP 0x00126c60 LAB_00126e26: JMP 0x00126e28 LAB_00126e28: JMP 0x00126e2a LAB_00126e2a: CMP qword ptr [RBP + -0x820],0x0 JZ 0x00126e50 MOV RDI,qword ptr [RBP + -0x820] CALL 0x00125320 LEA RDI,[RBP + -0x610] XOR EAX,EAX MOV ESI,EAX CALL 0x00128dc0 LAB_00126e50: MOV EAX,dword ptr [RBP + -0x814] MOV dword ptr [RBP + -0x83c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00126e7d MOV EAX,dword ptr [RBP + -0x83c] ADD RSP,0x840 POP RBP RET LAB_00126e7d: CALL 0x00125390
int get_default_values(void) { FILE *__stream; int *piVar1; char *pcVar2; long lVar3; long in_FS_OFFSET; long local_830; FILE *local_828; int local_81c; char local_818 [512]; char local_618 [512]; char local_418 [512]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_828 = (FILE *)0x0; memset(local_218,0,0x200); local_81c = find_tool("my_print_defaults",local_218); if ((local_81c == 0) && (local_81c = make_tempfile(local_618,&DAT_0018257b), local_81c == 0)) { snprintf(local_418,0x200,"%s --mysqld > %s",local_218,local_618); if (opt_verbose != 0) { printf("# Command: %s\n",local_418); } local_81c = run_command(local_418,&DAT_00183b6f); if (local_81c == 0) { local_828 = fopen64(local_618,"r"); if (local_828 == (FILE *)0x0) { __stream = *(FILE **)PTR_stderr_002d8fd8; piVar1 = __errno_location(); pcVar2 = strerror(*piVar1); fprintf(__stream,"ERROR: failed to open file %s: %s.\n",local_618,pcVar2); } else { while (pcVar2 = fgets(local_818,0x200,local_828), pcVar2 != (char *)0x0) { if ((opt_datadir == 0) && (lVar3 = get_value(local_818,"--datadir"), lVar3 != 0)) { opt_datadir = my_strdup(0,lVar3,8); } if ((opt_basedir == 0) && (lVar3 = get_value(local_818,"--basedir"), lVar3 != 0)) { opt_basedir = my_strdup(0,lVar3,8); } if ((opt_plugin_dir == 0) && ((local_830 = get_value(local_818,"--plugin_dir"), local_830 != 0 || (local_830 = get_value(local_818,"--plugin-dir"), local_830 != 0)))) { opt_plugin_dir = my_strdup(0,local_830,8); } if ((opt_lc_messages_dir == 0) && ((((local_830 = get_value(local_818,"--lc_messages_dir"), local_830 != 0 || (local_830 = get_value(local_818,"--lc_messages-dir"), local_830 != 0)) || (local_830 = get_value(local_818,"--lc-messages_dir"), local_830 != 0)) || (local_830 = get_value(local_818,"--lc-messages-dir"), local_830 != 0)))) { opt_lc_messages_dir = my_strdup(0,local_830,8); } } } } else { fprintf(*(FILE **)PTR_stderr_002d8fd8,"ERROR: my_print_defaults failed. Error code: %d.\n",0); } } if (local_828 != (FILE *)0x0) { fclose(local_828); my_delete(local_618,0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_81c; }
2,319
get_default_values
eloqsql/client/mysql_plugin.c
static int get_default_values() { char tool_path[FN_REFLEN]; char defaults_cmd[FN_REFLEN]; char defaults_file[FN_REFLEN]; char line[FN_REFLEN]; int error= 0; int ret= 0; FILE *file= 0; memset(tool_path, 0, FN_REFLEN); if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path))) goto exit; else { if ((error= make_tempfile(defaults_file, "txt"))) goto exit; #ifdef _WIN32 { char *format_str= 0; if (has_spaces(tool_path) || has_spaces(defaults_file)) format_str = "\"%s --mysqld > %s\""; else format_str = "%s --mysqld > %s"; snprintf(defaults_cmd, sizeof(defaults_cmd), format_str, add_quotes(tool_path), add_quotes(defaults_file)); if (opt_verbose) { printf("# my_print_defaults found: %s\n", tool_path); } } #else snprintf(defaults_cmd, sizeof(defaults_cmd), "%s --mysqld > %s", tool_path, defaults_file); #endif /* Execute the command */ if (opt_verbose) { printf("# Command: %s\n", defaults_cmd); } error= run_command(defaults_cmd, "r"); if (error) { fprintf(stderr, "ERROR: my_print_defaults failed. Error code: %d.\n", ret); goto exit; } /* Now open the file and read the defaults we want. */ file= fopen(defaults_file, "r"); if (file == NULL) { fprintf(stderr, "ERROR: failed to open file %s: %s.\n", defaults_file, strerror(errno)); goto exit; } while (fgets(line, FN_REFLEN, file) != NULL) { char *value= 0; if ((opt_datadir == 0) && ((value= get_value(line, "--datadir")))) { opt_datadir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_basedir == 0) && ((value= get_value(line, "--basedir")))) { opt_basedir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_plugin_dir == 0) && ((value= get_value(line, "--plugin_dir")) || (value= get_value(line, "--plugin-dir")))) { opt_plugin_dir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } if ((opt_lc_messages_dir == 0) && ((value= get_value(line, "--lc_messages_dir")) || (value= get_value(line, "--lc_messages-dir")) || (value= get_value(line, "--lc-messages_dir")) || (value= get_value(line, "--lc-messages-dir")))) { opt_lc_messages_dir= my_strdup(PSI_NOT_INSTRUMENTED, value, MYF(MY_FAE)); } } } exit: if (file) { fclose(file); /* Remove file */ my_delete(defaults_file, MYF(0)); } return error; }
O3
c
get_default_values: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x818, %rsp # imm = 0x818 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x230(%rbp), %rbx movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi xorl %esi, %esi callq 0x241e0 leaq 0x3ad40(%rip), %rdi # 0x614fd movq %rbx, %rsi callq 0x261ba movl $0x1, %ebx testl %eax, %eax jne 0x26a4f leaq 0x3ad36(%rip), %rsi # 0x6150f leaq -0x630(%rbp), %r14 movq %r14, %rdi callq 0x26a77 testl %eax, %eax jne 0x26a4f movq %r14, (%rsp) leaq 0x3ad18(%rip), %r8 # 0x61513 leaq -0x430(%rbp), %rdi leaq -0x230(%rbp), %r9 movl $0x200, %esi # imm = 0x200 movl $0x200, %ecx # imm = 0x200 movl $0x1, %edx xorl %eax, %eax callq 0x24230 cmpl $0x0, 0x346c5a(%rip) # 0x36d480 je 0x26842 leaq 0x3acf5(%rip), %rsi # 0x61524 leaq -0x430(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax callq 0x24030 leaq -0x430(%rbp), %rdi callq 0x26acd testl %eax, %eax je 0x26878 movl %eax, %ebx movq 0x2cf775(%rip), %rax # 0x2f5fd0 movq (%rax), %rdi leaq 0x3acce(%rip), %rdx # 0x61533 movl $0x1, %esi xorl %ecx, %ecx xorl %eax, %eax callq 0x24660 jmp 0x26a4f leaq 0x3c25d(%rip), %rsi # 0x62adc leaq -0x630(%rbp), %rdi callq 0x24410 testq %rax, %rax je 0x26a17 movq %rax, %rbx leaq -0x830(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movq %rax, %rdx callq 0x24610 testq %rax, %rax je 0x269fd leaq -0x830(%rbp), %r15 leaq 0x3acd1(%rip), %r12 # 0x61593 leaq 0x3acd4(%rip), %r13 # 0x6159d leaq 0x3ace7(%rip), %r14 # 0x615b7 cmpq $0x0, 0x346bc8(%rip) # 0x36d4a0 jne 0x26904 movq %r15, %rdi leaq 0x3aca5(%rip), %rsi # 0x61589 callq 0x26bae testq %rax, %rax je 0x26904 movl $0x8, %edx xorl %edi, %edi movq %rax, %rsi callq 0x2b068 movq %rax, 0x346b9c(%rip) # 0x36d4a0 cmpq $0x0, 0x346b7c(%rip) # 0x36d488 jne 0x26934 movq %r15, %rdi movq %r12, %rsi callq 0x26bae testq %rax, %rax je 0x26934 movl $0x8, %edx xorl %edi, %edi movq %rax, %rsi callq 0x2b068 movq %rax, 0x346b54(%rip) # 0x36d488 cmpq $0x0, 0x346b5c(%rip) # 0x36d498 jne 0x26978 movq %r15, %rdi movq %r13, %rsi callq 0x26bae testq %rax, %rax jne 0x26962 movq %r15, %rdi leaq 0x3ac52(%rip), %rsi # 0x615aa callq 0x26bae testq %rax, %rax je 0x26978 movl $0x8, %edx xorl %edi, %edi movq %rax, %rsi callq 0x2b068 movq %rax, 0x346b20(%rip) # 0x36d498 cmpq $0x0, 0x346b30(%rip) # 0x36d4b0 jne 0x269e4 movq %r15, %rdi movq %r14, %rsi callq 0x26bae testq %rax, %rax jne 0x269ce movq %r15, %rdi leaq 0x3ac2d(%rip), %rsi # 0x615c9 callq 0x26bae testq %rax, %rax jne 0x269ce movq %r15, %rdi leaq 0x3ac2b(%rip), %rsi # 0x615db callq 0x26bae testq %rax, %rax jne 0x269ce movq %r15, %rdi leaq 0x3ac29(%rip), %rsi # 0x615ed callq 0x26bae testq %rax, %rax je 0x269e4 movl $0x8, %edx xorl %edi, %edi movq %rax, %rsi callq 0x2b068 movq %rax, 0x346acc(%rip) # 0x36d4b0 movq %r15, %rdi movl $0x200, %esi # imm = 0x200 movq %rbx, %rdx callq 0x24610 testq %rax, %rax jne 0x268d0 movq %rbx, %rdi callq 0x24370 xorl %ebx, %ebx leaq -0x630(%rbp), %rdi xorl %esi, %esi callq 0x279a0 jmp 0x26a4f movq 0x2cf5b2(%rip), %rax # 0x2f5fd0 movq (%rax), %r14 callq 0x24050 movl (%rax), %edi callq 0x240f0 leaq 0x3ab31(%rip), %rdx # 0x61565 xorl %ebx, %ebx leaq -0x630(%rbp), %rcx movq %r14, %rdi movl $0x1, %esi movq %rax, %r8 xorl %eax, %eax callq 0x24660 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x26a72 movl %ebx, %eax addq $0x818, %rsp # imm = 0x818 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24400
get_default_values: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 818h mov rax, fs:28h mov [rbp+var_30], rax lea rbx, [rbp+var_230] mov edx, 200h mov rdi, rbx xor esi, esi call _memset lea rdi, aMyPrintDefault_0; "my_print_defaults" mov rsi, rbx call find_tool mov ebx, 1 test eax, eax jnz loc_26A4F lea rsi, aTxt; "txt" lea r14, [rbp+var_630] mov rdi, r14 call make_tempfile test eax, eax jnz loc_26A4F mov [rsp+840h+var_840], r14 lea r8, aSMysqldS; "%s --mysqld > %s" lea rdi, [rbp+var_430] lea r9, [rbp+var_230] mov esi, 200h mov ecx, 200h mov edx, 1 xor eax, eax call ___snprintf_chk cmp cs:opt_verbose, 0 jz short loc_26842 lea rsi, aCommandS; "# Command: %s\n" lea rdx, [rbp+var_430] mov edi, 1 xor eax, eax call ___printf_chk loc_26842: lea rdi, [rbp+var_430] call run_command test eax, eax jz short loc_26878 mov ebx, eax mov rax, cs:stderr_ptr mov rdi, [rax] lea rdx, aErrorMyPrintDe; "ERROR: my_print_defaults failed. Error "... mov esi, 1 xor ecx, ecx xor eax, eax call ___fprintf_chk jmp loc_26A4F loc_26878: lea rsi, aKoi8r+4; "r" lea rdi, [rbp+var_630] call _fopen64 test rax, rax jz loc_26A17 mov rbx, rax lea rdi, [rbp+var_830] mov esi, 200h mov rdx, rax call _fgets test rax, rax jz loc_269FD lea r15, [rbp+var_830] lea r12, aBasedir_0; "--basedir" lea r13, aPluginDir_0; "--plugin_dir" lea r14, aLcMessagesDir; "--lc_messages_dir" loc_268D0: cmp cs:opt_datadir, 0 jnz short loc_26904 mov rdi, r15 lea rsi, aDatadir_0; "--datadir" call get_value test rax, rax jz short loc_26904 mov edx, 8 xor edi, edi mov rsi, rax call my_strdup mov cs:opt_datadir, rax loc_26904: cmp cs:opt_basedir, 0 jnz short loc_26934 mov rdi, r15 mov rsi, r12 call get_value test rax, rax jz short loc_26934 mov edx, 8 xor edi, edi mov rsi, rax call my_strdup mov cs:opt_basedir, rax loc_26934: cmp cs:opt_plugin_dir, 0 jnz short loc_26978 mov rdi, r15 mov rsi, r13 call get_value test rax, rax jnz short loc_26962 mov rdi, r15 lea rsi, aPluginDir_1; "--plugin-dir" call get_value test rax, rax jz short loc_26978 loc_26962: mov edx, 8 xor edi, edi mov rsi, rax call my_strdup mov cs:opt_plugin_dir, rax loc_26978: cmp cs:opt_lc_messages_dir, 0 jnz short loc_269E4 mov rdi, r15 mov rsi, r14 call get_value test rax, rax jnz short loc_269CE mov rdi, r15 lea rsi, aLcMessagesDir_0; "--lc_messages-dir" call get_value test rax, rax jnz short loc_269CE mov rdi, r15 lea rsi, aLcMessagesDir_1; "--lc-messages_dir" call get_value test rax, rax jnz short loc_269CE mov rdi, r15 lea rsi, aLcMessagesDir_2; "--lc-messages-dir" call get_value test rax, rax jz short loc_269E4 loc_269CE: mov edx, 8 xor edi, edi mov rsi, rax call my_strdup mov cs:opt_lc_messages_dir, rax loc_269E4: mov rdi, r15 mov esi, 200h mov rdx, rbx call _fgets test rax, rax jnz loc_268D0 loc_269FD: mov rdi, rbx call _fclose xor ebx, ebx lea rdi, [rbp+var_630] xor esi, esi call my_delete jmp short loc_26A4F loc_26A17: mov rax, cs:stderr_ptr mov r14, [rax] call ___errno_location mov edi, [rax] call _strerror lea rdx, aErrorFailedToO; "ERROR: failed to open file %s: %s.\n" xor ebx, ebx lea rcx, [rbp+var_630] mov rdi, r14 mov esi, 1 mov r8, rax xor eax, eax call ___fprintf_chk loc_26A4F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_26A72 mov eax, ebx add rsp, 818h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_26A72: call ___stack_chk_fail
long long get_default_values() { unsigned int v0; // ebx unsigned int v1; // eax long long v2; // rax long long v3; // rbx long long value; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // r14 unsigned int *v9; // rax const char *v10; // rax _BYTE v12[512]; // [rsp+10h] [rbp-830h] BYREF char v13[512]; // [rsp+210h] [rbp-630h] BYREF char v14[512]; // [rsp+410h] [rbp-430h] BYREF char v15[512]; // [rsp+610h] [rbp-230h] BYREF unsigned long long v16; // [rsp+810h] [rbp-30h] v16 = __readfsqword(0x28u); memset(v15, 0LL, sizeof(v15)); v0 = 1; if ( !(unsigned int)find_tool("my_print_defaults", v15) && !(unsigned int)make_tempfile(v13, "txt") ) { __snprintf_chk(v14, 512LL, 1LL, 512LL, "%s --mysqld > %s", v15, v13); if ( opt_verbose ) __printf_chk(1LL, "# Command: %s\n", v14); v1 = run_command(v14); if ( v1 ) { v0 = v1; __fprintf_chk(stderr, 1LL, "ERROR: my_print_defaults failed. Error code: %d.\n", 0); } else { v2 = fopen64(v13, "r"); if ( v2 ) { v3 = v2; while ( fgets(v12, 512LL, v3) ) { if ( !opt_datadir ) { value = get_value(v12, "--datadir"); if ( value ) opt_datadir = my_strdup(0LL, value, 8LL); } if ( !opt_basedir ) { v5 = get_value(v12, "--basedir"); if ( v5 ) opt_basedir = my_strdup(0LL, v5, 8LL); } if ( !opt_plugin_dir ) { v6 = get_value(v12, "--plugin_dir"); if ( v6 || (v6 = get_value(v12, "--plugin-dir")) != 0 ) opt_plugin_dir = my_strdup(0LL, v6, 8LL); } if ( !opt_lc_messages_dir ) { v7 = get_value(v12, "--lc_messages_dir"); if ( v7 || (v7 = get_value(v12, "--lc_messages-dir")) != 0 || (v7 = get_value(v12, "--lc-messages_dir")) != 0 || (v7 = get_value(v12, "--lc-messages-dir")) != 0 ) { opt_lc_messages_dir = my_strdup(0LL, v7, 8LL); } } } fclose(v3); v0 = 0; my_delete(v13, 0LL); } else { v8 = stderr; v9 = (unsigned int *)__errno_location(); v10 = (const char *)strerror(*v9); v0 = 0; __fprintf_chk(v8, 1LL, "ERROR: failed to open file %s: %s.\n", v13, v10); } } } return v0; }
get_default_values: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x818 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RBX,[RBP + -0x230] MOV EDX,0x200 MOV RDI,RBX XOR ESI,ESI CALL 0x001241e0 LEA RDI,[0x1614fd] MOV RSI,RBX CALL 0x001261ba MOV EBX,0x1 TEST EAX,EAX JNZ 0x00126a4f LEA RSI,[0x16150f] LEA R14,[RBP + -0x630] MOV RDI,R14 CALL 0x00126a77 TEST EAX,EAX JNZ 0x00126a4f MOV qword ptr [RSP],R14 LEA R8,[0x161513] LEA RDI,[RBP + -0x430] LEA R9,[RBP + -0x230] MOV ESI,0x200 MOV ECX,0x200 MOV EDX,0x1 XOR EAX,EAX CALL 0x00124230 CMP dword ptr [0x0046d480],0x0 JZ 0x00126842 LEA RSI,[0x161524] LEA RDX,[RBP + -0x430] MOV EDI,0x1 XOR EAX,EAX CALL 0x00124030 LAB_00126842: LEA RDI,[RBP + -0x430] CALL 0x00126acd TEST EAX,EAX JZ 0x00126878 MOV EBX,EAX MOV RAX,qword ptr [0x003f5fd0] MOV RDI,qword ptr [RAX] LEA RDX,[0x161533] MOV ESI,0x1 XOR ECX,ECX XOR EAX,EAX CALL 0x00124660 JMP 0x00126a4f LAB_00126878: LEA RSI,[0x162adc] LEA RDI,[RBP + -0x630] CALL 0x00124410 TEST RAX,RAX JZ 0x00126a17 MOV RBX,RAX LEA RDI,[RBP + -0x830] MOV ESI,0x200 MOV RDX,RAX CALL 0x00124610 TEST RAX,RAX JZ 0x001269fd LEA R15,[RBP + -0x830] LEA R12,[0x161593] LEA R13,[0x16159d] LEA R14,[0x1615b7] LAB_001268d0: CMP qword ptr [0x0046d4a0],0x0 JNZ 0x00126904 MOV RDI,R15 LEA RSI,[0x161589] CALL 0x00126bae TEST RAX,RAX JZ 0x00126904 MOV EDX,0x8 XOR EDI,EDI MOV RSI,RAX CALL 0x0012b068 MOV qword ptr [0x0046d4a0],RAX LAB_00126904: CMP qword ptr [0x0046d488],0x0 JNZ 0x00126934 MOV RDI,R15 MOV RSI,R12 CALL 0x00126bae TEST RAX,RAX JZ 0x00126934 MOV EDX,0x8 XOR EDI,EDI MOV RSI,RAX CALL 0x0012b068 MOV qword ptr [0x0046d488],RAX LAB_00126934: CMP qword ptr [0x0046d498],0x0 JNZ 0x00126978 MOV RDI,R15 MOV RSI,R13 CALL 0x00126bae TEST RAX,RAX JNZ 0x00126962 MOV RDI,R15 LEA RSI,[0x1615aa] CALL 0x00126bae TEST RAX,RAX JZ 0x00126978 LAB_00126962: MOV EDX,0x8 XOR EDI,EDI MOV RSI,RAX CALL 0x0012b068 MOV qword ptr [0x0046d498],RAX LAB_00126978: CMP qword ptr [0x0046d4b0],0x0 JNZ 0x001269e4 MOV RDI,R15 MOV RSI,R14 CALL 0x00126bae TEST RAX,RAX JNZ 0x001269ce MOV RDI,R15 LEA RSI,[0x1615c9] CALL 0x00126bae TEST RAX,RAX JNZ 0x001269ce MOV RDI,R15 LEA RSI,[0x1615db] CALL 0x00126bae TEST RAX,RAX JNZ 0x001269ce MOV RDI,R15 LEA RSI,[0x1615ed] CALL 0x00126bae TEST RAX,RAX JZ 0x001269e4 LAB_001269ce: MOV EDX,0x8 XOR EDI,EDI MOV RSI,RAX CALL 0x0012b068 MOV qword ptr [0x0046d4b0],RAX LAB_001269e4: MOV RDI,R15 MOV ESI,0x200 MOV RDX,RBX CALL 0x00124610 TEST RAX,RAX JNZ 0x001268d0 LAB_001269fd: MOV RDI,RBX CALL 0x00124370 XOR EBX,EBX LEA RDI,[RBP + -0x630] XOR ESI,ESI CALL 0x001279a0 JMP 0x00126a4f LAB_00126a17: MOV RAX,qword ptr [0x003f5fd0] MOV R14,qword ptr [RAX] CALL 0x00124050 MOV EDI,dword ptr [RAX] CALL 0x001240f0 LEA RDX,[0x161565] XOR EBX,EBX LEA RCX,[RBP + -0x630] MOV RDI,R14 MOV ESI,0x1 MOV R8,RAX XOR EAX,EAX CALL 0x00124660 LAB_00126a4f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00126a72 MOV EAX,EBX ADD RSP,0x818 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00126a72: CALL 0x00124400
int get_default_values(void) { int8 uVar1; int iVar2; int iVar3; FILE *__stream; char *pcVar4; long lVar5; int *piVar6; long in_FS_OFFSET; char local_838 [512]; char local_638 [512]; int1 local_438 [512]; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); memset(local_238,0,0x200); iVar2 = find_tool("my_print_defaults",local_238); iVar3 = 1; if (iVar2 == 0) { iVar2 = make_tempfile(local_638,&DAT_0016150f); if (iVar2 == 0) { __snprintf_chk(local_438,0x200,1,0x200,"%s --mysqld > %s",local_238,local_638); if (opt_verbose != 0) { __printf_chk(1,"# Command: %s\n",local_438); } iVar3 = run_command(local_438); if (iVar3 == 0) { __stream = fopen64(local_638,"r"); if (__stream == (FILE *)0x0) { uVar1 = *(int8 *)PTR_stderr_003f5fd0; piVar6 = __errno_location(); pcVar4 = strerror(*piVar6); iVar3 = 0; __fprintf_chk(uVar1,1,"ERROR: failed to open file %s: %s.\n",local_638,pcVar4); } else { pcVar4 = fgets(local_838,0x200,__stream); if (pcVar4 != (char *)0x0) { do { if (opt_datadir == 0) { lVar5 = get_value(local_838,"--datadir"); if (lVar5 != 0) { opt_datadir = my_strdup(0,lVar5,8); } } if (opt_basedir == 0) { lVar5 = get_value(local_838,"--basedir"); if (lVar5 != 0) { opt_basedir = my_strdup(0,lVar5,8); } } if (opt_plugin_dir == 0) { lVar5 = get_value(local_838,"--plugin_dir"); if (lVar5 == 0) { lVar5 = get_value(local_838,"--plugin-dir"); if (lVar5 == 0) goto LAB_00126978; } opt_plugin_dir = my_strdup(0,lVar5,8); } LAB_00126978: if (opt_lc_messages_dir == 0) { lVar5 = get_value(local_838,"--lc_messages_dir"); if (lVar5 == 0) { lVar5 = get_value(local_838,"--lc_messages-dir"); if (lVar5 == 0) { lVar5 = get_value(local_838,"--lc-messages_dir"); if (lVar5 == 0) { lVar5 = get_value(local_838,"--lc-messages-dir"); if (lVar5 == 0) goto LAB_001269e4; } } } opt_lc_messages_dir = my_strdup(0,lVar5,8); } LAB_001269e4: pcVar4 = fgets(local_838,0x200,__stream); } while (pcVar4 != (char *)0x0); } fclose(__stream); iVar3 = 0; my_delete(local_638,0); } } else { __fprintf_chk(*(int8 *)PTR_stderr_003f5fd0,1, "ERROR: my_print_defaults failed. Error code: %d.\n",0); } } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,320
LefDefParser::defiNet::addShield(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::addShield(const char* name) { defiShield* shield; if (numShields_ == shieldsAllocated_) { defiShield** array; int i; shieldsAllocated_ = shieldsAllocated_ ? shieldsAllocated_ * 2 : 2 ; array = (defiShield**)malloc(sizeof(defiShield*)*shieldsAllocated_); for (i = 0; i < numShields_; i++) array[i] = shields_[i]; if (shields_) free((char*)(shields_)); shields_ = array; } shield = shields_[numShields_] = new defiShield(defData); numShields_ += 1; shield->Init(name); }
O0
cpp
LefDefParser::defiNet::addShield(char const*): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rcx movq %rcx, 0x18(%rsp) movl 0x148(%rcx), %eax cmpl 0x14c(%rcx), %eax jne 0x3aec4 movq 0x18(%rsp), %rax cmpl $0x0, 0x14c(%rax) je 0x3ae1b movq 0x18(%rsp), %rax movl 0x14c(%rax), %eax shll %eax movl %eax, 0x14(%rsp) jmp 0x3ae26 movl $0x2, %eax movl %eax, 0x14(%rsp) jmp 0x3ae26 movq 0x18(%rsp), %rax movl 0x14(%rsp), %ecx movl %ecx, 0x14c(%rax) movslq 0x14c(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x38(%rsp) movl $0x0, 0x34(%rsp) movq 0x18(%rsp), %rcx movl 0x34(%rsp), %eax cmpl 0x148(%rcx), %eax jge 0x3ae93 movq 0x18(%rsp), %rax movq 0x150(%rax), %rax movslq 0x34(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x38(%rsp), %rax movslq 0x34(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x3ae52 movq 0x18(%rsp), %rax cmpq $0x0, 0x150(%rax) je 0x3aeb3 movq 0x18(%rsp), %rax movq 0x150(%rax), %rdi callq 0x72a0 movq 0x18(%rsp), %rax movq 0x38(%rsp), %rcx movq %rcx, 0x150(%rax) movl $0x20, %edi callq 0x7250 movq %rax, %rdi movq 0x18(%rsp), %rax movq %rdi, %rcx movq %rcx, 0x8(%rsp) movq 0x240(%rax), %rsi callq 0x38750 jmp 0x3aeec movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movq 0x150(%rax), %rdx movslq 0x148(%rax), %rsi movq %rcx, (%rdx,%rsi,8) movq %rcx, 0x40(%rsp) movl 0x148(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x148(%rax) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x38770 addq $0x58, %rsp retq movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) movl $0x20, %esi callq 0x7260 movq 0x28(%rsp), %rdi callq 0x73b0 nopw (%rax,%rax)
_ZN12LefDefParser7defiNet9addShieldEPKc: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rcx, [rsp+58h+var_8] mov [rsp+58h+var_40], rcx mov eax, [rcx+148h] cmp eax, [rcx+14Ch] jnz loc_3AEC4 mov rax, [rsp+58h+var_40] cmp dword ptr [rax+14Ch], 0 jz short loc_3AE1B mov rax, [rsp+58h+var_40] mov eax, [rax+14Ch] shl eax, 1 mov [rsp+58h+var_44], eax jmp short loc_3AE26 loc_3AE1B: mov eax, 2 mov [rsp+58h+var_44], eax jmp short $+2 loc_3AE26: mov rax, [rsp+58h+var_40] mov ecx, [rsp+58h+var_44] mov [rax+14Ch], ecx movsxd rdi, dword ptr [rax+14Ch] shl rdi, 3 call _malloc mov [rsp+58h+var_20], rax mov [rsp+58h+var_24], 0 loc_3AE52: mov rcx, [rsp+58h+var_40] mov eax, [rsp+58h+var_24] cmp eax, [rcx+148h] jge short loc_3AE93 mov rax, [rsp+58h+var_40] mov rax, [rax+150h] movsxd rcx, [rsp+58h+var_24] mov rdx, [rax+rcx*8] mov rax, [rsp+58h+var_20] movsxd rcx, [rsp+58h+var_24] mov [rax+rcx*8], rdx mov eax, [rsp+58h+var_24] add eax, 1 mov [rsp+58h+var_24], eax jmp short loc_3AE52 loc_3AE93: mov rax, [rsp+58h+var_40] cmp qword ptr [rax+150h], 0 jz short loc_3AEB3 mov rax, [rsp+58h+var_40] mov rdi, [rax+150h] call _free loc_3AEB3: mov rax, [rsp+58h+var_40] mov rcx, [rsp+58h+var_20] mov [rax+150h], rcx loc_3AEC4: mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, [rsp+58h+var_40] mov rcx, rdi mov [rsp+58h+var_50], rcx mov rsi, [rax+240h]; LefDefParser::defrData * call _ZN12LefDefParser10defiShieldC2EPNS_8defrDataE; LefDefParser::defiShield::defiShield(LefDefParser::defrData *) jmp short $+2 loc_3AEEC: mov rax, [rsp+58h+var_40] mov rcx, [rsp+58h+var_50] mov rdx, [rax+150h] movsxd rsi, dword ptr [rax+148h] mov [rdx+rsi*8], rcx mov [rsp+58h+var_18], rcx mov ecx, [rax+148h] add ecx, 1 mov [rax+148h], ecx mov rdi, [rsp+58h+var_18]; this mov rsi, [rsp+58h+var_10]; char * call _ZN12LefDefParser10defiShield4InitEPKc; LefDefParser::defiShield::Init(char const*) add rsp, 58h retn mov rdi, [rsp+arg_0]; void * mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax mov esi, 20h ; ' '; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov rdi, [rsp+arg_20] call __Unwind_Resume
LefDefParser::defrData ** LefDefParser::defiNet::addShield(LefDefParser::defiNet *this, const char *a2) { LefDefParser::defiShield *v3; // [rsp+8h] [rbp-50h] int v4; // [rsp+14h] [rbp-44h] int i; // [rsp+34h] [rbp-24h] long long v6; // [rsp+38h] [rbp-20h] if ( *((_DWORD *)this + 82) == *((_DWORD *)this + 83) ) { if ( *((_DWORD *)this + 83) ) v4 = 2 * *((_DWORD *)this + 83); else v4 = 2; *((_DWORD *)this + 83) = v4; v6 = malloc(8LL * *((int *)this + 83)); for ( i = 0; i < *((_DWORD *)this + 82); ++i ) *(_QWORD *)(v6 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 42) + 8LL * i); if ( *((_QWORD *)this + 42) ) free(*((_QWORD *)this + 42)); *((_QWORD *)this + 42) = v6; } v3 = (LefDefParser::defiShield *)operator new(0x20uLL); LefDefParser::defiShield::defiShield(v3, *((LefDefParser::defrData **)this + 72)); *(_QWORD *)(*((_QWORD *)this + 42) + 8LL * (int)(*((_DWORD *)this + 82))++) = v3; return LefDefParser::defiShield::Init((LefDefParser::defrData **)v3, a2); }
addShield: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x18],RCX MOV EAX,dword ptr [RCX + 0x148] CMP EAX,dword ptr [RCX + 0x14c] JNZ 0x0013aec4 MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x14c],0x0 JZ 0x0013ae1b MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x14c] SHL EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x0013ae26 LAB_0013ae1b: MOV EAX,0x2 MOV dword ptr [RSP + 0x14],EAX JMP 0x0013ae26 LAB_0013ae26: MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0x14] MOV dword ptr [RAX + 0x14c],ECX MOVSXD RDI,dword ptr [RAX + 0x14c] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x34],0x0 LAB_0013ae52: MOV RCX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RCX + 0x148] JGE 0x0013ae93 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x150] MOVSXD RCX,dword ptr [RSP + 0x34] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x34] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x0013ae52 LAB_0013ae93: MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0x150],0x0 JZ 0x0013aeb3 MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x150] CALL 0x001072a0 LAB_0013aeb3: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x150],RCX LAB_0013aec4: MOV EDI,0x20 CALL 0x00107250 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RDI MOV qword ptr [RSP + 0x8],RCX MOV RSI,qword ptr [RAX + 0x240] LAB_0013aee5: CALL 0x00138750 LAB_0013aeea: JMP 0x0013aeec LAB_0013aeec: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX + 0x150] MOVSXD RSI,dword ptr [RAX + 0x148] MOV qword ptr [RDX + RSI*0x8],RCX MOV qword ptr [RSP + 0x40],RCX MOV ECX,dword ptr [RAX + 0x148] ADD ECX,0x1 MOV dword ptr [RAX + 0x148],ECX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00138770 ADD RSP,0x58 RET
/* LefDefParser::defiNet::addShield(char const*) */ void __thiscall LefDefParser::defiNet::addShield(defiNet *this,char *param_1) { void *pvVar1; defiShield *this_00; int local_44; int local_24; if (*(int *)(this + 0x148) == *(int *)(this + 0x14c)) { if (*(int *)(this + 0x14c) == 0) { local_44 = 2; } else { local_44 = *(int *)(this + 0x14c) << 1; } *(int *)(this + 0x14c) = local_44; pvVar1 = malloc((long)*(int *)(this + 0x14c) << 3); for (local_24 = 0; local_24 < *(int *)(this + 0x148); local_24 = local_24 + 1) { *(int8 *)((long)pvVar1 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x150) + (long)local_24 * 8); } if (*(long *)(this + 0x150) != 0) { free(*(void **)(this + 0x150)); } *(void **)(this + 0x150) = pvVar1; } this_00 = (defiShield *)operator_new(0x20); /* try { // try from 0013aee5 to 0013aee9 has its CatchHandler @ 0013af30 */ defiShield::defiShield(this_00,*(defrData **)(this + 0x240)); *(defiShield **)(*(long *)(this + 0x150) + (long)*(int *)(this + 0x148) * 8) = this_00; *(int *)(this + 0x148) = *(int *)(this + 0x148) + 1; defiShield::Init(this_00,param_1); return; }
2,321
quantize_iq4_xs
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
size_t quantize_iq4_xs(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { GGML_ASSERT(n_per_row%QK_K == 0); int64_t nblock = n_per_row/QK_K; char * qrow = (char *)dst; uint8_t L[QK_K]; float weight[32]; float scales[QK_K/32]; for (int64_t row = 0; row < nrow; ++row) { block_iq4_xs * iq4 = (block_iq4_xs *)qrow; for (int ibl = 0; ibl < nblock; ++ibl) { const float * qw = quant_weights ? quant_weights + QK_K*ibl : NULL; quantize_row_iq4_nl_impl(QK_K, 32, src + QK_K*ibl, &iq4[ibl].d, iq4[ibl].qs, &iq4[ibl].scales_h, iq4[ibl].scales_l, scales, weight, L, kvalues_iq4nl, qw, 7); } src += n_per_row; qrow += nblock*sizeof(block_iq4_xs); } return nrow * nblock * sizeof(block_iq4_xs); }
O1
c
quantize_iq4_xs: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 testb %cl, %cl jne 0x39f95 movq %rcx, %rax sarq $0x8, %rax movq %rax, (%rsp) testq %rdx, %rdx jle 0x39f73 movq %rsi, %r12 movq %rdi, %rbp movq (%rsp), %r9 movq %r9, %rax shlq $0x7, %rax leaq (%rax,%r9,8), %rax movq %rax, 0x8(%rsp) shlq $0x2, %rcx xorl %eax, %eax leaq 0xe0(%rsp), %r15 leaq 0x60(%rsp), %r11 leaq 0x40(%rsp), %rbx movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movq %r8, 0x38(%rsp) movq %rax, 0x20(%rsp) movq (%rsp), %rax movq %rax, %r13 movq %r8, %r14 movq %rbp, 0x28(%rsp) movq %r12, 0x30(%rsp) testq %rax, %rax jle 0x39f46 testq %r8, %r8 movq %r14, %rax cmoveq %r8, %rax leaq 0x8(%r12), %rcx leaq 0x2(%r12), %r8 leaq 0x4(%r12), %r9 subq $0x8, %rsp movl $0x100, %edi # imm = 0x100 movq %rbp, %rsi movq %r12, %rdx pushq $0x7 pushq %rax pushq %r15 pushq %r11 pushq %rbx movq %r11, %rbx callq 0x394d6 movl $0x400, %eax # imm = 0x400 movq 0x68(%rsp), %r8 movq %rbx, %r11 leaq 0x70(%rsp), %rbx addq $0x30, %rsp addq $0x88, %r12 addq %rax, %rbp addq %rax, %r14 decq %r13 jne 0x39ee6 movq 0x30(%rsp), %r12 addq 0x8(%rsp), %r12 movq 0x20(%rsp), %rax incq %rax movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rbp addq %rcx, %rbp movq 0x18(%rsp), %rdx cmpq %rdx, %rax jne 0x39ec8 imulq (%rsp), %rdx movq %rdx, %rax shlq $0x7, %rax leaq (%rax,%rdx,8), %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1f5cc(%rip), %rdi # 0x59568 leaq 0x106b7(%rip), %rdx # 0x4a65a leaq 0x1f697(%rip), %rcx # 0x59641 movl $0x1273, %esi # imm = 0x1273 xorl %eax, %eax callq 0x17c70
quantize_iq4_xs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h test cl, cl jnz loc_39F95 mov rax, rcx sar rax, 8 mov [rsp+218h+var_218], rax test rdx, rdx jle loc_39F73 mov r12, rsi mov rbp, rdi mov r9, [rsp+218h+var_218] mov rax, r9 shl rax, 7 lea rax, [rax+r9*8] mov [rsp+218h+var_210], rax shl rcx, 2 xor eax, eax lea r15, [rsp+218h+var_138] lea r11, [rsp+218h+var_1B8] lea rbx, [rsp+218h+var_1D8] mov [rsp+218h+var_200], rdx mov [rsp+218h+var_208], rcx mov [rsp+218h+var_1E0], r8 loc_39EC8: mov [rsp+218h+var_1F8], rax mov rax, [rsp+218h+var_218] mov r13, rax mov r14, r8 mov [rsp+218h+var_1F0], rbp mov [rsp+218h+var_1E8], r12 test rax, rax jle short loc_39F46 loc_39EE6: test r8, r8 mov rax, r14 cmovz rax, r8 lea rcx, [r12+8] lea r8, [r12+2] lea r9, [r12+4] sub rsp, 8 mov edi, 100h mov rsi, rbp mov rdx, r12 push 7 push rax push r15 push r11 push rbx mov rbx, r11 call quantize_row_iq4_nl_impl mov eax, 400h mov r8, [rsp+248h+var_1E0] mov r11, rbx lea rbx, [rsp+248h+var_1D8] add rsp, 30h add r12, 88h add rbp, rax add r14, rax dec r13 jnz short loc_39EE6 loc_39F46: mov r12, [rsp+218h+var_1E8] add r12, [rsp+218h+var_210] mov rax, [rsp+218h+var_1F8] inc rax mov rcx, [rsp+218h+var_208] mov rbp, [rsp+218h+var_1F0] add rbp, rcx mov rdx, [rsp+218h+var_200] cmp rax, rdx jnz loc_39EC8 loc_39F73: imul rdx, [rsp+218h+var_218] mov rax, rdx shl rax, 7 lea rax, [rax+rdx*8] add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39F95: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNPerRowQkK0; "n_per_row%QK_K == 0" mov esi, 1273h xor eax, eax call _ggml_abort
long long quantize_iq4_xs(long long a1, _WORD *a2, long long a3, long long a4, long long a5, int a6) { long long v8; // rax char *v9; // r11 long long v10; // r13 long long v11; // r14 long long v12; // rax char *v13; // rbx long long v15; // [rsp+0h] [rbp-218h] long long v16; // [rsp+10h] [rbp-208h] long long v17; // [rsp+18h] [rbp-200h] long long v18; // [rsp+20h] [rbp-1F8h] long long v19; // [rsp+28h] [rbp-1F0h] _WORD *v20; // [rsp+30h] [rbp-1E8h] long long v21; // [rsp+38h] [rbp-1E0h] unsigned int v22[8]; // [rsp+40h] [rbp-1D8h] BYREF char v23; // [rsp+60h] [rbp-1B8h] BYREF char v24[312]; // [rsp+E0h] [rbp-138h] BYREF if ( (_BYTE)a4 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", 4723, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"n_per_row%QK_K == 0", a5, a6); v15 = a4 >> 8; if ( a3 > 0 ) { v8 = 0LL; v9 = &v23; v17 = a3; v16 = 4 * a4; v21 = a5; do { v18 = v8; v10 = v15; v11 = a5; v19 = a1; v20 = a2; if ( v15 > 0 ) { do { v12 = v11; if ( !a5 ) v12 = 0LL; v13 = v9; quantize_row_iq4_nl_impl( 0x100u, a1, a2, (long long)(a2 + 4), a2 + 1, (long long)(a2 + 2), v22, (long long)v9, (long long)v24, v12, 7); a5 = v21; v9 = v13; a2 += 68; a1 += 1024LL; v11 += 1024LL; --v10; } while ( v10 ); } a2 = &v20[68 * v15]; v8 = v18 + 1; a1 = v16 + v19; a3 = v17; } while ( v18 + 1 != v17 ); } return 136 * v15 * a3; }
quantize_iq4_xs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 TEST CL,CL JNZ 0x00139f95 MOV RAX,RCX SAR RAX,0x8 MOV qword ptr [RSP],RAX TEST RDX,RDX JLE 0x00139f73 MOV R12,RSI MOV RBP,RDI MOV R9,qword ptr [RSP] MOV RAX,R9 SHL RAX,0x7 LEA RAX,[RAX + R9*0x8] MOV qword ptr [RSP + 0x8],RAX SHL RCX,0x2 XOR EAX,EAX LEA R15,[RSP + 0xe0] LEA R11,[RSP + 0x60] LEA RBX,[RSP + 0x40] MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x38],R8 LAB_00139ec8: MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP] MOV R13,RAX MOV R14,R8 MOV qword ptr [RSP + 0x28],RBP MOV qword ptr [RSP + 0x30],R12 TEST RAX,RAX JLE 0x00139f46 LAB_00139ee6: TEST R8,R8 MOV RAX,R14 CMOVZ RAX,R8 LEA RCX,[R12 + 0x8] LEA R8,[R12 + 0x2] LEA R9,[R12 + 0x4] SUB RSP,0x8 MOV EDI,0x100 MOV RSI,RBP MOV RDX,R12 PUSH 0x7 PUSH RAX PUSH R15 PUSH R11 PUSH RBX MOV RBX,R11 CALL 0x001394d6 MOV EAX,0x400 MOV R8,qword ptr [RSP + 0x68] MOV R11,RBX LEA RBX,[RSP + 0x70] ADD RSP,0x30 ADD R12,0x88 ADD RBP,RAX ADD R14,RAX DEC R13 JNZ 0x00139ee6 LAB_00139f46: MOV R12,qword ptr [RSP + 0x30] ADD R12,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x20] INC RAX MOV RCX,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0x28] ADD RBP,RCX MOV RDX,qword ptr [RSP + 0x18] CMP RAX,RDX JNZ 0x00139ec8 LAB_00139f73: IMUL RDX,qword ptr [RSP] MOV RAX,RDX SHL RAX,0x7 LEA RAX,[RAX + RDX*0x8] ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139f95: LEA RDI,[0x159568] LEA RDX,[0x14a65a] LEA RCX,[0x159641] MOV ESI,0x1273 XOR EAX,EAX CALL 0x00117c70
long quantize_iq4_xs(long param_1,long param_2,long param_3,long param_4,long param_5) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; int1 local_1d8 [32]; int1 local_1b8 [128]; int1 local_138 [264]; if ((char)param_4 == '\0') { lVar1 = param_4 >> 8; if (0 < param_3) { lVar3 = 0; do { lVar4 = param_1; lVar5 = param_2; lVar6 = lVar1; lVar7 = param_5; if (0 < lVar1) { do { lVar2 = lVar7; if (param_5 == 0) { lVar2 = param_5; } quantize_row_iq4_nl_impl (0x100,lVar4,lVar5,lVar5 + 8,lVar5 + 2,lVar5 + 4,local_1d8,local_1b8,local_138 ,lVar2,7); lVar5 = lVar5 + 0x88; lVar4 = lVar4 + 0x400; lVar7 = lVar7 + 0x400; lVar6 = lVar6 + -1; } while (lVar6 != 0); } param_2 = param_2 + lVar1 * 0x88; lVar3 = lVar3 + 1; param_1 = param_1 + param_4 * 4; } while (lVar3 != param_3); } return param_3 * lVar1 * 0x88; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", 0x1273,"GGML_ASSERT(%s) failed","n_per_row%QK_K == 0"); }
2,322
quantize_iq4_xs
ngxson[P]ggml-easy/ggml/src/ggml-quants.c
size_t quantize_iq4_xs(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) { GGML_ASSERT(n_per_row%QK_K == 0); int64_t nblock = n_per_row/QK_K; char * qrow = (char *)dst; uint8_t L[QK_K]; float weight[32]; float scales[QK_K/32]; for (int64_t row = 0; row < nrow; ++row) { block_iq4_xs * iq4 = (block_iq4_xs *)qrow; for (int ibl = 0; ibl < nblock; ++ibl) { const float * qw = quant_weights ? quant_weights + QK_K*ibl : NULL; quantize_row_iq4_nl_impl(QK_K, 32, src + QK_K*ibl, &iq4[ibl].d, iq4[ibl].qs, &iq4[ibl].scales_h, iq4[ibl].scales_l, scales, weight, L, kvalues_iq4nl, qw, 7); } src += n_per_row; qrow += nblock*sizeof(block_iq4_xs); } return nrow * nblock * sizeof(block_iq4_xs); }
O3
c
quantize_iq4_xs: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 testb %cl, %cl jne 0x39deb movq %rcx, %rax sarq $0x8, %rax movq %rax, (%rsp) testq %rdx, %rdx jle 0x39dc9 movq %rsi, %r12 movq %rdi, %rbp movq (%rsp), %r9 movq %r9, %rax shlq $0x7, %rax leaq (%rax,%r9,8), %rax movq %rax, 0x8(%rsp) shlq $0x2, %rcx xorl %eax, %eax leaq 0xe0(%rsp), %r15 leaq 0x60(%rsp), %r11 leaq 0x40(%rsp), %rbx movq %rdx, 0x18(%rsp) movq %rcx, 0x10(%rsp) movq %r8, 0x38(%rsp) movq %rax, 0x20(%rsp) movq (%rsp), %rax movq %rax, %r13 movq %r8, %r14 movq %rbp, 0x28(%rsp) movq %r12, 0x30(%rsp) testq %rax, %rax jle 0x39d9c testq %r8, %r8 movq %r14, %rax cmoveq %r8, %rax leaq 0x8(%r12), %rcx leaq 0x2(%r12), %r8 leaq 0x4(%r12), %r9 subq $0x8, %rsp movl $0x100, %edi # imm = 0x100 movq %rbp, %rsi movq %r12, %rdx pushq $0x7 pushq %rax pushq %r15 pushq %r11 pushq %rbx movq %r11, %rbx callq 0x3935c movl $0x400, %eax # imm = 0x400 movq 0x68(%rsp), %r8 movq %rbx, %r11 leaq 0x70(%rsp), %rbx addq $0x30, %rsp addq $0x88, %r12 addq %rax, %rbp addq %rax, %r14 decq %r13 jne 0x39d3c movq 0x30(%rsp), %r12 addq 0x8(%rsp), %r12 movq 0x20(%rsp), %rax incq %rax movq 0x10(%rsp), %rcx movq 0x28(%rsp), %rbp addq %rcx, %rbp movq 0x18(%rsp), %rdx cmpq %rdx, %rax jne 0x39d1e imulq (%rsp), %rdx movq %rdx, %rax shlq $0x7, %rax leaq (%rax,%rdx,8), %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1f736(%rip), %rdi # 0x59528 leaq 0x10865(%rip), %rdx # 0x4a65e leaq 0x1f801(%rip), %rcx # 0x59601 movl $0x1273, %esi # imm = 0x1273 xorl %eax, %eax callq 0x17c60
quantize_iq4_xs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h test cl, cl jnz loc_39DEB mov rax, rcx sar rax, 8 mov [rsp+218h+var_218], rax test rdx, rdx jle loc_39DC9 mov r12, rsi mov rbp, rdi mov r9, [rsp+218h+var_218] mov rax, r9 shl rax, 7 lea rax, [rax+r9*8] mov [rsp+218h+var_210], rax shl rcx, 2 xor eax, eax lea r15, [rsp+218h+var_138] lea r11, [rsp+218h+var_1B8] lea rbx, [rsp+218h+var_1D8] mov [rsp+218h+var_200], rdx mov [rsp+218h+var_208], rcx mov [rsp+218h+var_1E0], r8 loc_39D1E: mov [rsp+218h+var_1F8], rax mov rax, [rsp+218h+var_218] mov r13, rax mov r14, r8 mov [rsp+218h+var_1F0], rbp mov [rsp+218h+var_1E8], r12 test rax, rax jle short loc_39D9C loc_39D3C: test r8, r8 mov rax, r14 cmovz rax, r8 lea rcx, [r12+8] lea r8, [r12+2] lea r9, [r12+4] sub rsp, 8 mov edi, 100h mov rsi, rbp mov rdx, r12 push 7 push rax push r15 push r11 push rbx mov rbx, r11 call quantize_row_iq4_nl_impl mov eax, 400h mov r8, [rsp+248h+var_1E0] mov r11, rbx lea rbx, [rsp+248h+var_1D8] add rsp, 30h add r12, 88h add rbp, rax add r14, rax dec r13 jnz short loc_39D3C loc_39D9C: mov r12, [rsp+218h+var_1E8] add r12, [rsp+218h+var_210] mov rax, [rsp+218h+var_1F8] inc rax mov rcx, [rsp+218h+var_208] mov rbp, [rsp+218h+var_1F0] add rbp, rcx mov rdx, [rsp+218h+var_200] cmp rax, rdx jnz loc_39D1E loc_39DC9: imul rdx, [rsp+218h+var_218] mov rax, rdx shl rax, 7 lea rax, [rax+rdx*8] add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39DEB: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNPerRowQkK0; "n_per_row%QK_K == 0" mov esi, 1273h xor eax, eax call _ggml_abort
long long quantize_iq4_xs(long long a1, _WORD *a2, long long a3, long long a4, long long a5, int a6) { long long v8; // rax char *v9; // r11 long long v10; // r13 long long v11; // r14 long long v12; // rax char *v13; // rbx long long v15; // [rsp+0h] [rbp-218h] long long v16; // [rsp+10h] [rbp-208h] long long v17; // [rsp+18h] [rbp-200h] long long v18; // [rsp+20h] [rbp-1F8h] long long v19; // [rsp+28h] [rbp-1F0h] _WORD *v20; // [rsp+30h] [rbp-1E8h] long long v21; // [rsp+38h] [rbp-1E0h] unsigned int v22[8]; // [rsp+40h] [rbp-1D8h] BYREF char v23; // [rsp+60h] [rbp-1B8h] BYREF char v24[312]; // [rsp+E0h] [rbp-138h] BYREF if ( (_BYTE)a4 ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", 4723, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"n_per_row%QK_K == 0", a5, a6); v15 = a4 >> 8; if ( a3 > 0 ) { v8 = 0LL; v9 = &v23; v17 = a3; v16 = 4 * a4; v21 = a5; do { v18 = v8; v10 = v15; v11 = a5; v19 = a1; v20 = a2; if ( v15 > 0 ) { do { v12 = v11; if ( !a5 ) v12 = 0LL; v13 = v9; quantize_row_iq4_nl_impl( 0x100u, a1, a2, (long long)(a2 + 4), a2 + 1, (long long)(a2 + 2), v22, (long long)v9, (long long)v24, v12, 7); a5 = v21; v9 = v13; a2 += 68; a1 += 1024LL; v11 += 1024LL; --v10; } while ( v10 ); } a2 = &v20[68 * v15]; v8 = v18 + 1; a1 = v16 + v19; a3 = v17; } while ( v18 + 1 != v17 ); } return 136 * v15 * a3; }
quantize_iq4_xs: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 TEST CL,CL JNZ 0x00139deb MOV RAX,RCX SAR RAX,0x8 MOV qword ptr [RSP],RAX TEST RDX,RDX JLE 0x00139dc9 MOV R12,RSI MOV RBP,RDI MOV R9,qword ptr [RSP] MOV RAX,R9 SHL RAX,0x7 LEA RAX,[RAX + R9*0x8] MOV qword ptr [RSP + 0x8],RAX SHL RCX,0x2 XOR EAX,EAX LEA R15,[RSP + 0xe0] LEA R11,[RSP + 0x60] LEA RBX,[RSP + 0x40] MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x38],R8 LAB_00139d1e: MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP] MOV R13,RAX MOV R14,R8 MOV qword ptr [RSP + 0x28],RBP MOV qword ptr [RSP + 0x30],R12 TEST RAX,RAX JLE 0x00139d9c LAB_00139d3c: TEST R8,R8 MOV RAX,R14 CMOVZ RAX,R8 LEA RCX,[R12 + 0x8] LEA R8,[R12 + 0x2] LEA R9,[R12 + 0x4] SUB RSP,0x8 MOV EDI,0x100 MOV RSI,RBP MOV RDX,R12 PUSH 0x7 PUSH RAX PUSH R15 PUSH R11 PUSH RBX MOV RBX,R11 CALL 0x0013935c MOV EAX,0x400 MOV R8,qword ptr [RSP + 0x68] MOV R11,RBX LEA RBX,[RSP + 0x70] ADD RSP,0x30 ADD R12,0x88 ADD RBP,RAX ADD R14,RAX DEC R13 JNZ 0x00139d3c LAB_00139d9c: MOV R12,qword ptr [RSP + 0x30] ADD R12,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x20] INC RAX MOV RCX,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0x28] ADD RBP,RCX MOV RDX,qword ptr [RSP + 0x18] CMP RAX,RDX JNZ 0x00139d1e LAB_00139dc9: IMUL RDX,qword ptr [RSP] MOV RAX,RDX SHL RAX,0x7 LEA RAX,[RAX + RDX*0x8] ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139deb: LEA RDI,[0x159528] LEA RDX,[0x14a65e] LEA RCX,[0x159601] MOV ESI,0x1273 XOR EAX,EAX CALL 0x00117c60
long quantize_iq4_xs(long param_1,long param_2,long param_3,long param_4,long param_5) { long lVar1; long lVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; int1 local_1d8 [32]; int1 local_1b8 [128]; int1 local_138 [264]; if ((char)param_4 == '\0') { lVar1 = param_4 >> 8; if (0 < param_3) { lVar3 = 0; do { lVar4 = param_1; lVar5 = param_2; lVar6 = lVar1; lVar7 = param_5; if (0 < lVar1) { do { lVar2 = lVar7; if (param_5 == 0) { lVar2 = param_5; } quantize_row_iq4_nl_impl (0x100,lVar4,lVar5,lVar5 + 8,lVar5 + 2,lVar5 + 4,local_1d8,local_1b8,local_138 ,lVar2,7); lVar5 = lVar5 + 0x88; lVar4 = lVar4 + 0x400; lVar7 = lVar7 + 0x400; lVar6 = lVar6 + -1; } while (lVar6 != 0); } param_2 = param_2 + lVar1 * 0x88; lVar3 = lVar3 + 1; param_1 = param_1 + param_4 * 4; } while (lVar3 != param_3); } return param_3 * lVar1 * 0x88; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-quants.c", 0x1273,"GGML_ASSERT(%s) failed","n_per_row%QK_K == 0"); }
2,323
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!expr) throw std::runtime_error("ExpressionNode.expr is null"); auto result = expr->evaluate(context); if (result.is_string()) { out << result.get<std::string>(); } else if (result.is_boolean()) { out << (result.get<bool>() ? "True" : "False"); } else if (!result.is_null()) { out << result.dump(); } }
O1
cpp
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0x7d7bb leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x66e66 movzbl 0x40(%r14), %eax cmpl $0x4, %eax je 0x7d6ac cmpl $0x3, %eax jne 0x7d6db leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x68002 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x197a0 jmp 0x7d71f leaq 0x28(%rsp), %rdi callq 0x67f08 leaq 0x3fdf3(%rip), %rcx # 0xbd4b0 leaq 0x3fdf1(%rip), %rsi # 0xbd4b5 testb %al, %al cmovneq %rcx, %rsi movzbl %al, %edx xorq $0x5, %rdx movq %rbx, %rdi callq 0x197a0 jmp 0x7d73a testb %al, %al jne 0x7d6f7 cmpq $0x0, 0x48(%rsp) jne 0x7d6f7 cmpq $0x0, 0x38(%rsp) jne 0x7d6f7 cmpq $0x0, 0x58(%rsp) je 0x7d73a leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x67450 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x197a0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7d73a movq 0x18(%rsp), %rsi incq %rsi callq 0x196d0 leaq 0x68(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x3175a movq %rbx, %rdi callq 0x36dc4 movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x7d75f callq 0x31024 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x7d76e callq 0x31024 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x7d77d callq 0x31024 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x7d7b3 movq 0x7080a(%rip), %rax # 0xedf98 cmpb $0x0, (%rax) je 0x7d79e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7d7a8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7d7b3 movq (%rdi), %rax callq *0x18(%rax) addq $0x78, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x40c63(%rip), %rsi # 0xbe432 movq %rax, %rdi callq 0x19280 movq 0x70812(%rip), %rsi # 0xedff0 movq 0x7078b(%rip), %rdx # 0xedf70 movq %r14, %rdi callq 0x19ba0 jmp 0x7d7f1 jmp 0x7d820 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7d823 movq 0x18(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0x7d823 jmp 0x7d820 movq %rax, %rbx movq %r14, %rdi callq 0x19510 jmp 0x7d82d movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x6715c movq %rbx, %rdi callq 0x19c00 nop
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r14 push rbx sub rsp, 78h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_7D7BB lea r14, [rsp+88h+var_60] mov rdi, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) movzx eax, byte ptr [r14+40h] cmp eax, 4 jz short loc_7D6AC cmp eax, 3 jnz short loc_7D6DB lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_7D71F loc_7D6AC: lea rdi, [rsp+88h+var_60] call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse_0; "False" test al, al cmovnz rsi, rcx movzx edx, al xor rdx, 5 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_7D73A loc_7D6DB: test al, al jnz short loc_7D6F7 cmp [rsp+88h+var_40], 0 jnz short loc_7D6F7 cmp [rsp+88h+var_50], 0 jnz short loc_7D6F7 cmp [rsp+88h+var_30], 0 jz short loc_7D73A loc_7D6F7: lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_7D71F: lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7D73A mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7D73A: lea rbx, [rsp+88h+var_20] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_7D75F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7D75F: mov rdi, [rsp+88h+var_38] test rdi, rdi jz short loc_7D76E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7D76E: mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_7D77D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7D77D: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_7D7B3 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7D79E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7D7A8 loc_7D79E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7D7A8: cmp eax, 1 jnz short loc_7D7B3 mov rax, [rdi] call qword ptr [rax+18h] loc_7D7B3: add rsp, 78h pop rbx pop r14 retn loc_7D7BB: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpressionnode; "ExpressionNode.expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_7D7F1 jmp short loc_7D820 loc_7D7F1: mov rbx, rax lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7D823 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7D823 jmp short loc_7D820 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7D82D loc_7D820: mov rbx, rax loc_7D823: lea rdi, [rsp+88h+var_60]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7D82D: mov rdi, rbx call __Unwind_Resume
long long minja::ExpressionNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi unsigned __int8 v4; // al const char *v5; // rsi long long result; // rax long long v7; // rdi std::runtime_error *exception; // r14 long long *v9; // [rsp+8h] [rbp-80h] BYREF long long v10; // [rsp+10h] [rbp-78h] long long v11; // [rsp+18h] [rbp-70h] BYREF long long v12; // [rsp+28h] [rbp-60h] BYREF long long v13; // [rsp+30h] [rbp-58h] long long v14; // [rsp+38h] [rbp-50h] volatile signed __int32 *v15; // [rsp+40h] [rbp-48h] long long v16; // [rsp+48h] [rbp-40h] volatile signed __int32 *v17; // [rsp+50h] [rbp-38h] long long v18; // [rsp+58h] [rbp-30h] volatile signed __int32 *v19; // [rsp+60h] [rbp-28h] char v20[32]; // [rsp+68h] [rbp-20h] BYREF v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)&v12, v3); if ( v20[0] == 4 ) { v4 = minja::Value::get<bool>((long long)&v12); v5 = "False"; if ( v4 ) v5 = "True"; std::__ostream_insert<char,std::char_traits<char>>(a2, v5, v4 ^ 5LL); } else { if ( v20[0] == 3 ) { minja::Value::get<std::string>((long long)&v9, &v12); std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10); } else { if ( !v20[0] && !v16 && !v14 && !v18 ) goto LABEL_15; minja::Value::dump[abi:cxx11]((long long)&v9, (long long)&v12, 0xFFFFFFFF, 0); std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10); } if ( v9 != &v11 ) operator delete(v9, v11 + 1); } LABEL_15: 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(v20); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v17 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); if ( v15 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); v7 = v13; if ( v13 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v13 + 12); *(_DWORD *)(v13 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } return result; }
do_render: PUSH R14 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x0017d7bb LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00166e66 MOVZX EAX,byte ptr [R14 + 0x40] CMP EAX,0x4 JZ 0x0017d6ac CMP EAX,0x3 JNZ 0x0017d6db LAB_0017d689: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x00168002 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0017d6a2: MOV RDI,RBX CALL 0x001197a0 JMP 0x0017d71f LAB_0017d6ac: LEA RDI,[RSP + 0x28] CALL 0x00167f08 LEA RCX,[0x1bd4b0] LEA RSI,[0x1bd4b5] TEST AL,AL CMOVNZ RSI,RCX MOVZX EDX,AL XOR RDX,0x5 MOV RDI,RBX CALL 0x001197a0 JMP 0x0017d73a LAB_0017d6db: TEST AL,AL JNZ 0x0017d6f7 CMP qword ptr [RSP + 0x48],0x0 JNZ 0x0017d6f7 CMP qword ptr [RSP + 0x38],0x0 JNZ 0x0017d6f7 CMP qword ptr [RSP + 0x58],0x0 JZ 0x0017d73a LAB_0017d6f7: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00167450 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0017d717: MOV RDI,RBX CALL 0x001197a0 LAB_0017d71f: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0017d73a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196d0 LAB_0017d73a: LEA RBX,[RSP + 0x68] MOV RDI,RBX XOR ESI,ESI CALL 0x0013175a MOV RDI,RBX CALL 0x00136dc4 MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0017d75f CALL 0x00131024 LAB_0017d75f: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0017d76e CALL 0x00131024 LAB_0017d76e: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0017d77d CALL 0x00131024 LAB_0017d77d: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0017d7b3 MOV RAX,qword ptr [0x001edf98] CMP byte ptr [RAX],0x0 JZ 0x0017d79e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017d7a8 LAB_0017d79e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017d7a8: CMP EAX,0x1 JNZ 0x0017d7b3 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017d7b3: ADD RSP,0x78 POP RBX POP R14 RET LAB_0017d7bb: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_0017d7c8: LEA RSI,[0x1be432] MOV RDI,RAX CALL 0x00119280 LAB_0017d7d7: MOV RSI,qword ptr [0x001edff0] MOV RDX,qword ptr [0x001edf70] MOV RDI,R14 CALL 0x00119ba0
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; bool bVar2; int iVar3; runtime_error *this; char *pcVar4; long *local_80; long local_78; long local_70 [2]; Expression local_60 [8]; long *local_58; long local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; long local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; long local_30; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28; data local_20 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017d7c8 to 0017d7d6 has its CatchHandler @ 0017d813 */ std::runtime_error::runtime_error(this,"ExpressionNode.expr is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001edff0,PTR__runtime_error_001edf70); } Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20)); if (local_20[0] == (data)0x4) { /* try { // try from 0017d6ac to 0017d6d8 has its CatchHandler @ 0017d820 */ bVar2 = Value::get<bool>((Value *)local_60); pcVar4 = "False"; if (bVar2) { pcVar4 = "True"; } std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,pcVar4,(ulong)bVar2 ^ 5); } else { if (local_20[0] == (data)0x3) { /* try { // try from 0017d689 to 0017d697 has its CatchHandler @ 0017d811 */ Value::get<std::__cxx11::string>(); /* try { // try from 0017d6a2 to 0017d6a9 has its CatchHandler @ 0017d7f1 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,(char *)local_80,local_78); } else { if ((((local_20[0] == (data)0x0) && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0)) goto LAB_0017d73a; /* try { // try from 0017d6f7 to 0017d70c has its CatchHandler @ 0017d7ef */ Value::dump_abi_cxx11_((int)&local_80,SUB81(local_60,0)); /* try { // try from 0017d717 to 0017d71e has its CatchHandler @ 0017d7ed */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,(char *)local_80,local_78); } if (local_80 != local_70) { operator_delete(local_80,local_70[0] + 1); } } LAB_0017d73a: nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_20,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_20); if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28); } if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (long *)0x0) { if (*PTR___libc_single_threaded_001edf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_58 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_58 + 0xc); *(int *)((long)local_58 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_58 + 0x18))(); } } return; }
2,324
mysql_free_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_free_result(MYSQL_RES *result) { if (result) { if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { result->handle->methods->db_skip_result(result->handle); result->handle->status=MYSQL_STATUS_READY; } free_rows(result->data); if (result->fields) ma_free_root(&result->field_alloc,MYF(0)); if (result->row) free(result->row); free(result); } return; }
O0
c
mysql_free_result: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x172ca movq -0x8(%rbp), %rax cmpq $0x0, 0x78(%rax) je 0x17282 movq -0x8(%rbp), %rax movq 0x78(%rax), %rax cmpl $0x2, 0x488(%rax) jne 0x17282 movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq 0x4d0(%rax), %rax movq 0x18(%rax), %rax movq -0x8(%rbp), %rcx movq 0x78(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movl $0x0, 0x488(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x16540 movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x172a9 movq -0x8(%rbp), %rdi addq $0x28, %rdi xorl %esi, %esi callq 0x24d40 movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x172c1 movq -0x8(%rbp), %rax movq 0x60(%rax), %rdi callq 0x13520 movq -0x8(%rbp), %rdi callq 0x13520 addq $0x10, %rsp popq %rbp retq
mysql_free_result: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz loc_172CA mov rax, [rbp+var_8] cmp qword ptr [rax+78h], 0 jz short loc_17282 mov rax, [rbp+var_8] mov rax, [rax+78h] cmp dword ptr [rax+488h], 2 jnz short loc_17282 mov rax, [rbp+var_8] mov rax, [rax+78h] mov rax, [rax+4D0h] mov rax, [rax+18h] mov rcx, [rbp+var_8] mov rdi, [rcx+78h] call rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov dword ptr [rax+488h], 0 loc_17282: mov rax, [rbp+var_8] mov rdi, [rax+18h] call free_rows mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_172A9 mov rdi, [rbp+var_8] add rdi, 28h ; '(' xor esi, esi call ma_free_root loc_172A9: mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_172C1 mov rax, [rbp+var_8] mov rdi, [rax+60h] call _free loc_172C1: mov rdi, [rbp+var_8] call _free loc_172CA: add rsp, 10h pop rbp retn
long long mysql_free_result(_QWORD *a1) { long long result; // rax if ( a1 ) { if ( a1[15] && *(_DWORD *)(a1[15] + 1160LL) == 2 ) { (*(void ( **)(_QWORD))(*(_QWORD *)(a1[15] + 1232LL) + 24LL))(a1[15]); *(_DWORD *)(a1[15] + 1160LL) = 0; } free_rows(a1[3]); if ( a1[2] ) ma_free_root(a1 + 5, 0LL); if ( a1[12] ) free(a1[12]); return free(a1); } return result; }
mysql_free_result: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x001172ca MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x78],0x0 JZ 0x00117282 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] CMP dword ptr [RAX + 0x488],0x2 JNZ 0x00117282 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x78] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV dword ptr [RAX + 0x488],0x0 LAB_00117282: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x00116540 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001172a9 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 XOR ESI,ESI CALL 0x00124d40 LAB_001172a9: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JZ 0x001172c1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x60] CALL 0x00113520 LAB_001172c1: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00113520 LAB_001172ca: ADD RSP,0x10 POP RBP RET
void mysql_free_result(void *param_1) { if (param_1 != (void *)0x0) { if ((*(long *)((long)param_1 + 0x78) != 0) && (*(int *)(*(long *)((long)param_1 + 0x78) + 0x488) == 2)) { (**(code **)(*(long *)(*(long *)((long)param_1 + 0x78) + 0x4d0) + 0x18)) (*(int8 *)((long)param_1 + 0x78)); *(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0; } free_rows(*(int8 *)((long)param_1 + 0x18)); if (*(long *)((long)param_1 + 0x10) != 0) { ma_free_root((long)param_1 + 0x28,0); } if (*(long *)((long)param_1 + 0x60) != 0) { free(*(void **)((long)param_1 + 0x60)); } free(param_1); } return; }
2,325
mysql_free_result
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_free_result(MYSQL_RES *result) { if (result) { if (result->handle && result->handle->status == MYSQL_STATUS_USE_RESULT) { result->handle->methods->db_skip_result(result->handle); result->handle->status=MYSQL_STATUS_READY; } free_rows(result->data); if (result->fields) ma_free_root(&result->field_alloc,MYF(0)); if (result->row) free(result->row); free(result); } return; }
O3
c
mysql_free_result: testq %rdi, %rdi je 0x16219 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x78(%rdi), %rdi testq %rdi, %rdi je 0x161e2 cmpl $0x2, 0x488(%rdi) jne 0x161e2 movq 0x4d0(%rdi), %rax callq *0x18(%rax) movq 0x78(%rbx), %rax movl $0x0, 0x488(%rax) movq 0x18(%rbx), %rdi callq 0x15942 cmpq $0x0, 0x10(%rbx) je 0x161fd leaq 0x28(%rbx), %rdi xorl %esi, %esi callq 0x1de3f movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x1620b callq 0x13570 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x13570 retq
mysql_free_result: test rdi, rdi jz short locret_16219 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+78h] test rdi, rdi jz short loc_161E2 cmp dword ptr [rdi+488h], 2 jnz short loc_161E2 mov rax, [rdi+4D0h] call qword ptr [rax+18h] mov rax, [rbx+78h] mov dword ptr [rax+488h], 0 loc_161E2: mov rdi, [rbx+18h] call free_rows cmp qword ptr [rbx+10h], 0 jz short loc_161FD lea rdi, [rbx+28h] xor esi, esi call ma_free_root loc_161FD: mov rdi, [rbx+60h] test rdi, rdi jz short loc_1620B call _free loc_1620B: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _free locret_16219: retn
long long mysql_free_result(_QWORD *a1) { long long v2; // rdi long long v3; // rdi long long result; // rax if ( a1 ) { v2 = a1[15]; if ( v2 && *(_DWORD *)(v2 + 1160) == 2 ) { (*(void ( **)(long long))(*(_QWORD *)(v2 + 1232) + 24LL))(v2); *(_DWORD *)(a1[15] + 1160LL) = 0; } free_rows(a1[3]); if ( a1[2] ) ma_free_root(a1 + 5, 0LL); v3 = a1[12]; if ( v3 ) free(v3); return free(a1); } return result; }
mysql_free_result: TEST RDI,RDI JZ 0x00116219 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x78] TEST RDI,RDI JZ 0x001161e2 CMP dword ptr [RDI + 0x488],0x2 JNZ 0x001161e2 MOV RAX,qword ptr [RDI + 0x4d0] CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBX + 0x78] MOV dword ptr [RAX + 0x488],0x0 LAB_001161e2: MOV RDI,qword ptr [RBX + 0x18] CALL 0x00115942 CMP qword ptr [RBX + 0x10],0x0 JZ 0x001161fd LEA RDI,[RBX + 0x28] XOR ESI,ESI CALL 0x0011de3f LAB_001161fd: MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x0011620b CALL 0x00113570 LAB_0011620b: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00113570 LAB_00116219: RET
void mysql_free_result(void *param_1) { long lVar1; if (param_1 != (void *)0x0) { lVar1 = *(long *)((long)param_1 + 0x78); if ((lVar1 != 0) && (*(int *)(lVar1 + 0x488) == 2)) { (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x18))(); *(int4 *)(*(long *)((long)param_1 + 0x78) + 0x488) = 0; } free_rows(*(int8 *)((long)param_1 + 0x18)); if (*(long *)((long)param_1 + 0x10) != 0) { ma_free_root((long)param_1 + 0x28,0); } if (*(void **)((long)param_1 + 0x60) != (void *)0x0) { free(*(void **)((long)param_1 + 0x60)); } free(param_1); return; } return; }
2,326
ma_read_rnd_mempack_record
eloqsql/storage/maria/ma_packrec.c
static int _ma_read_rnd_mempack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks __attribute__((unused))) { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; uchar *pos,*start; DBUG_ENTER("_ma_read_rnd_mempack_record"); if (filepos >= share->state.state.data_file_length) { my_errno=HA_ERR_END_OF_FILE; goto err; } if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, (uchar*) (start= share->file_map + filepos)))) goto err; #ifndef DBUG_OFF if (block_info.rec_len > info->s->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif info->packed_length=block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O0
c
ma_read_rnd_mempack_record: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movb %al, -0x81(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x80(%rbp), %rax movq -0x90(%rbp), %rcx cmpq 0x40(%rcx), %rax jb 0x3dcdb callq 0xc0d80 movl $0x89, (%rax) jmp 0x3ddb9 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x70(%rbp), %rcx addq $0x3a0, %rcx # imm = 0x3A0 movq -0x70(%rbp), %r8 addq $0x460, %r8 # imm = 0x460 movq -0x90(%rbp), %rax movq 0x5f0(%rax), %r9 addq -0x80(%rbp), %r9 movq %r9, -0xa0(%rbp) leaq -0x60(%rbp), %rdx callq 0x40410 movq %rax, -0x98(%rbp) cmpq $0x0, %rax jne 0x3dd34 jmp 0x3ddb9 movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x450(%rax) movq -0x80(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x80(%rbp), %rcx movq -0x98(%rbp), %rax movq -0xa0(%rbp), %rdx subq %rdx, %rax movl %eax, %eax addq %rax, %rcx addq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x78(%rbp), %rdx movq -0x98(%rbp), %rcx movq -0x48(%rbp), %r8 callq 0x3d460 movl %eax, -0x64(%rbp) jmp 0x3ddc5 jmp 0x3ddbb callq 0xc0d80 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0xa4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3ddef movl -0xa4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x272b0 nopw %cs:(%rax,%rax)
_ma_read_rnd_mempack_record: push rbp mov rbp, rsp sub rsp, 0B0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_81], al mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_90] cmp rax, [rcx+40h] jb short loc_3DCDB call _my_thread_var mov dword ptr [rax], 89h jmp loc_3DDB9 loc_3DCDB: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rcx, [rbp+var_70] add rcx, 3A0h mov r8, [rbp+var_70] add r8, 460h mov rax, [rbp+var_90] mov r9, [rax+5F0h] add r9, [rbp+var_80] mov [rbp+var_A0], r9 lea rdx, [rbp+var_60] call _ma_mempack_get_block_info mov [rbp+var_98], rax cmp rax, 0 jnz short loc_3DD34 jmp loc_3DDB9 loc_3DD34: mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+450h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_70] mov [rax+98h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_98] mov rdx, [rbp+var_A0] sub rax, rdx mov eax, eax add rcx, rax add rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+0A0h], rcx mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 82h mov [rax+624h], ecx mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rdx, [rbp+var_78] mov rcx, [rbp+var_98] mov r8, [rbp+var_48] call _ma_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_3DDC5 loc_3DDB9: jmp short $+2 loc_3DDBB: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_3DDC5: mov eax, [rbp+var_64] mov [rbp+var_A4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3DDEF mov eax, [rbp+var_A4] add rsp, 0B0h pop rbp retn loc_3DDEF: call ___stack_chk_fail
long long ma_read_rnd_mempack_record(_DWORD *a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+10h] [rbp-A0h] long long block_info; // [rsp+18h] [rbp-98h] _BYTE v8[24]; // [rsp+50h] [rbp-60h] BYREF long long v9; // [rsp+68h] [rbp-48h] unsigned long long v10; // [rsp+A8h] [rbp-8h] v10 = __readfsqword(0x28u); if ( a3 >= *(_QWORD *)(*(_QWORD *)a1 + 64LL) ) { *(_DWORD *)my_thread_var() = 137; return *(unsigned int *)my_thread_var(); } v4 = a3 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL); block_info = ma_mempack_get_block_info(a1, a1 + 164, v8, a1 + 232, a1 + 280, v4); if ( !block_info ) return *(unsigned int *)my_thread_var(); *((_QWORD *)a1 + 138) = v9; *((_QWORD *)a1 + 19) = a3; *((_QWORD *)a1 + 20) = v9 + (unsigned int)(block_info - v4) + a3; a1[393] |= 0x82u; return (unsigned int)ma_pack_rec_unpack(a1, (long long)(a1 + 164), a2, block_info, v9); }
_ma_read_rnd_mempack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RCX + 0x40] JC 0x0013dcdb CALL 0x001c0d80 MOV dword ptr [RAX],0x89 JMP 0x0013ddb9 LAB_0013dcdb: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x3a0 MOV R8,qword ptr [RBP + -0x70] ADD R8,0x460 MOV RAX,qword ptr [RBP + -0x90] MOV R9,qword ptr [RAX + 0x5f0] ADD R9,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0xa0],R9 LEA RDX,[RBP + -0x60] CALL 0x00140410 MOV qword ptr [RBP + -0x98],RAX CMP RAX,0x0 JNZ 0x0013dd34 JMP 0x0013ddb9 LAB_0013dd34: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x450],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0xa0] SUB RAX,RDX MOV EAX,EAX ADD RCX,RAX ADD RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x82 MOV dword ptr [RAX + 0x624],ECX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x98] MOV R8,qword ptr [RBP + -0x48] CALL 0x0013d460 MOV dword ptr [RBP + -0x64],EAX JMP 0x0013ddc5 LAB_0013ddb9: JMP 0x0013ddbb LAB_0013ddbb: CALL 0x001c0d80 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_0013ddc5: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013ddef MOV EAX,dword ptr [RBP + -0xa4] ADD RSP,0xb0 POP RBP RET LAB_0013ddef: CALL 0x001272b0
int4 _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3) { int8 uVar1; int4 *puVar2; long lVar3; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; long local_50; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(*param_1 + 0x40)) { uVar1 = *(int8 *)(*param_1 + 0x5f0); lVar3 = _ma_mempack_get_block_info (param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c); if (lVar3 != 0) { param_1[0x8a] = local_50; param_1[0x13] = param_3; param_1[0x14] = param_3 + (uint)((int)lVar3 - ((int)uVar1 + (int)param_3)) + local_50; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82; local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar3,local_50); goto LAB_0013ddc5; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } puVar2 = (int4 *)_my_thread_var(); local_6c = *puVar2; LAB_0013ddc5: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
2,327
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 0x2c7b7 movq %rdi, %rbx movaps 0x67976(%rip), %xmm0 # 0x940c0 movaps %xmm0, (%rsp) xorl %r15d, %r15d pushq $-0x1 popq %r12 xorl %ebp, %ebp cmpq $0x10, %r15 je 0x2c79b movl (%rsp,%r15), %r14d movq %rbx, %rdi callq 0x2c4b0 movl 0x14(%rbx), %eax leal -0x30(%rax), %edx cmpl $0xa, %edx jb 0x2c78e leal -0x41(%rax), %ecx cmpl $0x5, %ecx ja 0x2c781 addl $-0x37, %eax jmp 0x2c78c leal -0x61(%rax), %ecx cmpl $0x5, %ecx ja 0x2c7b2 addl $-0x57, %eax movl %eax, %edx movl %r14d, %ecx shll %cl, %edx addl %edx, %ebp addq $0x4, %r15 jmp 0x2c757 cmpl $0x10000, %ebp # imm = 0x10000 jae 0x2c7d3 movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %r12d, %ebp jmp 0x2c7a3 leaq 0x685c0(%rip), %rdi # 0x94d7e leaq 0x68605(%rip), %rdx # 0x94dca leaq 0x6930c(%rip), %rcx # 0x95ad8 movl $0x1d79, %esi # imm = 0x1D79 jmp 0x2c7ed leaq 0x685a4(%rip), %rdi # 0x94d7e leaq 0x685e9(%rip), %rdx # 0x94dca leaq 0x692ff(%rip), %rcx # 0x95ae7 movl $0x1d93, %esi # imm = 0x1D93 xorl %eax, %eax callq 0x21b30
_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_2C7B7 mov rbx, rdi movaps xmm0, cs:xmmword_940C0 movaps [rsp+38h+var_38], xmm0 xor r15d, r15d push 0FFFFFFFFFFFFFFFFh pop r12 xor ebp, ebp loc_2C757: cmp r15, 10h jz short loc_2C79B 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_2C78E lea ecx, [rax-41h] cmp ecx, 5 ja short loc_2C781 add eax, 0FFFFFFC9h jmp short loc_2C78C loc_2C781: lea ecx, [rax-61h] cmp ecx, 5 ja short loc_2C7B2 add eax, 0FFFFFFA9h loc_2C78C: mov edx, eax loc_2C78E: mov ecx, r14d shl edx, cl add ebp, edx add r15, 4 jmp short loc_2C757 loc_2C79B: cmp ebp, 10000h jnb short loc_2C7D3 loc_2C7A3: mov eax, ebp add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2C7B2: mov ebp, r12d jmp short loc_2C7A3 loc_2C7B7: 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_2C7ED loc_2C7D3: 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_2C7ED: 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_940C0; 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 0x0012c7b7 MOV RBX,RDI MOVAPS XMM0,xmmword ptr [0x001940c0] MOVAPS xmmword ptr [RSP],XMM0 XOR R15D,R15D PUSH -0x1 POP R12 XOR EBP,EBP LAB_0012c757: CMP R15,0x10 JZ 0x0012c79b MOV R14D,dword ptr [RSP + R15*0x1] MOV RDI,RBX CALL 0x0012c4b0 MOV EAX,dword ptr [RBX + 0x14] LEA EDX,[RAX + -0x30] CMP EDX,0xa JC 0x0012c78e LEA ECX,[RAX + -0x41] CMP ECX,0x5 JA 0x0012c781 ADD EAX,-0x37 JMP 0x0012c78c LAB_0012c781: LEA ECX,[RAX + -0x61] CMP ECX,0x5 JA 0x0012c7b2 ADD EAX,-0x57 LAB_0012c78c: MOV EDX,EAX LAB_0012c78e: MOV ECX,R14D SHL EDX,CL ADD EBP,EDX ADD R15,0x4 JMP 0x0012c757 LAB_0012c79b: CMP EBP,0x10000 JNC 0x0012c7d3 LAB_0012c7a3: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012c7b2: MOV EBP,R12D JMP 0x0012c7a3 LAB_0012c7b7: LEA RDI,[0x194d7e] LEA RDX,[0x194dca] LEA RCX,[0x195ad8] MOV ESI,0x1d79 JMP 0x0012c7ed LAB_0012c7d3: LEA RDI,[0x194d7e] LEA RDX,[0x194dca] LEA RCX,[0x195ae7] MOV ESI,0x1d93 LAB_0012c7ed: XOR EAX,EAX CALL 0x00121b30
/* 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_001940c0; uStack_30 = _UNK_001940c8; 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); }
2,328
ankerl::nanobench::detail::getEnv(char const*)
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
char const* getEnv(char const* name) { # if defined(_MSC_VER) # pragma warning(push) # pragma warning(disable : 4996) // getenv': This function or variable may be unsafe. # endif return std::getenv(name); // NOLINT(concurrency-mt-unsafe) # if defined(_MSC_VER) # pragma warning(pop) # endif }
O0
c
ankerl::nanobench::detail::getEnv(char const*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x4550 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN6ankerl9nanobench6detail6getEnvEPKc: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _getenv add rsp, 10h pop rbp retn
long long ankerl::nanobench::detail::getEnv(ankerl::nanobench::detail *this, const char *a2) { return getenv(this, a2); }
getEnv: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104550 ADD RSP,0x10 POP RBP RET
/* ankerl::nanobench::detail::getEnv(char const*) */ void ankerl::nanobench::detail::getEnv(char *param_1) { getenv(param_1); return; }
2,329
blst_scalar_from_fr
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_scalar_from_fr(pow256 ret, const vec256 a) { const union { long one; char little; } is_endian = { 1 }; if ((uptr_t)ret == (uptr_t)a && is_endian.little) { from_mont_256((limb_t *)ret, a, BLS12_381_r, r0); } else { vec256 out; from_mont_256(out, a, BLS12_381_r, r0); le_bytes_from_limbs(ret, out, 32); vec_zero(out, sizeof(out)); } }
O3
c
blst_scalar_from_fr: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF leaq 0x27418(%rip), %rdx # 0x8a6b0 cmpq %rsi, %rdi je 0x632f4 leaq -0x30(%rbp), %r14 movq %r14, %rdi callq 0x74420 cmpq %rbx, %r14 je 0x632d3 xorl %eax, %eax movq -0x30(%rbp,%rax,8), %rdx xorl %ecx, %ecx movb %dl, (%rbx,%rcx) incq %rcx shrq $0x8, %rdx cmpq $0x8, %rcx jne 0x632b7 incq %rax addq %rcx, %rbx cmpq $0x4, %rax jne 0x632b0 xorl %eax, %eax movq $0x0, -0x30(%rbp,%rax,8) incq %rax cmpq $0x4, %rax jne 0x632d5 leaq -0x30(%rbp), %rax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi addq $0x20, %rsp popq %rbx popq %r14 popq %rbp jmp 0x74420
blst_scalar_from_fr: push rbp mov rbp, rsp push r14 push rbx sub rsp, 20h mov rbx, rdi mov rcx, 0FFFFFFFEFFFFFFFFh lea rdx, BLS12_381_r cmp rdi, rsi jz short loc_632F4 lea r14, [rbp+var_30] mov rdi, r14 call from_mont_256 cmp r14, rbx jz short loc_632D3 xor eax, eax loc_632B0: mov rdx, [rbp+rax*8+var_30] xor ecx, ecx loc_632B7: mov [rbx+rcx], dl inc rcx shr rdx, 8 cmp rcx, 8 jnz short loc_632B7 inc rax add rbx, rcx cmp rax, 4 jnz short loc_632B0 loc_632D3: xor eax, eax loc_632D5: mov [rbp+rax*8+var_30], 0 inc rax cmp rax, 4 jnz short loc_632D5 lea rax, [rbp+var_30] add rsp, 20h pop rbx pop r14 pop rbp retn loc_632F4: mov rdi, rbx add rsp, 20h pop rbx pop r14 pop rbp jmp from_mont_256
_QWORD * blst_scalar_from_fr(_QWORD *a1, _QWORD *a2) { _QWORD *v2; // rbx long long i; // rax unsigned long long v4; // rdx long long j; // rcx long long k; // rax _QWORD v8[6]; // [rsp+0h] [rbp-30h] BYREF v2 = a1; if ( a1 == a2 ) return (_QWORD *)from_mont_256(a1, a2, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); from_mont_256(v8, a2, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); if ( v8 != a1 ) { for ( i = 0LL; i != 4; ++i ) { v4 = v8[i]; for ( j = 0LL; j != 8; ++j ) { *((_BYTE *)v2 + j) = v4; v4 >>= 8; } ++v2; } } for ( k = 0LL; k != 4; ++k ) v8[k] = 0LL; return v8; }
blst_scalar_from_fr: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RCX,-0x100000001 LEA RDX,[0x18a6b0] CMP RDI,RSI JZ 0x001632f4 LEA R14,[RBP + -0x30] MOV RDI,R14 CALL 0x00174420 CMP R14,RBX JZ 0x001632d3 XOR EAX,EAX LAB_001632b0: MOV RDX,qword ptr [RBP + RAX*0x8 + -0x30] XOR ECX,ECX LAB_001632b7: MOV byte ptr [RBX + RCX*0x1],DL INC RCX SHR RDX,0x8 CMP RCX,0x8 JNZ 0x001632b7 INC RAX ADD RBX,RCX CMP RAX,0x4 JNZ 0x001632b0 LAB_001632d3: XOR EAX,EAX LAB_001632d5: MOV qword ptr [RBP + RAX*0x8 + -0x30],0x0 INC RAX CMP RAX,0x4 JNZ 0x001632d5 LEA RAX,[RBP + -0x30] ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_001632f4: MOV RDI,RBX ADD RSP,0x20 POP RBX POP R14 POP RBP JMP 0x00174420
ulong * blst_scalar_from_fr(ulong *param_1,ulong *param_2) { long lVar1; ulong *puVar2; long lVar3; ulong uVar4; ulong local_38 [4]; if (param_1 != param_2) { from_mont_256(local_38,param_2,BLS12_381_r); if (local_38 != param_1) { lVar1 = 0; do { uVar4 = local_38[lVar1]; lVar3 = 0; do { *(char *)((long)param_1 + lVar3) = (char)uVar4; lVar3 = lVar3 + 1; uVar4 = uVar4 >> 8; } while (lVar3 != 8); lVar1 = lVar1 + 1; param_1 = param_1 + 1; } while (lVar1 != 4); } lVar1 = 0; do { local_38[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 4); return local_38; } puVar2 = (ulong *)from_mont_256(param_1,param_2,BLS12_381_r); return puVar2; }
2,330
ftxui::IsCombining(unsigned int)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/string.cpp
bool Bisearch(uint32_t ucs, const std::array<Interval, N>& table) { if (ucs < table.front().first || ucs > table.back().last) { // NOLINT return false; } int min = 0; int max = N - 1; while (max >= min) { const int mid = (min + max) / 2; if (ucs > table[mid].last) { // NOLINT min = mid + 1; } else if (ucs < table[mid].first) { // NOLINT max = mid - 1; } else { return true; } } return false; }
O3
cpp
ftxui::IsCombining(unsigned int): leal -0xe01f0(%rdi), %edx xorl %ecx, %ecx movl $0x0, %eax cmpl $0xfff20110, %edx # imm = 0xFFF20110 jae 0x3a6e6 retq movl $0x125, %esi # imm = 0x125 leaq 0x53fe(%rip), %rdx # 0x3faf0 cmpl %ecx, %esi setge %al jl 0x3a6e5 leal (%rsi,%rcx), %r9d movl %r9d, %r8d shrl $0x1f, %r8d addl %r9d, %r8d sarl %r8d movslq %r8d, %r9 cmpl %edi, 0x4(%rdx,%r9,8) jb 0x3a720 leal -0x1(%r9), %esi cmpl %edi, (%rdx,%r9,8) ja 0x3a6f2 jmp 0x3a6e5 incl %r8d movl %r8d, %ecx jmp 0x3a6f2
_ZN5ftxui11IsCombiningEj: lea edx, [rdi-0E01F0h] xor ecx, ecx mov eax, 0 cmp edx, 0FFF20110h jnb short loc_3A6E6 locret_3A6E5: retn loc_3A6E6: mov esi, 125h lea rdx, _ZN12_GLOBAL__N_119g_extend_charactersE; `anonymous namespace'::g_extend_characters loc_3A6F2: cmp esi, ecx setnl al jl short locret_3A6E5 lea r9d, [rsi+rcx] mov r8d, r9d shr r8d, 1Fh add r8d, r9d sar r8d, 1 movsxd r9, r8d cmp [rdx+r9*8+4], edi jb short loc_3A720 lea esi, [r9-1] cmp [rdx+r9*8], edi ja short loc_3A6F2 jmp short locret_3A6E5 loc_3A720: inc r8d mov ecx, r8d jmp short loc_3A6F2
bool ftxui::IsCombining(ftxui *this) { int v1; // ecx bool result; // al int v3; // esi int v4; // r8d v1 = 0; result = 0; if ( (unsigned int)((_DWORD)this - 918000) >= 0xFFF20110 ) { v3 = 293; while ( 1 ) { result = v3 >= v1; if ( v3 < v1 ) break; v4 = (v3 + v1) / 2; if ( `anonymous namespace'::g_extend_characters[2 * v4 + 1] < (unsigned int)this ) { v1 = v4 + 1; } else { v3 = v4 - 1; if ( `anonymous namespace'::g_extend_characters[2 * v4] <= (unsigned int)this ) return result; } } } return result; }
IsCombining: LEA EDX,[RDI + -0xe01f0] XOR ECX,ECX MOV EAX,0x0 CMP EDX,0xfff20110 JNC 0x0013a6e6 LAB_0013a6e5: RET LAB_0013a6e6: MOV ESI,0x125 LEA RDX,[0x13faf0] LAB_0013a6f2: CMP ESI,ECX SETGE AL JL 0x0013a6e5 LEA R9D,[RSI + RCX*0x1] MOV R8D,R9D SHR R8D,0x1f ADD R8D,R9D SAR R8D,0x1 MOVSXD R9,R8D CMP dword ptr [RDX + R9*0x8 + 0x4],EDI JC 0x0013a720 LEA ESI,[R9 + -0x1] CMP dword ptr [RDX + R9*0x8],EDI JA 0x0013a6f2 JMP 0x0013a6e5 LAB_0013a720: INC R8D MOV ECX,R8D JMP 0x0013a6f2
/* ftxui::IsCombining(unsigned int) */ bool ftxui::IsCombining(uint param_1) { bool bVar1; int iVar2; int iVar3; int iVar4; iVar4 = 0; bVar1 = false; if (0xfff2010f < param_1 - 0xe01f0) { iVar2 = 0x125; do { while( true ) { bVar1 = iVar4 <= iVar2; if (iVar2 < iVar4) { return bVar1; } iVar3 = (iVar2 + iVar4) / 2; if (param_1 <= *(uint *)(::(anonymous_namespace)::g_extend_characters + (long)iVar3 * 8 + 4) ) break; iVar4 = iVar3 + 1; } iVar2 = iVar3 + -1; } while (param_1 < *(uint *)(::(anonymous_namespace)::g_extend_characters + (long)iVar3 * 8)); } return bVar1; }
2,331
nglog::(anonymous namespace)::LogFileObject::Flush()
ng-log[P]ng-log/src/logging.cc
void LogFileObject::Flush() { std::lock_guard<std::mutex> l{mutex_}; FlushUnlocked(std::chrono::system_clock::now()); }
O3
cpp
nglog::(anonymous namespace)::LogFileObject::Flush(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x89e0 testl %eax, %eax jne 0x1efe4 callq 0x8090 movq %rax, %r15 movq 0x98(%r14), %rdi testq %rdi, %rdi je 0x1efbc callq 0x8760 movl $0x0, 0xa4(%r14) leaq 0x27075(%rip), %rax # 0x46038 movslq (%rax), %rax imulq $0x3b9aca00, %rax, %rax # imm = 0x3B9ACA00 addq %r15, %rax movq %rax, 0xb8(%r14) movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x8490 movl %eax, %edi callq 0x83f0 nop
_ZN5nglog12_GLOBAL__N_113LogFileObject5FlushEv: push r15 push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx; this call _pthread_mutex_lock test eax, eax jnz short loc_1EFE4 call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov r15, rax mov rdi, [r14+98h] test rdi, rdi jz short loc_1EFBC call _fflush mov dword ptr [r14+0A4h], 0 loc_1EFBC: lea rax, _ZN3fLI16FLAGS_logbufsecsE; fLI::FLAGS_logbufsecs movsxd rax, dword ptr [rax] imul rax, 3B9ACA00h add rax, r15 mov [r14+0B8h], rax mov rdi, rbx pop rbx pop r14 pop r15 jmp _pthread_mutex_unlock loc_1EFE4: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::Flush( nglog::_anonymous_namespace_::LogFileObject *this) { char *v2; // rbx std::chrono::_V2::system_clock *v3; // rdi int v4; // eax long long v5; // r15 long long v6; // rdi v2 = (char *)this + 8; v3 = (nglog::_anonymous_namespace_::LogFileObject *)((char *)this + 8); v4 = pthread_mutex_lock(v3); if ( v4 ) std::__throw_system_error(v4); v5 = std::chrono::_V2::system_clock::now(v3); v6 = *((_QWORD *)this + 19); if ( v6 ) { fflush(v6); *((_DWORD *)this + 41) = 0; } *((_QWORD *)this + 23) = v5 + 1000000000LL * fLI::FLAGS_logbufsecs; return pthread_mutex_unlock(v2); }
Flush: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x001089e0 TEST EAX,EAX JNZ 0x0011efe4 CALL 0x00108090 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x98] TEST RDI,RDI JZ 0x0011efbc CALL 0x00108760 MOV dword ptr [R14 + 0xa4],0x0 LAB_0011efbc: LEA RAX,[0x146038] MOVSXD RAX,dword ptr [RAX] IMUL RAX,RAX,0x3b9aca00 ADD RAX,R15 MOV qword ptr [R14 + 0xb8],RAX MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00108490 LAB_0011efe4: MOV EDI,EAX CALL 0x001083f0
/* nglog::(anonymous namespace)::LogFileObject::Flush() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::Flush(LogFileObject *this) { int iVar1; long lVar2; iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 == 0) { lVar2 = std::chrono::_V2::system_clock::now(); if (*(FILE **)(this + 0x98) != (FILE *)0x0) { fflush(*(FILE **)(this + 0x98)); *(int4 *)(this + 0xa4) = 0; } *(long *)(this + 0xb8) = (long)fLI::FLAGS_logbufsecs * 1000000000 + lVar2; pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); }
2,332
reset_connection
eloqsql/libmariadb/unittest/libmariadb/my_test.h
static int reset_connection(MYSQL *mysql) { int rc; if (is_mariadb && !IS_MAXSCALE()) rc= mysql_change_user(mysql, username, password, schema); else rc= mysql_reset_connection(mysql); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "SET sql_mode=''"); check_mysql_rc(rc, mysql); return OK; }
O0
c
reset_connection: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movzbl 0x6b55e(%rip), %eax # 0x81341 cmpl $0x0, %eax je 0x15e8f cmpq $0x0, 0x6b3cc(%rip) # 0x811c0 je 0x15e17 movq 0x6b3c3(%rip), %rdi # 0x811c0 callq 0x3af90 movq %rax, %rdi leaq 0x50223(%rip), %rsi # 0x6602f callq 0x14100 cmpq $0x0, %rax jne 0x15e8f leaq 0x4fbac(%rip), %rdi # 0x659ca callq 0x14550 cmpq $0x0, %rax je 0x15e69 leaq 0x4fb9a(%rip), %rdi # 0x659ca callq 0x14550 movq %rax, %rdi leaq 0x50216(%rip), %rsi # 0x66055 callq 0x14600 cmpl $0x0, %eax je 0x15e8f leaq 0x4fb7a(%rip), %rdi # 0x659ca callq 0x14550 movq %rax, %rdi leaq 0x501d9(%rip), %rsi # 0x66038 callq 0x14600 cmpl $0x0, %eax je 0x15e8f movq -0x10(%rbp), %rdi movq 0x6b494(%rip), %rsi # 0x81308 movq 0x6b495(%rip), %rdx # 0x81310 movq 0x6b496(%rip), %rcx # 0x81318 callq 0x385b0 movsbl %al, %eax movl %eax, -0x14(%rbp) jmp 0x15e9b movq -0x10(%rbp), %rdi callq 0x3d250 movl %eax, -0x14(%rbp) jmp 0x15e9d cmpl $0x0, -0x14(%rbp) je 0x15eec movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0x24(%rbp), %esi movq -0x20(%rbp), %rdx movl %eax, %ecx leaq 0x4f806(%rip), %rdi # 0x656d5 leaq 0x4f6e2(%rip), %r8 # 0x655b8 movl $0x238, %r9d # imm = 0x238 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x15f59 jmp 0x15eee movq -0x10(%rbp), %rdi leaq 0x4f930(%rip), %rsi # 0x65829 callq 0x38a70 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x15f50 movl -0x14(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x3c3c0 movl -0x34(%rbp), %esi movq -0x30(%rbp), %rdx movl %eax, %ecx leaq 0x4f7a2(%rip), %rdi # 0x656d5 leaq 0x4f67e(%rip), %r8 # 0x655b8 movl $0x23a, %r9d # imm = 0x23A movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x15f59 jmp 0x15f52 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_connection: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi movzx eax, cs:is_mariadb cmp eax, 0 jz loc_15E8F cmp cs:mysql_default, 0 jz short loc_15E17 mov rdi, cs:mysql_default call mysql_get_server_info mov rdi, rax lea rsi, aMaxscale; "maxScale" call _strstr cmp rax, 0 jnz short loc_15E8F loc_15E17: lea rdi, aSrv; "srv" call _getenv cmp rax, 0 jz short loc_15E69 lea rdi, aSrv; "srv" call _getenv mov rdi, rax lea rsi, aTestDisabledWi+13h; "maxscale" call _strcmp cmp eax, 0 jz short loc_15E8F lea rdi, aSrv; "srv" call _getenv mov rdi, rax lea rsi, aSkysqlHa; "skysql-ha" call _strcmp cmp eax, 0 jz short loc_15E8F loc_15E69: mov rdi, [rbp+var_10] mov rsi, cs:username mov rdx, cs:password mov rcx, cs:schema call mysql_change_user movsx eax, al mov [rbp+var_14], eax jmp short loc_15E9B loc_15E8F: mov rdi, [rbp+var_10] call mysql_reset_connection mov [rbp+var_14], eax loc_15E9B: jmp short $+2 loc_15E9D: cmp [rbp+var_14], 0 jz short loc_15EEC mov eax, [rbp+var_14] mov [rbp+var_24], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_20], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_24] mov rdx, [rbp+var_20] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 238h mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_15F59 loc_15EEC: jmp short $+2 loc_15EEE: mov rdi, [rbp+var_10] lea rsi, aSetSqlMode; "SET sql_mode=''" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_15F50 mov eax, [rbp+var_14] mov [rbp+var_34], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_30], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_34] mov rdx, [rbp+var_30] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 23Ah mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_15F59 loc_15F50: jmp short $+2 loc_15F52: mov [rbp+var_4], 0 loc_15F59: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long reset_connection(long long a1) { long long server_info; // rax long long v2; // rax long long v3; // rax int v4; // eax int v5; // eax int v7; // [rsp+10h] [rbp-30h] int v8; // [rsp+20h] [rbp-20h] int v9; // [rsp+2Ch] [rbp-14h] int v10; // [rsp+2Ch] [rbp-14h] if ( !is_mariadb || mysql_default && (server_info = mysql_get_server_info(mysql_default), strstr(server_info, "maxScale")) || getenv("srv") && ((v2 = getenv("srv"), !(unsigned int)strcmp(v2, "maxscale")) || (v3 = getenv("srv"), !(unsigned int)strcmp(v3, "skysql-ha"))) ) { v9 = mysql_reset_connection(a1); } else { v9 = (char)mysql_change_user(a1, username, password, schema); } if ( v9 ) { v8 = mysql_error(a1); v4 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v9, v8, v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 568); return 1; } else { v10 = mysql_query(a1, "SET sql_mode=''"); if ( v10 ) { v7 = mysql_error(a1); v5 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v10, v7, v5, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 570); return 1; } else { return 0; } } }
reset_connection: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOVZX EAX,byte ptr [0x00181341] CMP EAX,0x0 JZ 0x00115e8f CMP qword ptr [0x001811c0],0x0 JZ 0x00115e17 MOV RDI,qword ptr [0x001811c0] CALL 0x0013af90 MOV RDI,RAX LEA RSI,[0x16602f] CALL 0x00114100 CMP RAX,0x0 JNZ 0x00115e8f LAB_00115e17: LEA RDI,[0x1659ca] CALL 0x00114550 CMP RAX,0x0 JZ 0x00115e69 LEA RDI,[0x1659ca] CALL 0x00114550 MOV RDI,RAX LEA RSI,[0x166055] CALL 0x00114600 CMP EAX,0x0 JZ 0x00115e8f LEA RDI,[0x1659ca] CALL 0x00114550 MOV RDI,RAX LEA RSI,[0x166038] CALL 0x00114600 CMP EAX,0x0 JZ 0x00115e8f LAB_00115e69: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [0x00181308] MOV RDX,qword ptr [0x00181310] MOV RCX,qword ptr [0x00181318] CALL 0x001385b0 MOVSX EAX,AL MOV dword ptr [RBP + -0x14],EAX JMP 0x00115e9b LAB_00115e8f: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013d250 MOV dword ptr [RBP + -0x14],EAX LAB_00115e9b: JMP 0x00115e9d LAB_00115e9d: CMP dword ptr [RBP + -0x14],0x0 JZ 0x00115eec MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x1655b8] MOV R9D,0x238 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00115f59 LAB_00115eec: JMP 0x00115eee LAB_00115eee: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x165829] CALL 0x00138a70 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00115f50 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x34] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x1655b8] MOV R9D,0x23a MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00115f59 LAB_00115f50: JMP 0x00115f52 LAB_00115f52: MOV dword ptr [RBP + -0x4],0x0 LAB_00115f59: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 reset_connection(int8 param_1) { char cVar1; int iVar2; int4 uVar3; char *pcVar4; int8 uVar5; int local_1c; int4 local_c; if (is_mariadb != '\0') { if (mysql_default != 0) { pcVar4 = (char *)mysql_get_server_info(mysql_default); pcVar4 = strstr(pcVar4,"maxScale"); if (pcVar4 != (char *)0x0) goto LAB_00115e8f; } pcVar4 = getenv("srv"); if (pcVar4 == (char *)0x0) { LAB_00115e69: cVar1 = mysql_change_user(param_1,username,password,schema); local_1c = (int)cVar1; goto LAB_00115e9b; } pcVar4 = getenv("srv"); iVar2 = strcmp(pcVar4,"maxscale"); if (iVar2 != 0) { pcVar4 = getenv("srv"); iVar2 = strcmp(pcVar4,"skysql-ha"); if (iVar2 != 0) goto LAB_00115e69; } } LAB_00115e8f: local_1c = mysql_reset_connection(param_1); LAB_00115e9b: if (local_1c == 0) { iVar2 = mysql_query(param_1,"SET sql_mode=\'\'"); if (iVar2 == 0) { local_c = 0; } else { uVar5 = mysql_error(param_1); uVar3 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x23a ); local_c = 1; } } else { uVar5 = mysql_error(param_1); uVar3 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",local_1c,uVar5,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x238); local_c = 1; } return local_c; }
2,333
SchemaConverter::_not_strings(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&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _not_strings(const std::vector<std::string> & strings) { struct TrieNode { std::map<char, TrieNode> children; bool is_end_of_string; TrieNode() : is_end_of_string(false) {} void insert(const std::string & string) { auto node = this; for (char c : string) { node = &node->children[c]; } node->is_end_of_string = true; } }; TrieNode trie; for (const auto & s : strings) { trie.insert(s); } std::string char_rule = _add_primitive("char", PRIMITIVE_RULES.at("char")); std::ostringstream out; out << "[\"] ( "; std::function<void(const TrieNode &)> visit = [&](const TrieNode & node) { std::ostringstream rejects; auto first = true; for (const auto & kv : node.children) { rejects << kv.first; if (first) { first = false; } else { out << " | "; } out << "[" << kv.first << "]"; if (!kv.second.children.empty()) { out << " ("; visit(kv.second); out << ")"; } else if (kv.second.is_end_of_string) { out << " " << char_rule << "+"; } } if (!node.children.empty()) { if (!first) { out << " | "; } out << "[^\"" << rejects.str() << "] " << char_rule << "*"; } }; visit(trie); out << " )"; if (!trie.is_end_of_string) { out << "?"; } out << " [\"] space"; return out.str(); }
O2
cpp
SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x210, %rsp # imm = 0x210 movq %rsi, %r14 movq %rdi, %rbx leaq 0x30(%rsp), %rax andl $0x0, (%rax) andq $0x0, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) andq $0x0, 0x20(%rax) movb $0x0, 0x28(%rax) movq (%rdx), %r15 movq 0x8(%rdx), %r13 leaq 0x28(%rsp), %r12 cmpq %r13, %r15 je 0x95e86 movq %r12, %rdi movq %r15, %rsi callq 0x96536 addq $0x20, %r15 jmp 0x95e70 leaq 0xf94b(%rip), %rsi # 0xa57d8 leaq 0x98(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x29014 leaq 0xf92f(%rip), %rsi # 0xa57d8 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x29014 leaq 0x4e8c9(%rip), %rdi # 0xe4788 leaq 0x8(%rsp), %rsi callq 0x98f1a leaq 0x60(%rsp), %r15 leaq 0x98(%rsp), %rdx movq %r15, %rdi movq %r14, %rsi movq %rax, %rcx callq 0x94e70 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x22f98 leaq 0x98(%rsp), %rdi callq 0x22f98 leaq 0x98(%rsp), %rdi callq 0x22a60 leaq 0xfc44(%rip), %rsi # 0xa5b56 leaq 0x98(%rsp), %r12 movq %r12, %rdi callq 0x227c0 leaq 0x80(%rsp), %rsi movq %r12, (%rsi) movq %r14, 0x8(%rsi) movq %r15, 0x10(%rsi) movq %r14, %rdi callq 0x9657a leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x965c2 leaq 0xf93f(%rip), %rsi # 0xa5892 leaq 0x98(%rsp), %rdi callq 0x227c0 cmpb $0x0, 0x58(%rsp) jne 0x95f7b leaq 0xfa55(%rip), %rsi # 0xa59c3 leaq 0x98(%rsp), %rdi callq 0x227c0 leaq 0xfbdb(%rip), %rsi # 0xa5b5d leaq 0x98(%rsp), %rdi callq 0x227c0 leaq 0xa0(%rsp), %rsi movq %rbx, %rdi callq 0x22c00 leaq 0x8(%rsp), %rdi callq 0x2d672 leaq 0x98(%rsp), %rdi callq 0x22180 leaq 0x60(%rsp), %rdi callq 0x22f98 leaq 0x28(%rsp), %rdi callq 0x96b6e movq %rbx, %rax addq $0x210, %rsp # imm = 0x210 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x95fe0 movq %rax, %rbx jmp 0x96015 movq %rax, %rbx jmp 0x96022 movq %rax, %rbx jmp 0x95ffe jmp 0x9602e movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x22f98 leaq 0x98(%rsp), %rdi jmp 0x96027 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x2d672 leaq 0x98(%rsp), %rdi callq 0x22180 leaq 0x60(%rsp), %rdi callq 0x22f98 jmp 0x96031 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x96b6e movq %rbx, %rdi callq 0x22da0 nop
_ZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE: push r15 push r14 push r13 push r12 push rbx sub rsp, 210h mov r14, rsi mov rbx, rdi lea rax, [rsp+238h+var_208] and dword ptr [rax], 0 and qword ptr [rax+8], 0 mov [rax+10h], rax mov [rax+18h], rax and qword ptr [rax+20h], 0 mov byte ptr [rax+28h], 0 mov r15, [rdx] mov r13, [rdx+8] lea r12, [rsp+238h+var_210] loc_95E70: cmp r15, r13 jz short loc_95E86 mov rdi, r12 mov rsi, r15 call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(std::string const&) add r15, 20h ; ' ' jmp short loc_95E70 loc_95E86: lea rsi, aChar; "char" lea rdi, [rsp+238h+var_1A0] lea rdx, [rsp+238h+var_1B8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aChar; "char" lea rdi, [rsp+238h+var_230] lea rdx, [rsp+238h+var_231] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES lea rsi, [rsp+238h+var_230] call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_11BuiltinRuleESaISA_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EE2atERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::at(std::string const&) lea r15, [rsp+238h+var_1D8] lea rdx, [rsp+238h+var_1A0] mov rdi, r15 mov rsi, r14 mov rcx, rax call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&) lea r14, [rsp+238h+var_230] mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_1A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, asc_A5B56; "[\"] ( " lea r12, [rsp+238h+var_1A0] mov rdi, r12 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+238h+var_1B8] mov [rsi], r12 mov [rsi+8], r14 mov [rsi+10h], r15 mov rdi, r14 call _ZNSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEC2IZNS0_12_not_stringsESB_EUlSE_E_vEEOT_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1} &&) lea rdi, [rsp+238h+var_230] lea rsi, [rsp+238h+var_210] call _ZNKSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEclESE_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&) lea rsi, a09401910201912+50h; " )" lea rdi, [rsp+238h+var_1A0] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) cmp [rsp+238h+var_1E0], 0 jnz short loc_95F7B lea rsi, asc_A59C0+3; "?" lea rdi, [rsp+238h+var_1A0] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_95F7B: lea rsi, aSpace_5; " [\"] space" lea rdi, [rsp+238h+var_1A0] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+238h+var_198] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+238h+var_230]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+238h+var_1A0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+238h+var_1D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+238h+var_210] call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree() mov rax, rbx add rsp, 210h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_95FE0: mov rbx, rax jmp short loc_96015 mov rbx, rax jmp short loc_96022 mov rbx, rax jmp short loc_95FFE jmp short loc_9602E mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_95FFE: lea rdi, [rsp+arg_90] jmp short loc_96027 mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() loc_96015: lea rdi, [rsp+arg_90] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() loc_96022: lea rdi, [rsp+arg_58]; void * loc_96027: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_96031 loc_9602E: mov rbx, rax loc_96031: lea rdi, [rsp+arg_20] call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_not_strings(long long a1, long long a2, long long *a3) { long long v3; // r15 long long v4; // r13 _QWORD *v5; // rax _QWORD v7[4]; // [rsp+8h] [rbp-230h] BYREF _BYTE v8[8]; // [rsp+28h] [rbp-210h] BYREF int v9; // [rsp+30h] [rbp-208h] BYREF long long v10; // [rsp+38h] [rbp-200h] int *v11; // [rsp+40h] [rbp-1F8h] int *v12; // [rsp+48h] [rbp-1F0h] long long v13; // [rsp+50h] [rbp-1E8h] char v14; // [rsp+58h] [rbp-1E0h] _BYTE v15[32]; // [rsp+60h] [rbp-1D8h] BYREF long long *v16; // [rsp+80h] [rbp-1B8h] _QWORD *v17; // [rsp+88h] [rbp-1B0h] _BYTE *v18; // [rsp+90h] [rbp-1A8h] long long v19; // [rsp+98h] [rbp-1A0h] BYREF _BYTE v20[408]; // [rsp+A0h] [rbp-198h] BYREF v9 = 0; v10 = 0LL; v11 = &v9; v12 = &v9; v13 = 0LL; v14 = 0; v3 = *a3; v4 = a3[1]; while ( v3 != v4 ) { SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(v8, v3); v3 += 32LL; } std::string::basic_string<std::allocator<char>>(&v19, (long long)"char"); std::string::basic_string<std::allocator<char>>(v7, (long long)"char"); v5 = (_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::at( &PRIMITIVE_RULES[abi:cxx11], v7); SchemaConverter::_add_primitive((long long)v15, a2, &v19, v5); std::string::~string(v7); std::string::~string(&v19); std::ostringstream::basic_ostringstream(&v19); std::operator<<<std::char_traits<char>>(&v19, "[\"] ( "); v16 = &v19; v17 = v7; v18 = v15; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(v7); std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()( v7, v8); std::operator<<<std::char_traits<char>>(&v19, " )"); if ( !v14 ) std::operator<<<std::char_traits<char>>(&v19, "?"); std::operator<<<std::char_traits<char>>(&v19, " [\"] space"); std::stringbuf::str(a1, v20); std::_Function_base::~_Function_base((std::_Function_base *)v7); std::ostringstream::~ostringstream(&v19); std::string::~string(v15); std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree(v8); return a1; }
_not_strings: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x210 MOV R14,RSI MOV RBX,RDI LEA RAX,[RSP + 0x30] AND dword ptr [RAX],0x0 AND qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX AND qword ptr [RAX + 0x20],0x0 MOV byte ptr [RAX + 0x28],0x0 MOV R15,qword ptr [RDX] MOV R13,qword ptr [RDX + 0x8] LEA R12,[RSP + 0x28] LAB_00195e70: CMP R15,R13 JZ 0x00195e86 LAB_00195e75: MOV RDI,R12 MOV RSI,R15 CALL 0x00196536 ADD R15,0x20 JMP 0x00195e70 LAB_00195e86: LEA RSI,[0x1a57d8] LEA RDI,[RSP + 0x98] LEA RDX,[RSP + 0x80] CALL 0x00129014 LAB_00195ea2: LEA RSI,[0x1a57d8] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00129014 LAB_00195eb8: LEA RDI,[0x1e4788] LEA RSI,[RSP + 0x8] CALL 0x00198f1a LEA R15,[RSP + 0x60] LEA RDX,[RSP + 0x98] MOV RDI,R15 MOV RSI,R14 MOV RCX,RAX CALL 0x00194e70 LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00122f98 LEA RDI,[RSP + 0x98] CALL 0x00122f98 LAB_00195efe: LEA RDI,[RSP + 0x98] CALL 0x00122a60 LAB_00195f0b: LEA RSI,[0x1a5b56] LEA R12,[RSP + 0x98] MOV RDI,R12 CALL 0x001227c0 LEA RSI,[RSP + 0x80] MOV qword ptr [RSI],R12 MOV qword ptr [RSI + 0x8],R14 MOV qword ptr [RSI + 0x10],R15 LAB_00195f35: MOV RDI,R14 CALL 0x0019657a LAB_00195f3d: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x001965c2 LEA RSI,[0x1a5892] LEA RDI,[RSP + 0x98] CALL 0x001227c0 CMP byte ptr [RSP + 0x58],0x0 JNZ 0x00195f7b LEA RSI,[0x1a59c3] LEA RDI,[RSP + 0x98] CALL 0x001227c0 LAB_00195f7b: LEA RSI,[0x1a5b5d] LEA RDI,[RSP + 0x98] CALL 0x001227c0 LEA RSI,[RSP + 0xa0] MOV RDI,RBX CALL 0x00122c00 LAB_00195f9f: LEA RDI,[RSP + 0x8] CALL 0x0012d672 LEA RDI,[RSP + 0x98] CALL 0x00122180 LEA RDI,[RSP + 0x60] CALL 0x00122f98 LEA RDI,[RSP + 0x28] CALL 0x00196b6e MOV RAX,RBX ADD RSP,0x210 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* SchemaConverter::_not_strings(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * SchemaConverter::_not_strings(vector *param_1) { long lVar1; long *in_RDX; BuiltinRule *in_RSI; long lVar2; allocator local_231; string local_230 [32]; TrieNode local_210 [8]; int4 local_208 [2]; int8 local_200; int4 *local_1f8; int4 *local_1f0; int8 local_1e8; char local_1e0; string local_1d8 [32]; ostream *local_1b8; string *local_1b0; string *local_1a8; string local_1a0 [376]; local_1f8 = local_208; local_208[0] = 0; local_200 = 0; local_1e8 = 0; local_1e0 = '\0'; lVar1 = in_RDX[1]; local_1f0 = local_1f8; for (lVar2 = *in_RDX; lVar2 != lVar1; lVar2 = lVar2 + 0x20) { /* try { // try from 00195e75 to 00195e7f has its CatchHandler @ 0019602e */ _not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&):: TrieNode::insert(std::__cxx11::string_const__(local_210,lVar2); } /* try { // try from 00195e86 to 00195ea1 has its CatchHandler @ 00195fef */ std::__cxx11::string::string<std::allocator<char>>(local_1a0,"char",(allocator *)&local_1b8); /* try { // try from 00195ea2 to 00195eb7 has its CatchHandler @ 00195fea */ std::__cxx11::string::string<std::allocator<char>>(local_230,"char",&local_231); /* try { // try from 00195eb8 to 00195ee3 has its CatchHandler @ 00195ff1 */ std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::at((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)PRIMITIVE_RULES_abi_cxx11_,local_230); _add_primitive(local_1d8,in_RSI); std::__cxx11::string::~string(local_230); std::__cxx11::string::~string(local_1a0); /* try { // try from 00195efe to 00195f0a has its CatchHandler @ 00195fe5 */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a0); /* try { // try from 00195f0b to 00195f21 has its CatchHandler @ 00195fe0 */ std::operator<<((ostream *)local_1a0,"[\"] ( "); local_1b8 = (ostream *)local_1a0; local_1b0 = local_230; local_1a8 = local_1d8; /* try { // try from 00195f35 to 00195f3c has its CatchHandler @ 00195fde */ std:: function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)> :: function<SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::_lambda(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)_1_,void> ((_lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string_>_>_const____TrieNode_const___1_ *)local_230); /* try { // try from 00195f3d to 00195f9e has its CatchHandler @ 00196008 */ std:: function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)> ::operator()((function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)> *)local_230,local_210); std::operator<<((ostream *)local_1a0," )"); if (local_1e0 == '\0') { std::operator<<((ostream *)local_1a0,"?"); } std::operator<<((ostream *)local_1a0," [\"] space"); std::__cxx11::stringbuf::str(); std::_Function_base::~_Function_base((_Function_base *)local_230); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a0); std::__cxx11::string::~string(local_1d8); std:: _Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>> ::~_Rb_tree((_Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>> *)local_210); return param_1; }
2,334
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>>>>>::lexer(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>>>>&&, bool)
monkey531[P]llama/common/./json.hpp
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept : ia(std::move(adapter)) , ignore_comments(ignore_comments_) , decimal_point_char(static_cast<char_int_type>(get_decimal_point())) {}
O0
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>>>>>::lexer(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>>>>&&, bool): subq $0x28, %rsp movb %dl, %al movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) andb $0x1, %al movb %al, 0x17(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movb 0x17(%rsp), %cl andb $0x1, %cl movb %cl, 0x10(%rax) callq 0xaf170 movq 0x8(%rsp), %rdi movl %eax, 0x14(%rdi) movb $0x0, 0x18(%rdi) movq $0x0, 0x20(%rdi) movq $0x0, 0x28(%rdi) movq $0x0, 0x30(%rdi) addq $0x38, %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x18, %edx callq 0x50430 movq (%rsp), %rdi callq 0x87050 movq 0x8(%rsp), %rdi addq $0x50, %rdi callq 0x504a0 movq 0x8(%rsp), %rax leaq 0x11bf83(%rip), %rcx # 0x1cb050 movq %rcx, 0x70(%rax) movq $0x0, 0x78(%rax) movq $0x0, 0x80(%rax) xorps %xmm0, %xmm0 movsd %xmm0, 0x88(%rax) callq 0xaf180 movb %al, %cl movq 0x8(%rsp), %rax movsbl %cl, %ecx movl %ecx, 0x90(%rax) addq $0x28, %rsp retq nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b: sub rsp, 28h mov al, dl mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi and al, 1 mov [rsp+28h+var_11], al mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rcx, [rsp+28h+var_10] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov cl, [rsp+28h+var_11] and cl, 1 mov [rax+10h], cl call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void) mov rdi, [rsp+28h+var_20] mov [rdi+14h], eax mov byte ptr [rdi+18h], 0 mov qword ptr [rdi+20h], 0 mov qword ptr [rdi+28h], 0 mov qword ptr [rdi+30h], 0 add rdi, 38h ; '8' mov [rsp+28h+var_28], rdi xor esi, esi mov edx, 18h call _memset mov rdi, [rsp+28h+var_28] call _ZNSt6vectorIcSaIcEEC2Ev; std::vector<char>::vector(void) mov rdi, [rsp+28h+var_20] add rdi, 50h ; 'P' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rsp+28h+var_20] lea rcx, aSJinja+16h; "" mov [rax+70h], rcx mov qword ptr [rax+78h], 0 mov qword ptr [rax+80h], 0 xorps xmm0, xmm0 movsd qword ptr [rax+88h], xmm0 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; 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_decimal_point(void) mov cl, al mov rax, [rsp+28h+var_20] movsx ecx, cl mov [rax+90h], ecx add rsp, 28h retn
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>>>::lexer( long long a1, _QWORD *a2, char a3) { char decimal_point; // cl long long result; // rax *(_QWORD *)a1 = *a2; *(_QWORD *)(a1 + 8) = a2[1]; *(_BYTE *)(a1 + 16) = a3 & 1; *(_DWORD *)(a1 + 20) = std::char_traits<char>::eof(); *(_BYTE *)(a1 + 24) = 0; *(_QWORD *)(a1 + 32) = 0LL; *(_QWORD *)(a1 + 40) = 0LL; *(_QWORD *)(a1 + 48) = 0LL; memset(a1 + 56, 0LL, 24LL); std::vector<char>::vector(a1 + 56); std::string::basic_string(a1 + 80); *(_QWORD *)(a1 + 112) = ""; *(_QWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; decimal_point = 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_decimal_point(); result = a1; *(_DWORD *)(a1 + 144) = decimal_point; return result; }
lexer: SUB RSP,0x28 MOV AL,DL MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI AND AL,0x1 MOV byte ptr [RSP + 0x17],AL MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV CL,byte ptr [RSP + 0x17] AND CL,0x1 MOV byte ptr [RAX + 0x10],CL CALL 0x001af170 MOV RDI,qword ptr [RSP + 0x8] MOV dword ptr [RDI + 0x14],EAX MOV byte ptr [RDI + 0x18],0x0 MOV qword ptr [RDI + 0x20],0x0 MOV qword ptr [RDI + 0x28],0x0 MOV qword ptr [RDI + 0x30],0x0 ADD RDI,0x38 MOV qword ptr [RSP],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x00150430 MOV RDI,qword ptr [RSP] CALL 0x00187050 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x50 CALL 0x001504a0 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2cb050] MOV qword ptr [RAX + 0x70],RCX MOV qword ptr [RAX + 0x78],0x0 MOV qword ptr [RAX + 0x80],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RAX + 0x88],XMM0 CALL 0x001af180 MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOVSX ECX,CL MOV dword ptr [RAX + 0x90],ECX ADD RSP,0x28 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 > > >::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >&&, bool) */ void __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>>> ::lexer(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,iterator_input_adapter *param_1,bool param_2) { char cVar1; int4 uVar2; *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = *(int8 *)(param_1 + 8); this[0x10] = (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>>> )param_2; uVar2 = std::char_traits<char>::eof(); *(int4 *)(this + 0x14) = uVar2; this[0x18] = (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>>> )0x0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; memset((vector<char,std::allocator<char>> *)(this + 0x38),0,0x18); std::vector<char,std::allocator<char>>::vector((vector<char,std::allocator<char>> *)(this + 0x38)) ; std::__cxx11::string::string((string *)(this + 0x50)); *(char **)(this + 0x70) = ""; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; cVar1 = get_decimal_point(); *(int *)(this + 0x90) = (int)cVar1; return; }
2,335
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>))
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR void for_each_codepoint(string_view s, F f) { auto decode = [f](const char* buf_ptr, const char* ptr) { auto cp = uint32_t(); auto error = 0; auto end = utf8_decode(buf_ptr, &cp, &error); bool result = f(error ? invalid_code_point : cp, string_view(ptr, error ? 1 : to_unsigned(end - buf_ptr))); return result ? (error ? buf_ptr + 1 : end) : nullptr; }; auto p = s.data(); const size_t block_size = 4; // utf8_decode always reads blocks of 4 chars. if (s.size() >= block_size) { for (auto end = p + s.size() - block_size + 1; p < end;) { p = decode(p, p); if (!p) return; } } if (auto num_chars_left = s.data() + s.size() - p) { char buf[2 * block_size - 1] = {}; copy_str<char>(p, p + num_chars_left, buf); const char* buf_ptr = buf; do { auto end = decode(buf_ptr, p); if (!end) return; p += end - buf_ptr; buf_ptr = end; } while (buf_ptr - buf < num_chars_left); } }
O0
c
void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x50(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x58(%rsp), %rdi callq 0x2a420 movq %rax, 0x40(%rsp) movq $0x4, 0x38(%rsp) leaq 0x58(%rsp), %rdi callq 0x2a430 cmpq $0x4, %rax jb 0xb5bd7 movq 0x40(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x58(%rsp), %rdi callq 0x2a430 movq %rax, %rcx movq 0x8(%rsp), %rax addq %rcx, %rax addq $-0x4, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0xb5bd5 movq 0x40(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0xb5cb0 movq %rax, 0x40(%rsp) cmpq $0x0, 0x40(%rsp) jne 0xb5bd3 jmp 0xb5ca0 jmp 0xb5ba1 jmp 0xb5bd7 leaq 0x58(%rsp), %rdi callq 0x2a420 movq %rax, (%rsp) leaq 0x58(%rsp), %rdi callq 0x2a430 movq %rax, %rcx movq (%rsp), %rax addq %rcx, %rax movq 0x40(%rsp), %rcx subq %rcx, %rax movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) je 0xb5ca0 leaq 0x21(%rsp), %rdi xorl %esi, %esi movl $0x7, %edx callq 0x163a0 movq 0x40(%rsp), %rdi movq 0x40(%rsp), %rsi addq 0x28(%rsp), %rsi leaq 0x21(%rsp), %rdx callq 0x94e80 leaq 0x21(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x48(%rsp), %rdi callq 0xb5cb0 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) jne 0xb5c69 jmp 0xb5ca0 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx subq %rcx, %rax addq 0x40(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax leaq 0x21(%rsp), %rcx subq %rcx, %rax cmpq 0x28(%rsp), %rax jl 0xb5c46 jmp 0xb5ca0 addq $0x68, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v106detail18for_each_codepointIZNS1_11find_escapeEPKcS4_EUljNS0_17basic_string_viewIcEEE_EEvS6_T_: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_8], rsi mov [rsp+68h+var_18], rdx mov rax, [rsp+68h+var_18] mov [rsp+68h+var_20], rax lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void) mov [rsp+68h+var_28], rax mov [rsp+68h+var_30], 4 lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void) cmp rax, 4 jb short loc_B5BD7 mov rax, [rsp+68h+var_28] mov [rsp+68h+var_60], rax lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void) mov rcx, rax mov rax, [rsp+68h+var_60] add rax, rcx add rax, 0FFFFFFFFFFFFFFFCh add rax, 1 mov [rsp+68h+var_38], rax loc_B5BA1: mov rax, [rsp+68h+var_28] cmp rax, [rsp+68h+var_38] jnb short loc_B5BD5 mov rsi, [rsp+68h+var_28] mov rdx, [rsp+68h+var_28] lea rdi, [rsp+68h+var_20] call _ZZN3fmt3v106detail18for_each_codepointIZNS1_11find_escapeEPKcS4_EUljNS0_17basic_string_viewIcEEE_EEvS6_T_ENKUlS4_S4_E_clES4_S4_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1})::{lambda(char const*,char const*)#1}::operator()(char const*,char const*) mov [rsp+68h+var_28], rax cmp [rsp+68h+var_28], 0 jnz short loc_B5BD3 jmp loc_B5CA0 loc_B5BD3: jmp short loc_B5BA1 loc_B5BD5: jmp short $+2 loc_B5BD7: lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4dataEv; fmt::v10::basic_string_view<char>::data(void) mov [rsp+68h+var_68], rax lea rdi, [rsp+68h+var_10] call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void) mov rcx, rax mov rax, [rsp+68h+var_68] add rax, rcx mov rcx, [rsp+68h+var_28] sub rax, rcx mov [rsp+68h+var_40], rax cmp [rsp+68h+var_40], 0 jz loc_B5CA0 lea rdi, [rsp+68h+var_47] xor esi, esi mov edx, 7 call _memset mov rdi, [rsp+68h+var_28] mov rsi, [rsp+68h+var_28] add rsi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_47] call _ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_ lea rax, [rsp+68h+var_47] mov [rsp+68h+var_50], rax loc_B5C46: mov rsi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_28] lea rdi, [rsp+68h+var_20] call _ZZN3fmt3v106detail18for_each_codepointIZNS1_11find_escapeEPKcS4_EUljNS0_17basic_string_viewIcEEE_EEvS6_T_ENKUlS4_S4_E_clES4_S4_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1})::{lambda(char const*,char const*)#1}::operator()(char const*,char const*) mov [rsp+68h+var_58], rax cmp [rsp+68h+var_58], 0 jnz short loc_B5C69 jmp short loc_B5CA0 loc_B5C69: mov rax, [rsp+68h+var_58] mov rcx, [rsp+68h+var_50] sub rax, rcx add rax, [rsp+68h+var_28] mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_58] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] lea rcx, [rsp+68h+var_47] sub rax, rcx cmp rax, [rsp+68h+var_40] jl short loc_B5C46 jmp short $+2 loc_B5CA0: add rsp, 68h retn
long long fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>( long long a1, long long a2, long long a3) { long long result; // rax long long v4; // [rsp+0h] [rbp-68h] long long v5; // [rsp+10h] [rbp-58h] _BYTE *v6; // [rsp+18h] [rbp-50h] _BYTE v7[7]; // [rsp+21h] [rbp-47h] BYREF long long v8; // [rsp+28h] [rbp-40h] unsigned long long v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+38h] [rbp-30h] unsigned long long v11; // [rsp+40h] [rbp-28h] _QWORD v12[2]; // [rsp+48h] [rbp-20h] BYREF _QWORD v13[2]; // [rsp+58h] [rbp-10h] BYREF v13[0] = a1; v13[1] = a2; v12[1] = a3; v12[0] = a3; v11 = fmt::v10::basic_string_view<char>::data((long long)v13); v10 = 4LL; if ( (unsigned long long)fmt::v10::basic_string_view<char>::size((long long)v13) >= 4 ) { v9 = fmt::v10::basic_string_view<char>::size((long long)v13) + v11 - 4 + 1; while ( v11 < v9 ) { result = fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1})::{lambda(char const*,char const*)#1}::operator()( v12, v11, v11); v11 = result; if ( !result ) return result; } } v4 = fmt::v10::basic_string_view<char>::data((long long)v13); result = fmt::v10::basic_string_view<char>::size((long long)v13) + v4 - v11; v8 = result; if ( result ) { memset(v7, 0LL, sizeof(v7)); ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_( v11, v8 + v11, (long long)v7); v6 = v7; do { result = fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1})::{lambda(char const*,char const*)#1}::operator()( v12, v6, v11); v5 = result; if ( !result ) break; v11 += result - (_QWORD)v6; v6 = (_BYTE *)result; result -= (long long)v7; } while ( v5 - (long long)v7 < v8 ); } return result; }
for_each_codepoint<fmt::v10::detail::find_escape(char_const*,char_const*)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}>: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x50],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x58] CALL 0x0012a420 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x38],0x4 LEA RDI,[RSP + 0x58] CALL 0x0012a430 CMP RAX,0x4 JC 0x001b5bd7 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x58] CALL 0x0012a430 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,RCX ADD RAX,-0x4 ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX LAB_001b5ba1: MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [RSP + 0x30] JNC 0x001b5bd5 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x48] CALL 0x001b5cb0 MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x001b5bd3 JMP 0x001b5ca0 LAB_001b5bd3: JMP 0x001b5ba1 LAB_001b5bd5: JMP 0x001b5bd7 LAB_001b5bd7: LEA RDI,[RSP + 0x58] CALL 0x0012a420 MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x58] CALL 0x0012a430 MOV RCX,RAX MOV RAX,qword ptr [RSP] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x40] SUB RAX,RCX MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JZ 0x001b5ca0 LEA RDI,[RSP + 0x21] XOR ESI,ESI MOV EDX,0x7 CALL 0x001163a0 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,qword ptr [RSP + 0x28] LEA RDX,[RSP + 0x21] CALL 0x00194e80 LEA RAX,[RSP + 0x21] MOV qword ptr [RSP + 0x18],RAX LAB_001b5c46: MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x48] CALL 0x001b5cb0 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x001b5c69 JMP 0x001b5ca0 LAB_001b5c69: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] SUB RAX,RCX ADD RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RSP + 0x21] SUB RAX,RCX CMP RAX,qword ptr [RSP + 0x28] JL 0x001b5c46 JMP 0x001b5ca0 LAB_001b5ca0: ADD RSP,0x68 RET
/* void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*, char const*)::{lambda(unsigned int, fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>, fmt::v10::detail::find_escape(char const*, char const*)::{lambda(unsigned int, fmt::v10::basic_string_view<char>)#1}) */ void __thiscall fmt::v10::detail:: for_each_codepoint<fmt::v10::detail::find_escape(char_const*,char_const*)::_lambda(unsigned_int,fmt::v10::basic_string_view<char>)_1_> (detail *this,int8 param_2,int8 param_3) { ulong uVar1; long lVar2; long lVar3; char *pcVar4; char *local_50; char local_47 [7]; long local_40; char *local_38; int8 local_30; char *local_28; int8 local_20; int8 local_18; detail *local_10; int8 local_8; local_20 = param_3; local_18 = param_3; local_10 = this; local_8 = param_2; local_28 = (char *)basic_string_view<char>::data((basic_string_view<char> *)&local_10); local_30 = 4; uVar1 = basic_string_view<char>::size((basic_string_view<char> *)&local_10); pcVar4 = local_28; if (uVar1 < 4) { LAB_001b5bd7: lVar2 = basic_string_view<char>::data((basic_string_view<char> *)&local_10); lVar3 = basic_string_view<char>::size((basic_string_view<char> *)&local_10); local_40 = (lVar2 + lVar3) - (long)local_28; if (local_40 != 0) { memset(local_47,0,7); _ZN3fmt3v106detail8copy_strIcKccTnNSt9enable_ifIXaasr3std7is_sameINSt12remove_constIT0_E4typeET1_EE5valuesr7is_charIS9_EE5valueEiE4typeELi0EEEPS9_PS6_SD_SC_ (local_28,local_28 + local_40,local_47); local_50 = local_47; do { pcVar4 = (char *)for_each_codepoint<fmt::v10::detail::find_escape(char_const*,char_const*)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char_const*,char_const*)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}) ::{lambda(char_const*,char_const*)#1}::operator() ((_lambda_char_const__char_const___1_ *)&local_20,local_50, local_28); if (pcVar4 == (char *)0x0) { return; } local_28 = local_28 + ((long)pcVar4 - (long)local_50); local_50 = pcVar4; } while ((long)pcVar4 - (long)local_47 < local_40); } } else { lVar2 = basic_string_view<char>::size((basic_string_view<char> *)&local_10); local_38 = pcVar4 + lVar2 + -3; do { if (local_38 <= local_28) goto LAB_001b5bd7; local_28 = (char *)for_each_codepoint<fmt::v10::detail::find_escape(char_const*,char_const*)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char_const*,char_const*)::{lambda(unsigned_int,fmt::v10::basic_string_view<char>)#1}) ::{lambda(char_const*,char_const*)#1}::operator() ((_lambda_char_const__char_const___1_ *)&local_20,local_28, local_28); } while (local_28 != (char *)0x0); } return; }
2,336
ModbusObject::setSlot(void*, void*)
serhmarch[P]ModbusBridge/modbus/src/ModbusObject.cpp
void ModbusObject::setSlot(void *signalMethodPtr, void *slotPtr) { (*d_ptr)[signalMethodPtr].push_back(slotPtr); }
O1
cpp
ModbusObject::setSlot(void*, void*): pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsp, %rax movq %rsi, (%rax) movq 0x8(%rdi), %rdi addq $0x28, %rdi movq %rax, %rsi callq 0x8ccc movq %rax, %r14 movl $0x18, %edi callq 0x5300 movq %rbx, 0x10(%rax) movq %rax, %rdi movq %r14, %rsi callq 0x5080 incq 0x10(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN12ModbusObject7setSlotEPvS0_: push r14 push rbx push rax mov rbx, rdx mov rax, rsp mov [rax], rsi mov rdi, [rdi+8] add rdi, 28h ; '(' mov rsi, rax call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_NSt7__cxx114listIS1_SaIS1_EEEESaIS8_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&) mov r14, rax mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov [rax+10h], rbx mov rdi, rax; this mov rsi, r14; std::__detail::_List_node_base * call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*) inc qword ptr [r14+10h] add rsp, 8 pop rbx pop r14 retn
long long ModbusObject::setSlot(ModbusObject *this, void *a2, void *a3) { std::__detail::_List_node_base *v4; // r14 std::__detail::_List_node_base *v5; // rax long long result; // rax void *v7; // [rsp-8h] [rbp-18h] BYREF v7 = a2; v4 = (std::__detail::_List_node_base *)std::__detail::_Map_base<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( *((_QWORD *)this + 1) + 40LL, &v7); v5 = (std::__detail::_List_node_base *)operator new(0x18uLL); *((_QWORD *)v5 + 2) = a3; result = std::__detail::_List_node_base::_M_hook(v5, v4); ++*((_QWORD *)v4 + 2); return result; }
setSlot: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV RAX,RSP MOV qword ptr [RAX],RSI MOV RDI,qword ptr [RDI + 0x8] ADD RDI,0x28 MOV RSI,RAX CALL 0x00108ccc MOV R14,RAX MOV EDI,0x18 CALL 0x00105300 MOV qword ptr [RAX + 0x10],RBX MOV RDI,RAX MOV RSI,R14 CALL 0x00105080 INC qword ptr [R14 + 0x10] ADD RSP,0x8 POP RBX POP R14 RET
/* ModbusObject::setSlot(void*, void*) */ void __thiscall ModbusObject::setSlot(ModbusObject *this,void *param_1,void *param_2) { long lVar1; _List_node_base *p_Var2; void *local_18; local_18 = param_1; lVar1 = std::__detail:: _Map_base<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,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<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)(*(long *)(this + 8) + 0x28),&local_18); p_Var2 = (_List_node_base *)operator_new(0x18); *(void **)(p_Var2 + 0x10) = param_2; std::__detail::_List_node_base::_M_hook(p_Var2); *(long *)(lVar1 + 0x10) = *(long *)(lVar1 + 0x10) + 1; return; }
2,337
ModbusObject::setSlot(void*, void*)
serhmarch[P]ModbusBridge/modbus/src/ModbusObject.cpp
void ModbusObject::setSlot(void *signalMethodPtr, void *slotPtr) { (*d_ptr)[signalMethodPtr].push_back(slotPtr); }
O3
cpp
ModbusObject::setSlot(void*, void*): pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsp, %rax movq %rsi, (%rax) movq 0x8(%rdi), %rdi addq $0x28, %rdi movq %rax, %rsi callq 0x8db6 movq %rax, %r14 movl $0x18, %edi callq 0x5300 movq %rbx, 0x10(%rax) movq %rax, %rdi movq %r14, %rsi callq 0x5080 incq 0x10(%r14) addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN12ModbusObject7setSlotEPvS0_: push r14 push rbx push rax mov rbx, rdx mov rax, rsp mov [rax], rsi mov rdi, [rdi+8] add rdi, 28h ; '(' mov rsi, rax call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_NSt7__cxx114listIS1_SaIS1_EEEESaIS8_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&) mov r14, rax mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov [rax+10h], rbx mov rdi, rax; this mov rsi, r14; std::__detail::_List_node_base * call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*) inc qword ptr [r14+10h] add rsp, 8 pop rbx pop r14 retn
long long ModbusObject::setSlot(ModbusObject *this, void *a2, void *a3) { std::__detail::_List_node_base *v4; // r14 std::__detail::_List_node_base *v5; // rax long long result; // rax void *v7; // [rsp-8h] [rbp-18h] BYREF v7 = a2; v4 = (std::__detail::_List_node_base *)std::__detail::_Map_base<void *,std::pair<void * const,std::list<void *>>,std::allocator<std::pair<void * const,std::list<void *>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( *((_QWORD *)this + 1) + 40LL, &v7); v5 = (std::__detail::_List_node_base *)operator new(0x18uLL); *((_QWORD *)v5 + 2) = a3; result = std::__detail::_List_node_base::_M_hook(v5, v4); ++*((_QWORD *)v4 + 2); return result; }
setSlot: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV RAX,RSP MOV qword ptr [RAX],RSI MOV RDI,qword ptr [RDI + 0x8] ADD RDI,0x28 MOV RSI,RAX CALL 0x00108db6 MOV R14,RAX MOV EDI,0x18 CALL 0x00105300 MOV qword ptr [RAX + 0x10],RBX MOV RDI,RAX MOV RSI,R14 CALL 0x00105080 INC qword ptr [R14 + 0x10] ADD RSP,0x8 POP RBX POP R14 RET
/* ModbusObject::setSlot(void*, void*) */ void __thiscall ModbusObject::setSlot(ModbusObject *this,void *param_1,void *param_2) { long lVar1; _List_node_base *p_Var2; void *local_18; local_18 = param_1; lVar1 = std::__detail:: _Map_base<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,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<void*,std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>,std::allocator<std::pair<void*const,std::__cxx11::list<void*,std::allocator<void*>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)(*(long *)(this + 8) + 0x28),&local_18); p_Var2 = (_List_node_base *)operator_new(0x18); *(void **)(p_Var2 + 0x10) = param_2; std::__detail::_List_node_base::_M_hook(p_Var2); *(long *)(lVar1 + 0x10) = *(long *)(lVar1 + 0x10) + 1; return; }
2,338
stbi__readval(stbi__context*, int, unsigned char*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) { int mask=0x80, i; for (i=0; i<4; ++i, mask>>=1) { if (channel & mask) { if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); dest[i]=stbi__get8(s); } } return dest; }
O0
c
stbi__readval(stbi__context*, int, unsigned char*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq %rdx, 0x8(%rsp) movl $0x80, 0x4(%rsp) movl $0x0, (%rsp) cmpl $0x4, (%rsp) jge 0x95bf0 movl 0x14(%rsp), %eax andl 0x4(%rsp), %eax cmpl $0x0, %eax je 0x95bd9 movq 0x18(%rsp), %rdi callq 0x954f0 cmpl $0x0, %eax je 0x95bc1 leaq 0x1ba869(%rip), %rdi # 0x250413 callq 0x767f0 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx cmovneq %rax, %rax movq %rax, 0x20(%rsp) jmp 0x95bfa movq 0x18(%rsp), %rdi callq 0x8faf0 movb %al, %dl movq 0x8(%rsp), %rax movslq (%rsp), %rcx movb %dl, (%rax,%rcx) jmp 0x95bdb movl (%rsp), %eax addl $0x1, %eax movl %eax, (%rsp) movl 0x4(%rsp), %eax sarl %eax movl %eax, 0x4(%rsp) jmp 0x95b81 movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZL13stbi__readvalP13stbi__contextiPh: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_20], rdx mov [rsp+28h+var_24], 80h mov [rsp+28h+var_28], 0 loc_95B81: cmp [rsp+28h+var_28], 4 jge short loc_95BF0 mov eax, [rsp+28h+var_14] and eax, [rsp+28h+var_24] cmp eax, 0 jz short loc_95BD9 mov rdi, [rsp+28h+var_10] call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) cmp eax, 0 jz short loc_95BC1 lea rdi, aBadFile; "bad file" call _ZL9stbi__errPKc; stbi__err(char const*) mov ecx, eax xor eax, eax cmp ecx, 0 cmovnz rax, rax mov [rsp+28h+var_8], rax jmp short loc_95BFA loc_95BC1: mov rdi, [rsp+28h+var_10] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov dl, al mov rax, [rsp+28h+var_20] movsxd rcx, [rsp+28h+var_28] mov [rax+rcx], dl loc_95BD9: jmp short $+2 loc_95BDB: mov eax, [rsp+28h+var_28] add eax, 1 mov [rsp+28h+var_28], eax mov eax, [rsp+28h+var_24] sar eax, 1 mov [rsp+28h+var_24], eax jmp short loc_95B81 loc_95BF0: mov rax, [rsp+28h+var_20] mov [rsp+28h+var_8], rax loc_95BFA: mov rax, [rsp+28h+var_8] add rsp, 28h retn
long long stbi__readval(long long a1, int a2, long long a3) { int i; // [rsp+0h] [rbp-28h] int v5; // [rsp+4h] [rbp-24h] v5 = 128; for ( i = 0; i < 4; ++i ) { if ( (v5 & a2) != 0 ) { if ( stbi__at_eof(a1) ) { stbi__err("bad file"); return 0LL; } *(_BYTE *)(a3 + i) = stbi__get8(a1); } v5 >>= 1; } return a3; }
stbi__readval: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x4],0x80 MOV dword ptr [RSP],0x0 LAB_00195b81: CMP dword ptr [RSP],0x4 JGE 0x00195bf0 MOV EAX,dword ptr [RSP + 0x14] AND EAX,dword ptr [RSP + 0x4] CMP EAX,0x0 JZ 0x00195bd9 MOV RDI,qword ptr [RSP + 0x18] CALL 0x001954f0 CMP EAX,0x0 JZ 0x00195bc1 LEA RDI,[0x350413] CALL 0x001767f0 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 CMOVNZ RAX,RAX MOV qword ptr [RSP + 0x20],RAX JMP 0x00195bfa LAB_00195bc1: MOV RDI,qword ptr [RSP + 0x18] CALL 0x0018faf0 MOV DL,AL MOV RAX,qword ptr [RSP + 0x8] MOVSXD RCX,dword ptr [RSP] MOV byte ptr [RAX + RCX*0x1],DL LAB_00195bd9: JMP 0x00195bdb LAB_00195bdb: MOV EAX,dword ptr [RSP] ADD EAX,0x1 MOV dword ptr [RSP],EAX MOV EAX,dword ptr [RSP + 0x4] SAR EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00195b81 LAB_00195bf0: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX LAB_00195bfa: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
/* stbi__readval(stbi__context*, int, unsigned char*) */ uchar * stbi__readval(stbi__context *param_1,int param_2,uchar *param_3) { uchar uVar1; int iVar2; int local_28; uint local_24; local_24 = 0x80; local_28 = 0; do { if (3 < local_28) { return param_3; } if ((param_2 & local_24) != 0) { iVar2 = stbi__at_eof(param_1); if (iVar2 != 0) { stbi__err("bad file"); return (uchar *)0x0; } uVar1 = stbi__get8(param_1); param_3[local_28] = uVar1; } local_28 = local_28 + 1; local_24 = (int)local_24 >> 1; } while( true ); }
2,339
write_rest_of_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool write_rest_of_head(MARIA_HA *info, uint position, ulong rest_length) { MARIA_SHARE *share= info->s; uint full_page_size= FULL_PAGE_SIZE(share); MARIA_BITMAP_BLOCK *block; DBUG_ENTER("write_rest_of_head"); DBUG_PRINT("enter", ("position: %u rest_length: %lu", position, rest_length)); if (position == 0) { /* Write out full pages */ uint pages= rest_length / full_page_size; rest_length%= full_page_size; if (rest_length >= MAX_TAIL_SIZE(share->block_size)) { /* Put tail on a full page */ pages++; rest_length= 0; } if (find_mid(info, pages, 1)) DBUG_RETURN(1); /* Insert empty block after full pages, to allow write_block_record() to split segment into used + free page */ block= dynamic_element(&info->bitmap_blocks, 2, MARIA_BITMAP_BLOCK*); block->page_count= 0; block->used= 0; } if (rest_length) { if (find_tail(info, rest_length, ELEMENTS_RESERVED_FOR_MAIN_PART - 1)) DBUG_RETURN(1); } else { /* Empty tail block */ block= dynamic_element(&info->bitmap_blocks, ELEMENTS_RESERVED_FOR_MAIN_PART - 1, MARIA_BITMAP_BLOCK *); block->page_count= 0; block->used= 0; } DBUG_RETURN(0); }
O0
c
write_rest_of_head: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl 0x7bc(%rax), %eax movq -0x28(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x8, %ecx subl %ecx, %eax subl $0x4, %eax movl %eax, -0x2c(%rbp) jmp 0x441af cmpl $0x0, -0x14(%rbp) jne 0x44249 movq -0x20(%rbp), %rax movl -0x2c(%rbp), %ecx xorl %edx, %edx divq %rcx movl %eax, -0x3c(%rbp) movl -0x2c(%rbp), %eax movl %eax, %ecx movq -0x20(%rbp), %rax xorl %edx, %edx divq %rcx movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx imull $0x3, 0x7bc(%rcx), %ecx shrl $0x2, %ecx movl %ecx, %ecx cmpq %rcx, %rax jb 0x44204 movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) movq $0x0, -0x20(%rbp) movq -0x10(%rbp), %rdi movl -0x3c(%rbp), %eax movl %eax, %esi movl $0x1, %edx callq 0x46aa0 cmpb $0x0, %al je 0x44223 jmp 0x4421d movb $0x1, -0x1(%rbp) jmp 0x4429e movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax addq $0x30, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) cmpq $0x0, -0x20(%rbp) je 0x44272 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, %esi movl $0x3, %edx callq 0x46780 cmpb $0x0, %al je 0x44270 jmp 0x4426a movb $0x1, -0x1(%rbp) jmp 0x4429e jmp 0x44298 movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax addq $0x48, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) jmp 0x4429a movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
write_rest_of_head: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov eax, [rax+7BCh] mov rcx, [rbp+var_28] mov ecx, [rcx+0C18h] add ecx, 8 sub eax, ecx sub eax, 4 mov [rbp+var_2C], eax jmp short $+2 loc_441AF: cmp [rbp+var_14], 0 jnz loc_44249 mov rax, [rbp+var_20] mov ecx, [rbp+var_2C] xor edx, edx div rcx mov [rbp+var_3C], eax mov eax, [rbp+var_2C] mov ecx, eax mov rax, [rbp+var_20] xor edx, edx div rcx mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov rcx, [rbp+var_28] imul ecx, [rcx+7BCh], 3 shr ecx, 2 mov ecx, ecx cmp rax, rcx jb short loc_44204 mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax mov [rbp+var_20], 0 loc_44204: mov rdi, [rbp+var_10] mov eax, [rbp+var_3C] mov esi, eax mov edx, 1 call find_mid cmp al, 0 jz short loc_44223 jmp short $+2 loc_4421D: mov [rbp+var_1], 1 jmp short loc_4429E loc_44223: mov rax, [rbp+var_10] mov rax, [rax+2C0h] add rax, 30h ; '0' mov [rbp+var_38], rax mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 loc_44249: cmp [rbp+var_20], 0 jz short loc_44272 mov rdi, [rbp+var_10] mov rax, [rbp+var_20] mov esi, eax mov edx, 3 call find_tail cmp al, 0 jz short loc_44270 jmp short $+2 loc_4426A: mov [rbp+var_1], 1 jmp short loc_4429E loc_44270: jmp short loc_44298 loc_44272: mov rax, [rbp+var_10] mov rax, [rax+2C0h] add rax, 48h ; 'H' mov [rbp+var_38], rax mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 loc_44298: jmp short $+2 loc_4429A: mov [rbp+var_1], 0 loc_4429E: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char write_rest_of_head(_QWORD *a1, int a2, unsigned long long a3) { long long v3; // rax long long v4; // rax unsigned int v6; // [rsp+4h] [rbp-3Ch] unsigned int v7; // [rsp+14h] [rbp-2Ch] unsigned long long v8; // [rsp+20h] [rbp-20h] v8 = a3; v7 = *(_DWORD *)(*a1 + 1980LL) - (*(_DWORD *)(*a1 + 3096LL) + 8) - 4; if ( a2 ) { LABEL_7: if ( v8 ) { if ( (unsigned __int8)find_tail(a1, (unsigned int)v8, 3LL) ) return 1; } else { v4 = a1[88]; *(_DWORD *)(v4 + 80) = 0; *(_BYTE *)(v4 + 92) = 0; } return 0; } v6 = a3 / v7; v8 = a3 % v7; if ( v8 >= (unsigned int)(3 * *(_DWORD *)(*a1 + 1980LL)) >> 2 ) { ++v6; v8 = 0LL; } if ( !(unsigned __int8)find_mid(a1, v6, 1LL) ) { v3 = a1[88]; *(_DWORD *)(v3 + 56) = 0; *(_BYTE *)(v3 + 68) = 0; goto LABEL_7; } return 1; }
write_rest_of_head: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x8 SUB EAX,ECX SUB EAX,0x4 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001441af LAB_001441af: CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00144249 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x2c] XOR EDX,EDX DIV RCX MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] IMUL ECX,dword ptr [RCX + 0x7bc],0x3 SHR ECX,0x2 MOV ECX,ECX CMP RAX,RCX JC 0x00144204 MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX MOV qword ptr [RBP + -0x20],0x0 LAB_00144204: MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x3c] MOV ESI,EAX MOV EDX,0x1 CALL 0x00146aa0 CMP AL,0x0 JZ 0x00144223 JMP 0x0014421d LAB_0014421d: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014429e LAB_00144223: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] ADD RAX,0x30 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 LAB_00144249: CMP qword ptr [RBP + -0x20],0x0 JZ 0x00144272 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV ESI,EAX MOV EDX,0x3 CALL 0x00146780 CMP AL,0x0 JZ 0x00144270 JMP 0x0014426a LAB_0014426a: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014429e LAB_00144270: JMP 0x00144298 LAB_00144272: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] ADD RAX,0x48 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 LAB_00144298: JMP 0x0014429a LAB_0014429a: MOV byte ptr [RBP + -0x1],0x0 LAB_0014429e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 write_rest_of_head(long *param_1,int param_2,ulong param_3) { long lVar1; char cVar2; uint uVar3; int local_44; ulong local_28; lVar1 = *param_1; uVar3 = (*(int *)(lVar1 + 0x7bc) - (*(int *)(lVar1 + 0xc18) + 8)) - 4; local_28 = param_3; if (param_2 == 0) { local_44 = (int)(param_3 / uVar3); local_28 = param_3 % (ulong)uVar3; if ((uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2 <= local_28) { local_44 = local_44 + 1; local_28 = 0; } cVar2 = find_mid(param_1,local_44,1); if (cVar2 != '\0') { return 1; } lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x38) = 0; *(int1 *)(lVar1 + 0x44) = 0; } if (local_28 == 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x50) = 0; *(int1 *)(lVar1 + 0x5c) = 0; } else { cVar2 = find_tail(param_1,local_28 & 0xffffffff,3); if (cVar2 != '\0') { return 1; } } return 0; }
2,340
write_rest_of_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool write_rest_of_head(MARIA_HA *info, uint position, ulong rest_length) { MARIA_SHARE *share= info->s; uint full_page_size= FULL_PAGE_SIZE(share); MARIA_BITMAP_BLOCK *block; DBUG_ENTER("write_rest_of_head"); DBUG_PRINT("enter", ("position: %u rest_length: %lu", position, rest_length)); if (position == 0) { /* Write out full pages */ uint pages= rest_length / full_page_size; rest_length%= full_page_size; if (rest_length >= MAX_TAIL_SIZE(share->block_size)) { /* Put tail on a full page */ pages++; rest_length= 0; } if (find_mid(info, pages, 1)) DBUG_RETURN(1); /* Insert empty block after full pages, to allow write_block_record() to split segment into used + free page */ block= dynamic_element(&info->bitmap_blocks, 2, MARIA_BITMAP_BLOCK*); block->page_count= 0; block->used= 0; } if (rest_length) { if (find_tail(info, rest_length, ELEMENTS_RESERVED_FOR_MAIN_PART - 1)) DBUG_RETURN(1); } else { /* Empty tail block */ block= dynamic_element(&info->bitmap_blocks, ELEMENTS_RESERVED_FOR_MAIN_PART - 1, MARIA_BITMAP_BLOCK *); block->page_count= 0; block->used= 0; } DBUG_RETURN(0); }
O3
c
write_rest_of_head: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi jne 0x41c66 movq (%rbx), %r15 movl 0x7bc(%r15), %ecx movl 0xc18(%r15), %eax negl %eax leal (%rcx,%rax), %esi addl $-0xc, %esi movq %r14, %rax xorl %edx, %edx divq %rsi movq %rax, %r12 xorl %eax, %eax leal (%rcx,%rcx,2), %ecx shrl $0x2, %ecx movq %rdx, %r14 cmpq %rcx, %rdx cmovaeq %rax, %r14 sbbl $-0x1, %r12d addq $0xa10, %r15 # imm = 0xA10 movq 0x2c0(%rbx), %r13 addq $0x18, %r13 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x4305b testq %rax, %rax jne 0x41c54 movq %rbx, %rdi movq %r15, %rsi callq 0x43018 testb %al, %al je 0x41c29 movb $0x1, %al jmp 0x41c99 movq 0x2c0(%rbx), %rax movl $0x0, 0x38(%rax) movb $0x0, 0x44(%rax) testq %r14, %r14 je 0x41c85 movq %rbx, %rdi movl %r14d, %esi movl $0x3, %edx callq 0x43328 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x41c99 jmp 0x41c97 movq 0x2c0(%rbx), %rax movl $0x0, 0x50(%rax) movb $0x0, 0x5c(%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
write_rest_of_head: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rdi test esi, esi jnz loc_41C66 mov r15, [rbx] mov ecx, [r15+7BCh] mov eax, [r15+0C18h] neg eax lea esi, [rcx+rax] add esi, 0FFFFFFF4h mov rax, r14 xor edx, edx div rsi mov r12, rax xor eax, eax lea ecx, [rcx+rcx*2] shr ecx, 2 mov r14, rdx cmp rdx, rcx cmovnb r14, rax sbb r12d, 0FFFFFFFFh add r15, 0A10h mov r13, [rbx+2C0h] add r13, 18h loc_41C29: mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, 1 call allocate_full_pages test rax, rax jnz short loc_41C54 mov rdi, rbx mov rsi, r15 call move_to_next_bitmap test al, al jz short loc_41C29 mov al, 1 jmp short loc_41C99 loc_41C54: mov rax, [rbx+2C0h] mov dword ptr [rax+38h], 0 mov byte ptr [rax+44h], 0 loc_41C66: test r14, r14 jz short loc_41C85 mov rdi, rbx mov esi, r14d mov edx, 3 call find_tail mov ecx, eax mov al, 1 test cl, cl jnz short loc_41C99 jmp short loc_41C97 loc_41C85: mov rax, [rbx+2C0h] mov dword ptr [rax+50h], 0 mov byte ptr [rax+5Ch], 0 loc_41C97: xor eax, eax loc_41C99: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char write_rest_of_head(_QWORD *a1, int a2, unsigned long long a3) { unsigned long long v3; // r14 int v4; // ecx unsigned long long v5; // rdx unsigned long long v6; // r12 unsigned long long v7; // rcx long long v8; // r12 long long v9; // r15 long long v10; // r13 long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 char result; // al long long v16; // rax char tail; // cl long long v18; // rax v3 = a3; if ( !a2 ) { v4 = *(_DWORD *)(*a1 + 1980LL); v5 = a3 % (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v6 = v3 / (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v7 = (unsigned int)(3 * v4) >> 2; v3 = v5; if ( v5 >= v7 ) v3 = 0LL; v8 = (unsigned int)v6 - ((v5 < v7) - 1); v9 = *a1 + 2576LL; v10 = a1[88] + 24LL; while ( !allocate_full_pages(v9, v8, v10, 1LL) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v9, v11, v12, v13, v14) ) return 1; } v16 = a1[88]; *(_DWORD *)(v16 + 56) = 0; *(_BYTE *)(v16 + 68) = 0; } if ( v3 ) { tail = find_tail(a1); result = 1; if ( tail ) return result; } else { v18 = a1[88]; *(_DWORD *)(v18 + 80) = 0; *(_BYTE *)(v18 + 92) = 0; } return 0; }
write_rest_of_head: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JNZ 0x00141c66 MOV R15,qword ptr [RBX] MOV ECX,dword ptr [R15 + 0x7bc] MOV EAX,dword ptr [R15 + 0xc18] NEG EAX LEA ESI,[RCX + RAX*0x1] ADD ESI,-0xc MOV RAX,R14 XOR EDX,EDX DIV RSI MOV R12,RAX XOR EAX,EAX LEA ECX,[RCX + RCX*0x2] SHR ECX,0x2 MOV R14,RDX CMP RDX,RCX CMOVNC R14,RAX SBB R12D,-0x1 ADD R15,0xa10 MOV R13,qword ptr [RBX + 0x2c0] ADD R13,0x18 LAB_00141c29: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,0x1 CALL 0x0014305b TEST RAX,RAX JNZ 0x00141c54 MOV RDI,RBX MOV RSI,R15 CALL 0x00143018 TEST AL,AL JZ 0x00141c29 MOV AL,0x1 JMP 0x00141c99 LAB_00141c54: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x38],0x0 MOV byte ptr [RAX + 0x44],0x0 LAB_00141c66: TEST R14,R14 JZ 0x00141c85 MOV RDI,RBX MOV ESI,R14D MOV EDX,0x3 CALL 0x00143328 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00141c99 JMP 0x00141c97 LAB_00141c85: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x50],0x0 MOV byte ptr [RAX + 0x5c],0x0 LAB_00141c97: XOR EAX,EAX LAB_00141c99: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 write_rest_of_head(long *param_1,int param_2,ulong param_3) { long lVar1; long lVar2; ulong uVar3; char cVar4; long lVar5; int8 uVar6; uint uVar7; bool bVar8; if (param_2 == 0) { lVar1 = *param_1; uVar7 = (*(int *)(lVar1 + 0x7bc) - *(int *)(lVar1 + 0xc18)) - 0xc; uVar3 = param_3 / uVar7; param_3 = param_3 % (ulong)uVar7; bVar8 = param_3 < (uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2; if (!bVar8) { param_3 = 0; } lVar2 = param_1[0x58]; do { lVar5 = allocate_full_pages(lVar1 + 0xa10,((int)uVar3 + 1) - (uint)bVar8,lVar2 + 0x18,1); if (lVar5 != 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x38) = 0; *(int1 *)(lVar1 + 0x44) = 0; goto LAB_00141c66; } cVar4 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar4 == '\0'); uVar6 = 1; } else { LAB_00141c66: if (param_3 == 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x50) = 0; *(int1 *)(lVar1 + 0x5c) = 0; } else { cVar4 = find_tail(param_1,param_3 & 0xffffffff,3); if (cVar4 != '\0') { return 1; } } uVar6 = 0; } return uVar6; }
2,341
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O3
c
my_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %r14 testq %rsi, %rsi jne 0xa0f04 leaq 0xb6931b(%rip), %rax # 0xc0a208 movl (%rax), %edi movl $0x90, %esi movq %r15, %rdx callq 0xa11e5 movq %rax, %r14 testq %rax, %rax je 0xa0f30 movq %rbx, %rdi movq %r14, %rsi callq 0x29810 testl %eax, %eax je 0xa0f59 callq 0x29790 movl (%rax), %r13d callq 0xa2f56 movl %r13d, (%rax) testq %r12, %r12 jne 0xa0f30 movq %r14, %rdi callq 0xa1412 testb $0x18, %r15b je 0xa0f56 callq 0xa2f56 movl (%rax), %ecx xorl %r14d, %r14d movl $0x4, %esi movl $0xd, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x9f467 jmp 0xa0f59 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_stat: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, rsi test rsi, rsi jnz short loc_A0F04 lea rax, key_memory_MY_STAT mov edi, [rax] mov esi, 90h mov rdx, r15 call my_malloc mov r14, rax test rax, rax jz short loc_A0F30 loc_A0F04: mov rdi, rbx mov rsi, r14 call _stat64 test eax, eax jz short loc_A0F59 call ___errno_location mov r13d, [rax] call _my_thread_var mov [rax], r13d test r12, r12 jnz short loc_A0F30 mov rdi, r14 call my_free loc_A0F30: test r15b, 18h jz short loc_A0F56 call _my_thread_var mov ecx, [rax] xor r14d, r14d mov esi, 4 mov edi, 0Dh mov rdx, rbx xor eax, eax call my_error jmp short loc_A0F59 loc_A0F56: xor r14d, r14d loc_A0F59: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_stat(long long a1, long long a2, long long a3) { char v3; // r15 long long v5; // r14 long long v6; // rdi int v7; // r13d unsigned int *v8; // rax v3 = a3; v5 = a2; if ( a2 || (v6 = key_memory_MY_STAT, (v5 = my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0) ) { v6 = a1; if ( !(unsigned int)stat64(a1, v5) ) return v5; v7 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var(a1) = v7; if ( !a2 ) { v6 = v5; my_free(v5); } } if ( (v3 & 0x18) == 0 ) return 0LL; v8 = (unsigned int *)my_thread_var(v6); v5 = 0LL; my_error(0xDu, 4LL, a1, *v8); return v5; }
my_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,RSI TEST RSI,RSI JNZ 0x001a0f04 LEA RAX,[0xd0a208] MOV EDI,dword ptr [RAX] MOV ESI,0x90 MOV RDX,R15 CALL 0x001a11e5 MOV R14,RAX TEST RAX,RAX JZ 0x001a0f30 LAB_001a0f04: MOV RDI,RBX MOV RSI,R14 CALL 0x00129810 TEST EAX,EAX JZ 0x001a0f59 CALL 0x00129790 MOV R13D,dword ptr [RAX] CALL 0x001a2f56 MOV dword ptr [RAX],R13D TEST R12,R12 JNZ 0x001a0f30 MOV RDI,R14 CALL 0x001a1412 LAB_001a0f30: TEST R15B,0x18 JZ 0x001a0f56 CALL 0x001a2f56 MOV ECX,dword ptr [RAX] XOR R14D,R14D MOV ESI,0x4 MOV EDI,0xd MOV RDX,RBX XOR EAX,EAX CALL 0x0019f467 JMP 0x001a0f59 LAB_001a0f56: XOR R14D,R14D LAB_001a0f59: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; stat64 *__buf; int *piVar2; int4 *puVar3; __buf = param_2; if ((param_2 != (stat64 *)0x0) || (__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) { iVar1 = stat64(param_1,__buf); if (iVar1 == 0) { return __buf; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(__buf); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
2,342
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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
void destroy(value_t t) { if ( (t == value_t::object && object == nullptr) || (t == value_t::array && array == nullptr) || (t == value_t::string && string == nullptr) || (t == value_t::binary && binary == nullptr) ) { //not initialized (e.g. due to exception in the ctor) return; } if (t == value_t::array || t == value_t::object) { // flatten the current json_value to a heap-allocated stack std::vector<basic_json> stack; // move the top-level items to stack if (t == value_t::array) { stack.reserve(array->size()); std::move(array->begin(), array->end(), std::back_inserter(stack)); } else { stack.reserve(object->size()); for (auto&& it : *object) { stack.push_back(std::move(it.second)); } } while (!stack.empty()) { // move the last item to local variable to be processed basic_json current_item(std::move(stack.back())); stack.pop_back(); // if current_item is array/object, move // its children to the stack to be processed later if (current_item.is_array()) { std::move(current_item.m_data.m_value.array->begin(), current_item.m_data.m_value.array->end(), std::back_inserter(stack)); current_item.m_data.m_value.array->clear(); } else if (current_item.is_object()) { for (auto&& it : *current_item.m_data.m_value.object) { stack.push_back(std::move(it.second)); } current_item.m_data.m_value.object->clear(); } // it's now safe that current_item get destructed // since it doesn't have any children } } switch (t) { case value_t::object: { AllocatorType<object_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, object); std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); break; } case value_t::array: { AllocatorType<array_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, array); std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); break; } case value_t::string: { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); break; } case value_t::binary: { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, binary, 1); break; } case value_t::null: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::discarded: default: { break; } } }
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>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp cmpl $0x1, %esi sete %cl movq (%rdi), %rax testq %rax, %rax sete %dl testb %dl, %cl jne 0x5f750 movl %esi, %r14d testq %rax, %rax sete %cl movl %r14d, %edx andb $-0x2, %dl cmpb $0x2, %dl sete %dl cmpb $0x8, %r14b sete %sil orb %dl, %sil testb %cl, %sil jne 0x5f750 movq %rdi, %rbx leal -0x1(%r14), %ecx cmpb $0x1, %cl ja 0x5f6d0 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq 0x8(%rax), %rsi subq (%rax), %rsi sarq $0x4, %rsi cmpb $0x2, %r14b jne 0x5f57f movq %rsp, %rdi callq 0x5f794 movq (%rbx), %rax movq (%rax), %r15 movq 0x8(%rax), %r13 subq %r15, %r13 sarq $0x4, %r13 testq %r13, %r13 jle 0x5f5c0 incq %r13 movq %rsp, %r12 movq %r12, %rdi movq %r15, %rsi callq 0x5e632 addq $0x10, %r15 decq %r13 cmpq $0x1, %r13 jg 0x5f565 jmp 0x5f5c0 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rsi, %rax movq %rsp, %rdi movq %rax, %rsi callq 0x5f794 movq (%rbx), %rax movq (%rax), %r12 movq 0x8(%rax), %r13 cmpq %r13, %r12 je 0x5f5c0 movq %rsp, %r15 leaq 0x20(%r12), %rsi movq %r15, %rdi callq 0x5e632 addq $0x30, %r12 cmpq %r13, %r12 jne 0x5f5aa movq 0x8(%rsp), %r13 cmpq %r13, (%rsp) je 0x5f6c8 leaq 0x20(%rsp), %r15 movq %rsp, %r12 leaq -0x10(%r13), %rdi movups -0x10(%r13), %xmm0 movaps %xmm0, 0x20(%rsp) xorl %esi, %esi callq 0x59800 movb $0x0, -0x10(%r13) movq $0x0, -0x8(%r13) movq %r15, %rdi movl $0x1, %esi callq 0x59800 movq 0x8(%rsp), %r13 addq $-0x10, %r13 movq %r13, 0x8(%rsp) movq %r13, %rdi xorl %esi, %esi callq 0x59800 movq %r13, %rdi callq 0x5efec movzbl 0x20(%rsp), %eax cmpl $0x1, %eax je 0x5f677 cmpl $0x2, %eax jne 0x5f6a7 movq 0x28(%rsp), %rax movq (%rax), %r13 movq 0x8(%rax), %rbp subq %r13, %rbp sarq $0x4, %rbp testq %rbp, %rbp jle 0x5f668 incq %rbp movq %r12, %rdi movq %r13, %rsi callq 0x5e632 addq $0x10, %r13 decq %rbp cmpq $0x1, %rbp jg 0x5f650 movq 0x28(%rsp), %rdi movq (%rdi), %rsi callq 0x5f874 jmp 0x5f6a7 movq 0x28(%rsp), %rax movq (%rax), %r13 movq 0x8(%rax), %rbp cmpq %rbp, %r13 je 0x5f69a leaq 0x20(%r13), %rsi movq %r12, %rdi callq 0x5e632 addq $0x30, %r13 jmp 0x5f683 movq 0x28(%rsp), %rdi movq (%rdi), %rsi callq 0x5f8ba movq %r15, %rdi xorl %esi, %esi callq 0x59800 movq %r15, %rdi callq 0x5efec movq 0x8(%rsp), %r13 cmpq %r13, (%rsp) jne 0x5f5d7 movq %rsp, %rdi callq 0x5f828 movzbl %r14b, %eax decl %eax cmpl $0x7, %eax ja 0x5f750 leaq 0x8a266(%rip), %rcx # 0xe9948 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%rbx), %rdi callq 0x5f974 movl $0x20, %r14d jmp 0x5f745 movq (%rbx), %rax movq (%rax), %rdi addq $0x10, %rax movl $0x20, %r14d cmpq %rax, %rdi je 0x5f745 movq (%rax), %rsi incq %rsi jmp 0x5f740 movq (%rbx), %rdi callq 0x5f828 movl $0x18, %r14d jmp 0x5f745 movq (%rbx), %rax movq (%rax), %rdi movl $0x28, %r14d testq %rdi, %rdi je 0x5f745 movq 0x10(%rax), %rsi subq %rdi, %rsi callq 0x1b8e0 movq (%rbx), %rdi movq %r14, %rsi callq 0x1b8e0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5f763 jmp 0x5f763 movq %rax, %rbx jmp 0x5f784 jmp 0x5f76a movq %rax, %rbx leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x59800 movq %r14, %rdi callq 0x5efec movq %rsp, %rdi callq 0x5f828 movq %rbx, %rdi callq 0x1bfb0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h cmp esi, 1 setz cl mov rax, [rdi] test rax, rax setz dl test cl, dl jnz def_5F6E9; jumptable 000000000005F6E9 default case, cases 4-7 mov r14d, esi test rax, rax setz cl mov edx, r14d and dl, 0FEh cmp dl, 2 setz dl cmp r14b, 8 setz sil or sil, dl test sil, cl jnz def_5F6E9; jumptable 000000000005F6E9 default case, cases 4-7 mov rbx, rdi lea ecx, [r14-1] cmp cl, 1 ja loc_5F6D0 xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 mov [rsp+68h+var_58], 0 mov rsi, [rax+8] sub rsi, [rax] sar rsi, 4 cmp r14b, 2 jnz short loc_5F57F mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::reserve(ulong) mov rax, [rbx] mov r15, [rax] mov r13, [rax+8] sub r13, r15 sar r13, 4 test r13, r13 jle short loc_5F5C0 inc r13 mov r12, rsp loc_5F565: mov rdi, r12 mov rsi, r15 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r15, 10h dec r13 cmp r13, 1 jg short loc_5F565 jmp short loc_5F5C0 loc_5F57F: mov rax, 0AAAAAAAAAAAAAAABh imul rax, rsi mov rdi, rsp mov rsi, rax call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE7reserveEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::reserve(ulong) mov rax, [rbx] mov r12, [rax] mov r13, [rax+8] cmp r12, r13 jz short loc_5F5C0 mov r15, rsp loc_5F5AA: lea rsi, [r12+20h] mov rdi, r15 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r12, 30h ; '0' cmp r12, r13 jnz short loc_5F5AA loc_5F5C0: mov r13, qword ptr [rsp+68h+var_68+8] cmp qword ptr [rsp+68h+var_68], r13 jz loc_5F6C8 lea r15, [rsp+68h+var_48] mov r12, rsp loc_5F5D7: lea rdi, [r13-10h] movups xmm0, xmmword ptr [r13-10h] movaps [rsp+68h+var_48], xmm0 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 byte ptr [r13-10h], 0 mov qword ptr [r13-8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r13, qword ptr [rsp+68h+var_68+8] add r13, 0FFFFFFFFFFFFFFF0h mov qword ptr [rsp+68h+var_68+8], r13 mov rdi, r13 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, r13 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() movzx eax, byte ptr [rsp+68h+var_48] cmp eax, 1 jz short loc_5F677 cmp eax, 2 jnz short loc_5F6A7 mov rax, qword ptr [rsp+68h+var_48+8] mov r13, [rax] mov rbp, [rax+8] sub rbp, r13 sar rbp, 4 test rbp, rbp jle short loc_5F668 inc rbp loc_5F650: mov rdi, r12 mov rsi, r13 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r13, 10h dec rbp cmp rbp, 1 jg short loc_5F650 loc_5F668: mov rdi, qword ptr [rsp+68h+var_48+8] mov rsi, [rdi] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE15_M_erase_at_endEPSD_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase_at_end(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>*) jmp short loc_5F6A7 loc_5F677: mov rax, qword ptr [rsp+68h+var_48+8] mov r13, [rax] mov rbp, [rax+8] loc_5F683: cmp r13, rbp jz short loc_5F69A lea rsi, [r13+20h] mov rdi, r12 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&) add r13, 30h ; '0' jmp short loc_5F683 loc_5F69A: mov rdi, qword ptr [rsp+68h+var_48+8] mov rsi, [rdi] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE15_M_erase_at_endEPSG_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::_M_erase_at_end(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>>*) loc_5F6A7: mov rdi, r15 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, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov r13, qword ptr [rsp+68h+var_68+8] cmp qword ptr [rsp+68h+var_68], r13 jnz loc_5F5D7 loc_5F6C8: mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() loc_5F6D0: movzx eax, r14b dec eax; switch 8 cases cmp eax, 7 ja short def_5F6E9; jumptable 000000000005F6E9 default case, cases 4-7 lea rcx, jpt_5F6E9 movsxd rax, ds:(jpt_5F6E9 - 0E9948h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_5F6EB: mov rdi, [rbx]; jumptable 000000000005F6E9 case 1 call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EED2Ev; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::~vector() mov r14d, 20h ; ' ' jmp short loc_5F745 loc_5F6FB: mov rax, [rbx]; jumptable 000000000005F6E9 case 3 mov rdi, [rax] add rax, 10h mov r14d, 20h ; ' ' cmp rdi, rax jz short loc_5F745 mov rsi, [rax] inc rsi jmp short loc_5F740 loc_5F718: mov rdi, [rbx]; jumptable 000000000005F6E9 case 2 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() mov r14d, 18h jmp short loc_5F745 loc_5F728: mov rax, [rbx]; jumptable 000000000005F6E9 case 8 mov rdi, [rax]; void * mov r14d, 28h ; '(' test rdi, rdi jz short loc_5F745 mov rsi, [rax+10h] sub rsi, rdi; unsigned __int64 loc_5F740: call __ZdlPvm; operator delete(void *,ulong) loc_5F745: mov rdi, [rbx]; void * mov rsi, r14; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) def_5F6E9: add rsp, 38h; jumptable 000000000005F6E9 default case, cases 4-7 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_5F763 jmp short $+2 loc_5F763: mov rbx, rax jmp short loc_5F784 jmp short $+2 loc_5F76A: mov rbx, rax lea r14, [rsp+arg_18] 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_5F784: mov rdi, rsp call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EED2Ev; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~vector() mov rdi, rbx call __Unwind_Resume
void nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( long long **a1, int a2) { long long *v2; // rax char v3; // r14 long long v5; // rsi long long v6; // r15 long long v7; // r13 long long v8; // r13 long long v9; // r12 long long i; // r13 long long j; // r13 char *v12; // r13 long long v13; // r13 long long v14; // rbp long long v15; // rbp long long v16; // r13 long long v17; // rbp unsigned long long v18; // r14 _BYTE *v19; // rdi _QWORD *v20; // rax unsigned long long v21; // rsi void **v22; // rax __int128 v23; // [rsp+0h] [rbp-68h] BYREF long long v24; // [rsp+10h] [rbp-58h] _OWORD v25[4]; // [rsp+20h] [rbp-48h] BYREF v2 = *a1; if ( *a1 != 0LL || a2 != 1 ) { v3 = a2; if ( v2 != 0LL || (a2 & 0xFE) != 2 && (_BYTE)a2 != 8 ) { if ( (unsigned __int8)(a2 - 1) <= 1u ) { v23 = 0LL; v24 = 0LL; v5 = (v2[1] - *v2) >> 4; if ( v3 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::reserve( &v23, v5); v6 = **a1; v7 = ((*a1)[1] - v6) >> 4; if ( v7 > 0 ) { v8 = v7 + 1; do { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (long long)&v23, v6); v6 += 16LL; --v8; } while ( v8 > 1 ); } } else { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::reserve( &v23, 0xAAAAAAAAAAAAAAABLL * v5); v9 = **a1; for ( i = (*a1)[1]; v9 != i; v9 += 48LL ) std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (long long)&v23, v9 + 32); } for ( j = *((_QWORD *)&v23 + 1); (_QWORD)v23 != *((_QWORD *)&v23 + 1); j = *((_QWORD *)&v23 + 1) ) { v25[0] = *(_OWORD *)(j - 16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(j - 16)); *(_BYTE *)(j - 16) = 0; *(_QWORD *)(j - 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v25); v12 = (char *)(*((_QWORD *)&v23 + 1) - 16LL); *((_QWORD *)&v23 + 1) = v12; 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(v12); 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(v12); if ( LOBYTE(v25[0]) == 1 ) { v16 = **((_QWORD **)&v25[0] + 1); v17 = *(_QWORD *)(*((_QWORD *)&v25[0] + 1) + 8LL); while ( v16 != v17 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (long long)&v23, v16 + 32); v16 += 48LL; } std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::_M_erase_at_end( *((_QWORD *)&v25[0] + 1), **((_QWORD **)&v25[0] + 1)); } else if ( LOBYTE(v25[0]) == 2 ) { v13 = **((_QWORD **)&v25[0] + 1); v14 = (long long)(*(_QWORD *)(*((_QWORD *)&v25[0] + 1) + 8LL) - **((_QWORD **)&v25[0] + 1)) >> 4; if ( v14 > 0 ) { v15 = v14 + 1; do { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (long long)&v23, v13); v13 += 16LL; --v15; } while ( v15 > 1 ); } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::_M_erase_at_end( *((_QWORD *)&v25[0] + 1), **((_QWORD **)&v25[0] + 1)); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v25); 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(v25); } std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(&v23); } switch ( v3 ) { case 1: std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::~vector(*a1); v18 = 32LL; goto LABEL_32; case 2: std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~vector(*a1); v18 = 24LL; goto LABEL_32; case 3: v19 = (_BYTE *)**a1; v20 = *a1 + 2; v18 = 32LL; if ( v19 == (_BYTE *)v20 ) goto LABEL_32; v21 = *v20 + 1LL; break; case 8: v22 = (void **)*a1; v19 = (_BYTE *)**a1; v18 = 40LL; if ( !v19 ) goto LABEL_32; v21 = (_BYTE *)v22[2] - v19; break; default: return; } operator delete(v19, v21); LABEL_32: operator delete(*a1, v18); } } }
destroy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 CMP ESI,0x1 SETZ CL MOV RAX,qword ptr [RDI] TEST RAX,RAX SETZ DL TEST CL,DL JNZ 0x0015f750 MOV R14D,ESI TEST RAX,RAX SETZ CL MOV EDX,R14D AND DL,0xfe CMP DL,0x2 SETZ DL CMP R14B,0x8 SETZ SIL OR SIL,DL TEST SIL,CL JNZ 0x0015f750 MOV RBX,RDI LEA ECX,[R14 + -0x1] CMP CL,0x1 JA 0x0015f6d0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV RSI,qword ptr [RAX + 0x8] SUB RSI,qword ptr [RAX] SAR RSI,0x4 CMP R14B,0x2 JNZ 0x0015f57f LAB_0015f541: MOV RDI,RSP CALL 0x0015f794 MOV RAX,qword ptr [RBX] MOV R15,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] SUB R13,R15 SAR R13,0x4 TEST R13,R13 JLE 0x0015f5c0 INC R13 MOV R12,RSP LAB_0015f565: MOV RDI,R12 MOV RSI,R15 CALL 0x0015e632 ADD R15,0x10 DEC R13 CMP R13,0x1 JG 0x0015f565 JMP 0x0015f5c0 LAB_0015f57f: MOV RAX,-0x5555555555555555 IMUL RAX,RSI LAB_0015f58d: MOV RDI,RSP MOV RSI,RAX CALL 0x0015f794 MOV RAX,qword ptr [RBX] MOV R12,qword ptr [RAX] MOV R13,qword ptr [RAX + 0x8] CMP R12,R13 JZ 0x0015f5c0 MOV R15,RSP LAB_0015f5aa: LEA RSI,[R12 + 0x20] LAB_0015f5af: MOV RDI,R15 CALL 0x0015e632 ADD R12,0x30 CMP R12,R13 JNZ 0x0015f5aa LAB_0015f5c0: MOV R13,qword ptr [RSP + 0x8] CMP qword ptr [RSP],R13 JZ 0x0015f6c8 LEA R15,[RSP + 0x20] MOV R12,RSP LAB_0015f5d7: LEA RDI,[R13 + -0x10] MOVUPS XMM0,xmmword ptr [R13 + -0x10] MOVAPS xmmword ptr [RSP + 0x20],XMM0 XOR ESI,ESI CALL 0x00159800 MOV byte ptr [R13 + -0x10],0x0 MOV qword ptr [R13 + -0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00159800 MOV R13,qword ptr [RSP + 0x8] ADD R13,-0x10 MOV qword ptr [RSP + 0x8],R13 MOV RDI,R13 XOR ESI,ESI CALL 0x00159800 MOV RDI,R13 CALL 0x0015efec MOVZX EAX,byte ptr [RSP + 0x20] CMP EAX,0x1 JZ 0x0015f677 CMP EAX,0x2 JNZ 0x0015f6a7 MOV RAX,qword ptr [RSP + 0x28] MOV R13,qword ptr [RAX] MOV RBP,qword ptr [RAX + 0x8] SUB RBP,R13 SAR RBP,0x4 TEST RBP,RBP JLE 0x0015f668 INC RBP LAB_0015f650: MOV RDI,R12 MOV RSI,R13 CALL 0x0015e632 ADD R13,0x10 DEC RBP CMP RBP,0x1 JG 0x0015f650 LAB_0015f668: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RDI] CALL 0x0015f874 JMP 0x0015f6a7 LAB_0015f677: MOV RAX,qword ptr [RSP + 0x28] MOV R13,qword ptr [RAX] MOV RBP,qword ptr [RAX + 0x8] LAB_0015f683: CMP R13,RBP JZ 0x0015f69a LEA RSI,[R13 + 0x20] LAB_0015f68c: MOV RDI,R12 CALL 0x0015e632 LAB_0015f694: ADD R13,0x30 JMP 0x0015f683 LAB_0015f69a: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RDI] CALL 0x0015f8ba LAB_0015f6a7: MOV RDI,R15 XOR ESI,ESI CALL 0x00159800 MOV RDI,R15 CALL 0x0015efec MOV R13,qword ptr [RSP + 0x8] CMP qword ptr [RSP],R13 JNZ 0x0015f5d7 LAB_0015f6c8: MOV RDI,RSP CALL 0x0015f828 LAB_0015f6d0: MOVZX EAX,R14B DEC EAX CMP EAX,0x7 JA 0x0015f750 LEA RCX,[0x1e9948] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBX] CALL 0x0015f974 MOV R14D,0x20 JMP 0x0015f745 caseD_3: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] ADD RAX,0x10 MOV R14D,0x20 CMP RDI,RAX JZ 0x0015f745 MOV RSI,qword ptr [RAX] INC RSI JMP 0x0015f740 caseD_2: MOV RDI,qword ptr [RBX] CALL 0x0015f828 MOV R14D,0x18 JMP 0x0015f745 caseD_8: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] MOV R14D,0x28 TEST RDI,RDI JZ 0x0015f745 MOV RSI,qword ptr [RAX + 0x10] SUB RSI,RDI LAB_0015f740: CALL 0x0011b8e0 LAB_0015f745: MOV RDI,qword ptr [RBX] MOV RSI,R14 CALL 0x0011b8e0 caseD_4: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy(json_value *this,uint param_2) { long lVar1; long *plVar2; byte bVar3; ulong uVar4; ulong uVar5; bool bVar6; long *plVar7; long lVar8; data *pdVar9; basic_json *pbVar10; data *local_68; data *pdStack_60; int8 local_58; int8 local_48; vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *pvStack_40; plVar7 = *(long **)this; if (param_2 == 1 && plVar7 == (long *)0x0) { return; } bVar3 = (byte)param_2; if ((bVar3 == 8 || (bVar3 & 0xfe) == 2) && plVar7 == (long *)0x0) { return; } if ((byte)(bVar3 - 1) < 2) { local_68 = (data *)0x0; pdStack_60 = (data *)0x0; local_58 = 0; uVar4 = plVar7[1] - *plVar7 >> 4; if (bVar3 == 2) { /* try { // try from 0015f541 to 0015f548 has its CatchHandler @ 0015f75f */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,uVar4); pbVar10 = (basic_json *)**(long **)this; lVar8 = (*(long **)this)[1] - (long)pbVar10 >> 4; if (0 < lVar8) { lVar8 = lVar8 + 1; do { /* try { // try from 0015f565 to 0015f56f has its CatchHandler @ 0015f763 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,pbVar10); pbVar10 = pbVar10 + 0x10; lVar8 = lVar8 + -1; } while (1 < lVar8); } } else { /* try { // try from 0015f58d to 0015f597 has its CatchHandler @ 0015f75f */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::reserve((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,uVar4 * -0x5555555555555555); lVar1 = (*(long **)this)[1]; for (lVar8 = **(long **)this; lVar8 != lVar1; lVar8 = lVar8 + 0x30) { /* try { // try from 0015f5af to 0015f5b6 has its CatchHandler @ 0015f761 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,(basic_json *)(lVar8 + 0x20)); } } if (local_68 != pdStack_60) { do { pdVar9 = pdStack_60; local_48 = *(int8 *)(pdStack_60 + -0x10); pvStack_40 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(pdStack_60 + -8); assert_invariant((bool)((char)pdStack_60 + -0x10)); pdVar9[-0x10] = (data)0x0; *(int8 *)(pdVar9 + -8) = 0; bVar6 = SUB81((data *)&local_48,0); assert_invariant(bVar6); pdVar9 = pdStack_60 + -0x10; pdStack_60 = pdVar9; assert_invariant(SUB81(pdVar9,0)); data::~data(pdVar9); if (local_48._0_1_ == (data)0x1) { lVar1 = *(long *)(pvStack_40 + 8); for (lVar8 = *(long *)pvStack_40; lVar8 != lVar1; lVar8 = lVar8 + 0x30) { /* try { // try from 0015f68c to 0015f693 has its CatchHandler @ 0015f76a */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,(basic_json *)(lVar8 + 0x20)); } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::_M_erase_at_end((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)pvStack_40,*(pair **)pvStack_40); } else if (local_48._0_1_ == (data)0x2) { pbVar10 = *(basic_json **)pvStack_40; lVar8 = *(long *)(pvStack_40 + 8) - (long)pbVar10 >> 4; if (0 < lVar8) { lVar8 = lVar8 + 1; do { /* try { // try from 0015f650 to 0015f65a has its CatchHandler @ 0015f768 */ std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> :: emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68,pbVar10); pbVar10 = pbVar10 + 0x10; lVar8 = lVar8 + -1; } while (1 < lVar8); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_erase_at_end(pvStack_40,*(basic_json **)pvStack_40); } assert_invariant(bVar6); data::~data((data *)&local_48); } while (local_68 != pdStack_60); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::~vector((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_68); } switch(param_2 & 0xff) { case 1: std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::~vector(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)this); uVar4 = 0x20; break; case 2: std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::~vector(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)this); uVar4 = 0x18; break; case 3: plVar7 = (long *)**(long **)this; plVar2 = *(long **)this + 2; uVar4 = 0x20; if (plVar7 != plVar2) { uVar5 = *plVar2 + 1; LAB_0015f740: operator_delete(plVar7,uVar5); } break; default: goto switchD_0015f6e9_caseD_4; case 8: plVar7 = (long *)**(long **)this; uVar4 = 0x28; if (plVar7 != (long *)0x0) { uVar5 = (*(long **)this)[2] - (long)plVar7; goto LAB_0015f740; } } operator_delete(*(void **)this,uVar4); switchD_0015f6e9_caseD_4: return; }
2,343
my_time_init
eloqsql/mysys/my_getsystime.c
void my_time_init() { #ifdef _WIN32 compile_time_assert(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency); DBUG_ASSERT(query_performance_frequency); #endif }
O0
c
my_time_init: pushq %rbp movq %rsp, %rbp popq %rbp retq nopw %cs:(%rax,%rax)
my_time_init: push rbp mov rbp, rsp pop rbp retn
void my_time_init() { ; }
my_time_init: PUSH RBP MOV RBP,RSP POP RBP RET
void my_time_init(void) { return; }
2,344
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
static string ShellEscape(const string& src) { string result; if (!src.empty() && // empty string needs quotes src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) { // only contains chars that don't need quotes; it's fine result.assign(src); } else if (src.find_first_of('\'') == string::npos) { // no single quotes; just wrap it in single quotes result.assign("'"); result.append(src); result.append("'"); } else { // needs double quote escaping result.assign("\""); for (size_t i = 0; i < src.size(); ++i) { switch (src[i]) { case '\\': case '$': case '"': case '`': result.append("\\"); } result.append(src, i, 1); } result.append("\""); } return result; }
O0
cpp
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x40(%rbp) movq %rdi, %rax movq %rax, -0x38(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) callq 0xabd0 movq -0x10(%rbp), %rdi callq 0xae70 testb $0x1, %al jne 0x39439 movq -0x10(%rbp), %rdi leaq 0x36654(%rip), %rsi # 0x6fa50 xorl %eax, %eax movl %eax, %edx callq 0xa490 cmpq $-0x1, %rax jne 0x39439 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xaf90 jmp 0x3941a jmp 0x3954d movq -0x40(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) callq 0xb128 jmp 0x3956a movq -0x10(%rbp), %rdi movl $0x27, %esi xorl %eax, %eax movl %eax, %edx callq 0xa500 cmpq $-0x1, %rax jne 0x39489 movq -0x40(%rbp), %rdi leaq 0x3494b(%rip), %rsi # 0x6dda7 callq 0xb050 jmp 0x39463 movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xb070 jmp 0x39472 movq -0x40(%rbp), %rdi leaq 0x3492a(%rip), %rsi # 0x6dda7 callq 0xb040 jmp 0x39484 jmp 0x3954b movq -0x40(%rbp), %rdi leaq 0x34985(%rip), %rsi # 0x6de19 callq 0xb050 jmp 0x3949b movq $0x0, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi callq 0xa5a0 movq %rax, %rcx movq -0x48(%rbp), %rax cmpq %rcx, %rax jae 0x39537 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xa900 movsbl (%rax), %eax movl %eax, -0x4c(%rbp) subl $0x22, %eax je 0x394f8 jmp 0x394da movl -0x4c(%rbp), %eax subl $0x24, %eax je 0x394f8 jmp 0x394e4 movl -0x4c(%rbp), %eax subl $0x5c, %eax je 0x394f8 jmp 0x394ee movl -0x4c(%rbp), %eax subl $0x60, %eax jne 0x3950c jmp 0x394f8 movq -0x40(%rbp), %rdi leaq 0x376c4(%rip), %rsi # 0x70bc7 callq 0xb040 jmp 0x3950a jmp 0x3950c movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x30(%rbp), %rdx movl $0x1, %ecx callq 0xabb0 jmp 0x39524 jmp 0x39526 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x394a3 movq -0x40(%rbp), %rdi leaq 0x348d7(%rip), %rsi # 0x6de19 callq 0xb040 jmp 0x39549 jmp 0x3954b jmp 0x3954d movb $0x1, -0x11(%rbp) testb $0x1, -0x11(%rbp) jne 0x39560 movq -0x40(%rbp), %rdi callq 0xb128 movq -0x38(%rbp), %rax addq $0x50, %rsp popq %rbp retq movq -0x20(%rbp), %rdi callq 0xaf50 nopw %cs:(%rax,%rax)
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_40], rdi mov rax, rdi mov [rbp+var_38], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_39439 mov rdi, [rbp+var_10] lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"... xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_39439 mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignERKS4_; std::string::assign(std::string const&) jmp short $+2 loc_3941A: jmp loc_3954D mov rdi, [rbp+var_40]; void * mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_3956A loc_39439: mov rdi, [rbp+var_10] mov esi, 27h ; ''' xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE13find_first_ofEcm; std::string::find_first_of(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_39489 mov rdi, [rbp+var_40] lea rsi, aBuf0A+0Ch; "'" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp short $+2 loc_39463: mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) jmp short $+2 loc_39472: mov rdi, [rbp+var_40] lea rsi, aBuf0A+0Ch; "'" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short $+2 loc_39484: jmp loc_3954B loc_39489: mov rdi, [rbp+var_40] lea rsi, aBufData+0Fh; "\"" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) jmp short $+2 loc_3949B: mov [rbp+var_30], 0 loc_394A3: mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_48] cmp rax, rcx jnb short loc_39537 mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) movsx eax, byte ptr [rax] mov [rbp+var_4C], eax sub eax, 22h ; '"' jz short loc_394F8 jmp short $+2 loc_394DA: mov eax, [rbp+var_4C] sub eax, 24h ; '$' jz short loc_394F8 jmp short $+2 loc_394E4: mov eax, [rbp+var_4C] sub eax, 5Ch ; '\' jz short loc_394F8 jmp short $+2 loc_394EE: mov eax, [rbp+var_4C] sub eax, 60h ; '`' jnz short loc_3950C jmp short $+2 loc_394F8: mov rdi, [rbp+var_40] lea rsi, asc_70BC7; "\\" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short $+2 loc_3950A: jmp short $+2 loc_3950C: mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov rdx, [rbp+var_30] mov ecx, 1 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong) jmp short $+2 loc_39524: jmp short $+2 loc_39526: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp loc_394A3 loc_39537: mov rdi, [rbp+var_40] lea rsi, aBufData+0Fh; "\"" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short $+2 loc_39549: jmp short $+2 loc_3954B: jmp short $+2 loc_3954D: mov [rbp+var_11], 1 test [rbp+var_11], 1 jnz short loc_39560 mov rdi, [rbp+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_39560: mov rax, [rbp+var_38] add rsp, 50h pop rbp retn loc_3956A: mov rdi, [rbp+var_20] call __Unwind_Resume
long long nglog::ShellEscape(long long a1, long long a2) { int v3; // [rsp+4h] [rbp-4Ch] unsigned long long i; // [rsp+20h] [rbp-30h] std::string::basic_string(a1); if ( (std::string::empty(a2) & 1) != 0 || std::string::find_first_not_of( a2, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@", 0LL) != -1 ) { if ( std::string::find_first_of(a2, 39LL, 0LL) == -1 ) { std::string::assign(a1, "'"); std::string::append(a1, a2); std::string::append(a1, "'"); } else { std::string::assign(a1, "\""); for ( i = 0LL; i < std::string::size(a2); ++i ) { v3 = *(char *)std::string::operator[](a2, i); if ( v3 == 34 || v3 == 36 || v3 == 92 || v3 == 96 ) std::string::append(a1, "\\"); std::string::append(a1, a2, i, 1LL); } std::string::append(a1, "\""); } } else { std::string::assign(a1, a2); } return a1; }
ShellEscape: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x40],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x0010abd0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010ae70 TEST AL,0x1 JNZ 0x00139439 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x16fa50] XOR EAX,EAX MOV EDX,EAX CALL 0x0010a490 CMP RAX,-0x1 JNZ 0x00139439 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] LAB_00139413: CALL 0x0010af90 JMP 0x0013941a LAB_0013941a: JMP 0x0013954d LAB_00139439: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x27 XOR EAX,EAX MOV EDX,EAX CALL 0x0010a500 CMP RAX,-0x1 JNZ 0x00139489 MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x16dda7] CALL 0x0010b050 JMP 0x00139463 LAB_00139463: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010b070 JMP 0x00139472 LAB_00139472: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x16dda7] CALL 0x0010b040 JMP 0x00139484 LAB_00139484: JMP 0x0013954b LAB_00139489: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x16de19] CALL 0x0010b050 JMP 0x0013949b LAB_0013949b: MOV qword ptr [RBP + -0x30],0x0 LAB_001394a3: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010a5a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,RCX JNC 0x00139537 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] CALL 0x0010a900 MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x4c],EAX SUB EAX,0x22 JZ 0x001394f8 JMP 0x001394da LAB_001394da: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x24 JZ 0x001394f8 JMP 0x001394e4 LAB_001394e4: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x5c JZ 0x001394f8 JMP 0x001394ee LAB_001394ee: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x60 JNZ 0x0013950c JMP 0x001394f8 LAB_001394f8: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x170bc7] CALL 0x0010b040 JMP 0x0013950a LAB_0013950a: JMP 0x0013950c LAB_0013950c: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,0x1 CALL 0x0010abb0 JMP 0x00139524 LAB_00139524: JMP 0x00139526 LAB_00139526: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001394a3 LAB_00139537: MOV RDI,qword ptr [RBP + -0x40] LEA RSI,[0x16de19] CALL 0x0010b040 LAB_00139547: JMP 0x00139549 LAB_00139549: JMP 0x0013954b LAB_0013954b: JMP 0x0013954d LAB_0013954d: MOV byte ptr [RBP + -0x11],0x1 TEST byte ptr [RBP + -0x11],0x1 JNZ 0x00139560 MOV RDI,qword ptr [RBP + -0x40] CALL 0x0010b128 LAB_00139560: MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x50 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00139557) */ /* nglog::ShellEscape(std::__cxx11::string const&) */ nglog * __thiscall nglog::ShellEscape(nglog *this,string *param_1) { char cVar1; ulong uVar2; long lVar3; char *pcVar4; int8 local_38; std::__cxx11::string::string((string *)this); uVar2 = std::__cxx11::string::empty(); if (((uVar2 & 1) == 0) && (lVar3 = std::__cxx11::string::find_first_not_of((char *)param_1,0x16fa50), lVar3 == -1)) { /* try { // try from 00139413 to 00139546 has its CatchHandler @ 0013941f */ std::__cxx11::string::assign((string *)this); } else { lVar3 = std::__cxx11::string::find_first_of((char)param_1,0x27); if (lVar3 == -1) { std::__cxx11::string::assign((char *)this); std::__cxx11::string::append((string *)this); std::__cxx11::string::append((char *)this); } else { std::__cxx11::string::assign((char *)this); for (local_38 = 0; uVar2 = std::__cxx11::string::size(), local_38 < uVar2; local_38 = local_38 + 1) { pcVar4 = (char *)std::__cxx11::string::operator[]((ulong)param_1); cVar1 = *pcVar4; if ((((cVar1 == '\"') || (cVar1 == '$')) || (cVar1 == '\\')) || (cVar1 == '`')) { std::__cxx11::string::append((char *)this); } std::__cxx11::string::append((string *)this,(ulong)param_1,local_38); } std::__cxx11::string::append((char *)this); } } return this; }
2,345
my_numchars_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_numchars_utf16(CHARSET_INFO *cs, const char *b, const char *e) { size_t nchars= 0; for ( ; ; nchars++) { size_t charlen= my_ismbchar(cs, b, e); if (!charlen) break; b+= charlen; } return nchars; }
O3
c
my_numchars_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0xb8(%rdi), %rax callq *0xc0(%rax) xorl %r12d, %r12d cmpl $0x2, %eax jl 0xc9aa6 movl %eax, %eax addq %rax, %r14 incq %r12 movq 0xb8(%r15), %rax movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jg 0xc9a83 movq %r12, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_numchars_utf16: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, [rdi+0B8h] call qword ptr [rax+0C0h] xor r12d, r12d cmp eax, 2 jl short loc_C9AA6 loc_C9A83: mov eax, eax add r14, rax inc r12 mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r14 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 1 jg short loc_C9A83 loc_C9AA6: mov rax, r12 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_numchars_utf16(long long a1, long long a2, long long a3) { int v5; // eax long long v6; // r12 v5 = (*(long long (**)(void))(*(_QWORD *)(a1 + 184) + 192LL))(); v6 = 0LL; if ( v5 >= 2 ) { do { a2 += (unsigned int)v5; ++v6; v5 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, a2, a3); } while ( v5 > 1 ); } return v6; }
my_numchars_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] CALL qword ptr [RAX + 0xc0] XOR R12D,R12D CMP EAX,0x2 JL 0x001c9aa6 LAB_001c9a83: MOV EAX,EAX ADD R14,RAX INC R12 MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JG 0x001c9a83 LAB_001c9aa6: MOV RAX,R12 POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_numchars_utf16(long param_1,long param_2,int8 param_3) { uint uVar1; long lVar2; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(); lVar2 = 0; while (1 < (int)uVar1) { param_2 = param_2 + (ulong)uVar1; lVar2 = lVar2 + 1; uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); } return lVar2; }
2,346
aria_get_capabilities
eloqsql/storage/maria/ma_backup.c
int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap) { MARIA_SHARE share; int error= 0; uint head_length= sizeof(share.state.header), base_pos; uint aligned_bit_blocks; size_t info_length; uchar *disc_cache; DBUG_ENTER("aria_get_capabilities"); bzero(cap, sizeof(*cap)); if (my_pread(kfile,share.state.header.file_version, head_length, 0, MYF(MY_NABP))) DBUG_RETURN(HA_ERR_NOT_A_TABLE); if (memcmp(share.state.header.file_version, maria_file_magic, 4)) DBUG_RETURN(HA_ERR_NOT_A_TABLE); share.options= mi_uint2korr(share.state.header.options); info_length= mi_uint2korr(share.state.header.header_length); base_pos= mi_uint2korr(share.state.header.base_pos); /* Allocate space for header information and for data that is too big to keep on stack */ if (!(disc_cache= my_malloc(PSI_NOT_INSTRUMENTED, info_length, MYF(MY_WME)))) DBUG_RETURN(ENOMEM); if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP))) { error= my_errno; goto err; } _ma_base_info_read(disc_cache + base_pos, &share.base); cap->transactional= share.base.born_transactional; cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM); cap->online_backup_safe= cap->transactional && cap->checksum; cap->header_size= share.base.keystart; cap->keypage_header= ((share.base.born_transactional ? LSN_STORE_SIZE + TRANSID_SIZE : 0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE + KEYPAGE_USED_SIZE); cap->block_size= share.base.block_size; cap->data_file_type= share.state.header.data_file_type; cap->s3_block_size= share.base.s3_block_size; cap->compression= share.base.compression_algorithm; cap->encrypted= MY_TEST(share.base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED); if (share.state.header.data_file_type == BLOCK_RECORD) { /* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */ aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6; /* In each 6 bytes, we have 6*8/3 = 16 pages covered The +1 is to add the bitmap page, as this doesn't have to be covered */ cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1; } /* Do a check that that we got things right */ if (share.state.header.data_file_type != BLOCK_RECORD && cap->online_backup_safe) error= HA_ERR_NOT_A_TABLE; err: my_free(disc_cache); DBUG_RETURN(error); }
O3
c
aria_get_capabilities: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc48, %rsp # imm = 0xC48 movq %rsi, %rbx movl %edi, %r15d movq %fs:0x28, %rax movq %rax, -0x30(%rbp) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rsi) movups %xmm0, 0x10(%rsi) movups %xmm0, (%rsi) leaq -0xc68(%rbp), %rsi movl $0x18, %edx movl $0x4, %r8d xorl %ecx, %ecx callq 0xbfbd0 movl $0x82, %r12d testq %rax, %rax jne 0x8b01f movl -0xc68(%rbp), %eax leaq 0x321b02(%rip), %rcx # 0x3ac9d0 cmpl (%rcx), %eax jne 0x8b01f movzwl -0xc64(%rbp), %eax movzwl -0xc62(%rbp), %ecx rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x548(%rbp) rolw $0x8, %cx movzwl %cx, %r12d movzwl -0xc5c(%rbp), %r13d movl $0x10, %edx xorl %edi, %edi movq %r12, %rsi callq 0xbf321 testq %rax, %rax je 0x8af41 movq %rax, %r14 movl $0x4, %r8d movl %r15d, %edi movq %rax, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0xbfbd0 testq %rax, %rax je 0x8af4c callq 0xc14ee movl (%rax), %r12d jmp 0x8b017 movl $0xc, %r12d jmp 0x8b01f rolw $0x8, %r13w movzwl %r13w, %eax movq %r14, %rdi addq %rax, %rdi leaq -0x908(%rbp), %r15 movq %r15, %rsi callq 0x8b048 movb 0xec(%r15), %al movb %al, 0x1d(%rbx) movl 0x3c0(%r15), %ecx shrl $0xb, %ecx andb $0x1, %cl movb %cl, 0x1c(%rbx) testb %al, %al movzbl %cl, %eax movl $0x0, %ecx cmovel %ecx, %eax movb %al, 0x1f(%rbx) movq (%r15), %rcx movq %rcx, (%rbx) movl $0x4, %ecx movl $0x11, %edx cmovel %ecx, %edx movl %edx, 0x14(%rbx) movl 0xbc(%r15), %ecx movl %ecx, 0x10(%rbx) movzbl -0x34a(%r15), %edx movl %edx, 0x18(%rbx) movq 0x60(%r15), %rsi movq %rsi, 0x20(%rbx) movb 0xd0(%r15), %sil movb %sil, 0x28(%rbx) movb 0xc8(%r15), %sil andb $0x1, %sil movb %sil, 0x1e(%rbx) cmpl $0x3, %edx jne 0x8b009 addl $-0x4, %ecx movl $0xaaaaaaab, %eax # imm = 0xAAAAAAAB imulq %rcx, %rax shrq $0x20, %rax andl $-0x4, %eax leal 0x1(,%rax,4), %eax movq %rax, 0x8(%rbx) xorl %r12d, %r12d jmp 0x8b017 xorl %ecx, %ecx testb %al, %al movl $0x82, %r12d cmovel %ecx, %r12d movq %r14, %rdi callq 0xbf54e movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x8b043 movl %r12d, %eax addq $0xc48, %rsp # imm = 0xC48 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a280
aria_get_capabilities: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C48h mov rbx, rsi mov r15d, edi mov rax, fs:28h mov [rbp+var_30], rax xorps xmm0, xmm0 movups xmmword ptr [rsi+20h], xmm0 movups xmmword ptr [rsi+10h], xmm0 movups xmmword ptr [rsi], xmm0 lea rsi, [rbp+var_C68] mov edx, 18h mov r8d, 4 xor ecx, ecx call my_pread mov r12d, 82h test rax, rax jnz loc_8B01F mov eax, [rbp+var_C68] lea rcx, maria_file_magic cmp eax, [rcx] jnz loc_8B01F movzx eax, [rbp+var_C64] movzx ecx, [rbp+var_C62] rol ax, 8 movzx eax, ax mov [rbp+var_548], rax rol cx, 8 movzx r12d, cx movzx r13d, [rbp+var_C5C] mov edx, 10h xor edi, edi mov rsi, r12 call my_malloc test rax, rax jz short loc_8AF41 mov r14, rax mov r8d, 4 mov edi, r15d mov rsi, rax mov rdx, r12 xor ecx, ecx call my_pread test rax, rax jz short loc_8AF4C call _my_thread_var mov r12d, [rax] jmp loc_8B017 loc_8AF41: mov r12d, 0Ch jmp loc_8B01F loc_8AF4C: rol r13w, 8 movzx eax, r13w mov rdi, r14 add rdi, rax lea r15, [rbp+var_908] mov rsi, r15 call _ma_base_info_read mov al, [r15+0ECh] mov [rbx+1Dh], al mov ecx, [r15+3C0h] shr ecx, 0Bh and cl, 1 mov [rbx+1Ch], cl test al, al movzx eax, cl mov ecx, 0 cmovz eax, ecx mov [rbx+1Fh], al mov rcx, [r15] mov [rbx], rcx mov ecx, 4 mov edx, 11h cmovz edx, ecx mov [rbx+14h], edx mov ecx, [r15+0BCh] mov [rbx+10h], ecx movzx edx, byte ptr [r15-34Ah] mov [rbx+18h], edx mov rsi, [r15+60h] mov [rbx+20h], rsi mov sil, [r15+0D0h] mov [rbx+28h], sil mov sil, [r15+0C8h] and sil, 1 mov [rbx+1Eh], sil cmp edx, 3 jnz short loc_8B009 add ecx, 0FFFFFFFCh mov eax, 0AAAAAAABh imul rax, rcx shr rax, 20h and eax, 0FFFFFFFCh lea eax, ds:1[rax*4] mov [rbx+8], rax xor r12d, r12d jmp short loc_8B017 loc_8B009: xor ecx, ecx test al, al mov r12d, 82h cmovz r12d, ecx loc_8B017: mov rdi, r14 call my_free loc_8B01F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_8B043 mov eax, r12d add rsp, 0C48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8B043: call ___stack_chk_fail
long long aria_get_capabilities(long long a1, long long a2) { unsigned int v2; // r12d long long v3; // r12 __int16 v4; // r13 long long v5; // rax long long v6; // r14 char v7; // al bool v8; // cl bool v9; // zf bool v10; // al int v11; // edx int v12; // ecx int v13; // edx int v15; // [rsp+8h] [rbp-C68h] BYREF __int16 v16; // [rsp+Ch] [rbp-C64h] __int16 v17; // [rsp+Eh] [rbp-C62h] __int16 v18; // [rsp+14h] [rbp-C5Ch] unsigned __int8 v19; // [rsp+1Eh] [rbp-C52h] _QWORD v20[23]; // [rsp+368h] [rbp-908h] BYREF int v21; // [rsp+424h] [rbp-84Ch] char v22; // [rsp+430h] [rbp-840h] char v23; // [rsp+438h] [rbp-838h] char v24; // [rsp+454h] [rbp-81Ch] long long v25; // [rsp+728h] [rbp-548h] unsigned long long v26; // [rsp+C40h] [rbp-30h] v26 = __readfsqword(0x28u); *(_OWORD *)(a2 + 32) = 0LL; *(_OWORD *)(a2 + 16) = 0LL; *(_OWORD *)a2 = 0LL; v2 = 130; if ( !my_pread(a1, &v15, 24LL, 0LL, 4LL) && v15 == maria_file_magic ) { v25 = (unsigned __int16)__ROL2__(v16, 8); v3 = (unsigned __int16)__ROL2__(v17, 8); v4 = v18; v5 = my_malloc(0LL, v3, 16LL); if ( v5 ) { v6 = v5; if ( my_pread((unsigned int)a1, v5, v3, 0LL, 4LL) ) { v2 = *(_DWORD *)my_thread_var((unsigned int)a1); } else { ma_base_info_read((unsigned __int16)__ROL2__(v4, 8) + v6, v20); v7 = v24; *(_BYTE *)(a2 + 29) = v24; v8 = (v25 & 0x800) != 0; *(_BYTE *)(a2 + 28) = v8; v9 = v7 == 0; v10 = v8; if ( v9 ) v10 = 0; *(_BYTE *)(a2 + 31) = v10; *(_QWORD *)a2 = v20[0]; v11 = 17; if ( v9 ) v11 = 4; *(_DWORD *)(a2 + 20) = v11; v12 = v21; *(_DWORD *)(a2 + 16) = v21; v13 = v19; *(_DWORD *)(a2 + 24) = v19; *(_QWORD *)(a2 + 32) = v20[12]; *(_BYTE *)(a2 + 40) = v23; *(_BYTE *)(a2 + 30) = v22 & 1; if ( v13 == 3 ) { *(_QWORD *)(a2 + 8) = 4 * (((2863311531u * (unsigned long long)(unsigned int)(v12 - 4)) >> 32) & 0xFFFFFFFC) + 1; v2 = 0; } else { v2 = 130; if ( !v10 ) v2 = 0; } } my_free(v6); } else { return 12; } } return v2; }
aria_get_capabilities: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc48 MOV RBX,RSI MOV R15D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x20],XMM0 MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOVUPS xmmword ptr [RSI],XMM0 LEA RSI,[RBP + -0xc68] MOV EDX,0x18 MOV R8D,0x4 XOR ECX,ECX CALL 0x001bfbd0 MOV R12D,0x82 TEST RAX,RAX JNZ 0x0018b01f MOV EAX,dword ptr [RBP + -0xc68] LEA RCX,[0x4ac9d0] CMP EAX,dword ptr [RCX] JNZ 0x0018b01f MOVZX EAX,word ptr [RBP + -0xc64] MOVZX ECX,word ptr [RBP + -0xc62] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x548],RAX ROL CX,0x8 MOVZX R12D,CX MOVZX R13D,word ptr [RBP + -0xc5c] MOV EDX,0x10 XOR EDI,EDI MOV RSI,R12 CALL 0x001bf321 TEST RAX,RAX JZ 0x0018af41 MOV R14,RAX MOV R8D,0x4 MOV EDI,R15D MOV RSI,RAX MOV RDX,R12 XOR ECX,ECX CALL 0x001bfbd0 TEST RAX,RAX JZ 0x0018af4c CALL 0x001c14ee MOV R12D,dword ptr [RAX] JMP 0x0018b017 LAB_0018af41: MOV R12D,0xc JMP 0x0018b01f LAB_0018af4c: ROL R13W,0x8 MOVZX EAX,R13W MOV RDI,R14 ADD RDI,RAX LEA R15,[RBP + -0x908] MOV RSI,R15 CALL 0x0018b048 MOV AL,byte ptr [R15 + 0xec] MOV byte ptr [RBX + 0x1d],AL MOV ECX,dword ptr [R15 + 0x3c0] SHR ECX,0xb AND CL,0x1 MOV byte ptr [RBX + 0x1c],CL TEST AL,AL MOVZX EAX,CL MOV ECX,0x0 CMOVZ EAX,ECX MOV byte ptr [RBX + 0x1f],AL MOV RCX,qword ptr [R15] MOV qword ptr [RBX],RCX MOV ECX,0x4 MOV EDX,0x11 CMOVZ EDX,ECX MOV dword ptr [RBX + 0x14],EDX MOV ECX,dword ptr [R15 + 0xbc] MOV dword ptr [RBX + 0x10],ECX MOVZX EDX,byte ptr [R15 + -0x34a] MOV dword ptr [RBX + 0x18],EDX MOV RSI,qword ptr [R15 + 0x60] MOV qword ptr [RBX + 0x20],RSI MOV SIL,byte ptr [R15 + 0xd0] MOV byte ptr [RBX + 0x28],SIL MOV SIL,byte ptr [R15 + 0xc8] AND SIL,0x1 MOV byte ptr [RBX + 0x1e],SIL CMP EDX,0x3 JNZ 0x0018b009 ADD ECX,-0x4 MOV EAX,0xaaaaaaab IMUL RAX,RCX SHR RAX,0x20 AND EAX,0xfffffffc LEA EAX,[0x1 + RAX*0x4] MOV qword ptr [RBX + 0x8],RAX XOR R12D,R12D JMP 0x0018b017 LAB_0018b009: XOR ECX,ECX TEST AL,AL MOV R12D,0x82 CMOVZ R12D,ECX LAB_0018b017: MOV RDI,R14 CALL 0x001bf54e LAB_0018b01f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0018b043 MOV EAX,R12D ADD RSP,0xc48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018b043: CALL 0x0012a280
int4 aria_get_capabilities(ulong param_1,int8 *param_2) { long lVar1; long lVar2; int4 *puVar3; byte bVar4; ushort uVar5; int4 uVar6; long in_FS_OFFSET; int local_c70; ushort local_c6c; ushort local_c6a; ushort local_c64; byte local_c5a; int8 local_910 [12]; int8 local_8b0; int local_854; byte local_848; int1 local_840; char local_824; ulong local_550; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2[4] = 0; param_2[5] = 0; param_2[2] = 0; param_2[3] = 0; *param_2 = 0; param_2[1] = 0; lVar1 = my_pread(param_1,&local_c70,0x18,0,4); uVar6 = 0x82; if ((lVar1 == 0) && (local_c70 == maria_file_magic)) { local_550 = (ulong)(ushort)(local_c6c << 8 | local_c6c >> 8); uVar5 = local_c6a << 8 | local_c6a >> 8; lVar1 = my_malloc(0,uVar5,0x10); if (lVar1 == 0) { uVar6 = 0xc; } else { lVar2 = my_pread(param_1 & 0xffffffff,lVar1,uVar5,0,4); if (lVar2 == 0) { _ma_base_info_read(lVar1 + (ulong)(ushort)(local_c64 << 8 | local_c64 >> 8),local_910); *(char *)((long)param_2 + 0x1d) = local_824; bVar4 = (byte)((uint)local_550 >> 0xb) & 1; *(byte *)((long)param_2 + 0x1c) = bVar4; if (local_824 == '\0') { bVar4 = 0; } *(byte *)((long)param_2 + 0x1f) = bVar4; *param_2 = local_910[0]; uVar6 = 0x11; if (local_824 == '\0') { uVar6 = 4; } *(int4 *)((long)param_2 + 0x14) = uVar6; *(int *)(param_2 + 2) = local_854; *(uint *)(param_2 + 3) = (uint)local_c5a; param_2[4] = local_8b0; *(int1 *)(param_2 + 5) = local_840; *(byte *)((long)param_2 + 0x1e) = local_848 & 1; if (local_c5a == 3) { param_2[1] = (ulong)(((uint)((ulong)(local_854 - 4) * 0xaaaaaaab >> 0x20) & 0xfffffffc) * 4 + 1); uVar6 = 0; } else { uVar6 = 0x82; if (bVar4 == 0) { uVar6 = 0; } } } else { puVar3 = (int4 *)_my_thread_var(); uVar6 = *puVar3; } my_free(lVar1); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar6; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,347
unicode_utf8_to_byte_map[abi:cxx11]()
monkey531[P]llama/src/unicode.cpp
static std::unordered_map<std::string, uint8_t> unicode_utf8_to_byte_map() { std::unordered_map<std::string, uint8_t> map; for (int ch = 0x21; ch <= 0x7E; ++ch) { // u'!' to u'~' assert(0 <= ch && ch < 256); map[unicode_cpt_to_utf8(ch)] = ch; } for (int ch = 0xA1; ch <= 0xAC; ++ch) { // u'¡' to u'¬' assert(0 <= ch && ch < 256); map[unicode_cpt_to_utf8(ch)] = ch; } for (int ch = 0xAE; ch <= 0xFF; ++ch) { // u'®' to u'ÿ' assert(0 <= ch && ch < 256); map[unicode_cpt_to_utf8(ch)] = ch; } auto n = 0; for (int ch = 0; ch < 256; ++ch) { if (map.find(unicode_cpt_to_utf8(ch)) == map.end()) { map[unicode_cpt_to_utf8(256 + n)] = ch; ++n; } } return map; }
O0
cpp
unicode_utf8_to_byte_map[abi:cxx11](): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x48(%rsp) movq %rdi, %rax movq %rax, 0x50(%rsp) movq %rdi, 0x130(%rsp) movb $0x0, 0x12f(%rsp) callq 0x1f2a30 movl $0x21, 0x128(%rsp) cmpl $0x7e, 0x128(%rsp) jg 0x371be2 movl 0x128(%rsp), %esi movb %sil, %al movb %al, 0x47(%rsp) leaq 0x108(%rsp), %rdi callq 0x2145f0 jmp 0x371b5f movq 0x48(%rsp), %rdi leaq 0x108(%rsp), %rsi callq 0x2138d0 movq %rax, 0x38(%rsp) jmp 0x371b78 movq 0x38(%rsp), %rax movb 0x47(%rsp), %cl movb %cl, (%rax) leaq 0x108(%rsp), %rdi callq 0x21f238 movl 0x128(%rsp), %eax addl $0x1, %eax movl %eax, 0x128(%rsp) jmp 0x371b34 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0x371eae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x108(%rsp), %rdi callq 0x21f238 jmp 0x371eae movl $0xa1, 0xf8(%rsp) cmpl $0xac, 0xf8(%rsp) jg 0x371c85 movl 0xf8(%rsp), %esi movb %sil, %al movb %al, 0x37(%rsp) leaq 0xd8(%rsp), %rdi callq 0x2145f0 jmp 0x371c1b movq 0x48(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0x2138d0 movq %rax, 0x28(%rsp) jmp 0x371c34 movq 0x28(%rsp), %rax movb 0x37(%rsp), %cl movb %cl, (%rax) leaq 0xd8(%rsp), %rdi callq 0x21f238 movl 0xf8(%rsp), %eax addl $0x1, %eax movl %eax, 0xf8(%rsp) jmp 0x371bed movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0xd8(%rsp), %rdi callq 0x21f238 jmp 0x371eae movl $0xae, 0xd4(%rsp) cmpl $0xff, 0xd4(%rsp) jg 0x371d28 movl 0xd4(%rsp), %esi movb %sil, %al movb %al, 0x27(%rsp) leaq 0xb0(%rsp), %rdi callq 0x2145f0 jmp 0x371cbe movq 0x48(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x2138d0 movq %rax, 0x18(%rsp) jmp 0x371cd7 movq 0x18(%rsp), %rax movb 0x27(%rsp), %cl movb %cl, (%rax) leaq 0xb0(%rsp), %rdi callq 0x21f238 movl 0xd4(%rsp), %eax addl $0x1, %eax movl %eax, 0xd4(%rsp) jmp 0x371c90 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0xb0(%rsp), %rdi callq 0x21f238 jmp 0x371eae movl $0x0, 0xac(%rsp) movl $0x0, 0xa8(%rsp) cmpl $0x100, 0xa8(%rsp) # imm = 0x100 jge 0x371e85 movl 0xa8(%rsp), %esi leaq 0x80(%rsp), %rdi callq 0x2145f0 jmp 0x371d65 movq 0x48(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x202f50 movq %rax, 0x10(%rsp) jmp 0x371d7e movq 0x48(%rsp), %rdi movq 0x10(%rsp), %rax movq %rax, 0xa0(%rsp) callq 0x20ba50 movq %rax, 0x78(%rsp) leaq 0xa0(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x205a40 movb %al, 0xf(%rsp) leaq 0x80(%rsp), %rdi callq 0x21f238 movb 0xf(%rsp), %al testb $0x1, %al jne 0x371dca jmp 0x371e6d movb 0xa8(%rsp), %al movb %al, 0xe(%rsp) movl 0xac(%rsp), %esi addl $0x100, %esi # imm = 0x100 leaq 0x58(%rsp), %rdi callq 0x2145f0 jmp 0x371dee movq 0x48(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x2138d0 movq %rax, (%rsp) jmp 0x371e03 movq (%rsp), %rax movb 0xe(%rsp), %cl movb %cl, (%rax) leaq 0x58(%rsp), %rdi callq 0x21f238 movl 0xac(%rsp), %eax addl $0x1, %eax movl %eax, 0xac(%rsp) jmp 0x371e6d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x80(%rsp), %rdi callq 0x21f238 jmp 0x371eae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x58(%rsp), %rdi callq 0x21f238 jmp 0x371eae jmp 0x371e6f movl 0xa8(%rsp), %eax addl $0x1, %eax movl %eax, 0xa8(%rsp) jmp 0x371d3e movb $0x1, 0x12f(%rsp) testb $0x1, 0x12f(%rsp) jne 0x371ea1 movq 0x48(%rsp), %rdi callq 0x21f260 movq 0x50(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq movq 0x48(%rsp), %rdi callq 0x21f260 movq 0x100(%rsp), %rdi callq 0x219750 nopw %cs:(%rax,%rax)
_ZL24unicode_utf8_to_byte_mapB5cxx11v: sub rsp, 138h mov [rsp+138h+var_F0], rdi mov rax, rdi mov [rsp+138h+var_E8], rax mov [rsp+138h+var_8], rdi mov [rsp+138h+var_9], 0 call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEEC2Ev; std::unordered_map<std::string,uchar>::unordered_map(void) mov [rsp+138h+var_10], 21h ; '!' loc_371B34: cmp [rsp+138h+var_10], 7Eh ; '~' jg loc_371BE2 mov esi, [rsp+138h+var_10]; int mov al, sil mov [rsp+138h+var_F1], al lea rdi, [rsp+138h+var_30]; int call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint) jmp short $+2 loc_371B5F: mov rdi, [rsp+138h+var_F0] lea rsi, [rsp+138h+var_30] call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEEixEOS5_; std::unordered_map<std::string,uchar>::operator[](std::string&&) mov [rsp+138h+var_100], rax jmp short $+2 loc_371B78: mov rax, [rsp+138h+var_100] mov cl, [rsp+138h+var_F1] mov [rax], cl lea rdi, [rsp+138h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+138h+var_10] add eax, 1 mov [rsp+138h+var_10], eax jmp short loc_371B34 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax jmp loc_371EAE mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_371EAE loc_371BE2: mov [rsp+138h+var_40], 0A1h loc_371BED: cmp [rsp+138h+var_40], 0ACh jg loc_371C85 mov esi, [rsp+138h+var_40]; int mov al, sil mov [rsp+138h+var_101], al lea rdi, [rsp+138h+var_60]; int call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint) jmp short $+2 loc_371C1B: mov rdi, [rsp+138h+var_F0] lea rsi, [rsp+138h+var_60] call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEEixEOS5_; std::unordered_map<std::string,uchar>::operator[](std::string&&) mov [rsp+138h+var_110], rax jmp short $+2 loc_371C34: mov rax, [rsp+138h+var_110] mov cl, [rsp+138h+var_101] mov [rax], cl lea rdi, [rsp+138h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+138h+var_40] add eax, 1 mov [rsp+138h+var_40], eax jmp short loc_371BED mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_371EAE loc_371C85: mov [rsp+138h+var_64], 0AEh loc_371C90: cmp [rsp+138h+var_64], 0FFh jg loc_371D28 mov esi, [rsp+138h+var_64]; int mov al, sil mov [rsp+138h+var_111], al lea rdi, [rsp+138h+var_88]; int call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint) jmp short $+2 loc_371CBE: mov rdi, [rsp+138h+var_F0] lea rsi, [rsp+138h+var_88] call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEEixEOS5_; std::unordered_map<std::string,uchar>::operator[](std::string&&) mov [rsp+138h+var_120], rax jmp short $+2 loc_371CD7: mov rax, [rsp+138h+var_120] mov cl, [rsp+138h+var_111] mov [rax], cl lea rdi, [rsp+138h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+138h+var_64] add eax, 1 mov [rsp+138h+var_64], eax jmp short loc_371C90 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_371EAE loc_371D28: mov [rsp+138h+var_8C], 0 mov [rsp+138h+var_90], 0 loc_371D3E: cmp [rsp+138h+var_90], 100h jge loc_371E85 mov esi, [rsp+138h+var_90]; int lea rdi, [rsp+138h+var_B8]; int call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint) jmp short $+2 loc_371D65: mov rdi, [rsp+138h+var_F0] lea rsi, [rsp+138h+var_B8] call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEE4findERSB_; std::unordered_map<std::string,uchar>::find(std::string const&) mov qword ptr [rsp+138h+var_128], rax; int jmp short $+2 loc_371D7E: mov rdi, [rsp+138h+var_F0] mov rax, qword ptr [rsp+138h+var_128] mov [rsp+138h+var_98], rax call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEE3endEv; std::unordered_map<std::string,uchar>::end(void) mov [rsp+138h+var_C0], rax lea rdi, [rsp+138h+var_98] lea rsi, [rsp+138h+var_C0] call __ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhELb1EEESC_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,uchar>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,uchar>,true> const&) mov [rsp+138h+var_129], al lea rdi, [rsp+138h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov al, [rsp+138h+var_129] test al, 1 jnz short loc_371DCA jmp loc_371E6D loc_371DCA: mov al, byte ptr [rsp+138h+var_90] mov [rsp+138h+var_12A], al mov esi, [rsp+138h+var_8C] add esi, 100h; int lea rdi, [rsp+138h+var_E0]; int call __Z19unicode_cpt_to_utf8B5cxx11j; unicode_cpt_to_utf8(uint) jmp short $+2 loc_371DEE: mov rdi, [rsp+138h+var_F0] lea rsi, [rsp+138h+var_E0] call __ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEEixEOS5_; std::unordered_map<std::string,uchar>::operator[](std::string&&) mov [rsp+138h+var_138], rax jmp short $+2 loc_371E03: mov rax, [rsp+138h+var_138] mov cl, [rsp+138h+var_12A] mov [rax], cl lea rdi, [rsp+138h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+138h+var_8C] add eax, 1 mov [rsp+138h+var_8C], eax jmp short loc_371E6D mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_371EAE mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_371EAE loc_371E6D: jmp short $+2 loc_371E6F: mov eax, [rsp+138h+var_90] add eax, 1 mov [rsp+138h+var_90], eax jmp loc_371D3E loc_371E85: mov [rsp+138h+var_9], 1 test [rsp+138h+var_9], 1 jnz short loc_371EA1 mov rdi, [rsp+138h+var_F0]; void * call j__ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEED2Ev; std::unordered_map<std::string,uchar>::~unordered_map() loc_371EA1: mov rax, [rsp+138h+var_E8] add rsp, 138h retn loc_371EAE: mov rdi, [rsp+arg_40]; void * call j__ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEhSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_hEEED2Ev; std::unordered_map<std::string,uchar>::~unordered_map() mov rdi, [rsp+arg_F8] call __Unwind_Resume
long long unicode_utf8_to_byte_map[abi:cxx11](long long a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d _BYTE *v6; // [rsp+0h] [rbp-138h] int v7; // [rsp+8h] [rbp-130h] char v8; // [rsp+Eh] [rbp-12Ah] char v9; // [rsp+Fh] [rbp-129h] int v10[2]; // [rsp+10h] [rbp-128h] _BYTE *v11; // [rsp+18h] [rbp-120h] char v12; // [rsp+27h] [rbp-111h] char v13; // [rsp+37h] [rbp-101h] char v14; // [rsp+47h] [rbp-F1h] int v15[8]; // [rsp+58h] [rbp-E0h] BYREF long long v16; // [rsp+78h] [rbp-C0h] BYREF int v17[8]; // [rsp+80h] [rbp-B8h] BYREF long long v18; // [rsp+A0h] [rbp-98h] BYREF int m; // [rsp+A8h] [rbp-90h] int v20; // [rsp+ACh] [rbp-8Ch] int v21[9]; // [rsp+B0h] [rbp-88h] BYREF int k; // [rsp+D4h] [rbp-64h] int v23[8]; // [rsp+D8h] [rbp-60h] BYREF int j; // [rsp+F8h] [rbp-40h] int v25[8]; // [rsp+108h] [rbp-30h] BYREF int i; // [rsp+128h] [rbp-10h] char v27; // [rsp+12Fh] [rbp-9h] long long v28; // [rsp+130h] [rbp-8h] v28 = a1; v27 = 0; std::unordered_map<std::string,unsigned char>::unordered_map(); for ( i = 33; i <= 126; ++i ) { v14 = i; unicode_cpt_to_utf8[abi:cxx11]((int)v25, i, v1, v2, v3, v4, v6, v7, v10[0], (long long)v11); *(_BYTE *)std::unordered_map<std::string,unsigned char>::operator[](a1, v25) = v14; std::string::~string(v25); } for ( j = 161; j <= 172; ++j ) { v13 = j; unicode_cpt_to_utf8[abi:cxx11]((int)v23, j, v1, v2, v3, v4, v6, v7, v10[0], (long long)v11); *(_BYTE *)std::unordered_map<std::string,unsigned char>::operator[](a1, v23) = v13; std::string::~string(v23); } for ( k = 174; k <= 255; ++k ) { v12 = k; unicode_cpt_to_utf8[abi:cxx11]((int)v21, k, v1, v2, v3, v4, v6, v7, v10[0], (long long)v11); v11 = (_BYTE *)std::unordered_map<std::string,unsigned char>::operator[](a1, v21); *v11 = v12; std::string::~string(v21); } v20 = 0; for ( m = 0; m < 256; ++m ) { unicode_cpt_to_utf8[abi:cxx11]((int)v17, m, v1, v2, v3, v4, v6, v7, v10[0], (long long)v11); *(_QWORD *)v10 = std::unordered_map<std::string,unsigned char>::find(a1, v17); v18 = *(_QWORD *)v10; v16 = std::unordered_map<std::string,unsigned char>::end(a1); v9 = std::__detail::operator==(&v18, &v16); std::string::~string(v17); if ( (v9 & 1) != 0 ) { unicode_cpt_to_utf8[abi:cxx11]((int)v15, v20 + 256, v1, v2, v3, v4, v6, v7, v10[0], (long long)v11); v6 = (_BYTE *)std::unordered_map<std::string,unsigned char>::operator[](a1, v15); *v6 = v8; std::string::~string(v15); ++v20; } } return a1; }
_M_store_code: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX RET
/* std::__detail::_Hash_code_base<llama_adapter_lora*, std::pair<llama_adapter_lora* const, float>, std::__detail::_Select1st, std::hash<llama_adapter_lora*>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_store_code(std::__detail::_Hash_node_code_cache<false>&, unsigned long) const */ void std::__detail:: _Hash_code_base<llama_adapter_lora*,std::pair<llama_adapter_lora*const,float>,std::__detail::_Select1st,std::hash<llama_adapter_lora*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,false> ::_M_store_code(_Hash_node_code_cache *param_1,ulong param_2) { return; }
2,348
string_buffer_init2
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_init2(JSContext *ctx, StringBuffer *s, int size, int is_wide) { s->ctx = ctx; s->size = size; s->len = 0; s->is_wide_char = is_wide; s->error_status = 0; s->str = js_alloc_string(ctx, size, is_wide); if (unlikely(!s->str)) { s->size = 0; return s->error_status = -1; } #ifdef DUMP_LEAKS /* the StringBuffer may reallocate the JSString, only link it at the end */ list_del(&s->str->link); #endif return 0; }
O2
c
string_buffer_init2: pushq %rbx movq %rsi, %rbx movq %rdi, (%rsi) movl %edx, 0x14(%rsi) andl $0x0, 0x10(%rsi) movl %ecx, 0x18(%rsi) andl $0x0, 0x1c(%rsi) movl %edx, %esi movl %ecx, %edx callq 0x1ad45 movq %rax, %rcx movq %rax, 0x8(%rbx) xorl %eax, %eax testq %rcx, %rcx je 0x2ca75 popq %rbx retq andl $0x0, 0x14(%rbx) orl $-0x1, 0x1c(%rbx) pushq $-0x1 popq %rax jmp 0x2ca73
string_buffer_init2: push rbx mov rbx, rsi mov [rsi], rdi mov [rsi+14h], edx and dword ptr [rsi+10h], 0 mov [rsi+18h], ecx and dword ptr [rsi+1Ch], 0 mov esi, edx mov edx, ecx call js_alloc_string mov rcx, rax mov [rbx+8], rax xor eax, eax test rcx, rcx jz short loc_2CA75 loc_2CA73: pop rbx retn loc_2CA75: and dword ptr [rbx+14h], 0 or dword ptr [rbx+1Ch], 0FFFFFFFFh push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_2CA73
long long string_buffer_init2(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long v4; // rcx long long result; // rax *(_QWORD *)a2 = a1; *(_DWORD *)(a2 + 20) = a3; *(_DWORD *)(a2 + 16) = 0; *(_DWORD *)(a2 + 24) = a4; *(_DWORD *)(a2 + 28) = 0; v4 = js_alloc_string(a1, a3, a4); *(_QWORD *)(a2 + 8) = v4; result = 0LL; if ( !v4 ) { *(_DWORD *)(a2 + 20) = 0; *(_DWORD *)(a2 + 28) = -1; return -1LL; } return result; }
string_buffer_init2: PUSH RBX MOV RBX,RSI MOV qword ptr [RSI],RDI MOV dword ptr [RSI + 0x14],EDX AND dword ptr [RSI + 0x10],0x0 MOV dword ptr [RSI + 0x18],ECX AND dword ptr [RSI + 0x1c],0x0 MOV ESI,EDX MOV EDX,ECX CALL 0x0011ad45 MOV RCX,RAX MOV qword ptr [RBX + 0x8],RAX XOR EAX,EAX TEST RCX,RCX JZ 0x0012ca75 LAB_0012ca73: POP RBX RET LAB_0012ca75: AND dword ptr [RBX + 0x14],0x0 OR dword ptr [RBX + 0x1c],0xffffffff PUSH -0x1 POP RAX JMP 0x0012ca73
int8 string_buffer_init2(int8 param_1,int8 *param_2,int4 param_3,int4 param_4) { long lVar1; int8 uStack_10; *param_2 = param_1; *(int4 *)((long)param_2 + 0x14) = param_3; *(int4 *)(param_2 + 2) = 0; *(int4 *)(param_2 + 3) = param_4; *(int4 *)((long)param_2 + 0x1c) = 0; lVar1 = js_alloc_string(param_1,param_3,param_4); param_2[1] = lVar1; uStack_10 = 0; if (lVar1 == 0) { *(int4 *)((long)param_2 + 0x14) = 0; *(int4 *)((long)param_2 + 0x1c) = 0xffffffff; uStack_10 = 0xffffffffffffffff; } return uStack_10; }
2,349
fill_uint16
eloqsql/strings/ctype.c
static int fill_uint16(uint16 *a,uint size,const char *str, size_t len) { uint i= 0; const char *s, *b, *e=str+len; for (s=str ; s < e ; i++) { for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ; b=s; for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ; if (s == b || i > size) break; a[i]= (uint16) strtol(b,NULL,16); } return 0; }
O0
c
fill_uint16: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x76a78 jmp 0x769a2 movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x41(%rbp) jae 0x769ce movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0x103d0(%rip), %rdi # 0x86d8f callq 0x25110 cmpq $0x0, %rax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x769d7 jmp 0x769e7 jmp 0x769d9 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x769a2 movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x76a1d movq -0x30(%rbp), %rax movsbl (%rax), %esi leaq 0x10383(%rip), %rdi # 0x86d8f callq 0x25110 cmpq $0x0, %rax setne %al xorb $-0x1, %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x76a26 jmp 0x76a36 jmp 0x76a28 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x769ef movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x76a48 movl -0x24(%rbp), %eax cmpl -0xc(%rbp), %eax jbe 0x76a4a jmp 0x76a78 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0x10, %edx callq 0x25660 movw %ax, %dx movq -0x8(%rbp), %rax movl -0x24(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x76992 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq
fill_uint16: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], 0 mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_76992: mov rax, [rbp+var_30] cmp rax, [rbp+var_40] jnb loc_76A78 jmp short $+2 loc_769A2: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_41], al jnb short loc_769CE mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_86D8F; " \t\r\n" call _strchr cmp rax, 0 setnz al mov [rbp+var_41], al loc_769CE: mov al, [rbp+var_41] test al, 1 jnz short loc_769D7 jmp short loc_769E7 loc_769D7: jmp short $+2 loc_769D9: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_769A2 loc_769E7: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_769EF: mov rcx, [rbp+var_30] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_42], al jnb short loc_76A1D mov rax, [rbp+var_30] movsx esi, byte ptr [rax] lea rdi, asc_86D8F; " \t\r\n" call _strchr cmp rax, 0 setnz al xor al, 0FFh mov [rbp+var_42], al loc_76A1D: mov al, [rbp+var_42] test al, 1 jnz short loc_76A26 jmp short loc_76A36 loc_76A26: jmp short $+2 loc_76A28: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_769EF loc_76A36: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jz short loc_76A48 mov eax, [rbp+var_24] cmp eax, [rbp+var_C] jbe short loc_76A4A loc_76A48: jmp short loc_76A78 loc_76A4A: mov rdi, [rbp+var_38] xor eax, eax mov esi, eax mov edx, 10h call ___isoc23_strtol mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_24] mov [rax+rcx*2], dx mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_76992 loc_76A78: xor eax, eax add rsp, 50h pop rbp retn
long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4) { char v5; // [rsp+Eh] [rbp-42h] bool v6; // [rsp+Fh] [rbp-41h] unsigned long long v7; // [rsp+10h] [rbp-40h] char *v8; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned int v10; // [rsp+2Ch] [rbp-24h] v10 = 0; v7 = (unsigned long long)&a3[a4]; v9 = a3; while ( (unsigned long long)v9 < v7 ) { while ( 1 ) { v6 = 0; if ( (unsigned long long)v9 < v7 ) v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0; if ( !v6 ) break; ++v9; } v8 = v9; while ( 1 ) { v5 = 0; if ( (unsigned long long)v9 < v7 ) v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0); if ( (v5 & 1) == 0 ) break; ++v9; } if ( v9 == v8 || v10 > a2 ) break; *(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL); } return 0LL; }
fill_uint16: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],0x0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_00176992: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00176a78 JMP 0x001769a2 LAB_001769a2: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x41],AL JNC 0x001769ce MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x186d8f] CALL 0x00125110 CMP RAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_001769ce: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x001769d7 JMP 0x001769e7 LAB_001769d7: JMP 0x001769d9 LAB_001769d9: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001769a2 LAB_001769e7: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_001769ef: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x42],AL JNC 0x00176a1d MOV RAX,qword ptr [RBP + -0x30] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x186d8f] CALL 0x00125110 CMP RAX,0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x42],AL LAB_00176a1d: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x00176a26 JMP 0x00176a36 LAB_00176a26: JMP 0x00176a28 LAB_00176a28: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x001769ef LAB_00176a36: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JZ 0x00176a48 MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0xc] JBE 0x00176a4a LAB_00176a48: JMP 0x00176a78 LAB_00176a4a: MOV RDI,qword ptr [RBP + -0x38] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x10 CALL 0x00125660 MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x24] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00176992 LAB_00176a78: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4) { char *pcVar1; int2 uVar2; char *pcVar3; char *pcVar4; bool bVar5; char *local_38; uint local_2c; local_2c = 0; pcVar3 = param_3 + param_4; local_38 = param_3; while( true ) { if (pcVar3 <= local_38) { return 0; } while( true ) { pcVar1 = local_38; bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 != (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } while( true ) { bVar5 = false; if (local_38 < pcVar3) { pcVar4 = strchr(" \t\r\n",(int)*local_38); bVar5 = pcVar4 == (char *)0x0; } if (!bVar5) break; local_38 = local_38 + 1; } if (local_38 == pcVar1) break; if (param_2 < local_2c) { return 0; } uVar2 = __isoc23_strtol(pcVar1,0,0x10); *(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2; local_2c = local_2c + 1; } return 0; }
2,350
bool get_int<unsigned int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int&)
msxemulator/build_O3/_deps/picotool-src/main.cpp
bool get_int(const std::string& s, T& out) { return integer::parse_string(s, out).empty(); }
O3
cpp
bool get_int<unsigned int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int&): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rdi), %rsi movq 0x8(%rdi), %rdx addq %rsi, %rdx movq %rsp, %r14 movq %r14, %rdi callq 0x1d410 leaq 0x20(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x709b4 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi movq -0x8(%rax), %rbx cmpq %rax, %rdi je 0x7096c movq 0x30(%rsp), %rsi incq %rsi callq 0xf470 movq (%rsp), %rdi cmpq %r15, %rdi je 0x70982 movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 testq %rbx, %rbx sete %al addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq (%rsp), %rdi cmpq %r15, %rdi je 0x709ab movq 0x10(%rsp), %rsi incq %rsi callq 0xf470 movq %rbx, %rdi callq 0xf7d0 nop
_Z7get_intIjEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERT_: push r15 push r14 push rbx sub rsp, 40h mov rbx, rsi lea r15, [rsp+58h+var_48] mov [r15-10h], r15 mov rsi, [rdi] mov rdx, [rdi+8] add rdx, rsi mov r14, rsp mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rsp+58h+var_38] mov rsi, r14 mov rdx, rbx call _ZN3cli7integer12parse_stringIjEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_RT_; cli::integer::parse_string<uint>(std::string,uint &) lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * mov rbx, [rax-8] cmp rdi, rax jz short loc_7096C mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7096C: mov rdi, [rsp+58h+var_58]; void * cmp rdi, r15 jz short loc_70982 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_70982: test rbx, rbx setz al add rsp, 40h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+0]; void * cmp rdi, r15 jz short loc_709AB mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_709AB: mov rdi, rbx call __Unwind_Resume
bool get_int<unsigned int>(long long a1, long long a2) { void *v2; // rbx void *v4[2]; // [rsp+0h] [rbp-58h] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-48h] BYREF void *v6[2]; // [rsp+20h] [rbp-38h] BYREF long long v7; // [rsp+30h] [rbp-28h] BYREF v4[0] = v5; std::string::_M_construct<char *>((long long)v4, *(_BYTE **)a1, *(_QWORD *)a1 + *(_QWORD *)(a1 + 8)); cli::integer::parse_string<unsigned int>(v6, v4, a2); v2 = v6[1]; if ( v6[0] != &v7 ) operator delete(v6[0], v7 + 1); if ( v4[0] != v5 ) operator delete(v4[0], v5[0] + 1LL); return v2 == 0LL; }
get_int<unsigned_int>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RSI LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] ADD RDX,RSI MOV R14,RSP MOV RDI,R14 CALL 0x0011d410 LAB_0017093d: LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV RDX,RBX CALL 0x001709b4 LAB_0017094d: LEA RAX,[RSP + 0x30] MOV RDI,qword ptr [RAX + -0x10] MOV RBX,qword ptr [RAX + -0x8] CMP RDI,RAX JZ 0x0017096c MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0010f470 LAB_0017096c: MOV RDI,qword ptr [RSP] CMP RDI,R15 JZ 0x00170982 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0010f470 LAB_00170982: TEST RBX,RBX SETZ AL ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* bool get_int<unsigned int>(std::__cxx11::string const&, unsigned int&) */ bool get_int<unsigned_int>(string *param_1,uint *param_2) { long *local_58 [2]; long local_48 [2]; long *local_38; long local_30; long local_28 [2]; local_58[0] = local_48; std::__cxx11::string::_M_construct<char*> (local_58,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 0017093d to 0017094c has its CatchHandler @ 00170992 */ cli::integer::parse_string<unsigned_int>((integer *)&local_38,local_58,param_2); if (local_38 != local_28) { operator_delete(local_38,local_28[0] + 1); } if (local_58[0] != local_48) { operator_delete(local_58[0],local_48[0] + 1); } return local_30 == 0; }
2,351
google::protobuf::compiler::CodeGeneratorResponse_File::InternalSwap(google::protobuf::compiler::CodeGeneratorResponse_File*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc
void CodeGeneratorResponse_File::InternalSwap(CodeGeneratorResponse_File* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.name_, lhs_arena, &other->_impl_.name_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.insertion_point_, lhs_arena, &other->_impl_.insertion_point_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.content_, lhs_arena, &other->_impl_.content_, rhs_arena ); swap(_impl_.generated_code_info_, other->_impl_.generated_code_info_); }
O0
cpp
google::protobuf::compiler::CodeGeneratorResponse_File::InternalSwap(google::protobuf::compiler::CodeGeneratorResponse_File*): subq $0xb8, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rdi movq %rdi, (%rsp) callq 0x292e0 movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rdi callq 0x292e0 movq (%rsp), %rcx movq %rax, 0x8(%rsp) addq $0x8, %rcx movq 0x18(%rsp), %rax addq $0x8, %rax movq %rcx, 0x50(%rsp) movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0xb15a0 movq (%rsp), %rax addq $0x10, %rax movq %rax, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq 0x40(%rsp), %rdi movslq 0x3c(%rsp), %rax shlq $0x2, %rax addq %rax, %rdi movq 0x18(%rsp), %rax addq $0x10, %rax movq %rax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x30(%rsp), %rsi movslq 0x2c(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi callq 0xaf5b0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x8, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x8, %rcx movq 0x8(%rsp), %rax movq %rsi, 0xb0(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0xa0(%rsp) movq %rax, 0x98(%rsp) movq 0xa0(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0xb15e0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x10, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x10, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x90(%rsp) movq %rdx, 0x88(%rsp) movq %rcx, 0x80(%rsp) movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0xb15e0 movq (%rsp), %rsi addq $0x10, %rsi addq $0x18, %rsi movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rcx addq $0x10, %rcx addq $0x18, %rcx movq 0x8(%rsp), %rax movq %rsi, 0x70(%rsp) movq %rdx, 0x68(%rsp) movq %rcx, 0x60(%rsp) movq %rax, 0x58(%rsp) movq 0x60(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0xb15e0 movq (%rsp), %rdi addq $0x10, %rdi addq $0x20, %rdi movq 0x18(%rsp), %rsi addq $0x10, %rsi addq $0x20, %rsi callq 0xb05b0 addq $0xb8, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf8compiler26CodeGeneratorResponse_File12InternalSwapEPS2_: sub rsp, 0B8h mov [rsp+0B8h+var_98], rdi mov [rsp+0B8h+var_A0], rsi mov rdi, [rsp+0B8h+var_98]; this mov [rsp+0B8h+var_B8], rdi call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov [rsp+0B8h+var_A8], rax mov rdi, [rsp+0B8h+var_A0]; this call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void) mov rcx, [rsp+0B8h+var_B8] mov [rsp+0B8h+var_B0], rax add rcx, 8 mov rax, [rsp+0B8h+var_A0] add rax, 8 mov [rsp+0B8h+var_68], rcx mov [rsp+0B8h+var_70], rax mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_70] call _ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rax, [rsp+0B8h+var_B8] add rax, 10h mov [rsp+0B8h+var_78], rax mov [rsp+0B8h+var_7C], 0 mov rdi, [rsp+0B8h+var_78] movsxd rax, [rsp+0B8h+var_7C] shl rax, 2 add rdi, rax mov rax, [rsp+0B8h+var_A0] add rax, 10h mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_8C], 0 mov rsi, [rsp+0B8h+var_88] movsxd rax, [rsp+0B8h+var_8C] shl rax, 2 add rsi, rax call _ZSt4swapIjENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 8 mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 8 mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_8], rsi mov [rsp+0B8h+var_10], rdx mov [rsp+0B8h+var_18], rcx mov [rsp+0B8h+var_20], rax mov rdi, [rsp+0B8h+var_18] mov rsi, [rsp+0B8h+var_8] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 10h mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 10h mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_28], rsi mov [rsp+0B8h+var_30], rdx mov [rsp+0B8h+var_38], rcx mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_28] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rsi, [rsp+0B8h+var_B8] add rsi, 10h add rsi, 18h mov rdx, [rsp+0B8h+var_A8] mov rcx, [rsp+0B8h+var_A0] add rcx, 10h add rcx, 18h mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_48], rsi mov [rsp+0B8h+var_50], rdx mov [rsp+0B8h+var_58], rcx mov [rsp+0B8h+var_60], rax mov rdi, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_48] call _ZSt4swapIN6google8protobuf8internal15TaggedStringPtrEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ mov rdi, [rsp+0B8h+var_B8] add rdi, 10h add rdi, 20h ; ' ' mov rsi, [rsp+0B8h+var_A0] add rsi, 10h add rsi, 20h ; ' ' call _ZSt4swapIPN6google8protobuf17GeneratedCodeInfoEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS7_ESt18is_move_assignableIS7_EEE5valueEvE4typeERS7_SG_ add rsp, 0B8h retn
long long google::protobuf::compiler::CodeGeneratorResponse_File::InternalSwap( google::protobuf::compiler::CodeGeneratorResponse_File *this, google::protobuf::compiler::CodeGeneratorResponse_File *a2) { google::protobuf::MessageLite::GetArenaForAllocation(this); google::protobuf::MessageLite::GetArenaForAllocation(a2); std::swap<long>((char *)this + 8, (char *)a2 + 8); std::swap<unsigned int>((char *)this + 16, (char *)a2 + 16); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 24, (char *)this + 24); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 32, (char *)this + 32); std::swap<google::protobuf::internal::TaggedStringPtr>((char *)a2 + 40, (char *)this + 40); return std::swap<google::protobuf::GeneratedCodeInfo *>((char *)this + 48, (char *)a2 + 48); }
InternalSwap: SUB RSP,0xb8 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RDI CALL 0x001292e0 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x001292e0 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001b15a0 MOV RAX,qword ptr [RSP] ADD RAX,0x10 MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x3c],0x0 MOV RDI,qword ptr [RSP + 0x40] MOVSXD RAX,dword ptr [RSP + 0x3c] SHL RAX,0x2 ADD RDI,RAX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x10 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x2c],0x0 MOV RSI,qword ptr [RSP + 0x30] MOVSXD RAX,dword ptr [RSP + 0x2c] SHL RAX,0x2 ADD RSI,RAX CALL 0x001af5b0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x8 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0xb0],RSI MOV qword ptr [RSP + 0xa8],RDX MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x001b15e0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x10 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x10 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x90],RSI MOV qword ptr [RSP + 0x88],RDX MOV qword ptr [RSP + 0x80],RCX MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x90] CALL 0x001b15e0 MOV RSI,qword ptr [RSP] ADD RSI,0x10 ADD RSI,0x18 MOV RDX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x10 ADD RCX,0x18 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RSI MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x60],RCX MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x70] CALL 0x001b15e0 MOV RDI,qword ptr [RSP] ADD RDI,0x10 ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x10 ADD RSI,0x20 CALL 0x001b05b0 ADD RSP,0xb8 RET
/* google::protobuf::compiler::CodeGeneratorResponse_File::InternalSwap(google::protobuf::compiler::CodeGeneratorResponse_File*) */ void __thiscall google::protobuf::compiler::CodeGeneratorResponse_File::InternalSwap (CodeGeneratorResponse_File *this,CodeGeneratorResponse_File *param_1) { MessageLite::GetArenaForAllocation((MessageLite *)this); MessageLite::GetArenaForAllocation((MessageLite *)param_1); std::swap<long>((long *)(this + 8),(long *)(param_1 + 8)); std::swap<unsigned_int>((uint *)(this + 0x10),(uint *)(param_1 + 0x10)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x18),(TaggedStringPtr *)(this + 0x18)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x20),(TaggedStringPtr *)(this + 0x20)); std::swap<google::protobuf::internal::TaggedStringPtr> ((TaggedStringPtr *)(param_1 + 0x28),(TaggedStringPtr *)(this + 0x28)); std::swap<google::protobuf::GeneratedCodeInfo*> ((GeneratedCodeInfo **)(this + 0x30),(GeneratedCodeInfo **)(param_1 + 0x30)); return; }
2,352
testing::internal::Mutex::Mutex()
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h
Mutex() { GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr)); has_owner_ = false; }
O0
c
testing::internal::Mutex::Mutex(): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x20(%rsp) xorl %eax, %eax movl %eax, %esi callq 0x14ae0 movl %eax, 0x3c(%rsp) cmpl $0x0, 0x3c(%rsp) je 0xe6f29 leaq 0x2d899(%rip), %rdx # 0x11473b leaq 0x38(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x6d3, %ecx # imm = 0x6D3 callq 0xb9070 movq 0x10(%rsp), %rdi callq 0x1ea10 movq %rax, %rdi leaq 0x2d93c(%rip), %rsi # 0x11480b callq 0x146a0 movq %rax, 0x18(%rsp) jmp 0xe6edb movq 0x18(%rsp), %rdi leaq 0x2d8e8(%rip), %rsi # 0x1147cf callq 0x146a0 movq %rax, 0x8(%rsp) jmp 0xe6ef3 movq 0x8(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x14c50 jmp 0xe6f03 leaq 0x38(%rsp), %rdi callq 0xb91e0 jmp 0xe6f29 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0xb91e0 jmp 0xe6f37 movq 0x20(%rsp), %rax movb $0x0, 0x28(%rax) addq $0x48, %rsp retq movq 0x30(%rsp), %rdi callq 0x14c80 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN7testing8internal5MutexC2Ev: sub rsp, 48h mov [rsp+48h+var_8], rdi; __int64 mov rdi, [rsp+48h+var_8] mov qword ptr [rsp+48h+var_28], rdi; int xor eax, eax mov esi, eax call _pthread_mutex_init mov [rsp+48h+var_C], eax cmp [rsp+48h+var_C], 0 jz loc_E6F29 lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+48h+var_10]; int mov [rsp+48h+var_38], rdi; int mov esi, 3 mov ecx, 6D3h call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int) mov rdi, [rsp+48h+var_38]; this call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void) mov rdi, rax lea rsi, aPthreadMutexIn_0; "pthread_mutex_init(&mutex_, nullptr)" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+48h+var_30], rax jmp short $+2 loc_E6EDB: mov rdi, [rsp+48h+var_30] lea rsi, aFailedWithErro; "failed with error " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+48h+var_40], rax jmp short $+2 loc_E6EF3: mov rdi, [rsp+48h+var_40] mov esi, [rsp+48h+var_C] call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_E6F03: lea rdi, [rsp+48h+var_10]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_E6F29 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog() jmp short loc_E6F37 loc_E6F29: mov rax, qword ptr [rsp+48h+var_28] mov byte ptr [rax+28h], 0 add rsp, 48h retn loc_E6F37: mov rdi, [rsp+arg_28] call __Unwind_Resume
testing::internal::Mutex * testing::internal::Mutex::Mutex(testing::internal::Mutex *this) { void *Stream; // rax testing::internal::Mutex *result; // rax long long v3; // [rsp+8h] [rbp-40h] long long v4; // [rsp+18h] [rbp-30h] int v5; // [rsp+38h] [rbp-10h] BYREF unsigned int v6; // [rsp+3Ch] [rbp-Ch] long long v7; // [rsp+40h] [rbp-8h] v7 = (long long)this; v6 = pthread_mutex_init(this, 0LL); if ( v6 ) { testing::internal::GTestLog::GTestLog( (testing::internal::GTestLog *)&v5, 3, (long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h", 1747); Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v5); v4 = std::operator<<<std::char_traits<char>>(Stream, "pthread_mutex_init(&mutex_, nullptr)"); v3 = std::operator<<<std::char_traits<char>>(v4, "failed with error "); std::ostream::operator<<(v3, v6); testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v5); } result = this; *((_BYTE *)this + 40) = 0; return result; }
Mutex: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x20],RDI XOR EAX,EAX MOV ESI,EAX CALL 0x00114ae0 MOV dword ptr [RSP + 0x3c],EAX CMP dword ptr [RSP + 0x3c],0x0 JZ 0x001e6f29 LEA RDX,[0x21473b] LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x10],RDI MOV ESI,0x3 MOV ECX,0x6d3 CALL 0x001b9070 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011ea10 MOV RDI,RAX LAB_001e6ec8: LEA RSI,[0x21480b] CALL 0x001146a0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001e6edb LAB_001e6edb: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x2147cf] CALL 0x001146a0 MOV qword ptr [RSP + 0x8],RAX JMP 0x001e6ef3 LAB_001e6ef3: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00114c50 LAB_001e6f01: JMP 0x001e6f03 LAB_001e6f03: LEA RDI,[RSP + 0x38] CALL 0x001b91e0 JMP 0x001e6f29 LAB_001e6f29: MOV RAX,qword ptr [RSP + 0x20] MOV byte ptr [RAX + 0x28],0x0 ADD RSP,0x48 RET
/* testing::internal::Mutex::Mutex() */ void __thiscall testing::internal::Mutex::Mutex(Mutex *this) { ostream *poVar1; GTestLog local_10 [4]; int local_c; Mutex *local_8; local_8 = this; local_c = pthread_mutex_init((pthread_mutex_t *)this,(pthread_mutexattr_t *)0x0); if (local_c != 0) { GTestLog::GTestLog(local_10,3, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h" ,0x6d3); poVar1 = (ostream *)GTestLog::GetStream(); /* try { // try from 001e6ec8 to 001e6f00 has its CatchHandler @ 001e6f0f */ poVar1 = std::operator<<(poVar1,"pthread_mutex_init(&mutex_, nullptr)"); poVar1 = std::operator<<(poVar1,"failed with error "); std::ostream::operator<<(poVar1,local_c); GTestLog::~GTestLog(local_10); } this[0x28] = (Mutex)0x0; return; }
2,353
minja::Value::operator<(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool operator<(const Value & other) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_number() && other.is_number()) return get<double>() < other.get<double>(); if (is_string() && other.is_string()) return get<std::string>() < other.get<std::string>(); throw std::runtime_error("Cannot compare values: " + dump() + " < " + other.dump()); }
O3
cpp
minja::Value::operator<(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xb0, %rsp movq %rsi, %r14 movq %rdi, %r15 cmpq $0x0, 0x20(%rdi) movb 0x40(%rdi), %al jne 0x5874b cmpq $0x0, 0x10(%r15) jne 0x5874b testb %al, %al jne 0x5874b cmpq $0x0, 0x30(%r15) je 0x5884e leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0x58785 movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x2, %al ja 0x58880 movq %r15, %rdi callq 0x3d9aa movsd %xmm0, 0x48(%rsp) movq %r14, %rdi callq 0x3d9aa ucomisd 0x48(%rsp), %xmm0 seta %bl jmp 0x5883c cmpb $0x3, %al jne 0x58880 cmpb $0x3, 0x40(%r14) jne 0x58880 leaq 0x28(%rsp), %rdi movq %r15, %rsi callq 0x3f486 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x3f486 movq 0x30(%rsp), %r15 movq 0x8(%rsp), %r14 movq 0x10(%rsp), %r12 cmpq %r15, %r12 movq %r15, %rdx cmovbq %r12, %rdx testq %rdx, %rdx je 0x587e3 movq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x18320 movl %eax, %ebx testl %eax, %eax jne 0x58804 subq %r12, %r15 cmpq $-0x7fffffff, %r15 # imm = 0x80000001 movq $-0x80000000, %rbx # imm = 0x80000000 cmovgeq %r15, %rbx movl $0x7fffffff, %eax # imm = 0x7FFFFFFF cmpq %rax, %rbx cmovgeq %rax, %rbx leaq 0x18(%rsp), %rax cmpq %rax, %r14 je 0x5881e movq 0x18(%rsp), %rsi incq %rsi movq %r14, %rdi callq 0x186a0 shrl $0x1f, %ebx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5883c movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movl %ebx, %eax addq $0xb0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18360 movq %rax, %rbx leaq 0x51810(%rip), %rsi # 0xaa072 movq %rax, %rdi callq 0x18270 movq 0x84777(%rip), %rsi # 0xdcfe8 movq 0x846e8(%rip), %rdx # 0xdcf60 movq %rbx, %rdi callq 0x18b30 movl $0x10, %edi callq 0x18360 movq %rax, %rbx leaq 0x50(%rsp), %rdi movq %r15, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3daf6 leaq 0x534ed(%rip), %rsi # 0xabd95 leaq 0x90(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x24de1 leaq 0x534ec(%rip), %rsi # 0xabdad leaq 0x90(%rsp), %rdi callq 0x18cc0 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x588ef movups (%rcx), %xmm0 movups %xmm0, (%r15) jmp 0x588fc movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x70(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3daf6 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x24eb2 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x84693(%rip), %rsi # 0xdcfe8 movq 0x84604(%rip), %rdx # 0xdcf60 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5898a movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x5898a movq %rax, %r14 movb $0x1, %bpl leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x589b3 movq 0x80(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x589b3 movq %rax, %r14 movb $0x1, %bpl movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x589d2 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x589d2 movq %rax, %r14 movb $0x1, %bpl leaq 0xa0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x589f3 movq 0xa0(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x58a0e movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x58a5a jmp 0x58a62 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x58a5a movq 0x60(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x58a5a movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x58a62 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x58a62 jmp 0x58a57 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18b90
_ZNK5minja5ValueltERKS0_: push rbp push r15 push r14 push r12 push rbx sub rsp, 0B0h mov r14, rsi mov r15, rdi cmp qword ptr [rdi+20h], 0 mov al, [rdi+40h] jnz short loc_5874B cmp qword ptr [r15+10h], 0 jnz short loc_5874B test al, al jnz short loc_5874B cmp qword ptr [r15+30h], 0 jz loc_5884E loc_5874B: lea ecx, [rax-5] cmp cl, 2 ja short loc_58785 mov al, [r14+40h] add al, 0FBh cmp al, 2 ja loc_58880 mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0D8h+var_90], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) ucomisd xmm0, [rsp+0D8h+var_90] setnbe bl jmp loc_5883C loc_58785: cmp al, 3 jnz loc_58880 cmp byte ptr [r14+40h], 3 jnz loc_58880 lea rdi, [rsp+0D8h+var_B0] mov rsi, r15 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+0D8h+var_D0] mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) mov r15, [rsp+0D8h+var_A8] mov r14, [rsp+0D8h+var_D0] mov r12, [rsp+0D8h+var_C8] cmp r12, r15 mov rdx, r15 cmovb rdx, r12 test rdx, rdx jz short loc_587E3 mov rdi, [rsp+0D8h+var_B0] mov rsi, r14 call _memcmp mov ebx, eax test eax, eax jnz short loc_58804 loc_587E3: sub r15, r12 cmp r15, 0FFFFFFFF80000001h mov rbx, 0FFFFFFFF80000000h cmovge rbx, r15 mov eax, 7FFFFFFFh cmp rbx, rax cmovge rbx, rax loc_58804: lea rax, [rsp+0D8h+var_C0] cmp r14, rax jz short loc_5881E mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_5881E: shr ebx, 1Fh lea rax, [rsp+0D8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5883C mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5883C: mov eax, ebx add rsp, 0B0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_5884E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_58880: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0D8h+var_88] mov rsi, r15 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aCannotCompareV; "Cannot compare values: " lea rdi, [rsp+0D8h+var_48] lea rdx, [rsp+0D8h+var_88] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, asc_ABDAD; " < " lea rdi, [rsp+0D8h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+0D8h+var_C0] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_588EF movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 jmp short loc_588FC loc_588EF: mov [rsp+0D8h+var_D0], rdx mov rdx, [rcx] mov [rsp+0D8h+var_C0], rdx loc_588FC: mov rdx, [rax+8] mov [rsp+0D8h+var_C8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+0D8h+var_68] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] lea rdx, [rsp+0D8h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 lea rsi, [rsp+0D8h+var_B0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+0D8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5898A mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5898A mov r14, rax mov bpl, 1 loc_5898A: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_589B3 mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_589B3 mov r14, rax mov bpl, 1 loc_589B3: mov rdi, [rsp+0D8h+var_D0]; void * cmp rdi, r15 jz short loc_589D2 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_589D2 mov r14, rax mov bpl, 1 loc_589D2: lea rax, [rsp+0D8h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_589F3 mov rsi, [rsp+0D8h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_589F3: lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_58A0E mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_58A0E: test bpl, bpl jnz short loc_58A5A jmp short loc_58A62 mov r14, rax lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_58A5A mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_58A5A mov r14, rax lea rax, [rsp+0D8h+var_A0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_58A62 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_58A62 jmp short $+2 loc_58A57: mov r14, rax loc_58A5A: mov rdi, rbx; void * call ___cxa_free_exception loc_58A62: mov rdi, r14 call __Unwind_Resume
long long minja::Value::operator<(long long a1, long long a2) { unsigned int v2; // ebx char v3; // al unsigned long long v4; // r15 __int128 *v5; // r14 unsigned long long v6; // r12 unsigned long long v7; // rdx long long v8; // rbx long long v9; // r15 std::runtime_error *exception; // rbx void *v12; // rbx long long v13; // rax __int128 *v14; // rcx void *v15; // [rsp+8h] [rbp-D0h] BYREF unsigned long long v16; // [rsp+10h] [rbp-C8h] __int128 v17; // [rsp+18h] [rbp-C0h] BYREF long long *v18; // [rsp+28h] [rbp-B0h] BYREF unsigned long long v19; // [rsp+30h] [rbp-A8h] long long v20; // [rsp+38h] [rbp-A0h] BYREF double v21; // [rsp+48h] [rbp-90h] _BYTE v22[16]; // [rsp+50h] [rbp-88h] BYREF _QWORD v23[2]; // [rsp+70h] [rbp-68h] BYREF _BYTE v24[16]; // [rsp+90h] [rbp-48h] BYREF v3 = *(_BYTE *)(a1 + 64); if ( !*(_QWORD *)(a1 + 32) && !*(_QWORD *)(a1 + 16) && !v3 && !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (unsigned __int8)(v3 - 5) <= 2u ) { if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) <= 2u ) { v21 = minja::Value::get<double>(a1); LOBYTE(v2) = minja::Value::get<double>(a2) > v21; return v2; } LABEL_24: v12 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v22, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v24, (long long)"Cannot compare values: ", (long long)v22); v13 = std::string::append(v24, " < "); v15 = &v17; v14 = (__int128 *)(v13 + 16); if ( *(_QWORD *)v13 == v13 + 16 ) { v17 = *v14; } else { v15 = *(void **)v13; *(_QWORD *)&v17 = *(_QWORD *)v14; } v16 = *(_QWORD *)(v13 + 8); *(_QWORD *)v13 = v14; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; minja::Value::dump[abi:cxx11]((long long)v23, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)&v18, &v15, v23); std::runtime_error::runtime_error(v12, &v18); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v3 != 3 || *(_BYTE *)(a2 + 64) != 3 ) goto LABEL_24; minja::Value::get<std::string>((long long)&v18, (_QWORD *)a1); minja::Value::get<std::string>((long long)&v15, (_QWORD *)a2); v4 = v19; v5 = (__int128 *)v15; v6 = v16; v7 = v19; if ( v16 < v19 ) v7 = v16; if ( !v7 || (LODWORD(v8) = memcmp(v18, v15), !(_DWORD)v8) ) { v9 = v4 - v6; v8 = 0xFFFFFFFF80000000LL; if ( v9 >= -2147483647 ) v8 = v9; if ( v8 >= 0x7FFFFFFF ) LODWORD(v8) = 0x7FFFFFFF; } if ( v5 != &v17 ) operator delete(v5, v17 + 1); v2 = (unsigned int)v8 >> 31; if ( v18 != &v20 ) operator delete(v18, v20 + 1); return v2; }
operator<: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xb0 MOV R14,RSI MOV R15,RDI CMP qword ptr [RDI + 0x20],0x0 MOV AL,byte ptr [RDI + 0x40] JNZ 0x0015874b CMP qword ptr [R15 + 0x10],0x0 JNZ 0x0015874b TEST AL,AL JNZ 0x0015874b CMP qword ptr [R15 + 0x30],0x0 JZ 0x0015884e LAB_0015874b: LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x00158785 MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x2 JA 0x00158880 MOV RDI,R15 CALL 0x0013d9aa MOVSD qword ptr [RSP + 0x48],XMM0 MOV RDI,R14 CALL 0x0013d9aa UCOMISD XMM0,qword ptr [RSP + 0x48] SETA BL JMP 0x0015883c LAB_00158785: CMP AL,0x3 JNZ 0x00158880 CMP byte ptr [R14 + 0x40],0x3 JNZ 0x00158880 LEA RDI,[RSP + 0x28] MOV RSI,R15 CALL 0x0013f486 LAB_001587a5: LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x0013f486 LAB_001587b2: MOV R15,qword ptr [RSP + 0x30] MOV R14,qword ptr [RSP + 0x8] MOV R12,qword ptr [RSP + 0x10] CMP R12,R15 MOV RDX,R15 CMOVC RDX,R12 TEST RDX,RDX JZ 0x001587e3 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,R14 CALL 0x00118320 MOV EBX,EAX TEST EAX,EAX JNZ 0x00158804 LAB_001587e3: SUB R15,R12 CMP R15,-0x7fffffff MOV RBX,-0x80000000 CMOVGE RBX,R15 MOV EAX,0x7fffffff CMP RBX,RAX CMOVGE RBX,RAX LAB_00158804: LEA RAX,[RSP + 0x18] CMP R14,RAX JZ 0x0015881e MOV RSI,qword ptr [RSP + 0x18] INC RSI MOV RDI,R14 CALL 0x001186a0 LAB_0015881e: SHR EBX,0x1f LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015883c MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0015883c: MOV EAX,EBX ADD RSP,0xb0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0015884e: MOV EDI,0x10 CALL 0x00118360 MOV RBX,RAX LAB_0015885b: LEA RSI,[0x1aa072] MOV RDI,RAX CALL 0x00118270 LAB_0015886a: MOV RSI,qword ptr [0x001dcfe8] MOV RDX,qword ptr [0x001dcf60] MOV RDI,RBX CALL 0x00118b30 LAB_00158880: MOV EDI,0x10 CALL 0x00118360 MOV RBX,RAX LAB_0015888d: LEA RDI,[RSP + 0x50] MOV RSI,R15 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013daf6 LAB_001588a1: LEA RSI,[0x1abd95] LEA RDI,[RSP + 0x90] LEA RDX,[RSP + 0x50] CALL 0x00124de1 LAB_001588ba: LEA RSI,[0x1abdad] LEA RDI,[RSP + 0x90] CALL 0x00118cc0 LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JNZ 0x001588ef MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 JMP 0x001588fc LAB_001588ef: MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX LAB_001588fc: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00158914: LEA RDI,[RSP + 0x70] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013daf6 LAB_00158928: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] CALL 0x00124eb2 MOV BPL,0x1 LAB_0015893f: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001dcfe8] MOV RDX,qword ptr [0x001dcf60] MOV RDI,RBX CALL 0x00118b30
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall minja::Value::operator<(Value *this,Value *param_1) { Value VVar1; double dVar2; uint uVar3; runtime_error *prVar4; long *plVar5; long *plVar6; ulong uVar7; int8 unaff_RBX; long *local_d0; ulong local_c8; long local_c0; long lStack_b8; long *local_b0; ulong local_a8; long local_a0 [2]; double local_90; int1 local_88 [32]; int1 local_68 [32]; char local_48 [32]; VVar1 = this[0x40]; if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) && (*(long *)(this + 0x30) == 0)) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015885b to 00158869 has its CatchHandler @ 00158a57 */ std::runtime_error::runtime_error(prVar4,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001dcfe8,PTR__runtime_error_001dcf60); } if ((byte)((char)VVar1 - 5U) < 3) { if (2 < (byte)((char)param_1[0x40] - 5U)) { LAB_00158880: prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015888d to 001588a0 has its CatchHandler @ 00158a55 */ dump_abi_cxx11_((int)local_88,SUB81(this,0)); /* try { // try from 001588a1 to 001588b9 has its CatchHandler @ 00158a15 */ std::operator+(local_48,(string *)"Cannot compare values: "); /* try { // try from 001588ba to 001588cd has its CatchHandler @ 001589cc */ plVar5 = (long *)std::__cxx11::string::append(local_48); local_d0 = (long *)*plVar5; plVar6 = plVar5 + 2; if (local_d0 == plVar6) { local_c0 = *plVar6; lStack_b8 = plVar5[3]; local_d0 = &local_c0; } else { local_c0 = *plVar6; } local_c8 = plVar5[1]; *plVar5 = (long)plVar6; plVar5[1] = 0; *(int1 *)(plVar5 + 2) = 0; /* try { // try from 00158914 to 00158927 has its CatchHandler @ 001589ad */ dump_abi_cxx11_((int)local_68,SUB81(param_1,0)); /* try { // try from 00158928 to 0015893b has its CatchHandler @ 00158984 */ std::operator+((string *)&local_b0,(string *)&local_d0); /* try { // try from 0015893f to 00158963 has its CatchHandler @ 00158964 */ std::runtime_error::runtime_error(prVar4,(string *)&local_b0); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001dcfe8,PTR__runtime_error_001dcf60); } local_90 = get<double>(this); dVar2 = get<double>(param_1); uVar7 = CONCAT71((int7)((ulong)unaff_RBX >> 8),local_90 < dVar2); goto LAB_0015883c; } if ((VVar1 != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_00158880; get<std::__cxx11::string>(); /* try { // try from 001587a5 to 001587b1 has its CatchHandler @ 00158a35 */ get<std::__cxx11::string>(); uVar7 = local_a8; if (local_c8 < local_a8) { uVar7 = local_c8; } if (uVar7 == 0) { LAB_001587e3: uVar7 = 0xffffffff80000000; if (-0x80000000 < (long)(local_a8 - local_c8)) { uVar7 = local_a8 - local_c8; } if (0x7ffffffe < (long)uVar7) { uVar7 = 0; } } else { uVar3 = memcmp(local_b0,local_d0,uVar7); uVar7 = (ulong)uVar3; if (uVar3 == 0) goto LAB_001587e3; } if (local_d0 != &local_c0) { operator_delete(local_d0,local_c0 + 1); } uVar7 = uVar7 >> 0x1f & 1; if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } LAB_0015883c: return uVar7 & 0xffffffff; }
2,354
JS_LoadModule
bluesky950520[P]quickjs/quickjs.c
JSValue JS_LoadModule(JSContext *ctx, const char *basename, const char *filename) { JSValue promise, resolving_funcs[2]; promise = JS_NewPromiseCapability(ctx, resolving_funcs); if (JS_IsException(promise)) return JS_EXCEPTION; JS_LoadModuleInternal(ctx, basename, filename, (JSValueConst *)resolving_funcs); JS_FreeValue(ctx, resolving_funcs[0]); JS_FreeValue(ctx, resolving_funcs[1]); return promise; }
O2
c
JS_LoadModule: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r15 movq %rsp, %rsi callq 0x2956d movq %rdx, %rbx cmpl $0x6, %ebx jne 0x29521 pushq $0x6 popq %rbx xorl %r14d, %r14d jmp 0x29558 movq %rax, %r14 movq %rsp, %rbp movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %rbp, %rcx callq 0x29577 movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq %r15, %rdi callq 0x1801e movq 0x10(%rbp), %rsi movq 0x18(%rbp), %rdx movq %r15, %rdi callq 0x1801e movq %r14, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_LoadModule: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rdx mov r13, rsi mov r15, rdi mov rsi, rsp call JS_NewPromiseCapability mov rbx, rdx cmp ebx, 6 jnz short loc_29521 push 6 pop rbx xor r14d, r14d jmp short loc_29558 loc_29521: mov r14, rax mov rbp, rsp mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, rbp call JS_LoadModuleInternal mov rsi, [rbp+0] mov rdx, [rbp+8] mov rdi, r15 call JS_FreeValue mov rsi, [rbp+10h] mov rdx, [rbp+18h] mov rdi, r15 call JS_FreeValue loc_29558: mov rax, r14 mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_LoadModule(long long a1, long long a2, long long a3) { long long v4; // rax int v5; // edx long long v6; // r14 long long v8[11]; // [rsp+0h] [rbp-58h] BYREF v4 = JS_NewPromiseCapability(a1, v8); if ( v5 == 6 ) return 0LL; v6 = v4; JS_LoadModuleInternal(a1, a2, a3, v8); JS_FreeValue(a1, v8[0], v8[1]); JS_FreeValue(a1, v8[2], v8[3]); return v6; }
JS_LoadModule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDX MOV R13,RSI MOV R15,RDI MOV RSI,RSP CALL 0x0012956d MOV RBX,RDX CMP EBX,0x6 JNZ 0x00129521 PUSH 0x6 POP RBX XOR R14D,R14D JMP 0x00129558 LAB_00129521: MOV R14,RAX MOV RBP,RSP MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,RBP CALL 0x00129577 MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV RDI,R15 CALL 0x0011801e MOV RSI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + 0x18] MOV RDI,R15 CALL 0x0011801e LAB_00129558: MOV RAX,R14 MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] JS_LoadModule(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int8 local_58; int8 local_50; int8 local_48; int8 local_40; auVar1 = JS_NewPromiseCapability(param_1,&local_58); if (auVar1._8_4_ == 6) { auVar1 = ZEXT816(6) << 0x40; } else { JS_LoadModuleInternal(param_1,param_2,param_3,&local_58); JS_FreeValue(param_1,local_58,local_50); JS_FreeValue(param_1,local_48,local_40); } return auVar1; }
2,355
ma_strmake
eloqsql/libmariadb/libmariadb/ma_string.c
char *ma_strmake(register char *dst, register const char *src, size_t length) { while (length--) if (! (*dst++ = *src++)) return dst-1; *dst=0; return dst; }
O0
c
ma_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 0x3b84b 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 0x3b849 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) jmp 0x3b85a jmp 0x3b800 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
ma_strmake: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx loc_3B800: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rcx cmp rax, 0 jz short loc_3B84B 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_3B849 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax jmp short loc_3B85A loc_3B849: jmp short loc_3B800 loc_3B84B: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_3B85A: mov rax, [rbp+var_8] pop rbp retn
_BYTE * ma_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; }
ma_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_0013b800: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x20],RCX CMP RAX,0x0 JZ 0x0013b84b 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 0x0013b849 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x0013b85a LAB_0013b849: JMP 0x0013b800 LAB_0013b84b: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0013b85a: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * ma_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; }
2,356
ftxui::VerticalContainer::EventHandler(ftxui::Event)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/container.cpp
bool EventHandler(Event event) override { const int old_selected = *selector_; if (event == Event::ArrowUp || event == Event::Character('k')) { MoveSelector(-1); } if (event == Event::ArrowDown || event == Event::Character('j')) { MoveSelector(+1); } if (event == Event::PageUp) { for (int i = 0; i < box_.y_max - box_.y_min; ++i) { MoveSelector(-1); } } if (event == Event::PageDown) { for (int i = 0; i < box_.y_max - box_.y_min; ++i) { MoveSelector(1); } } if (event == Event::Home) { for (size_t i = 0; i < children_.size(); ++i) { MoveSelector(-1); } } if (event == Event::End) { for (size_t i = 0; i < children_.size(); ++i) { MoveSelector(1); } } if (event == Event::Tab) { MoveSelectorWrap(+1); } if (event == Event::TabReverse) { MoveSelectorWrap(-1); } *selector_ = std::max(0, std::min(int(children_.size()) - 1, *selector_)); return old_selected != *selector_; }
O1
cpp
ftxui::VerticalContainer::EventHandler(ftxui::Event): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x30(%rdi), %rax movl (%rax), %r12d leaq 0x3267f(%rip), %rsi # 0x5ab00 movq %r14, %rdi callq 0x288c0 movl %eax, %ebp movb $0x1, %r13b testb %al, %al jne 0x284cc leaq 0x48(%rsp), %r15 movq %r15, %rdi movl $0x6b, %esi callq 0x29850 movq 0x28(%r14), %rdx cmpq 0x28(%r15), %rdx jne 0x284c9 testq %rdx, %rdx je 0x284cc movq 0x68(%rsp), %rsi movq 0x20(%r14), %rdi callq 0xb410 testl %eax, %eax sete %r13b jmp 0x284cc xorl %r13d, %r13d testb %bpl, %bpl jne 0x284ec leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x284ec movq 0x78(%rsp), %rsi incq %rsi callq 0xb400 testb %r13b, %r13b je 0x284fe movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x288ee leaq 0x3263b(%rip), %rsi # 0x5ab40 movq %r14, %rdi callq 0x288c0 movl %eax, %ebp movb $0x1, %r13b testb %al, %al jne 0x28550 leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x6a, %esi callq 0x29850 movq 0x28(%r14), %rdx cmpq 0x28(%r15), %rdx jne 0x2854d testq %rdx, %rdx je 0x28550 movq 0x28(%rsp), %rsi movq 0x20(%r14), %rdi callq 0xb410 testl %eax, %eax sete %r13b jmp 0x28550 xorl %r13d, %r13d testb %bpl, %bpl jne 0x28570 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x28570 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 testb %r13b, %r13b je 0x28582 movq %rbx, %rdi movl $0x1, %esi callq 0x288ee leaq 0x32bf7(%rip), %rsi # 0x5b180 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x285b8 movl 0x44(%rbx), %eax cmpl 0x40(%rbx), %eax jle 0x285b8 xorl %ebp, %ebp movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x288ee incl %ebp movl 0x44(%rbx), %eax subl 0x40(%rbx), %eax cmpl %eax, %ebp jl 0x2859f leaq 0x32c01(%rip), %rsi # 0x5b1c0 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x285ee movl 0x44(%rbx), %eax cmpl 0x40(%rbx), %eax jle 0x285ee xorl %ebp, %ebp movq %rbx, %rdi movl $0x1, %esi callq 0x288ee incl %ebp movl 0x44(%rbx), %eax subl 0x40(%rbx), %eax cmpl %eax, %ebp jl 0x285d5 leaq 0x32b0b(%rip), %rsi # 0x5b100 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x2862f movq 0x10(%rbx), %rax cmpq 0x8(%rbx), %rax je 0x2862f xorl %r15d, %r15d movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x288ee incq %r15 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax sarq $0x4, %rax cmpq %rax, %r15 jb 0x2860e leaq 0x32b0a(%rip), %rsi # 0x5b140 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x28670 movq 0x10(%rbx), %rax cmpq 0x8(%rbx), %rax je 0x28670 xorl %r15d, %r15d movq %rbx, %rdi movl $0x1, %esi callq 0x288ee incq %r15 movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax sarq $0x4, %rax cmpq %rax, %r15 jb 0x2864f leaq 0x32709(%rip), %rsi # 0x5ad80 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x28690 movq %rbx, %rdi movl $0x1, %esi callq 0x28938 leaq 0x32729(%rip), %rsi # 0x5adc0 movq %r14, %rdi callq 0x288c0 testb %al, %al je 0x286b0 movq %rbx, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x28938 movq 0x10(%rbx), %rax movq 0x30(%rbx), %rcx subq 0x8(%rbx), %rax shrq $0x4, %rax decl %eax movl (%rcx), %edx cmpl %eax, %edx cmovll %edx, %eax xorl %edx, %edx testl %eax, %eax cmovgl %eax, %edx movl %edx, (%rcx) cmpl %edx, %r12d setne %al addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5ftxui17VerticalContainer12EventHandlerENS_5EventE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r14, rsi mov rbx, rdi mov rax, [rdi+30h] mov r12d, [rax] lea rsi, _ZN5ftxui5Event7ArrowUpE; ftxui::Event::ArrowUp mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) mov ebp, eax mov r13b, 1 test al, al jnz short loc_284CC lea r15, [rsp+0B8h+var_70] mov rdi, r15; this mov esi, 6Bh ; 'k'; char call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char) mov rdx, [r14+28h] cmp rdx, [r15+28h] jnz short loc_284C9 test rdx, rdx jz short loc_284CC mov rsi, [rsp+0B8h+var_50] mov rdi, [r14+20h] call _bcmp test eax, eax setz r13b jmp short loc_284CC loc_284C9: xor r13d, r13d loc_284CC: test bpl, bpl jnz short loc_284EC lea rax, [rsp+0B8h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_284EC mov rsi, [rsp+0B8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_284EC: test r13b, r13b jz short loc_284FE mov rdi, rbx; this mov esi, 0FFFFFFFFh; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) loc_284FE: lea rsi, _ZN5ftxui5Event9ArrowDownE; ftxui::Event::ArrowDown mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) mov ebp, eax mov r13b, 1 test al, al jnz short loc_28550 lea r15, [rsp+0B8h+var_B0] mov rdi, r15; this mov esi, 6Ah ; 'j'; char call _ZN5ftxui5Event9CharacterEc; ftxui::Event::Character(char) mov rdx, [r14+28h] cmp rdx, [r15+28h] jnz short loc_2854D test rdx, rdx jz short loc_28550 mov rsi, [rsp+0B8h+var_90] mov rdi, [r14+20h] call _bcmp test eax, eax setz r13b jmp short loc_28550 loc_2854D: xor r13d, r13d loc_28550: test bpl, bpl jnz short loc_28570 lea rax, [rsp+0B8h+var_80] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_28570 mov rsi, [rsp+0B8h+var_80] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_28570: test r13b, r13b jz short loc_28582 mov rdi, rbx; this mov esi, 1; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) loc_28582: lea rsi, _ZN5ftxui5Event6PageUpE; ftxui::Event::PageUp mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_285B8 mov eax, [rbx+44h] cmp eax, [rbx+40h] jle short loc_285B8 xor ebp, ebp loc_2859F: mov rdi, rbx; this mov esi, 0FFFFFFFFh; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) inc ebp mov eax, [rbx+44h] sub eax, [rbx+40h] cmp ebp, eax jl short loc_2859F loc_285B8: lea rsi, _ZN5ftxui5Event8PageDownE; ftxui::Event::PageDown mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_285EE mov eax, [rbx+44h] cmp eax, [rbx+40h] jle short loc_285EE xor ebp, ebp loc_285D5: mov rdi, rbx; this mov esi, 1; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) inc ebp mov eax, [rbx+44h] sub eax, [rbx+40h] cmp ebp, eax jl short loc_285D5 loc_285EE: lea rsi, _ZN5ftxui5Event4HomeE; ftxui::Event::Home mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_2862F mov rax, [rbx+10h] cmp rax, [rbx+8] jz short loc_2862F xor r15d, r15d loc_2860E: mov rdi, rbx; this mov esi, 0FFFFFFFFh; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) inc r15 mov rax, [rbx+10h] sub rax, [rbx+8] sar rax, 4 cmp r15, rax jb short loc_2860E loc_2862F: lea rsi, _ZN5ftxui5Event3EndE; ftxui::Event::End mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_28670 mov rax, [rbx+10h] cmp rax, [rbx+8] jz short loc_28670 xor r15d, r15d loc_2864F: mov rdi, rbx; this mov esi, 1; int call _ZN5ftxui13ContainerBase12MoveSelectorEi; ftxui::ContainerBase::MoveSelector(int) inc r15 mov rax, [rbx+10h] sub rax, [rbx+8] sar rax, 4 cmp r15, rax jb short loc_2864F loc_28670: lea rsi, _ZN5ftxui5Event3TabE; ftxui::Event::Tab mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_28690 mov rdi, rbx; this mov esi, 1; int call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int) loc_28690: lea rsi, _ZN5ftxui5Event10TabReverseE; ftxui::Event::TabReverse mov rdi, r14 call _ZNK5ftxui5EventeqERKS0_; ftxui::Event::operator==(ftxui::Event const&) test al, al jz short loc_286B0 mov rdi, rbx; this mov esi, 0FFFFFFFFh; int call _ZN5ftxui13ContainerBase16MoveSelectorWrapEi; ftxui::ContainerBase::MoveSelectorWrap(int) loc_286B0: mov rax, [rbx+10h] mov rcx, [rbx+30h] sub rax, [rbx+8] shr rax, 4 dec eax mov edx, [rcx] cmp edx, eax cmovl eax, edx xor edx, edx test eax, eax cmovg edx, eax mov [rcx], edx cmp r12d, edx setnz al add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ftxui::VerticalContainer::EventHandler(long long a1, long long a2) { int v2; // r12d char v3; // bp bool v4; // r13 long long v5; // rdx char v6; // bp bool v7; // r13 long long v8; // rdx int v9; // ebp int v10; // ebp unsigned long long v11; // r15 unsigned long long v12; // r15 int *v13; // rcx int v14; // eax int v15; // edx _BYTE v17[32]; // [rsp+8h] [rbp-B0h] BYREF long long *v18; // [rsp+28h] [rbp-90h] long long v19; // [rsp+30h] [rbp-88h] long long v20; // [rsp+38h] [rbp-80h] BYREF _BYTE v21[32]; // [rsp+48h] [rbp-70h] BYREF long long *v22; // [rsp+68h] [rbp-50h] long long v23; // [rsp+70h] [rbp-48h] long long v24; // [rsp+78h] [rbp-40h] BYREF v2 = **(_DWORD **)(a1 + 48); v3 = ftxui::Event::operator==(a2, &ftxui::Event::ArrowUp); v4 = 1; if ( !v3 ) { ftxui::Event::Character((ftxui::Event *)v21, 107); v5 = *(_QWORD *)(a2 + 40); if ( v5 == v23 ) { if ( v5 ) v4 = (unsigned int)bcmp(*(_QWORD *)(a2 + 32), v22) == 0; } else { v4 = 0; } } if ( !v3 && v22 != &v24 ) operator delete(v22, v24 + 1); if ( v4 ) ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1); v6 = ftxui::Event::operator==(a2, &ftxui::Event::ArrowDown); v7 = 1; if ( !v6 ) { ftxui::Event::Character((ftxui::Event *)v17, 106); v8 = *(_QWORD *)(a2 + 40); if ( v8 == v19 ) { if ( v8 ) v7 = (unsigned int)bcmp(*(_QWORD *)(a2 + 32), v18) == 0; } else { v7 = 0; } } if ( !v6 && v18 != &v20 ) operator delete(v18, v20 + 1); if ( v7 ) ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1); if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::PageUp) && *(_DWORD *)(a1 + 68) > *(_DWORD *)(a1 + 64) ) { v9 = 0; do { ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1); ++v9; } while ( v9 < *(_DWORD *)(a1 + 68) - *(_DWORD *)(a1 + 64) ); } if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::PageDown) && *(_DWORD *)(a1 + 68) > *(_DWORD *)(a1 + 64) ) { v10 = 0; do { ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1); ++v10; } while ( v10 < *(_DWORD *)(a1 + 68) - *(_DWORD *)(a1 + 64) ); } if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::Home) && *(_QWORD *)(a1 + 16) != *(_QWORD *)(a1 + 8) ) { v11 = 0LL; do { ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, -1); ++v11; } while ( v11 < (long long)(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 4 ); } if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::End) && *(_QWORD *)(a1 + 16) != *(_QWORD *)(a1 + 8) ) { v12 = 0LL; do { ftxui::ContainerBase::MoveSelector((ftxui::ContainerBase *)a1, 1); ++v12; } while ( v12 < (long long)(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 4 ); } if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::Tab) ) ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, 1); if ( (unsigned __int8)ftxui::Event::operator==(a2, &ftxui::Event::TabReverse) ) ftxui::ContainerBase::MoveSelectorWrap((ftxui::ContainerBase *)a1, -1); v13 = *(int **)(a1 + 48); v14 = ((*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 4) - 1; if ( *v13 < v14 ) v14 = *v13; v15 = 0; if ( v14 > 0 ) v15 = v14; *v13 = v15; return v2 != v15; }
EventHandler: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x30] MOV R12D,dword ptr [RAX] LEA RSI,[0x15ab00] MOV RDI,R14 CALL 0x001288c0 MOV EBP,EAX MOV R13B,0x1 TEST AL,AL JNZ 0x001284cc LEA R15,[RSP + 0x48] MOV RDI,R15 MOV ESI,0x6b CALL 0x00129850 MOV RDX,qword ptr [R14 + 0x28] CMP RDX,qword ptr [R15 + 0x28] JNZ 0x001284c9 TEST RDX,RDX JZ 0x001284cc MOV RSI,qword ptr [RSP + 0x68] MOV RDI,qword ptr [R14 + 0x20] CALL 0x0010b410 TEST EAX,EAX SETZ R13B JMP 0x001284cc LAB_001284c9: XOR R13D,R13D LAB_001284cc: TEST BPL,BPL JNZ 0x001284ec LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001284ec MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010b400 LAB_001284ec: TEST R13B,R13B JZ 0x001284fe MOV RDI,RBX MOV ESI,0xffffffff CALL 0x001288ee LAB_001284fe: LEA RSI,[0x15ab40] MOV RDI,R14 CALL 0x001288c0 MOV EBP,EAX MOV R13B,0x1 TEST AL,AL JNZ 0x00128550 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV ESI,0x6a CALL 0x00129850 MOV RDX,qword ptr [R14 + 0x28] CMP RDX,qword ptr [R15 + 0x28] JNZ 0x0012854d TEST RDX,RDX JZ 0x00128550 MOV RSI,qword ptr [RSP + 0x28] MOV RDI,qword ptr [R14 + 0x20] CALL 0x0010b410 TEST EAX,EAX SETZ R13B JMP 0x00128550 LAB_0012854d: XOR R13D,R13D LAB_00128550: TEST BPL,BPL JNZ 0x00128570 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00128570 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010b400 LAB_00128570: TEST R13B,R13B JZ 0x00128582 MOV RDI,RBX MOV ESI,0x1 CALL 0x001288ee LAB_00128582: LEA RSI,[0x15b180] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x001285b8 MOV EAX,dword ptr [RBX + 0x44] CMP EAX,dword ptr [RBX + 0x40] JLE 0x001285b8 XOR EBP,EBP LAB_0012859f: MOV RDI,RBX MOV ESI,0xffffffff CALL 0x001288ee INC EBP MOV EAX,dword ptr [RBX + 0x44] SUB EAX,dword ptr [RBX + 0x40] CMP EBP,EAX JL 0x0012859f LAB_001285b8: LEA RSI,[0x15b1c0] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x001285ee MOV EAX,dword ptr [RBX + 0x44] CMP EAX,dword ptr [RBX + 0x40] JLE 0x001285ee XOR EBP,EBP LAB_001285d5: MOV RDI,RBX MOV ESI,0x1 CALL 0x001288ee INC EBP MOV EAX,dword ptr [RBX + 0x44] SUB EAX,dword ptr [RBX + 0x40] CMP EBP,EAX JL 0x001285d5 LAB_001285ee: LEA RSI,[0x15b100] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x0012862f MOV RAX,qword ptr [RBX + 0x10] CMP RAX,qword ptr [RBX + 0x8] JZ 0x0012862f XOR R15D,R15D LAB_0012860e: MOV RDI,RBX MOV ESI,0xffffffff CALL 0x001288ee INC R15 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SAR RAX,0x4 CMP R15,RAX JC 0x0012860e LAB_0012862f: LEA RSI,[0x15b140] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x00128670 MOV RAX,qword ptr [RBX + 0x10] CMP RAX,qword ptr [RBX + 0x8] JZ 0x00128670 XOR R15D,R15D LAB_0012864f: MOV RDI,RBX MOV ESI,0x1 CALL 0x001288ee INC R15 MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SAR RAX,0x4 CMP R15,RAX JC 0x0012864f LAB_00128670: LEA RSI,[0x15ad80] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x00128690 MOV RDI,RBX MOV ESI,0x1 CALL 0x00128938 LAB_00128690: LEA RSI,[0x15adc0] MOV RDI,R14 CALL 0x001288c0 TEST AL,AL JZ 0x001286b0 MOV RDI,RBX MOV ESI,0xffffffff CALL 0x00128938 LAB_001286b0: MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBX + 0x30] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x4 DEC EAX MOV EDX,dword ptr [RCX] CMP EDX,EAX CMOVL EAX,EDX XOR EDX,EDX TEST EAX,EAX CMOVG EDX,EAX MOV dword ptr [RCX],EDX CMP R12D,EDX SETNZ AL ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::VerticalContainer::EventHandler(ftxui::Event) */ int4 __thiscall ftxui::VerticalContainer::EventHandler(VerticalContainer *this,Event *param_2) { int iVar1; size_t sVar2; char cVar3; int iVar4; int iVar5; ulong uVar6; bool bVar7; Event local_b0 [32]; long *local_90; size_t local_88; long local_80 [2]; Event local_70 [32]; long *local_50; size_t local_48; long local_40 [2]; iVar1 = **(int **)(this + 0x30); cVar3 = Event::operator==(param_2,(Event *)Event::ArrowUp); bVar7 = true; if (cVar3 == '\0') { Event::Character(local_70,'k'); sVar2 = *(size_t *)(param_2 + 0x28); if (sVar2 == local_48) { if (sVar2 != 0) { iVar4 = bcmp(*(void **)(param_2 + 0x20),local_50,sVar2); bVar7 = iVar4 == 0; } } else { bVar7 = false; } } if ((cVar3 == '\0') && (local_50 != local_40)) { operator_delete(local_50,local_40[0] + 1); } if (bVar7) { ContainerBase::MoveSelector((ContainerBase *)this,-1); } cVar3 = Event::operator==(param_2,(Event *)Event::ArrowDown); bVar7 = true; if (cVar3 == '\0') { Event::Character(local_b0,'j'); sVar2 = *(size_t *)(param_2 + 0x28); if (sVar2 == local_88) { if (sVar2 != 0) { iVar4 = bcmp(*(void **)(param_2 + 0x20),local_90,sVar2); bVar7 = iVar4 == 0; } } else { bVar7 = false; } } if ((cVar3 == '\0') && (local_90 != local_80)) { operator_delete(local_90,local_80[0] + 1); } if (bVar7) { ContainerBase::MoveSelector((ContainerBase *)this,1); } cVar3 = Event::operator==(param_2,(Event *)Event::PageUp); if ((cVar3 != '\0') && (*(int *)(this + 0x40) < *(int *)(this + 0x44))) { iVar4 = 0; do { ContainerBase::MoveSelector((ContainerBase *)this,-1); iVar4 = iVar4 + 1; } while (iVar4 < *(int *)(this + 0x44) - *(int *)(this + 0x40)); } cVar3 = Event::operator==(param_2,(Event *)Event::PageDown); if ((cVar3 != '\0') && (*(int *)(this + 0x40) < *(int *)(this + 0x44))) { iVar4 = 0; do { ContainerBase::MoveSelector((ContainerBase *)this,1); iVar4 = iVar4 + 1; } while (iVar4 < *(int *)(this + 0x44) - *(int *)(this + 0x40)); } cVar3 = Event::operator==(param_2,(Event *)Event::Home); if ((cVar3 != '\0') && (*(long *)(this + 0x10) != *(long *)(this + 8))) { uVar6 = 0; do { ContainerBase::MoveSelector((ContainerBase *)this,-1); uVar6 = uVar6 + 1; } while (uVar6 < (ulong)(*(long *)(this + 0x10) - *(long *)(this + 8) >> 4)); } cVar3 = Event::operator==(param_2,(Event *)Event::End); if ((cVar3 != '\0') && (*(long *)(this + 0x10) != *(long *)(this + 8))) { uVar6 = 0; do { ContainerBase::MoveSelector((ContainerBase *)this,1); uVar6 = uVar6 + 1; } while (uVar6 < (ulong)(*(long *)(this + 0x10) - *(long *)(this + 8) >> 4)); } cVar3 = Event::operator==(param_2,(Event *)Event::Tab); if (cVar3 != '\0') { ContainerBase::MoveSelectorWrap((ContainerBase *)this,1); } cVar3 = Event::operator==(param_2,(Event *)Event::TabReverse); if (cVar3 != '\0') { ContainerBase::MoveSelectorWrap((ContainerBase *)this,-1); } iVar5 = (int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 4) + -1; iVar4 = **(int **)(this + 0x30); if (iVar4 < iVar5) { iVar5 = iVar4; } iVar4 = 0; if (0 < iVar5) { iVar4 = iVar5; } **(int **)(this + 0x30) = iVar4; return CONCAT31((int3)((uint)iVar5 >> 8),iVar1 != iVar4); }
2,357
STDDefaultRNG::randn(unsigned int)
7CodeWizard[P]stablediffusion/rng.hpp
std::vector<float> randn(uint32_t n) { std::vector<float> result; float mean = 0.0; float stddev = 1.0; std::normal_distribution<float> distribution(mean, stddev); for (uint32_t i = 0; i < n; i++) { float random_number = distribution(generator); result.push_back(random_number); } return result; }
O0
cpp
STDDefaultRNG::randn(unsigned int): subq $0x68, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movl %edx, 0x54(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x18(%rsp) movb $0x0, 0x53(%rsp) callq 0x3e3e0 movl $0x0, 0x4c(%rsp) movl $0x3f800000, 0x48(%rsp) # imm = 0x3F800000 movss 0x4c(%rsp), %xmm0 movss 0x48(%rsp), %xmm1 leaq 0x38(%rsp), %rdi callq 0x41f30 jmp 0x41d8b movl $0x0, 0x28(%rsp) movl 0x28(%rsp), %eax cmpl 0x54(%rsp), %eax jae 0x41dfe movq 0x18(%rsp), %rsi addq $0x8, %rsi leaq 0x38(%rsp), %rdi callq 0x41f80 movss %xmm0, 0x4(%rsp) jmp 0x41db8 movq 0x8(%rsp), %rdi movss 0x4(%rsp), %xmm0 movss %xmm0, 0x24(%rsp) leaq 0x24(%rsp), %rsi callq 0x41fb0 jmp 0x41dd5 jmp 0x41dd7 movl 0x28(%rsp), %eax addl $0x1, %eax movl %eax, 0x28(%rsp) jmp 0x41d93 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) callq 0x3e280 jmp 0x41e1e movb $0x1, 0x53(%rsp) testb $0x1, 0x53(%rsp) jne 0x41e14 movq 0x8(%rsp), %rdi callq 0x3e280 movq 0x10(%rsp), %rax addq $0x68, %rsp retq movq 0x30(%rsp), %rdi callq 0xbd30 nopl (%rax,%rax)
_ZN13STDDefaultRNG5randnEj: sub rsp, 68h mov [rsp+68h+var_60], rdi mov rax, rdi mov [rsp+68h+var_58], rax mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_14], edx mov rax, [rsp+68h+var_10] mov [rsp+68h+var_50], rax mov [rsp+68h+var_15], 0 call _ZNSt6vectorIfSaIfEEC2Ev; std::vector<float>::vector(void) mov [rsp+68h+var_1C], 0 mov [rsp+68h+var_20], 3F800000h movss xmm0, [rsp+68h+var_1C] movss xmm1, [rsp+68h+var_20] lea rdi, [rsp+68h+var_30] call _ZNSt19normal_distributionIfEC2Eff; std::normal_distribution<float>::normal_distribution(float,float) jmp short $+2 loc_41D8B: mov [rsp+68h+var_40], 0 loc_41D93: mov eax, [rsp+68h+var_40] cmp eax, [rsp+68h+var_14] jnb short loc_41DFE mov rsi, [rsp+68h+var_50] add rsi, 8 lea rdi, [rsp+68h+var_30] call _ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_; std::normal_distribution<float>::operator()<std::linear_congruential_engine<ulong,16807ul,0ul,2147483647ul>>(std::linear_congruential_engine<ulong,16807ul,0ul,2147483647ul> &) movss [rsp+68h+var_64], xmm0 jmp short $+2 loc_41DB8: mov rdi, [rsp+68h+var_60] movss xmm0, [rsp+68h+var_64] movss [rsp+68h+var_44], xmm0 lea rsi, [rsp+68h+var_44] call _ZNSt6vectorIfSaIfEE9push_backERKf; std::vector<float>::push_back(float const&) jmp short $+2 loc_41DD5: jmp short $+2 loc_41DD7: mov eax, [rsp+68h+var_40] add eax, 1 mov [rsp+68h+var_40], eax jmp short loc_41D93 mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() jmp short loc_41E1E loc_41DFE: mov [rsp+68h+var_15], 1 test [rsp+68h+var_15], 1 jnz short loc_41E14 mov rdi, [rsp+68h+var_60] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() loc_41E14: mov rax, [rsp+68h+var_58] add rsp, 68h retn loc_41E1E: mov rdi, [rsp+arg_28] call __Unwind_Resume
STDDefaultRNG * STDDefaultRNG::randn(STDDefaultRNG *this, long long a2, unsigned int a3) { float v4; // [rsp+24h] [rbp-44h] BYREF unsigned int i; // [rsp+28h] [rbp-40h] _BYTE v6[16]; // [rsp+38h] [rbp-30h] BYREF int v7; // [rsp+48h] [rbp-20h] int v8; // [rsp+4Ch] [rbp-1Ch] char v9; // [rsp+53h] [rbp-15h] unsigned int v10; // [rsp+54h] [rbp-14h] long long v11; // [rsp+58h] [rbp-10h] STDDefaultRNG *v12; // [rsp+60h] [rbp-8h] v12 = this; v11 = a2; v10 = a3; v9 = 0; std::vector<float>::vector((long long)this); v8 = 0; v7 = 1065353216; std::normal_distribution<float>::normal_distribution(v6, 0.0, 1.0); for ( i = 0; i < v10; ++i ) { v4 = std::normal_distribution<float>::operator()<std::linear_congruential_engine<unsigned long,16807ul,0ul,2147483647ul>>( v6, a2 + 8); std::vector<float>::push_back(this, &v4); } return this; }
randn: SUB RSP,0x68 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV dword ptr [RSP + 0x54],EDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x18],RAX MOV byte ptr [RSP + 0x53],0x0 CALL 0x0013e3e0 MOV dword ptr [RSP + 0x4c],0x0 MOV dword ptr [RSP + 0x48],0x3f800000 MOVSS XMM0,dword ptr [RSP + 0x4c] MOVSS XMM1,dword ptr [RSP + 0x48] LAB_00141d7f: LEA RDI,[RSP + 0x38] CALL 0x00141f30 JMP 0x00141d8b LAB_00141d8b: MOV dword ptr [RSP + 0x28],0x0 LAB_00141d93: MOV EAX,dword ptr [RSP + 0x28] CMP EAX,dword ptr [RSP + 0x54] JNC 0x00141dfe MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0x8 LEA RDI,[RSP + 0x38] CALL 0x00141f80 MOVSS dword ptr [RSP + 0x4],XMM0 JMP 0x00141db8 LAB_00141db8: MOV RDI,qword ptr [RSP + 0x8] MOVSS XMM0,dword ptr [RSP + 0x4] MOVSS dword ptr [RSP + 0x24],XMM0 LEA RSI,[RSP + 0x24] CALL 0x00141fb0 LAB_00141dd3: JMP 0x00141dd5 LAB_00141dd5: JMP 0x00141dd7 LAB_00141dd7: MOV EAX,dword ptr [RSP + 0x28] ADD EAX,0x1 MOV dword ptr [RSP + 0x28],EAX JMP 0x00141d93 LAB_00141dfe: MOV byte ptr [RSP + 0x53],0x1 TEST byte ptr [RSP + 0x53],0x1 JNZ 0x00141e14 MOV RDI,qword ptr [RSP + 0x8] CALL 0x0013e280 LAB_00141e14: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x68 RET
/* WARNING: Removing unreachable block (ram,0x00141e0a) */ /* STDDefaultRNG::randn(unsigned int) */ vector<float,std::allocator<float>> * STDDefaultRNG::randn(uint param_1) { uint in_EDX; long in_RSI; int4 in_register_0000003c; vector<float,std::allocator<float>> *this; float local_44; uint local_40; normal_distribution<float> local_30 [16]; int4 local_20; int4 local_1c; int1 local_15; uint local_14; vector<float,std::allocator<float>> *local_8; this = (vector<float,std::allocator<float>> *)CONCAT44(in_register_0000003c,param_1); local_15 = 0; local_14 = in_EDX; local_8 = this; std::vector<float,std::allocator<float>>::vector(this); local_1c = 0; local_20 = 0x3f800000; /* try { // try from 00141d7f to 00141dd2 has its CatchHandler @ 00141de4 */ std::normal_distribution<float>::normal_distribution(local_30,0.0,1.0); for (local_40 = 0; local_40 < local_14; local_40 = local_40 + 1) { local_44 = std::normal_distribution<float>::operator() (local_30,(linear_congruential_engine *)(in_RSI + 8)); std::vector<float,std::allocator<float>>::push_back(this,&local_44); } return this; }
2,358
STDDefaultRNG::randn(unsigned int)
7CodeWizard[P]stablediffusion/rng.hpp
std::vector<float> randn(uint32_t n) { std::vector<float> result; float mean = 0.0; float stddev = 1.0; std::normal_distribution<float> distribution(mean, stddev); for (uint32_t i = 0; i < n; i++) { float random_number = distribution(generator); result.push_back(random_number); } return result; }
O3
cpp
STDDefaultRNG::randn(unsigned int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movsd 0x85395(%rip), %xmm0 # 0xbc9b0 movsd %xmm0, 0x10(%rsp) movl $0x0, 0x18(%rsp) movb $0x0, 0x1c(%rsp) testl %edx, %edx je 0x37680 movl %edx, %ebp movq %rsi, %r14 addq $0x8, %r14 leaq 0x10(%rsp), %r15 leaq 0xc(%rsp), %r12 movq %r15, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x376b0 movss %xmm0, 0xc(%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x37671 movss %xmm0, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x3767c movq %rbx, %rdi movq %r12, %rdx callq 0x378e4 decl %ebp jne 0x37645 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x376a7 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0xa5d0 movq %r14, %rdi callq 0xaad0 nop
_ZN13STDDefaultRNG5randnEj: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 movsd xmm0, cs:qword_BC9B0 movsd [rsp+48h+var_38], xmm0 mov [rsp+48h+var_30], 0 mov [rsp+48h+var_2C], 0 test edx, edx jz short loc_37680 mov ebp, edx mov r14, rsi add r14, 8 lea r15, [rsp+48h+var_38] lea r12, [rsp+48h+var_3C] loc_37645: mov rdi, r15 mov rsi, r14 mov rdx, r15 call _ZNSt19normal_distributionIfEclISt26linear_congruential_engineImLm16807ELm0ELm2147483647EEEEfRT_RKNS0_10param_typeE; std::normal_distribution<float>::operator()<std::linear_congruential_engine<ulong,16807ul,0ul,2147483647ul>>(std::linear_congruential_engine<ulong,16807ul,0ul,2147483647ul> &,std::normal_distribution<float>::param_type const&) movss [rsp+48h+var_3C], xmm0 mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_37671 movss dword ptr [rsi], xmm0 add rsi, 4 mov [rbx+8], rsi jmp short loc_3767C loc_37671: mov rdi, rbx mov rdx, r12 call _ZNSt6vectorIfSaIfEE17_M_realloc_insertIJRKfEEEvN9__gnu_cxx17__normal_iteratorIPfS1_EEDpOT_; std::vector<float>::_M_realloc_insert<float const&>(__gnu_cxx::__normal_iterator<float *,std::vector<float>>,float const&) loc_3767C: dec ebp jnz short loc_37645 loc_37680: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_376A7 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_376A7: mov rdi, r14 call __Unwind_Resume
STDDefaultRNG * STDDefaultRNG::randn(STDDefaultRNG *this, long long a2, int a3) { int v3; // ebp long long v4; // r14 float v5; // xmm0_4 float *v6; // rsi float v8; // [rsp+Ch] [rbp-3Ch] BYREF long long v9; // [rsp+10h] [rbp-38h] BYREF int v10; // [rsp+18h] [rbp-30h] char v11; // [rsp+1Ch] [rbp-2Ch] *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; v9 = 0x3F80000000000000LL; v10 = 0; v11 = 0; if ( a3 ) { v3 = a3; v4 = a2 + 8; do { v5 = std::normal_distribution<float>::operator()<std::linear_congruential_engine<unsigned long,16807ul,0ul,2147483647ul>>( &v9, v4, &v9); v8 = v5; v6 = (float *)*((_QWORD *)this + 1); if ( v6 == *((float **)this + 2) ) { std::vector<float>::_M_realloc_insert<float const&>(this, v6, &v8); } else { *v6 = v5; *((_QWORD *)this + 1) = v6 + 1; } --v3; } while ( v3 ); } return this; }
2,359
ma_hashtbl_next
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
void *ma_hashtbl_next(MA_HASHTBL *hash,const uchar *key,uint length) { MA_HASHTBL_LINK *pos; uint idx; if (hash->current_record != NO_RECORD) { MA_HASHTBL_LINK *data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); for (idx=data[hash->current_record].next; idx != NO_RECORD ; idx=pos->next) { pos=data+idx; if (!hashcmp(hash,pos,key,length)) { hash->current_record= idx; return pos->data; } } hash->current_record=NO_RECORD; } return 0; }
O3
c
ma_hashtbl_next: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, -0x2c(%rbp) movl 0x10(%rdi), %r13d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r13 je 0x329a9 movq %rsi, %r15 movq %rdi, %rbx movq 0x18(%rdi), %r12 shlq $0x4, %r13 addq %r12, %r13 movl (%r13), %r14d movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x329a2 movq %r14, %rax shlq $0x4, %rax leaq (%r12,%rax), %r13 movq 0x8(%r12,%rax), %rsi movq %rbx, %rdi movq %r15, %rdx movl -0x2c(%rbp), %ecx callq 0x32856 testl %eax, %eax jne 0x32968 movl %r14d, 0x10(%rbx) movq 0x8(%r13), %rax jmp 0x329ab movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_hashtbl_next: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_2C], edx mov r13d, [rdi+10h] mov eax, 0FFFFFFFFh cmp r13, rax jz short loc_329A9 mov r15, rsi mov rbx, rdi mov r12, [rdi+18h] shl r13, 4 add r13, r12 loc_32968: mov r14d, [r13+0] mov eax, 0FFFFFFFFh cmp r14, rax jz short loc_329A2 mov rax, r14 shl rax, 4 lea r13, [r12+rax] mov rsi, [r12+rax+8] mov rdi, rbx mov rdx, r15 mov ecx, [rbp+var_2C] call hashcmp test eax, eax jnz short loc_32968 mov [rbx+10h], r14d mov rax, [r13+8] jmp short loc_329AB loc_329A2: mov dword ptr [rbx+10h], 0FFFFFFFFh loc_329A9: xor eax, eax loc_329AB: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_hashtbl_next(long long a1, long long a2, int a3) { long long v3; // r13 long long v4; // r12 unsigned int *v5; // r13 long long v6; // r14 v3 = *(unsigned int *)(a1 + 16); if ( v3 != 0xFFFFFFFFLL ) { v4 = *(_QWORD *)(a1 + 24); v5 = (unsigned int *)(v4 + 16 * v3); while ( 1 ) { v6 = *v5; if ( v6 == 0xFFFFFFFFLL ) break; v5 = (unsigned int *)(v4 + 16 * v6); if ( !hashcmp((unsigned int *)a1, *((_QWORD *)v5 + 1), a2, a3) ) { *(_DWORD *)(a1 + 16) = v6; return *((_QWORD *)v5 + 1); } } *(_DWORD *)(a1 + 16) = -1; } return 0LL; }
ma_hashtbl_next: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV dword ptr [RBP + -0x2c],EDX MOV R13D,dword ptr [RDI + 0x10] MOV EAX,0xffffffff CMP R13,RAX JZ 0x001329a9 MOV R15,RSI MOV RBX,RDI MOV R12,qword ptr [RDI + 0x18] SHL R13,0x4 ADD R13,R12 LAB_00132968: MOV R14D,dword ptr [R13] MOV EAX,0xffffffff CMP R14,RAX JZ 0x001329a2 MOV RAX,R14 SHL RAX,0x4 LEA R13,[R12 + RAX*0x1] MOV RSI,qword ptr [R12 + RAX*0x1 + 0x8] MOV RDI,RBX MOV RDX,R15 MOV ECX,dword ptr [RBP + -0x2c] CALL 0x00132856 TEST EAX,EAX JNZ 0x00132968 MOV dword ptr [RBX + 0x10],R14D MOV RAX,qword ptr [R13 + 0x8] JMP 0x001329ab LAB_001329a2: MOV dword ptr [RBX + 0x10],0xffffffff LAB_001329a9: XOR EAX,EAX LAB_001329ab: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 ma_hashtbl_next(long param_1,int8 param_2,int4 param_3) { uint uVar1; long lVar2; int iVar3; long lVar4; int8 uVar5; uint *puVar6; if ((ulong)*(uint *)(param_1 + 0x10) == 0xffffffff) { LAB_001329a9: uVar5 = 0; } else { lVar2 = *(long *)(param_1 + 0x18); puVar6 = (uint *)((ulong)*(uint *)(param_1 + 0x10) * 0x10 + lVar2); do { uVar1 = *puVar6; if ((ulong)uVar1 == 0xffffffff) { *(int4 *)(param_1 + 0x10) = 0xffffffff; goto LAB_001329a9; } lVar4 = (ulong)uVar1 * 0x10; puVar6 = (uint *)(lVar2 + lVar4); iVar3 = hashcmp(param_1,*(int8 *)(lVar2 + 8 + lVar4),param_2,param_3); } while (iVar3 != 0); *(uint *)(param_1 + 0x10) = uVar1; uVar5 = *(int8 *)(puVar6 + 2); } return uVar5; }
2,360
FloatOptional_less_than_with_undefined_Test::~FloatOptional_less_than_with_undefined_Test()
yoga-mod/tests/FloatOptionalTest.cpp
TEST(FloatOptional, less_than_with_undefined) { ASSERT_FALSE(empty < empty); ASSERT_FALSE(zero < empty); ASSERT_FALSE(one < empty); ASSERT_FALSE(positive < empty); ASSERT_FALSE(negative < empty); ASSERT_FALSE(empty < zero); ASSERT_FALSE(empty < one); ASSERT_FALSE(empty < positive); ASSERT_FALSE(empty < negative); }
O0
cpp
FloatOptional_less_than_with_undefined_Test::~FloatOptional_less_than_with_undefined_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xa92d0 movq -0x10(%rbp), %rdi movl $0x10, %esi callq 0x354d0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN43FloatOptional_less_than_with_undefined_TestD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN43FloatOptional_less_than_with_undefined_TestD2Ev; FloatOptional_less_than_with_undefined_Test::~FloatOptional_less_than_with_undefined_Test() mov rdi, [rbp+var_10]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void FloatOptional_less_than_with_undefined_Test::~FloatOptional_less_than_with_undefined_Test( FloatOptional_less_than_with_undefined_Test *this) { FloatOptional_less_than_with_undefined_Test::~FloatOptional_less_than_with_undefined_Test(this); operator delete(this, 0x10uLL); }
~FloatOptional_less_than_with_undefined_Test: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x001a92d0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x10 CALL 0x001354d0 ADD RSP,0x10 POP RBP RET
/* FloatOptional_less_than_with_int_Test::~FloatOptional_less_than_with_int_Test() */ void __thiscall FloatOptional_less_than_with_int_Test::~FloatOptional_less_than_with_int_Test (FloatOptional_less_than_with_int_Test *this) { ~FloatOptional_less_than_with_int_Test(this); operator_delete(this,0x10); return; }
2,361
trnman_collect_transactions
eloqsql/storage/maria/trnman.c
my_bool trnman_collect_transactions(LEX_STRING *str_act, LEX_STRING *str_com, LSN *min_rec_lsn, LSN *min_first_undo_lsn) { my_bool error; TRN *trn; char *ptr; uint stored_transactions= 0; LSN minimum_rec_lsn= LSN_MAX, minimum_first_undo_lsn= LSN_MAX; DBUG_ENTER("trnman_collect_transactions"); DBUG_ASSERT((NULL == str_act->str) && (NULL == str_com->str)); /* validate the use of read_non_atomic() in general: */ compile_time_assert((sizeof(LSN) == 8) && (sizeof(LSN_WITH_FLAGS) == 8)); mysql_mutex_lock(&LOCK_trn_list); str_act->length= 2 + /* number of active transactions */ LSN_STORE_SIZE + /* minimum of their rec_lsn */ TRANSID_SIZE + /* current TrID generator value */ (2 + /* short id */ 6 + /* long id */ LSN_STORE_SIZE + /* undo_lsn */ #ifdef MARIA_VERSIONING /* not enabled yet */ LSN_STORE_SIZE + /* undo_purge_lsn */ #endif LSN_STORE_SIZE /* first_undo_lsn */ ) * trnman_active_transactions; str_com->length= 4 + /* number of committed transactions */ (6 + /* long id */ #ifdef MARIA_VERSIONING /* not enabled yet */ LSN_STORE_SIZE + /* undo_purge_lsn */ #endif LSN_STORE_SIZE /* first_undo_lsn */ ) * trnman_committed_transactions; if ((NULL == (str_act->str= my_malloc(PSI_INSTRUMENT_ME, str_act->length, MYF(MY_WME)))) || (NULL == (str_com->str= my_malloc(PSI_INSTRUMENT_ME, str_com->length, MYF(MY_WME))))) goto err; /* First, the active transactions */ ptr= str_act->str + 2 + LSN_STORE_SIZE; transid_store(ptr, global_trid_generator); ptr+= TRANSID_SIZE; for (trn= active_list_min.next; trn != &active_list_max; trn= trn->next) { uint sid; LSN rec_lsn, undo_lsn, first_undo_lsn; mysql_mutex_lock(&trn->state_lock); sid= trn->short_id; mysql_mutex_unlock(&trn->state_lock); if (sid == 0) { /* Not even inited, has done nothing. Or it is the dummy_transaction_object, which does only non-transactional immediate-sync operations (CREATE/DROP/RENAME/REPAIR TABLE), and so can be forgotten for Checkpoint. */ continue; } /* needed for low-water mark calculation */ if (((rec_lsn= lsn_read_non_atomic(trn->rec_lsn)) > 0) && (cmp_translog_addr(rec_lsn, minimum_rec_lsn) < 0)) minimum_rec_lsn= rec_lsn; /* If trn has not logged LOGREC_LONG_TRANSACTION_ID, this trn will be discovered when seeing that log record which is for sure located after checkpoint_start_log_horizon. */ if ((LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn) & TRANSACTION_LOGGED_LONG_ID) == 0) continue; /* On the other hand, if undo_lsn is LSN_IMPOSSIBLE, trn may later log records; so we must include trn in the checkpoint now, because we cannot count on LOGREC_LONG_TRANSACTION_ID (as we are already past it). */ undo_lsn= trn->undo_lsn; stored_transactions++; int2store(ptr, sid); ptr+= 2; int6store(ptr, trn->trid); ptr+= 6; lsn_store(ptr, undo_lsn); /* needed for rollback */ ptr+= LSN_STORE_SIZE; /* needed for low-water mark calculation */ if (((first_undo_lsn= lsn_read_non_atomic(trn->first_undo_lsn)) > 0) && (cmp_translog_addr(first_undo_lsn, minimum_first_undo_lsn) < 0)) minimum_first_undo_lsn= first_undo_lsn; lsn_store(ptr, first_undo_lsn); ptr+= LSN_STORE_SIZE; #ifdef MARIA_VERSIONING /* not enabled yet */ /* to know where purging should start (last delete of this trn) */ lsn_store(ptr, trn->undo_purge_lsn); ptr+= LSN_STORE_SIZE; #endif /** @todo RECOVERY: add a comment explaining why we can dirtily read some vars, inspired by the text of "assumption 8" in WL#3072 */ } str_act->length= ptr - str_act->str; /* as we maybe over-estimated */ ptr= str_act->str; DBUG_PRINT("info",("collected %u active transactions", (uint)stored_transactions)); int2store(ptr, stored_transactions); ptr+= 2; /* this LSN influences how REDOs for any page can be ignored by Recovery */ lsn_store(ptr, minimum_rec_lsn); /* one day there will also be a list of prepared transactions */ /* do the same for committed ones */ ptr= str_com->str; int4store(ptr, trnman_committed_transactions); ptr+= 4; DBUG_PRINT("info",("collected %u committed transactions", (uint)trnman_committed_transactions)); for (trn= committed_list_min.next; trn != &committed_list_max; trn= trn->next) { LSN first_undo_lsn; int6store(ptr, trn->trid); ptr+= 6; #ifdef MARIA_VERSIONING /* not enabled yet */ lsn_store(ptr, trn->undo_purge_lsn); ptr+= LSN_STORE_SIZE; #endif first_undo_lsn= LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn); if (cmp_translog_addr(first_undo_lsn, minimum_first_undo_lsn) < 0) minimum_first_undo_lsn= first_undo_lsn; lsn_store(ptr, first_undo_lsn); ptr+= LSN_STORE_SIZE; } /* TODO: if we see there exists no transaction (active and committed) we can tell the lock-free structures to do some freeing (my_free()). */ error= 0; *min_rec_lsn= minimum_rec_lsn; *min_first_undo_lsn= minimum_first_undo_lsn; goto end; err: error= 1; end: mysql_mutex_unlock(&LOCK_trn_list); DBUG_RETURN(error); }
O3
c
trnman_collect_transactions: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 cmpq $0x0, 0xb9e698(%rip) # 0xbff350 jne 0x60fe5 leaq 0xb9e64b(%rip), %rdi # 0xbff310 callq 0x29200 movl 0xb9e558(%rip), %eax # 0xbff228 leal (%rax,%rax,4), %ecx leal (%rax,%rcx,4), %ecx addl %ecx, %eax addl $0xf, %eax movq %rax, 0x8(%r12) movl 0xb9e546(%rip), %eax # 0xbff22c leal (%rax,%rax,2), %ecx leal 0x4(%rax,%rcx,4), %eax movq %rax, 0x8(%r15) movq 0x8(%r12), %rsi movl $0x10, %edx xorl %edi, %edi callq 0x9fd41 movq %rax, (%r12) movb $0x1, %r13b testq %rax, %rax je 0x60fbb movq 0x8(%r15), %rsi movl $0x10, %edx xorl %edi, %edi callq 0x9fd41 movq %rax, (%r15) testq %rax, %rax je 0x60fbb movq %r15, -0x50(%rbp) movq %r14, -0x40(%rbp) movq %rbx, -0x58(%rbp) movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF movq %r12, -0x48(%rbp) movq (%r12), %rdx movq 0xb9e4ed(%rip), %rax # 0xbff240 movl %eax, 0x9(%rdx) shrq $0x20, %rax movw %ax, 0xd(%rdx) addq $0xf, %rdx movq %rdx, -0x38(%rbp) movq 0xb9e263(%rip), %r12 # 0xbfefd0 leaq 0xb9e2a4(%rip), %rax # 0xbff018 cmpq %rax, %r12 je 0x60edc movl $0x0, -0x2c(%rbp) movq %rcx, %rbx movq %rcx, %r14 leaq 0x10(%r12), %r13 cmpq $0x0, 0x50(%r12) jne 0x60eae movq %r13, %rdi callq 0x29200 movzwl 0xac(%r12), %r15d movq 0x50(%r12), %rdi testq %rdi, %rdi jne 0x60ec7 movq %r13, %rdi callq 0x291c0 testw %r15w, %r15w je 0x60e91 movq 0x90(%r12), %rcx movabsq $0xffffffffffffff, %rsi # imm = 0xFFFFFFFFFFFFFF andq %rsi, %rcx cmpq %r14, %rcx movq %r14, %rax cmovlq %rcx, %rax testq %rcx, %rcx cmoveq %r14, %rax cmpq $0x0, 0xa0(%r12) jns 0x60e94 movq 0x98(%r12), %rcx incl -0x2c(%rbp) movq -0x38(%rbp), %rdi movw %r15w, (%rdi) movl 0x78(%r12), %edx movl %edx, 0x2(%rdi) movzwl 0x7c(%r12), %edx movw %dx, 0x6(%rdi) movq %rcx, %rdx shrq $0x20, %rdx movb %dl, 0x8(%rdi) movq %rcx, %rdx shrq $0x28, %rdx movb %dl, 0x9(%rdi) movq %rcx, %rdx shrq $0x30, %rdx movb %dl, 0xa(%rdi) movl %ecx, 0xb(%rdi) movq 0xa0(%r12), %rcx movq %rcx, %rdx andq %rsi, %rdx cmpq %rbx, %rdx movq %rbx, %rsi cmovlq %rdx, %rsi testq %rdx, %rdx cmovneq %rsi, %rbx movq %rcx, %rdx shrq $0x20, %rdx movb %dl, 0xf(%rdi) movq %rcx, %rdx shrq $0x28, %rdx movb %dl, 0x10(%rdi) movq %rcx, %rdx shrq $0x30, %rdx movb %dl, 0x11(%rdi) movl %ecx, 0x12(%rdi) addq $0x16, %rdi movq %rdi, -0x38(%rbp) jmp 0x60e94 movq %r14, %rax movq 0x68(%r12), %r12 movq %rax, %r14 leaq 0xb9e175(%rip), %rcx # 0xbff018 cmpq %rcx, %r12 jne 0x60d8a jmp 0x60ee9 movq %r13, %rdi leaq 0x79848(%rip), %rsi # 0xda700 movl $0x2e0, %edx # imm = 0x2E0 callq 0x2eb6f jmp 0x60da3 leaq 0x325142(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x60dba movl $0x0, -0x2c(%rbp) movq %rcx, %rbx movq %rcx, %rax movq -0x48(%rbp), %rdx movq (%rdx), %rcx movq -0x38(%rbp), %rsi subq %rcx, %rsi movq %rsi, 0x8(%rdx) movl -0x2c(%rbp), %edx movw %dx, (%rcx) movq %rax, %rdx shrq $0x20, %rdx movb %dl, 0x2(%rcx) movq %rax, %rdx shrq $0x28, %rdx movb %dl, 0x3(%rcx) movq %rax, %rdx shrq $0x30, %rdx movb %dl, 0x4(%rcx) movl %eax, 0x5(%rcx) movq -0x50(%rbp), %rcx movq (%rcx), %rcx movl 0xb9e2fd(%rip), %edx # 0xbff22c movl %edx, (%rcx) movq 0xb9e2a8(%rip), %rdx # 0xbff1e0 leaq 0xb9e189(%rip), %rsi # 0xbff0c8 cmpq %rsi, %rdx je 0x60faa addq $0x4, %rcx movq -0x40(%rbp), %r9 movabsq $0xffffffffffffff, %r10 # imm = 0xFFFFFFFFFFFFFF movl 0x78(%rdx), %edi movl %edi, (%rcx) movzwl 0x7c(%rdx), %edi movw %di, 0x4(%rcx) movq 0xa0(%rdx), %rdi movq %rdi, %r8 andq %r10, %r8 cmpq %rbx, %r8 cmovlq %r8, %rbx movq %rdi, %r8 shrq $0x20, %r8 movb %r8b, 0x6(%rcx) movq %rdi, %r8 shrq $0x28, %r8 movb %r8b, 0x7(%rcx) movq %rdi, %r8 shrq $0x30, %r8 movb %r8b, 0x8(%rcx) movl %edi, 0x9(%rcx) addq $0xd, %rcx movq 0x68(%rdx), %rdx cmpq %rsi, %rdx jne 0x60f56 jmp 0x60fae movq -0x40(%rbp), %r9 movq %rax, (%r9) movq -0x58(%rbp), %rax movq %rbx, (%rax) xorl %r13d, %r13d movq 0xb9e38e(%rip), %rdi # 0xbff350 testq %rdi, %rdi jne 0x60fef leaq 0xb9e342(%rip), %rdi # 0xbff310 callq 0x291c0 movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2cfb9 jmp 0x60cca leaq 0x32501a(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x60fc7
trnman_collect_transactions: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, rcx mov r14, rdx mov r15, rsi mov r12, rdi cmp cs:qword_BFF350, 0 jnz loc_60FE5 lea rdi, LOCK_trn_list call _pthread_mutex_lock loc_60CCA: mov eax, cs:trnman_active_transactions lea ecx, [rax+rax*4] lea ecx, [rax+rcx*4] add eax, ecx add eax, 0Fh mov [r12+8], rax mov eax, cs:trnman_committed_transactions lea ecx, [rax+rax*2] lea eax, [rax+rcx*4+4] mov [r15+8], rax mov rsi, [r12+8] mov edx, 10h xor edi, edi call my_malloc mov [r12], rax mov r13b, 1 test rax, rax jz loc_60FBB mov rsi, [r15+8] mov edx, 10h xor edi, edi call my_malloc mov [r15], rax test rax, rax jz loc_60FBB mov [rbp+var_50], r15 mov [rbp+var_40], r14 mov [rbp+var_58], rbx mov rcx, 0FFFFFFFFFFFFFFh mov [rbp+var_48], r12 mov rdx, [r12] mov rax, cs:global_trid_generator mov [rdx+9], eax shr rax, 20h mov [rdx+0Dh], ax add rdx, 0Fh mov [rbp+var_38], rdx mov r12, cs:qword_BFEFD0 lea rax, active_list_max cmp r12, rax jz loc_60EDC mov [rbp+var_2C], 0 mov rbx, rcx mov r14, rcx loc_60D8A: lea r13, [r12+10h] cmp qword ptr [r12+50h], 0 jnz loc_60EAE mov rdi, r13 call _pthread_mutex_lock loc_60DA3: movzx r15d, word ptr [r12+0ACh] mov rdi, [r12+50h] test rdi, rdi jnz loc_60EC7 loc_60DBA: mov rdi, r13 call _pthread_mutex_unlock test r15w, r15w jz loc_60E91 mov rcx, [r12+90h] mov rsi, 0FFFFFFFFFFFFFFh and rcx, rsi cmp rcx, r14 mov rax, r14 cmovl rax, rcx test rcx, rcx cmovz rax, r14 cmp qword ptr [r12+0A0h], 0 jns loc_60E94 mov rcx, [r12+98h] inc [rbp+var_2C] mov rdi, [rbp+var_38] mov [rdi], r15w mov edx, [r12+78h] mov [rdi+2], edx movzx edx, word ptr [r12+7Ch] mov [rdi+6], dx mov rdx, rcx shr rdx, 20h mov [rdi+8], dl mov rdx, rcx shr rdx, 28h mov [rdi+9], dl mov rdx, rcx shr rdx, 30h mov [rdi+0Ah], dl mov [rdi+0Bh], ecx mov rcx, [r12+0A0h] mov rdx, rcx and rdx, rsi cmp rdx, rbx mov rsi, rbx cmovl rsi, rdx test rdx, rdx cmovnz rbx, rsi mov rdx, rcx shr rdx, 20h mov [rdi+0Fh], dl mov rdx, rcx shr rdx, 28h mov [rdi+10h], dl mov rdx, rcx shr rdx, 30h mov [rdi+11h], dl mov [rdi+12h], ecx add rdi, 16h mov [rbp+var_38], rdi jmp short loc_60E94 loc_60E91: mov rax, r14 loc_60E94: mov r12, [r12+68h] mov r14, rax lea rcx, active_list_max cmp r12, rcx jnz loc_60D8A jmp short loc_60EE9 loc_60EAE: mov rdi, r13 lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 2E0h call psi_mutex_lock jmp loc_60DA3 loc_60EC7: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_60DBA loc_60EDC: mov [rbp+var_2C], 0 mov rbx, rcx mov rax, rcx loc_60EE9: mov rdx, [rbp+var_48] mov rcx, [rdx] mov rsi, [rbp+var_38] sub rsi, rcx mov [rdx+8], rsi mov edx, [rbp+var_2C] mov [rcx], dx mov rdx, rax shr rdx, 20h mov [rcx+2], dl mov rdx, rax shr rdx, 28h mov [rcx+3], dl mov rdx, rax shr rdx, 30h mov [rcx+4], dl mov [rcx+5], eax mov rcx, [rbp+var_50] mov rcx, [rcx] mov edx, cs:trnman_committed_transactions mov [rcx], edx mov rdx, cs:qword_BFF1E0 lea rsi, committed_list_max cmp rdx, rsi jz short loc_60FAA add rcx, 4 mov r9, [rbp+var_40] mov r10, 0FFFFFFFFFFFFFFh loc_60F56: mov edi, [rdx+78h] mov [rcx], edi movzx edi, word ptr [rdx+7Ch] mov [rcx+4], di mov rdi, [rdx+0A0h] mov r8, rdi and r8, r10 cmp r8, rbx cmovl rbx, r8 mov r8, rdi shr r8, 20h mov [rcx+6], r8b mov r8, rdi shr r8, 28h mov [rcx+7], r8b mov r8, rdi shr r8, 30h mov [rcx+8], r8b mov [rcx+9], edi add rcx, 0Dh mov rdx, [rdx+68h] cmp rdx, rsi jnz short loc_60F56 jmp short loc_60FAE loc_60FAA: mov r9, [rbp+var_40] loc_60FAE: mov [r9], rax mov rax, [rbp+var_58] mov [rax], rbx xor r13d, r13d loc_60FBB: mov rdi, cs:qword_BFF350 test rdi, rdi jnz short loc_60FEF loc_60FC7: lea rdi, LOCK_trn_list call _pthread_mutex_unlock mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_60FE5: call trnman_collect_transactions_cold_1 jmp loc_60CCA loc_60FEF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_60FC7
long long trnman_collect_transactions(long long *a1, long long *a2, long long *a3, long long *a4) { unsigned int v4; // r13d long long v7; // rax long long v8; // rax long long v9; // rdx __int16 v10; // rax^4 long long v11; // r12 long long v12; // rbx long long v13; // r14 __int16 v14; // r15 long long v15; // rcx long long v16; // rax long long v17; // rcx long long v18; // rcx long long v19; // rsi long long v20; // rcx _DWORD *v21; // rcx long long v22; // rdx _DWORD *v23; // rcx long long *v24; // r9 long long v25; // rdi long long *v27; // [rsp+8h] [rbp-58h] long long *v29; // [rsp+20h] [rbp-40h] long long v30; // [rsp+28h] [rbp-38h] __int16 v31; // [rsp+34h] [rbp-2Ch] if ( qword_BFF350 ) trnman_collect_transactions_cold_1(); else pthread_mutex_lock(&LOCK_trn_list); a1[1] = (unsigned int)(22 * trnman_active_transactions + 15); a2[1] = (unsigned int)(13 * trnman_committed_transactions + 4); v7 = my_malloc(0LL, a1[1], 16LL); *a1 = v7; LOBYTE(v4) = 1; if ( v7 ) { v8 = my_malloc(0LL, a2[1], 16LL); *a2 = v8; if ( v8 ) { v29 = a3; v27 = a4; v9 = *a1; v10 = WORD2(global_trid_generator); *(_DWORD *)(v9 + 9) = global_trid_generator; *(_WORD *)(v9 + 13) = v10; v30 = v9 + 15; v11 = qword_BFEFD0; if ( (_UNKNOWN *)qword_BFEFD0 == &active_list_max ) { v31 = 0; v12 = 0xFFFFFFFFFFFFFFLL; v16 = 0xFFFFFFFFFFFFFFLL; } else { v31 = 0; v12 = 0xFFFFFFFFFFFFFFLL; v13 = 0xFFFFFFFFFFFFFFLL; do { if ( *(_QWORD *)(v11 + 80) ) psi_mutex_lock(v11 + 16, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x2E0u); else pthread_mutex_lock(v11 + 16); v14 = *(_WORD *)(v11 + 172); if ( *(_QWORD *)(v11 + 80) ) PSI_server[44](); pthread_mutex_unlock(v11 + 16); if ( v14 ) { v15 = *(_QWORD *)(v11 + 144) & 0xFFFFFFFFFFFFFFLL; v16 = v13; if ( v15 < v13 ) v16 = *(_QWORD *)(v11 + 144) & 0xFFFFFFFFFFFFFFLL; if ( !v15 ) v16 = v13; if ( *(long long *)(v11 + 160) < 0 ) { v17 = *(_QWORD *)(v11 + 152); ++v31; *(_WORD *)v30 = v14; *(_DWORD *)(v30 + 2) = *(_DWORD *)(v11 + 120); *(_WORD *)(v30 + 6) = *(_WORD *)(v11 + 124); *(_BYTE *)(v30 + 8) = BYTE4(v17); *(_BYTE *)(v30 + 9) = BYTE5(v17); *(_BYTE *)(v30 + 10) = BYTE6(v17); *(_DWORD *)(v30 + 11) = v17; v18 = *(_QWORD *)(v11 + 160); v19 = v12; if ( (v18 & 0xFFFFFFFFFFFFFFLL) < v12 ) v19 = *(_QWORD *)(v11 + 160) & 0xFFFFFFFFFFFFFFLL; if ( (v18 & 0xFFFFFFFFFFFFFFLL) != 0 ) v12 = v19; *(_BYTE *)(v30 + 15) = BYTE4(v18); *(_BYTE *)(v30 + 16) = BYTE5(v18); *(_BYTE *)(v30 + 17) = BYTE6(v18); *(_DWORD *)(v30 + 18) = v18; v30 += 22LL; } } else { v16 = v13; } v11 = *(_QWORD *)(v11 + 104); v13 = v16; } while ( (_UNKNOWN *)v11 != &active_list_max ); } v20 = *a1; a1[1] = v30 - *a1; *(_WORD *)v20 = v31; *(_BYTE *)(v20 + 2) = BYTE4(v16); *(_BYTE *)(v20 + 3) = BYTE5(v16); *(_BYTE *)(v20 + 4) = BYTE6(v16); *(_DWORD *)(v20 + 5) = v16; v21 = (_DWORD *)*a2; *(_DWORD *)*a2 = trnman_committed_transactions; v22 = qword_BFF1E0; if ( (_UNKNOWN *)qword_BFF1E0 == &committed_list_max ) { v24 = v29; } else { v23 = v21 + 1; v24 = v29; do { *v23 = *(_DWORD *)(v22 + 120); *((_WORD *)v23 + 2) = *(_WORD *)(v22 + 124); v25 = *(_QWORD *)(v22 + 160); if ( (v25 & 0xFFFFFFFFFFFFFFLL) < v12 ) v12 = *(_QWORD *)(v22 + 160) & 0xFFFFFFFFFFFFFFLL; *((_BYTE *)v23 + 6) = BYTE4(v25); *((_BYTE *)v23 + 7) = BYTE5(v25); *((_BYTE *)v23 + 8) = BYTE6(v25); *(_DWORD *)((char *)v23 + 9) = v25; v23 = (_DWORD *)((char *)v23 + 13); v22 = *(_QWORD *)(v22 + 104); } while ( (_UNKNOWN *)v22 != &committed_list_max ); } *v24 = v16; *v27 = v12; v4 = 0; } } if ( qword_BFF350 ) PSI_server[44](); pthread_mutex_unlock(&LOCK_trn_list); return v4; }
trnman_collect_transactions: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R12,RDI CMP qword ptr [0x00cff350],0x0 JNZ 0x00160fe5 LEA RDI,[0xcff310] CALL 0x00129200 LAB_00160cca: MOV EAX,dword ptr [0x00cff228] LEA ECX,[RAX + RAX*0x4] LEA ECX,[RAX + RCX*0x4] ADD EAX,ECX ADD EAX,0xf MOV qword ptr [R12 + 0x8],RAX MOV EAX,dword ptr [0x00cff22c] LEA ECX,[RAX + RAX*0x2] LEA EAX,[RAX + RCX*0x4 + 0x4] MOV qword ptr [R15 + 0x8],RAX MOV RSI,qword ptr [R12 + 0x8] MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fd41 MOV qword ptr [R12],RAX MOV R13B,0x1 TEST RAX,RAX JZ 0x00160fbb MOV RSI,qword ptr [R15 + 0x8] MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fd41 MOV qword ptr [R15],RAX TEST RAX,RAX JZ 0x00160fbb MOV qword ptr [RBP + -0x50],R15 MOV qword ptr [RBP + -0x40],R14 MOV qword ptr [RBP + -0x58],RBX MOV RCX,0xffffffffffffff MOV qword ptr [RBP + -0x48],R12 MOV RDX,qword ptr [R12] MOV RAX,qword ptr [0x00cff240] MOV dword ptr [RDX + 0x9],EAX SHR RAX,0x20 MOV word ptr [RDX + 0xd],AX ADD RDX,0xf MOV qword ptr [RBP + -0x38],RDX MOV R12,qword ptr [0x00cfefd0] LEA RAX,[0xcff018] CMP R12,RAX JZ 0x00160edc MOV dword ptr [RBP + -0x2c],0x0 MOV RBX,RCX MOV R14,RCX LAB_00160d8a: LEA R13,[R12 + 0x10] CMP qword ptr [R12 + 0x50],0x0 JNZ 0x00160eae MOV RDI,R13 CALL 0x00129200 LAB_00160da3: MOVZX R15D,word ptr [R12 + 0xac] MOV RDI,qword ptr [R12 + 0x50] TEST RDI,RDI JNZ 0x00160ec7 LAB_00160dba: MOV RDI,R13 CALL 0x001291c0 TEST R15W,R15W JZ 0x00160e91 MOV RCX,qword ptr [R12 + 0x90] MOV RSI,0xffffffffffffff AND RCX,RSI CMP RCX,R14 MOV RAX,R14 CMOVL RAX,RCX TEST RCX,RCX CMOVZ RAX,R14 CMP qword ptr [R12 + 0xa0],0x0 JNS 0x00160e94 MOV RCX,qword ptr [R12 + 0x98] INC dword ptr [RBP + -0x2c] MOV RDI,qword ptr [RBP + -0x38] MOV word ptr [RDI],R15W MOV EDX,dword ptr [R12 + 0x78] MOV dword ptr [RDI + 0x2],EDX MOVZX EDX,word ptr [R12 + 0x7c] MOV word ptr [RDI + 0x6],DX MOV RDX,RCX SHR RDX,0x20 MOV byte ptr [RDI + 0x8],DL MOV RDX,RCX SHR RDX,0x28 MOV byte ptr [RDI + 0x9],DL MOV RDX,RCX SHR RDX,0x30 MOV byte ptr [RDI + 0xa],DL MOV dword ptr [RDI + 0xb],ECX MOV RCX,qword ptr [R12 + 0xa0] MOV RDX,RCX AND RDX,RSI CMP RDX,RBX MOV RSI,RBX CMOVL RSI,RDX TEST RDX,RDX CMOVNZ RBX,RSI MOV RDX,RCX SHR RDX,0x20 MOV byte ptr [RDI + 0xf],DL MOV RDX,RCX SHR RDX,0x28 MOV byte ptr [RDI + 0x10],DL MOV RDX,RCX SHR RDX,0x30 MOV byte ptr [RDI + 0x11],DL MOV dword ptr [RDI + 0x12],ECX ADD RDI,0x16 MOV qword ptr [RBP + -0x38],RDI JMP 0x00160e94 LAB_00160e91: MOV RAX,R14 LAB_00160e94: MOV R12,qword ptr [R12 + 0x68] MOV R14,RAX LEA RCX,[0xcff018] CMP R12,RCX JNZ 0x00160d8a JMP 0x00160ee9 LAB_00160eae: MOV RDI,R13 LEA RSI,[0x1da700] MOV EDX,0x2e0 CALL 0x0012eb6f JMP 0x00160da3 LAB_00160ec7: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00160dba LAB_00160edc: MOV dword ptr [RBP + -0x2c],0x0 MOV RBX,RCX MOV RAX,RCX LAB_00160ee9: MOV RDX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RDX] MOV RSI,qword ptr [RBP + -0x38] SUB RSI,RCX MOV qword ptr [RDX + 0x8],RSI MOV EDX,dword ptr [RBP + -0x2c] MOV word ptr [RCX],DX MOV RDX,RAX SHR RDX,0x20 MOV byte ptr [RCX + 0x2],DL MOV RDX,RAX SHR RDX,0x28 MOV byte ptr [RCX + 0x3],DL MOV RDX,RAX SHR RDX,0x30 MOV byte ptr [RCX + 0x4],DL MOV dword ptr [RCX + 0x5],EAX MOV RCX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [0x00cff22c] MOV dword ptr [RCX],EDX MOV RDX,qword ptr [0x00cff1e0] LEA RSI,[0xcff0c8] CMP RDX,RSI JZ 0x00160faa ADD RCX,0x4 MOV R9,qword ptr [RBP + -0x40] MOV R10,0xffffffffffffff LAB_00160f56: MOV EDI,dword ptr [RDX + 0x78] MOV dword ptr [RCX],EDI MOVZX EDI,word ptr [RDX + 0x7c] MOV word ptr [RCX + 0x4],DI MOV RDI,qword ptr [RDX + 0xa0] MOV R8,RDI AND R8,R10 CMP R8,RBX CMOVL RBX,R8 MOV R8,RDI SHR R8,0x20 MOV byte ptr [RCX + 0x6],R8B MOV R8,RDI SHR R8,0x28 MOV byte ptr [RCX + 0x7],R8B MOV R8,RDI SHR R8,0x30 MOV byte ptr [RCX + 0x8],R8B MOV dword ptr [RCX + 0x9],EDI ADD RCX,0xd MOV RDX,qword ptr [RDX + 0x68] CMP RDX,RSI JNZ 0x00160f56 JMP 0x00160fae LAB_00160faa: MOV R9,qword ptr [RBP + -0x40] LAB_00160fae: MOV qword ptr [R9],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RBX XOR R13D,R13D LAB_00160fbb: MOV RDI,qword ptr [0x00cff350] TEST RDI,RDI JNZ 0x00160fef LAB_00160fc7: LEA RDI,[0xcff310] CALL 0x001291c0 MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00160fe5: CALL 0x0012cfb9 JMP 0x00160cca LAB_00160fef: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00160fc7
ulong trnman_collect_transactions(long *param_1,long *param_2,ulong *param_3,ulong *param_4) { pthread_mutex_t *__mutex; short sVar1; int8 uVar2; short *psVar3; long lVar4; ulong uVar5; ulong uVar6; int *piVar7; ulong uVar8; int1 *puVar9; ulong uVar10; int8 unaff_R13; ulong uVar11; short *local_40; short local_34; if (LOCK_trn_list._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list); } else { trnman_collect_transactions_cold_1(); } param_1[1] = (ulong)(trnman_active_transactions * 0x16 + 0xf); param_2[1] = (ulong)(trnman_committed_transactions * 0xd + 4); lVar4 = my_malloc(0,param_1[1],0x10); *param_1 = lVar4; uVar11 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1); if (lVar4 != 0) { lVar4 = my_malloc(0,param_2[1],0x10); *param_2 = lVar4; uVar2 = global_trid_generator; if (lVar4 != 0) { lVar4 = *param_1; *(int *)(lVar4 + 9) = (int)global_trid_generator; *(short *)(lVar4 + 0xd) = (short)((ulong)uVar2 >> 0x20); local_40 = (short *)(lVar4 + 0xf); if ((int1 *)active_list_min._104_8_ == active_list_max) { local_34 = 0; uVar10 = 0xffffffffffffff; uVar11 = 0xffffffffffffff; } else { local_34 = 0; uVar10 = 0xffffffffffffff; uVar11 = 0xffffffffffffff; puVar9 = (int1 *)active_list_min._104_8_; do { __mutex = (pthread_mutex_t *)(puVar9 + 0x10); if (*(long *)(puVar9 + 0x50) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c" ,0x2e0); } sVar1 = *(short *)(puVar9 + 0xac); if (*(long *)(puVar9 + 0x50) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); if (sVar1 != 0) { uVar6 = *(ulong *)(puVar9 + 0x90) & 0xffffffffffffff; uVar5 = uVar11; if (uVar6 < uVar11) { uVar5 = uVar6; } if (uVar6 == 0) { uVar5 = uVar11; } uVar11 = uVar5; if (*(long *)(puVar9 + 0xa0) < 0) { uVar2 = *(int8 *)(puVar9 + 0x98); local_34 = local_34 + 1; *local_40 = sVar1; *(int4 *)(local_40 + 1) = *(int4 *)(puVar9 + 0x78); local_40[3] = *(short *)(puVar9 + 0x7c); *(char *)(local_40 + 4) = (char)((ulong)uVar2 >> 0x20); *(char *)((long)local_40 + 9) = (char)((ulong)uVar2 >> 0x28); *(char *)(local_40 + 5) = (char)((ulong)uVar2 >> 0x30); *(int *)((long)local_40 + 0xb) = (int)uVar2; uVar5 = *(ulong *)(puVar9 + 0xa0); uVar8 = uVar5 & 0xffffffffffffff; uVar6 = uVar10; if (uVar8 < uVar10) { uVar6 = uVar8; } if (uVar8 != 0) { uVar10 = uVar6; } *(char *)((long)local_40 + 0xf) = (char)(uVar5 >> 0x20); *(char *)(local_40 + 8) = (char)(uVar5 >> 0x28); *(char *)((long)local_40 + 0x11) = (char)(uVar5 >> 0x30); *(int *)(local_40 + 9) = (int)uVar5; local_40 = local_40 + 0xb; } } puVar9 = *(int1 **)(puVar9 + 0x68); } while (puVar9 != active_list_max); } psVar3 = (short *)*param_1; param_1[1] = (long)local_40 - (long)psVar3; *psVar3 = local_34; *(char *)(psVar3 + 1) = (char)(uVar11 >> 0x20); *(char *)((long)psVar3 + 3) = (char)(uVar11 >> 0x28); *(char *)(psVar3 + 2) = (char)(uVar11 >> 0x30); *(int *)((long)psVar3 + 5) = (int)uVar11; piVar7 = (int *)*param_2; *piVar7 = trnman_committed_transactions; if ((int1 *)committed_list_min._104_8_ != committed_list_max) { piVar7 = piVar7 + 1; puVar9 = (int1 *)committed_list_min._104_8_; do { *piVar7 = *(int *)(puVar9 + 0x78); *(int2 *)(piVar7 + 1) = *(int2 *)(puVar9 + 0x7c); uVar5 = *(ulong *)(puVar9 + 0xa0); if ((uVar5 & 0xffffffffffffff) < uVar10) { uVar10 = uVar5 & 0xffffffffffffff; } *(char *)((long)piVar7 + 6) = (char)(uVar5 >> 0x20); *(char *)((long)piVar7 + 7) = (char)(uVar5 >> 0x28); *(char *)(piVar7 + 2) = (char)(uVar5 >> 0x30); *(int *)((long)piVar7 + 9) = (int)uVar5; piVar7 = (int *)((long)piVar7 + 0xd); puVar9 = *(int1 **)(puVar9 + 0x68); } while (puVar9 != committed_list_max); } *param_3 = uVar11; *param_4 = uVar10; uVar11 = 0; } } if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list); return uVar11 & 0xffffffff; }
2,362
options_add_initcommand
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void options_add_initcommand(struct st_mysql_options *options, const char *init_cmd) { char *insert= strdup(init_cmd); if (!options->init_command) { options->init_command= (DYNAMIC_ARRAY*)malloc(sizeof(DYNAMIC_ARRAY)); ma_init_dynamic_array(options->init_command, sizeof(char*), 5, 5); } if (ma_insert_dynamic(options->init_command, (gptr)&insert)) free(insert); }
O0
c
options_add_initcommand: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x137a0 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x28876 movl $0x18, %edi callq 0x135b0 movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi movl $0x8, %esi movl $0x5, %ecx movl %ecx, %edx callq 0x4a890 movq -0x8(%rbp), %rax movq 0x48(%rax), %rdi leaq -0x18(%rbp), %rsi callq 0x4a970 cmpb $0x0, %al je 0x28894 movq -0x18(%rbp), %rdi callq 0x13520 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
options_add_initcommand: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _strdup mov [rbp+var_18], rax mov rax, [rbp+var_8] cmp qword ptr [rax+48h], 0 jnz short loc_28876 mov edi, 18h call _malloc mov rcx, rax mov rax, [rbp+var_8] mov [rax+48h], rcx mov rax, [rbp+var_8] mov rdi, [rax+48h] mov esi, 8 mov ecx, 5 mov edx, ecx call ma_init_dynamic_array loc_28876: mov rax, [rbp+var_8] mov rdi, [rax+48h] lea rsi, [rbp+var_18] call ma_insert_dynamic cmp al, 0 jz short loc_28894 mov rdi, [rbp+var_18] call _free loc_28894: add rsp, 20h pop rbp retn
long long options_add_initcommand(long long a1, long long a2) { long long result; // rax _QWORD v3[2]; // [rsp+8h] [rbp-18h] BYREF long long v4; // [rsp+18h] [rbp-8h] v4 = a1; v3[1] = a2; v3[0] = strdup(a2); if ( !*(_QWORD *)(a1 + 72) ) { *(_QWORD *)(v4 + 72) = malloc(24LL); ma_init_dynamic_array(*(_QWORD *)(v4 + 72), 8LL, 5LL); } result = ma_insert_dynamic(*(_QWORD *)(v4 + 72), v3); if ( (_BYTE)result ) return free(v3[0]); return result; }
options_add_initcommand: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x001137a0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x00128876 MOV EDI,0x18 CALL 0x001135b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x8 MOV ECX,0x5 MOV EDX,ECX CALL 0x0014a890 LAB_00128876: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x48] LEA RSI,[RBP + -0x18] CALL 0x0014a970 CMP AL,0x0 JZ 0x00128894 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113520 LAB_00128894: ADD RSP,0x20 POP RBP RET
void options_add_initcommand(long param_1,char *param_2) { char cVar1; void *pvVar2; char *local_20; char *local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = strdup(param_2); if (*(long *)(local_10 + 0x48) == 0) { pvVar2 = malloc(0x18); *(void **)(local_10 + 0x48) = pvVar2; ma_init_dynamic_array(*(int8 *)(local_10 + 0x48),8,5); } cVar1 = ma_insert_dynamic(*(int8 *)(local_10 + 0x48),&local_20); if (cVar1 != '\0') { free(local_20); } return; }
2,363
my_b_cache_write_r
eloqsql/mysys/mf_iocache.c
static int _my_b_cache_write_r(IO_CACHE *info, const uchar *Buffer, size_t Count) { my_off_t old_pos_in_file= info->pos_in_file; int res= _my_b_cache_write(info, Buffer, Count); if (res) return res; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); DBUG_ASSERT(info->share); copy_to_read_buffer(info, Buffer, old_pos_in_file); return 0; }
O0
c
my_b_cache_write_r: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xe3ec0 movl %eax, -0x2c(%rbp) cmpl $0x0, -0x2c(%rbp) je 0xe29f1 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xe2a11 jmp 0xe29f3 jmp 0xe29f5 jmp 0xe29f7 jmp 0xe29f9 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0xe4480 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_my_b_cache_write_r: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_cache_write mov [rbp+var_2C], eax cmp [rbp+var_2C], 0 jz short loc_E29F1 mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_E2A11 loc_E29F1: jmp short $+2 loc_E29F3: jmp short $+2 loc_E29F5: jmp short $+2 loc_E29F7: jmp short $+2 loc_E29F9: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] call copy_to_read_buffer mov [rbp+var_4], 0 loc_E2A11: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_b_cache_write_r(long long *a1, long long a2, long long a3) { unsigned int v4; // [rsp+4h] [rbp-2Ch] long long v5; // [rsp+8h] [rbp-28h] v5 = *a1; v4 = my_b_cache_write(a1, a2, a3); if ( v4 ) { return v4; } else { copy_to_read_buffer(a1, a2, v5); return 0; } }
_my_b_cache_write_r: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e3ec0 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001e29f1 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x001e2a11 LAB_001e29f1: JMP 0x001e29f3 LAB_001e29f3: JMP 0x001e29f5 LAB_001e29f5: JMP 0x001e29f7 LAB_001e29f7: JMP 0x001e29f9 LAB_001e29f9: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001e4480 MOV dword ptr [RBP + -0x4],0x0 LAB_001e2a11: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int _my_b_cache_write_r(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; int4 local_c; uVar1 = *param_1; local_c = _my_b_cache_write(param_1,param_2,param_3); if (local_c == 0) { copy_to_read_buffer(param_1,param_2,uVar1); local_c = 0; } return local_c; }
2,364
httplib::Response::set_content_provider(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)>, std::function<void (bool)>)
hkr04[P]cpp-mcp/common/httplib.h
inline void Response::set_content_provider( size_t in_length, const std::string &content_type, ContentProvider provider, ContentProviderResourceReleaser resource_releaser) { set_header("Content-Type", content_type); content_length_ = in_length; if (in_length > 0) { content_provider_ = std::move(provider); } content_provider_resource_releaser_ = std::move(resource_releaser); is_chunked_content_provider_ = false; }
O0
c
httplib::Response::set_content_provider(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)>, std::function<void (bool)>): subq $0x88, %rsp movq %rcx, 0x8(%rsp) movq %r8, 0x10(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movq %r8, 0x60(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x3f(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xce50 movq 0x20(%rsp), %rdx leaq 0xc5364(%rip), %rsi # 0xe3fb9 leaq 0x40(%rsp), %rdi callq 0x12660 jmp 0x1ec61 movq 0x18(%rsp), %rdi movq 0x70(%rsp), %rdx leaq 0x40(%rsp), %rsi callq 0x1d330 jmp 0x1ec77 leaq 0x40(%rsp), %rdi callq 0xcfd0 leaq 0x3f(%rsp), %rdi callq 0xc950 movq 0x18(%rsp), %rax movq 0x78(%rsp), %rcx movq %rcx, 0xc0(%rax) cmpq $0x0, 0x78(%rsp) jbe 0x1ecf0 movq 0x8(%rsp), %rsi movq 0x18(%rsp), %rdi addq $0xc8, %rdi callq 0x6bb60 jmp 0x1ecf0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x1ece4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x40(%rsp), %rdi callq 0xcfd0 leaq 0x3f(%rsp), %rdi callq 0xc950 jmp 0x1ed1a movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi addq $0xe8, %rdi callq 0x6bbb0 movq 0x18(%rsp), %rax movb $0x0, 0x108(%rax) addq $0x88, %rsp retq movq 0x30(%rsp), %rdi callq 0xce40 nopw %cs:(%rax,%rax) nop
_ZN7httplib8Response20set_content_providerEmRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFbmmRNS_8DataSinkEEES9_IFvbEE: sub rsp, 88h mov [rsp+88h+var_80], rcx mov [rsp+88h+var_78], r8 mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_20], rcx mov [rsp+88h+var_28], r8 mov rax, [rsp+88h+var_8] mov [rsp+88h+var_70], rax lea rdi, [rsp+88h+var_49] mov [rsp+88h+var_68], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+88h+var_68] lea rsi, aContentType; "Content-Type" lea rdi, [rsp+88h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1EC61: mov rdi, [rsp+88h+var_70] mov rdx, [rsp+88h+var_18] lea rsi, [rsp+88h+var_48] call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&) jmp short $+2 loc_1EC77: lea rdi, [rsp+88h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+88h+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+88h+var_70] mov rcx, [rsp+88h+var_10] mov [rax+0C0h], rcx cmp [rsp+88h+var_10], 0 jbe short loc_1ECF0 mov rsi, [rsp+88h+var_80] mov rdi, [rsp+88h+var_70] add rdi, 0C8h call _ZNSt8functionIFbmmRN7httplib8DataSinkEEEaSEOS4_; std::function<bool ()(ulong,ulong,httplib::DataSink &)>::operator=(std::function<bool ()(ulong,ulong,httplib::DataSink &)>&&) jmp short loc_1ECF0 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_1ECE4 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1ECE4: lea rdi, [rsp+arg_37] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_1ED1A loc_1ECF0: mov rdi, [rsp+88h+var_70] mov rsi, [rsp+88h+var_78] add rdi, 0E8h call _ZNSt8functionIFvbEEaSEOS1_; std::function<void ()(bool)>::operator=(std::function<void ()(bool)>&&) mov rax, [rsp+88h+var_70] mov byte ptr [rax+108h], 0 add rsp, 88h retn loc_1ED1A: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long httplib::Response::set_content_provider(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax char v8; // [rsp+3Fh] [rbp-49h] BYREF _BYTE v9[32]; // [rsp+40h] [rbp-48h] BYREF long long v10; // [rsp+60h] [rbp-28h] long long v11; // [rsp+68h] [rbp-20h] long long v12; // [rsp+70h] [rbp-18h] long long v13; // [rsp+78h] [rbp-10h] long long v14; // [rsp+80h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = a5; std::allocator<char>::allocator(&v8, a2); std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"Content-Type", (long long)&v8); httplib::Response::set_header(a1, (long long)v9, v12); std::string::~string(v9); std::allocator<char>::~allocator(&v8); *(_QWORD *)(a1 + 192) = v13; if ( v13 ) std::function<bool ()(unsigned long,unsigned long,httplib::DataSink &)>::operator=(a1 + 200, a4); std::function<void ()(bool)>::operator=(a1 + 232, a5); result = a1; *(_BYTE *)(a1 + 264) = 0; return result; }
set_content_provider: SUB RSP,0x88 MOV qword ptr [RSP + 0x8],RCX MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x68],RCX MOV qword ptr [RSP + 0x60],R8 MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x3f] MOV qword ptr [RSP + 0x20],RDI CALL 0x0010ce50 MOV RDX,qword ptr [RSP + 0x20] LAB_0011ec4e: LEA RSI,[0x1e3fb9] LEA RDI,[RSP + 0x40] CALL 0x00112660 JMP 0x0011ec61 LAB_0011ec61: MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x70] LAB_0011ec6b: LEA RSI,[RSP + 0x40] CALL 0x0011d330 LAB_0011ec75: JMP 0x0011ec77 LAB_0011ec77: LEA RDI,[RSP + 0x40] CALL 0x0010cfd0 LEA RDI,[RSP + 0x3f] CALL 0x0010c950 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x78] MOV qword ptr [RAX + 0xc0],RCX CMP qword ptr [RSP + 0x78],0x0 JBE 0x0011ecf0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0xc8 CALL 0x0016bb60 JMP 0x0011ecf0 LAB_0011ecf0: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] ADD RDI,0xe8 CALL 0x0016bbb0 MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x108],0x0 ADD RSP,0x88 RET
/* httplib::Response::set_content_provider(unsigned long, std::__cxx11::string const&, std::function<bool (unsigned long, unsigned long, httplib::DataSink&)>, std::function<void (bool)>) */ void __thiscall httplib::Response::set_content_provider (Response *this,long param_1,string *param_2,function *param_4,function *param_5) { allocator local_49; string local_48 [32]; function *local_28; function *local_20; string *local_18; long local_10; Response *local_8; local_28 = param_5; local_20 = param_4; local_18 = param_2; local_10 = param_1; local_8 = this; std::allocator<char>::allocator(); /* try { // try from 0011ec4e to 0011ec5e has its CatchHandler @ 0011ecbc */ std::__cxx11::string::string<std::allocator<char>>(local_48,"Content-Type",&local_49); /* try { // try from 0011ec6b to 0011ec74 has its CatchHandler @ 0011eccc */ set_header(this,local_48,local_18); std::__cxx11::string::~string(local_48); std::allocator<char>::~allocator((allocator<char> *)&local_49); *(long *)(this + 0xc0) = local_10; if (local_10 != 0) { std::function<bool(unsigned_long,unsigned_long,httplib::DataSink&)>::operator= ((function<bool(unsigned_long,unsigned_long,httplib::DataSink&)> *)(this + 200), param_4); } std::function<void(bool)>::operator=((function<void(bool)> *)(this + 0xe8),param_5); this[0x108] = (Response)0x0; return; }
2,365
queue_insert_safe
eloqsql/mysys/queues.c
int queue_insert_safe(QUEUE *queue, uchar *element) { if (queue->elements == queue->max_elements) { if (!queue->auto_extent) return 2; if (resize_queue(queue, queue->max_elements + queue->auto_extent)) return 1; } queue_insert(queue, element); return 0; }
O3
c
queue_insert_safe: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x10(%rdi), %edx cmpl 0x14(%rdi), %edx jne 0xa1b47 movl 0x20(%r14), %esi testl %esi, %esi je 0xa1b5c addl %edx, %esi movq %r14, %rdi callq 0xa19dd movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx jne 0xa1b61 movl 0x10(%r14), %edx incl %edx movl %edx, 0x10(%r14) movq %r14, %rdi movq %rbx, %rsi callq 0xa1a6a xorl %eax, %eax jmp 0xa1b61 movl $0x2, %eax popq %rbx popq %r14 popq %rbp retq
queue_insert_safe: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov edx, [rdi+10h] cmp edx, [rdi+14h] jnz short loc_A1B47 mov esi, [r14+20h] test esi, esi jz short loc_A1B5C add esi, edx mov rdi, r14 call resize_queue mov ecx, eax mov eax, 1 test ecx, ecx jnz short loc_A1B61 mov edx, [r14+10h] loc_A1B47: inc edx mov [r14+10h], edx mov rdi, r14 mov rsi, rbx call insert_at xor eax, eax jmp short loc_A1B61 loc_A1B5C: mov eax, 2 loc_A1B61: pop rbx pop r14 pop rbp retn
long long queue_insert_safe(long long a1, long long a2) { int v3; // edx int v4; // esi int v5; // ecx long long result; // rax unsigned int v7; // edx v3 = *(_DWORD *)(a1 + 16); if ( v3 != *(_DWORD *)(a1 + 20) ) { LABEL_5: v7 = v3 + 1; *(_DWORD *)(a1 + 16) = v7; insert_at((long long *)a1, a2, v7); return 0LL; } v4 = *(_DWORD *)(a1 + 32); if ( v4 ) { v5 = resize_queue(a1, v3 + v4); result = 1LL; if ( v5 ) return result; v3 = *(_DWORD *)(a1 + 16); goto LABEL_5; } return 2LL; }
queue_insert_safe: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV EDX,dword ptr [RDI + 0x10] CMP EDX,dword ptr [RDI + 0x14] JNZ 0x001a1b47 MOV ESI,dword ptr [R14 + 0x20] TEST ESI,ESI JZ 0x001a1b5c ADD ESI,EDX MOV RDI,R14 CALL 0x001a19dd MOV ECX,EAX MOV EAX,0x1 TEST ECX,ECX JNZ 0x001a1b61 MOV EDX,dword ptr [R14 + 0x10] LAB_001a1b47: INC EDX MOV dword ptr [R14 + 0x10],EDX MOV RDI,R14 MOV RSI,RBX CALL 0x001a1a6a XOR EAX,EAX JMP 0x001a1b61 LAB_001a1b5c: MOV EAX,0x2 LAB_001a1b61: POP RBX POP R14 POP RBP RET
int8 queue_insert_safe(long param_1,int8 param_2) { int iVar1; iVar1 = *(int *)(param_1 + 0x10); if (iVar1 == *(int *)(param_1 + 0x14)) { if (*(int *)(param_1 + 0x20) == 0) { return 2; } iVar1 = resize_queue(param_1,*(int *)(param_1 + 0x20) + iVar1); if (iVar1 != 0) { return 1; } iVar1 = *(int *)(param_1 + 0x10); } *(int *)(param_1 + 0x10) = iVar1 + 1; insert_at(param_1,param_2); return 0; }
2,366
my_mb_wc_latin1
eloqsql/strings/ctype-latin1.c
static int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const uchar *str, const uchar *end __attribute__((unused))) { if (str >= end) return MY_CS_TOOSMALL; /* There are no unassigned characters in latin1. Every code point in latin1 is mapped to some Unicode code point. We can always return 1, no needs to check the value of cs_to_uni[*str]. */ *wc= cs_to_uni[*str]; DBUG_ASSERT(wc[0] || !str[0]); return 1; }
O3
c
my_mb_wc_latin1: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x58e38 movzbl (%rdx), %eax leaq 0x16d964(%rip), %rcx # 0x1c6790 movzwl (%rcx,%rax,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq
my_mb_wc_latin1: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_58E38 movzx eax, byte ptr [rdx] lea rcx, cs_to_uni movzx eax, word ptr [rcx+rax*2] mov [rsi], rax mov eax, 1 loc_58E38: pop rbp retn
long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a2 = cs_to_uni[*a3]; return 1LL; } return result; }
my_mb_wc_latin1: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00158e38 MOVZX EAX,byte ptr [RDX] LEA RCX,[0x2c6790] MOVZX EAX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RAX MOV EAX,0x1 LAB_00158e38: POP RBP RET
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2); uVar1 = 1; } return uVar1; }
2,367
client_query
eloqsql/libmariadb/unittest/libmariadb/basic-t.c
int client_query(MYSQL *mysql) { int rc; rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE t1(" "id int primary key auto_increment, " "name varchar(20))"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE t1(id int, name varchar(20))"); FAIL_IF(!rc, "Error expected"); rc= mysql_query(mysql, "INSERT INTO t1(name) VALUES('mysql')"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1(name) VALUES('monty')"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1(name) VALUES('venu')"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1(name) VALUES('deleted')"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO t1(name) VALUES('deleted')"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "UPDATE t1 SET name= 'updated' " "WHERE name= 'deleted'"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "UPDATE t1 SET id= 3 WHERE name= 'updated'"); FAIL_IF(!rc, "Error expected"); rc= mysql_query(mysql, "drop table t1"); check_mysql_rc(rc, mysql); return OK; }
O0
c
client_query: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi leaq 0x3a6ec(%rip), %rsi # 0x4f666 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x14fd4 movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x24(%rbp), %esi movq -0x20(%rbp), %rdx movl %eax, %ecx leaq 0x3a275(%rip), %rdi # 0x4f229 leaq 0x3a6c3(%rip), %r8 # 0x4f67e movl $0x146, %r9d # imm = 0x146 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x14fd6 movq -0x10(%rbp), %rdi leaq 0x3a6ef(%rip), %rsi # 0x4f6d0 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1503b movl -0x14(%rbp), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x34(%rbp), %esi movq -0x30(%rbp), %rdx movl %eax, %ecx leaq 0x3a20e(%rip), %rdi # 0x4f229 leaq 0x3a65c(%rip), %r8 # 0x4f67e movl $0x14a, %r9d # imm = 0x14A movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x1503d movq -0x10(%rbp), %rdi leaq 0x3a6cd(%rip), %rsi # 0x4f715 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x15083 leaq 0x3a087(%rip), %rdi # 0x4f0e4 leaq 0x3a6db(%rip), %rsi # 0x4f73f leaq 0x3a613(%rip), %rdx # 0x4f67e movl $0x14c, %ecx # imm = 0x14C movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x15085 movq -0x10(%rbp), %rdi leaq 0x3a6be(%rip), %rsi # 0x4f74e callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x150ea movl -0x14(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x44(%rbp), %esi movq -0x40(%rbp), %rdx movl %eax, %ecx leaq 0x3a15f(%rip), %rdi # 0x4f229 leaq 0x3a5ad(%rip), %r8 # 0x4f67e movl $0x14e, %r9d # imm = 0x14E movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x150ec movq -0x10(%rbp), %rdi leaq 0x3a67c(%rip), %rsi # 0x4f773 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x15151 movl -0x14(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x54(%rbp), %esi movq -0x50(%rbp), %rdx movl %eax, %ecx leaq 0x3a0f8(%rip), %rdi # 0x4f229 leaq 0x3a546(%rip), %r8 # 0x4f67e movl $0x150, %r9d # imm = 0x150 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x15153 movq -0x10(%rbp), %rdi leaq 0x3a63a(%rip), %rsi # 0x4f798 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x151b8 movl -0x14(%rbp), %eax movl %eax, -0x64(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x64(%rbp), %esi movq -0x60(%rbp), %rdx movl %eax, %ecx leaq 0x3a091(%rip), %rdi # 0x4f229 leaq 0x3a4df(%rip), %r8 # 0x4f67e movl $0x152, %r9d # imm = 0x152 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x151ba movq -0x10(%rbp), %rdi leaq 0x3a5f7(%rip), %rsi # 0x4f7bc callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1521f movl -0x14(%rbp), %eax movl %eax, -0x74(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x74(%rbp), %esi movq -0x70(%rbp), %rdx movl %eax, %ecx leaq 0x3a02a(%rip), %rdi # 0x4f229 leaq 0x3a478(%rip), %r8 # 0x4f67e movl $0x154, %r9d # imm = 0x154 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x15221 movq -0x10(%rbp), %rdi leaq 0x3a590(%rip), %rsi # 0x4f7bc callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x1528c movl -0x14(%rbp), %eax movl %eax, -0x84(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x80(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x84(%rbp), %esi movq -0x80(%rbp), %rdx movl %eax, %ecx leaq 0x39fbd(%rip), %rdi # 0x4f229 leaq 0x3a40b(%rip), %r8 # 0x4f67e movl $0x156, %r9d # imm = 0x156 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x1528e movq -0x10(%rbp), %rdi leaq 0x3a54a(%rip), %rsi # 0x4f7e3 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x152ff movl -0x14(%rbp), %eax movl %eax, -0x94(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0x94(%rbp), %esi movq -0x90(%rbp), %rdx movl %eax, %ecx leaq 0x39f4a(%rip), %rdi # 0x4f229 leaq 0x3a398(%rip), %r8 # 0x4f67e movl $0x159, %r9d # imm = 0x159 movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x15301 movq -0x10(%rbp), %rdi leaq 0x3a50b(%rip), %rsi # 0x4f817 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x15344 leaq 0x39dc3(%rip), %rdi # 0x4f0e4 leaq 0x3a417(%rip), %rsi # 0x4f73f leaq 0x3a34f(%rip), %rdx # 0x4f67e movl $0x15b, %ecx # imm = 0x15B movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x15346 movq -0x10(%rbp), %rdi leaq 0x3a4f0(%rip), %rsi # 0x4f841 callq 0x22370 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x153b4 movl -0x14(%rbp), %eax movl %eax, -0xa4(%rbp) movq -0x10(%rbp), %rdi callq 0x25cf0 movq %rax, -0xa0(%rbp) movq -0x10(%rbp), %rdi callq 0x25cc0 movl -0xa4(%rbp), %esi movq -0xa0(%rbp), %rdx movl %eax, %ecx leaq 0x39e92(%rip), %rdi # 0x4f229 leaq 0x3a2e0(%rip), %r8 # 0x4f67e movl $0x15d, %r9d # imm = 0x15D movb $0x0, %al callq 0x19540 movl $0x1, -0x4(%rbp) jmp 0x153bd jmp 0x153b6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq nopl (%rax)
client_query: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] lea rsi, aDropTableIfExi; "DROP TABLE IF EXISTS t1" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_14FD4 mov eax, [rbp+var_14] mov [rbp+var_24], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_20], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_24] mov rdx, [rbp+var_20] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 146h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_14FD4: jmp short $+2 loc_14FD6: mov rdi, [rbp+var_10] lea rsi, aCreateTableT1I; "CREATE TABLE t1(id int primary key auto"... call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_1503B mov eax, [rbp+var_14] mov [rbp+var_34], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_30], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_34] mov rdx, [rbp+var_30] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 14Ah mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_1503B: jmp short $+2 loc_1503D: mov rdi, [rbp+var_10] lea rsi, aCreateTableT1I_0; "CREATE TABLE t1(id int, name varchar(20"... call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jnz short loc_15083 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aErrorExpected; "Error expected" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 14Ch mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_15083: jmp short $+2 loc_15085: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Na; "INSERT INTO t1(name) VALUES('mysql')" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_150EA mov eax, [rbp+var_14] mov [rbp+var_44], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_40], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_44] mov rdx, [rbp+var_40] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 14Eh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_150EA: jmp short $+2 loc_150EC: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Na_0; "INSERT INTO t1(name) VALUES('monty')" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_15151 mov eax, [rbp+var_14] mov [rbp+var_54], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_50], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_54] mov rdx, [rbp+var_50] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 150h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_15151: jmp short $+2 loc_15153: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Na_1; "INSERT INTO t1(name) VALUES('venu')" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_151B8 mov eax, [rbp+var_14] mov [rbp+var_64], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_60], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_64] mov rdx, [rbp+var_60] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 152h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_151B8: jmp short $+2 loc_151BA: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Na_2; "INSERT INTO t1(name) VALUES('deleted')" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_1521F mov eax, [rbp+var_14] mov [rbp+var_74], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_70], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_74] mov rdx, [rbp+var_70] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 154h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_1521F: jmp short $+2 loc_15221: mov rdi, [rbp+var_10] lea rsi, aInsertIntoT1Na_2; "INSERT INTO t1(name) VALUES('deleted')" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_1528C mov eax, [rbp+var_14] mov [rbp+var_84], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_80], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_84] mov rdx, [rbp+var_80] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 156h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_1528C: jmp short $+2 loc_1528E: mov rdi, [rbp+var_10] lea rsi, aUpdateT1SetNam; "UPDATE t1 SET name= 'updated' WHERE nam"... call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_152FF mov eax, [rbp+var_14] mov [rbp+var_94], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_90], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_94] mov rdx, [rbp+var_90] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 159h mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_153BD loc_152FF: jmp short $+2 loc_15301: mov rdi, [rbp+var_10] lea rsi, aUpdateT1SetId3; "UPDATE t1 SET id= 3 WHERE name= 'update"... call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jnz short loc_15344 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aErrorExpected; "Error expected" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 15Bh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_153BD loc_15344: jmp short $+2 loc_15346: mov rdi, [rbp+var_10] lea rsi, aDropTableT1; "drop table t1" call mysql_query mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_153B4 mov eax, [rbp+var_14] mov [rbp+var_A4], eax mov rdi, [rbp+var_10] call mysql_error mov [rbp+var_A0], rax mov rdi, [rbp+var_10] call mysql_errno mov esi, [rbp+var_A4] mov rdx, [rbp+var_A0] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 15Dh mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_153BD loc_153B4: jmp short $+2 loc_153B6: mov [rbp+var_4], 0 loc_153BD: mov eax, [rbp+var_4] add rsp, 0B0h pop rbp retn
long long client_query(long long a1) { int v1; // eax int v2; // eax int v3; // r8d int v4; // r9d int v5; // eax int v6; // eax int v7; // eax int v8; // eax int v9; // eax int v10; // eax int v11; // r8d int v12; // r9d int v13; // eax int v15; // [rsp+10h] [rbp-A0h] int v16; // [rsp+20h] [rbp-90h] int v17; // [rsp+30h] [rbp-80h] int v18; // [rsp+40h] [rbp-70h] int v19; // [rsp+50h] [rbp-60h] int v20; // [rsp+60h] [rbp-50h] int v21; // [rsp+70h] [rbp-40h] int v22; // [rsp+80h] [rbp-30h] int v23; // [rsp+90h] [rbp-20h] int v24; // [rsp+9Ch] [rbp-14h] int v25; // [rsp+9Ch] [rbp-14h] int v26; // [rsp+9Ch] [rbp-14h] int v27; // [rsp+9Ch] [rbp-14h] int v28; // [rsp+9Ch] [rbp-14h] int v29; // [rsp+9Ch] [rbp-14h] int v30; // [rsp+9Ch] [rbp-14h] int v31; // [rsp+9Ch] [rbp-14h] int v32; // [rsp+9Ch] [rbp-14h] v24 = mysql_query(a1, "DROP TABLE IF EXISTS t1"); if ( v24 ) { v23 = mysql_error(a1); v1 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v24, v23, v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 326); return 1; } else { v25 = mysql_query(a1, "CREATE TABLE t1(id int primary key auto_increment, name varchar(20))"); if ( v25 ) { v22 = mysql_error(a1); v2 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v25, v22, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 330); return 1; } else if ( (unsigned int)mysql_query(a1, "CREATE TABLE t1(id int, name varchar(20))") ) { v26 = mysql_query(a1, "INSERT INTO t1(name) VALUES('mysql')"); if ( v26 ) { v21 = mysql_error(a1); v5 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v26, v21, v5, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 334); return 1; } else { v27 = mysql_query(a1, "INSERT INTO t1(name) VALUES('monty')"); if ( v27 ) { v20 = mysql_error(a1); v6 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v27, v20, v6, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 336); return 1; } else { v28 = mysql_query(a1, "INSERT INTO t1(name) VALUES('venu')"); if ( v28 ) { v19 = mysql_error(a1); v7 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v28, v19, v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 338); return 1; } else { v29 = mysql_query(a1, "INSERT INTO t1(name) VALUES('deleted')"); if ( v29 ) { v18 = mysql_error(a1); v8 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v29, v18, v8, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 340); return 1; } else { v30 = mysql_query(a1, "INSERT INTO t1(name) VALUES('deleted')"); if ( v30 ) { v17 = mysql_error(a1); v9 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v30, v17, v9, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 342); return 1; } else { v31 = mysql_query(a1, "UPDATE t1 SET name= 'updated' WHERE name= 'deleted'"); if ( v31 ) { v16 = mysql_error(a1); v10 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v31, v16, v10, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 345); return 1; } else if ( (unsigned int)mysql_query(a1, "UPDATE t1 SET id= 3 WHERE name= 'updated'") ) { v32 = mysql_query(a1, "drop table t1"); if ( v32 ) { v15 = mysql_error(a1); v13 = mysql_errno(a1); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v32, v15, v13, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 349); return 1; } else { return 0; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Error expected", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 347, v11, v12); return 1; } } } } } } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Error expected", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 332, v3, v4); return 1; } } }
client_query: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f666] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00114fd4 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x146 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_00114fd4: JMP 0x00114fd6 LAB_00114fd6: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f6d0] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0011503b MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x34] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x14a MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_0011503b: JMP 0x0011503d LAB_0011503d: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f715] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00115083 LEA RDI,[0x14f0e4] LEA RSI,[0x14f73f] LEA RDX,[0x14f67e] MOV ECX,0x14c MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_00115083: JMP 0x00115085 LAB_00115085: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f74e] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001150ea MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x40] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x14e MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_001150ea: JMP 0x001150ec LAB_001150ec: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f773] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x00115151 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x54] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x150 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_00115151: JMP 0x00115153 LAB_00115153: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f798] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001151b8 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x64],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x64] MOV RDX,qword ptr [RBP + -0x60] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x152 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_001151b8: JMP 0x001151ba LAB_001151ba: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f7bc] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0011521f MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x74],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x74] MOV RDX,qword ptr [RBP + -0x70] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x154 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_0011521f: JMP 0x00115221 LAB_00115221: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f7bc] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0011528c MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x84],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x84] MOV RDX,qword ptr [RBP + -0x80] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x156 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_0011528c: JMP 0x0011528e LAB_0011528e: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f7e3] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001152ff MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x94],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0x94] MOV RDX,qword ptr [RBP + -0x90] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x159 MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_001152ff: JMP 0x00115301 LAB_00115301: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f817] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00115344 LEA RDI,[0x14f0e4] LEA RSI,[0x14f73f] LEA RDX,[0x14f67e] MOV ECX,0x15b MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_00115344: JMP 0x00115346 LAB_00115346: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14f841] CALL 0x00122370 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x001153b4 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0xa4],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cf0 MOV qword ptr [RBP + -0xa0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00125cc0 MOV ESI,dword ptr [RBP + -0xa4] MOV RDX,qword ptr [RBP + -0xa0] MOV ECX,EAX LEA RDI,[0x14f229] LEA R8,[0x14f67e] MOV R9D,0x15d MOV AL,0x0 CALL 0x00119540 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001153bd LAB_001153b4: JMP 0x001153b6 LAB_001153b6: MOV dword ptr [RBP + -0x4],0x0 LAB_001153bd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xb0 POP RBP RET
int4 client_query(int8 param_1) { int iVar1; int4 uVar2; int8 uVar3; int4 local_c; iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS t1"); if (iVar1 == 0) { iVar1 = mysql_query(param_1, "CREATE TABLE t1(id int primary key auto_increment, name varchar(20))"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"CREATE TABLE t1(id int, name varchar(20))"); if (iVar1 == 0) { diag("Error: %s (%s: %d)","Error expected", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 0x14c); local_c = 1; } else { iVar1 = mysql_query(param_1,"INSERT INTO t1(name) VALUES(\'mysql\')"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"INSERT INTO t1(name) VALUES(\'monty\')"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"INSERT INTO t1(name) VALUES(\'venu\')"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"INSERT INTO t1(name) VALUES(\'deleted\')"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"INSERT INTO t1(name) VALUES(\'deleted\')"); if (iVar1 == 0) { iVar1 = mysql_query(param_1, "UPDATE t1 SET name= \'updated\' WHERE name= \'deleted\'"); if (iVar1 == 0) { iVar1 = mysql_query(param_1,"UPDATE t1 SET id= 3 WHERE name= \'updated\'"); if (iVar1 == 0) { diag("Error: %s (%s: %d)","Error expected", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x15b); local_c = 1; } else { iVar1 = mysql_query(param_1,"drop table t1"); if (iVar1 == 0) { local_c = 0; } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x15d); local_c = 1; } } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x159); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x156); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x154); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x152); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c" ,0x150); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c", 0x14e); local_c = 1; } } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c",0x14a ); local_c = 1; } } else { uVar3 = mysql_error(param_1); uVar2 = mysql_errno(param_1); diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/basic-t.c",0x146); local_c = 1; } return local_c; }
2,368
common_sampler::set_logits(llama_context*, int)
monkey531[P]llama/common/sampling.cpp
void set_logits(struct llama_context * ctx, int idx) { const auto * logits = llama_get_logits_ith(ctx, idx); const llama_model * model = llama_get_model(ctx); const llama_vocab * vocab = llama_model_get_vocab(model); const int n_vocab = llama_vocab_n_tokens(vocab); cur.resize(n_vocab); for (llama_token token_id = 0; token_id < n_vocab; token_id++) { cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f}; } cur_p = { cur.data(), cur.size(), -1, false }; }
O0
cpp
common_sampler::set_logits(llama_context*, int): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movl %edx, 0x64(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x68(%rsp), %rdi movl 0x64(%rsp), %esi callq 0x653a0 movq %rax, 0x58(%rsp) movq 0x68(%rsp), %rdi callq 0x65090 movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rdi callq 0x655f0 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi callq 0x64890 movq 0x8(%rsp), %rdi movl %eax, 0x44(%rsp) addq $0x180, %rdi # imm = 0x180 movslq 0x44(%rsp), %rsi callq 0x1a4610 movl $0x0, 0x40(%rsp) movl 0x40(%rsp), %eax cmpl 0x44(%rsp), %eax jge 0x2d6e7b movq 0x8(%rsp), %rdi movl 0x40(%rsp), %eax movl %eax, 0x34(%rsp) movq 0x58(%rsp), %rax movslq 0x40(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movss %xmm0, 0x38(%rsp) xorps %xmm0, %xmm0 movss %xmm0, 0x3c(%rsp) addq $0x180, %rdi # imm = 0x180 movslq 0x40(%rsp), %rsi callq 0x1a3d90 movq 0x34(%rsp), %rcx movq %rcx, (%rax) movl 0x3c(%rsp), %ecx movl %ecx, 0x8(%rax) movl 0x40(%rsp), %eax addl $0x1, %eax movl %eax, 0x40(%rsp) jmp 0x2d6e19 movq 0x8(%rsp), %rdi addq $0x180, %rdi # imm = 0x180 callq 0x2d7810 movq 0x8(%rsp), %rdi movq %rax, 0x10(%rsp) addq $0x180, %rdi # imm = 0x180 callq 0x1a4710 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x18(%rsp) movq $-0x1, 0x20(%rsp) movb $0x0, 0x28(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x198(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x1a0(%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x1a8(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x1b0(%rax) addq $0x78, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN14common_sampler10set_logitsEP13llama_contexti: sub rsp, 78h mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_14], edx mov rax, [rsp+78h+var_8] mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_10] mov esi, [rsp+78h+var_14] call _llama_get_logits_ith mov [rsp+78h+var_20], rax mov rdi, [rsp+78h+var_10] call _llama_get_model mov [rsp+78h+var_28], rax mov rdi, [rsp+78h+var_28] call _llama_model_get_vocab mov [rsp+78h+var_30], rax mov rdi, [rsp+78h+var_30] call _llama_vocab_n_tokens mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_34], eax add rdi, 180h movsxd rsi, [rsp+78h+var_34] call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong) mov [rsp+78h+var_38], 0 loc_2D6E19: mov eax, [rsp+78h+var_38] cmp eax, [rsp+78h+var_34] jge short loc_2D6E7B mov rdi, [rsp+78h+var_70] mov eax, [rsp+78h+var_38] mov dword ptr [rsp+78h+var_44], eax mov rax, [rsp+78h+var_20] movsxd rcx, [rsp+78h+var_38] movss xmm0, dword ptr [rax+rcx*4] movss dword ptr [rsp+78h+var_44+4], xmm0 xorps xmm0, xmm0 movss [rsp+78h+var_3C], xmm0 add rdi, 180h movsxd rsi, [rsp+78h+var_38] call _ZNSt6vectorI16llama_token_dataSaIS0_EEixEm; std::vector<llama_token_data>::operator[](ulong) mov rcx, [rsp+78h+var_44] mov [rax], rcx mov ecx, [rsp+78h+var_3C] mov [rax+8], ecx mov eax, [rsp+78h+var_38] add eax, 1 mov [rsp+78h+var_38], eax jmp short loc_2D6E19 loc_2D6E7B: mov rdi, [rsp+78h+var_70] add rdi, 180h call _ZNSt6vectorI16llama_token_dataSaIS0_EE4dataEv; std::vector<llama_token_data>::data(void) mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_68], rax add rdi, 180h call _ZNKSt6vectorI16llama_token_dataSaIS0_EE4sizeEv; std::vector<llama_token_data>::size(void) mov rcx, rax mov rax, [rsp+78h+var_70] mov [rsp+78h+var_60], rcx mov [rsp+78h+var_58], 0FFFFFFFFFFFFFFFFh mov byte ptr [rsp+78h+var_50], 0 mov rcx, [rsp+78h+var_68] mov [rax+198h], rcx mov rcx, [rsp+78h+var_60] mov [rax+1A0h], rcx mov rcx, [rsp+78h+var_58] mov [rax+1A8h], rcx mov rcx, [rsp+78h+var_50] mov [rax+1B0h], rcx add rsp, 78h retn
_QWORD * common_sampler::set_logits(_QWORD *a1, long long a2, unsigned int a3) { long long v3; // rax long long v4; // rcx _QWORD *result; // rax long long v6; // [rsp+10h] [rbp-68h] long long v7; // [rsp+28h] [rbp-50h] long long v8; // [rsp+34h] [rbp-44h] int i; // [rsp+40h] [rbp-38h] int v10; // [rsp+44h] [rbp-34h] long long vocab; // [rsp+48h] [rbp-30h] long long model; // [rsp+50h] [rbp-28h] long long logits_ith; // [rsp+58h] [rbp-20h] logits_ith = llama_get_logits_ith(a2, a3); model = llama_get_model(a2); vocab = llama_model_get_vocab(model); v10 = llama_vocab_n_tokens(vocab); std::vector<llama_token_data>::resize(a1 + 48, v10); for ( i = 0; i < v10; ++i ) { LODWORD(v8) = i; HIDWORD(v8) = *(_DWORD *)(logits_ith + 4LL * i); v3 = std::vector<llama_token_data>::operator[](a1 + 48, i); *(_QWORD *)v3 = v8; *(_DWORD *)(v3 + 8) = 0; } v6 = std::vector<llama_token_data>::data(a1 + 48); v4 = std::vector<llama_token_data>::size(a1 + 48); result = a1; LOBYTE(v7) = 0; a1[51] = v6; a1[52] = v4; a1[53] = -1LL; a1[54] = v7; return result; }
_M_valptr: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x002d6db0 POP RCX RET
/* std::__detail::_Hash_node_value_base<std::pair<std::__cxx11::string const, common_arg*> >::_M_valptr() */ void __thiscall std::__detail::_Hash_node_value_base<std::pair<std::__cxx11::string_const,common_arg*>>::_M_valptr (_Hash_node_value_base<std::pair<std::__cxx11::string_const,common_arg*>> *this) { __gnu_cxx::__aligned_buffer<std::pair<std::__cxx11::string_const,common_arg*>>::_M_ptr ((__aligned_buffer<std::pair<std::__cxx11::string_const,common_arg*>> *)this); return; }
2,369
common_sampler::set_logits(llama_context*, int)
monkey531[P]llama/common/sampling.cpp
void set_logits(struct llama_context * ctx, int idx) { const auto * logits = llama_get_logits_ith(ctx, idx); const llama_model * model = llama_get_model(ctx); const llama_vocab * vocab = llama_model_get_vocab(model); const int n_vocab = llama_vocab_n_tokens(vocab); cur.resize(n_vocab); for (llama_token token_id = 0; token_id < n_vocab; token_id++) { cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f}; } cur_p = { cur.data(), cur.size(), -1, false }; }
O3
cpp
common_sampler::set_logits(llama_context*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi movl %edx, %esi callq 0x20100 movq %rax, %r14 movq %r15, %rdi callq 0x1f940 movq %rax, %rdi callq 0x20590 movq %rax, %rdi callq 0x20510 movl %eax, %ebp leaq 0x180(%rbx), %rdi movslq %eax, %r15 movq %r15, %rsi callq 0x9dfa8 movq 0x180(%rbx), %rax testl %r15d, %r15d jle 0x141df8 movl %ebp, %ecx leaq 0x8(%rax), %rdx xorl %esi, %esi movss (%r14,%rsi,4), %xmm0 movl %esi, -0x8(%rdx) movss %xmm0, -0x4(%rdx) movl $0x0, (%rdx) incq %rsi addq $0xc, %rdx cmpq %rsi, %rcx jne 0x141dd8 movq 0x188(%rbx), %rcx subq %rax, %rcx sarq $0x2, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rdx movq %rax, 0x198(%rbx) movq %rdx, 0x1a0(%rbx) movq $-0x1, 0x1a8(%rbx) movb $0x0, 0x1b0(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN14common_sampler10set_logitsEP13llama_contexti: push rbp push r15 push r14 push rbx push rax mov r15, rsi mov rbx, rdi mov rdi, rsi mov esi, edx call _llama_get_logits_ith mov r14, rax mov rdi, r15 call _llama_get_model mov rdi, rax call _llama_model_get_vocab mov rdi, rax call _llama_vocab_n_tokens mov ebp, eax lea rdi, [rbx+180h] movsxd r15, eax mov rsi, r15 call _ZNSt6vectorI16llama_token_dataSaIS0_EE6resizeEm; std::vector<llama_token_data>::resize(ulong) mov rax, [rbx+180h] test r15d, r15d jle short loc_141DF8 mov ecx, ebp lea rdx, [rax+8] xor esi, esi loc_141DD8: movss xmm0, dword ptr [r14+rsi*4] mov [rdx-8], esi movss dword ptr [rdx-4], xmm0 mov dword ptr [rdx], 0 inc rsi add rdx, 0Ch cmp rcx, rsi jnz short loc_141DD8 loc_141DF8: mov rcx, [rbx+188h] sub rcx, rax sar rcx, 2 mov rdx, 0AAAAAAAAAAAAAAABh imul rdx, rcx mov [rbx+198h], rax mov [rbx+1A0h], rdx mov qword ptr [rbx+1A8h], 0FFFFFFFFFFFFFFFFh mov byte ptr [rbx+1B0h], 0 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long common_sampler::set_logits(long long a1, long long a2, unsigned int a3) { long long v6; // rsi long long logits_ith; // r14 long long model; // rax long long vocab; // rax int v10; // ebp long long result; // rax _DWORD *v12; // rdx long long v13; // rsi int v14; // xmm0_4 unsigned long long v15; // rdx v6 = a3; logits_ith = llama_get_logits_ith(a2, a3); model = llama_get_model(a2); vocab = llama_model_get_vocab(model); v10 = llama_vocab_n_tokens(vocab, v6); std::vector<llama_token_data>::resize((_QWORD *)(a1 + 384), v10); result = *(_QWORD *)(a1 + 384); if ( v10 > 0 ) { v12 = (_DWORD *)(result + 8); v13 = 0LL; do { v14 = *(_DWORD *)(logits_ith + 4 * v13); *(v12 - 2) = v13; *(v12 - 1) = v14; *v12 = 0; ++v13; v12 += 3; } while ( v10 != v13 ); } v15 = 0xAAAAAAAAAAAAAAABLL * ((*(_QWORD *)(a1 + 392) - result) >> 2); *(_QWORD *)(a1 + 408) = result; *(_QWORD *)(a1 + 416) = v15; *(_QWORD *)(a1 + 424) = -1LL; *(_BYTE *)(a1 + 432) = 0; return result; }
2,370
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xe1974 leaq 0x1de761(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x2a280 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy_3: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_E1974 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_E1974: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy_3(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { ((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001e1974 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_001e1974: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a280 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
2,371
add_cfg_dir
eloqsql/libmariadb/libmariadb/ma_default.c
static int add_cfg_dir(char **cfg_dirs, const char *directory) { int i; for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++) if (!strcmp(cfg_dirs[i], directory)) /* already present */ return 0; if (i < MAX_CONFIG_DIRS) { cfg_dirs[i]= strdup(directory); return 0; } return 1; }
O0
c
add_cfg_dir: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x0, -0x1c(%rbp) xorl %eax, %eax cmpl $0x6, -0x1c(%rbp) movb %al, -0x1d(%rbp) jge 0x47015 movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) setne %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al testb $0x1, %al jne 0x4701e jmp 0x4704e movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -0x18(%rbp), %rsi callq 0x135f0 cmpl $0x0, %eax jne 0x47041 movl $0x0, -0x4(%rbp) jmp 0x4707c jmp 0x47043 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x46ff7 cmpl $0x6, -0x1c(%rbp) jge 0x47075 movq -0x18(%rbp), %rdi callq 0x137a0 movq %rax, %rdx movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl $0x0, -0x4(%rbp) jmp 0x4707c movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_cfg_dir: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 0 loc_46FF7: xor eax, eax cmp [rbp+var_1C], 6 mov [rbp+var_1D], al jge short loc_47015 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] cmp qword ptr [rax+rcx*8], 0 setnz al mov [rbp+var_1D], al loc_47015: mov al, [rbp+var_1D] test al, 1 jnz short loc_4701E jmp short loc_4704E loc_4701E: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov rdi, [rax+rcx*8] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_47041 mov [rbp+var_4], 0 jmp short loc_4707C loc_47041: jmp short $+2 loc_47043: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_46FF7 loc_4704E: cmp [rbp+var_1C], 6 jge short loc_47075 mov rdi, [rbp+var_18] call _strdup mov rdx, rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov [rax+rcx*8], rdx mov [rbp+var_4], 0 jmp short loc_4707C loc_47075: mov [rbp+var_4], 1 loc_4707C: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long add_cfg_dir(long long a1, long long a2) { bool v3; // [rsp+3h] [rbp-1Dh] int i; // [rsp+4h] [rbp-1Ch] for ( i = 0; ; ++i ) { v3 = 0; if ( i < 6 ) v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL; if ( !v3 ) break; if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) ) return 0; } if ( i >= 6 ) { return 1; } else { *(_QWORD *)(a1 + 8LL * i) = strdup(a2); return 0; } }
add_cfg_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x0 LAB_00146ff7: XOR EAX,EAX CMP dword ptr [RBP + -0x1c],0x6 MOV byte ptr [RBP + -0x1d],AL JGE 0x00147015 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 SETNZ AL MOV byte ptr [RBP + -0x1d],AL LAB_00147015: MOV AL,byte ptr [RBP + -0x1d] TEST AL,0x1 JNZ 0x0014701e JMP 0x0014704e LAB_0014701e: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001135f0 CMP EAX,0x0 JNZ 0x00147041 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014707c LAB_00147041: JMP 0x00147043 LAB_00147043: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00146ff7 LAB_0014704e: CMP dword ptr [RBP + -0x1c],0x6 JGE 0x00147075 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001137a0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV qword ptr [RAX + RCX*0x8],RDX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014707c LAB_00147075: MOV dword ptr [RBP + -0x4],0x1 LAB_0014707c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 add_cfg_dir(long param_1,char *param_2) { int iVar1; char *pcVar2; bool bVar3; int local_24; local_24 = 0; while( true ) { bVar3 = false; if (local_24 < 6) { bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0; } if (!bVar3) break; iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2); if (iVar1 == 0) { return 0; } local_24 = local_24 + 1; } if (local_24 < 6) { pcVar2 = strdup(param_2); *(char **)(param_1 + (long)local_24 * 8) = pcVar2; return 0; } return 1; }
2,372
cpu_get_num_physical_cores()
monkey531[P]llama/common/common.cpp
std::string string_from(bool value) { return value ? "true" : "false"; }
O2
cpp
cpu_get_num_physical_cores(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 leaq 0x58(%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) xorl %esi, %esi leaq 0x60(%rsp), %r14 leaq 0x80(%rsp), %r12 leaq 0x8(%rsp), %rbp leaq 0xa0(%rsp), %rbx pushq $0x8 popq %r15 xorl %r13d, %r13d incl %r13d je 0x4a3ef movq %r14, %rdi callq 0x4f972 movq %r12, %rdi leaq 0x4ff42(%rip), %rsi # 0x9a280 movq %r14, %rdx callq 0x3c894 movq %rbp, %rdi movq %r12, %rsi leaq 0x4ff49(%rip), %rdx # 0x9a29c callq 0x3fedc movq %rbx, %rdi movq %rbp, %rsi movl %r15d, %edx callq 0x20ae0 movq %rbp, %rdi callq 0x20de8 movq %r12, %rdi callq 0x20de8 movq %r14, %rdi callq 0x20de8 leaq 0x118(%rsp), %rdi callq 0x20180 testb %al, %al je 0x4a3e2 leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) andq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) movq %rbx, %rdi movq %rbp, %rsi callq 0x20120 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x4a3ca leaq 0x28(%rsp), %rdi movq %rbp, %rsi callq 0x419e0 movq %rbp, %rdi callq 0x20de8 movq %rbx, %rdi callq 0x201b0 movl %r13d, %esi jmp 0x4a323 leaq 0xa0(%rsp), %rdi callq 0x201b0 movq 0x40(%rsp), %rbx testq %rbx, %rbx jne 0x4a410 callq 0x20930 cmpl $0x5, %eax setae %cl movl %eax, %edx shrl %cl, %edx testl %eax, %eax pushq $0x4 popq %rbx cmovnel %edx, %ebx leaq 0x28(%rsp), %rdi callq 0x3c6ce movl %ebx, %eax addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x4a47d movq %rax, %rbx jmp 0x4a44a movq %rax, %rbx jmp 0x4a457 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x20de8 leaq 0x80(%rsp), %rdi callq 0x20de8 leaq 0x60(%rsp), %rdi callq 0x20de8 jmp 0x4a47d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x20de8 leaq 0xa0(%rsp), %rdi callq 0x201b0 leaq 0x28(%rsp), %rdi callq 0x3c6ce movq %rbx, %rdi callq 0x20bf0
_Z26cpu_get_num_physical_coresv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h lea rax, [rsp+2D8h+var_280] 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 xor esi, esi; unsigned int lea r14, [rsp+2D8h+var_278] lea r12, [rsp+2D8h+var_258] lea rbp, [rsp+2D8h+var_2D0] lea rbx, [rsp+2D8h+var_238] push 8 pop r15 xor r13d, r13d loc_4A323: inc r13d jz loc_4A3EF mov rdi, r14; this call _ZNSt7__cxx119to_stringEj; std::to_string(uint) mov rdi, r12 lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu/cpu" mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rdi, rbp mov rsi, r12 lea rdx, aTopologyThread; "/topology/thread_siblings" call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, rbx mov rsi, rbp mov edx, r15d call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2D8h+var_1C0] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz short loc_4A3E2 lea rax, [rsp+2D8h+var_2C0] mov [rsp+2D8h+var_2D0], rax and [rsp+2D8h+var_2C8], 0 mov [rsp+2D8h+var_2C0], 0 mov rdi, rbx mov rsi, rbp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_4A3CA lea rdi, [rsp+2D8h+var_2B0] mov rsi, rbp call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&) loc_4A3CA: mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov esi, r13d jmp loc_4A323 loc_4A3E2: lea rdi, [rsp+2D8h+var_238]; this call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_4A3EF: mov rbx, [rsp+2D8h+var_298] test rbx, rbx jnz short loc_4A410 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) cmp eax, 5 setnb cl mov edx, eax shr edx, cl test eax, eax push 4 pop rbx cmovnz ebx, edx loc_4A410: lea rdi, [rsp+2D8h+var_2B0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov eax, ebx add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_4A47D mov rbx, rax jmp short loc_4A44A mov rbx, rax jmp short loc_4A457 mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4A44A: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_4A457: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4A47D mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_98] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_4A47D: lea rdi, [rsp+arg_20] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long cpu_get_num_physical_cores(std::thread *a1) { unsigned int v1; // esi unsigned int i; // r13d _QWORD *v3; // rax long long v4; // rdx int v5; // r8d int v6; // r9d long long v7; // rcx unsigned int v8; // ebx unsigned int v9; // eax _QWORD v11[2]; // [rsp+8h] [rbp-2D0h] BYREF char v12; // [rsp+18h] [rbp-2C0h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-2B0h] BYREF __int128 v14; // [rsp+38h] [rbp-2A0h] int v15; // [rsp+48h] [rbp-290h] __int128 v16; // [rsp+50h] [rbp-288h] BYREF _BYTE v17[32]; // [rsp+60h] [rbp-278h] BYREF _BYTE v18[32]; // [rsp+80h] [rbp-258h] BYREF _BYTE v19[120]; // [rsp+A0h] [rbp-238h] BYREF _BYTE v20[448]; // [rsp+118h] [rbp-1C0h] BYREF v13[0] = (char *)&v16 + 8; v13[1] = 1LL; v14 = 0LL; v15 = 1065353216; v16 = 0LL; v1 = 0; for ( i = 0; ++i; v1 = i ) { std::to_string((std::__cxx11 *)v17, v1); std::operator+<char>((long long)v18, (long long)"/sys/devices/system/cpu/cpu", (long long)v17); std::operator+<char>((long long)v11, (long long)v18, (long long)"/topology/thread_siblings"); std::ifstream::basic_ifstream(v19, v11, 8LL); std::string::~string(v11); std::string::~string(v18); std::string::~string(v17); if ( !(unsigned __int8)std::__basic_file<char>::is_open(v20) ) { a1 = (std::thread *)v19; std::ifstream::~ifstream(v19); break; } v11[0] = &v12; v11[1] = 0LL; v12 = 0; v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v19, v11); v7 = *(_QWORD *)(*v3 - 24LL); if ( (*((_BYTE *)v3 + v7 + 32) & 5) == 0 ) std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert( (int)v13, (int)v11, v4, v7, v5, v6); std::string::~string(v11); a1 = (std::thread *)v19; std::ifstream::~ifstream(v19); } v8 = DWORD2(v14); if ( !*((_QWORD *)&v14 + 1) ) { v9 = std::thread::hardware_concurrency(a1); v8 = 4; if ( v9 ) v8 = v9 >> (v9 >= 5); } std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v13); return v8; }
cpu_get_num_physical_cores: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 LEA RAX,[RSP + 0x58] 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 XOR ESI,ESI LEA R14,[RSP + 0x60] LEA R12,[RSP + 0x80] LEA RBP,[RSP + 0x8] LEA RBX,[RSP + 0xa0] PUSH 0x8 POP R15 XOR R13D,R13D LAB_0014a323: INC R13D JZ 0x0014a3ef LAB_0014a32c: MOV RDI,R14 CALL 0x0014f972 LAB_0014a334: MOV RDI,R12 LEA RSI,[0x19a280] MOV RDX,R14 CALL 0x0013c894 LAB_0014a346: MOV RDI,RBP MOV RSI,R12 LEA RDX,[0x19a29c] CALL 0x0013fedc LAB_0014a358: MOV RDI,RBX MOV RSI,RBP MOV EDX,R15D CALL 0x00120ae0 MOV RDI,RBP CALL 0x00120de8 MOV RDI,R12 CALL 0x00120de8 MOV RDI,R14 CALL 0x00120de8 LEA RDI,[RSP + 0x118] CALL 0x00120180 TEST AL,AL JZ 0x0014a3e2 LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX AND qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LAB_0014a3a4: MOV RDI,RBX MOV RSI,RBP CALL 0x00120120 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0014a3ca LEA RDI,[RSP + 0x28] MOV RSI,RBP CALL 0x001419e0 LAB_0014a3ca: MOV RDI,RBP CALL 0x00120de8 MOV RDI,RBX CALL 0x001201b0 MOV ESI,R13D JMP 0x0014a323 LAB_0014a3e2: LEA RDI,[RSP + 0xa0] CALL 0x001201b0 LAB_0014a3ef: MOV RBX,qword ptr [RSP + 0x40] TEST RBX,RBX JNZ 0x0014a410 CALL 0x00120930 CMP EAX,0x5 SETNC CL MOV EDX,EAX SHR EDX,CL TEST EAX,EAX PUSH 0x4 POP RBX CMOVNZ EBX,EDX LAB_0014a410: LEA RDI,[RSP + 0x28] CALL 0x0013c6ce MOV EAX,EBX ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_physical_cores() */ ulong cpu_get_num_physical_cores(void) { char cVar1; uint uVar2; istream *piVar3; ulong uVar4; int1 *local_2d0; int8 local_2c8; int1 local_2c0 [16]; int8 *local_2b0; int8 local_2a8; int8 local_2a0; ulong uStack_298; int4 local_290; int8 local_288; int8 uStack_280; __cxx11 local_278 [32]; string local_258 [32]; istream local_238 [520]; local_2b0 = &uStack_280; local_2a8 = 1; local_2a0 = 0; uStack_298 = 0; local_290 = 0x3f800000; local_288 = 0; uStack_280 = 0; uVar2 = 0; do { if (uVar2 + 1 == 0) { LAB_0014a3ef: uVar4 = uStack_298; if (uStack_298 == 0) { uVar2 = std::thread::hardware_concurrency(); uVar4 = 4; if (uVar2 != 0) { uVar4 = (ulong)(uVar2 >> (4 < uVar2)); } } std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)&local_2b0); return uVar4 & 0xffffffff; } /* try { // try from 0014a32c to 0014a333 has its CatchHandler @ 0014a42e */ std::__cxx11::to_string(local_278,uVar2); /* try { // try from 0014a334 to 0014a345 has its CatchHandler @ 0014a438 */ std::operator+((char *)local_258,(string *)"/sys/devices/system/cpu/cpu"); /* try { // try from 0014a346 to 0014a357 has its CatchHandler @ 0014a433 */ std::operator+((string *)&local_2d0,(char *)local_258); /* try { // try from 0014a358 to 0014a365 has its CatchHandler @ 0014a43d */ std::ifstream::ifstream((ifstream *)local_238,(string *)&local_2d0,8); std::__cxx11::string::~string((string *)&local_2d0); std::__cxx11::string::~string(local_258); std::__cxx11::string::~string((string *)local_278); cVar1 = std::__basic_file<char>::is_open(); if (cVar1 == '\0') { std::ifstream::~ifstream((ifstream *)local_238); goto LAB_0014a3ef; } local_2d0 = local_2c0; local_2c8 = 0; local_2c0[0] = 0; /* try { // try from 0014a3a4 to 0014a3c9 has its CatchHandler @ 0014a463 */ piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>> (local_238,(string *)&local_2d0); if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) { std::__detail:: _Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::insert((string *)&local_2b0); } std::__cxx11::string::~string((string *)&local_2d0); std::ifstream::~ifstream((ifstream *)local_238); uVar2 = uVar2 + 1; } while( true ); }
2,373
my_uca_scanner_init_any
eloqsql/strings/ctype-uca.c
static void my_uca_scanner_init_any(my_uca_scanner *scanner, CHARSET_INFO *cs, const MY_UCA_WEIGHT_LEVEL *level, const uchar *str, size_t length) { /* Note, no needs to initialize scanner->wbeg */ scanner->sbeg= str; scanner->send= str + length; scanner->wbeg= nochar; scanner->level= level; scanner->cs= cs; }
O0
c
my_uca_scanner_init_any: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x20(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax leaq 0x161081(%rip), %rcx # 0x1e7c80 movq %rcx, (%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x30(%rax) popq %rbp retq nopl (%rax)
my_uca_scanner_init_any: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rcx, [rbp+var_20] mov rax, [rbp+var_8] mov [rax+8], rcx mov rcx, [rbp+var_20] add rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_8] lea rcx, nochar mov [rax], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov [rax+18h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+30h], rcx pop rbp retn
_QWORD * my_uca_scanner_init_any(_QWORD *a1, long long a2, long long a3, long long a4, long long a5) { _QWORD *result; // rax a1[1] = a4; a1[2] = a5 + a4; *a1 = &nochar; a1[3] = a3; result = a1; a1[6] = a2; return result; }
my_uca_scanner_init_any: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x2e7c80] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],RCX POP RBP RET
void my_uca_scanner_init_any (int8 *param_1,int8 param_2,int8 param_3,long param_4,long param_5) { param_1[1] = param_4; param_1[2] = param_4 + param_5; *param_1 = &nochar; param_1[3] = param_3; param_1[6] = param_2; return; }
2,374
LefDefParser::defwRealPropDef(char const*, char const*, double, double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwRealPropDef(const char *objType, const char *propName, double leftRange, double rightRange, // optional double propValue // optional ) { if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_PROP_START && defwState != DEFW_PROP) return DEFW_BAD_ORDER; if ((!objType || !*objType) || (!propName || !*propName)) // require return DEFW_BAD_DATA; if (!defwIsPropObjType(objType)) return DEFW_BAD_DATA; fprintf(defwFile, " %s %s REAL ", objType, propName); if (leftRange || rightRange) fprintf(defwFile, "RANGE %.11g %.11g ", leftRange, rightRange); if (propValue) fprintf(defwFile, "%.11g ", propValue); fprintf(defwFile, ";\n"); defwLines++; defwState = DEFW_PROP; return DEFW_OK; }
O3
cpp
LefDefParser::defwRealPropDef(char const*, char const*, double, double, double): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp leaq 0x16423(%rip), %r13 # 0x1e168 movq (%r13), %r15 testq %r15, %r15 je 0x7e5a leaq 0x1641b(%rip), %r12 # 0x1e174 movl (%r12), %eax addl $-0xe, %eax movl $0x2, %ebp cmpl $-0x2, %eax jb 0x7e5f movq %rdi, %r14 movl $0x3, %ebp testq %rdi, %rdi je 0x7e5f movq %rsi, %rbx testq %rsi, %rsi je 0x7e5f cmpb $0x0, (%r14) je 0x7e5f cmpb $0x0, (%rbx) je 0x7e5f movq %r14, %rdi movsd %xmm2, 0x10(%rsp) movsd %xmm1, 0x8(%rsp) movsd %xmm0, (%rsp) callq 0x7b3b testl %eax, %eax je 0x7e5f leaq 0xd371(%rip), %rsi # 0x15137 movq %r15, %rdi movq %r14, %rdx movq %rbx, %rcx xorl %eax, %eax callq 0x10e0 movsd (%rsp), %xmm0 movsd 0x8(%rsp), %xmm1 xorpd %xmm2, %xmm2 ucomisd %xmm2, %xmm0 jne 0x7df5 jp 0x7df5 ucomisd %xmm2, %xmm1 jne 0x7df5 jnp 0x7e07 movq (%r13), %rdi leaq 0xd324(%rip), %rsi # 0x15124 movb $0x2, %al callq 0x10e0 xorpd %xmm1, %xmm1 movsd 0x10(%rsp), %xmm0 ucomisd %xmm1, %xmm0 jne 0x7e19 jnp 0x7e2b movq (%r13), %rdi leaq 0xd82b(%rip), %rsi # 0x1564f movb $0x1, %al callq 0x10e0 movq (%r13), %rcx leaq 0xd15c(%rip), %rdi # 0x14f92 movl $0x2, %esi movl $0x1, %edx callq 0x1110 leaq 0x16324(%rip), %rax # 0x1e170 incl (%rax) movl $0xd, (%r12) xorl %ebp, %ebp jmp 0x7e5f movl $0x1, %ebp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser15defwRealPropDefEPKcS1_ddd: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov r15, [r13+0] test r15, r15 jz loc_7E5A lea r12, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov eax, [r12] add eax, 0FFFFFFF2h mov ebp, 2 cmp eax, 0FFFFFFFEh jb loc_7E5F mov r14, rdi mov ebp, 3 test rdi, rdi jz loc_7E5F mov rbx, rsi test rsi, rsi jz loc_7E5F cmp byte ptr [r14], 0 jz loc_7E5F cmp byte ptr [rbx], 0 jz loc_7E5F mov rdi, r14; this movsd [rsp+48h+var_38], xmm2 movsd [rsp+48h+var_40], xmm1 movsd [rsp+48h+var_48], xmm0 call _ZN12LefDefParser17defwIsPropObjTypeEPKc; LefDefParser::defwIsPropObjType(char const*) test eax, eax jz loc_7E5F lea rsi, aSSReal; " %s %s REAL " mov rdi, r15 mov rdx, r14 mov rcx, rbx xor eax, eax call _fprintf movsd xmm0, [rsp+48h+var_48] movsd xmm1, [rsp+48h+var_40] xorpd xmm2, xmm2 ucomisd xmm0, xmm2 jnz short loc_7DF5 jp short loc_7DF5 ucomisd xmm1, xmm2 jnz short loc_7DF5 jnp short loc_7E07 loc_7DF5: mov rdi, [r13+0] lea rsi, aRange11g11g; "RANGE %.11g %.11g " mov al, 2 call _fprintf loc_7E07: xorpd xmm1, xmm1 movsd xmm0, [rsp+48h+var_38] ucomisd xmm0, xmm1 jnz short loc_7E19 jnp short loc_7E2B loc_7E19: mov rdi, [r13+0] lea rsi, aWeight11g+10h; "%.11g " mov al, 1 call _fprintf loc_7E2B: mov rcx, [r13+0] lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] mov dword ptr [r12], 0Dh xor ebp, ebp jmp short loc_7E5F loc_7E5A: mov ebp, 1 loc_7E5F: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defwRealPropDef( LefDefParser *this, const char *a2, const char *a3, double a4, double a5, double a6) { long long v6; // r15 unsigned int v7; // ebp v6 = LefDefParser::defwFile; if ( LefDefParser::defwFile ) { v7 = 2; if ( (unsigned int)(LefDefParser::defwState - 14) >= 0xFFFFFFFE ) { v7 = 3; if ( this ) { if ( a2 && *(_BYTE *)this && *a2 && (unsigned int)LefDefParser::defwIsPropObjType(this, a2) ) { fprintf(v6, " %s %s REAL ", (const char *)this, a2); if ( a4 != 0.0 || a5 != 0.0 ) fprintf(LefDefParser::defwFile, "RANGE %.11g %.11g ", a4, a5); if ( a6 != 0.0 ) fprintf(LefDefParser::defwFile, "%.11g ", a6); fwrite(";\n", 2LL, 1LL, LefDefParser::defwFile); ++LefDefParser::defwLines; LefDefParser::defwState = 13; return 0; } } } } else { return 1; } return v7; }
defwRealPropDef: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 LEA R13,[0x11e168] MOV R15,qword ptr [R13] TEST R15,R15 JZ 0x00107e5a LEA R12,[0x11e174] MOV EAX,dword ptr [R12] ADD EAX,-0xe MOV EBP,0x2 CMP EAX,-0x2 JC 0x00107e5f MOV R14,RDI MOV EBP,0x3 TEST RDI,RDI JZ 0x00107e5f MOV RBX,RSI TEST RSI,RSI JZ 0x00107e5f CMP byte ptr [R14],0x0 JZ 0x00107e5f CMP byte ptr [RBX],0x0 JZ 0x00107e5f MOV RDI,R14 MOVSD qword ptr [RSP + 0x10],XMM2 MOVSD qword ptr [RSP + 0x8],XMM1 MOVSD qword ptr [RSP],XMM0 CALL 0x00107b3b TEST EAX,EAX JZ 0x00107e5f LEA RSI,[0x115137] MOV RDI,R15 MOV RDX,R14 MOV RCX,RBX XOR EAX,EAX CALL 0x001010e0 MOVSD XMM0,qword ptr [RSP] MOVSD XMM1,qword ptr [RSP + 0x8] XORPD XMM2,XMM2 UCOMISD XMM0,XMM2 JNZ 0x00107df5 JP 0x00107df5 UCOMISD XMM1,XMM2 JNZ 0x00107df5 JNP 0x00107e07 LAB_00107df5: MOV RDI,qword ptr [R13] LEA RSI,[0x115124] MOV AL,0x2 CALL 0x001010e0 LAB_00107e07: XORPD XMM1,XMM1 MOVSD XMM0,qword ptr [RSP + 0x10] UCOMISD XMM0,XMM1 JNZ 0x00107e19 JNP 0x00107e2b LAB_00107e19: MOV RDI,qword ptr [R13] LEA RSI,[0x11564f] MOV AL,0x1 CALL 0x001010e0 LAB_00107e2b: MOV RCX,qword ptr [R13] LEA RDI,[0x114f92] MOV ESI,0x2 MOV EDX,0x1 CALL 0x00101110 LEA RAX,[0x11e170] INC dword ptr [RAX] MOV dword ptr [R12],0xd XOR EBP,EBP JMP 0x00107e5f LAB_00107e5a: MOV EBP,0x1 LAB_00107e5f: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defwRealPropDef(char const*, char const*, double, double, double) */ int8 LefDefParser::defwRealPropDef (char *param_1,char *param_2,double param_3,double param_4,double param_5) { FILE *__stream; int iVar1; int8 uVar2; __stream = defwFile; if (defwFile == (FILE *)0x0) { uVar2 = 1; } else { uVar2 = 2; if ((((0xfffffffd < defwState - 0xeU) && (uVar2 = 3, param_1 != (char *)0x0)) && (param_2 != (char *)0x0)) && ((*param_1 != '\0' && (*param_2 != '\0')))) { iVar1 = defwIsPropObjType(param_1); if (iVar1 != 0) { fprintf(__stream," %s %s REAL ",param_1,param_2); if (((param_3 != 0.0) || (NAN(param_3))) || ((param_4 != 0.0 || (NAN(param_4))))) { fprintf(defwFile,"RANGE %.11g %.11g "); } if ((param_5 != 0.0) || (NAN(param_5))) { fprintf(defwFile,"%.11g "); } fwrite(";\n",2,1,defwFile); defwLines = defwLines + 1; defwState = 0xd; uVar2 = 0; } } } return uVar2; }
2,375
file_normalize_path
tsotchke[P]eshkol/src/core/utils/file_io.c
char* file_normalize_path(Arena* arena, const char* path) { assert(arena != NULL); assert(path != NULL); // Get the absolute path char* absolute_path = file_get_absolute_path(arena, path); if (!absolute_path) { return NULL; } set_last_error(FILE_ERROR_NONE); return absolute_path; }
O0
c
file_normalize_path: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5ed9 jmp 0x5ef8 leaq 0x15e0(%rip), %rdi # 0x74c0 leaq 0x1eea(%rip), %rsi # 0x7dd1 movl $0x324, %edx # imm = 0x324 leaq 0x228c(%rip), %rcx # 0x817f callq 0x2170 cmpq $0x0, -0x18(%rbp) je 0x5f01 jmp 0x5f20 leaq 0x2040(%rip), %rdi # 0x7f48 leaq 0x1ec2(%rip), %rsi # 0x7dd1 movl $0x325, %edx # imm = 0x325 leaq 0x2264(%rip), %rcx # 0x817f callq 0x2170 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x5840 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x5f42 movq $0x0, -0x8(%rbp) jmp 0x5f51 xorl %edi, %edi callq 0x4920 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
file_normalize_path: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_5ED9 jmp short loc_5EF8 loc_5ED9: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 324h lea rcx, aCharFileNormal; "char *file_normalize_path(Arena *, cons"... call ___assert_fail loc_5EF8: cmp [rbp+var_18], 0 jz short loc_5F01 jmp short loc_5F20 loc_5F01: lea rdi, aSrcPathNull+4; "path != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 325h lea rcx, aCharFileNormal; "char *file_normalize_path(Arena *, cons"... call ___assert_fail loc_5F20: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call file_get_absolute_path mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_5F42 mov [rbp+var_8], 0 jmp short loc_5F51 loc_5F42: xor edi, edi call set_last_error mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_5F51: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long file_normalize_path(long long a1, long long a2) { long long absolute_path; // [rsp+0h] [rbp-20h] if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c", 804LL, "char *file_normalize_path(Arena *, const char *)"); if ( !a2 ) __assert_fail( "path != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/file_io.c", 805LL, "char *file_normalize_path(Arena *, const char *)"); absolute_path = file_get_absolute_path(a1, a2); if ( !absolute_path ) return 0LL; set_last_error(0); return absolute_path; }
file_normalize_path: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x00105ed9 JMP 0x00105ef8 LAB_00105ed9: LEA RDI,[0x1074ae] LEA RSI,[0x107dad] MOV EDX,0x324 LEA RCX,[0x108149] CALL 0x00102170 LAB_00105ef8: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00105f01 JMP 0x00105f20 LAB_00105f01: LEA RDI,[0x107f12] LEA RSI,[0x107dad] MOV EDX,0x325 LEA RCX,[0x108149] CALL 0x00102170 LAB_00105f20: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00105840 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00105f42 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00105f51 LAB_00105f42: XOR EDI,EDI CALL 0x00104920 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00105f51: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long file_normalize_path(long param_1,long param_2) { long local_10; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c" ,0x324,"char *file_normalize_path(Arena *, const char *)"); } if (param_2 != 0) { local_10 = file_get_absolute_path(param_1,param_2); if (local_10 == 0) { local_10 = 0; } else { set_last_error(0); } return local_10; } /* WARNING: Subroutine does not return */ __assert_fail("path != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/file_io.c", 0x325,"char *file_normalize_path(Arena *, const char *)"); }
2,376
Tablespace::get_sum_of_sizes() const
eloqsql/storage/innobase/include/fsp0space.h
uint32_t get_sum_of_sizes() const { uint32_t sum = 0; for (const_iterator it = begin(); it != end(); ++it) { sum += it->m_size; } return(sum); }
O0
c
Tablespace::get_sum_of_sizes() const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) movl $0x0, -0xc(%rbp) callq 0x1080a20 movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rdi callq 0x1080a50 movq %rax, -0x20(%rbp) leaq -0x18(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0x8230f0 testb $0x1, %al jne 0x1080474 jmp 0x1080491 leaq -0x18(%rbp), %rdi callq 0x823130 movl 0x2c(%rax), %eax addl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) leaq -0x18(%rbp), %rdi callq 0x823150 jmp 0x1080454 movl -0xc(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ZNK10Tablespace16get_sum_of_sizesEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_28], rdi mov [rbp+var_C], 0 call _ZNK10Tablespace5beginEv; Tablespace::begin(void) mov [rbp+var_18], rax loc_1080454: mov rdi, [rbp+var_28]; this call _ZNK10Tablespace3endEv; Tablespace::end(void) mov [rbp+var_20], rax lea rdi, [rbp+var_18] lea rsi, [rbp+var_20] call _ZN9__gnu_cxxneIPK8DatafileSt6vectorIS1_12ut_allocatorIS1_Lb1EEEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>(__gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>> const&,__gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>> const&) test al, 1 jnz short loc_1080474 jmp short loc_1080491 loc_1080474: lea rdi, [rbp+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPK8DatafileSt6vectorIS1_12ut_allocatorIS1_Lb1EEEEptEv; __gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>::operator->(void) mov eax, [rax+2Ch] add eax, [rbp+var_C] mov [rbp+var_C], eax lea rdi, [rbp+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPK8DatafileSt6vectorIS1_12ut_allocatorIS1_Lb1EEEEppEv; __gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>::operator++(void) jmp short loc_1080454 loc_1080491: mov eax, [rbp+var_C] add rsp, 30h pop rbp retn
long long Tablespace::get_sum_of_sizes(Tablespace *this) { long long v1; // rax long long v3; // [rsp+10h] [rbp-20h] BYREF long long i; // [rsp+18h] [rbp-18h] BYREF unsigned int v5; // [rsp+24h] [rbp-Ch] Tablespace *v6; // [rsp+28h] [rbp-8h] v6 = this; v5 = 0; for ( i = Tablespace::begin(this); ; __gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>::operator++(&i) ) { v3 = Tablespace::end(this); if ( !__gnu_cxx::operator!=<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>( (long long)&i, (long long)&v3) ) break; v1 = __gnu_cxx::__normal_iterator<Datafile const*,std::vector<Datafile,ut_allocator<Datafile,true>>>::operator->((long long)&i); v5 += *(_DWORD *)(v1 + 44); } return v5; }
set_user_key: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x14],0x0 JBE 0x01080473 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX CALL 0x00876440 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_01080473: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x184],ECX ADD RSP,0x20 POP RBP RET
/* set_user_key(PFS_user_key*, char const*, unsigned int) */ void set_user_key(PFS_user_key *param_1,char *param_2,uint param_3) { PFS_user_key *local_28; local_28 = param_1; if (param_3 != 0) { memcpy(param_1,param_2,(ulong)param_3); local_28 = param_1 + param_3; } *local_28 = (PFS_user_key)0x0; *(int *)(param_1 + 0x184) = ((int)local_28 + 1) - (int)param_1; return; }
2,377
stbi_is_16_bit_from_callbacks
llama.cpp/examples/llava/../../common/stb_image.h
static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) { s->io = *c; s->io_user_data = user; s->buflen = sizeof(s->buffer_start); s->read_from_callbacks = 1; s->callback_already_read = 0; s->img_buffer = s->img_buffer_original = s->buffer_start; stbi__refill_buffer(s); s->img_buffer_original_end = s->img_buffer_end; }
O3
c
stbi_is_16_bit_from_callbacks: pushq %rbx subq $0xe0, %rsp movq 0x10(%rdi), %rax leaq 0x38(%rsp), %rcx movq %rax, -0x18(%rcx) movups (%rdi), %xmm0 movups %xmm0, -0x28(%rcx) movq %rsi, -0x10(%rcx) movabsq $0x8000000001, %rax # imm = 0x8000000001 movq %rax, -0x8(%rcx) movl $0x0, 0x80(%rcx) movq %rcx, 0x98(%rcx) movq %rcx, 0x88(%rcx) movq %rsp, %rbx movq %rbx, %rdi callq 0x2f0a9 movq 0xc8(%rbx), %rax movq %rax, 0xd8(%rbx) movq %rbx, %rdi callq 0x231dc addq $0xe0, %rsp popq %rbx retq
stbi_is_16_bit_from_callbacks: push rbx sub rsp, 0E0h mov rax, [rdi+10h] lea rcx, [rsp+0E8h+var_B0] mov [rcx-18h], rax movups xmm0, xmmword ptr [rdi] movups xmmword ptr [rcx-28h], xmm0 mov [rcx-10h], rsi mov rax, 8000000001h mov [rcx-8], rax mov dword ptr [rcx+80h], 0 mov [rcx+98h], rcx mov [rcx+88h], rcx mov rbx, rsp mov rdi, rbx call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [rbx+0C8h] mov [rbx+0D8h], rax mov rdi, rbx call _ZL16stbi__is_16_mainP13stbi__context; stbi__is_16_main(stbi__context *) add rsp, 0E0h pop rbx retn
_BOOL8 stbi_is_16_bit_from_callbacks(long long a1, long long a2) { _OWORD v3[2]; // [rsp+0h] [rbp-E8h] BYREF long long v4; // [rsp+20h] [rbp-C8h] long long v5; // [rsp+28h] [rbp-C0h] long long v6; // [rsp+30h] [rbp-B8h] _BYTE v7[128]; // [rsp+38h] [rbp-B0h] BYREF int v8; // [rsp+B8h] [rbp-30h] _BYTE *v9; // [rsp+C0h] [rbp-28h] long long v10; // [rsp+C8h] [rbp-20h] _BYTE *v11; // [rsp+D0h] [rbp-18h] long long v12; // [rsp+D8h] [rbp-10h] v4 = *(_QWORD *)(a1 + 16); v3[1] = *(_OWORD *)a1; v5 = a2; v6 = 0x8000000001LL; v8 = 0; v11 = v7; v9 = v7; stbi__refill_buffer(v3); v12 = v10; return stbi__is_16_main((long long)v3); }
stbi_is_16_bit_from_callbacks: PUSH RBX SUB RSP,0xe0 MOV RAX,qword ptr [RDI + 0x10] LEA RCX,[RSP + 0x38] MOV qword ptr [RCX + -0x18],RAX MOVUPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RCX + -0x28],XMM0 MOV qword ptr [RCX + -0x10],RSI MOV RAX,0x8000000001 MOV qword ptr [RCX + -0x8],RAX MOV dword ptr [RCX + 0x80],0x0 MOV qword ptr [RCX + 0x98],RCX MOV qword ptr [RCX + 0x88],RCX MOV RBX,RSP MOV RDI,RBX CALL 0x0012f0a9 MOV RAX,qword ptr [RBX + 0xc8] MOV qword ptr [RBX + 0xd8],RAX MOV RDI,RBX CALL 0x001231dc ADD RSP,0xe0 POP RBX RET
void stbi_is_16_bit_from_callbacks(int8 *param_1,int8 param_2) { stbi__context asStack_e8 [16]; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 local_c0; int8 local_b8; int1 local_b0 [128]; int4 local_30; int1 *local_28; int8 local_20; int1 *local_18; int8 local_10; local_c8 = param_1[2]; local_28 = local_b0; local_d8 = *param_1; uStack_d0 = param_1[1]; local_b8 = 0x8000000001; local_30 = 0; local_c0 = param_2; local_18 = local_28; stbi__refill_buffer(asStack_e8); local_10 = local_20; stbi__is_16_main(asStack_e8); return; }
2,378
miller_loop_n
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/pairing.c
static void miller_loop_n(vec384fp12 ret, const POINTonE2_affine Q[], const POINTonE1_affine P[], size_t n) { #if !defined(__STDC_VERSION__) || __STDC_VERSION__<199901 \ || defined(__STDC_NO_VLA__) POINTonE2 *T = alloca(n*sizeof(POINTonE2)); POINTonE1_affine *Px2 = alloca(n*sizeof(POINTonE1_affine)); #else POINTonE2 T[n]; POINTonE1_affine Px2[n]; #endif size_t i; if ((n == 1) && (vec_is_zero(&Q[0], sizeof(Q[0])) | vec_is_zero(&P[0], sizeof(P[0]))) ) { /* * Special case of infinite aggregated signature, pair the additive * group's identity with the multiplicative group's identity. */ vec_copy(ret, BLS12_381_Rx.p12, sizeof(vec384fp12)); return; } for (i = 0; i < n; i++) { /* Move common expression from line evaluation to line_by_Px2. */ add_fp(Px2[i].X, P[i].X, P[i].X); neg_fp(Px2[i].X, Px2[i].X); add_fp(Px2[i].Y, P[i].Y, P[i].Y); vec_copy(T[i].X, Q[i].X, 2*sizeof(T[i].X)); vec_copy(T[i].Z, BLS12_381_Rx.p2, sizeof(T[i].Z)); } /* first step is ret = 1^2*line, which is replaced with ret = line */ start_dbl_n(ret, T, Px2, n); /* 0x2 */ add_n_dbl_n(ret, T, Q, Px2, n, 2); /* ..0xc */ add_n_dbl_n(ret, T, Q, Px2, n, 3); /* ..0x68 */ add_n_dbl_n(ret, T, Q, Px2, n, 9); /* ..0xd200 */ add_n_dbl_n(ret, T, Q, Px2, n, 32); /* ..0xd20100000000 */ add_n_dbl_n(ret, T, Q, Px2, n, 16); /* ..0xd201000000010000 */ conjugate_fp12(ret); /* account for z being negative */ }
O0
c
miller_loop_n: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rsp, %rcx movq %rcx, -0x28(%rbp) movq %rax, %rcx shlq $0x5, %rcx leaq (%rcx,%rcx,8), %rdx movq %rsp, %rcx subq %rdx, %rcx movq %rcx, -0x58(%rbp) movq %rcx, %rsp movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx shlq $0x5, %rcx leaq (%rcx,%rcx,2), %rdx movq %rsp, %rcx subq %rdx, %rcx movq %rcx, -0x50(%rbp) movq %rcx, %rsp movq %rax, -0x38(%rbp) cmpq $0x1, -0x20(%rbp) jne 0x2a3b7 movq -0x10(%rbp), %rdi movl $0xc0, %esi callq 0x23820 movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rdi movl $0x60, %esi callq 0x23820 movq %rax, %rcx movq -0x60(%rbp), %rax orq %rcx, %rax cmpq $0x0, %rax je 0x2a3b7 movq -0x8(%rbp), %rdi leaq 0x2a987(%rip), %rsi # 0x54d28 movl $0x240, %edx # imm = 0x240 callq 0x23620 movl $0x1, -0x44(%rbp) jmp 0x2a56c movq $0x0, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x2a4ac movq -0x50(%rbp), %rdi imulq $0x60, -0x40(%rbp), %rax addq %rax, %rdi movq -0x18(%rbp), %rsi imulq $0x60, -0x40(%rbp), %rax addq %rax, %rsi movq -0x18(%rbp), %rdx imulq $0x60, -0x40(%rbp), %rax addq %rax, %rdx callq 0x2a930 movq -0x50(%rbp), %rsi imulq $0x60, -0x40(%rbp), %rax movq %rsi, %rdi addq %rax, %rdi imulq $0x60, -0x40(%rbp), %rax addq %rax, %rsi movl $0x1, %edx callq 0x2a970 movq -0x50(%rbp), %rdi imulq $0x60, -0x40(%rbp), %rax addq %rax, %rdi addq $0x30, %rdi movq -0x18(%rbp), %rsi imulq $0x60, -0x40(%rbp), %rax addq %rax, %rsi addq $0x30, %rsi movq -0x18(%rbp), %rdx imulq $0x60, -0x40(%rbp), %rax addq %rax, %rdx addq $0x30, %rdx callq 0x2a930 movq -0x58(%rbp), %rdi imulq $0x120, -0x40(%rbp), %rax # imm = 0x120 addq %rax, %rdi movq -0x10(%rbp), %rsi imulq $0xc0, -0x40(%rbp), %rax addq %rax, %rsi movl $0xc0, %edx callq 0x23620 movq -0x58(%rbp), %rdi imulq $0x120, -0x40(%rbp), %rax # imm = 0x120 addq %rax, %rdi addq $0xc0, %rdi leaq 0x2a897(%rip), %rsi # 0x54d28 movl $0x60, %edx callq 0x23620 movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x2a3bf movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rsi movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rcx callq 0x2a9b0 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rcx movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x20(%rbp), %r8 movl $0x2, %r9d callq 0x2aac0 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rcx movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x20(%rbp), %r8 movl $0x3, %r9d callq 0x2aac0 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rcx movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x20(%rbp), %r8 movl $0x9, %r9d callq 0x2aac0 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rcx movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x20(%rbp), %r8 movl $0x20, %r9d callq 0x2aac0 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rcx movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x20(%rbp), %r8 movl $0x10, %r9d callq 0x2aac0 movq -0x8(%rbp), %rdi callq 0x29d90 movl $0x0, -0x44(%rbp) movq -0x28(%rbp), %rax movq %rax, %rsp movq %rbp, %rsp popq %rbp retq nopl (%rax,%rax)
miller_loop_n: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_20] mov rcx, rsp mov [rbp+var_28], rcx mov rcx, rax shl rcx, 5 lea rdx, [rcx+rcx*8] mov rcx, rsp sub rcx, rdx mov [rbp+var_58], rcx mov rsp, rcx mov [rbp+var_30], rax mov rax, [rbp+var_20] mov rcx, rax shl rcx, 5 lea rdx, [rcx+rcx*2] mov rcx, rsp sub rcx, rdx mov [rbp+var_50], rcx mov rsp, rcx mov [rbp+var_38], rax cmp [rbp+var_20], 1 jnz short loc_2A3B7 mov rdi, [rbp+var_10] mov esi, 0C0h call vec_is_zero mov [rbp+var_60], rax mov rdi, [rbp+var_18] mov esi, 60h ; '`' call vec_is_zero mov rcx, rax mov rax, [rbp+var_60] or rax, rcx cmp rax, 0 jz short loc_2A3B7 mov rdi, [rbp+var_8] lea rsi, BLS12_381_Rx mov edx, 240h call vec_copy mov [rbp+var_44], 1 jmp loc_2A56C loc_2A3B7: mov [rbp+var_40], 0 loc_2A3BF: mov rax, [rbp+var_40] cmp rax, [rbp+var_20] jnb loc_2A4AC mov rdi, [rbp+var_50] imul rax, [rbp+var_40], 60h ; '`' add rdi, rax mov rsi, [rbp+var_18] imul rax, [rbp+var_40], 60h ; '`' add rsi, rax mov rdx, [rbp+var_18] imul rax, [rbp+var_40], 60h ; '`' add rdx, rax call add_fp mov rsi, [rbp+var_50] imul rax, [rbp+var_40], 60h ; '`' mov rdi, rsi add rdi, rax imul rax, [rbp+var_40], 60h ; '`' add rsi, rax mov edx, 1 call cneg_fp mov rdi, [rbp+var_50] imul rax, [rbp+var_40], 60h ; '`' add rdi, rax add rdi, 30h ; '0' mov rsi, [rbp+var_18] imul rax, [rbp+var_40], 60h ; '`' add rsi, rax add rsi, 30h ; '0' mov rdx, [rbp+var_18] imul rax, [rbp+var_40], 60h ; '`' add rdx, rax add rdx, 30h ; '0' call add_fp mov rdi, [rbp+var_58] imul rax, [rbp+var_40], 120h add rdi, rax mov rsi, [rbp+var_10] imul rax, [rbp+var_40], 0C0h add rsi, rax mov edx, 0C0h call vec_copy mov rdi, [rbp+var_58] imul rax, [rbp+var_40], 120h add rdi, rax add rdi, 0C0h lea rsi, BLS12_381_Rx mov edx, 60h ; '`' call vec_copy mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp loc_2A3BF loc_2A4AC: mov rdx, [rbp+var_50] mov rsi, [rbp+var_58] mov rdi, [rbp+var_8] mov rcx, [rbp+var_20] call start_dbl_n mov rsi, [rbp+var_58] mov rcx, [rbp+var_50] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov r8, [rbp+var_20] mov r9d, 2 call add_n_dbl_n mov rsi, [rbp+var_58] mov rcx, [rbp+var_50] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov r8, [rbp+var_20] mov r9d, 3 call add_n_dbl_n mov rsi, [rbp+var_58] mov rcx, [rbp+var_50] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov r8, [rbp+var_20] mov r9d, 9 call add_n_dbl_n mov rsi, [rbp+var_58] mov rcx, [rbp+var_50] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov r8, [rbp+var_20] mov r9d, 20h ; ' ' call add_n_dbl_n mov rsi, [rbp+var_58] mov rcx, [rbp+var_50] mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov r8, [rbp+var_20] mov r9d, 10h call add_n_dbl_n mov rdi, [rbp+var_8] call conjugate_fp12 mov [rbp+var_44], 0 loc_2A56C: mov rax, [rbp+var_28] mov rsp, rax mov rsp, rbp pop rbp retn
unsigned long long * miller_loop_n(long long a1, long long a2, long long a3, unsigned long long a4) { unsigned long long v4; // rax unsigned long long is_zero; // [rsp+0h] [rbp-60h] BYREF unsigned long long *v7; // [rsp+8h] [rbp-58h] unsigned long long *v8; // [rsp+10h] [rbp-50h] int v9; // [rsp+1Ch] [rbp-44h] unsigned long long i; // [rsp+20h] [rbp-40h] unsigned long long v11; // [rsp+28h] [rbp-38h] unsigned long long v12; // [rsp+30h] [rbp-30h] unsigned long long *v13; // [rsp+38h] [rbp-28h] unsigned long long v14; // [rsp+40h] [rbp-20h] long long v15; // [rsp+48h] [rbp-18h] long long v16; // [rsp+50h] [rbp-10h] long long v17; // [rsp+58h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = &is_zero; v7 = &is_zero - 36 * a4; v12 = a4; v8 = &is_zero - 12 * a4; v11 = a4; if ( a4 == 1 && (is_zero = vec_is_zero(v16, 0xC0uLL), v4 = vec_is_zero(v15, 0x60uLL), v4 | is_zero) ) { vec_copy(v17, (long long)&BLS12_381_Rx, 0x240uLL); v9 = 1; } else { for ( i = 0LL; i < v14; ++i ) { add_fp(&v8[12 * i], 96 * i + v15, 96 * i + v15); cneg_fp(&v8[12 * i], &v8[12 * i], 1LL); add_fp(&v8[12 * i + 6], 96 * i + v15 + 48, 96 * i + v15 + 48); vec_copy((long long)&v7[36 * i], 192 * i + v16, 0xC0uLL); vec_copy((long long)&v7[36 * i + 24], (long long)&BLS12_381_Rx, 0x60uLL); } start_dbl_n(v17, v7, v8, v14); add_n_dbl_n(v17, v7, v16, v8, v14, 2LL); add_n_dbl_n(v17, v7, v16, v8, v14, 3LL); add_n_dbl_n(v17, v7, v16, v8, v14, 9LL); add_n_dbl_n(v17, v7, v16, v8, v14, 32LL); add_n_dbl_n(v17, v7, v16, v8, v14, 16LL); conjugate_fp12(v17); v9 = 0; } return v13; }
miller_loop_n: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RSP MOV qword ptr [RBP + -0x28],RCX MOV RCX,RAX SHL RCX,0x5 LEA RDX,[RCX + RCX*0x8] MOV RCX,RSP SUB RCX,RDX MOV qword ptr [RBP + -0x58],RCX MOV RSP,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX SHL RCX,0x5 LEA RDX,[RCX + RCX*0x2] MOV RCX,RSP SUB RCX,RDX MOV qword ptr [RBP + -0x50],RCX MOV RSP,RCX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x20],0x1 JNZ 0x0012a3b7 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0xc0 CALL 0x00123820 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x60 CALL 0x00123820 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x60] OR RAX,RCX CMP RAX,0x0 JZ 0x0012a3b7 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x154d28] MOV EDX,0x240 CALL 0x00123620 MOV dword ptr [RBP + -0x44],0x1 JMP 0x0012a56c LAB_0012a3b7: MOV qword ptr [RBP + -0x40],0x0 LAB_0012a3bf: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0012a4ac MOV RDI,qword ptr [RBP + -0x50] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RDX,RAX CALL 0x0012a930 MOV RSI,qword ptr [RBP + -0x50] IMUL RAX,qword ptr [RBP + -0x40],0x60 MOV RDI,RSI ADD RDI,RAX IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RSI,RAX MOV EDX,0x1 CALL 0x0012a970 MOV RDI,qword ptr [RBP + -0x50] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RDI,RAX ADD RDI,0x30 MOV RSI,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RSI,RAX ADD RSI,0x30 MOV RDX,qword ptr [RBP + -0x18] IMUL RAX,qword ptr [RBP + -0x40],0x60 ADD RDX,RAX ADD RDX,0x30 CALL 0x0012a930 MOV RDI,qword ptr [RBP + -0x58] IMUL RAX,qword ptr [RBP + -0x40],0x120 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] IMUL RAX,qword ptr [RBP + -0x40],0xc0 ADD RSI,RAX MOV EDX,0xc0 CALL 0x00123620 MOV RDI,qword ptr [RBP + -0x58] IMUL RAX,qword ptr [RBP + -0x40],0x120 ADD RDI,RAX ADD RDI,0xc0 LEA RSI,[0x154d28] MOV EDX,0x60 CALL 0x00123620 MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x0012a3bf LAB_0012a4ac: MOV RDX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] CALL 0x0012a9b0 MOV RSI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] MOV R9D,0x2 CALL 0x0012aac0 MOV RSI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] MOV R9D,0x3 CALL 0x0012aac0 MOV RSI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] MOV R9D,0x9 CALL 0x0012aac0 MOV RSI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] MOV R9D,0x20 CALL 0x0012aac0 MOV RSI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RBP + -0x20] MOV R9D,0x10 CALL 0x0012aac0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00129d90 MOV dword ptr [RBP + -0x44],0x0 LAB_0012a56c: MOV RAX,qword ptr [RBP + -0x28] MOV RSP,RAX MOV RSP,RBP POP RBP RET
/* WARNING: Type propagation algorithm not settling */ int8 * miller_loop_n(int8 param_1,long param_2,long param_3,ulong param_4) { ulong uVar1; int8 uVar2; int8 *puVar3; long lVar4; long lVar5; long lVar6; long lVar7; int8 uStack_70; long local_68; long local_60; long local_58; ulong local_48; ulong local_40; ulong local_38; int8 *local_30; ulong local_28; long local_20; long local_18; int8 local_10; local_30 = &local_68; local_60 = (long)&local_68 + param_4 * -0x120; lVar5 = local_60 + param_4 * -0x60; local_58 = lVar5; local_40 = param_4; local_38 = param_4; puVar3 = &local_68; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; if (param_4 == 1) { *(int8 *)(lVar5 + -8) = 0x12a374; local_68 = vec_is_zero(param_2,0xc0); lVar4 = local_20; *(int8 *)(lVar5 + -8) = 0x12a386; lVar4 = vec_is_zero(lVar4,0x60); uVar2 = local_10; puVar3 = local_30; if (local_68 != 0 || lVar4 != 0) { *(int8 *)(lVar5 + -8) = 0x12a3ab; vec_copy(uVar2,BLS12_381_Rx,0x240); return local_30; } } local_30 = puVar3; for (local_48 = 0; uVar2 = local_10, uVar1 = local_28, lVar6 = local_58, lVar4 = local_60, local_48 < local_28; local_48 = local_48 + 1) { lVar7 = local_58 + local_48 * 0x60; lVar6 = local_20 + local_48 * 0x60; lVar4 = local_20 + local_48 * 0x60; *(int8 *)(lVar5 + -8) = 0x12a3f6; add_fp(lVar7,lVar6,lVar4); lVar6 = local_58 + local_48 * 0x60; lVar4 = local_58 + local_48 * 0x60; *(int8 *)(lVar5 + -8) = 0x12a417; cneg_fp(lVar6,lVar4,1); lVar7 = local_58 + (local_48 * 0xc + 6) * 8; lVar6 = local_20 + local_48 * 0x60; lVar4 = local_20 + local_48 * 0x60; *(int8 *)(lVar5 + -8) = 0x12a44c; add_fp(lVar7,lVar6 + 0x30,lVar4 + 0x30); lVar6 = local_60 + local_48 * 0x120; lVar4 = local_18 + local_48 * 0xc0; *(int8 *)(lVar5 + -8) = 0x12a474; vec_copy(lVar6,lVar4,0xc0); lVar4 = local_60 + (local_48 * 0x24 + 0x18) * 8; *(int8 *)(lVar5 + -8) = 0x12a49b; vec_copy(lVar4,BLS12_381_Rx,0x60); } *(int8 *)(lVar5 + -8) = 0x12a4c1; start_dbl_n(uVar2,lVar4,lVar6,uVar1); uVar2 = local_10; lVar7 = local_18; uVar1 = local_28; lVar6 = local_58; lVar4 = local_60; *(int8 *)(lVar5 + -8) = 0x12a4e0; add_n_dbl_n(uVar2,lVar4,lVar7,lVar6,uVar1,2); uVar2 = local_10; lVar7 = local_18; uVar1 = local_28; lVar6 = local_58; lVar4 = local_60; *(int8 *)(lVar5 + -8) = 0x12a4ff; add_n_dbl_n(uVar2,lVar4,lVar7,lVar6,uVar1,3); uVar2 = local_10; lVar7 = local_18; uVar1 = local_28; lVar6 = local_58; lVar4 = local_60; *(int8 *)(lVar5 + -8) = 0x12a51e; add_n_dbl_n(uVar2,lVar4,lVar7,lVar6,uVar1,9); uVar2 = local_10; lVar7 = local_18; uVar1 = local_28; lVar6 = local_58; lVar4 = local_60; *(int8 *)(lVar5 + -8) = 0x12a53d; add_n_dbl_n(uVar2,lVar4,lVar7,lVar6,uVar1,0x20); uVar2 = local_10; lVar7 = local_18; uVar1 = local_28; lVar6 = local_58; lVar4 = local_60; *(int8 *)(lVar5 + -8) = 0x12a55c; add_n_dbl_n(uVar2,lVar4,lVar7,lVar6,uVar1,0x10); uVar2 = local_10; *(int8 *)(lVar5 + -8) = 0x12a565; conjugate_fp12(uVar2); return local_30; }
2,379
_bf_div
bluesky950520[P]quickjs/libbf.c
static int __bf_div(bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags) { bf_context_t *s = r->ctx; int ret, r_sign; limb_t n, nb, precl; r_sign = a->sign ^ b->sign; if (a->expn >= BF_EXP_INF || b->expn >= BF_EXP_INF) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bf_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF && b->expn == BF_EXP_INF) { bf_set_nan(r); return BF_ST_INVALID_OP; } else if (a->expn == BF_EXP_INF) { bf_set_inf(r, r_sign); return 0; } else { bf_set_zero(r, r_sign); return 0; } } else if (a->expn == BF_EXP_ZERO) { if (b->expn == BF_EXP_ZERO) { bf_set_nan(r); return BF_ST_INVALID_OP; } else { bf_set_zero(r, r_sign); return 0; } } else if (b->expn == BF_EXP_ZERO) { bf_set_inf(r, r_sign); return BF_ST_DIVIDE_ZERO; } /* number of limbs of the quotient (2 extra bits for rounding) */ precl = (prec + 2 + LIMB_BITS - 1) / LIMB_BITS; nb = b->len; n = bf_max(a->len, precl); { limb_t *taba, na; slimb_t d; na = n + nb; #if LIMB_LOG2_BITS == 6 if (na >= (SIZE_MAX / sizeof(limb_t)) - 1) { return BF_ST_MEM_ERROR; /* Return memory error status */ } #endif taba = bf_malloc(s, (na + 1) * sizeof(limb_t)); if (!taba) goto fail; d = na - a->len; memset(taba, 0, d * sizeof(limb_t)); memcpy(taba + d, a->tab, a->len * sizeof(limb_t)); if (bf_resize(r, n + 1)) goto fail1; if (mp_divnorm(s, r->tab, taba, na, b->tab, nb)) { fail1: bf_free(s, taba); goto fail; } /* see if non zero remainder */ if (mp_scan_nz(taba, nb)) r->tab[0] |= 1; bf_free(r->ctx, taba); r->expn = a->expn - b->expn + LIMB_BITS; r->sign = r_sign; ret = bf_normalize_and_round(r, prec, flags); } return ret; fail: bf_set_nan(r); return BF_ST_MEM_ERROR; }
O2
c
_bf_div: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %rbx movabsq $0x7ffffffffffffffd, %rax # imm = 0x7FFFFFFFFFFFFFFD movl 0x8(%rdx), %ebp xorl 0x8(%rsi), %ebp movq 0x10(%rsi), %rcx cmpq %rax, %rcx jle 0x71d3e leaq 0x2(%rax), %rdx cmpq %rdx, %rcx je 0x71d51 movq 0x10(%r12), %rdx jmp 0x71d48 movq 0x10(%r12), %rdx cmpq %rax, %rdx jle 0x71d5e leaq 0x2(%rax), %rsi cmpq %rsi, %rdx jne 0x71d6e movq %rbx, %rdi callq 0x6f5cd xorl %r14d, %r14d jmp 0x71d9e addq $0x3, %rax cmpq %rax, %rcx jne 0x71d8b cmpq %rax, %rdx je 0x71d7f jmp 0x71dc1 incq %rax movq %rcx, %rsi xorq %rax, %rsi xorq %rax, %rdx orq %rsi, %rdx jne 0x71db0 movq %rbx, %rdi callq 0x6f5cd pushq $0x1 jmp 0x71d9c cmpq %rax, %rdx jne 0x71dcd movq %rbx, %rdi movl %ebp, %esi callq 0x6f63c pushq $0x2 popq %r14 movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq %rax, %rcx jne 0x71dc1 movq %rbx, %rdi movl %ebp, %esi callq 0x6f63c jmp 0x71d59 movq %rbx, %rdi movl %ebp, %esi callq 0x6f612 jmp 0x71d59 movq %rsi, %r13 leaq 0x41(%r15), %rsi shrq $0x6, %rsi movq 0x18(%r12), %rcx movq 0x18(%r13), %rax cmpq %rsi, %rax cmovgq %rax, %rsi leaq (%rsi,%rcx), %rdx pushq $0x20 popq %r14 movabsq $0x1ffffffffffffffd, %rax # imm = 0x1FFFFFFFFFFFFFFD cmpq %rax, %rdx ja 0x71d9e movq %rsi, 0x30(%rsp) movq %rcx, 0x10(%rsp) movl %r8d, 0xc(%rsp) movq (%rbx), %rax movq %rdx, 0x20(%rsp) leaq 0x8(,%rdx,8), %rdx movq (%rax), %rdi xorl %esi, %esi movq %rax, 0x18(%rsp) callq *0x8(%rax) testq %rax, %rax je 0x71ec0 movq 0x20(%rsp), %rcx subq 0x18(%r13), %rcx movq %rcx, 0x28(%rsp) leaq (,%rcx,8), %rdx movq %rax, %rdi xorl %esi, %esi movq %rax, (%rsp) callq 0xe360 movq 0x28(%rsp), %rax movq (%rsp), %rcx leaq (%rcx,%rax,8), %rdi movq 0x18(%r13), %rdx movq 0x20(%r13), %rsi shlq $0x3, %rdx callq 0xe5c0 movq 0x30(%rsp), %rsi incq %rsi movq %rbx, %rdi callq 0x6f50f testl %eax, %eax jne 0x71eaf movq 0x20(%rbx), %rsi movq 0x20(%r12), %r8 movq 0x18(%rsp), %rdi movq (%rsp), %rdx movq 0x20(%rsp), %rcx movq 0x10(%rsp), %r9 callq 0x70866 testl %eax, %eax je 0x71ecd movq 0x18(%rsp), %rax movq (%rax), %rdi movq (%rsp), %rsi xorl %edx, %edx callq *0x8(%rax) movq %rbx, %rdi callq 0x6f5cd jmp 0x71d9e movq (%rsp), %rdi movq %rdi, %r14 movq 0x10(%rsp), %rsi callq 0x70d89 testq %rax, %rax je 0x71eeb movq 0x20(%rbx), %rax orq $0x1, (%rax) movq (%rbx), %rax movq (%rax), %rdi movq %r14, %rsi xorl %edx, %edx callq *0x8(%rax) movq 0x10(%r13), %rax subq 0x10(%r12), %rax addq $0x40, %rax movq %rax, 0x10(%rbx) movl %ebp, 0x8(%rbx) movq %rbx, %rdi movq %r15, %rsi movl 0xc(%rsp), %edx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x6f707
__bf_div: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rcx mov r12, rdx mov rbx, rdi mov rax, 7FFFFFFFFFFFFFFDh mov ebp, [rdx+8] xor ebp, [rsi+8] mov rcx, [rsi+10h] cmp rcx, rax jle short loc_71D3E lea rdx, [rax+2] cmp rcx, rdx jz short loc_71D51 mov rdx, [r12+10h] jmp short loc_71D48 loc_71D3E: mov rdx, [r12+10h] cmp rdx, rax jle short loc_71D5E loc_71D48: lea rsi, [rax+2] cmp rdx, rsi jnz short loc_71D6E loc_71D51: mov rdi, rbx call bf_set_nan loc_71D59: xor r14d, r14d jmp short loc_71D9E loc_71D5E: add rax, 3 cmp rcx, rax jnz short loc_71D8B cmp rdx, rax jz short loc_71D7F jmp short loc_71DC1 loc_71D6E: inc rax mov rsi, rcx xor rsi, rax xor rdx, rax or rdx, rsi jnz short loc_71DB0 loc_71D7F: mov rdi, rbx call bf_set_nan push 1 jmp short loc_71D9C loc_71D8B: cmp rdx, rax jnz short loc_71DCD mov rdi, rbx mov esi, ebp call bf_set_inf push 2 loc_71D9C: pop r14 loc_71D9E: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_71DB0: cmp rcx, rax jnz short loc_71DC1 mov rdi, rbx mov esi, ebp call bf_set_inf jmp short loc_71D59 loc_71DC1: mov rdi, rbx mov esi, ebp call bf_set_zero jmp short loc_71D59 loc_71DCD: mov r13, rsi lea rsi, [r15+41h] shr rsi, 6 mov rcx, [r12+18h] mov rax, [r13+18h] cmp rax, rsi cmovg rsi, rax lea rdx, [rsi+rcx] push 20h ; ' ' pop r14 mov rax, 1FFFFFFFFFFFFFFDh cmp rdx, rax ja short loc_71D9E mov [rsp+68h+var_38], rsi mov [rsp+68h+var_58], rcx mov [rsp+68h+var_5C], r8d mov rax, [rbx] mov [rsp+68h+var_48], rdx lea rdx, ds:8[rdx*8] mov rdi, [rax] xor esi, esi mov [rsp+68h+var_50], rax call qword ptr [rax+8] test rax, rax jz loc_71EC0 mov rcx, [rsp+68h+var_48] sub rcx, [r13+18h] mov [rsp+68h+var_40], rcx lea rdx, ds:0[rcx*8] mov rdi, rax xor esi, esi mov [rsp+68h+var_68], rax call _memset mov rax, [rsp+68h+var_40] mov rcx, [rsp+68h+var_68] lea rdi, [rcx+rax*8] mov rdx, [r13+18h] mov rsi, [r13+20h] shl rdx, 3 call _memcpy mov rsi, [rsp+68h+var_38] inc rsi mov rdi, rbx call bf_resize test eax, eax jnz short loc_71EAF mov rsi, [rbx+20h] mov r8, [r12+20h] mov rdi, [rsp+68h+var_50] mov rdx, [rsp+68h+var_68] mov rcx, [rsp+68h+var_48] mov r9, [rsp+68h+var_58] call mp_divnorm test eax, eax jz short loc_71ECD loc_71EAF: mov rax, [rsp+68h+var_50] mov rdi, [rax] mov rsi, [rsp+68h+var_68] xor edx, edx call qword ptr [rax+8] loc_71EC0: mov rdi, rbx call bf_set_nan jmp loc_71D9E loc_71ECD: mov rdi, [rsp+68h+var_68] mov r14, rdi mov rsi, [rsp+68h+var_58] call mp_scan_nz test rax, rax jz short loc_71EEB mov rax, [rbx+20h] or qword ptr [rax], 1 loc_71EEB: mov rax, [rbx] mov rdi, [rax] mov rsi, r14 xor edx, edx call qword ptr [rax+8] mov rax, [r13+10h] sub rax, [r12+10h] add rax, 40h ; '@' mov [rbx+10h], rax mov [rbx+8], ebp mov rdi, rbx mov rsi, r15 mov edx, [rsp+68h+var_5C] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bf_normalize_and_round
long long _bf_div(_QWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { int v7; // ebp long long v8; // rcx long long v9; // rdx unsigned int v10; // r14d signed long long v13; // rsi long long v14; // rcx long long v15; // rax _QWORD *v17; // [rsp+0h] [rbp-68h] unsigned long long v19; // [rsp+10h] [rbp-58h] _QWORD *v20; // [rsp+18h] [rbp-50h] unsigned long long v21; // [rsp+20h] [rbp-48h] unsigned long long v22; // [rsp+28h] [rbp-40h] v7 = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a3 + 8); v8 = *(_QWORD *)(a2 + 16); if ( v8 > 0x7FFFFFFFFFFFFFFDLL ) { if ( v8 == 0x7FFFFFFFFFFFFFFFLL ) { LABEL_6: bf_set_nan((long long)a1); return 0; } v9 = *(_QWORD *)(a3 + 16); goto LABEL_5; } v9 = *(_QWORD *)(a3 + 16); if ( v9 > 0x7FFFFFFFFFFFFFFDLL ) { LABEL_5: if ( v9 == 0x7FFFFFFFFFFFFFFFLL ) goto LABEL_6; if ( !(v8 ^ 0x7FFFFFFFFFFFFFFELL | v9 ^ 0x7FFFFFFFFFFFFFFELL) ) goto LABEL_12; if ( v8 == 0x7FFFFFFFFFFFFFFELL ) { bf_set_inf((long long)a1, v7); return 0; } goto LABEL_19; } if ( v8 == 0x8000000000000000LL ) { if ( v9 == 0x8000000000000000LL ) { LABEL_12: bf_set_nan((long long)a1); return 1; } LABEL_19: bf_set_zero((long long)a1, v7); return 0; } if ( v9 == 0x8000000000000000LL ) { bf_set_inf((long long)a1, v7); return 2; } v13 = (unsigned long long)(a4 + 65) >> 6; v14 = *(_QWORD *)(a3 + 24); if ( *(_QWORD *)(a2 + 24) > v13 ) v13 = *(_QWORD *)(a2 + 24); v10 = 32; if ( (unsigned long long)(v13 + v14) > 0x1FFFFFFFFFFFFFFDLL ) return v10; v19 = *(_QWORD *)(a3 + 24); v21 = v13 + v14; v20 = (_QWORD *)*a1; v15 = (*(long long ( **)(_QWORD, _QWORD, signed long long))(*a1 + 8LL))( *(_QWORD *)*a1, 0LL, 8 * (v13 + v14) + 8); if ( !v15 ) { LABEL_27: bf_set_nan((long long)a1); return v10; } v22 = v21 - *(_QWORD *)(a2 + 24); v17 = (_QWORD *)v15; memset(v15, 0LL, 8 * v22); memcpy(&v17[v22], *(_QWORD *)(a2 + 32), 8LL * *(_QWORD *)(a2 + 24)); if ( (unsigned int)bf_resize((long long)a1, v13 + 1) || (unsigned int)mp_divnorm(v20, a1[4], v17, v21, *(_QWORD *)(a3 + 32), v19) ) { ((void ( *)(_QWORD, _QWORD *, _QWORD))v20[1])(*v20, v17, 0LL); goto LABEL_27; } if ( mp_scan_nz((long long)v17, v19) ) *(_QWORD *)a1[4] |= 1uLL; (*(void ( **)(_QWORD, _QWORD *, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, v17, 0LL); a1[2] = *(_QWORD *)(a2 + 16) - *(_QWORD *)(a3 + 16) + 64LL; *((_DWORD *)a1 + 2) = v7; return bf_normalize_and_round(a1, a4, a5); }
__bf_div: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RCX MOV R12,RDX MOV RBX,RDI MOV RAX,0x7ffffffffffffffd MOV EBP,dword ptr [RDX + 0x8] XOR EBP,dword ptr [RSI + 0x8] MOV RCX,qword ptr [RSI + 0x10] CMP RCX,RAX JLE 0x00171d3e LEA RDX,[RAX + 0x2] CMP RCX,RDX JZ 0x00171d51 MOV RDX,qword ptr [R12 + 0x10] JMP 0x00171d48 LAB_00171d3e: MOV RDX,qword ptr [R12 + 0x10] CMP RDX,RAX JLE 0x00171d5e LAB_00171d48: LEA RSI,[RAX + 0x2] CMP RDX,RSI JNZ 0x00171d6e LAB_00171d51: MOV RDI,RBX CALL 0x0016f5cd LAB_00171d59: XOR R14D,R14D JMP 0x00171d9e LAB_00171d5e: ADD RAX,0x3 CMP RCX,RAX JNZ 0x00171d8b CMP RDX,RAX JZ 0x00171d7f JMP 0x00171dc1 LAB_00171d6e: INC RAX MOV RSI,RCX XOR RSI,RAX XOR RDX,RAX OR RDX,RSI JNZ 0x00171db0 LAB_00171d7f: MOV RDI,RBX CALL 0x0016f5cd PUSH 0x1 JMP 0x00171d9c LAB_00171d8b: CMP RDX,RAX JNZ 0x00171dcd MOV RDI,RBX MOV ESI,EBP CALL 0x0016f63c PUSH 0x2 LAB_00171d9c: POP R14 LAB_00171d9e: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00171db0: CMP RCX,RAX JNZ 0x00171dc1 MOV RDI,RBX MOV ESI,EBP CALL 0x0016f63c JMP 0x00171d59 LAB_00171dc1: MOV RDI,RBX MOV ESI,EBP CALL 0x0016f612 JMP 0x00171d59 LAB_00171dcd: MOV R13,RSI LEA RSI,[R15 + 0x41] SHR RSI,0x6 MOV RCX,qword ptr [R12 + 0x18] MOV RAX,qword ptr [R13 + 0x18] CMP RAX,RSI CMOVG RSI,RAX LEA RDX,[RSI + RCX*0x1] PUSH 0x20 POP R14 MOV RAX,0x1ffffffffffffffd CMP RDX,RAX JA 0x00171d9e MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0xc],R8D MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x20],RDX LEA RDX,[0x8 + RDX*0x8] MOV RDI,qword ptr [RAX] XOR ESI,ESI MOV qword ptr [RSP + 0x18],RAX CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00171ec0 MOV RCX,qword ptr [RSP + 0x20] SUB RCX,qword ptr [R13 + 0x18] MOV qword ptr [RSP + 0x28],RCX LEA RDX,[RCX*0x8] MOV RDI,RAX XOR ESI,ESI MOV qword ptr [RSP],RAX CALL 0x0010e360 MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP] LEA RDI,[RCX + RAX*0x8] MOV RDX,qword ptr [R13 + 0x18] MOV RSI,qword ptr [R13 + 0x20] SHL RDX,0x3 CALL 0x0010e5c0 MOV RSI,qword ptr [RSP + 0x30] INC RSI MOV RDI,RBX CALL 0x0016f50f TEST EAX,EAX JNZ 0x00171eaf MOV RSI,qword ptr [RBX + 0x20] MOV R8,qword ptr [R12 + 0x20] MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x10] CALL 0x00170866 TEST EAX,EAX JZ 0x00171ecd LAB_00171eaf: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00171ec0: MOV RDI,RBX CALL 0x0016f5cd JMP 0x00171d9e LAB_00171ecd: MOV RDI,qword ptr [RSP] MOV R14,RDI MOV RSI,qword ptr [RSP + 0x10] CALL 0x00170d89 TEST RAX,RAX JZ 0x00171eeb MOV RAX,qword ptr [RBX + 0x20] OR qword ptr [RAX],0x1 LAB_00171eeb: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] MOV RSI,R14 XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV RAX,qword ptr [R13 + 0x10] SUB RAX,qword ptr [R12 + 0x10] ADD RAX,0x40 MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],EBP MOV RDI,RBX MOV RSI,R15 MOV EDX,dword ptr [RSP + 0xc] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0016f707
int8 __bf_div(long *param_1,long param_2,long param_3,long param_4,int4 param_5) { ulong uVar1; int8 *puVar2; int iVar3; void *__s; long lVar4; int8 uVar5; long lVar6; uint uVar7; ulong uVar8; uVar7 = *(uint *)(param_3 + 8) ^ *(uint *)(param_2 + 8); lVar4 = *(long *)(param_2 + 0x10); if (lVar4 < 0x7ffffffffffffffe) { lVar6 = *(long *)(param_3 + 0x10); if (0x7ffffffffffffffd < lVar6) goto LAB_00171d48; if (lVar4 != -0x8000000000000000) { if (lVar6 == -0x8000000000000000) { bf_set_inf(param_1,uVar7); return 2; } uVar8 = param_4 + 0x41U >> 6; lVar4 = *(long *)(param_3 + 0x18); if ((long)uVar8 < (long)*(ulong *)(param_2 + 0x18)) { uVar8 = *(ulong *)(param_2 + 0x18); } uVar1 = uVar8 + lVar4; if (uVar1 < 0x1ffffffffffffffe) { puVar2 = (int8 *)*param_1; __s = (void *)(*(code *)puVar2[1])(*puVar2,0,uVar1 * 8 + 8); if (__s != (void *)0x0) { lVar6 = uVar1 - *(long *)(param_2 + 0x18); memset(__s,0,lVar6 * 8); memcpy((void *)((long)__s + lVar6 * 8),*(void **)(param_2 + 0x20), *(long *)(param_2 + 0x18) << 3); iVar3 = bf_resize(param_1,uVar8 + 1); if ((iVar3 == 0) && (iVar3 = mp_divnorm(puVar2,param_1[4],__s,uVar1,*(int8 *)(param_3 + 0x20),lVar4), iVar3 == 0)) { lVar4 = mp_scan_nz(__s,lVar4); if (lVar4 != 0) { *(ulong *)param_1[4] = *(ulong *)param_1[4] | 1; } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__s,0); param_1[2] = (*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10)) + 0x40; *(uint *)(param_1 + 1) = uVar7; uVar5 = bf_normalize_and_round(param_1,param_4,param_5); return uVar5; } (*(code *)puVar2[1])(*puVar2,__s,0); } bf_set_nan(param_1); return 0x20; } return 0x20; } if (lVar6 == -0x8000000000000000) goto LAB_00171d7f; LAB_00171dc1: bf_set_zero(param_1,uVar7); } else { if (lVar4 != 0x7fffffffffffffff) { lVar6 = *(long *)(param_3 + 0x10); LAB_00171d48: if (lVar6 != 0x7fffffffffffffff) { if (lVar6 == 0x7ffffffffffffffe && lVar4 == 0x7ffffffffffffffe) { LAB_00171d7f: bf_set_nan(param_1); return 1; } if (lVar4 == 0x7ffffffffffffffe) { bf_set_inf(param_1,uVar7); return 0; } goto LAB_00171dc1; } } bf_set_nan(param_1); } return 0; }
2,380
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/./minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O2
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x44792 movq %rdi, %rbx callq 0x44c5c movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x213f0 movq %rax, %rbx movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x3bcc2 leaq 0x5130c(%rip), %rsi # 0x95ac0 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x25a83 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x21d30 xorl %ebp, %ebp movq 0x95816(%rip), %rsi # 0xd9ff0 movq 0x95787(%rip), %rdx # 0xd9f68 movq %rbx, %rdi callq 0x21de0 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x22078 jmp 0x447fe movq %rax, %r14 movb $0x1, %bpl movq %rsp, %rdi callq 0x22078 testb %bpl, %bpl jne 0x44810 jmp 0x44818 movq %rax, %r14 movq %rbx, %rdi callq 0x215c0 movq %r14, %rdi callq 0x21e50
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_44792 mov rbx, rdi call _ZNKSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEclES6_S8_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_44792: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_447FE mov r14, rax mov bpl, 1 loc_447FE: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_44810 jmp short loc_44818 mov r14, rax loc_44810: mov rdi, rbx; void * call ___cxa_free_exception loc_44818: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { void *exception; // rbx _BYTE v4[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v5[56]; // [rsp+20h] [rbp-38h] BYREF if ( !*(_QWORD *)(a2 + 48) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v4, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Value is not callable: ", (long long)v4); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x00144792 MOV RBX,RDI CALL 0x00144c5c MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_00144792: PUSH 0x10 POP RDI CALL 0x001213f0 MOV RBX,RAX LAB_0014479d: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x0013bcc2 LAB_001447ad: LEA RSI,[0x195ac0] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00125a83 MOV BPL,0x1 LAB_001447c4: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00121d30 XOR EBP,EBP MOV RSI,qword ptr [0x001d9ff0] MOV RDX,qword ptr [0x001d9f68] MOV RDI,RBX CALL 0x00121de0
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; if (*(ArgumentsValue **)(param_2 + 0x30) != (ArgumentsValue *)0x0) { std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator()(param_1,*(ArgumentsValue **)(param_2 + 0x30)); return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014479d to 001447ac has its CatchHandler @ 0014480d */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 001447ad to 001447c0 has its CatchHandler @ 001447f8 */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 001447c4 to 001447e8 has its CatchHandler @ 001447e9 */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001d9ff0,PTR__runtime_error_001d9f68); }
2,381
getopt_compare_strings
eloqsql/mysys/my_getopt.c
my_bool getopt_compare_strings(register const char *s, register const char *t, uint length) { char const *end= s + length; DBUG_ENTER("getopt_compare_strings"); for (;s != end ; s++, t++) { if ((*s != '-' ? *s : '_') != (*t != '-' ? *t : '_')) DBUG_RETURN(1); } DBUG_RETURN(0); }
O0
c
getopt_compare_strings: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq -0x28(%rbp), %rax je 0x28ec2 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax je 0x28e5f movq -0x10(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x2c(%rbp) jmp 0x28e69 movl $0x5f, %eax movl %eax, -0x2c(%rbp) jmp 0x28e69 movl -0x2c(%rbp), %eax movl %eax, -0x30(%rbp) movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax je 0x28e87 movq -0x18(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x34(%rbp) jmp 0x28e91 movl $0x5f, %eax movl %eax, -0x34(%rbp) jmp 0x28e91 movl -0x30(%rbp), %eax movl -0x34(%rbp), %ecx cmpl %ecx, %eax je 0x28ea3 jmp 0x28e9d movb $0x1, -0x1(%rbp) jmp 0x28ec8 jmp 0x28ea5 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x28e3d jmp 0x28ec4 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax)
getopt_compare_strings: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] add rax, rcx mov [rbp+var_28], rax loc_28E3D: mov rax, [rbp+var_10] cmp rax, [rbp+var_28] jz short loc_28EC2 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jz short loc_28E5F mov rax, [rbp+var_10] movsx eax, byte ptr [rax] mov [rbp+var_2C], eax jmp short loc_28E69 loc_28E5F: mov eax, 5Fh ; '_' mov [rbp+var_2C], eax jmp short $+2 loc_28E69: mov eax, [rbp+var_2C] mov [rbp+var_30], eax mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jz short loc_28E87 mov rax, [rbp+var_18] movsx eax, byte ptr [rax] mov [rbp+var_34], eax jmp short loc_28E91 loc_28E87: mov eax, 5Fh ; '_' mov [rbp+var_34], eax jmp short $+2 loc_28E91: mov eax, [rbp+var_30] mov ecx, [rbp+var_34] cmp eax, ecx jz short loc_28EA3 jmp short $+2 loc_28E9D: mov [rbp+var_1], 1 jmp short loc_28EC8 loc_28EA3: jmp short $+2 loc_28EA5: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_28E3D loc_28EC2: jmp short $+2 loc_28EC4: mov [rbp+var_1], 0 loc_28EC8: mov al, [rbp+var_1] pop rbp retn
char getopt_compare_strings(_BYTE *a1, _BYTE *a2, int a3) { int v4; // [rsp+0h] [rbp-34h] int v5; // [rsp+8h] [rbp-2Ch] _BYTE *i; // [rsp+24h] [rbp-10h] for ( i = a1; i != &a1[a3]; ++i ) { if ( *i == 45 ) v5 = 95; else v5 = (char)*i; if ( *a2 == 45 ) v4 = 95; else v4 = (char)*a2; if ( v5 != v4 ) return 1; ++a2; } return 0; }
getopt_compare_strings: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_00128e3d: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x28] JZ 0x00128ec2 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JZ 0x00128e5f MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX JMP 0x00128e69 LAB_00128e5f: MOV EAX,0x5f MOV dword ptr [RBP + -0x2c],EAX JMP 0x00128e69 LAB_00128e69: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JZ 0x00128e87 MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x34],EAX JMP 0x00128e91 LAB_00128e87: MOV EAX,0x5f MOV dword ptr [RBP + -0x34],EAX JMP 0x00128e91 LAB_00128e91: MOV EAX,dword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x34] CMP EAX,ECX JZ 0x00128ea3 JMP 0x00128e9d LAB_00128e9d: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00128ec8 LAB_00128ea3: JMP 0x00128ea5 LAB_00128ea5: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00128e3d LAB_00128ec2: JMP 0x00128ec4 LAB_00128ec4: MOV byte ptr [RBP + -0x1],0x0 LAB_00128ec8: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 getopt_compare_strings(char *param_1,char *param_2,uint param_3) { char cVar1; char cVar2; char *local_20; char *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_18 == param_1 + param_3) { return 0; } if (*local_18 == '-') { cVar1 = '_'; } else { cVar1 = *local_18; } if (*local_20 == '-') { cVar2 = '_'; } else { cVar2 = *local_20; } if (cVar1 != cVar2) break; local_18 = local_18 + 1; local_20 = local_20 + 1; } return 1; }
2,382
maria_page_crc_set_normal
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_crc_set_normal(PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; pgcache_page_no_t page_no= args->pageno; MARIA_SHARE *share= (MARIA_SHARE *)args->data; int data_length= share->block_size - CRC_SIZE; uint32 crc= maria_page_crc((uint32) page_no, page, data_length); DBUG_ENTER("maria_page_crc_set_normal"); DBUG_PRINT("info", ("Page %lu crc: %lu", (ulong) page_no, (ulong)crc)); /* crc is on the stack so it is aligned, pagecache buffer is aligned, too */ int4store_aligned(page + data_length, crc); DBUG_RETURN(0); }
O3
c
maria_page_crc_set_normal: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq (%rdi), %rbx movl 0x8(%rdi), %eax movq 0x10(%rdi), %rcx movl 0x7bc(%rcx), %r14d addl $-0x4, %r14d movl %eax, %edi movq %rbx, %rsi movq %r14, %rdx callq 0xaebd0 cmpl $-0x3, %eax movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD cmovbl %eax, %ecx movslq %r14d, %rax movl %ecx, (%rbx,%rax) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
maria_page_crc_set_normal: push rbp mov rbp, rsp push r14 push rbx mov rbx, [rdi] mov eax, [rdi+8] mov rcx, [rdi+10h] mov r14d, [rcx+7BCh] add r14d, 0FFFFFFFCh mov edi, eax mov rsi, rbx mov rdx, r14 call my_checksum cmp eax, 0FFFFFFFDh mov ecx, 0FFFFFFFDh cmovb ecx, eax movsxd rax, r14d mov [rbx+rax], ecx xor eax, eax pop rbx pop r14 pop rbp retn
long long maria_page_crc_set_normal(long long *a1) { long long v1; // rbx long long v2; // r14 unsigned int v3; // eax int v4; // ecx v1 = *a1; v2 = (unsigned int)(*(_DWORD *)(a1[2] + 1980) - 4); v3 = my_checksum(*((unsigned int *)a1 + 2), *a1, v2); v4 = -3; if ( v3 < 0xFFFFFFFD ) v4 = v3; *(_DWORD *)(v1 + (int)v2) = v4; return 0LL; }
maria_page_crc_set_normal: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [RDI] MOV EAX,dword ptr [RDI + 0x8] MOV RCX,qword ptr [RDI + 0x10] MOV R14D,dword ptr [RCX + 0x7bc] ADD R14D,-0x4 MOV EDI,EAX MOV RSI,RBX MOV RDX,R14 CALL 0x001aebd0 CMP EAX,-0x3 MOV ECX,0xfffffffd CMOVC ECX,EAX MOVSXD RAX,R14D MOV dword ptr [RBX + RAX*0x1],ECX XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 maria_page_crc_set_normal(long *param_1) { long lVar1; uint uVar2; uint uVar3; int iVar4; lVar1 = *param_1; iVar4 = *(int *)(param_1[2] + 0x7bc) + -4; uVar2 = my_checksum((int)param_1[1],lVar1,iVar4); uVar3 = 0xfffffffd; if (uVar2 < 0xfffffffd) { uVar3 = uVar2; } *(uint *)(lVar1 + iVar4) = uVar3; return 0; }
2,383
js_typed_array_constructor_ta
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_constructor_ta(JSContext *ctx, JSValue new_target, JSValue src_obj, int classid, uint32_t len) { JSObject *p, *src_buffer; JSTypedArray *ta; JSValue obj, buffer; uint32_t i; int size_log2; JSArrayBuffer *src_abuf, *abuf; obj = js_create_from_ctor(ctx, new_target, classid); if (JS_IsException(obj)) return obj; p = JS_VALUE_GET_OBJ(src_obj); if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } ta = p->u.typed_array; src_buffer = ta->buffer; src_abuf = src_buffer->u.array_buffer; size_log2 = typed_array_size_log2(classid); buffer = js_array_buffer_constructor1(ctx, JS_UNDEFINED, (uint64_t)len << size_log2, NULL); if (JS_IsException(buffer)) goto fail; /* necessary because it could have been detached */ if (typed_array_is_oob(p)) { JS_FreeValue(ctx, buffer); JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } abuf = JS_GetOpaque(buffer, JS_CLASS_ARRAY_BUFFER); if (typed_array_init(ctx, obj, buffer, 0, len, /*track_rab*/FALSE)) goto fail; if (p->class_id == classid) { /* same type: copy the content */ memcpy(abuf->data, src_abuf->data + ta->offset, abuf->byte_length); } else { for(i = 0; i < len; i++) { JSValue val; val = JS_GetPropertyUint32(ctx, src_obj, i); if (JS_IsException(val)) goto fail; if (JS_SetPropertyUint32(ctx, obj, i, val) < 0) goto fail; } } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
js_typed_array_constructor_ta: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %r15 movq %rcx, 0x18(%rsp) movl %r9d, %ecx callq 0x36d56 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x7eb9c movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x7ec74 movq 0x18(%rsp), %r13 movq %r13, %rdi callq 0x396c4 testl %eax, %eax jne 0x7ec4a movq %r12, 0x40(%rsp) movq 0x30(%r13), %rax movq %rax, 0x30(%rsp) movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x38(%rsp) movslq %ebp, %rax leaq 0x1ed09(%rip), %rcx # 0x9d8df movb -0x15(%rax,%rcx), %cl movl 0x80(%rsp), %eax movq %rax, 0x10(%rsp) shlq %cl, %rax xorl %r10d, %r10d leaq -0x45d3a(%rip), %r11 # 0x38eb9 movl $0x3, %edx movq %r15, %rdi xorl %esi, %esi movq %rax, %rcx xorl %r8d, %r8d movl $0x13, %r9d pushq $0x1 pushq %r10 pushq %r11 pushq %r10 callq 0x38c19 addq $0x20, %rsp movl %edx, %r12d cmpq $0x6, %r12 je 0x7ec5b movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq %r13, %rdi callq 0x396c4 testl %eax, %eax je 0x7ec8c movq 0x18(%r15), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x1d8c6 leaq 0x237d1(%rip), %rsi # 0xa2422 movq %r15, %rdi xorl %eax, %eax callq 0x22567 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x6, %ebx xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rsp), %rdx movq %rdx, 0x20(%rsp) cmpl $-0x1, %r12d jne 0x7ecad movq 0x20(%rsp), %rax cmpw $0x13, 0x6(%rax) jne 0x7ecad movq 0x30(%rax), %r12 jmp 0x7ecb0 xorl %r12d, %r12d subq $0x8, %rsp movq %r15, %rdi movq %r14, %rsi movq 0x10(%rsp), %rcx xorl %r8d, %r8d movq 0x18(%rsp), %r9 pushq $0x0 callq 0x12b13 addq $0x10, %rsp testl %eax, %eax jne 0x7ec5b movzwl 0x6(%r13), %eax cmpl %ebp, %eax jne 0x7ed03 movq 0x10(%r12), %rdi movq 0x30(%rsp), %rax movl 0x20(%rax), %esi movq 0x38(%rsp), %rax addq 0x10(%rax), %rsi movslq (%r12), %rdx callq 0xe5b0 jmp 0x7eb87 cmpl $0x0, 0x80(%rsp) je 0x7eb87 movq 0x18(%rsp), %r13 xorl %ebp, %ebp movq %r15, %rdi movq %r13, %rsi movq 0x40(%rsp), %rdx movq %rbp, %rcx callq 0x241b4 cmpl $0x6, %edx je 0x7ec5b movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movslq %ebp, %rax movq %rax, %r8 shrq $0x1f, %r8 testl %eax, %eax movl %eax, %eax xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movq %xmm0, %rcx cmovnsq %rbp, %rcx andl $0x7, %r8d subq $0x10, %rsp movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movl $0x4000, %r9d # imm = 0x4000 callq 0x24d59 addq $0x10, %rsp testl %eax, %eax js 0x7ec5b incq %rbp cmpq %rbp, 0x10(%rsp) jne 0x7ed18 jmp 0x7eb87
js_typed_array_constructor_ta: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r9d mov r12, r8 mov r15, rdi mov [rsp+78h+var_60], rcx mov ecx, r9d call js_create_from_ctor mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_7EB9C loc_7EB87: mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp loc_7EC74 loc_7EB9C: mov r13, [rsp+78h+var_60] mov rdi, r13 call typed_array_is_oob test eax, eax jnz loc_7EC4A mov [rsp+78h+var_38], r12 mov rax, [r13+30h] mov [rsp+78h+var_48], rax mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+78h+var_40], rax movsxd rax, ebp lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] mov eax, [rsp+78h+arg_0] mov [rsp+78h+var_68], rax shl rax, cl xor r10d, r10d lea r11, js_array_buffer_free mov edx, 3 mov rdi, r15 xor esi, esi mov rcx, rax xor r8d, r8d mov r9d, 13h push 1 push r10 push r11 push r10 call js_array_buffer_constructor3 add rsp, 20h mov r12d, edx cmp r12, 6 jz short loc_7EC5B mov [rsp+78h+var_78], rax mov [rsp+78h+var_70], rdx mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_7EC8C mov rdi, [r15+18h] mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] call JS_FreeValueRT loc_7EC4A: lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_7EC5B: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov ebx, 6 xor r14d, r14d xor ecx, ecx loc_7EC74: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7EC8C: mov rdx, [rsp+78h+var_78] mov qword ptr [rsp+78h+var_58], rdx cmp r12d, 0FFFFFFFFh jnz short loc_7ECAD mov rax, qword ptr [rsp+78h+var_58] cmp word ptr [rax+6], 13h jnz short loc_7ECAD mov r12, [rax+30h] jmp short loc_7ECB0 loc_7ECAD: xor r12d, r12d loc_7ECB0: sub rsp, 8 mov rdi, r15 mov rsi, r14 mov rcx, [rsp+80h+var_70] xor r8d, r8d mov r9, [rsp+80h+var_68] push 0 call typed_array_init add rsp, 10h test eax, eax jnz short loc_7EC5B movzx eax, word ptr [r13+6] cmp eax, ebp jnz short loc_7ED03 mov rdi, [r12+10h] mov rax, [rsp+78h+var_48] mov esi, [rax+20h] mov rax, [rsp+78h+var_40] add rsi, [rax+10h] movsxd rdx, dword ptr [r12] call _memcpy jmp loc_7EB87 loc_7ED03: cmp [rsp+78h+arg_0], 0 jz loc_7EB87 mov r13, [rsp+78h+var_60] xor ebp, ebp loc_7ED18: mov rdi, r15 mov rsi, r13 mov rdx, [rsp+78h+var_38] mov rcx, rbp call JS_GetPropertyInt64 cmp edx, 6 jz loc_7EC5B mov qword ptr [rsp+78h+var_58], rax mov qword ptr [rsp+78h+var_58+8], rdx movsxd rax, ebp mov r8, rax shr r8, 1Fh test eax, eax mov eax, eax xorps xmm0, xmm0 cvtsi2sd xmm0, rax movq rcx, xmm0 cmovns rcx, rbp and r8d, 7 sub rsp, 10h movups xmm0, [rsp+88h+var_58] movups [rsp+88h+var_88], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx mov r9d, 4000h call JS_SetPropertyValue add rsp, 10h test eax, eax js loc_7EC5B inc rbp cmp [rsp+78h+var_68], rbp jnz short loc_7ED18 jmp loc_7EB87
unsigned long long js_typed_array_constructor_ta( long long a1, long long a2, long long a3, long long a4, long long a5, signed int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { unsigned long long v17; // r14 unsigned long long v18; // rdx unsigned long long v19; // rbx unsigned long long v20; // rcx long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 unsigned long long v27; // rax long long v28; // rdx int v29; // r12d int *v31; // r12 unsigned long long v32; // rbp __int128 v33; // rax double v34; // xmm4_8 double v35; // xmm5_8 double v36; // rcx long long v37; // [rsp+10h] [rbp-78h] long long v38; // [rsp+18h] [rbp-70h] long long v40; // [rsp+40h] [rbp-48h] long long v41; // [rsp+48h] [rbp-40h] long long v42; // [rsp+50h] [rbp-38h] v17 = js_create_from_ctor(a1, a2, a3, a6); v19 = v18; if ( (_DWORD)v18 == 6 ) goto LABEL_2; if ( typed_array_is_oob(a4) ) goto LABEL_7; v42 = a5; v40 = *(_QWORD *)(a4 + 48); v41 = *(_QWORD *)(*(_QWORD *)(v40 + 24) + 48LL); v27 = js_array_buffer_constructor3( a1, 0LL, 3LL, (unsigned long long)a15 << typed_array_size_log2[a6 - 21], 0LL, 19LL, a7, a8, a9, a10, v25, v26, a13, a14, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1); v29 = v28; if ( (unsigned int)v28 == 6LL ) { LABEL_8: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v17, v19); LODWORD(v17) = 0; v20 = 0LL; return v20 | (unsigned int)v17; } v37 = v27; v38 = v28; if ( typed_array_is_oob(a4) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v37, v38); LABEL_7: JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v37); goto LABEL_8; } if ( v29 == -1 && *(_WORD *)(v37 + 6) == 19 ) v31 = *(int **)(v37 + 48); else v31 = 0LL; if ( (unsigned int)typed_array_init(a1, v17, v37, v38, 0LL, a15, 0) ) goto LABEL_8; if ( *(unsigned __int16 *)(a4 + 6) == a6 ) { memcpy(*((_QWORD *)v31 + 2), *(_QWORD *)(v41 + 16) + *(unsigned int *)(v40 + 32), *v31); } else if ( a15 ) { *(double *)&v32 = 0.0; do { *(_QWORD *)&v33 = JS_GetPropertyInt64(a1, a4, v42, v32); if ( DWORD2(v33) == 6 ) goto LABEL_8; v36 = (double)(int)v32; if ( (v32 & 0x80000000) == 0LL ) v36 = *(double *)&v32; if ( (int)JS_SetPropertyValue( a1, v17, v19, *(_DWORD **)&v36, ((unsigned long long)(int)v32 >> 31) & 7, 0x4000u, *(double *)&v33, a8, a9, a10, v34, v35, a13, a14, v33) < 0 ) goto LABEL_8; } while ( a15 != ++v32 ); } LABEL_2: v20 = v17 & 0xFFFFFFFF00000000LL; return v20 | (unsigned int)v17; }
js_typed_array_constructor_ta: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,R9D MOV R12,R8 MOV R15,RDI MOV qword ptr [RSP + 0x18],RCX MOV ECX,R9D CALL 0x00136d56 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x0017eb9c LAB_0017eb87: MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX JMP 0x0017ec74 LAB_0017eb9c: MOV R13,qword ptr [RSP + 0x18] MOV RDI,R13 CALL 0x001396c4 TEST EAX,EAX JNZ 0x0017ec4a MOV qword ptr [RSP + 0x40],R12 MOV RAX,qword ptr [R13 + 0x30] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x38],RAX MOVSXD RAX,EBP LEA RCX,[0x19d8df] MOV CL,byte ptr [RAX + RCX*0x1 + -0x15] MOV EAX,dword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x10],RAX SHL RAX,CL XOR R10D,R10D LEA R11,[0x138eb9] MOV EDX,0x3 MOV RDI,R15 XOR ESI,ESI MOV RCX,RAX XOR R8D,R8D MOV R9D,0x13 PUSH 0x1 PUSH R10 PUSH R11 PUSH R10 CALL 0x00138c19 ADD RSP,0x20 MOV R12D,EDX CMP R12,0x6 JZ 0x0017ec5b MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RDI,R13 CALL 0x001396c4 TEST EAX,EAX JZ 0x0017ec8c MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x0011d8c6 LAB_0017ec4a: LEA RSI,[0x1a2422] MOV RDI,R15 XOR EAX,EAX CALL 0x00122567 LAB_0017ec5b: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0011d8c6 MOV EBX,0x6 XOR R14D,R14D XOR ECX,ECX LAB_0017ec74: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ec8c: MOV RDX,qword ptr [RSP] MOV qword ptr [RSP + 0x20],RDX CMP R12D,-0x1 JNZ 0x0017ecad MOV RAX,qword ptr [RSP + 0x20] CMP word ptr [RAX + 0x6],0x13 JNZ 0x0017ecad MOV R12,qword ptr [RAX + 0x30] JMP 0x0017ecb0 LAB_0017ecad: XOR R12D,R12D LAB_0017ecb0: SUB RSP,0x8 MOV RDI,R15 MOV RSI,R14 MOV RCX,qword ptr [RSP + 0x10] XOR R8D,R8D MOV R9,qword ptr [RSP + 0x18] PUSH 0x0 CALL 0x00112b13 ADD RSP,0x10 TEST EAX,EAX JNZ 0x0017ec5b MOVZX EAX,word ptr [R13 + 0x6] CMP EAX,EBP JNZ 0x0017ed03 MOV RDI,qword ptr [R12 + 0x10] MOV RAX,qword ptr [RSP + 0x30] MOV ESI,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x38] ADD RSI,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [R12] CALL 0x0010e5b0 JMP 0x0017eb87 LAB_0017ed03: CMP dword ptr [RSP + 0x80],0x0 JZ 0x0017eb87 MOV R13,qword ptr [RSP + 0x18] XOR EBP,EBP LAB_0017ed18: MOV RDI,R15 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x40] MOV RCX,RBP CALL 0x001241b4 CMP EDX,0x6 JZ 0x0017ec5b MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOVSXD RAX,EBP MOV R8,RAX SHR R8,0x1f TEST EAX,EAX MOV EAX,EAX XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MOVQ RCX,XMM0 CMOVNS RCX,RBP AND R8D,0x7 SUB RSP,0x10 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV R9D,0x4000 CALL 0x00124d59 ADD RSP,0x10 TEST EAX,EAX JS 0x0017ec5b INC RBP CMP qword ptr [RSP + 0x10],RBP JNZ 0x0017ed18 JMP 0x0017eb87
int1 [16] js_typed_array_constructor_ta (long param_1,int8 param_2,int8 param_3,long param_4,int8 param_5, uint param_6,uint param_7) { long lVar1; long lVar2; int iVar3; double dVar4; long lVar5; ulong uVar6; double dVar7; double dVar9; int *piVar10; int1 auVar11 [16]; int1 auVar12 [16]; ulong uVar8; auVar11 = js_create_from_ctor(); uVar6 = auVar11._0_8_; if (auVar11._8_4_ == 6) { LAB_0017eb87: uVar6 = uVar6 & 0xffffffff00000000; goto LAB_0017ec74; } iVar3 = typed_array_is_oob(param_4); if (iVar3 == 0) { lVar1 = *(long *)(param_4 + 0x30); lVar2 = *(long *)(*(long *)(lVar1 + 0x18) + 0x30); dVar4 = (double)(ulong)param_7; auVar12 = js_array_buffer_constructor3 (param_1,0,3,(long)dVar4 << ("toSorted"[(long)(int)param_6 + 6] & 0x3fU),0, 0x13,0,js_array_buffer_free,0,1); uVar8 = auVar12._8_8_; lVar5 = auVar12._0_8_; if ((uVar8 & 0xffffffff) != 6) { iVar3 = typed_array_is_oob(param_4); if (iVar3 != 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),lVar5,uVar8); goto LAB_0017ec4a; } if ((auVar12._8_4_ == -1) && (*(short *)(lVar5 + 6) == 0x13)) { piVar10 = *(int **)(lVar5 + 0x30); } else { piVar10 = (int *)0x0; } iVar3 = typed_array_init(param_1,uVar6,lVar5,uVar8,0,dVar4,0); if (iVar3 == 0) { if (*(ushort *)(param_4 + 6) == param_6) { memcpy(*(void **)(piVar10 + 4), (void *)((ulong)*(uint *)(lVar1 + 0x20) + *(long *)(lVar2 + 0x10)),(long)*piVar10); } else if (param_7 != 0) { dVar9 = 0.0; do { auVar12 = JS_GetPropertyInt64(param_1,param_4,param_5,dVar9); if (auVar12._8_4_ == 6) goto LAB_0017ec5b; dVar7 = (double)((ulong)dVar9 & 0xffffffff); if (-1 < SUB84(dVar9,0)) { dVar7 = dVar9; } iVar3 = JS_SetPropertyValue(param_1,uVar6,auVar11._8_8_,dVar7, (uint)((ulong)(long)SUB84(dVar9,0) >> 0x1f) & 7,0x4000, auVar12); if (iVar3 < 0) goto LAB_0017ec5b; dVar9 = (double)((long)dVar9 + 1); } while (dVar4 != dVar9); } goto LAB_0017eb87; } } } else { LAB_0017ec4a: JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } LAB_0017ec5b: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,auVar11._8_8_); auVar11 = ZEXT816(6) << 0x40; uVar6 = 0; LAB_0017ec74: auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar6; auVar12._8_8_ = auVar11._8_8_; return auVar12; }
2,384
js_typed_array_constructor_ta
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_constructor_ta(JSContext *ctx, JSValue new_target, JSValue src_obj, int classid, uint32_t len) { JSObject *p, *src_buffer; JSTypedArray *ta; JSValue obj, buffer; uint32_t i; int size_log2; JSArrayBuffer *src_abuf, *abuf; obj = js_create_from_ctor(ctx, new_target, classid); if (JS_IsException(obj)) return obj; p = JS_VALUE_GET_OBJ(src_obj); if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } ta = p->u.typed_array; src_buffer = ta->buffer; src_abuf = src_buffer->u.array_buffer; size_log2 = typed_array_size_log2(classid); buffer = js_array_buffer_constructor1(ctx, JS_UNDEFINED, (uint64_t)len << size_log2, NULL); if (JS_IsException(buffer)) goto fail; /* necessary because it could have been detached */ if (typed_array_is_oob(p)) { JS_FreeValue(ctx, buffer); JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } abuf = JS_GetOpaque(buffer, JS_CLASS_ARRAY_BUFFER); if (typed_array_init(ctx, obj, buffer, 0, len, /*track_rab*/FALSE)) goto fail; if (p->class_id == classid) { /* same type: copy the content */ memcpy(abuf->data, src_abuf->data + ta->offset, abuf->byte_length); } else { for(i = 0; i < len; i++) { JSValue val; val = JS_GetPropertyUint32(ctx, src_obj, i); if (JS_IsException(val)) goto fail; if (JS_SetPropertyUint32(ctx, obj, i, val) < 0) goto fail; } } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_typed_array_constructor_ta: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rcx, %r13 movq %rdi, %r15 movl %r9d, %ecx callq 0x3802f movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d jne 0x81668 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx jmp 0x816b0 movq %r13, %rdi callq 0x3aa19 testl %eax, %eax je 0x816c7 leaq 0x23d51(%rip), %rsi # 0xa53cc movq %r15, %rdi xorl %eax, %eax callq 0x22d8b cmpl $-0x9, %r14d jb 0x816a6 movq 0x18(%r15), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x816a6 movq %rbx, %rsi movq %r14, %rdx callq 0x219cc xorl %ebx, %ebx xorl %ecx, %ecx movl $0x6, %r14d movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x30(%rsp) movq 0x30(%r13), %rax movq %rax, 0x20(%rsp) movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x28(%rsp) movslq %ebp, %rax leaq 0x1f173(%rip), %rcx # 0xa085f movb -0x15(%rax,%rcx), %cl movl 0x70(%rsp), %eax movq %rax, 0x18(%rsp) shlq %cl, %rax xorl %r10d, %r10d leaq -0x47534(%rip), %r11 # 0x3a1d2 movl $0x3, %edx movq %r15, %rdi xorl %esi, %esi movq %rax, %rcx xorl %r8d, %r8d movl $0x13, %r9d pushq $0x1 pushq %r10 pushq %r11 pushq %r10 callq 0x39eef addq $0x20, %rsp movl %edx, %r12d cmpq $0x6, %r12 je 0x81685 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq %r13, %rdi callq 0x3aa19 testl %eax, %eax je 0x81781 movq 0x10(%rsp), %rdx cmpl $-0x9, %edx movq 0x8(%rsp), %rsi jb 0x81674 movq 0x18(%r15), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x81674 callq 0x219cc jmp 0x81674 cmpl $-0x1, %r12d movq 0x8(%rsp), %rdx jne 0x81799 cmpw $0x13, 0x6(%rdx) jne 0x81799 movq 0x30(%rdx), %r12 jmp 0x8179c xorl %r12d, %r12d subq $0x8, %rsp movq %r15, %rdi movq %rbx, %rsi movq 0x18(%rsp), %rcx xorl %r8d, %r8d movq 0x20(%rsp), %r9 pushq $0x0 callq 0x131b2 addq $0x10, %rsp testl %eax, %eax jne 0x81685 movzwl 0x6(%r13), %eax cmpl %ebp, %eax jne 0x817f3 movq 0x10(%r12), %rdi movq 0x20(%rsp), %rax movl 0x20(%rax), %esi movq 0x28(%rsp), %rax addq 0x10(%rax), %rsi movslq (%r12), %rdx callq 0xe5b0 jmp 0x81656 cmpl $0x0, 0x70(%rsp) je 0x81656 xorl %ebp, %ebp xorl %r12d, %r12d movq %r15, %rdi movq %r13, %rsi movq 0x30(%rsp), %rdx movq %r12, %rcx callq 0x24808 movq %rax, %r9 movq %rdx, %rax cmpl $0x6, %eax je 0x81685 movl %r12d, %ecx xorps %xmm0, %xmm0 cvtsi2sd %rcx, %xmm0 testl %r12d, %r12d movq %xmm0, %rcx cmovnsq %r12, %rcx movl $0x7, %r8d cmovnsq %rbp, %r8 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx pushq $0x4000 # imm = 0x4000 pushq %rax callq 0x253af addq $0x10, %rsp testl %eax, %eax js 0x81685 incq %r12 cmpq %r12, 0x18(%rsp) jne 0x81803 jmp 0x81656
js_typed_array_constructor_ta: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov ebp, r9d mov r12, r8 mov r13, rcx mov r15, rdi mov ecx, r9d call js_create_from_ctor mov rbx, rax mov r14, rdx cmp r14d, 6 jnz short loc_81668 loc_81656: mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax jmp short loc_816B0 loc_81668: mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_816C7 loc_81674: lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_81685: cmp r14d, 0FFFFFFF7h jb short loc_816A6 mov rdi, [r15+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_816A6 mov rsi, rbx mov rdx, r14 call js_free_value_rt loc_816A6: xor ebx, ebx xor ecx, ecx mov r14d, 6 loc_816B0: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_816C7: mov [rsp+68h+var_38], r12 mov rax, [r13+30h] mov [rsp+68h+var_48], rax mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+68h+var_40], rax movsxd rax, ebp lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] mov eax, [rsp+68h+arg_0] mov [rsp+68h+var_50], rax shl rax, cl xor r10d, r10d lea r11, js_array_buffer_free mov edx, 3 mov rdi, r15 xor esi, esi mov rcx, rax xor r8d, r8d mov r9d, 13h push 1 push r10 push r11 push r10 call js_array_buffer_constructor3 add rsp, 20h mov r12d, edx cmp r12, 6 jz loc_81685 mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], rdx mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_81781 mov rdx, [rsp+68h+var_58] cmp edx, 0FFFFFFF7h mov rsi, [rsp+68h+var_60] jb loc_81674 mov rdi, [r15+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg loc_81674 call js_free_value_rt jmp loc_81674 loc_81781: cmp r12d, 0FFFFFFFFh mov rdx, [rsp+68h+var_60] jnz short loc_81799 cmp word ptr [rdx+6], 13h jnz short loc_81799 mov r12, [rdx+30h] jmp short loc_8179C loc_81799: xor r12d, r12d loc_8179C: sub rsp, 8 mov rdi, r15 mov rsi, rbx mov rcx, [rsp+70h+var_58] xor r8d, r8d mov r9, [rsp+70h+var_50] push 0 call typed_array_init add rsp, 10h test eax, eax jnz loc_81685 movzx eax, word ptr [r13+6] cmp eax, ebp jnz short loc_817F3 mov rdi, [r12+10h] mov rax, [rsp+68h+var_48] mov esi, [rax+20h] mov rax, [rsp+68h+var_40] add rsi, [rax+10h] movsxd rdx, dword ptr [r12] call _memcpy jmp loc_81656 loc_817F3: cmp [rsp+68h+arg_0], 0 jz loc_81656 xor ebp, ebp xor r12d, r12d loc_81803: mov rdi, r15 mov rsi, r13 mov rdx, [rsp+68h+var_38] mov rcx, r12 call JS_GetPropertyInt64 mov r9, rax mov rax, rdx cmp eax, 6 jz loc_81685 mov ecx, r12d xorps xmm0, xmm0 cvtsi2sd xmm0, rcx test r12d, r12d movq rcx, xmm0 cmovns rcx, r12 mov r8d, 7 cmovns r8, rbp mov rdi, r15 mov rsi, rbx mov rdx, r14 push 4000h push rax call JS_SetPropertyValue add rsp, 10h test eax, eax js loc_81685 inc r12 cmp [rsp+68h+var_50], r12 jnz short loc_81803 jmp loc_81656
unsigned long long js_typed_array_constructor_ta( long long a1, long long a2, long long a3, long long a4, long long a5, signed int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { unsigned long long v19; // rbx unsigned long long v20; // rdx unsigned long long v21; // r14 unsigned long long v22; // rcx long long v23; // rdx long long v24; // rcx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 long long v29; // rdi int v30; // eax unsigned long long v32; // rax long long v33; // rdx int v34; // r12d long long v35; // rdi int v36; // eax int *v37; // r12 unsigned long long v38; // r12 long long v39; // rdx int *PropertyInt64; // r9 double v41; // xmm4_8 double v42; // xmm5_8 double v43; // rcx long long v44; // r8 char v45; // [rsp+0h] [rbp-68h] long long v46; // [rsp+8h] [rbp-60h] long long v47; // [rsp+10h] [rbp-58h] long long v48; // [rsp+20h] [rbp-48h] long long v49; // [rsp+28h] [rbp-40h] long long v50; // [rsp+30h] [rbp-38h] v19 = js_create_from_ctor(a1, a2, a3, a6); v21 = v20; if ( (_DWORD)v20 == 6 ) goto LABEL_2; if ( typed_array_is_oob(a4) ) goto LABEL_4; v50 = a5; v48 = *(_QWORD *)(a4 + 48); v49 = *(_QWORD *)(*(_QWORD *)(v48 + 24) + 48LL); v32 = js_array_buffer_constructor3( a1, 0LL, 3LL, (unsigned long long)a15 << typed_array_size_log2[a6 - 21], 0LL, 19LL, a7, a8, a9, a10, v27, v28, a13, a14, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1u); v34 = v33; if ( (unsigned int)v33 != 6LL ) { v46 = v32; v47 = v33; if ( typed_array_is_oob(a4) ) { v23 = v47; if ( (unsigned int)v47 >= 0xFFFFFFF7 ) { v35 = *(_QWORD *)(a1 + 24); v36 = *(_DWORD *)v46; v24 = (unsigned int)(*(_DWORD *)v46 - 1); *(_DWORD *)v46 = v24; if ( v36 <= 1 ) js_free_value_rt(v35, (_QWORD *)v46, v47); } LABEL_4: JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v23, v24, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14, v45); goto LABEL_5; } if ( v34 == -1 && *(_WORD *)(v46 + 6) == 19 ) v37 = *(int **)(v46 + 48); else v37 = 0LL; if ( !(unsigned int)typed_array_init(a1, v19, v46, v47, 0LL, a15, 0) ) { if ( *(unsigned __int16 *)(a4 + 6) == a6 ) { memcpy(*((_QWORD *)v37 + 2), *(_QWORD *)(v49 + 16) + *(unsigned int *)(v48 + 32), *v37); } else if ( a15 ) { *(double *)&v38 = 0.0; do { PropertyInt64 = (int *)JS_GetPropertyInt64(a1, a4, v50, v38); if ( (_DWORD)v39 == 6 ) goto LABEL_5; v43 = (double)(int)v38; if ( (v38 & 0x80000000) == 0LL ) v43 = *(double *)&v38; v44 = 7LL; if ( (v38 & 0x80000000) == 0LL ) v44 = 0LL; if ( (int)JS_SetPropertyValue( a1, v19, v21, *(_DWORD **)&v43, v44, PropertyInt64, (double)(int)v38, a8, a9, a10, v41, v42, a13, a14, v39, 0x4000u) < 0 ) goto LABEL_5; } while ( a15 != ++v38 ); } LABEL_2: v22 = v19 & 0xFFFFFFFF00000000LL; return v22 | (unsigned int)v19; } } LABEL_5: if ( (unsigned int)v21 >= 0xFFFFFFF7 ) { v29 = *(_QWORD *)(a1 + 24); v30 = (*(_DWORD *)v19)--; if ( v30 <= 1 ) js_free_value_rt(v29, (_QWORD *)v19, v21); } LODWORD(v19) = 0; v22 = 0LL; return v22 | (unsigned int)v19; }
js_typed_array_constructor_ta: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV EBP,R9D MOV R12,R8 MOV R13,RCX MOV R15,RDI MOV ECX,R9D CALL 0x0013802f MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00181668 LAB_00181656: MOV RAX,-0x100000000 MOV RCX,RBX AND RCX,RAX JMP 0x001816b0 LAB_00181668: MOV RDI,R13 CALL 0x0013aa19 TEST EAX,EAX JZ 0x001816c7 LAB_00181674: LEA RSI,[0x1a53cc] MOV RDI,R15 XOR EAX,EAX CALL 0x00122d8b LAB_00181685: CMP R14D,-0x9 JC 0x001816a6 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x001816a6 MOV RSI,RBX MOV RDX,R14 CALL 0x001219cc LAB_001816a6: XOR EBX,EBX XOR ECX,ECX MOV R14D,0x6 LAB_001816b0: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001816c7: MOV qword ptr [RSP + 0x30],R12 MOV RAX,qword ptr [R13 + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x28],RAX MOVSXD RAX,EBP LEA RCX,[0x1a085f] MOV CL,byte ptr [RAX + RCX*0x1 + -0x15] MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x18],RAX SHL RAX,CL XOR R10D,R10D LEA R11,[0x13a1d2] MOV EDX,0x3 MOV RDI,R15 XOR ESI,ESI MOV RCX,RAX XOR R8D,R8D MOV R9D,0x13 PUSH 0x1 PUSH R10 PUSH R11 PUSH R10 CALL 0x00139eef ADD RSP,0x20 MOV R12D,EDX CMP R12,0x6 JZ 0x00181685 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RDI,R13 CALL 0x0013aa19 TEST EAX,EAX JZ 0x00181781 MOV RDX,qword ptr [RSP + 0x10] CMP EDX,-0x9 MOV RSI,qword ptr [RSP + 0x8] JC 0x00181674 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00181674 CALL 0x001219cc JMP 0x00181674 LAB_00181781: CMP R12D,-0x1 MOV RDX,qword ptr [RSP + 0x8] JNZ 0x00181799 CMP word ptr [RDX + 0x6],0x13 JNZ 0x00181799 MOV R12,qword ptr [RDX + 0x30] JMP 0x0018179c LAB_00181799: XOR R12D,R12D LAB_0018179c: SUB RSP,0x8 MOV RDI,R15 MOV RSI,RBX MOV RCX,qword ptr [RSP + 0x18] XOR R8D,R8D MOV R9,qword ptr [RSP + 0x20] PUSH 0x0 CALL 0x001131b2 ADD RSP,0x10 TEST EAX,EAX JNZ 0x00181685 MOVZX EAX,word ptr [R13 + 0x6] CMP EAX,EBP JNZ 0x001817f3 MOV RDI,qword ptr [R12 + 0x10] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [R12] CALL 0x0010e5b0 JMP 0x00181656 LAB_001817f3: CMP dword ptr [RSP + 0x70],0x0 JZ 0x00181656 XOR EBP,EBP XOR R12D,R12D LAB_00181803: MOV RDI,R15 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x30] MOV RCX,R12 CALL 0x00124808 MOV R9,RAX MOV RAX,RDX CMP EAX,0x6 JZ 0x00181685 MOV ECX,R12D XORPS XMM0,XMM0 CVTSI2SD XMM0,RCX TEST R12D,R12D MOVQ RCX,XMM0 CMOVNS RCX,R12 MOV R8D,0x7 CMOVNS R8,RBP MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 PUSH 0x4000 PUSH RAX CALL 0x001253af ADD RSP,0x10 TEST EAX,EAX JS 0x00181685 INC R12 CMP qword ptr [RSP + 0x18],R12 JNZ 0x00181803 JMP 0x00181656
int1 [16] js_typed_array_constructor_ta (long param_1,int8 param_2,int8 param_3,long param_4,int8 param_5, uint param_6,uint param_7) { long lVar1; long lVar2; int iVar3; int *piVar4; double dVar5; ulong uVar7; double dVar8; int8 uVar9; int *piVar10; double dVar11; bool bVar12; int1 auVar13 [16]; int1 auVar14 [16]; int *piVar6; auVar13 = js_create_from_ctor(); piVar4 = auVar13._0_8_; if (auVar13._8_4_ == 6) { LAB_00181656: uVar7 = (ulong)piVar4 & 0xffffffff00000000; goto LAB_001816b0; } iVar3 = typed_array_is_oob(param_4); if (iVar3 == 0) { lVar1 = *(long *)(param_4 + 0x30); lVar2 = *(long *)(*(long *)(lVar1 + 0x18) + 0x30); dVar5 = (double)(ulong)param_7; auVar14 = js_array_buffer_constructor3 (param_1,0,3,(long)dVar5 << ("toSorted"[(long)(int)param_6 + 6] & 0x3fU),0, 0x13,0,js_array_buffer_free,0,1); piVar6 = auVar14._0_8_; if ((auVar14._8_8_ & 0xffffffff) != 6) { iVar3 = typed_array_is_oob(param_4); if (iVar3 != 0) { if (0xfffffff6 < auVar14._8_4_) { uVar9 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar6; *piVar6 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar9); } } goto LAB_00181674; } if ((auVar14._8_4_ == 0xffffffff) && (*(short *)((long)piVar6 + 6) == 0x13)) { piVar10 = *(int **)(piVar6 + 0xc); } else { piVar10 = (int *)0x0; } iVar3 = typed_array_init(param_1,piVar4,piVar6,auVar14._8_8_,0,dVar5,0); if (iVar3 == 0) { if (*(ushort *)(param_4 + 6) == param_6) { memcpy(*(void **)(piVar10 + 4), (void *)((ulong)*(uint *)(lVar1 + 0x20) + *(long *)(lVar2 + 0x10)),(long)*piVar10); } else if (param_7 != 0) { dVar11 = 0.0; do { auVar14 = JS_GetPropertyInt64(param_1,param_4,param_5,dVar11); if (auVar14._8_4_ == 6) goto LAB_00181685; bVar12 = -1 < SUB84(dVar11,0); dVar8 = (double)((ulong)dVar11 & 0xffffffff); if (bVar12) { dVar8 = dVar11; } uVar9 = 7; if (bVar12) { uVar9 = 0; } iVar3 = JS_SetPropertyValue(param_1,piVar4,auVar13._8_8_,dVar8,uVar9,auVar14._0_8_, auVar14._8_8_,0x4000); if (iVar3 < 0) goto LAB_00181685; dVar11 = (double)((long)dVar11 + 1); } while (dVar5 != dVar11); } goto LAB_00181656; } } } else { LAB_00181674: JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } LAB_00181685: if (0xfffffff6 < auVar13._8_4_) { uVar9 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar9,piVar4,auVar13._8_8_); } } uVar7 = 0; auVar13 = ZEXT816(6) << 0x40; LAB_001816b0: auVar14._0_8_ = auVar13._0_8_ & 0xffffffff | uVar7; auVar14._8_8_ = auVar13._8_8_; return auVar14; }
2,385
write_hook_for_undo_bulk_insert
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_undo_bulk_insert(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { /* We are going to call maria_delete_all_rows(), but without logging and syncing, as an optimization (if we crash before commit, the UNDO will empty; if we crash after commit, we have flushed and forced the files). Status still needs to be reset under log mutex, in case of a concurrent checkpoint. */ _ma_reset_status(tbl_info); return write_hook_for_undo(type, trn, tbl_info, lsn, hook_arg); }
O3
c
write_hook_for_undo_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdx, %rdi movq %rsi, %rbx callq 0x5f899 movq (%r14), %rax movq %rax, 0x98(%rbx) movq 0xa0(%rbx), %rcx movq %rcx, %rdx shlq $0x8, %rdx je 0x4dd49 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq orq %rax, %rcx movq %rcx, 0xa0(%rbx) jmp 0x4dd42
write_hook_for_undo_bulk_insert: push rbp mov rbp, rsp push r14 push rbx mov r14, rcx mov rdi, rdx mov rbx, rsi call _ma_reset_status mov rax, [r14] mov [rbx+98h], rax mov rcx, [rbx+0A0h] mov rdx, rcx shl rdx, 8 jz short loc_4DD49 loc_4DD42: xor eax, eax pop rbx pop r14 pop rbp retn loc_4DD49: or rcx, rax mov [rbx+0A0h], rcx jmp short loc_4DD42
long long write_hook_for_undo_bulk_insert(long long a1, long long a2, long long a3, long long *a4) { long long v5; // rax ma_reset_status(a3); v5 = *a4; *(_QWORD *)(a2 + 152) = *a4; if ( !(*(_QWORD *)(a2 + 160) << 8) ) *(_QWORD *)(a2 + 160) |= v5; return 0LL; }
write_hook_for_undo_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RCX MOV RDI,RDX MOV RBX,RSI CALL 0x0015f899 MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x98],RAX MOV RCX,qword ptr [RBX + 0xa0] MOV RDX,RCX SHL RDX,0x8 JZ 0x0014dd49 LAB_0014dd42: XOR EAX,EAX POP RBX POP R14 POP RBP RET LAB_0014dd49: OR RCX,RAX MOV qword ptr [RBX + 0xa0],RCX JMP 0x0014dd42
int8 write_hook_for_undo_bulk_insert(int8 param_1,long param_2,int8 param_3,ulong *param_4) { ulong uVar1; _ma_reset_status(param_3); uVar1 = *param_4; *(ulong *)(param_2 + 0x98) = uVar1; if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) { *(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1; } return 0; }
2,386
lre_byte_swap
bluesky950520[P]quickjs/libregexp.c
void lre_byte_swap(uint8_t *buf, size_t len, BOOL is_byte_swapped) { uint8_t *p, *pe; uint32_t n, r, nw; p = buf; if (len < RE_HEADER_LEN) abort(); // format is: // <header> // <bytecode> // <capture group name 1> // <capture group name 2> // etc. inplace_bswap16(&p[RE_HEADER_FLAGS]); n = get_u32(&p[RE_HEADER_BYTECODE_LEN]); inplace_bswap32(&p[RE_HEADER_BYTECODE_LEN]); if (is_byte_swapped) n = bswap32(n); if (n > len - RE_HEADER_LEN) abort(); p = &buf[RE_HEADER_LEN]; pe = &p[n]; while (p < pe) { n = reopcode_info[*p].size; switch (n) { case 1: case 2: break; case 3: switch (*p) { case REOP_save_reset: // has two 8 bit arguments break; case REOP_range32: // variable length nw = get_u16(&p[1]); // number of pairs of uint32_t if (is_byte_swapped) n = bswap16(n); for (r = 3 + 8 * nw; n < r; n += 4) inplace_bswap32(&p[n]); goto doswap16; case REOP_range: // variable length nw = get_u16(&p[1]); // number of pairs of uint16_t if (is_byte_swapped) n = bswap16(n); for (r = 3 + 4 * nw; n < r; n += 2) inplace_bswap16(&p[n]); goto doswap16; default: doswap16: inplace_bswap16(&p[1]); break; } break; case 5: inplace_bswap32(&p[1]); break; case 17: assert(*p == REOP_simple_greedy_quant); inplace_bswap32(&p[1]); inplace_bswap32(&p[5]); inplace_bswap32(&p[9]); inplace_bswap32(&p[13]); break; default: abort(); } p = &p[n]; } }
O3
c
lre_byte_swap: pushq %rax cmpq $0x7, %rsi jbe 0x9c944 rolw $0x8, (%rdi) movl 0x4(%rdi), %ecx movl %ecx, %eax bswapl %eax movl %eax, 0x4(%rdi) testl %edx, %edx cmovel %ecx, %eax addq $-0x8, %rsi cmpq %rax, %rsi jb 0x9c944 testq %rax, %rax je 0x9c942 addq %rdi, %rax addq $0x8, %rax addq $0x8, %rdi testl %edx, %edx movl $0x3, %edx movl $0x300, %ecx # imm = 0x300 cmovel %edx, %ecx leaq 0xdd3f(%rip), %rdx # 0xaa580 pxor %xmm0, %xmm0 movzbl (%rdi), %r8d movzbl (%r8,%rdx), %esi cmpl $0x4, %esi jg 0x9c8bd leal -0x1(%rsi), %r9d cmpl $0x2, %r9d jb 0x9c934 cmpl $0x3, %esi jne 0x9c944 movl $0x3, %esi cmpl $0xe, %r8d je 0x9c934 cmpl $0x16, %r8d je 0x9c90b cmpl $0x17, %r8d jne 0x9c92f movzwl 0x1(%rdi), %esi leaq 0x3(,%rsi,8), %r8 movl %ecx, %esi cmpl %r8d, %ecx jae 0x9c92f movq %rcx, %rsi movl (%rdi,%rsi), %r9d bswapl %r9d movl %r9d, (%rdi,%rsi) addq $0x4, %rsi cmpq %r8, %rsi jb 0x9c8a7 jmp 0x9c92f cmpl $0x5, %esi je 0x9c8fc cmpl $0x11, %esi jne 0x9c944 movdqu 0x1(%rdi), %xmm1 movdqa %xmm1, %xmm2 punpckhbw %xmm0, %xmm2 # xmm2 = xmm2[8],xmm0[8],xmm2[9],xmm0[9],xmm2[10],xmm0[10],xmm2[11],xmm0[11],xmm2[12],xmm0[12],xmm2[13],xmm0[13],xmm2[14],xmm0[14],xmm2[15],xmm0[15] pshuflw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[3,2,1,0,4,5,6,7] pshufhw $0x1b, %xmm2, %xmm2 # xmm2 = xmm2[0,1,2,3,7,6,5,4] punpcklbw %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1],xmm1[2],xmm0[2],xmm1[3],xmm0[3],xmm1[4],xmm0[4],xmm1[5],xmm0[5],xmm1[6],xmm0[6],xmm1[7],xmm0[7] pshuflw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[3,2,1,0,4,5,6,7] pshufhw $0x1b, %xmm1, %xmm1 # xmm1 = xmm1[0,1,2,3,7,6,5,4] packuswb %xmm2, %xmm1 movdqu %xmm1, 0x1(%rdi) movl $0x11, %esi jmp 0x9c934 movl 0x1(%rdi), %esi bswapl %esi movl %esi, 0x1(%rdi) movl $0x5, %esi jmp 0x9c934 movzwl 0x1(%rdi), %esi leaq 0x3(,%rsi,4), %r8 movl %ecx, %esi cmpl %r8d, %ecx jae 0x9c92f movq %rcx, %rsi rolw $0x8, (%rdi,%rsi) addq $0x2, %rsi cmpq %r8, %rsi jb 0x9c921 rolw $0x8, 0x1(%rdi) movl %esi, %esi addq %rsi, %rdi cmpq %rax, %rdi jb 0x9c845 popq %rax retq callq 0xe090
lre_byte_swap: push rax cmp rsi, 7 jbe loc_9C944 rol word ptr [rdi], 8 mov ecx, [rdi+4] mov eax, ecx bswap eax mov [rdi+4], eax test edx, edx cmovz eax, ecx add rsi, 0FFFFFFFFFFFFFFF8h cmp rsi, rax jb loc_9C944 test rax, rax jz loc_9C942 add rax, rdi add rax, 8 add rdi, 8 test edx, edx mov edx, 3 mov ecx, 300h cmovz ecx, edx lea rdx, reopcode_info pxor xmm0, xmm0 loc_9C845: movzx r8d, byte ptr [rdi] movzx esi, byte ptr [r8+rdx] cmp esi, 4 jg short loc_9C8BD lea r9d, [rsi-1] cmp r9d, 2 jb loc_9C934 cmp esi, 3 jnz loc_9C944 mov esi, 3 cmp r8d, 0Eh jz loc_9C934 cmp r8d, 16h jz loc_9C90B cmp r8d, 17h jnz loc_9C92F movzx esi, word ptr [rdi+1] lea r8, ds:3[rsi*8] mov esi, ecx cmp ecx, r8d jnb loc_9C92F mov rsi, rcx loc_9C8A7: mov r9d, [rdi+rsi] bswap r9d mov [rdi+rsi], r9d add rsi, 4 cmp rsi, r8 jb short loc_9C8A7 jmp short loc_9C92F loc_9C8BD: cmp esi, 5 jz short loc_9C8FC cmp esi, 11h jnz short loc_9C944 movdqu xmm1, xmmword ptr [rdi+1] movdqa xmm2, xmm1 punpckhbw xmm2, xmm0 pshuflw xmm2, xmm2, 1Bh pshufhw xmm2, xmm2, 1Bh punpcklbw xmm1, xmm0 pshuflw xmm1, xmm1, 1Bh pshufhw xmm1, xmm1, 1Bh packuswb xmm1, xmm2 movdqu xmmword ptr [rdi+1], xmm1 mov esi, 11h jmp short loc_9C934 loc_9C8FC: mov esi, [rdi+1] bswap esi mov [rdi+1], esi mov esi, 5 jmp short loc_9C934 loc_9C90B: movzx esi, word ptr [rdi+1] lea r8, ds:3[rsi*4] mov esi, ecx cmp ecx, r8d jnb short loc_9C92F mov rsi, rcx loc_9C921: rol word ptr [rdi+rsi], 8 add rsi, 2 cmp rsi, r8 jb short loc_9C921 loc_9C92F: rol word ptr [rdi+1], 8 loc_9C934: mov esi, esi add rdi, rsi cmp rdi, rax jb loc_9C845 loc_9C942: pop rax retn loc_9C944: call _abort
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> lre_byte_swap( unsigned __int8 *a1, unsigned long long a2, int a3) { unsigned int v3; // ecx unsigned long long v4; // rax unsigned long long v5; // rax long long v6; // rcx long long v7; // r8 unsigned long long v8; // rsi unsigned long long v9; // r8 __m128i v10; // xmm1 unsigned long long v11; // r8 if ( a2 <= 7 ) goto LABEL_28; *(_WORD *)a1 = __ROL2__(*(_WORD *)a1, 8); v3 = *((_DWORD *)a1 + 1); v4 = _byteswap_ulong(v3); *((_DWORD *)a1 + 1) = v4; if ( !a3 ) v4 = v3; if ( a2 - 8 < v4 ) LABEL_28: abort((const char *)a1); if ( v4 ) { v5 = (unsigned long long)&a1[v4 + 8]; a1 += 8; v6 = 768LL; if ( !a3 ) v6 = 3LL; do { v7 = *a1; LODWORD(v8) = reopcode_info[v7]; if ( (unsigned int)v8 > 4 ) { if ( (_DWORD)v8 == 5 ) { *(_DWORD *)(a1 + 1) = _byteswap_ulong(*(_DWORD *)(a1 + 1)); LODWORD(v8) = 5; } else { if ( (_DWORD)v8 != 17 ) goto LABEL_28; v10 = _mm_loadu_si128((const __m128i *)(a1 + 1)); *(__m128i *)(a1 + 1) = _mm_packus_epi16( _mm_shufflehi_epi16( _mm_shufflelo_epi16(_mm_unpacklo_epi8(v10, (__m128i)0LL), 27), 27), _mm_shufflehi_epi16( _mm_shufflelo_epi16(_mm_unpackhi_epi8(v10, (__m128i)0LL), 27), 27)); LODWORD(v8) = 17; } } else if ( (unsigned int)(v8 - 1) >= 2 ) { if ( (_DWORD)v8 != 3 ) goto LABEL_28; LODWORD(v8) = 3; if ( (_DWORD)v7 != 14 ) { if ( (_DWORD)v7 == 22 ) { v11 = 4LL * *(unsigned __int16 *)(a1 + 1) + 3; LODWORD(v8) = v6; if ( (unsigned int)v6 < (unsigned int)v11 ) { v8 = v6; do { *(_WORD *)&a1[v8] = __ROL2__(*(_WORD *)&a1[v8], 8); v8 += 2LL; } while ( v8 < v11 ); } } else if ( (_DWORD)v7 == 23 ) { v9 = 8LL * *(unsigned __int16 *)(a1 + 1) + 3; LODWORD(v8) = v6; if ( (unsigned int)v6 < (unsigned int)v9 ) { v8 = v6; do { *(_DWORD *)&a1[v8] = _byteswap_ulong(*(_DWORD *)&a1[v8]); v8 += 4LL; } while ( v8 < v9 ); } } *(_WORD *)(a1 + 1) = __ROL2__(*(_WORD *)(a1 + 1), 8); } } a1 += (unsigned int)v8; } while ( (unsigned long long)a1 < v5 ); } }
lre_byte_swap: PUSH RAX CMP RSI,0x7 JBE 0x0019c944 ROL word ptr [RDI],0x8 MOV ECX,dword ptr [RDI + 0x4] MOV EAX,ECX BSWAP EAX MOV dword ptr [RDI + 0x4],EAX TEST EDX,EDX CMOVZ EAX,ECX ADD RSI,-0x8 CMP RSI,RAX JC 0x0019c944 TEST RAX,RAX JZ 0x0019c942 ADD RAX,RDI ADD RAX,0x8 ADD RDI,0x8 TEST EDX,EDX MOV EDX,0x3 MOV ECX,0x300 CMOVZ ECX,EDX LEA RDX,[0x1aa580] PXOR XMM0,XMM0 LAB_0019c845: MOVZX R8D,byte ptr [RDI] MOVZX ESI,byte ptr [R8 + RDX*0x1] CMP ESI,0x4 JG 0x0019c8bd LEA R9D,[RSI + -0x1] CMP R9D,0x2 JC 0x0019c934 CMP ESI,0x3 JNZ 0x0019c944 MOV ESI,0x3 CMP R8D,0xe JZ 0x0019c934 CMP R8D,0x16 JZ 0x0019c90b CMP R8D,0x17 JNZ 0x0019c92f MOVZX ESI,word ptr [RDI + 0x1] LEA R8,[0x3 + RSI*0x8] MOV ESI,ECX CMP ECX,R8D JNC 0x0019c92f MOV RSI,RCX LAB_0019c8a7: MOV R9D,dword ptr [RDI + RSI*0x1] BSWAP R9D MOV dword ptr [RDI + RSI*0x1],R9D ADD RSI,0x4 CMP RSI,R8 JC 0x0019c8a7 JMP 0x0019c92f LAB_0019c8bd: CMP ESI,0x5 JZ 0x0019c8fc CMP ESI,0x11 JNZ 0x0019c944 MOVDQU XMM1,xmmword ptr [RDI + 0x1] MOVDQA XMM2,XMM1 PUNPCKHBW XMM2,XMM0 PSHUFLW XMM2,XMM2,0x1b PSHUFHW XMM2,XMM2,0x1b PUNPCKLBW XMM1,XMM0 PSHUFLW XMM1,XMM1,0x1b PSHUFHW XMM1,XMM1,0x1b PACKUSWB XMM1,XMM2 MOVDQU xmmword ptr [RDI + 0x1],XMM1 MOV ESI,0x11 JMP 0x0019c934 LAB_0019c8fc: MOV ESI,dword ptr [RDI + 0x1] BSWAP ESI MOV dword ptr [RDI + 0x1],ESI MOV ESI,0x5 JMP 0x0019c934 LAB_0019c90b: MOVZX ESI,word ptr [RDI + 0x1] LEA R8,[0x3 + RSI*0x4] MOV ESI,ECX CMP ECX,R8D JNC 0x0019c92f MOV RSI,RCX LAB_0019c921: ROL word ptr [RDI + RSI*0x1],0x8 ADD RSI,0x2 CMP RSI,R8 JC 0x0019c921 LAB_0019c92f: ROL word ptr [RDI + 0x1],0x8 LAB_0019c934: MOV ESI,ESI ADD RDI,RSI CMP RDI,RAX JC 0x0019c845 LAB_0019c942: POP RAX RET LAB_0019c944: CALL 0x0010e090
int8 lre_byte_swap(ushort *param_1,ulong param_2,int param_3) { ushort *puVar1; ulong uVar2; byte bVar3; byte bVar4; short sVar5; short sVar6; short sVar7; short sVar8; short sVar9; short sVar10; short sVar11; short sVar12; short sVar13; short sVar14; short sVar15; short sVar16; short sVar17; short sVar18; short sVar19; short sVar20; int1 auVar21 [15]; int1 auVar22 [15]; int1 auVar23 [15]; int1 auVar24 [15]; int1 auVar25 [15]; int1 auVar26 [15]; int1 auVar27 [15]; int1 auVar28 [15]; int1 auVar29 [15]; int1 auVar30 [15]; uint uVar31; int8 in_RAX; ulong uVar32; ulong uVar33; uint uVar34; ulong uVar35; ushort *puVar36; int1 auVar37 [16]; int1 auVar38 [16]; if (7 < param_2) { *param_1 = *param_1 << 8 | *param_1 >> 8; uVar34 = *(uint *)(param_1 + 2); uVar31 = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18; *(uint *)(param_1 + 2) = uVar31; if (param_3 == 0) { uVar31 = uVar34; } uVar32 = (ulong)uVar31; if (uVar32 <= param_2 - 8) { if (uVar32 != 0) { puVar36 = param_1 + 4; uVar33 = 0x300; if (param_3 == 0) { uVar33 = 3; } do { bVar3 = (byte)*puVar36; bVar4 = reopcode_info[bVar3]; uVar34 = (uint)bVar4; if (bVar4 < 5) { if (1 < bVar4 - 1) { if (bVar4 != 3) goto LAB_0019c944; uVar34 = 3; if (bVar3 != 0xe) { uVar35 = uVar33; if (bVar3 == 0x16) { uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 4 + 3; if ((uint)uVar33 < (uint)uVar2) { do { puVar1 = (ushort *)((long)puVar36 + uVar35); *puVar1 = *puVar1 << 8 | *puVar1 >> 8; uVar35 = uVar35 + 2; } while (uVar35 < uVar2); } } else { uVar35 = 3; if ((bVar3 == 0x17) && (uVar2 = (ulong)*(ushort *)((long)puVar36 + 1) * 8 + 3, uVar35 = uVar33, (uint)uVar33 < (uint)uVar2)) { do { uVar34 = *(uint *)((long)puVar36 + uVar35); *(uint *)((long)puVar36 + uVar35) = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18; uVar35 = uVar35 + 4; } while (uVar35 < uVar2); } } uVar34 = (uint)uVar35; puVar1 = (ushort *)((long)puVar36 + 1); *puVar1 = *puVar1 << 8 | *puVar1 >> 8; } } } else if (bVar4 == 5) { uVar34 = *(uint *)((long)puVar36 + 1); *(uint *)((long)puVar36 + 1) = uVar34 >> 0x18 | (uVar34 & 0xff0000) >> 8 | (uVar34 & 0xff00) << 8 | uVar34 << 0x18 ; uVar34 = 5; } else { if (bVar4 != 0x11) goto LAB_0019c944; auVar37 = *(int1 (*) [16])((long)puVar36 + 1); auVar38[1] = 0; auVar38[0] = auVar37[8]; auVar38[2] = auVar37[9]; auVar38[3] = 0; auVar38[4] = auVar37[10]; auVar38[5] = 0; auVar38[6] = auVar37[0xb]; auVar38[7] = 0; auVar38[8] = auVar37[0xc]; auVar38[9] = 0; auVar38[10] = auVar37[0xd]; auVar38[0xb] = 0; auVar38[0xc] = auVar37[0xe]; auVar38[0xd] = 0; auVar38[0xe] = auVar37[0xf]; auVar38[0xf] = 0; auVar38 = pshuflw(auVar38,auVar38,0x1b); auVar38 = pshufhw(auVar38,auVar38,0x1b); auVar21[0xd] = 0; auVar21._0_13_ = auVar37._0_13_; auVar21[0xe] = auVar37[7]; auVar22[0xc] = auVar37[6]; auVar22._0_12_ = auVar37._0_12_; auVar22._13_2_ = auVar21._13_2_; auVar23[0xb] = 0; auVar23._0_11_ = auVar37._0_11_; auVar23._12_3_ = auVar22._12_3_; auVar24[10] = auVar37[5]; auVar24._0_10_ = auVar37._0_10_; auVar24._11_4_ = auVar23._11_4_; auVar25[9] = 0; auVar25._0_9_ = auVar37._0_9_; auVar25._10_5_ = auVar24._10_5_; auVar26[8] = auVar37[4]; auVar26._0_8_ = auVar37._0_8_; auVar26._9_6_ = auVar25._9_6_; auVar28._7_8_ = 0; auVar28._0_7_ = auVar26._8_7_; auVar29._1_8_ = SUB158(auVar28 << 0x40,7); auVar29[0] = auVar37[3]; auVar29._9_6_ = 0; auVar30._1_10_ = SUB1510(auVar29 << 0x30,5); auVar30[0] = auVar37[2]; auVar30._11_4_ = 0; auVar27[2] = auVar37[1]; auVar27._0_2_ = auVar37._0_2_; auVar27._3_12_ = SUB1512(auVar30 << 0x20,3); auVar37._0_2_ = auVar37._0_2_ & 0xff; auVar37._2_13_ = auVar27._2_13_; auVar37[0xf] = 0; auVar37 = pshuflw(auVar37,auVar37,0x1b); auVar37 = pshufhw(auVar37,auVar37,0x1b); sVar5 = auVar37._0_2_; sVar6 = auVar37._2_2_; sVar7 = auVar37._4_2_; sVar8 = auVar37._6_2_; sVar9 = auVar37._8_2_; sVar10 = auVar37._10_2_; sVar11 = auVar37._12_2_; sVar12 = auVar37._14_2_; sVar13 = auVar38._0_2_; sVar14 = auVar38._2_2_; sVar15 = auVar38._4_2_; sVar16 = auVar38._6_2_; sVar17 = auVar38._8_2_; sVar18 = auVar38._10_2_; sVar19 = auVar38._12_2_; sVar20 = auVar38._14_2_; *(char *)((long)puVar36 + 1) = (0 < sVar5) * (sVar5 < 0x100) * auVar37[0] - (0xff < sVar5); *(char *)(puVar36 + 1) = (0 < sVar6) * (sVar6 < 0x100) * auVar37[2] - (0xff < sVar6); *(char *)((long)puVar36 + 3) = (0 < sVar7) * (sVar7 < 0x100) * auVar37[4] - (0xff < sVar7); *(char *)(puVar36 + 2) = (0 < sVar8) * (sVar8 < 0x100) * auVar37[6] - (0xff < sVar8); *(char *)((long)puVar36 + 5) = (0 < sVar9) * (sVar9 < 0x100) * auVar37[8] - (0xff < sVar9); *(char *)(puVar36 + 3) = (0 < sVar10) * (sVar10 < 0x100) * auVar37[10] - (0xff < sVar10) ; *(char *)((long)puVar36 + 7) = (0 < sVar11) * (sVar11 < 0x100) * auVar37[0xc] - (0xff < sVar11); *(char *)(puVar36 + 4) = (0 < sVar12) * (sVar12 < 0x100) * auVar37[0xe] - (0xff < sVar12); *(char *)((long)puVar36 + 9) = (0 < sVar13) * (sVar13 < 0x100) * auVar38[0] - (0xff < sVar13); *(char *)(puVar36 + 5) = (0 < sVar14) * (sVar14 < 0x100) * auVar38[2] - (0xff < sVar14); *(char *)((long)puVar36 + 0xb) = (0 < sVar15) * (sVar15 < 0x100) * auVar38[4] - (0xff < sVar15); *(char *)(puVar36 + 6) = (0 < sVar16) * (sVar16 < 0x100) * auVar38[6] - (0xff < sVar16); *(char *)((long)puVar36 + 0xd) = (0 < sVar17) * (sVar17 < 0x100) * auVar38[8] - (0xff < sVar17); *(char *)(puVar36 + 7) = (0 < sVar18) * (sVar18 < 0x100) * auVar38[10] - (0xff < sVar18) ; *(char *)((long)puVar36 + 0xf) = (0 < sVar19) * (sVar19 < 0x100) * auVar38[0xc] - (0xff < sVar19); *(char *)(puVar36 + 8) = (0 < sVar20) * (sVar20 < 0x100) * auVar38[0xe] - (0xff < sVar20); uVar34 = 0x11; } puVar36 = (ushort *)((long)puVar36 + (ulong)uVar34); } while (puVar36 < (ushort *)((long)param_1 + uVar32 + 8)); } return in_RAX; } } LAB_0019c944: /* WARNING: Subroutine does not return */ abort(); }
2,387
lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
std::unique_ptr<SVGElement> SVGElement::create(Document* document, ElementID id) { switch(id) { case ElementID::Svg: return std::make_unique<SVGSVGElement>(document); case ElementID::Path: return std::make_unique<SVGPathElement>(document); case ElementID::G: return std::make_unique<SVGGElement>(document); case ElementID::Rect: return std::make_unique<SVGRectElement>(document); case ElementID::Circle: return std::make_unique<SVGCircleElement>(document); case ElementID::Ellipse: return std::make_unique<SVGEllipseElement>(document); case ElementID::Line: return std::make_unique<SVGLineElement>(document); case ElementID::Defs: return std::make_unique<SVGDefsElement>(document); case ElementID::Polygon: case ElementID::Polyline: return std::make_unique<SVGPolyElement>(document, id); case ElementID::Stop: return std::make_unique<SVGStopElement>(document); case ElementID::LinearGradient: return std::make_unique<SVGLinearGradientElement>(document); case ElementID::RadialGradient: return std::make_unique<SVGRadialGradientElement>(document); case ElementID::Symbol: return std::make_unique<SVGSymbolElement>(document); case ElementID::Use: return std::make_unique<SVGUseElement>(document); case ElementID::Pattern: return std::make_unique<SVGPatternElement>(document); case ElementID::Mask: return std::make_unique<SVGMaskElement>(document); case ElementID::ClipPath: return std::make_unique<SVGClipPathElement>(document); case ElementID::Marker: return std::make_unique<SVGMarkerElement>(document); case ElementID::Image: return std::make_unique<SVGImageElement>(document); case ElementID::Style: return std::make_unique<SVGStyleElement>(document); case ElementID::Text: return std::make_unique<SVGTextElement>(document); case ElementID::Tspan: return std::make_unique<SVGTSpanElement>(document); default: assert(false); } return nullptr; }
O1
cpp
lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %edx, %r15d leal -0x2(%r15), %eax cmpl $0x16, %eax ja 0xf062 movq %rsi, %r14 movq %rdi, %rbx leaq 0x34715(%rip), %rcx # 0x433e4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x140, %edi # imm = 0x140 callq 0xa310 movq %rax, %r12 movzbl %r15b, %edx movq %rax, %rdi movq %r14, %rsi callq 0x14d12 movq %r12, (%rbx) jmp 0xeffb movl $0x180, %edi # imm = 0x180 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x187b8 jmp 0xeff8 movl $0x98, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi movl $0x6, %edx callq 0x102f8 leaq 0x49e9b(%rip), %rax # 0x58bd8 movq %rax, (%r15) movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12b30 jmp 0xeffb movl $0xf8, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x125b6 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12c00 jmp 0xeffb movl $0x1a8, %edi # imm = 0x1A8 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x143fe jmp 0xeff8 movl $0x98, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi movl $0x4, %edx callq 0x102f8 leaq 0x4a309(%rip), %rax # 0x590d0 movq %rax, (%r15) movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12b64 jmp 0xeffb movl $0x178, %edi # imm = 0x178 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x147dc jmp 0xeff8 movl $0x148, %edi # imm = 0x148 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x17b02 jmp 0xeff8 movl $0x160, %edi # imm = 0x160 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x14ab8 jmp 0xeff8 movl $0xa8, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x12078 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12c34 jmp 0xeffb movl $0x70, %edi callq 0xa310 movq %r14, 0x8(%rax) xorl %ecx, %ecx movq %rcx, 0x10(%rax) leaq 0x49a36(%rip), %rdx # 0x588b8 movq %rdx, (%rax) leaq 0x34300(%rip), %rdx # 0x4318c movups (%rdx), %xmm0 movups %xmm0, 0x18(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rax) movabsq $0x414000003f800000, %rdx # imm = 0x414000003F800000 movq %rdx, 0x38(%rax) movl $0x13000000, 0x40(%rax) # imm = 0x13000000 leaq 0x58(%rax), %rdx movups %xmm0, 0x48(%rax) movq %rdx, 0x60(%rax) movq %rdx, 0x58(%rax) movq %rcx, 0x68(%rax) leaq 0x4a026(%rip), %rdx # 0x58ef0 movq %rdx, (%rax) movq %rsp, %rdi movq %rcx, (%rdi) movq %rax, (%rbx) callq 0x12c9c jmp 0xeffb movl $0x118, %edi # imm = 0x118 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x112fe jmp 0xeff8 movl $0x200, %edi # imm = 0x200 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x222ae jmp 0xeff8 movl $0x1c8, %edi # imm = 0x1C8 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x22294 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12cd0 jmp 0xeffb movl $0x178, %edi # imm = 0x178 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x14150 jmp 0xeff8 movl $0x130, %edi # imm = 0x130 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x14ed4 jmp 0xeff8 movl $0x130, %edi # imm = 0x130 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x1195c movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12c68 jmp 0xeffb movl $0x130, %edi # imm = 0x130 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x105f0 jmp 0xeff8 movl $0x128, %edi # imm = 0x128 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x10dca jmp 0xeff8 movl $0x160, %edi # imm = 0x160 callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x181ca movq %r15, (%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0xd0, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x11832 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12bcc jmp 0xeffb movl $0x88, %edi callq 0xa310 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x177fa movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12b98 jmp 0xeffb leaq 0x34580(%rip), %rdi # 0x435e9 leaq 0x3457f(%rip), %rsi # 0x435ef leaq 0x345d4(%rip), %rcx # 0x4364b movl $0x76, %edx callq 0xa200 movq %rax, %rbx movl $0x88, %esi jmp 0xf125 movq %rax, %rbx movl $0xd0, %esi jmp 0xf125 jmp 0xf0df movq %rax, %rbx movl $0x128, %esi # imm = 0x128 jmp 0xf125 jmp 0xf0ab jmp 0xf0ab movq %rax, %rbx movl $0x130, %esi # imm = 0x130 jmp 0xf125 jmp 0xf0f3 movq %rax, %rbx movl $0x1c8, %esi # imm = 0x1C8 jmp 0xf125 movq %rax, %rbx movl $0x200, %esi # imm = 0x200 jmp 0xf125 movq %rax, %rbx movl $0x118, %esi # imm = 0x118 jmp 0xf125 movq %rax, %rbx movl $0xa8, %esi jmp 0xf125 movq %rax, %rbx movl $0x160, %esi # imm = 0x160 jmp 0xf125 movq %rax, %rbx movl $0x148, %esi # imm = 0x148 jmp 0xf125 movq %rax, %rbx movl $0x178, %esi # imm = 0x178 jmp 0xf125 jmp 0xf113 movq %rax, %rbx movl $0x1a8, %esi # imm = 0x1A8 jmp 0xf125 movq %rax, %rbx movl $0xf8, %esi jmp 0xf125 movq %rax, %rbx movl $0x98, %esi jmp 0xf125 movq %rax, %rbx movl $0x180, %esi # imm = 0x180 movq %r15, %rdi callq 0xa320 movq %rbx, %rdi callq 0xa5c0 movq %rax, %rbx movl $0x140, %esi # imm = 0x140 movq %r12, %rdi jmp 0xf128
_ZN7lunasvg10SVGElement6createEPNS_8DocumentENS_9ElementIDE: push r15 push r14 push r12 push rbx push rax mov r15d, edx lea eax, [r15-2]; switch 23 cases cmp eax, 16h ja def_ECD6; jumptable 000000000000ECD6 default case mov r14, rsi mov rbx, rdi lea rcx, jpt_ECD6 movsxd rax, ds:(jpt_ECD6 - 433E4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_ECD8: mov edi, 140h; jumptable 000000000000ECD6 cases 14,15 call __Znwm; operator new(ulong) mov r12, rax movzx edx, r15b mov rdi, rax; this mov rsi, r14 call _ZN7lunasvg14SVGPolyElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGPolyElement::SVGPolyElement(lunasvg::Document *,lunasvg::ElementID) mov [rbx], r12 jmp loc_EFFB loc_ECFC: mov edi, 180h; jumptable 000000000000ECD6 case 13 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg17SVGPatternElementC2EPNS_8DocumentE; lunasvg::SVGPatternElement::SVGPatternElement(lunasvg::Document *) jmp loc_EFF8 loc_ED19: mov edi, 98h; jumptable 000000000000ECD6 case 6 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov rsi, r14 mov edx, 6 call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea rax, off_58BD8 mov [r15], rax mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg11SVGGElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGGElement>::~unique_ptr() jmp loc_EFFB loc_ED57: mov edi, 0F8h; jumptable 000000000000ECD6 case 11 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGMaskElementC2EPNS_8DocumentE; lunasvg::SVGMaskElement::SVGMaskElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGMaskElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGMaskElement>::~unique_ptr() jmp loc_EFFB loc_ED86: mov edi, 1A8h; jumptable 000000000000ECD6 case 17 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGRectElementC2EPNS_8DocumentE; lunasvg::SVGRectElement::SVGRectElement(lunasvg::Document *) jmp loc_EFF8 loc_EDA3: mov edi, 98h; jumptable 000000000000ECD6 case 4 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov rsi, r14 mov edx, 4 call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea rax, off_590D0 mov [r15], rax mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGDefsElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGDefsElement>::~unique_ptr() jmp loc_EFFB loc_EDE1: mov edi, 178h; jumptable 000000000000ECD6 case 5 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg17SVGEllipseElementC2EPNS_8DocumentE; lunasvg::SVGEllipseElement::SVGEllipseElement(lunasvg::Document *) jmp loc_EFF8 loc_EDFE: mov edi, 148h; jumptable 000000000000ECD6 case 9 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg24SVGLinearGradientElementC2EPNS_8DocumentE; lunasvg::SVGLinearGradientElement::SVGLinearGradientElement(lunasvg::Document *) jmp loc_EFF8 loc_EE1B: mov edi, 160h; jumptable 000000000000ECD6 case 2 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGCircleElementC2EPNS_8DocumentE; lunasvg::SVGCircleElement::SVGCircleElement(lunasvg::Document *) jmp loc_EFF8 loc_EE38: mov edi, 0A8h; jumptable 000000000000ECD6 case 3 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg18SVGClipPathElementC2EPNS_8DocumentE; lunasvg::SVGClipPathElement::SVGClipPathElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg18SVGClipPathElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGClipPathElement>::~unique_ptr() jmp loc_EFFB loc_EE67: mov edi, 70h ; 'p'; jumptable 000000000000ECD6 case 19 call __Znwm; operator new(ulong) mov [rax+8], r14 xor ecx, ecx mov [rax+10h], rcx lea rdx, off_588B8 mov [rax], rdx lea rdx, _ZN7lunasvg4Rect7InvalidE; lunasvg::Rect::Invalid movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rax+18h], xmm0 xorps xmm0, xmm0 movups xmmword ptr [rax+28h], xmm0 mov rdx, 414000003F800000h mov [rax+38h], rdx mov dword ptr [rax+40h], 13000000h lea rdx, [rax+58h] movups xmmword ptr [rax+48h], xmm0 mov [rax+60h], rdx mov [rax+58h], rdx mov [rax+68h], rcx lea rdx, off_58EF0 mov [rax], rdx mov rdi, rsp mov [rdi], rcx mov [rbx], rax call _ZNSt10unique_ptrIN7lunasvg15SVGStyleElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGStyleElement>::~unique_ptr() jmp loc_EFFB loc_EEE0: mov edi, 118h; jumptable 000000000000ECD6 case 7 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg15SVGImageElementC2EPNS_8DocumentE; lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document *) jmp loc_EFF8 loc_EEFD: mov edi, 200h; jumptable 000000000000ECD6 case 22 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGTextElementC2EPNS_8DocumentE; lunasvg::SVGTextElement::SVGTextElement(lunasvg::Document *) jmp loc_EFF8 loc_EF1A: mov edi, 1C8h; jumptable 000000000000ECD6 case 23 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg15SVGTSpanElementC2EPNS_8DocumentE; lunasvg::SVGTSpanElement::SVGTSpanElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg15SVGTSpanElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGTSpanElement>::~unique_ptr() jmp loc_EFFB loc_EF49: mov edi, 178h; jumptable 000000000000ECD6 case 8 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGLineElementC2EPNS_8DocumentE; lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document *) jmp loc_EFF8 loc_EF66: mov edi, 130h; jumptable 000000000000ECD6 case 12 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGPathElementC2EPNS_8DocumentE; lunasvg::SVGPathElement::SVGPathElement(lunasvg::Document *) jmp short loc_EFF8 loc_EF80: mov edi, 130h; jumptable 000000000000ECD6 case 10 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGMarkerElementC2EPNS_8DocumentE; lunasvg::SVGMarkerElement::SVGMarkerElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg16SVGMarkerElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGMarkerElement>::~unique_ptr() jmp short loc_EFFB loc_EFAC: mov edi, 130h; jumptable 000000000000ECD6 case 20 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg13SVGSVGElementC2EPNS_8DocumentE; lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document *) jmp short loc_EFF8 loc_EFC6: mov edi, 128h; jumptable 000000000000ECD6 case 24 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg13SVGUseElementC2EPNS_8DocumentE; lunasvg::SVGUseElement::SVGUseElement(lunasvg::Document *) jmp short loc_EFF8 loc_EFE0: mov edi, 160h; jumptable 000000000000ECD6 case 16 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg24SVGRadialGradientElementC2EPNS_8DocumentE; lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document *) loc_EFF8: mov [rbx], r15 loc_EFFB: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_F00A: mov edi, 0D0h; jumptable 000000000000ECD6 case 21 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGSymbolElementC2EPNS_8DocumentE; lunasvg::SVGSymbolElement::SVGSymbolElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg16SVGSymbolElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGSymbolElement>::~unique_ptr() jmp short loc_EFFB loc_F036: mov edi, 88h; jumptable 000000000000ECD6 case 18 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGStopElementC2EPNS_8DocumentE; lunasvg::SVGStopElement::SVGStopElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGStopElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGStopElement>::~unique_ptr() jmp short loc_EFFB def_ECD6: lea rdi, aFalse; jumptable 000000000000ECD6 default case lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticStdUniqu; "static std::unique_ptr<SVGElement> luna"... mov edx, 76h ; 'v' call ___assert_fail mov rbx, rax mov esi, 88h jmp loc_F125 mov rbx, rax mov esi, 0D0h jmp loc_F125 jmp short loc_F0DF mov rbx, rax mov esi, 128h jmp short loc_F125 jmp short loc_F0AB jmp short $+2 loc_F0AB: mov rbx, rax mov esi, 130h jmp short loc_F125 jmp short loc_F0F3 mov rbx, rax mov esi, 1C8h jmp short loc_F125 mov rbx, rax mov esi, 200h jmp short loc_F125 mov rbx, rax mov esi, 118h jmp short loc_F125 mov rbx, rax mov esi, 0A8h jmp short loc_F125 loc_F0DF: mov rbx, rax mov esi, 160h jmp short loc_F125 mov rbx, rax mov esi, 148h jmp short loc_F125 loc_F0F3: mov rbx, rax mov esi, 178h jmp short loc_F125 jmp short loc_F113 mov rbx, rax mov esi, 1A8h jmp short loc_F125 mov rbx, rax mov esi, 0F8h jmp short loc_F125 loc_F113: mov rbx, rax mov esi, 98h jmp short loc_F125 mov rbx, rax mov esi, 180h; unsigned __int64 loc_F125: mov rdi, r15; void * loc_F128: call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume mov rbx, rax mov esi, 140h mov rdi, r12 jmp short loc_F128
lunasvg::SVGClipPathElement ** lunasvg::SVGElement::create( lunasvg::SVGClipPathElement **a1, lunasvg::Document *a2, int a3) { long long v3; // rax lunasvg::SVGElement *v4; // r12 lunasvg::SVGCircleElement *v5; // r15 lunasvg::SVGClipPathElement *v6; // r15 lunasvg::SVGMaskElement *v7; // r15 lunasvg::SVGClipPathElement *v8; // r15 lunasvg::SVGClipPathElement *v9; // r15 long long v10; // rax lunasvg::SVGTSpanElement *v11; // r15 lunasvg::SVGMarkerElement *v12; // r15 lunasvg::SVGSymbolElement *v14; // r15 lunasvg::SVGStopElement *v15; // r15 _QWORD v16[5]; // [rsp-8h] [rbp-28h] BYREF v16[0] = v3; switch ( a3 ) { case 2: v5 = (lunasvg::SVGCircleElement *)operator new(0x160uLL); lunasvg::SVGCircleElement::SVGCircleElement(v5, a2); goto LABEL_22; case 3: v9 = (lunasvg::SVGClipPathElement *)operator new(0xA8uLL); lunasvg::SVGClipPathElement::SVGClipPathElement(v9, a2); v16[0] = 0LL; *a1 = v9; std::unique_ptr<lunasvg::SVGClipPathElement>::~unique_ptr(v16); return a1; case 4: v8 = (lunasvg::SVGClipPathElement *)operator new(0x98uLL); lunasvg::SVGGraphicsElement::SVGGraphicsElement(v8, a2, 4LL); *(_QWORD *)v8 = off_590D0; v16[0] = 0LL; *a1 = v8; std::unique_ptr<lunasvg::SVGDefsElement>::~unique_ptr(v16); return a1; case 5: v5 = (lunasvg::SVGCircleElement *)operator new(0x178uLL); lunasvg::SVGEllipseElement::SVGEllipseElement(v5, a2); goto LABEL_22; case 6: v6 = (lunasvg::SVGClipPathElement *)operator new(0x98uLL); lunasvg::SVGGraphicsElement::SVGGraphicsElement(v6, a2, 6LL); *(_QWORD *)v6 = off_58BD8; v16[0] = 0LL; *a1 = v6; std::unique_ptr<lunasvg::SVGGElement>::~unique_ptr(v16); return a1; case 7: v5 = (lunasvg::SVGCircleElement *)operator new(0x118uLL); lunasvg::SVGImageElement::SVGImageElement(v5, a2); goto LABEL_22; case 8: v5 = (lunasvg::SVGCircleElement *)operator new(0x178uLL); lunasvg::SVGLineElement::SVGLineElement(v5, a2); goto LABEL_22; case 9: v5 = (lunasvg::SVGCircleElement *)operator new(0x148uLL); lunasvg::SVGLinearGradientElement::SVGLinearGradientElement(v5, a2); goto LABEL_22; case 10: v12 = (lunasvg::SVGMarkerElement *)operator new(0x130uLL); lunasvg::SVGMarkerElement::SVGMarkerElement(v12, a2); v16[0] = 0LL; *a1 = v12; std::unique_ptr<lunasvg::SVGMarkerElement>::~unique_ptr(v16); return a1; case 11: v7 = (lunasvg::SVGMaskElement *)operator new(0xF8uLL); lunasvg::SVGMaskElement::SVGMaskElement(v7, a2); v16[0] = 0LL; *a1 = v7; std::unique_ptr<lunasvg::SVGMaskElement>::~unique_ptr(v16); return a1; case 12: v5 = (lunasvg::SVGCircleElement *)operator new(0x130uLL); lunasvg::SVGPathElement::SVGPathElement(v5, a2); goto LABEL_22; case 13: v5 = (lunasvg::SVGCircleElement *)operator new(0x180uLL); lunasvg::SVGPatternElement::SVGPatternElement(v5, a2); goto LABEL_22; case 14: case 15: v4 = (lunasvg::SVGElement *)operator new(0x140uLL); lunasvg::SVGPolyElement::SVGPolyElement(v4); *a1 = v4; return a1; case 16: v5 = (lunasvg::SVGCircleElement *)operator new(0x160uLL); lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(v5, a2); goto LABEL_22; case 17: v5 = (lunasvg::SVGCircleElement *)operator new(0x1A8uLL); lunasvg::SVGRectElement::SVGRectElement(v5, a2); goto LABEL_22; case 18: v15 = (lunasvg::SVGStopElement *)operator new(0x88uLL); lunasvg::SVGStopElement::SVGStopElement(v15, a2); v16[0] = 0LL; *a1 = v15; std::unique_ptr<lunasvg::SVGStopElement>::~unique_ptr(v16); return a1; case 19: v10 = operator new(0x70uLL); *(_QWORD *)(v10 + 8) = a2; *(_QWORD *)(v10 + 16) = 0LL; *(_QWORD *)v10 = off_588B8; *(_OWORD *)(v10 + 24) = lunasvg::Rect::Invalid; *(_OWORD *)(v10 + 40) = 0LL; *(_QWORD *)(v10 + 56) = 0x414000003F800000LL; *(_DWORD *)(v10 + 64) = 318767104; *(_OWORD *)(v10 + 72) = 0LL; *(_QWORD *)(v10 + 96) = v10 + 88; *(_QWORD *)(v10 + 88) = v10 + 88; *(_QWORD *)(v10 + 104) = 0LL; *(_QWORD *)v10 = off_58EF0; v16[0] = 0LL; *a1 = (lunasvg::SVGClipPathElement *)v10; std::unique_ptr<lunasvg::SVGStyleElement>::~unique_ptr(v16); return a1; case 20: v5 = (lunasvg::SVGCircleElement *)operator new(0x130uLL); lunasvg::SVGSVGElement::SVGSVGElement(v5, a2); goto LABEL_22; case 21: v14 = (lunasvg::SVGSymbolElement *)operator new(0xD0uLL); lunasvg::SVGSymbolElement::SVGSymbolElement(v14, a2); v16[0] = 0LL; *a1 = v14; std::unique_ptr<lunasvg::SVGSymbolElement>::~unique_ptr(v16); return a1; case 22: v5 = (lunasvg::SVGCircleElement *)operator new(0x200uLL); lunasvg::SVGTextElement::SVGTextElement(v5, a2); goto LABEL_22; case 23: v11 = (lunasvg::SVGTSpanElement *)operator new(0x1C8uLL); lunasvg::SVGTSpanElement::SVGTSpanElement(v11, a2); v16[0] = 0LL; *a1 = v11; std::unique_ptr<lunasvg::SVGTSpanElement>::~unique_ptr(v16); return a1; case 24: v5 = (lunasvg::SVGCircleElement *)operator new(0x128uLL); lunasvg::SVGUseElement::SVGUseElement(v5, a2); LABEL_22: *a1 = v5; return a1; default: __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp", 118LL, "static std::unique_ptr<SVGElement> lunasvg::SVGElement::create(Document *, ElementID)"); } }
create: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15D,EDX LEA EAX,[R15 + -0x2] CMP EAX,0x16 JA 0x0010f062 MOV R14,RSI MOV RBX,RDI LEA RCX,[0x1433e4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_e: MOV EDI,0x140 CALL 0x0010a310 MOV R12,RAX LAB_0010ece5: MOVZX EDX,R15B MOV RDI,RAX MOV RSI,R14 CALL 0x00114d12 LAB_0010ecf4: MOV qword ptr [RBX],R12 JMP 0x0010effb caseD_d: MOV EDI,0x180 CALL 0x0010a310 MOV R15,RAX LAB_0010ed09: MOV RDI,RAX MOV RSI,R14 CALL 0x001187b8 LAB_0010ed14: JMP 0x0010eff8 caseD_6: MOV EDI,0x98 CALL 0x0010a310 MOV R15,RAX LAB_0010ed26: MOV RDI,RAX MOV RSI,R14 MOV EDX,0x6 CALL 0x001102f8 LAB_0010ed36: LEA RAX,[0x158bd8] MOV qword ptr [R15],RAX MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112b30 JMP 0x0010effb caseD_b: MOV EDI,0xf8 CALL 0x0010a310 MOV R15,RAX LAB_0010ed64: MOV RDI,RAX MOV RSI,R14 CALL 0x001125b6 LAB_0010ed6f: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112c00 JMP 0x0010effb caseD_11: MOV EDI,0x1a8 CALL 0x0010a310 MOV R15,RAX LAB_0010ed93: MOV RDI,RAX MOV RSI,R14 CALL 0x001143fe LAB_0010ed9e: JMP 0x0010eff8 caseD_4: MOV EDI,0x98 CALL 0x0010a310 MOV R15,RAX LAB_0010edb0: MOV RDI,RAX MOV RSI,R14 MOV EDX,0x4 CALL 0x001102f8 LAB_0010edc0: LEA RAX,[0x1590d0] MOV qword ptr [R15],RAX MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112b64 JMP 0x0010effb caseD_5: MOV EDI,0x178 CALL 0x0010a310 MOV R15,RAX LAB_0010edee: MOV RDI,RAX MOV RSI,R14 CALL 0x001147dc LAB_0010edf9: JMP 0x0010eff8 caseD_9: MOV EDI,0x148 CALL 0x0010a310 MOV R15,RAX LAB_0010ee0b: MOV RDI,RAX MOV RSI,R14 CALL 0x00117b02 LAB_0010ee16: JMP 0x0010eff8 caseD_2: MOV EDI,0x160 CALL 0x0010a310 MOV R15,RAX LAB_0010ee28: MOV RDI,RAX MOV RSI,R14 CALL 0x00114ab8 LAB_0010ee33: JMP 0x0010eff8 caseD_3: MOV EDI,0xa8 CALL 0x0010a310 MOV R15,RAX LAB_0010ee45: MOV RDI,RAX MOV RSI,R14 CALL 0x00112078 LAB_0010ee50: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112c34 JMP 0x0010effb caseD_13: MOV EDI,0x70 CALL 0x0010a310 MOV qword ptr [RAX + 0x8],R14 XOR ECX,ECX MOV qword ptr [RAX + 0x10],RCX LEA RDX,[0x1588b8] MOV qword ptr [RAX],RDX LEA RDX,[0x14318c] MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RAX + 0x18],XMM0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOV RDX,0x414000003f800000 MOV qword ptr [RAX + 0x38],RDX MOV dword ptr [RAX + 0x40],0x13000000 LEA RDX,[RAX + 0x58] MOVUPS xmmword ptr [RAX + 0x48],XMM0 MOV qword ptr [RAX + 0x60],RDX MOV qword ptr [RAX + 0x58],RDX MOV qword ptr [RAX + 0x68],RCX LEA RDX,[0x158ef0] MOV qword ptr [RAX],RDX MOV RDI,RSP MOV qword ptr [RDI],RCX MOV qword ptr [RBX],RAX CALL 0x00112c9c JMP 0x0010effb caseD_7: MOV EDI,0x118 CALL 0x0010a310 MOV R15,RAX LAB_0010eeed: MOV RDI,RAX MOV RSI,R14 CALL 0x001112fe LAB_0010eef8: JMP 0x0010eff8 caseD_16: MOV EDI,0x200 CALL 0x0010a310 MOV R15,RAX LAB_0010ef0a: MOV RDI,RAX MOV RSI,R14 CALL 0x001222ae LAB_0010ef15: JMP 0x0010eff8 caseD_17: MOV EDI,0x1c8 CALL 0x0010a310 MOV R15,RAX LAB_0010ef27: MOV RDI,RAX MOV RSI,R14 CALL 0x00122294 LAB_0010ef32: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112cd0 JMP 0x0010effb caseD_8: MOV EDI,0x178 CALL 0x0010a310 MOV R15,RAX LAB_0010ef56: MOV RDI,RAX MOV RSI,R14 CALL 0x00114150 LAB_0010ef61: JMP 0x0010eff8 caseD_c: MOV EDI,0x130 CALL 0x0010a310 MOV R15,RAX LAB_0010ef73: MOV RDI,RAX MOV RSI,R14 CALL 0x00114ed4 LAB_0010ef7e: JMP 0x0010eff8 caseD_a: MOV EDI,0x130 CALL 0x0010a310 MOV R15,RAX LAB_0010ef8d: MOV RDI,RAX MOV RSI,R14 CALL 0x0011195c LAB_0010ef98: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112c68 JMP 0x0010effb caseD_14: MOV EDI,0x130 CALL 0x0010a310 MOV R15,RAX LAB_0010efb9: MOV RDI,RAX MOV RSI,R14 CALL 0x001105f0 LAB_0010efc4: JMP 0x0010eff8 caseD_18: MOV EDI,0x128 CALL 0x0010a310 MOV R15,RAX LAB_0010efd3: MOV RDI,RAX MOV RSI,R14 CALL 0x00110dca LAB_0010efde: JMP 0x0010eff8 caseD_10: MOV EDI,0x160 CALL 0x0010a310 MOV R15,RAX LAB_0010efed: MOV RDI,RAX MOV RSI,R14 CALL 0x001181ca LAB_0010eff8: MOV qword ptr [RBX],R15 LAB_0010effb: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET caseD_15: MOV EDI,0xd0 CALL 0x0010a310 MOV R15,RAX LAB_0010f017: MOV RDI,RAX MOV RSI,R14 CALL 0x00111832 LAB_0010f022: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112bcc JMP 0x0010effb caseD_12: MOV EDI,0x88 CALL 0x0010a310 MOV R15,RAX LAB_0010f043: MOV RDI,RAX MOV RSI,R14 CALL 0x001177fa LAB_0010f04e: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112b98 JMP 0x0010effb default: LEA RDI,[0x1435e9] LEA RSI,[0x1435ef] LEA RCX,[0x14364b] MOV EDX,0x76 CALL 0x0010a200
/* lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID) */ SVGElement * __thiscall lunasvg::SVGElement::create(SVGElement *this,Document *param_1,uint param_3) { int8 uVar1; SVGPolyElement *pSVar2; SVGGraphicsElement *pSVar3; SVGMaskElement *this_00; SVGClipPathElement *this_01; int8 *puVar4; SVGTSpanElement *this_02; SVGMarkerElement *this_03; SVGUseElement *this_04; SVGSymbolElement *this_05; SVGStopElement *this_06; int8 local_28; switch(param_3) { case 2: this_04 = (SVGUseElement *)operator_new(0x160); /* try { // try from 0010ee28 to 0010ee32 has its CatchHandler @ 0010f0df */ SVGCircleElement::SVGCircleElement((SVGCircleElement *)this_04,param_1); break; case 3: this_01 = (SVGClipPathElement *)operator_new(0xa8); /* try { // try from 0010ee45 to 0010ee4f has its CatchHandler @ 0010f0d5 */ SVGClipPathElement::SVGClipPathElement(this_01,param_1); local_28 = 0; *(SVGClipPathElement **)this = this_01; std::unique_ptr<lunasvg::SVGClipPathElement,std::default_delete<lunasvg::SVGClipPathElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGClipPathElement,std::default_delete<lunasvg::SVGClipPathElement>> *)&local_28); return this; case 4: pSVar3 = (SVGGraphicsElement *)operator_new(0x98); /* try { // try from 0010edb0 to 0010edbf has its CatchHandler @ 0010f0fd */ SVGGraphicsElement::SVGGraphicsElement(pSVar3,param_1,4); *(int ***)pSVar3 = &PTR__SVGGraphicsElement_001590d0; local_28 = 0; *(SVGGraphicsElement **)this = pSVar3; std::unique_ptr<lunasvg::SVGDefsElement,std::default_delete<lunasvg::SVGDefsElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGDefsElement,std::default_delete<lunasvg::SVGDefsElement>> *) &local_28); return this; case 5: this_04 = (SVGUseElement *)operator_new(0x178); /* try { // try from 0010edee to 0010edf8 has its CatchHandler @ 0010f0f3 */ SVGEllipseElement::SVGEllipseElement((SVGEllipseElement *)this_04,param_1); break; case 6: pSVar3 = (SVGGraphicsElement *)operator_new(0x98); /* try { // try from 0010ed26 to 0010ed35 has its CatchHandler @ 0010f113 */ SVGGraphicsElement::SVGGraphicsElement(pSVar3,param_1,6); *(int ***)pSVar3 = &PTR__SVGGraphicsElement_00158bd8; local_28 = 0; *(SVGGraphicsElement **)this = pSVar3; std::unique_ptr<lunasvg::SVGGElement,std::default_delete<lunasvg::SVGGElement>>::~unique_ptr ((unique_ptr<lunasvg::SVGGElement,std::default_delete<lunasvg::SVGGElement>> *) &local_28); return this; case 7: this_04 = (SVGUseElement *)operator_new(0x118); /* try { // try from 0010eeed to 0010eef7 has its CatchHandler @ 0010f0cb */ SVGImageElement::SVGImageElement((SVGImageElement *)this_04,param_1); break; case 8: this_04 = (SVGUseElement *)operator_new(0x178); /* try { // try from 0010ef56 to 0010ef60 has its CatchHandler @ 0010f0b5 */ SVGLineElement::SVGLineElement((SVGLineElement *)this_04,param_1); break; case 9: this_04 = (SVGUseElement *)operator_new(0x148); /* try { // try from 0010ee0b to 0010ee15 has its CatchHandler @ 0010f0e9 */ SVGLinearGradientElement::SVGLinearGradientElement((SVGLinearGradientElement *)this_04,param_1); break; case 10: this_03 = (SVGMarkerElement *)operator_new(0x130); /* try { // try from 0010ef8d to 0010ef97 has its CatchHandler @ 0010f0a9 */ SVGMarkerElement::SVGMarkerElement(this_03,param_1); local_28 = 0; *(SVGMarkerElement **)this = this_03; std::unique_ptr<lunasvg::SVGMarkerElement,std::default_delete<lunasvg::SVGMarkerElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGMarkerElement,std::default_delete<lunasvg::SVGMarkerElement>> *)&local_28); return this; case 0xb: this_00 = (SVGMaskElement *)operator_new(0xf8); /* try { // try from 0010ed64 to 0010ed6e has its CatchHandler @ 0010f109 */ SVGMaskElement::SVGMaskElement(this_00,param_1); local_28 = 0; *(SVGMaskElement **)this = this_00; std::unique_ptr<lunasvg::SVGMaskElement,std::default_delete<lunasvg::SVGMaskElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGMaskElement,std::default_delete<lunasvg::SVGMaskElement>> *) &local_28); return this; case 0xc: this_04 = (SVGUseElement *)operator_new(0x130); /* try { // try from 0010ef73 to 0010ef7d has its CatchHandler @ 0010f0ab */ SVGPathElement::SVGPathElement((SVGPathElement *)this_04,param_1); break; case 0xd: this_04 = (SVGUseElement *)operator_new(0x180); /* try { // try from 0010ed09 to 0010ed13 has its CatchHandler @ 0010f11d */ SVGPatternElement::SVGPatternElement((SVGPatternElement *)this_04,param_1); break; case 0xe: case 0xf: pSVar2 = (SVGPolyElement *)operator_new(0x140); /* try { // try from 0010ece5 to 0010ecf3 has its CatchHandler @ 0010f135 */ SVGPolyElement::SVGPolyElement(pSVar2,param_1,param_3 & 0xff); *(SVGPolyElement **)this = pSVar2; return this; case 0x10: this_04 = (SVGUseElement *)operator_new(0x160); /* try { // try from 0010efed to 0010eff7 has its CatchHandler @ 0010f09b */ SVGRadialGradientElement::SVGRadialGradientElement((SVGRadialGradientElement *)this_04,param_1); break; case 0x11: this_04 = (SVGUseElement *)operator_new(0x1a8); /* try { // try from 0010ed93 to 0010ed9d has its CatchHandler @ 0010f0ff */ SVGRectElement::SVGRectElement((SVGRectElement *)this_04,param_1); break; case 0x12: this_06 = (SVGStopElement *)operator_new(0x88); /* try { // try from 0010f043 to 0010f04d has its CatchHandler @ 0010f081 */ SVGStopElement::SVGStopElement(this_06,param_1); local_28 = 0; *(SVGStopElement **)this = this_06; std::unique_ptr<lunasvg::SVGStopElement,std::default_delete<lunasvg::SVGStopElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGStopElement,std::default_delete<lunasvg::SVGStopElement>> *) &local_28); return this; case 0x13: puVar4 = (int8 *)operator_new(0x70); puVar4[1] = param_1; puVar4[2] = 0; *puVar4 = &PTR__SVGElement_001588b8; uVar1 = Rect::Invalid._8_8_; puVar4[3] = Rect::Invalid._0_8_; puVar4[4] = uVar1; puVar4[5] = 0; puVar4[6] = 0; puVar4[7] = 0x414000003f800000; *(int4 *)(puVar4 + 8) = 0x13000000; puVar4[9] = 0; puVar4[10] = 0; puVar4[0xc] = puVar4 + 0xb; puVar4[0xb] = puVar4 + 0xb; puVar4[0xd] = 0; *puVar4 = &PTR__SVGElement_00158ef0; local_28 = 0; *(int8 **)this = puVar4; std::unique_ptr<lunasvg::SVGStyleElement,std::default_delete<lunasvg::SVGStyleElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGStyleElement,std::default_delete<lunasvg::SVGStyleElement>> *)&local_28); return this; case 0x14: this_04 = (SVGUseElement *)operator_new(0x130); /* try { // try from 0010efb9 to 0010efc3 has its CatchHandler @ 0010f0a7 */ SVGSVGElement::SVGSVGElement((SVGSVGElement *)this_04,param_1); break; case 0x15: this_05 = (SVGSymbolElement *)operator_new(0xd0); /* try { // try from 0010f017 to 0010f021 has its CatchHandler @ 0010f08e */ SVGSymbolElement::SVGSymbolElement(this_05,param_1); local_28 = 0; *(SVGSymbolElement **)this = this_05; std::unique_ptr<lunasvg::SVGSymbolElement,std::default_delete<lunasvg::SVGSymbolElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGSymbolElement,std::default_delete<lunasvg::SVGSymbolElement>> *)&local_28); return this; case 0x16: this_04 = (SVGUseElement *)operator_new(0x200); /* try { // try from 0010ef0a to 0010ef14 has its CatchHandler @ 0010f0c1 */ SVGTextElement::SVGTextElement((SVGTextElement *)this_04,param_1); break; case 0x17: this_02 = (SVGTSpanElement *)operator_new(0x1c8); /* try { // try from 0010ef27 to 0010ef31 has its CatchHandler @ 0010f0b7 */ SVGTSpanElement::SVGTSpanElement(this_02,param_1); local_28 = 0; *(SVGTSpanElement **)this = this_02; std::unique_ptr<lunasvg::SVGTSpanElement,std::default_delete<lunasvg::SVGTSpanElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGTSpanElement,std::default_delete<lunasvg::SVGTSpanElement>> *)&local_28); return this; case 0x18: this_04 = (SVGUseElement *)operator_new(0x128); /* try { // try from 0010efd3 to 0010efdd has its CatchHandler @ 0010f09d */ SVGUseElement::SVGUseElement(this_04,param_1); break; default: /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp" ,0x76, "static std::unique_ptr<SVGElement> lunasvg::SVGElement::create(Document *, ElementID)" ); } *(SVGUseElement **)this = this_04; return this; }
2,388
lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID)
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
std::unique_ptr<SVGElement> SVGElement::create(Document* document, ElementID id) { switch(id) { case ElementID::Svg: return std::make_unique<SVGSVGElement>(document); case ElementID::Path: return std::make_unique<SVGPathElement>(document); case ElementID::G: return std::make_unique<SVGGElement>(document); case ElementID::Rect: return std::make_unique<SVGRectElement>(document); case ElementID::Circle: return std::make_unique<SVGCircleElement>(document); case ElementID::Ellipse: return std::make_unique<SVGEllipseElement>(document); case ElementID::Line: return std::make_unique<SVGLineElement>(document); case ElementID::Defs: return std::make_unique<SVGDefsElement>(document); case ElementID::Polygon: case ElementID::Polyline: return std::make_unique<SVGPolyElement>(document, id); case ElementID::Stop: return std::make_unique<SVGStopElement>(document); case ElementID::LinearGradient: return std::make_unique<SVGLinearGradientElement>(document); case ElementID::RadialGradient: return std::make_unique<SVGRadialGradientElement>(document); case ElementID::Symbol: return std::make_unique<SVGSymbolElement>(document); case ElementID::Use: return std::make_unique<SVGUseElement>(document); case ElementID::Pattern: return std::make_unique<SVGPatternElement>(document); case ElementID::Mask: return std::make_unique<SVGMaskElement>(document); case ElementID::ClipPath: return std::make_unique<SVGClipPathElement>(document); case ElementID::Marker: return std::make_unique<SVGMarkerElement>(document); case ElementID::Image: return std::make_unique<SVGImageElement>(document); case ElementID::Style: return std::make_unique<SVGStyleElement>(document); case ElementID::Text: return std::make_unique<SVGTextElement>(document); case ElementID::Tspan: return std::make_unique<SVGTSpanElement>(document); default: assert(false); } return nullptr; }
O3
cpp
lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %edx, %r15d leal -0x2(%r15), %eax cmpl $0x16, %eax ja 0xef03 movq %rsi, %r14 movq %rdi, %rbx leaq 0x348b5(%rip), %rcx # 0x43430 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x140, %edi # imm = 0x140 callq 0xa2e0 movq %rax, %r12 movzbl %r15b, %edx movq %rax, %rdi movq %r14, %rsi callq 0x1477a movq %r12, (%rbx) jmp 0xee9c movl $0x180, %edi # imm = 0x180 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x17fdc jmp 0xee99 movl $0x98, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi movl $0x6, %edx callq 0x1007c leaq 0x4a07f(%rip), %rax # 0x58c68 movq %rax, (%r15) movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x126de jmp 0xee9c movl $0xf8, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x121a8 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x127ae jmp 0xee9c movl $0x1a8, %edi # imm = 0x1A8 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x13e98 jmp 0xee99 movl $0x98, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi movl $0x4, %edx callq 0x1007c leaq 0x4a4ed(%rip), %rax # 0x59160 movq %rax, (%r15) movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12712 jmp 0xee9c movl $0x178, %edi # imm = 0x178 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x1426c jmp 0xee99 movl $0x148, %edi # imm = 0x148 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x17338 jmp 0xee99 movl $0x160, %edi # imm = 0x160 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x14526 jmp 0xee99 movl $0xa8, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x11cec movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x127e2 jmp 0xee9c movl $0x70, %edi callq 0xa2e0 movq %r14, 0x8(%rax) xorl %ecx, %ecx movq %rcx, 0x10(%rax) leaq 0x3445e(%rip), %rdx # 0x4318c movups (%rdx), %xmm0 movups %xmm0, 0x18(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rax) movsd 0x346ac(%rip), %xmm1 # 0x433f0 movsd %xmm1, 0x38(%rax) movl $0x13000000, 0x40(%rax) # imm = 0x13000000 leaq 0x58(%rax), %rdx movups %xmm0, 0x48(%rax) movq %rdx, 0x60(%rax) movq %rdx, 0x58(%rax) movq %rcx, 0x68(%rax) leaq 0x4a215(%rip), %rdx # 0x58f80 movq %rdx, (%rax) movq %rsp, %rdi movq %rcx, (%rdi) movq %rax, (%rbx) callq 0x1284a jmp 0xee9c movl $0x118, %edi # imm = 0x118 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x10f7a jmp 0xee99 movl $0x200, %edi # imm = 0x200 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x222ac jmp 0xee99 movl $0x1c8, %edi # imm = 0x1C8 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x22292 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x1287e jmp 0xee9c movl $0x178, %edi # imm = 0x178 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x13c00 jmp 0xee99 movl $0x130, %edi # imm = 0x130 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x14932 jmp 0xee99 movl $0x130, %edi # imm = 0x130 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x115c8 movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12816 jmp 0xee9c movl $0x130, %edi # imm = 0x130 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x102e2 jmp 0xee99 movl $0x128, %edi # imm = 0x128 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x10a9e jmp 0xee99 movl $0x160, %edi # imm = 0x160 callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x179e0 movq %r15, (%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0xd0, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x1149e movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x1277a jmp 0xee9c movl $0x88, %edi callq 0xa2e0 movq %rax, %r15 movq %rax, %rdi movq %r14, %rsi callq 0x1705a movq %rsp, %rdi movq $0x0, (%rdi) movq %r15, (%rbx) callq 0x12746 jmp 0xee9c leaq 0x346ef(%rip), %rdi # 0x435f9 leaq 0x346ee(%rip), %rsi # 0x435ff leaq 0x34743(%rip), %rcx # 0x4365b movl $0x76, %edx callq 0xa1e0 movq %rax, %rbx movl $0x88, %esi jmp 0xefc6 movq %rax, %rbx movl $0xd0, %esi jmp 0xefc6 jmp 0xef80 movq %rax, %rbx movl $0x128, %esi # imm = 0x128 jmp 0xefc6 jmp 0xef4c jmp 0xef4c movq %rax, %rbx movl $0x130, %esi # imm = 0x130 jmp 0xefc6 jmp 0xef94 movq %rax, %rbx movl $0x1c8, %esi # imm = 0x1C8 jmp 0xefc6 movq %rax, %rbx movl $0x200, %esi # imm = 0x200 jmp 0xefc6 movq %rax, %rbx movl $0x118, %esi # imm = 0x118 jmp 0xefc6 movq %rax, %rbx movl $0xa8, %esi jmp 0xefc6 movq %rax, %rbx movl $0x160, %esi # imm = 0x160 jmp 0xefc6 movq %rax, %rbx movl $0x148, %esi # imm = 0x148 jmp 0xefc6 movq %rax, %rbx movl $0x178, %esi # imm = 0x178 jmp 0xefc6 jmp 0xefb4 movq %rax, %rbx movl $0x1a8, %esi # imm = 0x1A8 jmp 0xefc6 movq %rax, %rbx movl $0xf8, %esi jmp 0xefc6 movq %rax, %rbx movl $0x98, %esi jmp 0xefc6 movq %rax, %rbx movl $0x180, %esi # imm = 0x180 movq %r15, %rdi callq 0xa2f0 movq %rbx, %rdi callq 0xa580 movq %rax, %rbx movl $0x140, %esi # imm = 0x140 movq %r12, %rdi jmp 0xefc9 nop
_ZN7lunasvg10SVGElement6createEPNS_8DocumentENS_9ElementIDE: push r15 push r14 push r12 push rbx push rax mov r15d, edx lea eax, [r15-2]; switch 23 cases cmp eax, 16h ja def_EB82; jumptable 000000000000EB82 default case mov r14, rsi mov rbx, rdi lea rcx, jpt_EB82 movsxd rax, ds:(jpt_EB82 - 43430h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_EB84: mov edi, 140h; jumptable 000000000000EB82 cases 14,15 call __Znwm; operator new(ulong) mov r12, rax movzx edx, r15b mov rdi, rax; this mov rsi, r14 call _ZN7lunasvg14SVGPolyElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGPolyElement::SVGPolyElement(lunasvg::Document *,lunasvg::ElementID) mov [rbx], r12 jmp loc_EE9C loc_EBA8: mov edi, 180h; jumptable 000000000000EB82 case 13 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg17SVGPatternElementC2EPNS_8DocumentE; lunasvg::SVGPatternElement::SVGPatternElement(lunasvg::Document *) jmp loc_EE99 loc_EBC5: mov edi, 98h; jumptable 000000000000EB82 case 6 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov rsi, r14 mov edx, 6 call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea rax, off_58C68 mov [r15], rax mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg11SVGGElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGGElement>::~unique_ptr() jmp loc_EE9C loc_EC03: mov edi, 0F8h; jumptable 000000000000EB82 case 11 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGMaskElementC2EPNS_8DocumentE; lunasvg::SVGMaskElement::SVGMaskElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGMaskElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGMaskElement>::~unique_ptr() jmp loc_EE9C loc_EC32: mov edi, 1A8h; jumptable 000000000000EB82 case 17 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGRectElementC2EPNS_8DocumentE; lunasvg::SVGRectElement::SVGRectElement(lunasvg::Document *) jmp loc_EE99 loc_EC4F: mov edi, 98h; jumptable 000000000000EB82 case 4 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov rsi, r14 mov edx, 4 call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID) lea rax, off_59160 mov [r15], rax mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGDefsElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGDefsElement>::~unique_ptr() jmp loc_EE9C loc_EC8D: mov edi, 178h; jumptable 000000000000EB82 case 5 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg17SVGEllipseElementC2EPNS_8DocumentE; lunasvg::SVGEllipseElement::SVGEllipseElement(lunasvg::Document *) jmp loc_EE99 loc_ECAA: mov edi, 148h; jumptable 000000000000EB82 case 9 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg24SVGLinearGradientElementC2EPNS_8DocumentE; lunasvg::SVGLinearGradientElement::SVGLinearGradientElement(lunasvg::Document *) jmp loc_EE99 loc_ECC7: mov edi, 160h; jumptable 000000000000EB82 case 2 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGCircleElementC2EPNS_8DocumentE; lunasvg::SVGCircleElement::SVGCircleElement(lunasvg::Document *) jmp loc_EE99 loc_ECE4: mov edi, 0A8h; jumptable 000000000000EB82 case 3 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg18SVGClipPathElementC2EPNS_8DocumentE; lunasvg::SVGClipPathElement::SVGClipPathElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg18SVGClipPathElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGClipPathElement>::~unique_ptr() jmp loc_EE9C loc_ED13: mov edi, 70h ; 'p'; jumptable 000000000000EB82 case 19 call __Znwm; operator new(ulong) mov [rax+8], r14 xor ecx, ecx mov [rax+10h], rcx lea rdx, _ZN7lunasvg4Rect7InvalidE; lunasvg::Rect::Invalid movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rax+18h], xmm0 xorps xmm0, xmm0 movups xmmword ptr [rax+28h], xmm0 movsd xmm1, cs:qword_433F0 movsd qword ptr [rax+38h], xmm1 mov dword ptr [rax+40h], 13000000h lea rdx, [rax+58h] movups xmmword ptr [rax+48h], xmm0 mov [rax+60h], rdx mov [rax+58h], rdx mov [rax+68h], rcx lea rdx, off_58F80 mov [rax], rdx mov rdi, rsp mov [rdi], rcx mov [rbx], rax call _ZNSt10unique_ptrIN7lunasvg15SVGStyleElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGStyleElement>::~unique_ptr() jmp loc_EE9C loc_ED81: mov edi, 118h; jumptable 000000000000EB82 case 7 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg15SVGImageElementC2EPNS_8DocumentE; lunasvg::SVGImageElement::SVGImageElement(lunasvg::Document *) jmp loc_EE99 loc_ED9E: mov edi, 200h; jumptable 000000000000EB82 case 22 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGTextElementC2EPNS_8DocumentE; lunasvg::SVGTextElement::SVGTextElement(lunasvg::Document *) jmp loc_EE99 loc_EDBB: mov edi, 1C8h; jumptable 000000000000EB82 case 23 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg15SVGTSpanElementC2EPNS_8DocumentE; lunasvg::SVGTSpanElement::SVGTSpanElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg15SVGTSpanElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGTSpanElement>::~unique_ptr() jmp loc_EE9C loc_EDEA: mov edi, 178h; jumptable 000000000000EB82 case 8 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGLineElementC2EPNS_8DocumentE; lunasvg::SVGLineElement::SVGLineElement(lunasvg::Document *) jmp loc_EE99 loc_EE07: mov edi, 130h; jumptable 000000000000EB82 case 12 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGPathElementC2EPNS_8DocumentE; lunasvg::SVGPathElement::SVGPathElement(lunasvg::Document *) jmp short loc_EE99 loc_EE21: mov edi, 130h; jumptable 000000000000EB82 case 10 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGMarkerElementC2EPNS_8DocumentE; lunasvg::SVGMarkerElement::SVGMarkerElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg16SVGMarkerElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGMarkerElement>::~unique_ptr() jmp short loc_EE9C loc_EE4D: mov edi, 130h; jumptable 000000000000EB82 case 20 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg13SVGSVGElementC2EPNS_8DocumentE; lunasvg::SVGSVGElement::SVGSVGElement(lunasvg::Document *) jmp short loc_EE99 loc_EE67: mov edi, 128h; jumptable 000000000000EB82 case 24 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg13SVGUseElementC2EPNS_8DocumentE; lunasvg::SVGUseElement::SVGUseElement(lunasvg::Document *) jmp short loc_EE99 loc_EE81: mov edi, 160h; jumptable 000000000000EB82 case 16 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg24SVGRadialGradientElementC2EPNS_8DocumentE; lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(lunasvg::Document *) loc_EE99: mov [rbx], r15 loc_EE9C: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_EEAB: mov edi, 0D0h; jumptable 000000000000EB82 case 21 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg16SVGSymbolElementC2EPNS_8DocumentE; lunasvg::SVGSymbolElement::SVGSymbolElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg16SVGSymbolElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGSymbolElement>::~unique_ptr() jmp short loc_EE9C loc_EED7: mov edi, 88h; jumptable 000000000000EB82 case 18 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax; this mov rsi, r14; lunasvg::Document * call _ZN7lunasvg14SVGStopElementC2EPNS_8DocumentE; lunasvg::SVGStopElement::SVGStopElement(lunasvg::Document *) mov rdi, rsp mov qword ptr [rdi], 0 mov [rbx], r15 call _ZNSt10unique_ptrIN7lunasvg14SVGStopElementESt14default_deleteIS1_EED2Ev; std::unique_ptr<lunasvg::SVGStopElement>::~unique_ptr() jmp short loc_EE9C def_EB82: lea rdi, aFalse; jumptable 000000000000EB82 default case lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aStaticStdUniqu; "static std::unique_ptr<SVGElement> luna"... mov edx, 76h ; 'v' call ___assert_fail mov rbx, rax mov esi, 88h jmp loc_EFC6 mov rbx, rax mov esi, 0D0h jmp loc_EFC6 jmp short loc_EF80 mov rbx, rax mov esi, 128h jmp short loc_EFC6 jmp short loc_EF4C jmp short $+2 loc_EF4C: mov rbx, rax mov esi, 130h jmp short loc_EFC6 jmp short loc_EF94 mov rbx, rax mov esi, 1C8h jmp short loc_EFC6 mov rbx, rax mov esi, 200h jmp short loc_EFC6 mov rbx, rax mov esi, 118h jmp short loc_EFC6 mov rbx, rax mov esi, 0A8h jmp short loc_EFC6 loc_EF80: mov rbx, rax mov esi, 160h jmp short loc_EFC6 mov rbx, rax mov esi, 148h jmp short loc_EFC6 loc_EF94: mov rbx, rax mov esi, 178h jmp short loc_EFC6 jmp short loc_EFB4 mov rbx, rax mov esi, 1A8h jmp short loc_EFC6 mov rbx, rax mov esi, 0F8h jmp short loc_EFC6 loc_EFB4: mov rbx, rax mov esi, 98h jmp short loc_EFC6 mov rbx, rax mov esi, 180h; unsigned __int64 loc_EFC6: mov rdi, r15; void * loc_EFC9: call __ZdlPvm; operator delete(void *,ulong) mov rdi, rbx call __Unwind_Resume mov rbx, rax mov esi, 140h mov rdi, r12 jmp short loc_EFC9
lunasvg::SVGClipPathElement ** lunasvg::SVGElement::create( lunasvg::SVGClipPathElement **a1, lunasvg::Document *a2, int a3) { long long v3; // rax lunasvg::SVGElement *v4; // r12 lunasvg::SVGCircleElement *v5; // r15 lunasvg::SVGClipPathElement *v6; // r15 lunasvg::SVGMaskElement *v7; // r15 lunasvg::SVGClipPathElement *v8; // r15 lunasvg::SVGClipPathElement *v9; // r15 long long v10; // rax lunasvg::SVGTSpanElement *v11; // r15 lunasvg::SVGMarkerElement *v12; // r15 lunasvg::SVGSymbolElement *v14; // r15 lunasvg::SVGStopElement *v15; // r15 _QWORD v16[5]; // [rsp-8h] [rbp-28h] BYREF v16[0] = v3; switch ( a3 ) { case 2: v5 = (lunasvg::SVGCircleElement *)operator new(0x160uLL); lunasvg::SVGCircleElement::SVGCircleElement(v5, a2); goto LABEL_22; case 3: v9 = (lunasvg::SVGClipPathElement *)operator new(0xA8uLL); lunasvg::SVGClipPathElement::SVGClipPathElement(v9, a2); v16[0] = 0LL; *a1 = v9; std::unique_ptr<lunasvg::SVGClipPathElement>::~unique_ptr(v16); return a1; case 4: v8 = (lunasvg::SVGClipPathElement *)operator new(0x98uLL); lunasvg::SVGGraphicsElement::SVGGraphicsElement(v8, a2, 4LL); *(_QWORD *)v8 = off_59160; v16[0] = 0LL; *a1 = v8; std::unique_ptr<lunasvg::SVGDefsElement>::~unique_ptr(v16); return a1; case 5: v5 = (lunasvg::SVGCircleElement *)operator new(0x178uLL); lunasvg::SVGEllipseElement::SVGEllipseElement(v5, a2); goto LABEL_22; case 6: v6 = (lunasvg::SVGClipPathElement *)operator new(0x98uLL); lunasvg::SVGGraphicsElement::SVGGraphicsElement(v6, a2, 6LL); *(_QWORD *)v6 = off_58C68; v16[0] = 0LL; *a1 = v6; std::unique_ptr<lunasvg::SVGGElement>::~unique_ptr(v16); return a1; case 7: v5 = (lunasvg::SVGCircleElement *)operator new(0x118uLL); lunasvg::SVGImageElement::SVGImageElement(v5, a2); goto LABEL_22; case 8: v5 = (lunasvg::SVGCircleElement *)operator new(0x178uLL); lunasvg::SVGLineElement::SVGLineElement(v5, a2); goto LABEL_22; case 9: v5 = (lunasvg::SVGCircleElement *)operator new(0x148uLL); lunasvg::SVGLinearGradientElement::SVGLinearGradientElement(v5, a2); goto LABEL_22; case 10: v12 = (lunasvg::SVGMarkerElement *)operator new(0x130uLL); lunasvg::SVGMarkerElement::SVGMarkerElement(v12, a2); v16[0] = 0LL; *a1 = v12; std::unique_ptr<lunasvg::SVGMarkerElement>::~unique_ptr(v16); return a1; case 11: v7 = (lunasvg::SVGMaskElement *)operator new(0xF8uLL); lunasvg::SVGMaskElement::SVGMaskElement(v7, a2); v16[0] = 0LL; *a1 = v7; std::unique_ptr<lunasvg::SVGMaskElement>::~unique_ptr(v16); return a1; case 12: v5 = (lunasvg::SVGCircleElement *)operator new(0x130uLL); lunasvg::SVGPathElement::SVGPathElement(v5, a2); goto LABEL_22; case 13: v5 = (lunasvg::SVGCircleElement *)operator new(0x180uLL); lunasvg::SVGPatternElement::SVGPatternElement(v5, a2); goto LABEL_22; case 14: case 15: v4 = (lunasvg::SVGElement *)operator new(0x140uLL); lunasvg::SVGPolyElement::SVGPolyElement(v4); *a1 = v4; return a1; case 16: v5 = (lunasvg::SVGCircleElement *)operator new(0x160uLL); lunasvg::SVGRadialGradientElement::SVGRadialGradientElement(v5, a2); goto LABEL_22; case 17: v5 = (lunasvg::SVGCircleElement *)operator new(0x1A8uLL); lunasvg::SVGRectElement::SVGRectElement(v5, a2); goto LABEL_22; case 18: v15 = (lunasvg::SVGStopElement *)operator new(0x88uLL); lunasvg::SVGStopElement::SVGStopElement(v15, a2); v16[0] = 0LL; *a1 = v15; std::unique_ptr<lunasvg::SVGStopElement>::~unique_ptr(v16); return a1; case 19: v10 = operator new(0x70uLL); *(_QWORD *)(v10 + 8) = a2; *(_QWORD *)(v10 + 16) = 0LL; *(_OWORD *)(v10 + 24) = lunasvg::Rect::Invalid; *(_OWORD *)(v10 + 40) = 0LL; *(_QWORD *)(v10 + 56) = 0x414000003F800000LL; *(_DWORD *)(v10 + 64) = 318767104; *(_OWORD *)(v10 + 72) = 0LL; *(_QWORD *)(v10 + 96) = v10 + 88; *(_QWORD *)(v10 + 88) = v10 + 88; *(_QWORD *)(v10 + 104) = 0LL; *(_QWORD *)v10 = off_58F80; v16[0] = 0LL; *a1 = (lunasvg::SVGClipPathElement *)v10; std::unique_ptr<lunasvg::SVGStyleElement>::~unique_ptr(v16); return a1; case 20: v5 = (lunasvg::SVGCircleElement *)operator new(0x130uLL); lunasvg::SVGSVGElement::SVGSVGElement(v5, a2); goto LABEL_22; case 21: v14 = (lunasvg::SVGSymbolElement *)operator new(0xD0uLL); lunasvg::SVGSymbolElement::SVGSymbolElement(v14, a2); v16[0] = 0LL; *a1 = v14; std::unique_ptr<lunasvg::SVGSymbolElement>::~unique_ptr(v16); return a1; case 22: v5 = (lunasvg::SVGCircleElement *)operator new(0x200uLL); lunasvg::SVGTextElement::SVGTextElement(v5, a2); goto LABEL_22; case 23: v11 = (lunasvg::SVGTSpanElement *)operator new(0x1C8uLL); lunasvg::SVGTSpanElement::SVGTSpanElement(v11, a2); v16[0] = 0LL; *a1 = v11; std::unique_ptr<lunasvg::SVGTSpanElement>::~unique_ptr(v16); return a1; case 24: v5 = (lunasvg::SVGCircleElement *)operator new(0x128uLL); lunasvg::SVGUseElement::SVGUseElement(v5, a2); LABEL_22: *a1 = v5; return a1; default: __assert_fail( "false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp", 118LL, "static std::unique_ptr<SVGElement> lunasvg::SVGElement::create(Document *, ElementID)"); } }
create: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15D,EDX LEA EAX,[R15 + -0x2] CMP EAX,0x16 JA 0x0010ef03 MOV R14,RSI MOV RBX,RDI LEA RCX,[0x143430] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_e: MOV EDI,0x140 CALL 0x0010a2e0 MOV R12,RAX LAB_0010eb91: MOVZX EDX,R15B MOV RDI,RAX MOV RSI,R14 CALL 0x0011477a LAB_0010eba0: MOV qword ptr [RBX],R12 JMP 0x0010ee9c caseD_d: MOV EDI,0x180 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ebb5: MOV RDI,RAX MOV RSI,R14 CALL 0x00117fdc LAB_0010ebc0: JMP 0x0010ee99 caseD_6: MOV EDI,0x98 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ebd2: MOV RDI,RAX MOV RSI,R14 MOV EDX,0x6 CALL 0x0011007c LAB_0010ebe2: LEA RAX,[0x158c68] MOV qword ptr [R15],RAX MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x001126de JMP 0x0010ee9c caseD_b: MOV EDI,0xf8 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ec10: MOV RDI,RAX MOV RSI,R14 CALL 0x001121a8 LAB_0010ec1b: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x001127ae JMP 0x0010ee9c caseD_11: MOV EDI,0x1a8 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ec3f: MOV RDI,RAX MOV RSI,R14 CALL 0x00113e98 LAB_0010ec4a: JMP 0x0010ee99 caseD_4: MOV EDI,0x98 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ec5c: MOV RDI,RAX MOV RSI,R14 MOV EDX,0x4 CALL 0x0011007c LAB_0010ec6c: LEA RAX,[0x159160] MOV qword ptr [R15],RAX MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112712 JMP 0x0010ee9c caseD_5: MOV EDI,0x178 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ec9a: MOV RDI,RAX MOV RSI,R14 CALL 0x0011426c LAB_0010eca5: JMP 0x0010ee99 caseD_9: MOV EDI,0x148 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ecb7: MOV RDI,RAX MOV RSI,R14 CALL 0x00117338 LAB_0010ecc2: JMP 0x0010ee99 caseD_2: MOV EDI,0x160 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ecd4: MOV RDI,RAX MOV RSI,R14 CALL 0x00114526 LAB_0010ecdf: JMP 0x0010ee99 caseD_3: MOV EDI,0xa8 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ecf1: MOV RDI,RAX MOV RSI,R14 CALL 0x00111cec LAB_0010ecfc: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x001127e2 JMP 0x0010ee9c caseD_13: MOV EDI,0x70 CALL 0x0010a2e0 MOV qword ptr [RAX + 0x8],R14 XOR ECX,ECX MOV qword ptr [RAX + 0x10],RCX LEA RDX,[0x14318c] MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RAX + 0x18],XMM0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOVSD XMM1,qword ptr [0x001433f0] MOVSD qword ptr [RAX + 0x38],XMM1 MOV dword ptr [RAX + 0x40],0x13000000 LEA RDX,[RAX + 0x58] MOVUPS xmmword ptr [RAX + 0x48],XMM0 MOV qword ptr [RAX + 0x60],RDX MOV qword ptr [RAX + 0x58],RDX MOV qword ptr [RAX + 0x68],RCX LEA RDX,[0x158f80] MOV qword ptr [RAX],RDX MOV RDI,RSP MOV qword ptr [RDI],RCX MOV qword ptr [RBX],RAX CALL 0x0011284a JMP 0x0010ee9c caseD_7: MOV EDI,0x118 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ed8e: MOV RDI,RAX MOV RSI,R14 CALL 0x00110f7a LAB_0010ed99: JMP 0x0010ee99 caseD_16: MOV EDI,0x200 CALL 0x0010a2e0 MOV R15,RAX LAB_0010edab: MOV RDI,RAX MOV RSI,R14 CALL 0x001222ac LAB_0010edb6: JMP 0x0010ee99 caseD_17: MOV EDI,0x1c8 CALL 0x0010a2e0 MOV R15,RAX LAB_0010edc8: MOV RDI,RAX MOV RSI,R14 CALL 0x00122292 LAB_0010edd3: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x0011287e JMP 0x0010ee9c caseD_8: MOV EDI,0x178 CALL 0x0010a2e0 MOV R15,RAX LAB_0010edf7: MOV RDI,RAX MOV RSI,R14 CALL 0x00113c00 LAB_0010ee02: JMP 0x0010ee99 caseD_c: MOV EDI,0x130 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ee14: MOV RDI,RAX MOV RSI,R14 CALL 0x00114932 LAB_0010ee1f: JMP 0x0010ee99 caseD_a: MOV EDI,0x130 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ee2e: MOV RDI,RAX MOV RSI,R14 CALL 0x001115c8 LAB_0010ee39: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112816 JMP 0x0010ee9c caseD_14: MOV EDI,0x130 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ee5a: MOV RDI,RAX MOV RSI,R14 CALL 0x001102e2 LAB_0010ee65: JMP 0x0010ee99 caseD_18: MOV EDI,0x128 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ee74: MOV RDI,RAX MOV RSI,R14 CALL 0x00110a9e LAB_0010ee7f: JMP 0x0010ee99 caseD_10: MOV EDI,0x160 CALL 0x0010a2e0 MOV R15,RAX LAB_0010ee8e: MOV RDI,RAX MOV RSI,R14 CALL 0x001179e0 LAB_0010ee99: MOV qword ptr [RBX],R15 LAB_0010ee9c: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET caseD_15: MOV EDI,0xd0 CALL 0x0010a2e0 MOV R15,RAX LAB_0010eeb8: MOV RDI,RAX MOV RSI,R14 CALL 0x0011149e LAB_0010eec3: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x0011277a JMP 0x0010ee9c caseD_12: MOV EDI,0x88 CALL 0x0010a2e0 MOV R15,RAX LAB_0010eee4: MOV RDI,RAX MOV RSI,R14 CALL 0x0011705a LAB_0010eeef: MOV RDI,RSP MOV qword ptr [RDI],0x0 MOV qword ptr [RBX],R15 CALL 0x00112746 JMP 0x0010ee9c default: LEA RDI,[0x1435f9] LEA RSI,[0x1435ff] LEA RCX,[0x14365b] MOV EDX,0x76 CALL 0x0010a1e0
/* lunasvg::SVGElement::create(lunasvg::Document*, lunasvg::ElementID) */ SVGElement * __thiscall lunasvg::SVGElement::create(SVGElement *this,Document *param_1,uint param_3) { int8 uVar1; SVGPolyElement *pSVar2; SVGGraphicsElement *pSVar3; SVGMaskElement *this_00; SVGClipPathElement *this_01; int8 *puVar4; SVGTSpanElement *this_02; SVGMarkerElement *this_03; SVGUseElement *this_04; SVGSymbolElement *this_05; SVGStopElement *this_06; int8 local_28; switch(param_3) { case 2: this_04 = (SVGUseElement *)operator_new(0x160); /* try { // try from 0010ecd4 to 0010ecde has its CatchHandler @ 0010ef80 */ SVGCircleElement::SVGCircleElement((SVGCircleElement *)this_04,param_1); break; case 3: this_01 = (SVGClipPathElement *)operator_new(0xa8); /* try { // try from 0010ecf1 to 0010ecfb has its CatchHandler @ 0010ef76 */ SVGClipPathElement::SVGClipPathElement(this_01,param_1); local_28 = 0; *(SVGClipPathElement **)this = this_01; std::unique_ptr<lunasvg::SVGClipPathElement,std::default_delete<lunasvg::SVGClipPathElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGClipPathElement,std::default_delete<lunasvg::SVGClipPathElement>> *)&local_28); return this; case 4: pSVar3 = (SVGGraphicsElement *)operator_new(0x98); /* try { // try from 0010ec5c to 0010ec6b has its CatchHandler @ 0010ef9e */ SVGGraphicsElement::SVGGraphicsElement(pSVar3,param_1,4); *(int ***)pSVar3 = &PTR__SVGGraphicsElement_00159160; local_28 = 0; *(SVGGraphicsElement **)this = pSVar3; std::unique_ptr<lunasvg::SVGDefsElement,std::default_delete<lunasvg::SVGDefsElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGDefsElement,std::default_delete<lunasvg::SVGDefsElement>> *) &local_28); return this; case 5: this_04 = (SVGUseElement *)operator_new(0x178); /* try { // try from 0010ec9a to 0010eca4 has its CatchHandler @ 0010ef94 */ SVGEllipseElement::SVGEllipseElement((SVGEllipseElement *)this_04,param_1); break; case 6: pSVar3 = (SVGGraphicsElement *)operator_new(0x98); /* try { // try from 0010ebd2 to 0010ebe1 has its CatchHandler @ 0010efb4 */ SVGGraphicsElement::SVGGraphicsElement(pSVar3,param_1,6); *(int ***)pSVar3 = &PTR__SVGGraphicsElement_00158c68; local_28 = 0; *(SVGGraphicsElement **)this = pSVar3; std::unique_ptr<lunasvg::SVGGElement,std::default_delete<lunasvg::SVGGElement>>::~unique_ptr ((unique_ptr<lunasvg::SVGGElement,std::default_delete<lunasvg::SVGGElement>> *) &local_28); return this; case 7: this_04 = (SVGUseElement *)operator_new(0x118); /* try { // try from 0010ed8e to 0010ed98 has its CatchHandler @ 0010ef6c */ SVGImageElement::SVGImageElement((SVGImageElement *)this_04,param_1); break; case 8: this_04 = (SVGUseElement *)operator_new(0x178); /* try { // try from 0010edf7 to 0010ee01 has its CatchHandler @ 0010ef56 */ SVGLineElement::SVGLineElement((SVGLineElement *)this_04,param_1); break; case 9: this_04 = (SVGUseElement *)operator_new(0x148); /* try { // try from 0010ecb7 to 0010ecc1 has its CatchHandler @ 0010ef8a */ SVGLinearGradientElement::SVGLinearGradientElement((SVGLinearGradientElement *)this_04,param_1); break; case 10: this_03 = (SVGMarkerElement *)operator_new(0x130); /* try { // try from 0010ee2e to 0010ee38 has its CatchHandler @ 0010ef4a */ SVGMarkerElement::SVGMarkerElement(this_03,param_1); local_28 = 0; *(SVGMarkerElement **)this = this_03; std::unique_ptr<lunasvg::SVGMarkerElement,std::default_delete<lunasvg::SVGMarkerElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGMarkerElement,std::default_delete<lunasvg::SVGMarkerElement>> *)&local_28); return this; case 0xb: this_00 = (SVGMaskElement *)operator_new(0xf8); /* try { // try from 0010ec10 to 0010ec1a has its CatchHandler @ 0010efaa */ SVGMaskElement::SVGMaskElement(this_00,param_1); local_28 = 0; *(SVGMaskElement **)this = this_00; std::unique_ptr<lunasvg::SVGMaskElement,std::default_delete<lunasvg::SVGMaskElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGMaskElement,std::default_delete<lunasvg::SVGMaskElement>> *) &local_28); return this; case 0xc: this_04 = (SVGUseElement *)operator_new(0x130); /* try { // try from 0010ee14 to 0010ee1e has its CatchHandler @ 0010ef4c */ SVGPathElement::SVGPathElement((SVGPathElement *)this_04,param_1); break; case 0xd: this_04 = (SVGUseElement *)operator_new(0x180); /* try { // try from 0010ebb5 to 0010ebbf has its CatchHandler @ 0010efbe */ SVGPatternElement::SVGPatternElement((SVGPatternElement *)this_04,param_1); break; case 0xe: case 0xf: pSVar2 = (SVGPolyElement *)operator_new(0x140); /* try { // try from 0010eb91 to 0010eb9f has its CatchHandler @ 0010efd6 */ SVGPolyElement::SVGPolyElement(pSVar2,param_1,param_3 & 0xff); *(SVGPolyElement **)this = pSVar2; return this; case 0x10: this_04 = (SVGUseElement *)operator_new(0x160); /* try { // try from 0010ee8e to 0010ee98 has its CatchHandler @ 0010ef3c */ SVGRadialGradientElement::SVGRadialGradientElement((SVGRadialGradientElement *)this_04,param_1); break; case 0x11: this_04 = (SVGUseElement *)operator_new(0x1a8); /* try { // try from 0010ec3f to 0010ec49 has its CatchHandler @ 0010efa0 */ SVGRectElement::SVGRectElement((SVGRectElement *)this_04,param_1); break; case 0x12: this_06 = (SVGStopElement *)operator_new(0x88); /* try { // try from 0010eee4 to 0010eeee has its CatchHandler @ 0010ef22 */ SVGStopElement::SVGStopElement(this_06,param_1); local_28 = 0; *(SVGStopElement **)this = this_06; std::unique_ptr<lunasvg::SVGStopElement,std::default_delete<lunasvg::SVGStopElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGStopElement,std::default_delete<lunasvg::SVGStopElement>> *) &local_28); return this; case 0x13: puVar4 = (int8 *)operator_new(0x70); puVar4[1] = param_1; puVar4[2] = 0; uVar1 = Rect::Invalid._8_8_; puVar4[3] = Rect::Invalid._0_8_; puVar4[4] = uVar1; puVar4[5] = 0; puVar4[6] = 0; puVar4[7] = DAT_001433f0; *(int4 *)(puVar4 + 8) = 0x13000000; puVar4[9] = 0; puVar4[10] = 0; puVar4[0xc] = puVar4 + 0xb; puVar4[0xb] = puVar4 + 0xb; puVar4[0xd] = 0; *puVar4 = &PTR__SVGElement_00158f80; local_28 = 0; *(int8 **)this = puVar4; std::unique_ptr<lunasvg::SVGStyleElement,std::default_delete<lunasvg::SVGStyleElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGStyleElement,std::default_delete<lunasvg::SVGStyleElement>> *)&local_28); return this; case 0x14: this_04 = (SVGUseElement *)operator_new(0x130); /* try { // try from 0010ee5a to 0010ee64 has its CatchHandler @ 0010ef48 */ SVGSVGElement::SVGSVGElement((SVGSVGElement *)this_04,param_1); break; case 0x15: this_05 = (SVGSymbolElement *)operator_new(0xd0); /* try { // try from 0010eeb8 to 0010eec2 has its CatchHandler @ 0010ef2f */ SVGSymbolElement::SVGSymbolElement(this_05,param_1); local_28 = 0; *(SVGSymbolElement **)this = this_05; std::unique_ptr<lunasvg::SVGSymbolElement,std::default_delete<lunasvg::SVGSymbolElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGSymbolElement,std::default_delete<lunasvg::SVGSymbolElement>> *)&local_28); return this; case 0x16: this_04 = (SVGUseElement *)operator_new(0x200); /* try { // try from 0010edab to 0010edb5 has its CatchHandler @ 0010ef62 */ SVGTextElement::SVGTextElement((SVGTextElement *)this_04,param_1); break; case 0x17: this_02 = (SVGTSpanElement *)operator_new(0x1c8); /* try { // try from 0010edc8 to 0010edd2 has its CatchHandler @ 0010ef58 */ SVGTSpanElement::SVGTSpanElement(this_02,param_1); local_28 = 0; *(SVGTSpanElement **)this = this_02; std::unique_ptr<lunasvg::SVGTSpanElement,std::default_delete<lunasvg::SVGTSpanElement>>:: ~unique_ptr((unique_ptr<lunasvg::SVGTSpanElement,std::default_delete<lunasvg::SVGTSpanElement>> *)&local_28); return this; case 0x18: this_04 = (SVGUseElement *)operator_new(0x128); /* try { // try from 0010ee74 to 0010ee7e has its CatchHandler @ 0010ef3e */ SVGUseElement::SVGUseElement(this_04,param_1); break; default: /* WARNING: Subroutine does not return */ __assert_fail("false", "/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp" ,0x76, "static std::unique_ptr<SVGElement> lunasvg::SVGElement::create(Document *, ElementID)" ); } *(SVGUseElement **)this = this_04; return this; }
2,389
free_size_to_tail_pattern
eloqsql/storage/maria/ma_bitmap.c
static uint free_size_to_tail_pattern(MARIA_FILE_BITMAP *bitmap, uint size) { if (size >= bitmap->sizes[0]) return 0; /* Revert to empty page */ if (size < bitmap->sizes[6]) return 7; if (size < bitmap->sizes[5]) return 6; return 5; }
O0
c
free_size_to_tail_pattern: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x108(%rcx), %eax jb 0x60863 movl $0x0, -0x4(%rbp) jmp 0x6089a movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x120(%rcx), %eax jae 0x6087b movl $0x7, -0x4(%rbp) jmp 0x6089a movl -0x14(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x11c(%rcx), %eax jae 0x60893 movl $0x6, -0x4(%rbp) jmp 0x6089a movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
free_size_to_tail_pattern: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+108h] jb short loc_60863 mov [rbp+var_4], 0 jmp short loc_6089A loc_60863: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+120h] jnb short loc_6087B mov [rbp+var_4], 7 jmp short loc_6089A loc_6087B: mov eax, [rbp+var_14] mov rcx, [rbp+var_10] cmp eax, [rcx+11Ch] jnb short loc_60893 mov [rbp+var_4], 6 jmp short loc_6089A loc_60893: mov [rbp+var_4], 5 loc_6089A: mov eax, [rbp+var_4] pop rbp retn
long long free_size_to_tail_pattern(_DWORD *a1, unsigned int a2) { if ( a2 < a1[66] ) { if ( a2 >= a1[72] ) { if ( a2 >= a1[71] ) return 5; else return 6; } else { return 7; } } else { return 0; } }
free_size_to_tail_pattern: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x108] JC 0x00160863 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016089a LAB_00160863: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x120] JNC 0x0016087b MOV dword ptr [RBP + -0x4],0x7 JMP 0x0016089a LAB_0016087b: MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x11c] JNC 0x00160893 MOV dword ptr [RBP + -0x4],0x6 JMP 0x0016089a LAB_00160893: MOV dword ptr [RBP + -0x4],0x5 LAB_0016089a: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 free_size_to_tail_pattern(long param_1,uint param_2) { int4 local_c; if (param_2 < *(uint *)(param_1 + 0x108)) { if (param_2 < *(uint *)(param_1 + 0x120)) { local_c = 7; } else if (param_2 < *(uint *)(param_1 + 0x11c)) { local_c = 6; } else { local_c = 5; } } else { local_c = 0; } return local_c; }
2,390
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
PatchTable::~PatchTable() { if (_vertexPrecisionIsDouble) { delete _localPointStencils.Get<double>(); } else { delete _localPointStencils.Get<float>(); } if (_varyingPrecisionIsDouble) { delete _localPointVaryingStencils.Get<double>(); } else { delete _localPointVaryingStencils.Get<float>(); } for (int fvc=0; fvc<(int)_localPointFaceVaryingStencils.size(); ++fvc) { if (_faceVaryingPrecisionIsDouble) { delete _localPointFaceVaryingStencils[fvc].Get<double>(); } else { delete _localPointFaceVaryingStencils[fvc].Get<float>(); } } }
O0
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movb 0x110(%rax), %al shrb %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x13eecf movq -0x18(%rbp), %rdi subq $-0x80, %rdi callq 0xd6890 movq %rax, -0x20(%rbp) jmp 0x13eeb9 movq -0x20(%rbp), %rax cmpq $0x0, %rax je 0x13eecd movq -0x20(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13eef8 movq -0x18(%rbp), %rdi subq $-0x80, %rdi callq 0xc9ca0 movq %rax, -0x28(%rbp) jmp 0x13eee2 movq -0x28(%rbp), %rax cmpq $0x0, %rax je 0x13eef6 movq -0x28(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13eef8 movq -0x18(%rbp), %rax movb 0x110(%rax), %al shrb $0x2, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x13ef3b movq -0x18(%rbp), %rdi addq $0x88, %rdi callq 0xd6890 movq %rax, -0x30(%rbp) jmp 0x13ef25 movq -0x30(%rbp), %rax cmpq $0x0, %rax je 0x13ef39 movq -0x30(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13ef67 movq -0x18(%rbp), %rdi addq $0x88, %rdi callq 0xc9ca0 movq %rax, -0x38(%rbp) jmp 0x13ef51 movq -0x38(%rbp), %rax cmpq $0x0, %rax je 0x13ef65 movq -0x38(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13ef67 movl $0x0, -0xc(%rbp) movq -0x18(%rbp), %rdi movl -0xc(%rbp), %eax movl %eax, -0x3c(%rbp) addq $0xc8, %rdi callq 0xd1c90 movq %rax, %rcx movl -0x3c(%rbp), %eax cmpl %ecx, %eax jge 0x13f029 movq -0x18(%rbp), %rax movb 0x110(%rax), %al shrb $0x3, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x13efe1 movq -0x18(%rbp), %rdi addq $0xc8, %rdi movslq -0xc(%rbp), %rsi callq 0xcdac0 movq %rax, %rdi callq 0xd6890 movq %rax, -0x48(%rbp) jmp 0x13efcb movq -0x48(%rbp), %rax cmpq $0x0, %rax je 0x13efdf movq -0x48(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13f019 movq -0x18(%rbp), %rdi addq $0xc8, %rdi movslq -0xc(%rbp), %rsi callq 0xcdac0 movq %rax, %rdi callq 0xc9ca0 movq %rax, -0x50(%rbp) jmp 0x13f003 movq -0x50(%rbp), %rax cmpq $0x0, %rax je 0x13f017 movq -0x50(%rbp), %rdi movq (%rdi), %rax callq *0x8(%rax) jmp 0x13f019 jmp 0x13f01b movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x13ef6e movq -0x18(%rbp), %rdi addq $0xf8, %rdi callq 0xc3ab0 movq -0x18(%rbp), %rdi addq $0xe0, %rdi callq 0xca800 movq -0x18(%rbp), %rdi addq $0xc8, %rdi callq 0xc76c0 movq -0x18(%rbp), %rdi addq $0xb0, %rdi callq 0xd4850 movq -0x18(%rbp), %rdi addq $0x98, %rdi callq 0xca800 movq -0x18(%rbp), %rdi addq $0x68, %rdi callq 0xca800 movq -0x18(%rbp), %rdi addq $0x50, %rdi callq 0xd7aa0 movq -0x18(%rbp), %rdi addq $0x38, %rdi callq 0xceb80 movq -0x18(%rbp), %rdi addq $0x20, %rdi callq 0xca800 movq -0x18(%rbp), %rdi addq $0x8, %rdi callq 0xd5370 addq $0x50, %rsp popq %rbp retq movq %rax, %rdi callq 0xe0120 nopl (%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Far10PatchTableD2Ev: push rbp; Alternative name is 'OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()' mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov al, [rax+110h] shr al, 1 and al, 1 movzx eax, al cmp eax, 0 jz short loc_13EECF mov rdi, [rbp+var_18] sub rdi, 0FFFFFFFFFFFFFF80h call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIdEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>(void) mov [rbp+var_20], rax jmp short $+2 loc_13EEB9: mov rax, [rbp+var_20] cmp rax, 0 jz short loc_13EECD mov rdi, [rbp+var_20] mov rax, [rdi] call qword ptr [rax+8] loc_13EECD: jmp short loc_13EEF8 loc_13EECF: mov rdi, [rbp+var_18] sub rdi, 0FFFFFFFFFFFFFF80h call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIfEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>(void) mov [rbp+var_28], rax jmp short $+2 loc_13EEE2: mov rax, [rbp+var_28] cmp rax, 0 jz short loc_13EEF6 mov rdi, [rbp+var_28] mov rax, [rdi] call qword ptr [rax+8] loc_13EEF6: jmp short $+2 loc_13EEF8: mov rax, [rbp+var_18] mov al, [rax+110h] shr al, 2 and al, 1 movzx eax, al cmp eax, 0 jz short loc_13EF3B mov rdi, [rbp+var_18] add rdi, 88h call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIdEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>(void) mov [rbp+var_30], rax jmp short $+2 loc_13EF25: mov rax, [rbp+var_30] cmp rax, 0 jz short loc_13EF39 mov rdi, [rbp+var_30] mov rax, [rdi] call qword ptr [rax+8] loc_13EF39: jmp short loc_13EF67 loc_13EF3B: mov rdi, [rbp+var_18] add rdi, 88h call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIfEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>(void) mov [rbp+var_38], rax jmp short $+2 loc_13EF51: mov rax, [rbp+var_38] cmp rax, 0 jz short loc_13EF65 mov rdi, [rbp+var_38] mov rax, [rdi] call qword ptr [rax+8] loc_13EF65: jmp short $+2 loc_13EF67: mov [rbp+var_C], 0 loc_13EF6E: mov rdi, [rbp+var_18] mov eax, [rbp+var_C] mov [rbp+var_3C], eax add rdi, 0C8h call __ZNKSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtrESaIS4_EE4sizeEv; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::size(void) mov rcx, rax mov eax, [rbp+var_3C] cmp eax, ecx jge loc_13F029 mov rax, [rbp+var_18] mov al, [rax+110h] shr al, 3 and al, 1 movzx eax, al cmp eax, 0 jz short loc_13EFE1 mov rdi, [rbp+var_18] add rdi, 0C8h movsxd rsi, [rbp+var_C] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtrESaIS4_EEixEm; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::operator[](ulong) mov rdi, rax call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIdEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>(void) mov [rbp+var_48], rax jmp short $+2 loc_13EFCB: mov rax, [rbp+var_48] cmp rax, 0 jz short loc_13EFDF mov rdi, [rbp+var_48] mov rax, [rdi] call qword ptr [rax+8] loc_13EFDF: jmp short loc_13F019 loc_13EFE1: mov rdi, [rbp+var_18] add rdi, 0C8h movsxd rsi, [rbp+var_C] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtrESaIS4_EEixEm; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::operator[](ulong) mov rdi, rax call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtr3GetIfEEPNS1_16StencilTableRealIT_EEv; OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>(void) mov [rbp+var_50], rax jmp short $+2 loc_13F003: mov rax, [rbp+var_50] cmp rax, 0 jz short loc_13F017 mov rdi, [rbp+var_50] mov rax, [rdi] call qword ptr [rax+8] loc_13F017: jmp short $+2 loc_13F019: jmp short $+2 loc_13F01B: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_13EF6E loc_13F029: mov rdi, [rbp+var_18] add rdi, 0F8h call __ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() mov rdi, [rbp+var_18] add rdi, 0E0h call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_18] add rdi, 0C8h call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable15StencilTablePtrESaIS4_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::~vector() mov rdi, [rbp+var_18] add rdi, 0B0h call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable16FVarPatchChannelESaIS4_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector() mov rdi, [rbp+var_18] add rdi, 98h call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_18] add rdi, 68h ; 'h' call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_18] add rdi, 50h ; 'P' call __ZNSt6vectorIjSaIjEED2Ev; std::vector<uint>::~vector() mov rdi, [rbp+var_18] add rdi, 38h ; '8' call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchParamESaIS3_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::~vector() mov rdi, [rbp+var_18] add rdi, 20h ; ' ' call __ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() mov rdi, [rbp+var_18] add rdi, 8 call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable10PatchArrayESaIS4_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::PatchArray>::~vector() add rsp, 50h pop rbp retn mov rdi, rax call __clang_call_terminate
void OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(OpenSubdiv::v3_6_0::Far::PatchTable *this) { long long v1; // rdi long long v2; // rdi long long v3; // [rsp+0h] [rbp-50h] long long v4; // [rsp+8h] [rbp-48h] 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 i; // [rsp+44h] [rbp-Ch] if ( (*((_BYTE *)this + 272) & 2) != 0 ) { v8 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>((char *)this + 128); if ( v8 ) (*(void ( **)(long long))(*(_QWORD *)v8 + 8LL))(v8); } else { v7 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>((char *)this + 128); if ( v7 ) (*(void ( **)(long long))(*(_QWORD *)v7 + 8LL))(v7); } if ( (*((_BYTE *)this + 272) & 4) != 0 ) { v6 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>((char *)this + 136); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); } else { v5 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>((char *)this + 136); if ( v5 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); } for ( i = 0; i < (int)std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::size((char *)this + 200); ++i ) { if ( (*((_BYTE *)this + 272) & 8) != 0 ) { v1 = std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::operator[]((char *)this + 200, i); v4 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<double>(v1); if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); } else { v2 = std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::operator[]((char *)this + 200, i); v3 = OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr::Get<float>(v2); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); } } std::vector<float>::~vector((char *)this + 248); std::vector<int>::~vector((char *)this + 224); std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::StencilTablePtr>::~vector((char *)this + 200); std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector((char *)this + 176); std::vector<int>::~vector((char *)this + 152); std::vector<int>::~vector((char *)this + 104); std::vector<unsigned int>::~vector((char *)this + 80); std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::~vector((char *)this + 56); std::vector<int>::~vector((char *)this + 32); std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::PatchArray>::~vector((char *)this + 8); }
2,391
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
PatchTable::~PatchTable() { if (_vertexPrecisionIsDouble) { delete _localPointStencils.Get<double>(); } else { delete _localPointStencils.Get<float>(); } if (_varyingPrecisionIsDouble) { delete _localPointVaryingStencils.Get<double>(); } else { delete _localPointVaryingStencils.Get<float>(); } for (int fvc=0; fvc<(int)_localPointFaceVaryingStencils.size(); ++fvc) { if (_faceVaryingPrecisionIsDouble) { delete _localPointFaceVaryingStencils[fvc].Get<double>(); } else { delete _localPointFaceVaryingStencils[fvc].Get<float>(); } } }
O1
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x80(%rdi), %rdi testq %rdi, %rdi je 0x6931f movq (%rdi), %rax callq *0x8(%rax) movq 0x88(%rbx), %rdi testq %rdi, %rdi je 0x69331 movq (%rdi), %rax callq *0x8(%rax) movq 0xc8(%rbx), %rax movq 0xd0(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x6937c xorl %r14d, %r14d movq (%rax,%r14,8), %rdi testq %rdi, %rdi je 0x6935c movq (%rdi), %rax callq *0x8(%rax) incq %r14 movq 0xc8(%rbx), %rax movq 0xd0(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx cmpq %rcx, %r14 jl 0x6934d movq 0xf8(%rbx), %rdi testq %rdi, %rdi je 0x69397 movq 0x108(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0xe0(%rbx), %rdi testq %rdi, %rdi je 0x693b2 movq 0xf0(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0xc8(%rbx), %rdi testq %rdi, %rdi je 0x693cd movq 0xd8(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 leaq 0xb0(%rbx), %rdi callq 0x3b970 movq 0x98(%rbx), %rdi testq %rdi, %rdi je 0x693f4 movq 0xa8(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x69409 movq 0x78(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x6941e movq 0x60(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x69433 movq 0x48(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x20(%rbx), %rdi testq %rdi, %rdi je 0x69448 movq 0x30(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x69464 movq 0x18(%rbx), %rsi subq %rdi, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3a2d0 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Far10PatchTableD2Ev: push r14; Alternative name is 'OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()' push rbx push rax mov rbx, rdi mov rdi, [rdi+80h] test rdi, rdi jz short loc_6931F mov rax, [rdi] call qword ptr [rax+8] loc_6931F: mov rdi, [rbx+88h] test rdi, rdi jz short loc_69331 mov rax, [rdi] call qword ptr [rax+8] loc_69331: mov rax, [rbx+0C8h] mov rcx, [rbx+0D0h] sub rcx, rax shr rcx, 3 test ecx, ecx jle short loc_6937C xor r14d, r14d loc_6934D: mov rdi, [rax+r14*8] test rdi, rdi jz short loc_6935C mov rax, [rdi] call qword ptr [rax+8] loc_6935C: inc r14 mov rax, [rbx+0C8h] mov rcx, [rbx+0D0h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx cmp r14, rcx jl short loc_6934D loc_6937C: mov rdi, [rbx+0F8h]; void * test rdi, rdi jz short loc_69397 mov rsi, [rbx+108h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69397: mov rdi, [rbx+0E0h]; void * test rdi, rdi jz short loc_693B2 mov rsi, [rbx+0F0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_693B2: mov rdi, [rbx+0C8h]; void * test rdi, rdi jz short loc_693CD mov rsi, [rbx+0D8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_693CD: lea rdi, [rbx+0B0h] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable16FVarPatchChannelESaIS4_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector() mov rdi, [rbx+98h]; void * test rdi, rdi jz short loc_693F4 mov rsi, [rbx+0A8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_693F4: mov rdi, [rbx+68h]; void * test rdi, rdi jz short loc_69409 mov rsi, [rbx+78h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69409: mov rdi, [rbx+50h]; void * test rdi, rdi jz short loc_6941E mov rsi, [rbx+60h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6941E: mov rdi, [rbx+38h]; void * test rdi, rdi jz short loc_69433 mov rsi, [rbx+48h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69433: mov rdi, [rbx+20h]; void * test rdi, rdi jz short loc_69448 mov rsi, [rbx+30h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_69448: mov rdi, [rbx+8]; void * test rdi, rdi jz short loc_69464 mov rsi, [rbx+18h] sub rsi, rdi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) loc_69464: add rsp, 8 pop rbx pop r14 retn
void OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(OpenSubdiv::v3_6_0::Far::PatchTable *this) { long long v2; // rdi long long v3; // rdi long long v4; // rax long long v5; // r14 long long v6; // rdi void *v7; // rdi void *v8; // rdi void *v9; // rdi void *v10; // rdi void *v11; // rdi void *v12; // rdi void *v13; // rdi void *v14; // rdi void *v15; // rdi v2 = *((_QWORD *)this + 16); if ( v2 ) (*(void ( **)(long long))(*(_QWORD *)v2 + 8LL))(v2); v3 = *((_QWORD *)this + 17); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); v4 = *((_QWORD *)this + 25); if ( (int)((unsigned long long)(*((_QWORD *)this + 26) - v4) >> 3) > 0 ) { v5 = 0LL; do { v6 = *(_QWORD *)(v4 + 8 * v5); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); ++v5; v4 = *((_QWORD *)this + 25); } while ( v5 < (int)((unsigned long long)(*((_QWORD *)this + 26) - v4) >> 3) ); } v7 = (void *)*((_QWORD *)this + 31); if ( v7 ) operator delete(v7, *((_QWORD *)this + 33) - (_QWORD)v7); v8 = (void *)*((_QWORD *)this + 28); if ( v8 ) operator delete(v8, *((_QWORD *)this + 30) - (_QWORD)v8); v9 = (void *)*((_QWORD *)this + 25); if ( v9 ) operator delete(v9, *((_QWORD *)this + 27) - (_QWORD)v9); std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector((char *)this + 176); v10 = (void *)*((_QWORD *)this + 19); if ( v10 ) operator delete(v10, *((_QWORD *)this + 21) - (_QWORD)v10); v11 = (void *)*((_QWORD *)this + 13); if ( v11 ) operator delete(v11, *((_QWORD *)this + 15) - (_QWORD)v11); v12 = (void *)*((_QWORD *)this + 10); if ( v12 ) operator delete(v12, *((_QWORD *)this + 12) - (_QWORD)v12); v13 = (void *)*((_QWORD *)this + 7); if ( v13 ) operator delete(v13, *((_QWORD *)this + 9) - (_QWORD)v13); v14 = (void *)*((_QWORD *)this + 4); if ( v14 ) operator delete(v14, *((_QWORD *)this + 6) - (_QWORD)v14); v15 = (void *)*((_QWORD *)this + 1); if ( v15 ) operator delete(v15, *((_QWORD *)this + 3) - (_QWORD)v15); }
~PatchTable: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x80] TEST RDI,RDI JZ 0x0016931f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0016931f: MOV RDI,qword ptr [RBX + 0x88] TEST RDI,RDI JZ 0x00169331 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00169331: MOV RAX,qword ptr [RBX + 0xc8] MOV RCX,qword ptr [RBX + 0xd0] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x0016937c XOR R14D,R14D LAB_0016934d: MOV RDI,qword ptr [RAX + R14*0x8] TEST RDI,RDI JZ 0x0016935c MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0016935c: INC R14 MOV RAX,qword ptr [RBX + 0xc8] MOV RCX,qword ptr [RBX + 0xd0] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX CMP R14,RCX JL 0x0016934d LAB_0016937c: MOV RDI,qword ptr [RBX + 0xf8] TEST RDI,RDI JZ 0x00169397 MOV RSI,qword ptr [RBX + 0x108] SUB RSI,RDI CALL 0x0013a2d0 LAB_00169397: MOV RDI,qword ptr [RBX + 0xe0] TEST RDI,RDI JZ 0x001693b2 MOV RSI,qword ptr [RBX + 0xf0] SUB RSI,RDI CALL 0x0013a2d0 LAB_001693b2: MOV RDI,qword ptr [RBX + 0xc8] TEST RDI,RDI JZ 0x001693cd MOV RSI,qword ptr [RBX + 0xd8] SUB RSI,RDI CALL 0x0013a2d0 LAB_001693cd: LEA RDI,[RBX + 0xb0] CALL 0x0013b970 MOV RDI,qword ptr [RBX + 0x98] TEST RDI,RDI JZ 0x001693f4 MOV RSI,qword ptr [RBX + 0xa8] SUB RSI,RDI CALL 0x0013a2d0 LAB_001693f4: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x00169409 MOV RSI,qword ptr [RBX + 0x78] SUB RSI,RDI CALL 0x0013a2d0 LAB_00169409: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0016941e MOV RSI,qword ptr [RBX + 0x60] SUB RSI,RDI CALL 0x0013a2d0 LAB_0016941e: MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JZ 0x00169433 MOV RSI,qword ptr [RBX + 0x48] SUB RSI,RDI CALL 0x0013a2d0 LAB_00169433: MOV RDI,qword ptr [RBX + 0x20] TEST RDI,RDI JZ 0x00169448 MOV RSI,qword ptr [RBX + 0x30] SUB RSI,RDI CALL 0x0013a2d0 LAB_00169448: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x00169464 MOV RSI,qword ptr [RBX + 0x18] SUB RSI,RDI ADD RSP,0x8 POP RBX POP R14 JMP 0x0013a2d0 LAB_00169464: ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable() */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(PatchTable *this) { long *plVar1; void *pvVar2; long lVar3; long lVar4; if (*(long **)(this + 0x80) != (long *)0x0) { (**(code **)(**(long **)(this + 0x80) + 8))(); } if (*(long **)(this + 0x88) != (long *)0x0) { (**(code **)(**(long **)(this + 0x88) + 8))(); } lVar3 = *(long *)(this + 200); if (0 < (int)((ulong)(*(long *)(this + 0xd0) - lVar3) >> 3)) { lVar4 = 0; do { plVar1 = *(long **)(lVar3 + lVar4 * 8); if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } lVar4 = lVar4 + 1; lVar3 = *(long *)(this + 200); } while (lVar4 < (int)((ulong)(*(long *)(this + 0xd0) - lVar3) >> 3)); } pvVar2 = *(void **)(this + 0xf8); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x108) - (long)pvVar2); } pvVar2 = *(void **)(this + 0xe0); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xf0) - (long)pvVar2); } pvVar2 = *(void **)(this + 200); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xd8) - (long)pvVar2); } std:: vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>> ::~vector((vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>> *)(this + 0xb0)); pvVar2 = *(void **)(this + 0x98); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xa8) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x68); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x78) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x50); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x60) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x38); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x48) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x20); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x30) - (long)pvVar2); } pvVar2 = *(void **)(this + 8); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x18) - (long)pvVar2); return; } return; }
2,392
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTable.cpp
PatchTable::~PatchTable() { if (_vertexPrecisionIsDouble) { delete _localPointStencils.Get<double>(); } else { delete _localPointStencils.Get<float>(); } if (_varyingPrecisionIsDouble) { delete _localPointVaryingStencils.Get<double>(); } else { delete _localPointVaryingStencils.Get<float>(); } for (int fvc=0; fvc<(int)_localPointFaceVaryingStencils.size(); ++fvc) { if (_faceVaryingPrecisionIsDouble) { delete _localPointFaceVaryingStencils[fvc].Get<double>(); } else { delete _localPointFaceVaryingStencils[fvc].Get<float>(); } } }
O3
cpp
OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x80(%rdi), %rdi testq %rdi, %rdi je 0x6a807 movq (%rdi), %rax callq *0x8(%rax) movq 0x88(%rbx), %rdi testq %rdi, %rdi je 0x6a819 movq (%rdi), %rax callq *0x8(%rax) movq 0xc8(%rbx), %rax movq 0xd0(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x6a864 xorl %r14d, %r14d movq (%rax,%r14,8), %rdi testq %rdi, %rdi je 0x6a844 movq (%rdi), %rax callq *0x8(%rax) incq %r14 movq 0xc8(%rbx), %rax movq 0xd0(%rbx), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx cmpq %rcx, %r14 jl 0x6a835 movq 0xf8(%rbx), %rdi testq %rdi, %rdi je 0x6a87f movq 0x108(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0xe0(%rbx), %rdi testq %rdi, %rdi je 0x6a89a movq 0xf0(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0xc8(%rbx), %rdi testq %rdi, %rdi je 0x6a8b5 movq 0xd8(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 leaq 0xb0(%rbx), %rdi callq 0x3b930 movq 0x98(%rbx), %rdi testq %rdi, %rdi je 0x6a8dc movq 0xa8(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x6a8f1 movq 0x78(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x50(%rbx), %rdi testq %rdi, %rdi je 0x6a906 movq 0x60(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x38(%rbx), %rdi testq %rdi, %rdi je 0x6a91b movq 0x48(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x20(%rbx), %rdi testq %rdi, %rdi je 0x6a930 movq 0x30(%rbx), %rsi subq %rdi, %rsi callq 0x3a2b0 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x6a94c movq 0x18(%rbx), %rsi subq %rdi, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3a2b0 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Far10PatchTableD2Ev: push r14; Alternative name is 'OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable()' push rbx push rax mov rbx, rdi mov rdi, [rdi+80h] test rdi, rdi jz short loc_6A807 mov rax, [rdi] call qword ptr [rax+8] loc_6A807: mov rdi, [rbx+88h] test rdi, rdi jz short loc_6A819 mov rax, [rdi] call qword ptr [rax+8] loc_6A819: mov rax, [rbx+0C8h] mov rcx, [rbx+0D0h] sub rcx, rax shr rcx, 3 test ecx, ecx jle short loc_6A864 xor r14d, r14d loc_6A835: mov rdi, [rax+r14*8] test rdi, rdi jz short loc_6A844 mov rax, [rdi] call qword ptr [rax+8] loc_6A844: inc r14 mov rax, [rbx+0C8h] mov rcx, [rbx+0D0h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx cmp r14, rcx jl short loc_6A835 loc_6A864: mov rdi, [rbx+0F8h]; void * test rdi, rdi jz short loc_6A87F mov rsi, [rbx+108h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A87F: mov rdi, [rbx+0E0h]; void * test rdi, rdi jz short loc_6A89A mov rsi, [rbx+0F0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A89A: mov rdi, [rbx+0C8h]; void * test rdi, rdi jz short loc_6A8B5 mov rsi, [rbx+0D8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A8B5: lea rdi, [rbx+0B0h] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchTable16FVarPatchChannelESaIS4_EED2Ev; std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector() mov rdi, [rbx+98h]; void * test rdi, rdi jz short loc_6A8DC mov rsi, [rbx+0A8h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A8DC: mov rdi, [rbx+68h]; void * test rdi, rdi jz short loc_6A8F1 mov rsi, [rbx+78h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A8F1: mov rdi, [rbx+50h]; void * test rdi, rdi jz short loc_6A906 mov rsi, [rbx+60h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A906: mov rdi, [rbx+38h]; void * test rdi, rdi jz short loc_6A91B mov rsi, [rbx+48h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A91B: mov rdi, [rbx+20h]; void * test rdi, rdi jz short loc_6A930 mov rsi, [rbx+30h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6A930: mov rdi, [rbx+8]; void * test rdi, rdi jz short loc_6A94C mov rsi, [rbx+18h] sub rsi, rdi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp __ZdlPvm; operator delete(void *,ulong) loc_6A94C: add rsp, 8 pop rbx pop r14 retn
void OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(OpenSubdiv::v3_6_0::Far::PatchTable *this) { long long v2; // rdi long long v3; // rdi long long v4; // rax long long v5; // r14 long long v6; // rdi void *v7; // rdi void *v8; // rdi void *v9; // rdi void *v10; // rdi void *v11; // rdi void *v12; // rdi void *v13; // rdi void *v14; // rdi void *v15; // rdi v2 = *((_QWORD *)this + 16); if ( v2 ) (*(void ( **)(long long))(*(_QWORD *)v2 + 8LL))(v2); v3 = *((_QWORD *)this + 17); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); v4 = *((_QWORD *)this + 25); if ( (int)((unsigned long long)(*((_QWORD *)this + 26) - v4) >> 3) > 0 ) { v5 = 0LL; do { v6 = *(_QWORD *)(v4 + 8 * v5); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); ++v5; v4 = *((_QWORD *)this + 25); } while ( v5 < (int)((unsigned long long)(*((_QWORD *)this + 26) - v4) >> 3) ); } v7 = (void *)*((_QWORD *)this + 31); if ( v7 ) operator delete(v7, *((_QWORD *)this + 33) - (_QWORD)v7); v8 = (void *)*((_QWORD *)this + 28); if ( v8 ) operator delete(v8, *((_QWORD *)this + 30) - (_QWORD)v8); v9 = (void *)*((_QWORD *)this + 25); if ( v9 ) operator delete(v9, *((_QWORD *)this + 27) - (_QWORD)v9); std::vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>::~vector((char *)this + 176); v10 = (void *)*((_QWORD *)this + 19); if ( v10 ) operator delete(v10, *((_QWORD *)this + 21) - (_QWORD)v10); v11 = (void *)*((_QWORD *)this + 13); if ( v11 ) operator delete(v11, *((_QWORD *)this + 15) - (_QWORD)v11); v12 = (void *)*((_QWORD *)this + 10); if ( v12 ) operator delete(v12, *((_QWORD *)this + 12) - (_QWORD)v12); v13 = (void *)*((_QWORD *)this + 7); if ( v13 ) operator delete(v13, *((_QWORD *)this + 9) - (_QWORD)v13); v14 = (void *)*((_QWORD *)this + 4); if ( v14 ) operator delete(v14, *((_QWORD *)this + 6) - (_QWORD)v14); v15 = (void *)*((_QWORD *)this + 1); if ( v15 ) operator delete(v15, *((_QWORD *)this + 3) - (_QWORD)v15); }
~PatchTable: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x80] TEST RDI,RDI JZ 0x0016a807 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0016a807: MOV RDI,qword ptr [RBX + 0x88] TEST RDI,RDI JZ 0x0016a819 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0016a819: MOV RAX,qword ptr [RBX + 0xc8] MOV RCX,qword ptr [RBX + 0xd0] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x0016a864 XOR R14D,R14D LAB_0016a835: MOV RDI,qword ptr [RAX + R14*0x8] TEST RDI,RDI JZ 0x0016a844 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0016a844: INC R14 MOV RAX,qword ptr [RBX + 0xc8] MOV RCX,qword ptr [RBX + 0xd0] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX CMP R14,RCX JL 0x0016a835 LAB_0016a864: MOV RDI,qword ptr [RBX + 0xf8] TEST RDI,RDI JZ 0x0016a87f MOV RSI,qword ptr [RBX + 0x108] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a87f: MOV RDI,qword ptr [RBX + 0xe0] TEST RDI,RDI JZ 0x0016a89a MOV RSI,qword ptr [RBX + 0xf0] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a89a: MOV RDI,qword ptr [RBX + 0xc8] TEST RDI,RDI JZ 0x0016a8b5 MOV RSI,qword ptr [RBX + 0xd8] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a8b5: LEA RDI,[RBX + 0xb0] CALL 0x0013b930 MOV RDI,qword ptr [RBX + 0x98] TEST RDI,RDI JZ 0x0016a8dc MOV RSI,qword ptr [RBX + 0xa8] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a8dc: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0016a8f1 MOV RSI,qword ptr [RBX + 0x78] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a8f1: MOV RDI,qword ptr [RBX + 0x50] TEST RDI,RDI JZ 0x0016a906 MOV RSI,qword ptr [RBX + 0x60] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a906: MOV RDI,qword ptr [RBX + 0x38] TEST RDI,RDI JZ 0x0016a91b MOV RSI,qword ptr [RBX + 0x48] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a91b: MOV RDI,qword ptr [RBX + 0x20] TEST RDI,RDI JZ 0x0016a930 MOV RSI,qword ptr [RBX + 0x30] SUB RSI,RDI CALL 0x0013a2b0 LAB_0016a930: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0016a94c MOV RSI,qword ptr [RBX + 0x18] SUB RSI,RDI ADD RSP,0x8 POP RBX POP R14 JMP 0x0013a2b0 LAB_0016a94c: ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable() */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTable::~PatchTable(PatchTable *this) { long *plVar1; void *pvVar2; long lVar3; long lVar4; if (*(long **)(this + 0x80) != (long *)0x0) { (**(code **)(**(long **)(this + 0x80) + 8))(); } if (*(long **)(this + 0x88) != (long *)0x0) { (**(code **)(**(long **)(this + 0x88) + 8))(); } lVar3 = *(long *)(this + 200); if (0 < (int)((ulong)(*(long *)(this + 0xd0) - lVar3) >> 3)) { lVar4 = 0; do { plVar1 = *(long **)(lVar3 + lVar4 * 8); if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } lVar4 = lVar4 + 1; lVar3 = *(long *)(this + 200); } while (lVar4 < (int)((ulong)(*(long *)(this + 0xd0) - lVar3) >> 3)); } pvVar2 = *(void **)(this + 0xf8); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x108) - (long)pvVar2); } pvVar2 = *(void **)(this + 0xe0); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xf0) - (long)pvVar2); } pvVar2 = *(void **)(this + 200); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xd8) - (long)pvVar2); } std:: vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>> ::~vector((vector<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel,std::allocator<OpenSubdiv::v3_6_0::Far::PatchTable::FVarPatchChannel>> *)(this + 0xb0)); pvVar2 = *(void **)(this + 0x98); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0xa8) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x68); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x78) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x50); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x60) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x38); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x48) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x20); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x30) - (long)pvVar2); } pvVar2 = *(void **)(this + 8); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x18) - (long)pvVar2); return; } return; }
2,393
stbi_zlib_decode_malloc_guesssize
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) { stbi__zbuf a; char *p = (char *) stbi__malloc(initial_size); if (p == NULL) return NULL; a.zbuffer = (stbi_uc *) buffer; a.zbuffer_end = (stbi_uc *) buffer + len; if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { if (outlen) *outlen = (int) (a.zout - a.zout_start); return a.zout_start; } else { STBI_FREE(a.zout_start); return NULL; } }
O0
c
stbi_zlib_decode_malloc_guesssize: subq $0x1038, %rsp # imm = 0x1038 movq %rdi, 0x1028(%rsp) movl %esi, 0x1024(%rsp) movl %edx, 0x1020(%rsp) movq %rcx, 0x1018(%rsp) movslq 0x1020(%rsp), %rdi callq 0x87340 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x87290 movq $0x0, 0x1030(%rsp) jmp 0x87322 movq 0x1028(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x1028(%rsp), %rax movslq 0x1024(%rsp), %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movq 0x8(%rsp), %rsi movl 0x1020(%rsp), %edx leaq 0x10(%rsp), %rdi movl $0x1, %r8d movl %r8d, %ecx callq 0x87350 cmpl $0x0, %eax je 0x8730c cmpq $0x0, 0x1018(%rsp) je 0x872fd movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx subq %rcx, %rax movl %eax, %ecx movq 0x1018(%rsp), %rax movl %ecx, (%rax) movq 0x38(%rsp), %rax movq %rax, 0x1030(%rsp) jmp 0x87322 movq 0x38(%rsp), %rdi callq 0x79400 movq $0x0, 0x1030(%rsp) movq 0x1030(%rsp), %rax addq $0x1038, %rsp # imm = 0x1038 retq nopw %cs:(%rax,%rax)
stbi_zlib_decode_malloc_guesssize: sub rsp, 1038h mov [rsp+1038h+var_10], rdi mov [rsp+1038h+var_14], esi mov [rsp+1038h+var_18], edx mov [rsp+1038h+var_20], rcx movsxd rdi, [rsp+1038h+var_18]; unsigned __int64 call _ZL12stbi__mallocm; stbi__malloc(ulong) mov [rsp+1038h+var_1030], rax cmp [rsp+1038h+var_1030], 0 jnz short loc_87290 mov [rsp+1038h+var_8], 0 jmp loc_87322 loc_87290: mov rax, [rsp+1038h+var_10] mov [rsp+1038h+var_1028], rax mov rax, [rsp+1038h+var_10] movsxd rcx, [rsp+1038h+var_14] add rax, rcx mov [rsp+1038h+var_1020], rax mov rsi, [rsp+1038h+var_1030] mov edx, [rsp+1038h+var_18] lea rdi, [rsp+1038h+var_1028] mov r8d, 1 mov ecx, r8d call _ZL13stbi__do_zlibP10stbi__zbufPciii; stbi__do_zlib(stbi__zbuf *,char *,int,int,int) cmp eax, 0 jz short loc_8730C cmp [rsp+1038h+var_20], 0 jz short loc_872FD mov rax, [rsp+1038h+var_1008] mov rcx, [rsp+1038h+var_1000] sub rax, rcx mov ecx, eax mov rax, [rsp+1038h+var_20] mov [rax], ecx loc_872FD: mov rax, [rsp+1038h+var_1000] mov [rsp+1038h+var_8], rax jmp short loc_87322 loc_8730C: mov rdi, [rsp+1038h+var_1000] call _free mov [rsp+1038h+var_8], 0 loc_87322: mov rax, [rsp+1038h+var_8] add rsp, 1038h retn
long long stbi_zlib_decode_malloc_guesssize(long long a1, int a2, int a3, _DWORD *a4) { long long v5; // [rsp+8h] [rbp-1030h] _QWORD v6[4]; // [rsp+10h] [rbp-1028h] BYREF long long v7; // [rsp+30h] [rbp-1008h] long long v8; // [rsp+38h] [rbp-1000h] _DWORD *v9; // [rsp+1018h] [rbp-20h] unsigned int v10; // [rsp+1020h] [rbp-18h] int v11; // [rsp+1024h] [rbp-14h] long long v12; // [rsp+1028h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v5 = stbi__malloc(a3); if ( !v5 ) return 0LL; v6[0] = v12; v6[1] = v11 + v12; if ( (unsigned int)stbi__do_zlib(v6, v5, v10, 1LL) ) { if ( v9 ) *v9 = v7 - v8; return v8; } else { free(v8); return 0LL; } }
stbi_zlib_decode_malloc_guesssize: SUB RSP,0x1038 MOV qword ptr [RSP + 0x1028],RDI MOV dword ptr [RSP + 0x1024],ESI MOV dword ptr [RSP + 0x1020],EDX MOV qword ptr [RSP + 0x1018],RCX MOVSXD RDI,dword ptr [RSP + 0x1020] CALL 0x00187340 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00187290 MOV qword ptr [RSP + 0x1030],0x0 JMP 0x00187322 LAB_00187290: MOV RAX,qword ptr [RSP + 0x1028] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x1028] MOVSXD RCX,dword ptr [RSP + 0x1024] ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x1020] LEA RDI,[RSP + 0x10] MOV R8D,0x1 MOV ECX,R8D CALL 0x00187350 CMP EAX,0x0 JZ 0x0018730c CMP qword ptr [RSP + 0x1018],0x0 JZ 0x001872fd MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x1018] MOV dword ptr [RAX],ECX LAB_001872fd: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x1030],RAX JMP 0x00187322 LAB_0018730c: MOV RDI,qword ptr [RSP + 0x38] CALL 0x00179400 MOV qword ptr [RSP + 0x1030],0x0 LAB_00187322: MOV RAX,qword ptr [RSP + 0x1030] ADD RSP,0x1038 RET
void * stbi_zlib_decode_malloc_guesssize(long param_1,int param_2,int param_3,int *param_4) { int iVar1; char *pcVar2; long local_1028; long local_1020; int local_1008; void *local_1000; int *local_20; int local_18; int local_14; long local_10; void *local_8; local_20 = param_4; local_18 = param_3; local_14 = param_2; local_10 = param_1; pcVar2 = (char *)stbi__malloc((long)param_3); if (pcVar2 == (char *)0x0) { local_8 = (void *)0x0; } else { local_1028 = local_10; local_1020 = local_10 + local_14; iVar1 = stbi__do_zlib((stbi__zbuf *)&local_1028,pcVar2,local_18,1,1); if (iVar1 == 0) { free(local_1000); local_8 = (void *)0x0; } else { if (local_20 != (int *)0x0) { *local_20 = local_1008 - (int)local_1000; } local_8 = local_1000; } } return local_8; }
2,394
stbi_zlib_decode_malloc_guesssize
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) { stbi__zbuf a; char *p = (char *) stbi__malloc(initial_size); if (p == NULL) return NULL; a.zbuffer = (stbi_uc *) buffer; a.zbuffer_end = (stbi_uc *) buffer + len; if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { if (outlen) *outlen = (int) (a.zout - a.zout_start); return a.zout_start; } else { STBI_FREE(a.zout_start); return NULL; } }
O3
c
stbi_zlib_decode_malloc_guesssize: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x1008, %rsp # imm = 0x1008 movq %rcx, %rbx movl %edx, %ebp movl %esi, %r15d movq %rdi, %r14 movslq %edx, %rdi callq 0x1b880 testq %rax, %rax je 0x1fde8 movq %rsp, %rdi movq %r14, (%rdi) movslq %r15d, %rcx addq %r14, %rcx movq %rcx, 0x8(%rdi) movq %rax, %rsi movl %ebp, %edx movl $0x1, %ecx movl $0x1, %r8d callq 0x1fdff testl %eax, %eax je 0x1fdde testq %rbx, %rbx je 0x1fdf8 movl 0x20(%rsp), %ecx movq 0x28(%rsp), %rax subl %eax, %ecx movl %ecx, (%rbx) jmp 0x1fdea movq 0x28(%rsp), %rdi callq 0x1b640 xorl %eax, %eax addq $0x1008, %rsp # imm = 0x1008 popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x28(%rsp), %rax jmp 0x1fdea
stbi_zlib_decode_malloc_guesssize: push rbp push r15 push r14 push rbx sub rsp, 1008h mov rbx, rcx mov ebp, edx mov r15d, esi mov r14, rdi movsxd rdi, edx call _malloc test rax, rax jz short loc_1FDE8 mov rdi, rsp mov [rdi], r14 movsxd rcx, r15d add rcx, r14 mov [rdi+8], rcx mov rsi, rax mov edx, ebp mov ecx, 1 mov r8d, 1 call _ZL13stbi__do_zlibP10stbi__zbufPciii; stbi__do_zlib(stbi__zbuf *,char *,int,int,int) test eax, eax jz short loc_1FDDE test rbx, rbx jz short loc_1FDF8 mov ecx, [rsp+1028h+var_1008] mov rax, [rsp+1028h+var_1000] sub ecx, eax mov [rbx], ecx jmp short loc_1FDEA loc_1FDDE: mov rdi, [rsp+1028h+var_1000] call _free loc_1FDE8: xor eax, eax loc_1FDEA: add rsp, 1008h pop rbx pop r14 pop r15 pop rbp retn loc_1FDF8: mov rax, [rsp+1028h+var_1000] jmp short loc_1FDEA
long long stbi_zlib_decode_malloc_guesssize(long long a1, int a2, unsigned int a3, _DWORD *a4) { long long v6; // rax long long result; // rax _QWORD v8[4]; // [rsp+0h] [rbp-1028h] BYREF int v9; // [rsp+20h] [rbp-1008h] long long v10; // [rsp+28h] [rbp-1000h] v6 = malloc((int)a3); if ( !v6 ) return 0LL; v8[0] = a1; v8[1] = a1 + a2; if ( !(unsigned int)((long long ( *)(_QWORD *, long long, _QWORD, long long, long long))stbi__do_zlib)( v8, v6, a3, 1LL, 1LL) ) { free(v10); return 0LL; } result = v10; if ( a4 ) *a4 = v9 - v10; return result; }
stbi_zlib_decode_malloc_guesssize: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x1008 MOV RBX,RCX MOV EBP,EDX MOV R15D,ESI MOV R14,RDI MOVSXD RDI,EDX CALL 0x0011b880 TEST RAX,RAX JZ 0x0011fde8 MOV RDI,RSP MOV qword ptr [RDI],R14 MOVSXD RCX,R15D ADD RCX,R14 MOV qword ptr [RDI + 0x8],RCX MOV RSI,RAX MOV EDX,EBP MOV ECX,0x1 MOV R8D,0x1 CALL 0x0011fdff TEST EAX,EAX JZ 0x0011fdde TEST RBX,RBX JZ 0x0011fdf8 MOV ECX,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] SUB ECX,EAX MOV dword ptr [RBX],ECX JMP 0x0011fdea LAB_0011fdde: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0011b640 LAB_0011fde8: XOR EAX,EAX LAB_0011fdea: ADD RSP,0x1008 POP RBX POP R14 POP R15 POP RBP RET LAB_0011fdf8: MOV RAX,qword ptr [RSP + 0x28] JMP 0x0011fdea
void * stbi_zlib_decode_malloc_guesssize(long param_1,int param_2,int param_3,int *param_4) { int iVar1; char *pcVar2; long local_1028; long local_1020; int local_1008; void *local_1000; pcVar2 = (char *)malloc((long)param_3); if (pcVar2 != (char *)0x0) { local_1020 = param_2 + param_1; local_1028 = param_1; iVar1 = stbi__do_zlib((stbi__zbuf *)&local_1028,pcVar2,param_3,1,1); if (iVar1 != 0) { if (param_4 == (int *)0x0) { return local_1000; } *param_4 = local_1008 - (int)local_1000; return local_1000; } free(local_1000); } return (void *)0x0; }
2,395
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
llama.cpp/common/json.hpp
explicit parser(InputAdapterType&& adapter, const parser_callback_t<BasicJsonType> cb = nullptr, const bool allow_exceptions_ = true, const bool skip_comments = false) : callback(cb) , m_lexer(std::move(adapter), skip_comments) , allow_exceptions(allow_exceptions_) { // read first token get_token(); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %r8d, %r15d movl %ecx, %ebp movq %rsi, %r12 movq %rdi, %rbx movq %rdx, %rsi callq 0x88090 movl $0x0, 0x20(%rbx) leaq 0x28(%rbx), %r14 movups (%r12), %xmm0 movups %xmm0, 0x28(%rbx) movb %r15b, 0x38(%rbx) movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF xorl %eax, %eax movb %al, 0x40(%rbx) leaq 0x88(%rbx), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x48(%rbx) movups %xmm0, 0x58(%rbx) movups %xmm0, 0x68(%rbx) movq %rcx, 0x78(%rbx) movq %rax, 0x80(%rbx) movb %al, 0x88(%rbx) leaq 0x9a1da(%rip), %rcx # 0x122aa1 movq %rcx, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movq %rax, 0xb0(%rbx) callq 0x8896a movsbl %al, %eax movl %eax, 0xb8(%rbx) movb %bpl, 0xc0(%rbx) movq %r14, %rdi callq 0x889ae movl %eax, 0x20(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %r14, %rdi callq 0x88936 movq 0x10(%rbx), %rax testq %rax, %rax je 0x88926 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x21c10 movq %rax, %rdi callq 0x2a927
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb: push rbp push r15 push r14 push r12 push rbx mov r15d, r8d mov ebp, ecx mov r12, rsi mov rbx, rdi mov rsi, rdx call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) mov dword ptr [rbx+20h], 0 lea r14, [rbx+28h] movups xmm0, xmmword ptr [r12] movups xmmword ptr [rbx+28h], xmm0 mov [rbx+38h], r15b mov dword ptr [rbx+3Ch], 0FFFFFFFFh xor eax, eax mov [rbx+40h], al lea rcx, [rbx+88h] xorps xmm0, xmm0 movups xmmword ptr [rbx+48h], xmm0 movups xmmword ptr [rbx+58h], xmm0 movups xmmword ptr [rbx+68h], xmm0 mov [rbx+78h], rcx mov [rbx+80h], rax mov [rbx+88h], al lea rcx, aExampleToolCal+1Dh; "" mov [rbx+98h], rcx movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], rax call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; 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_decimal_point(void) movsx eax, al mov [rbx+0B8h], eax mov [rbx+0C0h], bpl mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; 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>>>::scan(void) mov [rbx+20h], eax pop rbx pop r12 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [rbx+10h] test rax, rax jz short loc_88926 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_88926: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser( long long a1, _OWORD *a2, long long a3, char a4, char a5) { long long result; // rax std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( (_OWORD *)a1, a3); *(_DWORD *)(a1 + 32) = 0; *(_OWORD *)(a1 + 40) = *a2; *(_BYTE *)(a1 + 56) = a5; *(_DWORD *)(a1 + 60) = -1; *(_BYTE *)(a1 + 64) = 0; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_QWORD *)(a1 + 120) = a1 + 136; *(_QWORD *)(a1 + 128) = 0LL; *(_BYTE *)(a1 + 136) = 0; *(_QWORD *)(a1 + 152) = ""; *(_OWORD *)(a1 + 160) = 0LL; *(_QWORD *)(a1 + 176) = 0LL; *(_DWORD *)(a1 + 184) = (char)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_decimal_point(); *(_BYTE *)(a1 + 192) = a4; result = 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(a1 + 40); *(_DWORD *)(a1 + 32) = result; return result; }
parser: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15D,R8D MOV EBP,ECX MOV R12,RSI MOV RBX,RDI MOV RSI,RDX CALL 0x00188090 MOV dword ptr [RBX + 0x20],0x0 LEA R14,[RBX + 0x28] MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV byte ptr [RBX + 0x38],R15B MOV dword ptr [RBX + 0x3c],0xffffffff XOR EAX,EAX MOV byte ptr [RBX + 0x40],AL LEA RCX,[RBX + 0x88] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x80],RAX MOV byte ptr [RBX + 0x88],AL LEA RCX,[0x222aa1] MOV qword ptr [RBX + 0x98],RCX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV qword ptr [RBX + 0xb0],RAX CALL 0x0018896a MOVSX EAX,AL MOV dword ptr [RBX + 0xb8],EAX MOV byte ptr [RBX + 0xc0],BPL LAB_001888f1: MOV RDI,R14 CALL 0x001889ae MOV dword ptr [RBX + 0x20],EAX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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 > > >::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>>> ::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,int8 *param_1,function *param_3, parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_4,parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_5) { int8 uVar1; char cVar2; int4 uVar3; std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)this,param_3); *(int4 *)(this + 0x20) = 0; uVar1 = param_1[1]; *(int8 *)(this + 0x28) = *param_1; *(int8 *)(this + 0x30) = uVar1; this[0x38] = param_5; *(int4 *)(this + 0x3c) = 0xffffffff; this[0x40] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> **)(this + 0x78) = this + 0x88; *(int8 *)(this + 0x80) = 0; this[0x88] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(char **)(this + 0x98) = ""; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; cVar2 = 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_decimal_point(); *(int *)(this + 0xb8) = (int)cVar2; this[0xc0] = param_4; /* try { // try from 001888f1 to 001888f8 has its CatchHandler @ 00188905 */ uVar3 = 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((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 + 0x28)); *(int4 *)(this + 0x20) = uVar3; return; }
2,396
ggml_backend_alloc_buffer
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
ggml_backend_buffer_t ggml_backend_alloc_buffer(ggml_backend_t backend, size_t size) { return ggml_backend_buft_alloc_buffer(ggml_backend_get_default_buffer_type(backend), size); }
O1
cpp
ggml_backend_alloc_buffer: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq 0x70(%rdi), %rdi callq *0x30(%rdi) movq %rax, %rbx testq %r14, %r14 je 0x26d4b movq 0x8(%rbx), %rax movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax movl $0x68, %edi callq 0x18090 xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) movq $0x0, 0x40(%rax) movq %rbx, 0x48(%rax) movaps %xmm0, 0x50(%rax) movl $0x0, 0x60(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ggml_backend_alloc_buffer: push r14 push rbx push rax mov r14, rsi mov rdi, [rdi+70h] call qword ptr [rdi+30h] mov rbx, rax test r14, r14 jz short loc_26D4B mov rax, [rbx+8] mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp rax loc_26D4B: mov edi, 68h ; 'h'; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 mov qword ptr [rax+40h], 0 mov [rax+48h], rbx movaps xmmword ptr [rax+50h], xmm0 mov dword ptr [rax+60h], 0 add rsp, 8 pop rbx pop r14 retn
long long ggml_backend_alloc_buffer(long long a1, long long a2) { long long v2; // rax long long v3; // rbx long long result; // rax v2 = (*(long long ( **)(_QWORD))(*(_QWORD *)(a1 + 112) + 48LL))(*(_QWORD *)(a1 + 112)); v3 = v2; if ( a2 ) return (*(long long ( **)(long long, long long))(v2 + 8))(v2, a2); result = operator new(0x68uLL); *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; *(_OWORD *)(result + 32) = 0LL; *(_OWORD *)(result + 48) = 0LL; *(_QWORD *)(result + 64) = 0LL; *(_QWORD *)(result + 72) = v3; *(_OWORD *)(result + 80) = 0LL; *(_DWORD *)(result + 96) = 0; return result; }
ggml_backend_alloc_buffer: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RDI,qword ptr [RDI + 0x70] CALL qword ptr [RDI + 0x30] MOV RBX,RAX TEST R14,R14 JZ 0x00126d4b MOV RAX,qword ptr [RBX + 0x8] MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_00126d4b: MOV EDI,0x68 CALL 0x00118090 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RAX + 0x40],0x0 MOV qword ptr [RAX + 0x48],RBX MOVAPS xmmword ptr [RAX + 0x50],XMM0 MOV dword ptr [RAX + 0x60],0x0 ADD RSP,0x8 POP RBX POP R14 RET
void ggml_backend_alloc_buffer(long param_1,long param_2) { long lVar1; int8 *puVar2; lVar1 = (**(code **)(*(long *)(param_1 + 0x70) + 0x30))(); if (param_2 != 0) { /* WARNING: Could not recover jumptable at 0x00126d49. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 8))(lVar1,param_2); return; } puVar2 = (int8 *)operator_new(0x68); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; puVar2[5] = 0; puVar2[6] = 0; puVar2[7] = 0; puVar2[8] = 0; puVar2[9] = lVar1; puVar2[10] = 0; puVar2[0xb] = 0; *(int4 *)(puVar2 + 0xc) = 0; return; }
2,397
ggml_backend_alloc_buffer
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp
ggml_backend_buffer_t ggml_backend_alloc_buffer(ggml_backend_t backend, size_t size) { return ggml_backend_buft_alloc_buffer(ggml_backend_get_default_buffer_type(backend), size); }
O3
cpp
ggml_backend_alloc_buffer: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq 0x70(%rdi), %rdi callq *0x30(%rdi) movq %rax, %rbx testq %r14, %r14 je 0x25934 movq 0x8(%rbx), %rax movq %rbx, %rdi movq %r14, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmpq *%rax movl $0x68, %edi callq 0x17080 xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) movq $0x0, 0x40(%rax) movq %rbx, 0x48(%rax) movaps %xmm0, 0x50(%rax) movl $0x0, 0x60(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ggml_backend_alloc_buffer: push r14 push rbx push rax mov r14, rsi mov rdi, [rdi+70h] call qword ptr [rdi+30h] mov rbx, rax test r14, r14 jz short loc_25934 mov rax, [rbx+8] mov rdi, rbx mov rsi, r14 add rsp, 8 pop rbx pop r14 jmp rax loc_25934: mov edi, 68h ; 'h'; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 mov qword ptr [rax+40h], 0 mov [rax+48h], rbx movaps xmmword ptr [rax+50h], xmm0 mov dword ptr [rax+60h], 0 add rsp, 8 pop rbx pop r14 retn
long long ggml_backend_alloc_buffer(long long a1, long long a2) { long long v2; // rax long long v3; // rbx long long result; // rax v2 = (*(long long ( **)(_QWORD))(*(_QWORD *)(a1 + 112) + 48LL))(*(_QWORD *)(a1 + 112)); v3 = v2; if ( a2 ) return (*(long long ( **)(long long, long long))(v2 + 8))(v2, a2); result = operator new(0x68uLL); *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; *(_OWORD *)(result + 32) = 0LL; *(_OWORD *)(result + 48) = 0LL; *(_QWORD *)(result + 64) = 0LL; *(_QWORD *)(result + 72) = v3; *(_OWORD *)(result + 80) = 0LL; *(_DWORD *)(result + 96) = 0; return result; }
ggml_backend_alloc_buffer: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RDI,qword ptr [RDI + 0x70] CALL qword ptr [RDI + 0x30] MOV RBX,RAX TEST R14,R14 JZ 0x00125934 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,RBX MOV RSI,R14 ADD RSP,0x8 POP RBX POP R14 JMP RAX LAB_00125934: MOV EDI,0x68 CALL 0x00117080 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 MOV qword ptr [RAX + 0x40],0x0 MOV qword ptr [RAX + 0x48],RBX MOVAPS xmmword ptr [RAX + 0x50],XMM0 MOV dword ptr [RAX + 0x60],0x0 ADD RSP,0x8 POP RBX POP R14 RET
void ggml_backend_alloc_buffer(long param_1,long param_2) { long lVar1; int8 *puVar2; lVar1 = (**(code **)(*(long *)(param_1 + 0x70) + 0x30))(); if (param_2 != 0) { /* WARNING: Could not recover jumptable at 0x00125932. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 8))(lVar1,param_2); return; } puVar2 = (int8 *)operator_new(0x68); *puVar2 = 0; puVar2[1] = 0; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; puVar2[5] = 0; puVar2[6] = 0; puVar2[7] = 0; puVar2[8] = 0; puVar2[9] = lVar1; puVar2[10] = 0; puVar2[0xb] = 0; *(int4 *)(puVar2 + 0xc) = 0; return; }
2,398
key_cache_write
eloqsql/mysys/mf_keycache.c
int key_cache_write(KEY_CACHE *keycache, File file, void *file_extra, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int force_write) { if (keycache->can_be_used) return keycache->interface_funcs->write(keycache->keycache_cb, file, file_extra, filepos, level, buff, length, block_length, force_write); /* We can't use mutex here as the key cache may not be initialized */ if (my_pwrite(file, buff, length, filepos, MYF(MY_NABP | MY_WAIT_IF_FULL))) return 1; return 0; }
O3
c
key_cache_write: cmpb $0x0, 0x49(%rdi) je 0x9d4da movq 0x8(%rdi), %rax movq 0x10(%rdi), %rdi movq 0x28(%rdi), %r11 movq %rax, %rdi jmpq *%r11 pushq %rbp movq %rsp, %rbp movl 0x10(%rbp), %edx movl $0x24, %r8d movl %esi, %edi movq %r9, %rsi callq 0xa796a xorl %ecx, %ecx testq %rax, %rax setne %cl movl %ecx, %eax popq %rbp retq
key_cache_write: cmp byte ptr [rdi+49h], 0 jz short loc_9D4DA mov rax, [rdi+8] mov rdi, [rdi+10h] mov r11, [rdi+28h] mov rdi, rax jmp r11 loc_9D4DA: push rbp mov rbp, rsp mov edx, [rbp+10h] mov r8d, 24h ; '$' mov edi, esi mov rsi, r9 call my_pwrite xor ecx, ecx test rax, rax setnz cl mov eax, ecx pop rbp retn
long long key_cache_write( long long a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6, unsigned int a7) { if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD))(*(_QWORD *)(a1 + 16) + 40LL))(*(_QWORD *)(a1 + 8)); else return my_pwrite(a2, a6, a7, a4, 36LL) != 0; }
key_cache_write: CMP byte ptr [RDI + 0x49],0x0 JZ 0x0019d4da MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV R11,qword ptr [RDI + 0x28] MOV RDI,RAX JMP R11 LAB_0019d4da: PUSH RBP MOV RBP,RSP MOV EDX,dword ptr [RBP + 0x10] MOV R8D,0x24 MOV EDI,ESI MOV RSI,R9 CALL 0x001a796a XOR ECX,ECX TEST RAX,RAX SETNZ CL MOV EAX,ECX POP RBP RET
ulong key_cache_write(long param_1,int4 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int4 param_7) { ulong uVar1; long lVar2; if (*(char *)(param_1 + 0x49) != '\0') { /* WARNING: Could not recover jumptable at 0x0019d4d7. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (**(code **)(*(long *)(param_1 + 0x10) + 0x28))(*(int8 *)(param_1 + 8)); return uVar1; } lVar2 = my_pwrite(param_2,param_6,param_7,param_4,0x24); return (ulong)(lVar2 != 0); }
2,399
pfs_register_rwlock_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_register_rwlock_v1(const char *category, PSI_rwlock_info_v1 *info, int count) { PSI_rwlock_key key; char rw_formatted_name[PFS_MAX_INFO_NAME_LENGTH]; char sx_formatted_name[PFS_MAX_INFO_NAME_LENGTH]; size_t rw_prefix_length; size_t sx_prefix_length; size_t len; size_t full_length; assert(category != NULL); assert(info != NULL); if (build_prefix(&rwlock_instrument_prefix, category, rw_formatted_name, &rw_prefix_length) || build_prefix(&sxlock_instrument_prefix, category, sx_formatted_name, &sx_prefix_length) || ! pfs_initialized) { for (; count>0; count--, info++) *(info->m_key)= 0; return ; } for (; count>0; count--, info++) { assert(info->m_key != NULL); assert(info->m_name != NULL); len= strlen(info->m_name); if (info->m_flags & PSI_RWLOCK_FLAG_SX) { full_length= sx_prefix_length + len; if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH)) { memcpy(sx_formatted_name + sx_prefix_length, info->m_name, len); key= register_rwlock_class(sx_formatted_name, (uint)full_length, info->m_flags); } else { pfs_print_error("REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n", category, info->m_name); key= 0; } } else { full_length= rw_prefix_length + len; if (likely(full_length <= PFS_MAX_INFO_NAME_LENGTH)) { memcpy(rw_formatted_name + rw_prefix_length, info->m_name, len); key= register_rwlock_class(rw_formatted_name, (uint)full_length, info->m_flags); } else { pfs_print_error("REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n", category, info->m_name); key= 0; } } *(info->m_key)= key; } return; }
O0
cpp
pfs_register_rwlock_v1: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x118(%rbp) movq %rsi, -0x120(%rbp) movl %edx, -0x124(%rbp) movq -0x118(%rbp), %rsi leaq -0x90(%rbp), %rdx leaq 0x1cf2cf(%rip), %rdi # 0x213a30 leaq -0x130(%rbp), %rcx callq 0x445e0 cmpl $0x0, %eax jne 0x447a4 movq -0x118(%rbp), %rsi leaq -0x110(%rbp), %rdx leaq 0x1cf2b9(%rip), %rdi # 0x213a40 leaq -0x138(%rbp), %rcx callq 0x445e0 cmpl $0x0, %eax jne 0x447a4 leaq 0x386a9d(%rip), %rax # 0x3cb23c testb $0x1, (%rax) jne 0x447e7 jmp 0x447a6 cmpl $0x0, -0x124(%rbp) jle 0x447e2 movq -0x120(%rbp), %rax movq (%rax), %rax movl $0x0, (%rax) movl -0x124(%rbp), %eax addl $-0x1, %eax movl %eax, -0x124(%rbp) movq -0x120(%rbp), %rax addq $0x18, %rax movq %rax, -0x120(%rbp) jmp 0x447a6 jmp 0x449aa jmp 0x447e9 cmpl $0x0, -0x124(%rbp) jle 0x449a8 movq -0x120(%rbp), %rax movq 0x8(%rax), %rdi callq 0x26150 movq %rax, -0x140(%rbp) movq -0x120(%rbp), %rax movl 0x10(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x448cb movq -0x138(%rbp), %rax addq -0x140(%rbp), %rax movq %rax, -0x148(%rbp) cmpq $0x80, -0x148(%rbp) setbe %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x4489c leaq -0x110(%rbp), %rdi addq -0x138(%rbp), %rdi movq -0x120(%rbp), %rax movq 0x8(%rax), %rsi movq -0x140(%rbp), %rdx callq 0x26280 leaq -0x110(%rbp), %rdi movq -0x148(%rbp), %rax movl %eax, %esi movq -0x120(%rbp), %rax movl 0x10(%rax), %edx callq 0x3a4b0 movl %eax, -0x128(%rbp) jmp 0x448c6 movq -0x118(%rbp), %rsi movq -0x120(%rbp), %rax movq 0x8(%rax), %rdx leaq 0x6a8d2(%rip), %rdi # 0xaf187 movb $0x0, %al callq 0x29c10 movl $0x0, -0x128(%rbp) jmp 0x44970 movq -0x130(%rbp), %rax addq -0x140(%rbp), %rax movq %rax, -0x148(%rbp) cmpq $0x80, -0x148(%rbp) setbe %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x44944 leaq -0x90(%rbp), %rdi addq -0x130(%rbp), %rdi movq -0x120(%rbp), %rax movq 0x8(%rax), %rsi movq -0x140(%rbp), %rdx callq 0x26280 leaq -0x90(%rbp), %rdi movq -0x148(%rbp), %rax movl %eax, %esi movq -0x120(%rbp), %rax movl 0x10(%rax), %edx callq 0x3a4b0 movl %eax, -0x128(%rbp) jmp 0x4496e movq -0x118(%rbp), %rsi movq -0x120(%rbp), %rax movq 0x8(%rax), %rdx leaq 0x6a85a(%rip), %rdi # 0xaf1b7 movb $0x0, %al callq 0x29c10 movl $0x0, -0x128(%rbp) jmp 0x44970 movl -0x128(%rbp), %ecx movq -0x120(%rbp), %rax movq (%rax), %rax movl %ecx, (%rax) movl -0x124(%rbp), %eax addl $-0x1, %eax movl %eax, -0x124(%rbp) movq -0x120(%rbp), %rax addq $0x18, %rax movq %rax, -0x120(%rbp) jmp 0x447e9 jmp 0x449aa movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x449c5 addq $0x150, %rsp # imm = 0x150 popq %rbp retq callq 0x26360 nopw (%rax,%rax)
pfs_register_rwlock_v1: push rbp mov rbp, rsp sub rsp, 150h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_118], rdi mov [rbp+var_120], rsi mov [rbp+var_124], edx mov rsi, [rbp+var_118] lea rdx, [rbp+var_90] lea rdi, rwlock_instrument_prefix lea rcx, [rbp+var_130] call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *) cmp eax, 0 jnz short loc_447A4 mov rsi, [rbp+var_118] lea rdx, [rbp+var_110] lea rdi, sxlock_instrument_prefix lea rcx, [rbp+var_138] call _ZL12build_prefixPK25st_mysql_const_lex_stringPKcPcPm; build_prefix(st_mysql_const_lex_string const*,char const*,char *,ulong *) cmp eax, 0 jnz short loc_447A4 lea rax, pfs_initialized test byte ptr [rax], 1 jnz short loc_447E7 loc_447A4: jmp short $+2 loc_447A6: cmp [rbp+var_124], 0 jle short loc_447E2 mov rax, [rbp+var_120] mov rax, [rax] mov dword ptr [rax], 0 mov eax, [rbp+var_124] add eax, 0FFFFFFFFh mov [rbp+var_124], eax mov rax, [rbp+var_120] add rax, 18h mov [rbp+var_120], rax jmp short loc_447A6 loc_447E2: jmp loc_449AA loc_447E7: jmp short $+2 loc_447E9: cmp [rbp+var_124], 0 jle loc_449A8 mov rax, [rbp+var_120] mov rdi, [rax+8] call _strlen mov [rbp+var_140], rax mov rax, [rbp+var_120] mov eax, [rax+10h] and eax, 10h cmp eax, 0 jz loc_448CB mov rax, [rbp+var_138] add rax, [rbp+var_140] mov qword ptr [rbp+var_148], rax cmp qword ptr [rbp+var_148], 80h setbe al and al, 1 movzx eax, al cmp eax, 0 jz short loc_4489C lea rdi, [rbp+var_110] add rdi, [rbp+var_138] mov rax, [rbp+var_120] mov rsi, [rax+8] mov rdx, [rbp+var_140] call _memcpy lea rdi, [rbp+var_110]; char * mov rax, qword ptr [rbp+var_148] mov esi, eax; unsigned int mov rax, [rbp+var_120] mov edx, [rax+10h]; int call _Z21register_rwlock_classPKcji; register_rwlock_class(char const*,uint,int) mov [rbp+var_128], eax jmp short loc_448C6 loc_4489C: mov rsi, [rbp+var_118] mov rax, [rbp+var_120] mov rdx, [rax+8] lea rdi, aRegisterBodyV1_0; "REGISTER_BODY_V1: (sx) name too long <%"... mov al, 0 call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...) mov [rbp+var_128], 0 loc_448C6: jmp loc_44970 loc_448CB: mov rax, [rbp+var_130] add rax, [rbp+var_140] mov qword ptr [rbp+var_148], rax cmp qword ptr [rbp+var_148], 80h setbe al and al, 1 movzx eax, al cmp eax, 0 jz short loc_44944 lea rdi, [rbp+var_90] add rdi, [rbp+var_130] mov rax, [rbp+var_120] mov rsi, [rax+8] mov rdx, [rbp+var_140] call _memcpy lea rdi, [rbp+var_90]; char * mov rax, qword ptr [rbp+var_148] mov esi, eax; unsigned int mov rax, [rbp+var_120] mov edx, [rax+10h]; int call _Z21register_rwlock_classPKcji; register_rwlock_class(char const*,uint,int) mov [rbp+var_128], eax jmp short loc_4496E loc_44944: mov rsi, [rbp+var_118] mov rax, [rbp+var_120] mov rdx, [rax+8] lea rdi, aRegisterBodyV1_1; "REGISTER_BODY_V1: (rw) name too long <%"... mov al, 0 call _Z15pfs_print_errorPKcz; pfs_print_error(char const*,...) mov [rbp+var_128], 0 loc_4496E: jmp short $+2 loc_44970: mov ecx, [rbp+var_128] mov rax, [rbp+var_120] mov rax, [rax] mov [rax], ecx mov eax, [rbp+var_124] add eax, 0FFFFFFFFh mov [rbp+var_124], eax mov rax, [rbp+var_120] add rax, 18h mov [rbp+var_120], rax jmp loc_447E9 loc_449A8: jmp short $+2 loc_449AA: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_449C5 add rsp, 150h pop rbp retn loc_449C5: call ___stack_chk_fail
unsigned long long pfs_register_rwlock_v1(long long a1, long long a2, int a3) { unsigned int v4; // [rsp+8h] [rbp-148h] unsigned int v5; // [rsp+8h] [rbp-148h] long long v6; // [rsp+10h] [rbp-140h] long long v7; // [rsp+18h] [rbp-138h] BYREF long long v8; // [rsp+20h] [rbp-130h] BYREF int v9; // [rsp+28h] [rbp-128h] int v10; // [rsp+2Ch] [rbp-124h] long long v11; // [rsp+30h] [rbp-120h] long long v12; // [rsp+38h] [rbp-118h] char v13[128]; // [rsp+40h] [rbp-110h] BYREF char v14[136]; // [rsp+C0h] [rbp-90h] BYREF unsigned long long v15; // [rsp+148h] [rbp-8h] v15 = __readfsqword(0x28u); v12 = a1; v11 = a2; v10 = a3; if ( (unsigned int)build_prefix(&rwlock_instrument_prefix, a1, (long long)v14, &v8) || (unsigned int)build_prefix(&sxlock_instrument_prefix, v12, (long long)v13, &v7) || (pfs_initialized[0] & 1) == 0 ) { while ( v10 > 0 ) { **(_DWORD **)v11 = 0; --v10; v11 += 24LL; } } else { while ( v10 > 0 ) { v6 = strlen(*(_QWORD *)(v11 + 8)); if ( (*(_DWORD *)(v11 + 16) & 0x10) != 0 ) { v4 = v6 + v7; if ( (unsigned long long)(v6 + v7) > 0x80 ) { pfs_print_error("REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n"); v9 = 0; } else { memcpy(&v13[v7], *(_QWORD *)(v11 + 8), v6); v9 = register_rwlock_class(v13, v4, *(_DWORD *)(v11 + 16)); } } else { v5 = v6 + v8; if ( (unsigned long long)(v6 + v8) > 0x80 ) { pfs_print_error("REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n"); v9 = 0; } else { memcpy(&v14[v8], *(_QWORD *)(v11 + 8), v6); v9 = register_rwlock_class(v14, v5, *(_DWORD *)(v11 + 16)); } } **(_DWORD **)v11 = v9; --v10; v11 += 24LL; } } return __readfsqword(0x28u); }
pfs_register_rwlock_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x118],RDI MOV qword ptr [RBP + -0x120],RSI MOV dword ptr [RBP + -0x124],EDX MOV RSI,qword ptr [RBP + -0x118] LEA RDX,[RBP + -0x90] LEA RDI,[0x313a30] LEA RCX,[RBP + -0x130] CALL 0x001445e0 CMP EAX,0x0 JNZ 0x001447a4 MOV RSI,qword ptr [RBP + -0x118] LEA RDX,[RBP + -0x110] LEA RDI,[0x313a40] LEA RCX,[RBP + -0x138] CALL 0x001445e0 CMP EAX,0x0 JNZ 0x001447a4 LEA RAX,[0x4cb23c] TEST byte ptr [RAX],0x1 JNZ 0x001447e7 LAB_001447a4: JMP 0x001447a6 LAB_001447a6: CMP dword ptr [RBP + -0x124],0x0 JLE 0x001447e2 MOV RAX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x124] ADD EAX,-0x1 MOV dword ptr [RBP + -0x124],EAX MOV RAX,qword ptr [RBP + -0x120] ADD RAX,0x18 MOV qword ptr [RBP + -0x120],RAX JMP 0x001447a6 LAB_001447e2: JMP 0x001449aa LAB_001447e7: JMP 0x001447e9 LAB_001447e9: CMP dword ptr [RBP + -0x124],0x0 JLE 0x001449a8 MOV RAX,qword ptr [RBP + -0x120] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00126150 MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [RBP + -0x120] MOV EAX,dword ptr [RAX + 0x10] AND EAX,0x10 CMP EAX,0x0 JZ 0x001448cb MOV RAX,qword ptr [RBP + -0x138] ADD RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x148],RAX CMP qword ptr [RBP + -0x148],0x80 SETBE AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0014489c LEA RDI,[RBP + -0x110] ADD RDI,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RBP + -0x120] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x140] CALL 0x00126280 LEA RDI,[RBP + -0x110] MOV RAX,qword ptr [RBP + -0x148] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x120] MOV EDX,dword ptr [RAX + 0x10] CALL 0x0013a4b0 MOV dword ptr [RBP + -0x128],EAX JMP 0x001448c6 LAB_0014489c: MOV RSI,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RBP + -0x120] MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[0x1af187] MOV AL,0x0 CALL 0x00129c10 MOV dword ptr [RBP + -0x128],0x0 LAB_001448c6: JMP 0x00144970 LAB_001448cb: MOV RAX,qword ptr [RBP + -0x130] ADD RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x148],RAX CMP qword ptr [RBP + -0x148],0x80 SETBE AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00144944 LEA RDI,[RBP + -0x90] ADD RDI,qword ptr [RBP + -0x130] MOV RAX,qword ptr [RBP + -0x120] MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x140] CALL 0x00126280 LEA RDI,[RBP + -0x90] MOV RAX,qword ptr [RBP + -0x148] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x120] MOV EDX,dword ptr [RAX + 0x10] CALL 0x0013a4b0 MOV dword ptr [RBP + -0x128],EAX JMP 0x0014496e LAB_00144944: MOV RSI,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RBP + -0x120] MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[0x1af1b7] MOV AL,0x0 CALL 0x00129c10 MOV dword ptr [RBP + -0x128],0x0 LAB_0014496e: JMP 0x00144970 LAB_00144970: MOV ECX,dword ptr [RBP + -0x128] MOV RAX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x124] ADD EAX,-0x1 MOV dword ptr [RBP + -0x124],EAX MOV RAX,qword ptr [RBP + -0x120] ADD RAX,0x18 MOV qword ptr [RBP + -0x120],RAX JMP 0x001447e9 LAB_001449a8: JMP 0x001449aa LAB_001449aa: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001449c5 ADD RSP,0x150 POP RBP RET LAB_001449c5: CALL 0x00126360
void pfs_register_rwlock_v1(char *param_1,int8 *param_2,int param_3) { int iVar1; size_t __n; ulong uVar2; long in_FS_OFFSET; ulong local_140; ulong local_138; int4 local_130; int local_12c; int8 *local_128; char *local_120; char local_118 [128]; char local_98 [136]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_12c = param_3; local_128 = param_2; local_120 = param_1; iVar1 = build_prefix((st_mysql_const_lex_string *)rwlock_instrument_prefix,param_1,local_98, &local_138); if (((iVar1 == 0) && (iVar1 = build_prefix((st_mysql_const_lex_string *)sxlock_instrument_prefix,local_120, local_118,&local_140), iVar1 == 0)) && ((pfs_initialized & 1) != 0)) { for (; 0 < local_12c; local_12c = local_12c + -1) { __n = strlen((char *)local_128[1]); if ((*(uint *)(local_128 + 2) & 0x10) == 0) { uVar2 = local_138 + __n; if (uVar2 < 0x81) { memcpy(local_98 + local_138,(void *)local_128[1],__n); local_130 = register_rwlock_class(local_98,(uint)uVar2,*(int *)(local_128 + 2)); } else { pfs_print_error("REGISTER_BODY_V1: (rw) name too long <%s> <%s>\n",local_120,local_128[1]) ; local_130 = 0; } } else { uVar2 = local_140 + __n; if (uVar2 < 0x81) { memcpy(local_118 + local_140,(void *)local_128[1],__n); local_130 = register_rwlock_class(local_118,(uint)uVar2,*(int *)(local_128 + 2)); } else { pfs_print_error("REGISTER_BODY_V1: (sx) name too long <%s> <%s>\n",local_120,local_128[1]) ; local_130 = 0; } } *(int4 *)*local_128 = local_130; local_128 = local_128 + 3; } } else { for (; 0 < local_12c; local_12c = local_12c + -1) { *(int4 *)*local_128 = 0; local_128 = local_128 + 3; } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }